summaryrefslogtreecommitdiff
path: root/wizards/source
diff options
context:
space:
mode:
Diffstat (limited to 'wizards/source')
-rw-r--r--wizards/source/config/delzip0
-rw-r--r--wizards/source/config/dialog.xlc5
-rw-r--r--wizards/source/config/makefile.mk52
-rw-r--r--wizards/source/config/script.xlc5
-rw-r--r--wizards/source/configshare/delzip0
-rw-r--r--wizards/source/configshare/dialog.xlc13
-rw-r--r--wizards/source/configshare/makefile.mk52
-rw-r--r--wizards/source/configshare/script.xlc13
-rw-r--r--wizards/source/depot/CommonLang.xba351
-rw-r--r--wizards/source/depot/Currency.xba178
-rw-r--r--wizards/source/depot/Depot.xba500
-rw-r--r--wizards/source/depot/Dialog2.xdl36
-rw-r--r--wizards/source/depot/Dialog3.xdl45
-rw-r--r--wizards/source/depot/Dialog4.xdl17
-rw-r--r--wizards/source/depot/Internet.xba339
-rw-r--r--wizards/source/depot/Lang_de.xba158
-rw-r--r--wizards/source/depot/Lang_en.xba158
-rw-r--r--wizards/source/depot/Lang_es.xba158
-rw-r--r--wizards/source/depot/Lang_fr.xba158
-rw-r--r--wizards/source/depot/Lang_it.xba158
-rw-r--r--wizards/source/depot/Lang_ja.xba158
-rw-r--r--wizards/source/depot/Lang_ko.xba158
-rw-r--r--wizards/source/depot/Lang_sv.xba157
-rw-r--r--wizards/source/depot/Lang_tw.xba158
-rw-r--r--wizards/source/depot/Lang_zh.xba158
-rw-r--r--wizards/source/depot/delzip1
-rw-r--r--wizards/source/depot/dialog.xlb7
-rw-r--r--wizards/source/depot/makefile.mk53
-rw-r--r--wizards/source/depot/script.xlb19
-rw-r--r--wizards/source/depot/tools.xba200
-rw-r--r--wizards/source/euro/AutoPilotRun.xba409
-rw-r--r--wizards/source/euro/Common.xba272
-rw-r--r--wizards/source/euro/ConvertRun.xba317
-rw-r--r--wizards/source/euro/DlgConvert.xdl77
-rw-r--r--wizards/source/euro/DlgPassword.xdl15
-rw-r--r--wizards/source/euro/Hard.xba229
-rw-r--r--wizards/source/euro/Init.xba604
-rw-r--r--wizards/source/euro/Protect.xba175
-rw-r--r--wizards/source/euro/Soft.xba239
-rw-r--r--wizards/source/euro/Writer.xba72
-rw-r--r--wizards/source/euro/delzip0
-rw-r--r--wizards/source/euro/dialog.xlb6
-rw-r--r--wizards/source/euro/euro.src476
-rw-r--r--wizards/source/euro/makefile.mk53
-rw-r--r--wizards/source/euro/script.xlb12
-rw-r--r--wizards/source/formwizard/DBMeta.xba330
-rw-r--r--wizards/source/formwizard/DlgFormDB.xdl102
-rw-r--r--wizards/source/formwizard/FormWizard.xba427
-rw-r--r--wizards/source/formwizard/Language.xba285
-rw-r--r--wizards/source/formwizard/Layouter.xba380
-rw-r--r--wizards/source/formwizard/dbwizres.src3518
-rw-r--r--wizards/source/formwizard/delzip0
-rw-r--r--wizards/source/formwizard/develop.xba533
-rw-r--r--wizards/source/formwizard/dialog.xlb5
-rw-r--r--wizards/source/formwizard/makefile.mk53
-rw-r--r--wizards/source/formwizard/script.xlb10
-rw-r--r--wizards/source/formwizard/tools.xba349
-rw-r--r--wizards/source/gimmicks/AutoText.xba97
-rw-r--r--wizards/source/gimmicks/ChangeAllChars.xba75
-rw-r--r--wizards/source/gimmicks/GetTexts.xba522
-rw-r--r--wizards/source/gimmicks/ReadDir.xba305
-rw-r--r--wizards/source/gimmicks/ReadFolderDlg.xdl22
-rw-r--r--wizards/source/gimmicks/UserfieldDlg.xdl49
-rw-r--r--wizards/source/gimmicks/Userfields.xba219
-rw-r--r--wizards/source/gimmicks/delzip0
-rw-r--r--wizards/source/gimmicks/dialog.xlb6
-rw-r--r--wizards/source/gimmicks/makefile.mk46
-rw-r--r--wizards/source/gimmicks/readdirs.dlgbin0 -> 3180 bytes
-rw-r--r--wizards/source/gimmicks/script.xlb9
-rw-r--r--wizards/source/imagelists/imagelists.src215
-rw-r--r--wizards/source/imagelists/makefile.mk50
-rw-r--r--wizards/source/importwizard/API.xba208
-rw-r--r--wizards/source/importwizard/DialogModul.xba657
-rw-r--r--wizards/source/importwizard/FilesModul.xba824
-rw-r--r--wizards/source/importwizard/ImportDialog.xdl96
-rw-r--r--wizards/source/importwizard/Language.xba157
-rw-r--r--wizards/source/importwizard/Main.xba290
-rw-r--r--wizards/source/importwizard/delzip0
-rw-r--r--wizards/source/importwizard/dialog.xlb5
-rw-r--r--wizards/source/importwizard/importwi.src674
-rw-r--r--wizards/source/importwizard/makefile.mk53
-rw-r--r--wizards/source/importwizard/script.xlb9
-rw-r--r--wizards/source/launcher/DicOOo.xba59
-rw-r--r--wizards/source/launcher/delzip0
-rw-r--r--wizards/source/launcher/dialog.xlb3
-rw-r--r--wizards/source/launcher/makefile.mk46
-rw-r--r--wizards/source/launcher/script.xlb5
-rw-r--r--wizards/source/schedule/BankHoliday.xba177
-rw-r--r--wizards/source/schedule/CalendarMain.xba302
-rw-r--r--wizards/source/schedule/CreateTable.xba133
-rw-r--r--wizards/source/schedule/DlgCalendar.xdl64
-rw-r--r--wizards/source/schedule/DlgControl.xba148
-rw-r--r--wizards/source/schedule/GermanHolidays.xba132
-rw-r--r--wizards/source/schedule/Language.xba95
-rw-r--r--wizards/source/schedule/LocalHolidays.xba642
-rw-r--r--wizards/source/schedule/OwnEvents.xba217
-rw-r--r--wizards/source/schedule/delzip0
-rw-r--r--wizards/source/schedule/dialog.xlb5
-rw-r--r--wizards/source/schedule/makefile.mk53
-rw-r--r--wizards/source/schedule/schedule.src357
-rw-r--r--wizards/source/schedule/script.xlb12
-rw-r--r--wizards/source/standard/Module1.xba7
-rw-r--r--wizards/source/standard/delzip0
-rw-r--r--wizards/source/standard/dialog.xlb3
-rw-r--r--wizards/source/standard/makefile.mk45
-rw-r--r--wizards/source/standard/script.xlb5
-rw-r--r--wizards/source/template/Autotext.xba173
-rw-r--r--wizards/source/template/Correspondence.xba286
-rw-r--r--wizards/source/template/DialogStyles.xdl15
-rw-r--r--wizards/source/template/ModuleAgenda.xba203
-rw-r--r--wizards/source/template/Samples.xba185
-rw-r--r--wizards/source/template/TemplateDialog.xdl29
-rw-r--r--wizards/source/template/delzip0
-rw-r--r--wizards/source/template/dialog.xlb7
-rw-r--r--wizards/source/template/makefile.mk54
-rw-r--r--wizards/source/template/script.xlb8
-rw-r--r--wizards/source/template/template.src358
-rw-r--r--wizards/source/tools/Debug.xba236
-rw-r--r--wizards/source/tools/DlgOverwriteAll.xdl17
-rw-r--r--wizards/source/tools/Listbox.xba353
-rw-r--r--wizards/source/tools/Misc.xba817
-rw-r--r--wizards/source/tools/ModuleControls.xba370
-rw-r--r--wizards/source/tools/Strings.xba452
-rw-r--r--wizards/source/tools/UCB.xba294
-rw-r--r--wizards/source/tools/delzip0
-rw-r--r--wizards/source/tools/dialog.xlb5
-rw-r--r--wizards/source/tools/makefile.mk45
-rw-r--r--wizards/source/tools/script.xlb10
-rw-r--r--wizards/source/tutorials/Functions.xba368
-rw-r--r--wizards/source/tutorials/RoadMap.xba117
-rw-r--r--wizards/source/tutorials/ShowInfoDialog.xba305
-rw-r--r--wizards/source/tutorials/TutorialClose.xba15
-rw-r--r--wizards/source/tutorials/TutorialCloseDialog.xdl14
-rw-r--r--wizards/source/tutorials/TutorialCreator.xba10
-rw-r--r--wizards/source/tutorials/TutorialOpen.xba96
-rw-r--r--wizards/source/tutorials/TutorialOpenDialog.xdl21
-rw-r--r--wizards/source/tutorials/TutorialsDialog.xdl26
-rw-r--r--wizards/source/tutorials/delzip0
-rw-r--r--wizards/source/tutorials/dialog.xlb7
-rw-r--r--wizards/source/tutorials/makefile.mk45
-rw-r--r--wizards/source/tutorials/script.xlb10
-rw-r--r--wizards/source/webwizard/Bullets.xba117
-rw-r--r--wizards/source/webwizard/Common.xba145
-rw-r--r--wizards/source/webwizard/HtmlAutoPilotBasic.xba436
-rw-r--r--wizards/source/webwizard/Language.xba84
-rw-r--r--wizards/source/webwizard/WebWzrd.xdl28
-rw-r--r--wizards/source/webwizard/delzip0
-rw-r--r--wizards/source/webwizard/dialog.xlb5
-rw-r--r--wizards/source/webwizard/makefile.mk53
-rw-r--r--wizards/source/webwizard/script.xlb8
-rw-r--r--wizards/source/webwizard/webwizar.src167
151 files changed, 25505 insertions, 0 deletions
diff --git a/wizards/source/config/delzip b/wizards/source/config/delzip
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/wizards/source/config/delzip
diff --git a/wizards/source/config/dialog.xlc b/wizards/source/config/dialog.xlc
new file mode 100644
index 000000000000..34064e83e5e7
--- /dev/null
+++ b/wizards/source/config/dialog.xlc
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:libraries PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "libraries.dtd">
+<library:libraries xmlns:library="http://openoffice.org/2000/library" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <library:library library:name="Standard" library:link="false"/>
+</library:libraries>
diff --git a/wizards/source/config/makefile.mk b/wizards/source/config/makefile.mk
new file mode 100644
index 000000000000..42ec8d468782
--- /dev/null
+++ b/wizards/source/config/makefile.mk
@@ -0,0 +1,52 @@
+#*************************************************************************
+#
+# 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.
+#
+#*************************************************************************
+PRJ=..$/..
+
+
+
+PRJNAME=wizards
+TARGET=configall
+
+.INCLUDE : settings.mk
+
+.INCLUDE : $(PRJ)$/util$/target.pmk
+
+
+
+ZIP1TARGET = $(CONFIG_ALL_TARGET)
+
+ZIP1LIST = * -x makefile.*
+
+
+
+
+.INCLUDE : target.mk
+
+
+
+
+
diff --git a/wizards/source/config/script.xlc b/wizards/source/config/script.xlc
new file mode 100644
index 000000000000..34064e83e5e7
--- /dev/null
+++ b/wizards/source/config/script.xlc
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:libraries PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "libraries.dtd">
+<library:libraries xmlns:library="http://openoffice.org/2000/library" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <library:library library:name="Standard" library:link="false"/>
+</library:libraries>
diff --git a/wizards/source/configshare/delzip b/wizards/source/configshare/delzip
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/wizards/source/configshare/delzip
diff --git a/wizards/source/configshare/dialog.xlc b/wizards/source/configshare/dialog.xlc
new file mode 100644
index 000000000000..b63ebd6d71d2
--- /dev/null
+++ b/wizards/source/configshare/dialog.xlc
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:libraries PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "libraries.dtd">
+<library:libraries xmlns:library="http://openoffice.org/2000/library" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <library:library library:name="FormWizard" xlink:href="$(INST)/share/basic/FormWizard/dialog.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/>
+ <library:library library:name="Template" xlink:href="$(INST)/share/basic/Template/dialog.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/>
+ <library:library library:name="Tools" xlink:href="$(INST)/share/basic/Tools/dialog.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/>
+ <library:library library:name="Schedule" xlink:href="$(INST)/share/basic/Schedule/dialog.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/>
+ <library:library library:name="Gimmicks" xlink:href="$(INST)/share/basic/Gimmicks/dialog.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/>
+ <library:library library:name="ImportWizard" xlink:href="$(INST)/share/basic/ImportWizard/dialog.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/>
+ <library:library library:name="Euro" xlink:href="$(INST)/share/basic/Euro/dialog.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/>
+ <library:library library:name="Depot" xlink:href="$(INST)/share/basic/Depot/dialog.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/>
+ <library:library library:name="ScriptBindingLibrary" xlink:href="$(INST)/share/basic/ScriptBindingLibrary/dialog.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/>
+</library:libraries> \ No newline at end of file
diff --git a/wizards/source/configshare/makefile.mk b/wizards/source/configshare/makefile.mk
new file mode 100644
index 000000000000..c86f66fb8a76
--- /dev/null
+++ b/wizards/source/configshare/makefile.mk
@@ -0,0 +1,52 @@
+#*************************************************************************
+#
+# 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.
+#
+#*************************************************************************
+PRJ=..$/..
+
+
+
+PRJNAME=wizards
+TARGET=configshare
+
+.INCLUDE : settings.mk
+
+.INCLUDE : $(PRJ)$/util$/target.pmk
+
+
+
+ZIP1TARGET = $(CONFIG_SHARE_TARGET)
+
+ZIP1LIST = * -x makefile.*
+
+
+
+
+.INCLUDE : target.mk
+
+
+
+
+
diff --git a/wizards/source/configshare/script.xlc b/wizards/source/configshare/script.xlc
new file mode 100644
index 000000000000..aaf1b0d9303e
--- /dev/null
+++ b/wizards/source/configshare/script.xlc
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:libraries PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "libraries.dtd">
+<library:libraries xmlns:library="http://openoffice.org/2000/library" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <library:library library:name="FormWizard" xlink:href="$(INST)/share/basic/FormWizard/script.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/>
+ <library:library library:name="Template" xlink:href="$(INST)/share/basic/Template/script.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/>
+ <library:library library:name="Tools" xlink:href="$(INST)/share/basic/Tools/script.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/>
+ <library:library library:name="Schedule" xlink:href="$(INST)/share/basic/Schedule/script.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/>
+ <library:library library:name="Gimmicks" xlink:href="$(INST)/share/basic/Gimmicks/script.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/>
+ <library:library library:name="ImportWizard" xlink:href="$(INST)/share/basic/ImportWizard/script.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/>
+ <library:library library:name="Euro" xlink:href="$(INST)/share/basic/Euro/script.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/>
+ <library:library library:name="Depot" xlink:href="$(INST)/share/basic/Depot/script.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/>
+ <library:library library:name="ScriptBindingLibrary" xlink:href="$(INST)/share/basic/ScriptBindingLibrary/script.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/>
+</library:libraries> \ No newline at end of file
diff --git a/wizards/source/depot/CommonLang.xba b/wizards/source/depot/CommonLang.xba
new file mode 100644
index 000000000000..a1cb283dab14
--- /dev/null
+++ b/wizards/source/depot/CommonLang.xba
@@ -0,0 +1,351 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="CommonLang" script:language="StarBasic">REM ***** BASIC *****
+
+
+&apos; Column A has the index 1
+Public Const SBCOLUMNNAME1 = 3 &apos; Stock names, sheet 1
+Public Const SBCOLUMNID1 = 4 &apos; Stock ID, sheet 1
+Public Const SBCOLUMNQUANTITY1 = 5 &apos; Stock quantity sheet 1
+Public Const SBCOLUMNRATE1 = 7 &apos; Price for stocks, sheet 1
+Public Const SBCOLUMNNAME2 = 3 &apos; Stock names, sheet 2
+Public Const SBCOLUMNDATE2 = 4 &apos; Transaction dates, sheet 2
+Public Const SBCOLUMNQUANTITY2 = 5 &apos; Transaction quantity, sheet 2
+Public Const SBCOLUMNRATE2 = 6 &apos; Price for stocks, sheet 2
+Public Const SBCOLUMNPROVPERCENT2 = 7 &apos; Provision in %, sheet 2
+Public Const SBCOLUMNPROVMIN2 = 8 &apos; Minimum provision, sheet 2
+Public Const SBCOLUMNPROVFIX2 = 9 &apos; Fixed provision, sheet 2
+Public Const SBCOLUMNPROCEEDS2 = 12 &apos; Profit, sheet 2
+Public Const SBCOLUMNQTYSOLD2 = 14 &apos; Quantity sold, sheet 2
+Public Const SBCOLUMNQTYREST2 = 15 &apos; Quantity not sold yet, sheet 2
+Public Const SBCOLUMNPRCREST2 = 16 &apos; Proportional proce for quantity not sold yet, sheet 2
+Public Const SBCOLUMNREALPROC2 = 17 &apos; Realized proceeds, sheet 2
+Public Const SBCOLUMNDIVIDEND2 = 18 &apos; Dividend paid, sheet 2
+Public Const SBCOLUMNREALPROFIT2 = 19 &apos; Realized profit, sheet 2
+Public Const SBROWFIRSTTRANSACT2 = 8 &apos; First data row, sheet 2
+Public Const SBROWHEADER1 = 6 &apos; Headline, sheet 1
+Public Const SBMSGOK = 0
+Public Const SBMSGYESNO = 4
+Public Const SBMSGSTOP = 16
+Public Const SBMSGQUESTION = 32
+Public Const SBMSGDEFAULTBTN2 = 256
+Public Const SBHASID = 1 &apos; 0 = no ID, 1 = stocks have an ID
+Public Const SBDIALOGSELL = 1 &apos; Step for main dialog
+Public Const SBDIALOGBUY = 2 &apos; Step for main dialog
+Public Const SBBINARY = 0
+Public TransactMode as Integer
+Public Const LIFO = -1
+Public Const FIFO = 1
+
+Public Const HANDLEDIVIDEND = 1
+Public Const HANDLESPLIT = 2
+
+Global oDocument as Object
+Global oDocFormats() as Object
+Global oController as Object
+Global oFirstSheet as Object
+Global oBankSheet as Object
+Global oMovementSheet as Object
+Global sDocLanguage as String
+Global sDocCountry as String
+Global oSheets as Object
+Global oDocLocale as New com.sun.star.lang.Locale
+Global bEnableMarket as Boolean
+Global bEnableInternet as Boolean
+Global oMarketModel as Object
+Global oInternetModel as Object
+
+Global sCurCurrency$, sCurExtension$, sCurChartSource$, sCurStockIDLabel$, sCurSeparator$
+
+Public oNumberFormatter as Object
+Public bDebugmode as Boolean
+Global GlobListindex as Integer
+Public blabla() as String
+Public SplitDate as Date
+Public oChartSheet as Object
+Public oBackgroundSheet as Object
+Public Const SBDATECOLUMN = 3
+Public Const SBVALUECOLUMN = 4
+Public Const SBSTARTROW = 25
+Public Const SBCHARTPERIOD = 14
+Public Const SBINTERVAL = &quot;d&quot;
+Public sColumnHeader as String
+Public StartDate as Date
+Public EndDate as Date
+Public iCurRow as Integer
+Public iMaxRow as Integer
+Public iStartDay as Integer
+Public iStartMonth as Integer
+Public iStartYear as Integer
+Public iEndDay as Integer
+Public iEndMonth as Integer
+Public iEndYear as Integer
+Public oStatusLine as Object
+Public Today as Date
+Public sInterval as String
+Public ShortMonths(11,1)
+Public iStep as Integer
+Public sDepotCurrency as String
+Public iValueCol as Integer
+
+Public DlgReference as Object
+Public DlgTransaction as Object
+Public DlgStockRates as Object
+Public DlgStartUp as Object
+Public TransactModel as Object
+Public StockRatesModel as Object
+Public StartUpModel as Object
+Public StockRatesTitle(1 To 3)
+Public TransactTitle(1 To 2)
+Public NullList()
+Public sStartupWelcome$, sStartupChooseMarket$, sStartupHint$
+
+Public sMarket(7,10) as String
+Public sCountryMarket(7,10) as String
+
+Public cDlgCaption1$, cDlgCaption2$
+Public sMsgError$, sMsgNoName$, sMsgNoQuantity$, sMsgNoDividend$, sMsgNoExchangeRate$
+Public sMsgNoValidExchangeDate$, sMsgWrongExchangeDate$, sMsgSellTooMuch$, sMsgConfirm$
+Public sMsgFreeStock$, sMsgTotalLoss$, sMsgEndDatebeforeNow$, sMsgStartDatebeforeEndDate$
+
+Public sOk$, sCancel$
+Public sMsgAuthorization$, sMsgDeleteAll$
+Public SellMethod$
+Public cSplit$
+Global HistoryChartSource as String
+Public DateCellStyle as String
+Public CurrCellStyle as String
+Public sStartDate$, sEndDate$, sHistory$
+Public sInsertStockname$
+Public sProductname$, sTitle$
+Public sInsertStocks$, sStockname$, sNoInternetUpdate$, sMarketplace$, sNoInternetDataAvailable$
+Public sCheckInternetSettings as String
+
+Sub LoadLanguage()
+ LoadDepotDialogs()
+ Select Case sDocLanguage
+ Case &quot;de&quot;
+ LoadGermanLanguage()
+ Case &quot;en&quot;
+ LoadEnglishLanguage()
+ Case &quot;fr&quot;
+ LoadFrenchLanguage()
+ Case &quot;it&quot;
+ LoadItalianLanguage()
+ Case &quot;es&quot;
+ LoadSpanishLanguage()
+ Case &quot;sv&quot;
+ LoadSwedishLanguage()
+ Case &quot;ja&quot;
+ LoadJapaneseLanguage()
+ Case &quot;ko&quot;
+ LoadKoreanLanguage()
+ Case &quot;zh&quot;
+ If sDocCountry = &quot;CN&quot; Then
+ LoadChineseSimpleLanguage()
+ Else
+ LoadChineseTradLanguage()
+ End If
+ End Select
+ InitializeStartUpModel()
+End Sub
+
+Sub CompleteMarketList()
+Dim EuroIndex as Integer
+Dim LocCountry as String
+Dim LocLanguage as String
+Dim sLangList() as String
+Dim sCountryList() as String
+Dim sExtensionList() as String
+Dim MaxIndex as Integer
+Dim bIsLocale as Boolean
+
+ GlobListIndex = -1
+ For n = 0 To 5
+ LocLanguage = sMarket(n,6)
+ LocCountry = sMarket(n,7)
+ If Instr(1,LocLanguage,&quot;;&quot;,SBBINARY) = 0 Then
+ bIsLocale = CheckDocLocale(LocLanguage, LocCountry)
+ Else
+ EuroIndex = 0
+ sLangList() = ArrayoutofString(LocLanguage, &quot;;&quot;, MaxIndex)
+ sCountryList() = ArrayoutofString(LocCountry, &quot;;&quot;, MaxIndex)
+ sExtensionList() = ArrayoutofString(sMarket(n,8), &quot;;&quot;, MaxIndex)
+ For m = 0 To MaxIndex
+ bIsLocale = CheckDocLocale(sLangList(m), sCountryList(m))
+ If bIsLocale Then
+ EuroIndex = m
+ Exit For
+ End If
+ Next m
+ sMarket(n,6) = sLangList(EuroIndex)
+ sMarket(n,7) = sCountryList(EuroIndex)
+ sMarket(n,8) = sExtensionList(EuroIndex)
+ End If
+ If bIsLocale Then
+ GlobListIndex = n
+ Exit For
+ End If
+ Next n
+End Sub
+
+Sub LocalizedCurrencies()
+ If GlobListIndex = -1 Then
+ sCountryMarket(0,0) = &quot;Euro&quot;
+ sCountryMarket(0,1) = chr(8364)
+ sCountryMarket(0,2) = &quot;Paris&quot;
+ sCountryMarket(0,3) = &quot;http://fr.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;.PA&amp;f=s4l1t1c1ghov&amp;e=.csv&quot;
+ sCountryMarket(0,5) = &quot;Code&quot;
+ sCountryMarket(0,6) = &quot;fr&quot;
+ sCountryMarket(0,7) = &quot;FR&quot;
+ sCountryMarket(0,8) = &quot;40C&quot;
+ sCountryMarket(0,9) = &quot;59/9&quot;
+ sCountryMarket(0,10) = &quot;1&quot;
+
+ sCountryMarket(1,0) = &quot;Euro&quot;
+ sCountryMarket(1,1) = chr(8364)
+ sCountryMarket(1,2) = &quot;Milano&quot;
+ sCountryMarket(1,3) = &quot;http://it.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;.MI&amp;f=sl1d1t1c1ohgv&amp;e=.csv&quot;
+ sCountryMarket(1,5) = &quot;Codice&quot;
+ sCountryMarket(1,6) = &quot;it&quot;
+ sCountryMarket(1,7) = &quot;IT&quot;
+ sCountryMarket(1,8) = &quot;410&quot;
+ sCountryMarket(1,9) = &quot;44&quot;
+ sCountryMarket(1,10) = &quot;1&quot;
+
+ sCountryMarket(2,0) = &quot;Euro&quot;
+ sCountryMarket(2,1) = chr(8364)
+ sCountryMarket(2,2) = &quot;Madrid&quot;
+ sCountryMarket(2,3) = &quot;http://es.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;&amp;m=MC&amp;f=sl1d1t1c1ohgv&amp;e=.csv&quot;
+ sCountryMarket(2,5) = &quot;Simbolo&quot;
+ sCountryMarket(2,6) = &quot;es&quot;
+ sCountryMarket(2,7) = &quot;ES&quot;
+ sCountryMarket(2,8) = &quot;40A&quot;
+ sCountryMarket(2,9) = &quot;44&quot;
+ sCountryMarket(2,10) = &quot;1&quot;
+
+ sCountryMarket(3,0) = &quot;Dansk krone&quot;
+ sCountryMarket(3,1) = &quot;kr&quot;
+ sCountryMarket(3,2) = &quot;København&quot;
+ sCountryMarket(3,3) = &quot;http://dk.finance.yahoo.com/d/quotes.csv?s=&lt;StockID.CO&amp;f=sl1d1t1c1ohgv&amp;e=.csv&quot;
+ sCountryMarket(3,5) = &quot;Aktiesymbol&quot;
+ sCountryMarket(3,6) = &quot;da&quot;
+ sCountryMarket(3,7) = &quot;DK&quot;
+ sCountryMarket(3,8) = &quot;406&quot;
+ sCountryMarket(3,9) = &quot;44&quot;
+ sCountryMarket(3,10) = &quot;1&quot;
+
+ sCountryMarket(4,0) = &quot;Svensk krona&quot;
+ sCountryMarket(4,1) = &quot;kr&quot;
+ sCountryMarket(4,2) = &quot;Stockholm&quot;
+ sCountryMarket(4,3) = &quot;http://se.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;.L&amp;f=sl1d1t1c1ohgv&amp;e=.c&quot;
+ sCountryMarket(4,5) = &quot;Kod&quot;
+ sCountryMarket(4,6) = &quot;sv&quot;
+ sCountryMarket(4,7) = &quot;SE&quot;
+ sCountryMarket(4,8) = &quot;41D&quot;
+ sCountryMarket(4,9) = &quot;44&quot;
+ sCountryMarket(4,10) = &quot;1&quot;
+
+ &apos; Taiwan Dollar
+ sCountryMarket(5,0) = &quot;新臺幣&quot;
+ sCountryMarket(5,1) = &quot;¥&quot;
+ sCountryMarket(5,2) = &quot;代號&quot;
+ sCountryMarket(5,3) = &quot;http://tw.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;.TW&amp;f=sl1d1t1c1ohgv&amp;e=.csv&quot;
+ sCountryMarket(5,5) = &quot;代號&quot;
+ sCountryMarket(5,6) = &quot;zh&quot;
+ sCountryMarket(5,7) = &quot;TW&quot;
+ sCountryMarket(5,8) = &quot;404&quot;
+ sCountryMarket(5,9) = &quot;44&quot;
+ sCountryMarket(5,10) = &quot;1&quot;
+
+ &apos; Chinese Yuan
+ sCountryMarket(6,0) = &quot;人民币&quot;
+ sCountryMarket(6,1) = &quot;¥&quot;
+ sCountryMarket(6,2) = &quot;代号&quot;
+ sCountryMarket(6,3) = &quot;http://cn.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;.SS&amp;f=sl1d1t1c1ohgv&amp;e=.csv&quot;
+ sCountryMarket(6,5) = &quot;代号&quot;
+ sCountryMarket(6,6) = &quot;zh&quot;
+ sCountryMarket(6,7) = &quot;CN&quot;
+ sCountryMarket(6,8) = &quot;804&quot;
+ sCountryMarket(6,9) = &quot;44&quot;
+ sCountryMarket(6,10) = &quot;1&quot;
+
+ &apos; korean Won
+ sCountryMarket(7,0) = &quot;한국 원화&quot;
+ sCountryMarket(7,1) = &quot;₩&quot;
+ sCountryMarket(7,2) = &quot;서울&quot;
+ sCountryMarket(7,3) = &quot;http://kr.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;.KS&amp;f=snl1d1t1c1ohgv&amp;e=.csv&quot;
+ sCountryMarket(7,5) = &quot;종목 코드&quot;
+ sCountryMarket(7,6) = &quot;ko&quot;
+ sCountryMarket(7,7) = &quot;KR&quot;
+ sCountryMarket(7,8) = &quot;412&quot;
+ sCountryMarket(7,9) = &quot;44&quot;
+ sCountryMarket(7,10) = &quot;2&quot;
+
+
+&apos; sCountryMarket(5,0) = &quot;Российский рубль&quot;
+&apos; sCountryMarket(5,1) = &quot;р.&quot;
+&apos; sCountryMarket(5,2) = &quot;&quot;
+&apos; sCountryMarket(5,3) = &quot;&quot;
+&apos; sCountryMarket(5,5) = &quot;&quot;
+&apos; sCountryMarket(5,6) = &quot;ru&quot;
+&apos; sCountryMarket(5,7) = &quot;RU&quot;
+&apos; sCountryMarket(5,8) = &quot;-419&quot;
+&apos; sCountryMarket(5,9) = &quot;&quot;
+&apos;
+&apos; sCountryMarket(6,0) = &quot;Złoty polski&quot;
+&apos; sCountryMarket(6,1) = &quot;zł&quot;
+&apos; sCountryMarket(6,2) = &quot;&quot;
+&apos; sCountryMarket(6,3) = &quot;&quot;
+&apos; sCountryMarket(6,5) = &quot;&quot; &apos;Still Todo!!
+&apos; sCountryMarket(6,6) = &quot;pl&quot;
+&apos; sCountryMarket(6,7) = &quot;PL&quot;
+&apos; sCountryMarket(6,8) = &quot;-415&quot;
+&apos; sCountryMarket(6,9) = &quot;&quot;
+&apos;
+&apos; sCountryMarket(7,0) = &quot;Türkische Lira&quot;
+&apos; sCountryMarket(7,1) = &quot;TL&quot;
+&apos; sCountryMarket(7,2) = &quot;&quot;
+&apos; sCountryMarket(7,3) = &quot;&quot;
+&apos; sCountryMarket(7,5) = &quot;&quot; &apos;Still Todo!!
+&apos; sCountryMarket(7,6) = &quot;tr&quot;
+&apos; sCountryMarket(7,7) = &quot;TR&quot;
+&apos; sCountryMarket(7,8) = &quot;-41F&quot;
+&apos; sCountryMarket(7,9) = &quot;&quot;
+
+ Dim n as Integer
+ Dim m as Integer
+&apos; Dim sCountryMarket(6,9) as String
+
+ For n = 0 To Ubound(sCountryMarket(),1)
+ If sDocLanguage = sCountryMarket(n,6) and sDocCountry = sCountryMarket(n,7) Then
+ GlobListIndex = 6
+ For m = 0 To 10
+ sMarket(6,m) = sCountryMarket(n,m)
+ Next m
+ Exit For
+ End If
+ Next n
+ End If
+End Sub
+
+Sub LoadDepotDialogs()
+ DlgTransaction = LoadDialog(&quot;Depot&quot;, &quot;Dialog2&quot;)
+ DlgStockRates = LoadDialog(&quot;Depot&quot;, &quot;Dialog3&quot;)
+ DlgStartUp = LoadDialog(&quot;Depot&quot;, &quot;Dialog4&quot;)
+ TransactModel = DlgTransaction.Model
+ StockRatesModel = DlgStockRates.Model
+ StartUpModel = DlgStartUp.Model
+End Sub
+
+
+Sub InitializeStartUpModel()
+ With StartUpModel
+ .lblWelcome.Label = sStartupWelcome &amp; Chr(13) &amp; chr(13) &amp; sStartUpChooseMarket
+ sStartUpHint = ReplaceString(sStartUpHint, sHistory, &quot;&lt;History&gt;&quot;)
+ .lblHint.Label = sStartupHint
+&apos; .cmdGoOn.Enabled = Ubound(StartUpModel.lstMarkets.SelectedItems()) &lt;&gt; -1
+ .cmdGoOn.Label = sOK
+ .cmdCancel.Label = sCancel
+ End With
+End Sub</script:module> \ No newline at end of file
diff --git a/wizards/source/depot/Currency.xba b/wizards/source/depot/Currency.xba
new file mode 100644
index 000000000000..c432fecc2661
--- /dev/null
+++ b/wizards/source/depot/Currency.xba
@@ -0,0 +1,178 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Currency" script:language="StarBasic">REM ***** BASIC *****
+Option Explicit
+
+Dim bDoUnLoad as Boolean
+
+
+Sub Startup()
+Dim i as Integer
+Dim a as Integer
+Dim ListString as String
+Dim MarketListBoxControl as Object
+ Initialize(False)
+ MarketListBoxControl = DlgStartUp.GetControl(&quot;lstMarkets&quot;)
+ a = 0
+ For i = 0 To Ubound(sMarket(),1)
+ ListString = sMarket(i,0)
+ If sMarket(i,0) &lt;&gt; &quot;&quot; Then
+ If sMarket(i,3) = &quot;&quot; Then
+ ListString = ListString &amp; &quot; (&quot; &amp; sNoInternetUpdate &amp; &quot;)&quot;
+ Else
+ ListString = ListString &amp; &quot; (&quot; &amp; sMarketplace &amp; &quot; &quot; &amp; sMarket(i,2) &amp; &quot;)&quot;
+ End If
+ MarketListBoxControl.AddItem(ListString, a)
+ a = a + 1
+ End If
+ Next i
+ MarketListBoxControl.SelectItemPos(GlobListIndex, True)
+ DlgStartUp.Title = sDepotCurrency
+ DlgStartUp.Model.cmdGoOn.DefaultButton = True
+ DlgStartUp.GetControl(&quot;lstMarkets&quot;).SetFocus()
+ DlgStartUp.Execute()
+ DlgStartUp.Dispose()
+End Sub
+
+
+Sub EnableGoOnButton()
+ StartUpModel.cmdGoOn.Enabled = True
+ StartUpModel.cmdGoOn.DefaultButton = True
+End Sub
+
+
+Sub CloseStartUpDialog()
+ DlgStartUp.EndExecute()
+&apos; oDocument.Dispose()
+End Sub
+
+
+Sub DisposeDocument()
+ If bDoUnload Then
+ oDocument.Dispose()
+ End If
+End Sub
+
+
+Sub ChooseMarket(Optional aEvent)
+Dim Index as Integer
+Dim bIsDocLanguage as Boolean
+Dim bIsDocCountry as Boolean
+ oInternetModel = GetControlModel(oDocument.Sheets(0), &quot;CmdInternet&quot;)
+ If Not IsMissing(aEvent) Then
+ Index = StartupModel.lstMarkets.SelectedItems(0)
+ oInternetModel.Tag = Index
+ Else
+ Index = oInternetModel.Tag
+ End If
+ oMarketModel = GetControlModel(oDocument.Sheets(0), &quot;CmdHistory&quot;)
+ sCurCurrency = sMarket(Index,1)
+ If Index = 0 Then
+ HistoryChartSource = sMarket(Index,4)
+ End If
+ sCurStockIDLabel = sMarket(Index,5)
+ sCurExtension = sMarket(Index,8)
+ iValueCol = Val(sMarket(Index,10)
+ If Instr(sCurExtension,&quot;;&quot;) &lt;&gt; 0 Then
+ &apos; Take the german extension as the stock place is Frankfurt
+ sCurExtension = &quot;407&quot;
+ End If
+ sCurChartSource = sMarket(Index,3)
+ bIsDocLanguage = Instr(1, sMarket(Index,6), sDocLanguage, SBBINARY) &lt;&gt; 0
+ bIsDocCountry = Instr(1, sMarket(Index,7), sDocCountry, SBBINARY) &lt;&gt; 0 OR SDocCountry = &quot;&quot;
+ sCurSeparator = sMarket(Index,9)
+ TransactModel.txtRate.CurrencySymbol = sCurCurrency
+ TransactModel.txtFix.CurrencySymbol = sCurCurrency
+ TransactModel.txtMinimum.CurrencySymbol = sCurCurrency
+ bEnableMarket = Index = 0
+ bEnableInternet = sCurChartSource &lt;&gt; &quot;&quot;
+ oMarketModel.Enabled = bEnableMarket
+ oInternetModel.Enabled = bEnableInternet
+ If Not IsMissing(aEvent) Then
+ ConvertStylesCurrencies()
+ bDoUnload = False
+ DlgStartUp.EndExecute()
+ End If
+End Sub
+
+
+Sub ConvertStylesCurrencies()
+Dim m as integer
+Dim aStyleFormat as Object
+Dim StyleName as String
+Dim bAddToList as Boolean
+Dim oStyle as Object
+Dim oStyles as Object
+ UnprotectSheets(oSheets)
+ oFirstSheet.GetCellByPosition(SBCOLUMNID1, SBROWHEADER1).SetString(sCurStockIDLabel)
+ oStyles = oDocument.StyleFamilies.GetbyIndex(0)
+ For m = 0 To oStyles.count-1
+ oStyle = oStyles.GetbyIndex(m)
+ StyleName = oStyle.Name
+ bAddToList = CheckFormatType(oStyle)
+ If bAddToList Then
+ SwitchNumberFormat(ostyle, oDocFormats, sCurCurrency, sCurExtension)
+ End If
+ Next m
+ ProtectSheets(oSheets)
+End Sub
+
+
+Sub SwitchNumberFormat(oObject as Object, oFormats as object, sNewSymbol as String, sNewExtension as String)
+Dim nFormatLanguage as Integer
+Dim nFormatDecimals as Integer
+Dim nFormatLeading as Integer
+Dim bFormatLeading as Integer
+Dim bFormatNegRed as Integer
+Dim bFormatThousands as Integer
+Dim aNewStr as String
+Dim iNumberFormat as Long
+Dim sSimpleStr as String
+Dim nSimpleKey as Long
+Dim aFormat()
+Dim oLocale as New com.sun.star.lang.Locale
+ &apos; Numberformat with the new Symbol as Base for new Format
+ sSimpleStr = &quot;0 [$&quot; &amp; sNewSymbol &amp; &quot;-&quot; &amp; sNewExtension &amp; &quot;]&quot;
+ nSimpleKey = Numberformat(oFormats, sSimpleStr, oDocLocale)
+ On Local Error Resume Next
+ iNumberFormat = oObject.NumberFormat
+ If Err &lt;&gt; 0 Then
+ Msgbox &quot;Error Reading the Number Format&quot;
+ Resume CLERROR
+ End If
+
+ On Local Error GoTo NOKEY
+ aFormat() = oFormats.getByKey(iNumberFormat)
+ On Local Error GoTo 0
+ &apos; set new currency format with according settings
+ nFormatDecimals = aFormat.Decimals
+ nFormatLeading = aFormat.LeadingZeros
+ bFormatNegRed = aFormat.NegativeRed
+ bFormatThousands = aFormat.ThousandsSeparator
+ oLocale = aFormat.Locale
+ aNewStr = oFormats.generateFormat(nSimpleKey, oLocale, bFormatThousands, bFormatNegRed, nFormatDecimals, nFormatLeading)
+ oObject.NumberFormat = Numberformat(oFormats, aNewStr, oLocale)
+ NOKEY:
+ If Err &lt;&gt; 0 Then
+ Resume CLERROR
+ End If
+ CLERROR:
+End Sub
+
+
+Function Numberformat( oFormats as Object, aFormatStr as String, oLocale as Variant )
+Dim nRetkey
+ nRetKey = oFormats.queryKey(aFormatStr, oLocale, True)
+ If nRetKey = -1 Then
+ nRetKey = oFormats.addNew( aFormatStr, oLocale )
+ If nRetKey = -1 Then nRetKey = 0
+ End If
+ Numberformat = nRetKey
+End Function
+
+
+Function CheckFormatType(oStyle as Object)
+Dim oFormatofObject as Object
+ oFormatofObject = oDocFormats.getByKey(oStyle.NumberFormat)
+ CheckFormatType = INT(oFormatOfObject.Type) AND com.sun.star.util.NumberFormat.CURRENCY
+End Function</script:module> \ No newline at end of file
diff --git a/wizards/source/depot/Depot.xba b/wizards/source/depot/Depot.xba
new file mode 100644
index 000000000000..358f3eaea3d7
--- /dev/null
+++ b/wizards/source/depot/Depot.xba
@@ -0,0 +1,500 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Depot" script:language="StarBasic">Option Explicit
+
+
+Sub Initialize(Optional bChooseMarketPlace as Boolean)
+Dim bEnableHistory as Boolean
+ GlobalScope.BasicLibraries.LoadLibrary(&quot;Tools&quot;)
+&apos; oMarketModel = GetControlModel(oDocument.Sheets(0), &quot;CmdHistory&quot;)
+&apos; bEnableHistory = oMarketModel.Enabled
+ ToggleWindow(False)
+ Today = Date()
+ bDebugmode = False
+ oDocument = ThisComponent
+ oController = oDocument.GetCurrentController
+ oSheets = oDocument.Sheets
+ oFirstSheet = oSheets(0)
+ oMovementSheet = oSheets(1)
+ oBankSheet = oSheets(2)
+ oDocFormats = oDocument.NumberFormats
+ oNumberFormatter = CreateUnoService(&quot;com.sun.star.util.NumberFormatter&quot;)
+ oNumberFormatter.AttachNumberFormatsSupplier(oDocument)
+ oDocLocale = oDocument.CharLocale
+ sDocLanguage = oDocLocale.Language
+ sDocCountry = oDocLocale.Country
+ LoadLanguage()
+ ToggleWindow(True)
+&apos; oMarketModel.Enabled = bEnableHistory
+ If Not IsMissing(bChooseMarketPlace) Then
+ If bChoosemarketPlace Then
+ ChooseMarket()
+ End If
+ Else
+ ChooseMarket()
+ End If
+ If Not IsMissing(bChooseMarketPlace) Then
+ If bChooseMarketPlace Then
+ oMarketModel.Enabled = bEnableMarket
+ oInternetModel.Enabled = bEnableInternet
+ End If
+ End If
+End Sub
+
+
+Sub Buy()
+ Initialize(True)
+ FillListbox(DlgTransaction.GetControl(&quot;lstBuyStocks&quot;), TransactTitle(SBDIALOGBUY), False)
+ SetupTransactionControls(SBDIALOGBUY)
+ EnableTransactionControls(False)
+ DlgTransaction.Execute()
+End Sub
+
+
+Sub Sell()
+ Initialize(True)
+ If FillListbox(DlgTransaction.GetControl(&quot;lstSellStocks&quot;), TransactTitle(SBDIALOGSELL), True) Then
+ SetupTransactionControls(SBDIALOGSELL)
+ EnableTransactionControls(False)
+ DlgTransaction.Execute()
+ End If
+End Sub
+
+
+Sub Reset()
+Dim TransactionCount as Integer
+Dim StockCount, iStartRow, i as Integer
+Dim oRows, oRange as Object
+Dim StockName as String
+ Initialize(True)
+ &apos; Delete transactions and reset overview
+ If MsgBox(sMsgDeleteAll, SBMSGYESNO+SBMSGQUESTION+SBMSGDEFAULTBTN2, sMsgAuthorization) = 6 Then
+ &apos; Assumption: If and only if there is an overview, then there are transactions, too
+ UnprotectSheets(oSheets)
+ StockCount = GetStocksCount(iStartRow)
+
+ For i = 1 To StockCount
+ StockName = oFirstSheet.GetCellbyPosition(SBCOLUMNNAME1, iStartRow + i).String
+ If oSheets.HasbyName(StockName) Then
+ oSheets.RemoveByName(StockName)
+ End If
+ Next
+ oDocument.AddActionLock
+ RemoveStockRows(oFirstSheet, iStartRow + 1, StockCount)
+ TransactionCount = GetTransactionCount(iStartRow)
+ RemoveStockRows(oMovementSheet, iStartRow + 2, TransactionCount)
+ ProtectSheets(oSheets)
+ oDocument.RemoveActionLock
+ End If
+End Sub
+
+
+Sub TransactionOk
+Dim Sold as Long
+Dim RestQuantity, Value, PartialValue, Profit
+Dim iNewRow as Integer, iRow as Integer
+Dim iStockRow as Long, iRestQuantity as Long
+Dim oNameCell as Object
+Dim CellStockName as String, SelStockName as String
+Dim CurRate as Double
+Dim TransactDate as Date
+Dim LocStockName as String
+ &apos; Check for rate entered
+ If TransactModel.txtRate.Value = 0 Then
+ If TransactModel.Step = SBDIALOGBUY Then
+ If MsgBox(sMsgFreeStock, SBMSGYESNO+SBMSGQUESTION, sMsgConfirm)=7 Then
+ Exit Sub
+ End If
+ Else
+ If MsgBox(sMsgTotalLoss, SBMSGYESNO+SBMSGQUESTION, sMsgConfirm)=7 Then
+ Exit Sub
+ End If
+ End If
+ End If
+ CurRate = TransactModel.txtRate.Value
+ TransactDate = CDateFromISO(TransactModel.txtDate.Date)
+ DlgTransaction.EndExecute()
+ UnprotectSheets(oSheets)
+
+ iNewRow = DuplicateRow(oMovementSheet, &quot;HiddenRow3&quot;)
+
+ If TransactModel.Step = SBDIALOGBUY Then
+ CellStockName = TransactModel.lstBuyStocks.Text
+ If Instr(1,CellStockName,&quot;$&quot;) &lt;&gt; 0 Then
+ CellStockName = &quot;&apos;&quot; &amp; CellStockName &amp; &quot;&apos;&quot;
+ End If
+ oMovementSheet.GetCellByPosition(SBCOLUMNNAME2, iNewRow).String = CellStockName
+ oMovementSheet.GetCellByPosition(SBCOLUMNQUANTITY2, iNewRow).Value = TransactModel.txtQuantity.Value
+ Else
+ CellStockName = DlgTransaction.GetControl(&quot;lstSellStocks&quot;).GetSelectedItem()
+ oMovementSheet.GetCellByPosition(SBCOLUMNNAME2, iNewRow).String = CellStockName
+ oMovementSheet.GetCellByPosition(SBCOLUMNQUANTITY2, iNewRow).Value = -TransactModel.txtQuantity.Value
+ End If
+
+ oMovementSheet.GetCellByPosition(SBCOLUMNDATE2, iNewRow).Value = CDateFromISO(TransactModel.txtDate.Date)
+ oMovementSheet.GetCellByPosition(SBCOLUMNRATE2, iNewRow).Value = TransactModel.txtRate.Value
+ oMovementSheet.GetCellByPosition(SBCOLUMNPROVPERCENT2, iNewRow).Value = TransactModel.txtCommission.EffectiveValue
+ oMovementSheet.GetCellByPosition(SBCOLUMNPROVMIN2, iNewRow).Value = TransactModel.txtMinimum.Value
+ oMovementSheet.GetCellByPosition(SBCOLUMNPROVFIX2, iNewRow).Value = TransactModel.txtFix.Value
+
+ &apos; Buy stocks: Update overview for new stocks
+ If TransactModel.Step = SBDIALOGBUY Then
+ iStockRow = GetStockRowIndex(CellStockName)
+ If iStockRow = -1 Then
+ iNewRow = DuplicateRow(oFirstSheet, &quot;HiddenRow2&quot;)
+ oFirstSheet.GetCellByPosition(SBCOLUMNNAME1, iNewRow).String = CellStockName
+ oFirstSheet.GetCellByPosition(SBCOLUMNID1, iNewRow).String = TransactModel.txtStockID.Text
+ iStockRow = GetStockRowIndex(CellStockName)
+ End If
+ &apos; Sell stocks: Get transaction value, then update Transaction sheet
+ ElseIf TransactModel.Step = SBDIALOGSELL Then
+ Profit = oMovementSheet.GetCellByPosition(SBCOLUMNPROCEEDS2, iNewRow).Value
+ Value = Profit
+ Sold = TransactModel.txtQuantity.Value
+ SelStockName = DlgTransaction.GetControl(&quot;lstSellStocks&quot;).GetSelectedItem()
+ &apos; Go to first name
+ If TransactMode = FIFO Then
+ iRow = SBROWFIRSTTRANSACT2
+ Else
+ iRow = iNewRow-1
+ End If
+
+ &apos; Check that no transaction after split date exists else cancel split
+ Do While Sold &gt; 0
+ oNameCell = oMovementSheet.GetCellByPosition(SBCOLUMNNAME2, iRow)
+ CellStockName = oNameCell.String
+ If CellStockName = SelStockName Then
+ &apos; Update transactions: Note quantity sold
+ RestQuantity = oMovementSheet.GetCellByPosition(SBCOLUMNQTYREST2, iRow).Value
+ &apos; If there still is a rest left ...
+ If RestQuantity &gt; 0 Then
+ If RestQuantity &lt; Sold Then
+ &apos; Recalculate profit of new transaction
+ Profit = Profit - oMovementSheet.GetCellByPosition(SBCOLUMNPRCREST2, iRow).Value
+ AddValueToCellContent(SBCOLUMNQTYSOLD2, iRow, RestQuantity)
+ PartialValue = RestQuantity / Sold * Value
+ AddValueToCellContent(SBCOLUMNREALPROC2, iRow, PartialValue)
+ Sold = Sold - RestQuantity
+ Value = Value - PartialValue
+ Else
+ &apos; Recalculate profit of neTransactModel.lstBuyStocks.Textw transaction
+ PartialValue = oMovementSheet.GetCellByPosition(SBCOLUMNPRCREST2, iRow).Value
+ Profit = Profit - PartialValue/RestQuantity * Sold
+ &apos; Update sold shares cell
+ AddValueToCellContent(SBCOLUMNQTYSOLD2, iRow, Sold)
+ &apos; Update sales turnover cell
+ AddValueToCellContent(SBCOLUMNREALPROC2, iRow, Value)
+ &apos; Update variables for rest of transaction
+ Sold = 0
+ Value = 0
+ End If
+ End If
+ End If
+ iRow = iRow + TransactMode
+ Loop
+ oMovementSheet.GetCellByPosition(SBCOLUMNREALPROFIT2,iNewRow).Value = Profit
+ iStockRow = GetStockRowIndex(SelStockName)
+ iRestQuantity = oFirstSheet.GetCellbyPosition(SBCOLUMNQUANTITY1, iStockRow).Value
+&apos; If iRestQuantity = 0 Then
+&apos; If oSheets.HasbyName(SelStockName) Then
+&apos; oSheets.RemoveByName(SelStockName)
+&apos; End If
+&apos; Else
+
+&apos; End If
+ End If
+ InsertCurrentValue(CurRate, iStockRow,TransactDate)
+ ProtectSheets(oSheets)
+End Sub
+
+
+Sub SelectStockname(aEvent as Object)
+Dim iCurRow as Integer
+Dim CurStockName as String
+ With TransactModel
+ &apos; Find row with stock name
+ If TransactModel.Step = SBDIALOGBUY Then
+ CurStockName = .lstBuyStocks.Text
+ iCurRow = GetStockRowIndex(CurStockName)
+ .txtQuantity.ValueMax = 10000000
+ Else
+ Dim ListBoxList() as String
+ ListBoxList() = GetSelectedListboxItems(aEvent.Source.getModel())
+ CurStockName = ListBoxList(0)
+&apos; CurStockName = DlgTransaction.GetControl(aEvent.Source.getModel.Name).GetSelectedItem()
+ iCurRow = GetStockRowIndex(CurStockName)
+ Dim fdouble as Double
+ fdouble = oFirstSheet.GetCellByPosition(SBCOLUMNQUANTITY1, iCurRow).Value
+ .txtQuantity.Value = fdouble
+ .txtQuantity.ValueMax = oFirstSheet.GetCellByPosition(SBCOLUMNQUANTITY1, iCurRow).Value
+ .txtRate.Value = oFirstSheet.GetCellbyPosition(SBCOLUMNRATE1, iCurRow).Value
+ End If
+ .txtStockID.Enabled = .Step = SBDIALOGBUY
+ .lblStockID.Enabled = .Step = SBDIALOGBUY
+ &apos; Default settings for quantity and rate
+ .txtStockID.Text = GetStockID(CurStockName, iCurRow)
+ End With
+ EnableTransactionControls(CurStockName &lt;&gt; &quot;&quot;)
+ TransactModel.cmdGoOn.DefaultButton = True
+End Sub
+
+
+
+Sub HandleStocks(Mode as Integer, oDialog as Object)
+Dim DividendPerShare, DividendTotal, RestQuantity, OldValue
+Dim SelStockName, CellStockName as String
+Dim oNameCell as Object, oDateCell as Object
+Dim iRow as Integer
+Dim oDividendCell as Object
+Dim Amount
+Dim OldNumber, NewNumber as Integer
+Dim NoteText as String
+Dim TotalStocksCount as Long
+Dim oModel as Object
+ oDocument.AddActionLock
+ oDialog.EndExecute()
+ oModel = oDialog.Model
+ SelStockName = DlgStockRates.GetControl(&quot;lstStockNames&quot;).GetSelectedItem()
+ Select Case Mode
+ Case HANDLEDIVIDEND
+ Dim bTakeTotal as Boolean
+ &apos; Update transactions: Enter dividend paid for all Buy transactions not sold completely
+ bTakeTotal = oModel.optTotal.State = 1
+ If bTakeTotal Then
+ DividendTotal = oModel.txtDividend.Value
+ iRow = GetStockRowIndex(SelStockName)
+ TotalStocksCount = oFirstSheet.GetCellByPosition(SBCOLUMNQUANTITY1,iRow).Value
+ DividendPerShare = DividendTotal/TotalStocksCount
+ Else
+ DividendPerShare = oModel.txtDividend.Value
+ End If
+
+ Case HANDLESPLIT
+ &apos; Store entered values in variables
+ OldNumber = oModel.txtOldRate.Value
+ NewNumber = oModel.txtNewRate.Value
+ SplitDate = CDateFromISO(oModel.txtDate.Date)
+ iRow = SBROWFIRSTTRANSACT2
+ NoteText = cSplit &amp; SplitDate &amp; &quot;, &quot; &amp; oModel.txtOldRate.Value &amp; oModel.lblColon.Label &amp; oModel.txtNewRate.Value
+ Do
+ oNameCell = oMovementSheet.GetCellByPosition(SBCOLUMNNAME2, iRow)
+ CellStockName = oNameCell.String
+ If CellStockName = SelStockName Then
+ oDateCell = oMovementSheet.GetCellByPosition(SBCOLUMNDATE2, iRow)
+ If oDateCell.Value &gt;= SplitDate Then
+ MsgBox sMsgWrongExchangeDate, SBMSGOK + SBMSGSTOP, sMsgError
+ Exit Sub
+ End If
+ End If
+ iRow = iRow + 1
+ Loop Until CellStockName = &quot;&quot;
+ End Select
+ iRow = SBROWFIRSTTRANSACT2
+ UnprotectSheets(oSheets)
+ Do
+ oNameCell = oMovementSheet.GetCellByPosition(SBCOLUMNNAME2, iRow)
+ CellStockName = oNameCell.String
+ If CellStockName = SelStockName Then
+ Select Case Mode
+ Case HANDLEDIVIDEND
+ RestQuantity = oMovementSheet.GetCellByPosition(SBCOLUMNQTYREST2, iRow).Value
+ If RestQuantity &gt; 0 Then
+ oDividendCell = oMovementSheet.GetCellByPosition(SBCOLUMNDIVIDEND2, iRow)
+ OldValue = oDividendCell.Value
+ oDividendCell.Value = OldValue + RestQuantity * DividendPerShare
+ End If
+ Case HANDLESPLIT
+ oDateCell = oMovementSheet.GetCellByPosition(SBCOLUMNDATE2, iRow)
+ SplitCellValue(oMovementSheet, NewNumber, OldNumber, SBCOLUMNQUANTITY2, iRow, NoteText)
+ SplitCellValue(oMovementSheet, OldNumber, NewNumber, SBCOLUMNRATE2, iRow, &quot;&quot;)
+ SplitCellValue(oMovementSheet, NewNumber, OldNumber, SBCOLUMNQTYSOLD2, iRow, &quot;&quot;)
+ End Select
+ End If
+ iRow = iRow + 1
+ Loop Until CellStockName = &quot;&quot;
+ If Mode = HANDLESPLIT Then
+ CalculateChartafterSplit(SelStockName, NewNumber, OldNumber, NoteText, SplitDate)
+ End If
+ oDocument.CalculateAll()
+ ProtectSheets(oSheets)
+ oDocument.RemoveActionLock
+End Sub
+
+
+Sub CancelStockRate()
+ DlgStockRates.EndExecute()
+End Sub
+
+
+Sub CancelTransaction()
+ DlgTransaction.EndExecute()
+End Sub
+
+
+Sub CommitStockRate()
+Dim CurStep as Integer
+ CurStep = StockRatesModel.Step
+ Select Case CurStep
+ Case 1
+ &apos; Check for quantity entered
+ If StockRatesModel.txtDividend.Value = 0 Then
+ MsgBox sMsgNoDividend, SBMSGSTOP+SBMSGSTOP, sMsgError
+ Exit Sub
+ End If
+ HandleStocks(HANDLEDIVIDEND, DlgStockRates)
+ Case 2
+ HandleStocks(HANDLESPLIT, DlgStockRates)
+ Case 3
+ InsertCompanyHistory()
+ End Select
+End Sub
+
+
+Sub EnableTransactionControls(bEnable as Boolean)
+ With TransactModel
+ .lblQuantity.Enabled = bEnable
+ .txtQuantity.Enabled = bEnable
+ .lblRate.Enabled = bEnable
+ .txtRate.Enabled = bEnable
+ .lblDate.Enabled = bEnable
+ .txtDate.Enabled = bEnable
+ .lblCommission.Enabled = bEnable
+ .txtCommission.Enabled = bEnable
+ .lblMinimum.Enabled = bEnable
+ .txtMinimum.Enabled = bEnable
+ .lblFix.Enabled = bEnable
+ .txtFix.Enabled = bEnable
+ If TransactModel.Step = SBDIALOGSELL Then
+ .cmdGoOn.Enabled = Ubound(TransactModel.lstSellStocks.SelectedItems()) &gt; -1
+ DlgTransaction.GetControl(&quot;lstSellStocks&quot;).SetFocus()
+ Else
+ .cmdGoOn.Enabled = TransactModel.lstBuyStocks.Text &lt;&gt; &quot;&quot;
+ DlgTransaction.GetControl(&quot;lstBuyStocks&quot;).SetFocus()
+ End If
+ If bEnable Then
+ TransactModel.cmdGoOn.DefaultButton = True
+ End If
+ End With
+End Sub
+
+
+Sub SetupTransactionControls(CurStep as Integer)
+ DlgReference = DlgTransaction
+ With TransactModel
+ .txtDate.Date = CDateToISO(Date())
+ .txtDate.DateMax = CDateToISO(Date())
+ .txtStockID.Enabled = False
+ .lblStockID.Enabled = False
+ .lblStockID.Label = sCurStockIDLabel
+ .txtRate.CurrencySymbol = sCurCurrency
+ .txtFix.CurrencySymbol = sCurCurrency
+ .Step = CurStep
+ End With
+ DlgTransaction.Title = TransactTitle(CurStep)
+ CellValuetoControl(oBankSheet, TransactModel.txtCommission, &quot;ProvisionPercent&quot;)
+ CellValuetoControl(oBankSheet, TransactModel.txtMinimum, &quot;ProvisionMinimum&quot;)
+ CellValuetoControl(oBankSheet, TransactModel.txtFix, &quot;ProvisionFix&quot;)
+End Sub
+
+
+Sub AddShortCuttoControl()
+Dim SelCompany as String
+Dim iRow, SelIndex as Integer
+ SelIndex = DlgTransaction.GetControl(&quot;lstBuyStocks&quot;).GetSelectedItemPos()
+ If SelIndex &lt;&gt; -1 Then
+ SelCompany = TransactModel.lstBuyStocks.StringItemList(SelIndex)
+ iRow = GetStockRowIndex(SelCompany)
+ If iRow &lt;&gt; -1 Then
+ TransactModel.txtStockID.Text = oFirstSheet.GetCellByPosition(SBCOLUMNID1,iRow).String
+ TransactModel.txtRate.Value = oFirstSheet.GetCellByPosition(SBCOLUMNRATE1,iRow).Value
+ Else
+ TransactModel.txtStockID.Text = &quot;&quot;
+ TransactModel.txtRate.Value = 0
+ End If
+ Else
+ TransactModel.txtStockID.Text = &quot;&quot;
+ TransactModel.txtRate.Value = 0
+ End If
+End Sub
+
+
+Sub OpenStockRatePage(aEvent)
+Dim CurStep as Integer
+ Initialize(True)
+ CurStep = aEvent.Source.Model.Tag
+ If FillListbox(DlgStockRates.GetControl(&quot;lstStockNames&quot;), StockRatesTitle(CurStep), True) Then
+ StockRatesModel.Step = CurStep
+ ToggleStockRateControls(False, CurStep)
+ InitializeStockRatesControls(CurStep)
+ DlgStockRates.Execute()
+ End If
+End Sub
+
+
+Sub SelectStockNameForRates()
+Dim StockName as String
+ StockName = DlgStockRates.GetControl(&quot;lstStockNames&quot;).GetSelectedItem()
+ If StockName &lt;&gt; &quot;&quot; Then
+ StockRatesModel.txtStockID.Text = GetStockID(StockName)
+ ToggleStockRateControls(True, StockRatesModel.Step)
+ End If
+ StockRatesModel.cmdGoOn.DefaultButton = True
+End Sub
+
+
+Sub ToggleStockRateControls(bDoEnable as Boolean, CurStep as Integer)
+ With StockRatesModel
+ .lblStockID.Enabled = False
+ .txtStockID.Enabled = False
+ .cmdGoOn.Enabled = Ubound(StockRatesModel.lstStockNames.SelectedItems()) &lt;&gt; -1
+ Select Case CurStep
+ Case 1
+ .optPerShare.Enabled = bDoEnable
+ .optTotal.Enabled = bDoEnable
+ .lblDividend.Enabled = bDoEnable
+ .txtDividend.Enabled = bDoEnable
+ Case 2
+ .lblExchangeRate.Enabled = bDoEnable
+ .lblDate.Enabled = bDoEnable
+ .lblColon.Enabled = bDoEnable
+ .txtOldRate.Enabled = bDoEnable
+ .txtNewRate.Enabled = bDoEnable
+ .txtDate.Enabled = bDoEnable
+ Case 3
+ .lblStartDate.Enabled = bDoEnable
+ .lblEndDate.Enabled = bDoEnable
+ .txtStartDate.Enabled = bDoEnable
+ .txtEndDate.Enabled = bDoEnable
+ .hlnInterval.Enabled = bDoEnable
+ .optDaily.Enabled = bDoEnable
+ .optWeekly.Enabled = bDoEnable
+ End Select
+ End With
+End Sub
+
+
+Sub InitializeStockRatesControls(CurStep as Integer)
+ DlgReference = DlgStockRates
+ DlgStockRates.Title = StockRatesTitle(CurStep)
+ With StockRatesModel
+ .txtStockID.Text = &quot;&quot;
+ .lblStockID.Label = sCurStockIDLabel
+ Select Case CurStep
+ Case 1
+ .txtDividend.Value = 0
+ .optPerShare.State = 1
+ .txtDividend.CurrencySymbol = sCurCurrency
+ Case 2
+ .txtOldRate.Value = 1
+ .txtNewRate.Value = 1
+ .txtDate.Date = CDateToISO(Date())
+ Case 3
+ .txtStartDate.DateMax = CDateToISO(CDate(Date())-1)
+ .txtEndDate.DateMax = CDateToISO(CDate(Date())-1)
+ .txtStartDate.Date = CDateToISO(CDate(Date())-8)
+ .txtEndDate.Date = CDateToISO(CDate(Date())-1)
+ .optDaily.State = 1
+ End Select
+ End With
+End Sub
+</script:module> \ No newline at end of file
diff --git a/wizards/source/depot/Dialog2.xdl b/wizards/source/depot/Dialog2.xdl
new file mode 100644
index 000000000000..a46fe9f5b383
--- /dev/null
+++ b/wizards/source/depot/Dialog2.xdl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
+<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="Dialog2" dlg:tab-index="0" dlg:left="91" dlg:top="24" dlg:width="220" dlg:height="128" dlg:page="1" dlg:help-url="HID:34520" dlg:closeable="true" dlg:moveable="true">
+ <dlg:bulletinboard>
+ <dlg:text dlg:id="lblStockNames" dlg:tab-index="0" dlg:left="6" dlg:top="6" dlg:width="102" dlg:height="8" dlg:value="lblStockNames"/>
+ <dlg:menulist dlg:id="lstSellStocks" dlg:tab-index="1" dlg:left="6" dlg:top="17" dlg:width="102" dlg:height="12" dlg:page="1" dlg:help-url="HID:34530" dlg:spin="true">
+ <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:Depot.Depot.SelectStockname?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:menulist>
+ <dlg:combobox dlg:id="lstBuyStocks" dlg:tab-index="2" dlg:left="6" dlg:top="17" dlg:width="102" dlg:height="12" dlg:page="2" dlg:help-url="HID:34531" dlg:spin="true">
+ <script:event script:event-name="on-textchange" script:macro-name="vnd.sun.star.script:Depot.Depot.SelectStockname?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:combobox>
+ <dlg:text dlg:id="lblStockID" dlg:tab-index="3" dlg:left="150" dlg:top="6" dlg:width="66" dlg:height="8" dlg:value="lblStockID"/>
+ <dlg:textfield dlg:id="txtStockID" dlg:tab-index="4" dlg:left="150" dlg:top="17" dlg:width="40" dlg:height="12" dlg:help-url="HID:34521"/>
+ <dlg:text dlg:id="lblQuantity" dlg:tab-index="5" dlg:left="6" dlg:top="36" dlg:width="57" dlg:height="8" dlg:value="lblQuantity"/>
+ <dlg:numericfield dlg:id="txtQuantity" dlg:tab-index="6" dlg:left="6" dlg:top="47" dlg:width="46" dlg:height="12" dlg:help-url="HID:34522" dlg:decimal-accuracy="0" dlg:value-min="1"/>
+ <dlg:currencyfield dlg:id="txtRate" dlg:tab-index="7" dlg:left="68" dlg:top="47" dlg:width="40" dlg:height="12" dlg:help-url="HID:34523" dlg:value-min="0"/>
+ <dlg:datefield dlg:id="txtDate" dlg:tab-index="8" dlg:left="150" dlg:top="47" dlg:width="50" dlg:height="12" dlg:tag="Dialog2" dlg:help-url="HID:34524" dlg:strict-format="true" dlg:spin="true">
+ <script:event script:event-name="on-textchange" script:macro-name="vnd.sun.star.script:Depot.tools.CheckInputDate?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:datefield>
+ <dlg:text dlg:id="lblRate" dlg:tab-index="9" dlg:left="68" dlg:top="36" dlg:width="77" dlg:height="8" dlg:value="lblRate"/>
+ <dlg:text dlg:id="lblDate" dlg:tab-index="10" dlg:left="150" dlg:top="37" dlg:width="66" dlg:height="8" dlg:value="lblDate"/>
+ <dlg:formattedfield dlg:id="txtCommission" dlg:tab-index="11" dlg:left="6" dlg:top="90" dlg:width="40" dlg:height="12" dlg:help-url="HID:34525" dlg:format-code="0,00%" dlg:format-locale="de;DE"/>
+ <dlg:text dlg:id="lblCommission" dlg:tab-index="12" dlg:left="6" dlg:top="79" dlg:width="60" dlg:height="8" dlg:value="lblCommission"/>
+ <dlg:currencyfield dlg:id="txtFix" dlg:tab-index="13" dlg:left="68" dlg:top="90" dlg:width="40" dlg:height="12" dlg:help-url="HID:34526" dlg:value-min="0"/>
+ <dlg:currencyfield dlg:id="txtMinimum" dlg:tab-index="14" dlg:left="150" dlg:top="90" dlg:width="40" dlg:height="12" dlg:help-url="HID:34527" dlg:value-min="0"/>
+ <dlg:text dlg:id="lblFix" dlg:tab-index="15" dlg:left="68" dlg:top="79" dlg:width="71" dlg:height="8" dlg:value="lblFix"/>
+ <dlg:text dlg:id="lblMinimum" dlg:tab-index="16" dlg:left="150" dlg:top="79" dlg:width="66" dlg:height="8" dlg:value="lblMinimum"/>
+ <dlg:button dlg:id="cmdCancel" dlg:tab-index="17" dlg:left="58" dlg:top="109" dlg:width="50" dlg:height="14" dlg:help-url="HID:34528" dlg:value="cmdCancel">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Depot.Depot.CancelTransaction?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:button dlg:id="cmdGoOn" dlg:tab-index="18" dlg:left="111" dlg:top="109" dlg:width="50" dlg:height="14" dlg:help-url="HID:34529" dlg:value="cmdGoOn">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Depot.Depot.TransactionOk?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:fixedline dlg:id="hlnCommission" dlg:tab-index="19" dlg:left="6" dlg:top="66" dlg:width="210" dlg:height="8" dlg:value="hlnCommission"/>
+ </dlg:bulletinboard>
+</dlg:window> \ No newline at end of file
diff --git a/wizards/source/depot/Dialog3.xdl b/wizards/source/depot/Dialog3.xdl
new file mode 100644
index 000000000000..4c6cabd20f96
--- /dev/null
+++ b/wizards/source/depot/Dialog3.xdl
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
+<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="Dialog3" dlg:left="161" dlg:top="81" dlg:width="176" dlg:height="119" dlg:page="3" dlg:help-url="HID:34532" dlg:closeable="true" dlg:moveable="true">
+ <dlg:bulletinboard>
+ <dlg:text dlg:id="lblStockNames" dlg:tab-index="0" dlg:left="6" dlg:top="6" dlg:width="98" dlg:height="8" dlg:value="lblStockNames"/>
+ <dlg:menulist dlg:id="lstStockNames" dlg:tab-index="1" dlg:left="5" dlg:top="17" dlg:width="102" dlg:height="12" dlg:help-url="HID:34533" dlg:spin="true">
+ <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:Depot.Depot.SelectStockNameForRates?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:menulist>
+ <dlg:textfield dlg:id="txtStockID" dlg:tab-index="2" dlg:left="120" dlg:top="17" dlg:width="50" dlg:height="12" dlg:help-url="HID:34534"/>
+ <dlg:datefield dlg:id="txtStartDate" dlg:tab-index="3" dlg:left="63" dlg:top="37" dlg:width="50" dlg:height="12" dlg:page="3" dlg:help-url="HID:34543" dlg:spin="true">
+ <script:event script:event-name="on-textchange" script:macro-name="vnd.sun.star.script:Depot.tools.CheckInputDate?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:datefield>
+ <dlg:datefield dlg:id="txtEndDate" dlg:tab-index="4" dlg:left="63" dlg:top="53" dlg:width="50" dlg:height="12" dlg:page="3" dlg:help-url="HID:34544" dlg:spin="true">
+ <script:event script:event-name="on-textchange" script:macro-name="vnd.sun.star.script:Depot.tools.CheckInputDate?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:datefield>
+ <dlg:radiogroup>
+ <dlg:radio dlg:id="optDaily" dlg:tab-index="5" dlg:left="12" dlg:top="83" dlg:width="75" dlg:height="10" dlg:page="3" dlg:help-url="HID:34545" dlg:value="optDaily"/>
+ <dlg:radio dlg:id="optWeekly" dlg:tab-index="6" dlg:left="101" dlg:top="83" dlg:width="69" dlg:height="10" dlg:page="3" dlg:help-url="HID:34546" dlg:value="optWeekly"/>
+ </dlg:radiogroup>
+ <dlg:datefield dlg:id="txtDate" dlg:tab-index="7" dlg:left="71" dlg:top="73" dlg:width="50" dlg:height="12" dlg:page="2" dlg:help-url="HID:34542" dlg:spin="true">
+ <script:event script:event-name="on-textchange" script:macro-name="vnd.sun.star.script:Depot.tools.CheckInputDate?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:datefield>
+ <dlg:radiogroup>
+ <dlg:radio dlg:id="optPerShare" dlg:tab-index="8" dlg:left="6" dlg:top="37" dlg:width="69" dlg:height="10" dlg:page="1" dlg:help-url="HID:34537" dlg:value="optPerShare"/>
+ <dlg:radio dlg:id="optTotal" dlg:tab-index="9" dlg:left="6" dlg:top="51" dlg:width="69" dlg:height="10" dlg:page="1" dlg:help-url="HID:34538" dlg:value="optTotal"/>
+ </dlg:radiogroup>
+ <dlg:currencyfield dlg:id="txtDividend" dlg:tab-index="10" dlg:left="6" dlg:top="80" dlg:width="50" dlg:height="12" dlg:page="1" dlg:help-url="HID:34539" dlg:value-min="0" dlg:spin="true"/>
+ <dlg:button dlg:id="cmdCancel" dlg:tab-index="11" dlg:left="41" dlg:top="98" dlg:width="50" dlg:height="14" dlg:help-url="HID:34535" dlg:value="cmdCancel">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Depot.Depot.CancelStockRate?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:button dlg:id="cmdGoOn" dlg:tab-index="12" dlg:left="94" dlg:top="98" dlg:width="50" dlg:height="14" dlg:help-url="HID:34536" dlg:value="cmdGoOn">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Depot.Depot.CommitStockRate?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:text dlg:id="lblStockID" dlg:tab-index="13" dlg:left="120" dlg:top="6" dlg:width="50" dlg:height="8" dlg:value="lblStockID"/>
+ <dlg:text dlg:id="lblDividend" dlg:tab-index="14" dlg:left="6" dlg:top="68" dlg:width="73" dlg:height="8" dlg:page="1" dlg:value="lblDividend"/>
+ <dlg:text dlg:id="lblExchangeRate" dlg:tab-index="15" dlg:left="6" dlg:top="39" dlg:width="92" dlg:height="8" dlg:page="2" dlg:value="lblExchangeRate"/>
+ <dlg:text dlg:id="lblColon" dlg:tab-index="16" dlg:left="40" dlg:top="55" dlg:width="5" dlg:height="8" dlg:page="2" dlg:value=" :"/>
+ <dlg:text dlg:id="lblDate" dlg:tab-index="17" dlg:left="5" dlg:top="75" dlg:width="66" dlg:height="8" dlg:page="2" dlg:value="lblDate"/>
+ <dlg:fixedline dlg:id="hlnInterval" dlg:tab-index="18" dlg:left="6" dlg:top="72" dlg:width="164" dlg:height="8" dlg:page="3" dlg:value="hlnInterval"/>
+ <dlg:text dlg:id="lblStartDate" dlg:tab-index="19" dlg:left="6" dlg:top="39" dlg:width="53" dlg:height="8" dlg:page="3" dlg:value="lblStartDate"/>
+ <dlg:text dlg:id="lblEndDate" dlg:tab-index="20" dlg:left="6" dlg:top="55" dlg:width="53" dlg:height="8" dlg:page="3" dlg:value="lblEndDate"/>
+ <dlg:numericfield dlg:id="txtOldRate" dlg:tab-index="21" dlg:left="6" dlg:top="53" dlg:width="30" dlg:height="12" dlg:page="2" dlg:help-url="HID:34540" dlg:decimal-accuracy="0" dlg:value-min="1" dlg:spin="true"/>
+ <dlg:numericfield dlg:id="txtNewRate" dlg:tab-index="22" dlg:left="50" dlg:top="53" dlg:width="30" dlg:height="12" dlg:page="2" dlg:help-url="HID:34541" dlg:decimal-accuracy="0" dlg:value-min="1" dlg:spin="true"/>
+ </dlg:bulletinboard>
+</dlg:window> \ No newline at end of file
diff --git a/wizards/source/depot/Dialog4.xdl b/wizards/source/depot/Dialog4.xdl
new file mode 100644
index 000000000000..4f71be0da5cb
--- /dev/null
+++ b/wizards/source/depot/Dialog4.xdl
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
+<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="Dialog4" dlg:left="161" dlg:top="81" dlg:width="160" dlg:height="120" dlg:page="1" dlg:help-url="HID:34547" dlg:closeable="true" dlg:moveable="true">
+ <dlg:bulletinboard>
+ <dlg:text dlg:id="lblWelcome" dlg:tab-index="0" dlg:left="6" dlg:top="6" dlg:width="148" dlg:height="49" dlg:value="lblWelcome" dlg:multiline="true"/>
+ <dlg:text dlg:id="lblHint" dlg:tab-index="1" dlg:left="6" dlg:top="73" dlg:width="148" dlg:height="26" dlg:value="lblHint" dlg:multiline="true"/>
+ <dlg:button dlg:id="cmdCancel" dlg:tab-index="2" dlg:left="28" dlg:top="100" dlg:width="50" dlg:height="14" dlg:help-url="HID:34549" dlg:value="cmdCancel">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Depot.Currency.CloseStartUpDialog?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:button dlg:id="cmdGoOn" dlg:tab-index="3" dlg:left="84" dlg:top="100" dlg:width="52" dlg:height="14" dlg:help-url="HID:34550" dlg:value="cmdGoOn">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Depot.Currency.ChooseMarket?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:menulist dlg:id="lstMarkets" dlg:tab-index="4" dlg:left="6" dlg:top="57" dlg:width="148" dlg:height="12" dlg:help-url="HID:34548" dlg:spin="true">
+ <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:Depot.Currency.EnableGoOnButton?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:menulist>
+ </dlg:bulletinboard>
+</dlg:window> \ No newline at end of file
diff --git a/wizards/source/depot/Internet.xba b/wizards/source/depot/Internet.xba
new file mode 100644
index 000000000000..f8b646d54133
--- /dev/null
+++ b/wizards/source/depot/Internet.xba
@@ -0,0 +1,339 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Internet" script:language="StarBasic">REM ***** BASIC *****
+Option Explicit
+Public sNewSheetName as String
+
+Function CheckHistoryControls()
+Dim bLocGoOn as Boolean
+Dim Firstdate as Date
+Dim LastDate as Date
+ LastDate = CDateFromISO(StockRatesModel.txtEndDate.Date)
+ FirstDate = CDateFromISO(StockRatesModel.txtStartDate.Date)
+ bLocGoOn = FirstDate &lt;&gt; 0 And LastDate &lt;&gt; 0
+ If bLocGoOn Then
+ If FirstDate &gt;= LastDate Then
+ Msgbox(sMsgStartDatebeforeEndDate,16, sProductname)
+ bLocGoOn = False
+ End If
+ End If
+ CheckHistoryControls = bLocGoon
+End Function
+
+
+Sub InsertCompanyHistory()
+Dim StockName as String
+Dim CurRow as Integer
+Dim sMsgInternetError as String
+Dim CurRate as Double
+Dim oCell as Object
+Dim sStockID as String
+Dim ChartSource as String
+ If CheckHistoryControls() Then
+ StartDate = CDateFromISO(StockRatesModel.txtStartDate.Date)
+ EndDate = CDateFromISO(StockRatesModel.txtEndDate.Date)
+ DlgStockRates.EndExecute()
+ If StockRatesModel.optDaily.State = 1 Then
+ sInterval = &quot;d&quot;
+ iStep = 1
+ ElseIf StockRatesModel.optWeekly.State = 1 Then
+ sInterval = &quot;w&quot;
+ iStep = 7
+ StartDate = StartDate - WeekDay(StartDate) + 2
+ EndDate = EndDate - WeekDay(EndDate) + 2
+ End If
+ iEndDay = Day(EndDate)
+ iEndMonth = Month(EndDate)
+ iEndYear = Year(EndDate)
+ iStartDay = Day(StartDate)
+ iStartMonth = Month(StartDate)
+ iStartYear = Year(StartDate)
+&apos; oDocument.AddActionLock()
+ UnprotectSheets(oSheets)
+ InitializeStatusline(&quot;&quot;, 10, 1)
+ oBackGroundSheet = oSheets.GetbyName(&quot;Background&quot;)
+ StockName = DlgStockRates.GetControl(&quot;lstStockNames&quot;).GetSelectedItem()
+ CurRow = GetStockRowIndex(Stockname)
+ sStockID = oFirstSheet.GetCellByPosition(SBCOLUMNID1, CurRow).String
+ ChartSource = ReplaceString(HistoryChartSource, sStockID, &quot;&lt;StockID&gt;&quot;)
+ ChartSource = ReplaceString(ChartSource, iStartDay, &quot;&lt;StartDay&gt;&quot;)
+ ChartSource = ReplaceString(ChartSource, cStr(iStartMonth-1), &quot;&lt;StartMonth&gt;&quot;)
+ ChartSource = ReplaceString(ChartSource, iStartYear, &quot;&lt;StartYear&gt;&quot;)
+ ChartSource = ReplaceString(ChartSource, iEndDay, &quot;&lt;EndDay&gt;&quot;)
+ ChartSource = ReplaceString(ChartSource, cStr(iEndMonth-1), &quot;&lt;EndMonth&gt;&quot;)
+ ChartSource = ReplaceString(ChartSource, iEndYear, &quot;&lt;EndYear&gt;&quot;)
+ ChartSource = ReplaceString(ChartSource, sInterval, &quot;&lt;interval&gt;&quot;)
+ oStatusLine.SetValue(2)
+ If GetCurrentRate(ChartSource, CurRate, 1) Then
+ oStatusLine.SetValue(8)
+ UpdateValue(StockName, Today, CurRate)
+ oStatusLine.SetValue(9)
+ UpdateChart(StockName)
+ oStatusLine.SetValue(10)
+ Else
+ sMsgInternetError = Stockname &amp; &quot;: &quot; &amp; sNoInternetDataAvailable &amp; chr(13) &amp; sCheckInternetSettings
+ Msgbox(sMsgInternetError, 16, sProductname)
+ End If
+ ProtectSheets(oSheets)
+ oStatusLine.End
+ If oSheets.HasbyName(sNewSheetName) Then
+ oController.ActiveSheet = oSheets.GetByName(sNewSheetName)
+ End If
+&apos; oDocument.RemoveActionLock()
+ End If
+End Sub
+
+
+
+Sub InternetUpdate()
+Dim i as Integer
+Dim StocksCount as Integer
+Dim iStartRow as Integer
+Dim sUrl as String
+Dim StockName as String
+Dim CurRate as Double
+Dim oCell as Object
+Dim sMsgInternetError as String
+Dim sStockID as String
+Dim ChartSource as String
+&apos; oDocument.AddActionLock()
+ Initialize(True)
+ UnprotectSheets(oSheets)
+ StocksCount = GetStocksCount(iStartRow)
+ InitializeStatusline(&quot;&quot;, StocksCount + 1, 1)
+ Today = CDate(Date)
+ For i = iStartRow + 1 To iStartRow + StocksCount
+ StockName = oFirstSheet.GetCellbyPosition(SBCOLUMNNAME1, i).String
+ sStockID = oFirstSheet.GetCellByPosition(SBCOLUMNID1, i).String
+ ChartSource = ReplaceString(sCurChartSource, sStockID, &quot;&lt;StockID&gt;&quot;)
+ If GetCurrentRate(ChartSource, CurRate, 0) Then
+ InsertCurrentValue(CurRate, i, Now)
+ Else
+ sMsgInternetError = Stockname &amp; &quot;: &quot; &amp; sNoInternetDataAvailable &amp; chr(13) &amp; sCheckInternetSettings
+ Msgbox(sMsgInternetError, 16, sProductname)
+ End If
+ oStatusline.SetValue(i - iStartRow + 1)
+ Next
+ ProtectSheets(oSheets)
+ oStatusLine.End
+&apos; oDocument.RemoveActionLock
+End Sub
+
+
+
+Function GetCurrentRate(sUrl as String, fValue As Double, iValueRow as Integer) as Boolean
+Dim sFilter As String
+Dim sOptions As String
+Dim oLinkSheet As Object
+Dim sDate as String
+ If oSheets.hasByName(&quot;Link&quot;) Then
+ oLinkSheet = oSheets.getByName(&quot;Link&quot;)
+ Else
+ oLinkSheet = oDocument.createInstance(&quot;com.sun.star.sheet.Spreadsheet&quot;)
+ oSheets.insertByName(&quot;Link&quot;, oLinkSheet)
+ oLinkSheet.IsVisible = False
+ End If
+
+ sFilter = &quot;Text - txt - csv (StarCalc)&quot;
+ sOptions = sCurSeparator &amp; &quot;,34,SYSTEM,1,1/10/2/10/3/10/4/10/5/10/6/10/7/10/8/10/9/10&quot;
+
+ oLinkSheet.LinkMode = com.sun.star.sheet.SheetLinkMode.NONE
+ oLinkSheet.link(sUrl, &quot;&quot;, sFilter, sOptions, 1 )
+ fValue = oLinkSheet.getCellByPosition(iValueCol, iValueRow).Value
+ If fValue = 0 Then
+ Dim sValue as String
+ sValue = oLinkSheet.getCellByPosition(1, iValueRow).String
+ sValue = ReplaceString(sValue, &quot;.&quot;,&quot;,&quot;)
+ fValue = Val(sValue)
+ End If
+ GetCurrentRate = fValue &lt;&gt; 0
+End Function
+
+
+
+Sub UpdateValue(ByVal sName As String, fDate As Double, fValue As Double )
+Dim oSheet As Object
+Dim iColumn As Long
+Dim iRow As Long
+Dim i as Integer
+Dim oCell As Object
+Dim LastDate as Date
+Dim bLeaveLoop as Boolean
+Dim RemoveCount as Integer
+Dim iLastRow as Integer
+Dim iLastLinkRow as Integer
+Dim dDate as Date
+Dim CurDate as Date
+Dim oLinkSheet as Object
+Dim StartIndex as Integer
+Dim iCellValue as Long
+ &apos; Insert Sheet with Company - Chart
+ sName = CheckNewSheetname(oSheets, sName)
+ If NOT oSheets.hasByName(sName) Then
+ oSheets.CopybyName(&quot;Background&quot;, sName, oSheets.Count)
+ oSheet = oSheets.getByName(sName)
+ iCurRow = SBSTARTROW
+ iMaxRow = iCurRow
+ oCell = oSheet.getCellByPosition(SBDATECOLUMN, iCurRow)
+ oCell.Value = fDate
+ End If
+ sNewSheetName = sName
+ oLinkSheet = oSheets.GetByName(&quot;Link&quot;)
+ oSheet = oSheets.getByName(sName)
+ iLastRow = GetLastUsedRow(oSheet)- 2
+ iLastLinkRow = GetLastUsedRow(oLinkSheet)
+ iCurRow = iLastRow
+ bLeaveLoop = False
+ RemoveCount = 0
+ &apos; Delete all Cells in Date Area
+ Do
+ oCell = oSheet.GetCellbyPosition(SBDATECOLUMN,iCurRow)
+ If oCell.CellStyle = sColumnHeader Then
+ bLeaveLoop = True
+ StartIndex = iCurRow
+ iCurRow = iCurRow + 1
+ Else
+ RemoveCount = RemoveCount + 1
+ iCurRow = iCurRow - 1
+ End If
+ Loop Until bLeaveLoop
+ If RemoveCount &gt; 1 Then
+ oSheet.Rows.RemoveByIndex(iCurRow, RemoveCount-1)
+ End If
+ For i = 1 To iLastLinkRow
+ oCell = oSheet.GetCellbyPosition(SBDATECOLUMN,iCurRow)
+ iCellValue = oLinkSheet.GetCellByPosition(0,i).Value
+ If iCellValue &gt; 0 Then
+ oCell.SetValue(oLinkSheet.GetCellByPosition(0,i).Value)
+ Else
+ oCell.SetValue(StringToDate(oLinkSheet.GetCellByPosition(0,i).String)
+ End If
+ oCell = oSheet.GetCellbyPosition(SBVALUECOLUMN,iCurRow)
+ oCell.SetValue(oLinkSheet.GetCellByPosition(4,i).Value)
+ If i &lt; iLastLinkRow Then
+ iCurRow = iCurRow + 1
+ oSheet.Rows.InsertByIndex(iCurRow,1)
+ End If
+ Next i
+ iMaxRow = iCurRow
+End Sub
+
+
+Function StringToDate(DateString as String) as Date
+Dim ShortMonths(11)
+Dim DateList() as String
+Dim MaxIndex as Integer
+Dim i as Integer
+ ShortMonths(0) = &quot;Jan&quot;
+ ShortMonths(1) = &quot;Feb&quot;
+ ShortMonths(2) = &quot;Mar&quot;
+ ShortMonths(3) = &quot;Apr&quot;
+ ShortMonths(4) = &quot;May&quot;
+ ShortMonths(5) = &quot;Jun&quot;
+ ShortMonths(6) = &quot;Jul&quot;
+ ShortMonths(7) = &quot;Aug&quot;
+ ShortMonths(8) = &quot;Sep&quot;
+ ShortMonths(9) = &quot;Oct&quot;
+ ShortMonths(10) = &quot;Nov&quot;
+ ShortMonths(11) = &quot;Dec&quot;
+ For i = 0 To 11
+ DateString = ReplaceString(DateString,CStr(i+1),ShortMonths(i))
+ Next i
+ DateString = ReplaceString(DateString, &quot;.&quot;, &quot;-&quot;)
+ StringToDate = CDate(DateString)
+End Function
+
+
+Sub UpdateChart(sName As String)
+Dim oSheet As Object
+Dim oCell As Object, oCursor As Object
+Dim oChartRange As Object
+Dim oEmbeddedChart As Object, oCharts As Object
+Dim oChart As Object, oDiagram As Object
+Dim oYAxis As Object, oXAxis As Object
+Dim fMin As Double, fMax As Double
+Dim nDateFormat As Long
+Dim aPos As Variant
+Dim aSize As Variant
+Dim oContainerChart as Object
+Dim mRangeAddresses(0) as New com.sun.star.table.CellRangeAddress
+ mRangeAddresses(0).Sheet = GetSheetIndex(oSheets, sNewSheetName)
+ mRangeAddresses(0).StartColumn = SBDATECOLUMN
+ mRangeAddresses(0).StartRow = SBSTARTROW-1
+ mRangeAddresses(0).EndColumn = SBVALUECOLUMN
+ mRangeAddresses(0).EndRow = iMaxRow
+
+ oSheet = oDocument.Sheets.getByName(sNewSheetName)
+ oCharts = oSheet.Charts
+
+ If Not oCharts.hasElements Then
+ oSheet.GetCellbyPosition(2,2).SetString(sName)
+ oChartRange = oSheet.getCellRangeByPosition(SBDATECOLUMN,6,5,SBSTARTROW-3)
+ aPos = oChartRange.Position
+ aSize = oChartRange.Size
+
+ Dim oRectangleShape As New com.sun.star.awt.Rectangle
+ oRectangleShape.X = aPos.X
+ oRectangleShape.Y = aPos.Y
+ oRectangleShape.Width = aSize.Width
+ oRectangleShape.Height = aSize.Height
+ oCharts.addNewByName(sName, oRectangleShape, mRangeAddresses(), True, False)
+ oContainerChart = oCharts.getByName(sName)
+ oChart = oContainerChart.EmbeddedObject
+ oChart.Title.String = &quot;&quot;
+ oChart.HasLegend = False
+ oChart.diagram = oChart.createInstance(&quot;com.sun.star.chart.XYDiagram&quot;)
+ oDiagram = oChart.Diagram
+ oDiagram.DataRowSource = com.sun.star.chart.ChartDataRowSource.COLUMNS
+ oChart.Area.LineStyle = com.sun.star.drawing.LineStyle.SOLID
+ oXAxis = oDiagram.XAxis
+ oXAxis.TextBreak = False
+ nDateFormat = oXAxis.NumberFormats.getStandardFormat(com.sun.star.util.NumberFormat.DATE, oDocLocale)
+
+ oYAxis = oDiagram.getYAxis()
+ oYAxis.AutoOrigin = True
+ Else
+ oChart = oCharts(0)
+ oChart.Ranges = mRangeAddresses()
+ oChart.HasRowHeaders = False
+ oEmbeddedChart = oChart.EmbeddedObject
+ oDiagram = oEmbeddedChart.Diagram
+ oXAxis = oDiagram.XAxis
+ End If
+ oXAxis.AutoStepMain = False
+ oXAxis.AutoStepHelp = False
+ oXAxis.StepMain = iStep
+ oXAxis.StepHelp = iStep
+ fMin = oSheet.getCellByPosition(SBDATECOLUMN,SBSTARTROW).Value
+ fMax = oSheet.getCellByPosition(SBDATECOLUMN,iMaxRow).Value
+ oXAxis.Min = fMin
+ oXAxis.Max = fMax
+ oXAxis.AutoMin = False
+ oXAxis.AutoMax = False
+End Sub
+
+
+Sub CalculateChartafterSplit(SheetName, NewNumber, OldNumber, NoteText, SplitDate)
+Dim oSheet as Object
+Dim i as Integer
+Dim oValueCell as Object
+Dim oDateCell as Object
+Dim bLeaveLoop as Boolean
+ If oSheets.HasbyName(SheetName) Then
+ oSheet = oSheets.GetbyName(SheetName)
+ i = 0
+ bLeaveLoop = False
+ Do
+ oValueCell = oSheet.GetCellbyPosition(SBVALUECOLUMN, SBSTARTROW + i)
+ If oValueCell.CellStyle = CurrCellStyle Then
+ SplitCellValue(oSheet, OldNumber, NewNumber, SBVALUECOLUMN, SBSTARTROW + i, &quot;&quot;)
+ i = i + 1
+ Else
+ bLeaveLoop = True
+ End If
+ Loop Until bLeaveLoop
+ oDateCell = oSheet.GetCellbyPosition(SBDATECOLUMN, SBSTARTROW + i-1)
+ oDateCell.Annotation.SetString(NoteText)
+ End If
+End Sub
+</script:module> \ No newline at end of file
diff --git a/wizards/source/depot/Lang_de.xba b/wizards/source/depot/Lang_de.xba
new file mode 100644
index 000000000000..1fe55bcca0b6
--- /dev/null
+++ b/wizards/source/depot/Lang_de.xba
@@ -0,0 +1,158 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Lang_de" script:language="StarBasic">Option Explicit
+
+Sub LoadGermanLanguage()
+
+ sProductname = GetProductname
+ sOK = &quot;~OK&quot;
+ sCancel = &quot;Abbrechen&quot;
+ sColumnHeader = &quot;Spaltenkopf&quot;
+ sInsertStockName = &quot;Bitte fügen Sie zunächst einige Aktien in Ihr Depot ein!&quot;
+ sTitle = &quot;&lt;PRODUCTNAME&gt;: Aktienverwaltung&quot;
+ sTitle = ReplaceString(sTitle, sProductName, &quot;&lt;PRODUCTNAME&gt;&quot;)
+ sMsgError = &quot;Eingabefehler&quot;
+ sMsgNoName = sInsertStockname
+ sMsgNoQuantity = &quot;Bitte geben Sie eine Stückzahl größer als 0 ein&quot;
+ sMsgNoDividend = &quot;Bitte geben Sie eine Dividende je Stück oder eine Gesamtdividende ein&quot;
+ sMsgNoExchangeRate = &quot;Bitte geben Sie eine korrekte Umtauschrate ein (alte Aktien -&gt; neue Aktien).&quot;
+ sMsgNoValidExchangeDate = &quot;Bitte geben Sie ein gültiges Datum für den Aktiensplitt ein.&quot;
+ sMsgWrongExchangeDate = &quot;Splitt nicht möglich, da bereits Transaktionen nach dem Splitt-Datum existieren.&quot;
+ sMsgSellTooMuch = &quot;So viele Aktien können Sie nicht verkaufen. Maximum: &quot;
+ sMsgConfirm = &quot;Bestätigung erforderlich&quot;
+ sMsgFreeStock = &quot;Beabsichtigen Sie die Eingabe von Gratisaktien?&quot;
+ sMsgTotalLoss = &quot;Beabsichtigen Sie die Eingabe eines Totalverlustes?&quot;
+ sMsgAuthorization = &quot;Sicherheitsabfrage&quot;
+ sMsgDeleteAll = &quot;Wollen Sie alle Bewegungen löschen und die Depotübersicht rücksetzen?&quot;
+ cSplit = &quot;Aktiensplitt am &quot;
+ sHistory = &quot;Historie&quot;
+ TransactTitle(1) = &quot;Aktien verkaufen&quot;
+ TransactTitle(2) = &quot;Aktien kaufen&quot;
+ StockRatesTitle(1) = &quot;Dividendenzahlung&quot;
+ StockRatesTitle(2) = &quot;Aktiensplitt&quot;
+ StockRatesTitle(3) = sHistory
+ sDepotCurrency = &quot;Depotwährung&quot;
+ sStockName = &quot;Aktienname&quot;
+ TransactMode = LIFO &apos; Possible values: &quot;FIFO&quot; and &quot;LIFO&quot;
+ DateCellStyle = &quot;Ergebnis Datum&quot;
+ CurrCellStyle = &quot;Ergebnis Euro mit Dezimalen&quot;
+ sStartDate = &quot;Startdatum:&quot;
+ sEndDate = &quot;Enddatum:&quot;
+ sStartUpWelcome = &quot;Diese Vorlage ermöglicht Ihnen eine effiziente Verwaltung Ihres Aktiendepots&quot;
+ sStartUpChooseMarket = &quot;Wählen Sie zunächst Ihre Referenz-Währung und damit den Börsenplatz für das Internet Update aus!&quot;
+ sStartUpHint = &quot;Leider steht Ihnen die &lt;History&gt;- Funktion nur für den amerikanischen Markt zur Verfügung!&quot;
+ sStartupHint = ReplaceString(sStartUpHint, sHistory, &quot;&lt;History&gt;&quot;)
+ sNoInternetUpdate = &quot;ohne Internet Update&quot;
+ sMarketPlace = &quot;Börsenplatz:&quot;
+ sNoInternetDataAvailable = &quot;Internet-Kurse konnten nicht empfangen werden!&quot;
+ sCheckInternetSettings = &quot;Mögliche Ursachen sind: &lt;BR&gt; Ihre Internet Einstellungen müssen überprüft werden.&lt;BR&gt; Sie haben eine falsche Kennung (z.B. Symbol, WKN) für die Aktie eingegeben.&quot;
+ sCheckInternetSettings = ReplaceString(sCheckInternetSettings, chr(13), &quot;&lt;BR&gt;&quot;)
+
+ sMsgEndDatebeforeNow = &quot;Das Enddatum muss vor dem heutigen Tag liegen!&quot;
+ sMsgStartDatebeforeEndDate = &quot;Das Startdatum muss vor dem Enddatum liegen!&quot;
+
+ sMarket(0,0) = &quot;Amerikanischer Dollar&quot;
+ sMarket(0,1) = &quot;$&quot;
+ sMarket(0,2) = &quot;New York&quot;
+ sMarket(0,3) = &quot;http://finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;&amp;f=sl1d1t1c1ohgv&amp;e=.csv&quot;
+ sMarket(0,4) = &quot;http://ichart.finance.yahoo.com/table.csv?&quot; &amp;_
+ &quot;s=&lt;StockID&gt;&amp;d=&lt;EndMonth&gt;&amp;e=&lt;EndDay&gt;&amp;f=&lt;Endyear&gt;&amp;g=d&amp;&quot; &amp;_
+ &quot;a=&lt;StartMonth&gt;&amp;b=&lt;StartDay&gt;&amp;c=&lt;Startyear&gt;&amp;ignore=.csv&quot;
+ sMarket(0,5) = &quot;Symbol&quot;
+ sMarket(0,6) = &quot;en&quot;
+ sMarket(0,7) = &quot;US&quot;
+ sMarket(0,8) = &quot;409&quot;
+ sMarket(0,9) = &quot;44&quot;
+ sMarket(0,10) = &quot;1&quot;
+
+ sMarket(1,0) = &quot;Euro&quot;
+ sMarket(1,1) = chr(8364)
+ sMarket(1,2) = &quot;Frankfurt&quot;
+ sMarket(1,3) = &quot;http://de.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;.F&amp;f=sl1t1c1ghpv&amp;e=.csv&quot;
+ sMarket(1,5) = &quot;WKN&quot;
+ sMarket(1,6) = &quot;de;nl;pt;el&quot;
+ sMarket(1,7) = &quot;DE;NL;PT;GR&quot;
+ sMarket(1,8) = &quot;407;413;816;408&quot;
+ sMarket(1,9) = &quot;59/9&quot;
+ sMarket(1,10) = &quot;1&quot;
+
+ sMarket(2,0) = &quot;Englisches Pfund&quot;
+ sMarket(2,1) = &quot;£&quot;
+ sMarket(2,2) = &quot;London&quot;
+ sMarket(2,3) = &quot;http://uk.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;.L&amp;m=*&amp;f=sl1t1c1ghov&amp;e=.csv&quot;
+ sMarket(2,5) = &quot;Symbol&quot;
+ sMarket(2,6) = &quot;en&quot;
+ sMarket(2,7) = &quot;GB&quot;
+ sMarket(2,8) = &quot;809&quot;
+ sMarket(2,9) = &quot;44&quot;
+ sMarket(2,10) = &quot;1&quot;
+
+ sMarket(3,0) = &quot;Japanischer Yen&quot;
+ sMarket(3,1) = &quot;¥&quot;
+ sMarket(3,2) = &quot;Tokyo&quot;
+ sMarket(3,3) = &quot;&quot;
+ sMarket(3,5) = &quot;Code&quot;
+ sMarket(3,6) = &quot;ja&quot;
+ sMarket(3,7) = &quot;JP&quot;
+ sMarket(3,8) = &quot;411&quot;
+ sMarket(3,9) = &quot;&quot;
+ sMarket(3,10) = &quot;&quot;
+
+ sMarket(4,0) = &quot;Hongkong Dollar&quot;
+ sMarket(4,1) = &quot;HK$&quot;
+ sMarket(4,2) = &quot;Hongkong&quot;
+ sMarket(4,3) = &quot;http://hk.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;.HK&amp;f=sl1d1t1c1ohgv&amp;e=.csv&quot;
+ sMarket(4,5) = &quot;Nummer&quot;
+ sMarket(4,6) = &quot;zh&quot;
+ sMarket(4,7) = &quot;HK&quot;
+ sMarket(4,8) = &quot;C04&quot;
+ sMarket(4,9) = &quot;44&quot;
+ sMarket(4,10) = &quot;1&quot;
+
+ sMarket(5,0) = &quot;Australischer Dollar&quot;
+ sMarket(5,1) = &quot;$&quot;
+ sMarket(5,2) = &quot;Sydney&quot;
+ sMarket(5,3) = &quot;http://au.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;&amp;f=sl1d1t1c1ohgv&amp;e=.csv&quot;
+ sMarket(5,5) = &quot;Symbol&quot;
+ sMarket(5,6) = &quot;en&quot;
+ sMarket(5,7) = &quot;AU&quot;
+ sMarket(5,8) = &quot;C09&quot;
+ sMarket(5,9) = &quot;44&quot;
+ sMarket(5,10) = &quot;1&quot;
+
+&apos; ****************************End of the default subset*********************************
+ CompleteMarketList()
+
+ LocalizedCurrencies()
+
+ With TransactModel
+ .lblStockNames.Label = sStockname
+ .lblQuantity.Label = &quot;Menge&quot;
+ .lblRate.Label = &quot;Kurs&quot;
+ .lblDate.Label = &quot;Transaktionsdatum&quot;
+ .hlnCommission.Label = &quot;Sonstige Ausgaben&quot;
+ .lblCommission.Label = &quot;Provision&quot;
+ .lblMinimum.Label = &quot;Mindestprovision&quot;
+ .lblFix.Label = &quot;Festbetrag/Spesen&quot;
+ .cmdGoOn.Label = sOK
+ .cmdCancel.Label = sCancel
+ End With
+
+ With StockRatesModel
+ .optPerShare.Label = &quot;Dividende/Aktie&quot;
+ .optTotal.Label = &quot;Dividende gesamt&quot;
+ .lblDividend.Label = &quot;Betrag&quot;
+ .lblExchangeRate.Label = &quot;Umtauschrate (alt-&gt;neu)&quot;
+ .lblColon.Label = &quot;:&quot;
+ .lblDate.Label = &quot;Umtauschdatum:&quot;
+ .lblStockNames.Label = sStockname
+ .lblStartDate.Label = sStartDate
+ .lblEndDate.Label = sEndDate
+ .optDaily.Label = &quot;~Täglich&quot;
+ .optWeekly.Label = &quot;~Wöchentlich&quot;
+ .hlnInterval.Label = &quot;Zeitraum&quot;
+ .cmdGoOn.Label = sOk
+ .cmdCancel.Label = sCancel
+ End With
+End Sub
+</script:module> \ No newline at end of file
diff --git a/wizards/source/depot/Lang_en.xba b/wizards/source/depot/Lang_en.xba
new file mode 100644
index 000000000000..347c5c2544b0
--- /dev/null
+++ b/wizards/source/depot/Lang_en.xba
@@ -0,0 +1,158 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Lang_en" script:language="StarBasic">Option Explicit
+
+Sub LoadEnglishLanguage()
+
+ sProductname = GetProductname
+ sOK = &quot;~OK&quot;
+ sCancel = &quot;Cancel&quot;
+ sColumnHeader = &quot;Column Header&quot;
+ sInsertStockName = &quot;Please enter shares in your portfolio.&quot;
+ sTitle = &quot;&lt;PRODUCTNAME&gt;: Stocks Manager&quot;
+ sTitle = ReplaceString(sTitle, sProductName, &quot;&lt;PRODUCTNAME&gt;&quot;)
+ sMsgError = &quot;Input Error&quot;
+ sMsgNoName = sInsertStockname
+ sMsgNoQuantity = &quot;Please enter a quantity larger than 0&quot;
+ sMsgNoDividend = &quot;Please enter the dividend per share or the total dividend&quot;
+ sMsgNoExchangeRate = &quot;Please enter the correct exchange rate (old shares -&gt; new shares)&quot;
+ sMsgNoValidExchangeDate = &quot;Please enter a valid date for the split.&quot;
+ sMsgWrongExchangeDate = &quot;Splitting not possible, as transactions already exist after the split date.&quot;
+ sMsgSellTooMuch = &quot;You cannot sell that many shares. Maximum: &quot;
+ sMsgConfirm = &quot;Confirmation Required&quot;
+ sMsgFreeStock = &quot;Do you intend to enter free shares?&quot;
+ sMsgTotalLoss = &quot;Do you intend to enter a total loss?&quot;
+ sMsgAuthorization = &quot;Security Query&quot;
+ sMsgDeleteAll = &quot;Do you want to delete all movements and reset the portfolio overview?&quot;
+ cSplit = &quot;Stock split on &quot;
+ sHistory = &quot;History&quot;
+ TransactTitle(1) = &quot;StarOffice Stocks Manager: Selling Shares&quot;
+ TransactTitle(2) = &quot;StarOffice Stocks Manager: Buying Shares&quot;
+ StockRatesTitle(1) = &quot;StarOffice Stocks Manager: Dividend Payment&quot;
+ StockRatesTitle(2) = &quot;Stock Split&quot;
+ StockRatesTitle(3) = sHistory
+ sDepotCurrency = &quot;Portfolio Currency&quot;
+ sStockName = &quot;Name of Stock&quot;
+ TransactMode = LIFO &apos; Possible values: &quot;FIFO&quot; and &quot;LIFO&quot;
+ DateCellStyle = &quot;Result Date&quot;
+ CurrCellStyle = &quot;1&quot;
+ sStartDate = &quot;Start date:&quot;
+ sEndDate = &quot;End date:&quot;
+ sStartUpWelcome = &quot;This template enables you to manage your stock portfolio efficiently.&quot;
+ sStartUpChooseMarket = &quot;First, select your reference currency and thus the stock exchange for the Internet update.&quot;
+ sStartUpHint = &quot;Unfortunately, the only &lt;History&gt; function available to you is that for the American market.&quot;
+ sStartupHint = ReplaceString(sStartUpHint, sHistory, &quot;&lt;History&gt;&quot;)
+ sNoInternetUpdate = &quot;without Internet update&quot;
+ sMarketPlace = &quot;Stock exchange:&quot;
+ sNoInternetDataAvailable = &quot;No prices could be received from the Internet!&quot;
+ sCheckInternetSettings = &quot;Possible causes could be: &lt;BR&gt;Your Internet settings have to be modified. &lt;BR&gt;The Symbol (e.g. Code, Ticker Symbol) entered for the stock was incorrect.&quot;
+ sCheckInternetSettings = ReplaceString(sCheckInternetSettings, chr(13), &quot;&lt;BR&gt;&quot;)
+
+ sMsgEndDatebeforeNow = &quot;The end date has to be before today&apos;s date.&quot;
+ sMsgStartDatebeforeEndDate = &quot;The start date has to be before the end date.&quot;
+
+ sMarket(0,0) = &quot;American Dollar&quot;
+ sMarket(0,1) = &quot;$&quot;
+ sMarket(0,2) = &quot;New York&quot;
+ sMarket(0,3) = &quot;http://finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;&amp;f=sl1d1t1c1ohgv&amp;e=.csv&quot;
+ sMarket(0,4) = &quot;http://ichart.finance.yahoo.com/table.csv?&quot; &amp;_
+ &quot;s=&lt;StockID&gt;&amp;d=&lt;EndMonth&gt;&amp;e=&lt;EndDay&gt;&amp;f=&lt;Endyear&gt;&amp;g=d&amp;&quot; &amp;_
+ &quot;a=&lt;StartMonth&gt;&amp;b=&lt;StartDay&gt;&amp;c=&lt;Startyear&gt;&amp;ignore=.csv&quot;
+ sMarket(0,5) = &quot;Symbol&quot;
+ sMarket(0,6) = &quot;en&quot;
+ sMarket(0,7) = &quot;US&quot;
+ sMarket(0,8) = &quot;409&quot;
+ sMarket(0,9) = &quot;44&quot;
+ sMarket(0,10) = &quot;1&quot;
+
+ sMarket(1,0) = &quot;Euro&quot;
+ sMarket(1,1) = chr(8364)
+ sMarket(1,2) = &quot;Frankfurt&quot;
+ sMarket(1,3) = &quot;http://de.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;.F&amp;f=sl1t1c1ghpv&amp;e=.csv&quot;
+ sMarket(1,5) = &quot;Ticker Symbol&quot;
+ sMarket(1,6) = &quot;de;nl;pt;el&quot;
+ sMarket(1,7) = &quot;DE;NL;PT;GR&quot;
+ sMarket(1,8) = &quot;407;413;816;408&quot;
+ sMarket(1,9) = &quot;59/9&quot;
+ sMarket(1,10) = &quot;1&quot;
+
+ sMarket(2,0) = &quot;British Pound&quot;
+ sMarket(2,1) = &quot;£&quot;
+ sMarket(2,2) = &quot;London&quot;
+ sMarket(2,3) = &quot;http://uk.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;.L&amp;m=*&amp;f=sl1t1c1ghov&amp;e=.csv&quot;
+ sMarket(2,5) = &quot;Symbol&quot;
+ sMarket(2,6) = &quot;en&quot;
+ sMarket(2,7) = &quot;GB&quot;
+ sMarket(2,8) = &quot;809&quot;
+ sMarket(2,9) = &quot;44&quot;
+ sMarket(2,10) = &quot;1&quot;
+
+ sMarket(3,0) = &quot;Japanese Yen&quot;
+ sMarket(3,1) = &quot;¥&quot;
+ sMarket(3,2) = &quot;Tokyo&quot;
+ sMarket(3,3) = &quot;&quot;
+ sMarket(3,5) = &quot;Code&quot;
+ sMarket(3,6) = &quot;ja&quot;
+ sMarket(3,7) = &quot;JP&quot;
+ sMarket(3,8) = &quot;411&quot;
+ sMarket(3,9) = &quot;&quot;
+ sMarket(3,10) = &quot;&quot;
+
+ sMarket(4,0) = &quot;Hong Kong Dollar&quot;
+ sMarket(4,1) = &quot;HK$&quot;
+ sMarket(4,2) = &quot;Hong Kong&quot;
+ sMarket(4,3) = &quot;http://hk.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;&amp;f=sl1d1t1c1ohgv&amp;e=.csv&quot;
+ sMarket(4,5) = &quot;Number&quot;
+ sMarket(4,6) = &quot;zh&quot;
+ sMarket(4,7) = &quot;HK&quot;
+ sMarket(4,8) = &quot;C04&quot;
+ sMarket(4,9) = &quot;44&quot;
+ sMarket(4,10) = &quot;1&quot;
+
+ sMarket(5,0) = &quot;Australian Dollar&quot;
+ sMarket(5,1) = &quot;$&quot;
+ sMarket(5,2) = &quot;Sydney&quot;
+ sMarket(5,3) = &quot;http://au.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;&amp;f=sl1d1t1c1ohgv&amp;e=.csv&quot;
+ sMarket(5,5) = &quot;Symbol&quot;
+ sMarket(5,6) = &quot;en&quot;
+ sMarket(5,7) = &quot;AU&quot;
+ sMarket(5,8) = &quot;C09&quot;
+ sMarket(5,9) = &quot;44&quot;
+ sMarket(5,10) = &quot;1&quot;
+
+&apos; ****************************End of the default subset*********************************
+ CompleteMarketList()
+
+ LocalizedCurrencies()
+
+ With TransactModel
+ .lblStockNames.Label = sStockname
+ .lblQuantity.Label = &quot;Quantity&quot;
+ .lblRate.Label = &quot;Price&quot;
+ .lblDate.Label = &quot;Transaction Date&quot;
+ .hlnCommission.Label = &quot;Other expenditures&quot;
+ .lblCommission.Label = &quot;Commission&quot;
+ .lblMinimum.Label = &quot;Min. Commission&quot;
+ .lblFix.Label = &quot;Fixed Costs/Charges&quot;
+ .cmdGoOn.Label = sOK
+ .cmdCancel.Label = sCancel
+ End With
+
+ With StockRatesModel
+ .optPerShare.Label = &quot;Dividends/Stocks&quot;
+ .optTotal.Label = &quot;Total Dividends&quot;
+ .lblDividend.Label = &quot;Amount&quot;
+ .lblExchangeRate.Label = &quot;Exchange Rate (old-&gt;new)&quot;
+ .lblColon.Label = &quot;:&quot;
+ .lblDate.Label = &quot;Exchange Date:&quot;
+ .lblStockNames.Label = sStockname
+ .lblStartDate.Label = sStartDate
+ .lblEndDate.Label = sEndDate
+ .optDaily.Label = &quot;~Daily&quot;
+ .optWeekly.Label = &quot;~Weekly&quot;
+ .hlnInterval.Label = &quot;Time period&quot;
+ .cmdGoOn.Label = sOk
+ .cmdCancel.Label = sCancel
+ End With
+End Sub
+</script:module> \ No newline at end of file
diff --git a/wizards/source/depot/Lang_es.xba b/wizards/source/depot/Lang_es.xba
new file mode 100644
index 000000000000..e12bf4b2551d
--- /dev/null
+++ b/wizards/source/depot/Lang_es.xba
@@ -0,0 +1,158 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Lang_es" script:language="StarBasic">Option Explicit
+
+Sub LoadSpanishLanguage()
+
+ sProductname = GetProductname
+ sOK = &quot;~Aceptar&quot;
+ sCancel = &quot;Cancelar&quot;
+ sColumnHeader = &quot;Título de columna&quot;
+ sInsertStockName = &quot;Introduzca primero algunas acciones en su depósito.&quot;
+ sTitle = &quot;&lt;PRODUCTNAME&gt;: Administración de acciones&quot;
+ sTitle = ReplaceString(sTitle, sProductName, &quot;&lt;PRODUCTNAME&gt;&quot;)
+ sMsgError = &quot;Error de entrada&quot;
+ sMsgNoName = sInsertStockname
+ sMsgNoQuantity = &quot;Indique una cantidad mayor que 0&quot;
+ sMsgNoDividend = &quot;Indique un dividendo por unidad o un dividendo total&quot;
+ sMsgNoExchangeRate = &quot;Indique aquí un cambio correcto (acción vieja -&gt; nueva acción)&quot;
+ sMsgNoValidExchangeDate = &quot;Indique una fecha correcta para el fraccionamiento de la acción.&quot;
+ sMsgWrongExchangeDate = &quot;El fraccionamiento no es posible porque existen transacciones después de la fecha de fraccionamiento.&quot;
+ sMsgSellTooMuch = &quot;No puede vender tantas acciones. Como máximo: &quot;
+ sMsgConfirm = &quot;Confirmación necesaria&quot;
+ sMsgFreeStock = &quot;¿Tiene previsto considerar acciones gratis?&quot;
+ sMsgTotalLoss = &quot;¿Tiene previsto introducir una pérdida total?&quot;
+ sMsgAuthorization = &quot;Pregunta de seguridad&quot;
+ sMsgDeleteAll = &quot;¿Desea borrar todos los movimientos y reiniciar el balance de depósito?&quot;
+ cSplit = &quot;Fraccionamiento el &quot;
+ sHistory = &quot;Historia&quot;
+ TransactTitle(1) = &quot;Vender acciones&quot;
+ TransactTitle(2) = &quot;Comprar acciones&quot;
+ StockRatesTitle(1) = &quot;Pago de dividendos&quot;
+ StockRatesTitle(2) = &quot;Fraccionamiento&quot;
+ StockRatesTitle(3) = sHistory
+ sDepotCurrency = &quot;Moneda del depósito&quot;
+ sStockName = &quot;Nombre de la acción&quot;
+ TransactMode = LIFO &apos; Possible values: &quot;FIFO&quot; and &quot;LIFO&quot;
+ DateCellStyle = &quot;Resultado Fecha&quot;
+ CurrCellStyle = &quot;1&quot;
+ sStartDate = &quot;Fecha de inicio:&quot;
+ sEndDate = &quot;Fecha final:&quot;
+ sStartUpWelcome = &quot;Esta plantilla le permite administrar eficientemente su depósito de acciones&quot;
+ sStartUpChooseMarket = &quot;Seleccione primero la moneda de referencia y la plaza bursátil para la actualización a través de Internet.&quot;
+ sStartUpHint = &quot;La función &lt;History&gt; está disponible únicamente para el mercado americano.&quot;
+ sStartupHint = ReplaceString(sStartUpHint, sHistory, &quot;&lt;History&gt;&quot;)
+ sNoInternetUpdate = &quot;Sin actualización por Internet&quot;
+ sMarketPlace = &quot;Plaza bursátil:&quot;
+ sNoInternetDataAvailable = &quot;No se pudieron recibir las cotizaciones por Internet.&quot;
+ sCheckInternetSettings = &quot;Causas posibles: &lt;BR&gt; Debe comprobar la configuración de Internet.&lt;BR&gt; Ha indicado un código incorrecto (p.ej. número, símbolo, etc.) para la acción.&quot;
+ sCheckInternetSettings = ReplaceString(sCheckInternetSettings, chr(13), &quot;&lt;BR&gt;&quot;)
+
+ sMsgEndDatebeforeNow = &quot;La fecha final debe ser anterior a la fecha de hoy.&quot;
+ sMsgStartDatebeforeEndDate = &quot;La fecha inicial debe ser anterior a la fecha final.&quot;
+
+ sMarket(0,0) = &quot;Dólar estadounidense&quot;
+ sMarket(0,1) = &quot;$&quot;
+ sMarket(0,2) = &quot;Nueva York&quot;
+ sMarket(0,3) = &quot;http://finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;&amp;f=sl1d1t1c1ohgv&amp;e=.csv&quot;
+ sMarket(0,4) = &quot;http://ichart.finance.yahoo.com/table.csv?&quot; &amp;_
+ &quot;s=&lt;StockID&gt;&amp;d=&lt;EndMonth&gt;&amp;e=&lt;EndDay&gt;&amp;f=&lt;Endyear&gt;&amp;g=d&amp;&quot; &amp;_
+ &quot;a=&lt;StartMonth&gt;&amp;b=&lt;StartDay&gt;&amp;c=&lt;Startyear&gt;&amp;ignore=.csv&quot;
+ sMarket(0,5) = &quot;Símbolo&quot;
+ sMarket(0,6) = &quot;en&quot;
+ sMarket(0,7) = &quot;US&quot;
+ sMarket(0,8) = &quot;409&quot;
+ sMarket(0,9) = &quot;44&quot;
+ sMarket(0,10) = &quot;1&quot;
+
+ sMarket(1,0) = &quot;Euro&quot;
+ sMarket(1,1) = chr(8364)
+ sMarket(1,2) = &quot;Frankfurt&quot;
+ sMarket(1,3) = &quot;http://de.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;.F&amp;f=sl1t1c1ghpv&amp;e=.csv&quot;
+ sMarket(1,5) = &quot;Código&quot;
+ sMarket(1,6) = &quot;de;nl;pt;el&quot;
+ sMarket(1,7) = &quot;DE;NL;PT;GR&quot;
+ sMarket(1,8) = &quot;407;413;816;408&quot;
+ sMarket(1,9) = &quot;59/9&quot;
+ sMarket(1,10) = &quot;1&quot;
+
+ sMarket(2,0) = &quot;Libra esterlina&quot;
+ sMarket(2,1) = &quot;£&quot;
+ sMarket(2,2) = &quot;Londres&quot;
+ sMarket(2,3) = &quot;http://uk.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;.L&amp;m=*&amp;f=sl1t1c1ghov&amp;e=.csv&quot;
+ sMarket(2,5) = &quot;Símbolo&quot;
+ sMarket(2,6) = &quot;en&quot;
+ sMarket(2,7) = &quot;GB&quot;
+ sMarket(2,8) = &quot;809&quot;
+ sMarket(2,9) = &quot;44&quot;
+ sMarket(2,10) = &quot;1&quot;
+
+ sMarket(3,0) = &quot;Yen japonés&quot;
+ sMarket(3,1) = &quot;¥&quot;
+ sMarket(3,2) = &quot;Tokio&quot;
+ sMarket(3,3) = &quot;&quot;
+ sMarket(3,5) = &quot;Código&quot;
+ sMarket(3,6) = &quot;ja&quot;
+ sMarket(3,7) = &quot;JP&quot;
+ sMarket(3,8) = &quot;411&quot;
+ sMarket(3,9) = &quot;&quot;
+ sMarket(3,10) = &quot;&quot;
+
+ sMarket(4,0) = &quot;Dólar hongkonés&quot;
+ sMarket(4,1) = &quot;HK$&quot;
+ sMarket(4,2) = &quot;Hong Kong&quot;
+ sMarket(4,3) = &quot;http://hk.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;.HK&amp;f=sl1d1t1c1ohgv&amp;e=.csv&quot;
+ sMarket(4,5) = &quot;Número&quot;
+ sMarket(4,6) = &quot;zh&quot;
+ sMarket(4,7) = &quot;HK&quot;
+ sMarket(4,8) = &quot;C04&quot;
+ sMarket(4,9) = &quot;44&quot;
+ sMarket(4,10) = &quot;1&quot;
+
+ sMarket(5,0) = &quot;Dólar australiano&quot;
+ sMarket(5,1) = &quot;$&quot;
+ sMarket(5,2) = &quot;Sidney&quot;
+ sMarket(5,3) = &quot;http://au.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;&amp;f=sl1d1t1c1ohgv&amp;e=.csv&quot;
+ sMarket(5,5) = &quot;Símbolo&quot;
+ sMarket(5,6) = &quot;en&quot;
+ sMarket(5,7) = &quot;AU&quot;
+ sMarket(5,8) = &quot;C09&quot;
+ sMarket(5,9) = &quot;44&quot;
+ sMarket(5,10) = &quot;1&quot;
+
+&apos; ****************************End of the default subset*********************************
+ CompleteMarketList()
+
+ LocalizedCurrencies()
+
+ With TransactModel
+ .lblStockNames.Label = sStockname
+ .lblQuantity.Label = &quot;Cantidad&quot;
+ .lblRate.Label = &quot;Cotización&quot;
+ .lblDate.Label = &quot;Fecha de operación&quot;
+ .hlnCommission.Label = &quot;Otros gastos&quot;
+ .lblCommission.Label = &quot;Provisión&quot;
+ .lblMinimum.Label = &quot;Provisión mínima&quot;
+ .lblFix.Label = &quot;Cantidad fija/comisión&quot;
+ .cmdGoOn.Label = sOK
+ .cmdCancel.Label = sCancel
+ End With
+
+ With StockRatesModel
+ .optPerShare.Label = &quot;Dividendos/Acción&quot;
+ .optTotal.Label = &quot;Dividendos totales&quot;
+ .lblDividend.Label = &quot;Importe&quot;
+ .lblExchangeRate.Label = &quot;Cambio (vieja-&gt;nueva)&quot;
+ .lblColon.Label = &quot;:&quot;
+ .lblDate.Label = &quot;Fecha de cambio:&quot;
+ .lblStockNames.Label = sStockname
+ .lblStartDate.Label = sStartDate
+ .lblEndDate.Label = sEndDate
+ .optDaily.Label = &quot;~Diario&quot;
+ .optWeekly.Label = &quot;~Semanal&quot;
+ .hlnInterval.Label = &quot;Periodo&quot;
+ .cmdGoOn.Label = sOk
+ .cmdCancel.Label = sCancel
+ End With
+End Sub
+</script:module> \ No newline at end of file
diff --git a/wizards/source/depot/Lang_fr.xba b/wizards/source/depot/Lang_fr.xba
new file mode 100644
index 000000000000..372b974402fd
--- /dev/null
+++ b/wizards/source/depot/Lang_fr.xba
@@ -0,0 +1,158 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Lang_fr" script:language="StarBasic">Option Explicit
+
+Sub LoadFrenchLanguage()
+
+ sProductname = GetProductname
+ sOK = &quot;~OK&quot;
+ sCancel = &quot;Annuler&quot;
+ sColumnHeader = &quot;En-tête de colonne&quot;
+ sInsertStockName = &quot;Saisissez quelques actions dans votre portefeuille !&quot;
+ sTitle = &quot;&lt;PRODUCTNAME&gt; : Gestion d&apos;actions&quot;
+ sTitle = ReplaceString(sTitle, sProductName, &quot;&lt;PRODUCTNAME&gt;&quot;)
+ sMsgError = &quot;Erreur de saisie&quot;
+ sMsgNoName = sInsertStockname
+ sMsgNoQuantity = &quot;Saisissez une quantité supérieure à 0 !&quot;
+ sMsgNoDividend = &quot;Vous devez saisir le montant des dividendes perçus (soit les dividendes par action, soit la somme totale perçue).&quot;
+ sMsgNoExchangeRate = &quot;Saisissez un taux correct de conversion (anciennes actions -&gt; nouvelles actions).&quot;
+ sMsgNoValidExchangeDate = &quot;Saisissez une date correcte pour le split d&apos;action.&quot;
+ sMsgWrongExchangeDate = &quot;Split impossible car il y a déjà eu des transactions après la date du split !&quot;
+ sMsgSellTooMuch = &quot;Impossible de vendre autant d&apos;actions ! Maximum : &quot;
+ sMsgConfirm = &quot;Confirmation requise&quot;
+ sMsgFreeStock = &quot;S&apos;agit-il d&apos;actions gratuites ?&quot;
+ sMsgTotalLoss = &quot;Prévoyez-vous une perte totale ?&quot;
+ sMsgAuthorization = &quot;Requête de sécurité&quot;
+ sMsgDeleteAll = &quot;Voulez-vous supprimer tous les mouvements et remettre le portefeuille d&apos;actions à zéro ?&quot;
+ cSplit = &quot;Split d&apos;action le &quot;
+ sHistory = &quot;Historique&quot;
+ TransactTitle(1) = &quot;Vente d&apos;actions&quot;
+ TransactTitle(2) = &quot;Achat d&apos;actions&quot;
+ StockRatesTitle(1) = &quot;Versement des dividendes&quot;
+ StockRatesTitle(2) = &quot;Split d&apos;action&quot;
+ StockRatesTitle(3) = sHistory
+ sDepotCurrency = &quot;Monnaie du portefeuille&quot;
+ sStockName = &quot;Nom de l&apos;action&quot;
+ TransactMode = LIFO &apos; Possible values: &quot;FIFO&quot; and &quot;LIFO&quot;
+ DateCellStyle = &quot;Résultat date&quot;
+ CurrCellStyle = &quot;1&quot;
+ sStartDate = &quot;Date de début :&quot;
+ sEndDate = &quot;Date de fin :&quot;
+ sStartUpWelcome = &quot;Utilisez ce modèle pour une gestion efficiente de votre portefeuille d&apos;actions !&quot;
+ sStartUpChooseMarket = &quot;Commencez par choisir une monnaie de référence et ainsi la place boursière pour la mise à jour Internet !&quot;
+ sStartUpHint = &quot;La fonction &lt;History&gt; n&apos;est cependant disponible que pour le marché américain.&quot;
+ sStartupHint = ReplaceString(sStartUpHint, sHistory, &quot;&lt;History&gt;&quot;)
+ sNoInternetUpdate = &quot;Sans mise à jour Internet&quot;
+ sMarketPlace = &quot;Place boursière :&quot;
+ sNoInternetDataAvailable = &quot;Réception des cours Internet impossible !&quot;
+ sCheckInternetSettings = &quot;Causes possibles : &lt;BR&gt; Problème de paramétrage Internet : vérifiez les paramètres !&lt;BR&gt; Vous avez saisi un identificateur (par ex. symbole ou code) incorrect pour l&apos;action.&quot;
+ sCheckInternetSettings = ReplaceString(sCheckInternetSettings, chr(13), &quot;&lt;BR&gt;&quot;)
+
+ sMsgEndDatebeforeNow = &quot;La date spécifiée pour la fin doit précéder celle de ce jour !&quot;
+ sMsgStartDatebeforeEndDate = &quot;La date spécifiée pour le début doit succéder à celle de ce jour !&quot;
+
+ sMarket(0,0) = &quot;Dollar Américain&quot;
+ sMarket(0,1) = &quot;$&quot;
+ sMarket(0,2) = &quot;New York&quot;
+ sMarket(0,3) = &quot;http://finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;&amp;f=sl1d1t1c1ohgv&amp;e=.csv&quot;
+ sMarket(0,4) = &quot;http://ichart.finance.yahoo.com/table.csv?&quot; &amp;_
+ &quot;s=&lt;StockID&gt;&amp;d=&lt;EndMonth&gt;&amp;e=&lt;EndDay&gt;&amp;f=&lt;Endyear&gt;&amp;g=d&amp;&quot; &amp;_
+ &quot;a=&lt;StartMonth&gt;&amp;b=&lt;StartDay&gt;&amp;c=&lt;Startyear&gt;&amp;ignore=.csv&quot;
+ sMarket(0,5) = &quot;Symbole&quot;
+ sMarket(0,6) = &quot;en&quot;
+ sMarket(0,7) = &quot;US&quot;
+ sMarket(0,8) = &quot;409&quot;
+ sMarket(0,9) = &quot;44&quot;
+ sMarket(0,10) = &quot;1&quot;
+
+ sMarket(1,0) = &quot;Euro&quot;
+ sMarket(1,1) = chr(8364)
+ sMarket(1,2) = &quot;Francfort&quot;
+ sMarket(1,3) = &quot;http://de.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;.F&amp;f=sl1t1c1ghpv&amp;e=.csv&quot;
+ sMarket(1,5) = &quot;Code&quot;
+ sMarket(1,6) = &quot;de;nl;pt;el&quot;
+ sMarket(1,7) = &quot;DE;NL;PT;GR&quot;
+ sMarket(1,8) = &quot;407;413;816;408&quot;
+ sMarket(1,9) = &quot;59/9&quot;
+ sMarket(1,10) = &quot;1&quot;
+
+ sMarket(2,0) = &quot;Livre Sterling&quot;
+ sMarket(2,1) = &quot;£&quot;
+ sMarket(2,2) = &quot;Londres&quot;
+ sMarket(2,3) = &quot;http://uk.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;.L&amp;m=*&amp;f=sl1t1c1ghov&amp;e=.csv&quot;
+ sMarket(2,5) = &quot;Symbole&quot;
+ sMarket(2,6) = &quot;en&quot;
+ sMarket(2,7) = &quot;GB&quot;
+ sMarket(2,8) = &quot;809&quot;
+ sMarket(2,9) = &quot;44&quot;
+ sMarket(2,10) = &quot;1&quot;
+
+ sMarket(3,0) = &quot;Yen Japonais&quot;
+ sMarket(3,1) = &quot;¥&quot;
+ sMarket(3,2) = &quot;Tokyo&quot;
+ sMarket(3,3) = &quot;&quot;
+ sMarket(3,5) = &quot;Code&quot;
+ sMarket(3,6) = &quot;ja&quot;
+ sMarket(3,7) = &quot;JP&quot;
+ sMarket(3,8) = &quot;411&quot;
+ sMarket(3,9) = &quot;&quot;
+ sMarket(3,10) = &quot;&quot;
+
+ sMarket(4,0) = &quot;Dollar de Hong Kong&quot;
+ sMarket(4,1) = &quot;HK$&quot;
+ sMarket(4,2) = &quot;Hong Kong&quot;
+ sMarket(4,3) = &quot;http://hk.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;&amp;f=sl1d1t1c1ohgv&amp;e=.csv&quot;
+ sMarket(4,5) = &quot;Numéro&quot;
+ sMarket(4,6) = &quot;zh&quot;
+ sMarket(4,7) = &quot;HK&quot;
+ sMarket(4,8) = &quot;C04&quot;
+ sMarket(4,9) = &quot;44&quot;
+ sMarket(4,10) = &quot;1&quot;
+
+ sMarket(5,0) = &quot;Dollar Australien&quot;
+ sMarket(5,1) = &quot;$&quot;
+ sMarket(5,2) = &quot;Sydney&quot;
+ sMarket(5,3) = &quot;http://au.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;&amp;f=sl1d1t1c1ohgv&amp;e=.csv&quot;
+ sMarket(5,5) = &quot;Symbole&quot;
+ sMarket(5,6) = &quot;en&quot;
+ sMarket(5,7) = &quot;AU&quot;
+ sMarket(5,8) = &quot;C09&quot;
+ sMarket(5,9) = &quot;44&quot;
+ sMarket(5,10) = &quot;1&quot;
+
+&apos; ****************************End of the default subset*********************************
+ CompleteMarketList()
+
+ LocalizedCurrencies()
+
+ With TransactModel
+ .lblStockNames.Label = sStockname
+ .lblQuantity.Label = &quot;Quantité&quot;
+ .lblRate.Label = &quot;Cours&quot;
+ .lblDate.Label = &quot;Date de transaction&quot;
+ .hlnCommission.Label = &quot;Dépenses diverses&quot;
+ .lblCommission.Label = &quot;Commission&quot;
+ .lblMinimum.Label = &quot;Commission minimale&quot;
+ .lblFix.Label = &quot;Montant fixe/frais&quot;
+ .cmdGoOn.Label = sOK
+ .cmdCancel.Label = sCancel
+ End With
+
+ With StockRatesModel
+ .optPerShare.Label = &quot;Dividende/action&quot;
+ .optTotal.Label = &quot;Dividende total&quot;
+ .lblDividend.Label = &quot;Montant&quot;
+ .lblExchangeRate.Label = &quot;Taux de conversion (ancien-&gt;nouveau)&quot;
+ .lblColon.Label = &quot;:&quot;
+ .lblDate.Label = &quot;Date de la conversion:&quot;
+ .lblStockNames.Label = sStockname
+ .lblStartDate.Label = sStartDate
+ .lblEndDate.Label = sEndDate
+ .optDaily.Label = &quot;~Quotidien&quot;
+ .optWeekly.Label = &quot;~Hebdomadaire&quot;
+ .hlnInterval.Label = &quot;Période&quot;
+ .cmdGoOn.Label = sOk
+ .cmdCancel.Label = sCancel
+ End With
+End Sub
+</script:module> \ No newline at end of file
diff --git a/wizards/source/depot/Lang_it.xba b/wizards/source/depot/Lang_it.xba
new file mode 100644
index 000000000000..2450bed82a88
--- /dev/null
+++ b/wizards/source/depot/Lang_it.xba
@@ -0,0 +1,158 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Lang_it" script:language="StarBasic">Option Explicit
+
+Sub LoadItalianLanguage()
+
+ sProductname = GetProductname
+ sOK = &quot;~OK&quot;
+ sCancel = &quot;Annulla&quot;
+ sColumnHeader = &quot;Intestazione colonna&quot;
+ sInsertStockName = &quot;Inserite un nome di azioni&quot;
+ sTitle = &quot;&lt;PRODUCTNAME&gt;: Gestione delle azioni&quot;
+ sTitle = ReplaceString(sTitle, sProductName, &quot;&lt;PRODUCTNAME&gt;&quot;)
+ sMsgError = &quot;Errore dati immessi&quot;
+ sMsgNoName = sInsertStockname
+ sMsgNoQuantity = &quot;Inserite il numero delle azioni&quot;
+ sMsgNoDividend = &quot;Inserite un dividendo a unità oppure un dividendo totale&quot;
+ sMsgNoExchangeRate = &quot;Indicate un corretto tasso di cambio (vecchie azioni -&gt; nuove azioni).&quot;
+ sMsgNoValidExchangeDate = &quot;Indicate la data di frazionamento delle azioni.&quot;
+ sMsgWrongExchangeDate = &quot;Il frazionamento non è possibile perché sono ancora in atto transazioni dopo la data indicata.&quot;
+ sMsgSellTooMuch = &quot;Non potete vendere così tante azioni. Massimo: &quot;
+ sMsgConfirm = &quot;È necessaria una conferma&quot;
+ sMsgFreeStock = &quot;Confermate la digitazione di azioni gratuite?&quot;
+ sMsgTotalLoss = &quot;Confermate la digitazione di perdita totale?&quot;
+ sMsgAuthorization = &quot;Domanda di sicurezza&quot;
+ sMsgDeleteAll = &quot;Eliminare tutti i movimenti e ripristinare la panoramica dei depositi?&quot;
+ cSplit = &quot;Frazionamento delle azioni il: &quot;
+ sHistory = &quot;Cronologia&quot;
+ TransactTitle(1) = &quot;Vendita di azioni&quot;
+ TransactTitle(2) = &quot;Acquisto di azioni&quot;
+ StockRatesTitle(1) = &quot;Pagamento dei dividendi&quot;
+ StockRatesTitle(2) = &quot;Frazionamento azioni&quot;
+ StockRatesTitle(3) = sHistory
+ sDepotCurrency = &quot;Valuta deposito&quot;
+ sStockName = &quot;Nome delle azioni&quot;
+ TransactMode = LIFO &apos; Possible values: &quot;FIFO&quot; and &quot;LIFO&quot;
+ DateCellStyle = &quot;Risultato data&quot;
+ CurrCellStyle = &quot;1&quot;
+ sStartDate = &quot;Data d&apos;inizio:&quot;
+ sEndDate = &quot;Data finale:&quot;
+ sStartUpWelcome = &quot;Questo modello vi permette una gestione efficace delle vostre azioni.&quot;
+ sStartUpChooseMarket = &quot;Selezionate la valuta di riferimento e la Borsa per il collegamento Internet.&quot;
+ sStartUpHint = &quot;La funzione &lt;History&gt; è disponibile solo per il mercato americano.&quot;
+ sStartupHint = ReplaceString(sStartUpHint, sHistory, &quot;&lt;History&gt;&quot;)
+ sNoInternetUpdate = &quot;Senza aggiornamento Internet&quot;
+ sMarketPlace = &quot;Borsa:&quot;
+ sNoInternetDataAvailable = &quot;Impossibile ricevere le quotazioni Internet&quot;
+ sCheckInternetSettings = &quot;Possibili cause: &lt;BR&gt; le impostazioni Internet devono essere modificate.&lt;BR&gt; Avete indicato un indice (ad es. simbolo o codice) errato per le azioni.&quot;
+ sCheckInternetSettings = ReplaceString(sCheckInternetSettings, chr(13), &quot;&lt;BR&gt;&quot;)
+
+ sMsgEndDatebeforeNow = &quot;La data finale dev&apos;essere anteriore alla data odierna.&quot;
+ sMsgStartDatebeforeEndDate = &quot;La data d&apos;inizio deve precedere la data finale.&quot;
+
+ sMarket(0,0) = &quot;Dollaro USA&quot;
+ sMarket(0,1) = &quot;$&quot;
+ sMarket(0,2) = &quot;New York&quot;
+ sMarket(0,3) = &quot;http://finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;&amp;f=sl1d1t1c1ohgv&amp;e=.csv&quot;
+ sMarket(0,4) = &quot;http://ichart.finance.yahoo.com/table.csv?&quot; &amp;_
+ &quot;s=&lt;StockID&gt;&amp;d=&lt;EndMonth&gt;&amp;e=&lt;EndDay&gt;&amp;f=&lt;Endyear&gt;&amp;g=d&amp;&quot; &amp;_
+ &quot;a=&lt;StartMonth&gt;&amp;b=&lt;StartDay&gt;&amp;c=&lt;Startyear&gt;&amp;ignore=.csv&quot;
+ sMarket(0,5) = &quot;Simbolo&quot;
+ sMarket(0,6) = &quot;en&quot;
+ sMarket(0,7) = &quot;US&quot;
+ sMarket(0,8) = &quot;409&quot;
+ sMarket(0,9) = &quot;44&quot;
+ sMarket(0,10) = &quot;1&quot;
+
+ sMarket(1,0) = &quot;Euro&quot;
+ sMarket(1,1) = chr(8364)
+ sMarket(1,2) = &quot;Francoforte&quot;
+ sMarket(1,3) = &quot;http://de.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;.F&amp;f=sl1t1c1ghpv&amp;e=.csv&quot;
+ sMarket(1,5) = &quot;Numero identificazione titoli&quot;
+ sMarket(1,6) = &quot;de;nl;pt;el&quot;
+ sMarket(1,7) = &quot;DE;NL;PT;GR&quot;
+ sMarket(1,8) = &quot;407;413;816;408&quot;
+ sMarket(1,9) = &quot;59/9&quot;
+ sMarket(1,10) = &quot;1&quot;
+
+ sMarket(2,0) = &quot;Sterlina inglese&quot;
+ sMarket(2,1) = &quot;£&quot;
+ sMarket(2,2) = &quot;Londra&quot;
+ sMarket(2,3) = &quot;http://uk.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;.L&amp;m=*&amp;f=sl1t1c1ghov&amp;e=.csv&quot;
+ sMarket(2,5) = &quot;Simbolo&quot;
+ sMarket(2,6) = &quot;en&quot;
+ sMarket(2,7) = &quot;GB&quot;
+ sMarket(2,8) = &quot;809&quot;
+ sMarket(2,9) = &quot;44&quot;
+ sMarket(2,10) = &quot;1&quot;
+
+ sMarket(3,0) = &quot;Yen&quot;
+ sMarket(3,1) = &quot;¥&quot;
+ sMarket(3,2) = &quot;Tokyo&quot;
+ sMarket(3,3) = &quot;&quot;
+ sMarket(3,5) = &quot;Codice&quot;
+ sMarket(3,6) = &quot;ja&quot;
+ sMarket(3,7) = &quot;JP&quot;
+ sMarket(3,8) = &quot;411&quot;
+ sMarket(3,9) = &quot;&quot;
+ sMarket(3,10) = &quot;&quot;
+
+ sMarket(4,0) = &quot;Dollaro Hong Kong&quot;
+ sMarket(4,1) = &quot;HK$&quot;
+ sMarket(4,2) = &quot;Hong Kong&quot;
+ sMarket(4,3) = &quot;http://hk.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;&amp;f=sl1d1t1c1ohgv&amp;e=.csv&quot;
+ sMarket(4,5) = &quot;Numero&quot;
+ sMarket(4,6) = &quot;zh&quot;
+ sMarket(4,7) = &quot;HK&quot;
+ sMarket(4,8) = &quot;C04&quot;
+ sMarket(4,9) = &quot;44&quot;
+ sMarket(4,10) = &quot;1&quot;
+
+ sMarket(5,0) = &quot;Dollaro australiano&quot;
+ sMarket(5,1) = &quot;$&quot;
+ sMarket(5,2) = &quot;Sydney&quot;
+ sMarket(5,3) = &quot;http://au.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;&amp;f=sl1d1t1c1ohgv&amp;e=.csv&quot;
+ sMarket(5,5) = &quot;Simbolo&quot;
+ sMarket(5,6) = &quot;en&quot;
+ sMarket(5,7) = &quot;AU&quot;
+ sMarket(5,8) = &quot;C09&quot;
+ sMarket(5,9) = &quot;44&quot;
+ sMarket(5,10) = &quot;1&quot;
+
+&apos; ****************************End of the default subset*********************************
+ CompleteMarketList()
+
+ LocalizedCurrencies()
+
+ With TransactModel
+ .lblStockNames.Label = sStockname
+ .lblQuantity.Label = &quot;Quantità&quot;
+ .lblRate.Label = &quot;Quotazione&quot;
+ .lblDate.Label = &quot;Data della transazione&quot;
+ .hlnCommission.Label = &quot;Spese extra&quot;
+ .lblCommission.Label = &quot;Commissioni&quot;
+ .lblMinimum.Label = &quot;Commissione minima&quot;
+ .lblFix.Label = &quot;Importo fisso/Spese&quot;
+ .cmdGoOn.Label = sOK
+ .cmdCancel.Label = sCancel
+ End With
+
+ With StockRatesModel
+ .optPerShare.Label = &quot;Dividendo/Azione&quot;
+ .optTotal.Label = &quot;Dividendo totale&quot;
+ .lblDividend.Label = &quot;Importo&quot;
+ .lblExchangeRate.Label = &quot;Tasso di cambio (vecchio-&gt;nuovo)&quot;
+ .lblColon.Label = &quot;:&quot;
+ .lblDate.Label = &quot;Data di cambio:&quot;
+ .lblStockNames.Label = sStockname
+ .lblStartDate.Label = sStartDate
+ .lblEndDate.Label = sEndDate
+ .optDaily.Label = &quot;~Giornaliero&quot;
+ .optWeekly.Label = &quot;~Settimanale&quot;
+ .hlnInterval.Label = &quot;Durata&quot;
+ .cmdGoOn.Label = sOk
+ .cmdCancel.Label = sCancel
+ End With
+End Sub
+</script:module> \ No newline at end of file
diff --git a/wizards/source/depot/Lang_ja.xba b/wizards/source/depot/Lang_ja.xba
new file mode 100644
index 000000000000..4b4a53de3607
--- /dev/null
+++ b/wizards/source/depot/Lang_ja.xba
@@ -0,0 +1,158 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Lang_ja" script:language="StarBasic">Option Explicit
+
+Sub LoadJapaneseLanguage()
+
+ sProductname = GetProductname
+ sOK = &quot;~OK&quot;
+ sCancel = &quot;キャンセル&quot;
+ sColumnHeader = &quot;列番号&quot;
+ sInsertStockName = &quot;最初に株の銘柄を入力してください。&quot;
+ sTitle = &quot;&lt;PRODUCTNAME&gt;: 株管理&quot;
+ sTitle = ReplaceString(sTitle, sProductName, &quot;&lt;PRODUCTNAME&gt;&quot;)
+ sMsgError = &quot;入力フィールド&quot;
+ sMsgNoName = sInsertStockname
+ sMsgNoQuantity = &quot;0 より大きな額を入力してください。&quot;
+ sMsgNoDividend = &quot;1株当たりの配当金額または総配当金額を入力してください。&quot;
+ sMsgNoExchangeRate = &quot;交換比率(旧株-&gt;新株)を入力してください。&quot;
+ sMsgNoValidExchangeDate = &quot;株式分割日を入力してください。&quot;
+ sMsgWrongExchangeDate = &quot;分割日以降に取引がすでに存在するので、分割できません。&quot;
+ sMsgSellTooMuch = &quot;売却できる株式数を超えています。最大値: &quot;
+ sMsgConfirm = &quot;ご確認ください&quot;
+ sMsgFreeStock = &quot;無料株式を入力しますか?&quot;
+ sMsgTotalLoss = &quot;全損の入力を行いますか?&quot;
+ sMsgAuthorization = &quot;確認ダイアログ&quot;
+ sMsgDeleteAll = &quot;すべての移動を取り消し、ポートフォリオの概要をリセットしますか?&quot;
+ cSplit = &quot;株式分割日 &quot;
+ sHistory = &quot;履歴&quot;
+ TransactTitle(1) = &quot;株を買う&quot;
+ TransactTitle(2) = &quot;株を買う&quot;
+ StockRatesTitle(1) = &quot;配当額&quot;
+ StockRatesTitle(2) = &quot;株式分割&quot;
+ StockRatesTitle(3) = sHistory
+ sDepotCurrency = &quot;ポートフォリオの通貨&quot;
+ sStockName = &quot;株式名&quot;
+ TransactMode = LIFO &apos; Possible values: &quot;FIFO&quot; and &quot;LIFO&quot;
+ DateCellStyle = &quot;結果(日付)&quot;
+ CurrCellStyle = &quot;1&quot;
+ sStartDate = &quot;開始日:&quot;
+ sEndDate = &quot;終了日:&quot;
+ sStartUpWelcome = &quot;このテンプレートを使えば、株式のポートフォリオをより効率的に管理できます。&quot;
+ sStartUpChooseMarket = &quot;まず、インターネットにより情報を更新する基準通貨と、対応する証券取引所を選択します。&quot;
+ sStartUpHint = &quot;残念ながら、&lt;History&gt; 機能を使用できるのは米国市場に限られています。&quot;
+ sStartupHint = ReplaceString(sStartUpHint, sHistory, &quot;&lt;History&gt;&quot;)
+ sNoInternetUpdate = &quot;インターネットによる情報の更新を行いません&quot;
+ sMarketPlace = &quot;証券取引所:&quot;
+ sNoInternetDataAvailable = &quot;インターネットから株価情報を受信できない場合があります!&quot;
+ sCheckInternetSettings = &quot;考えられる原因は次のとおりです。&lt;BR&gt;インターネット設定の変更が必要です。&lt;BR&gt;入力した株式のが間違っています。&quot;
+ sCheckInternetSettings = ReplaceString(sCheckInternetSettings, chr(13), &quot;&lt;BR&gt;&quot;)
+
+ sMsgEndDatebeforeNow = &quot;終了日は、今日の日付より前であることが必要です。&quot;
+ sMsgStartDatebeforeEndDate = &quot;開始日は、終了日より前であることが必要です。&quot;
+
+ sMarket(0,0) = &quot;米ドル&quot;
+ sMarket(0,1) = &quot;$&quot;
+ sMarket(0,2) = &quot;ニューヨーク&quot;
+ sMarket(0,3) = &quot;http://finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;&amp;f=sl1d1t1c1ohgv&amp;e=.csv&quot;
+ sMarket(0,4) = &quot;http://ichart.finance.yahoo.com/table.csv?&quot; &amp;_
+ &quot;s=&lt;StockID&gt;&amp;d=&lt;EndMonth&gt;&amp;e=&lt;EndDay&gt;&amp;f=&lt;Endyear&gt;&amp;g=d&amp;&quot; &amp;_
+ &quot;a=&lt;StartMonth&gt;&amp;b=&lt;StartDay&gt;&amp;c=&lt;Startyear&gt;&amp;ignore=.csv&quot;
+ sMarket(0,5) = &quot;シンボル&quot;
+ sMarket(0,6) = &quot;en&quot;
+ sMarket(0,7) = &quot;US&quot;
+ sMarket(0,8) = &quot;409&quot;
+ sMarket(0,9) = &quot;44&quot;
+ sMarket(0,10) = &quot;1&quot;
+
+ sMarket(1,0) = &quot;ユーロ&quot;
+ sMarket(1,1) = chr(8364)
+ sMarket(1,2) = &quot;フランクフルト&quot;
+ sMarket(1,3) = &quot;http://de.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;.F&amp;f=sl1t1c1ghpv&amp;e=.csv&quot;
+ sMarket(1,5) = &quot;銘柄コード&quot;
+ sMarket(1,6) = &quot;de;nl;pt;el&quot;
+ sMarket(1,7) = &quot;DE;NL;PT;GR&quot;
+ sMarket(1,8) = &quot;407;413;816;408&quot;
+ sMarket(1,9) = &quot;59/9&quot;
+ sMarket(1,10) = &quot;1&quot;
+
+ sMarket(2,0) = &quot;英ポンド&quot;
+ sMarket(2,1) = &quot;£&quot;
+ sMarket(2,2) = &quot;ロンドン&quot;
+ sMarket(2,3) = &quot;http://uk.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;.L&amp;m=*&amp;f=sl1t1c1ghov&amp;e=.csv&quot;
+ sMarket(2,5) = &quot;シンボル&quot;
+ sMarket(2,6) = &quot;en&quot;
+ sMarket(2,7) = &quot;GB&quot;
+ sMarket(2,8) = &quot;809&quot;
+ sMarket(2,9) = &quot;44&quot;
+ sMarket(2,10) = &quot;1&quot;
+
+ sMarket(3,0) = &quot;日本円&quot;
+ sMarket(3,1) = &quot;¥&quot;
+ sMarket(3,2) = &quot;東京&quot;
+ sMarket(3,3) = &quot;&quot;
+ sMarket(3,5) = &quot;コード&quot;
+ sMarket(3,6) = &quot;ja&quot;
+ sMarket(3,7) = &quot;JP&quot;
+ sMarket(3,8) = &quot;411&quot;
+ sMarket(3,9) = &quot;&quot;
+ sMarket(3,10) = &quot;&quot;
+
+ sMarket(4,0) = &quot;香港ドル&quot;
+ sMarket(4,1) = &quot;HK$&quot;
+ sMarket(4,2) = &quot;香港&quot;
+ sMarket(4,3) = &quot;http://hk.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;.HK&amp;f=sl1d1t1c1ohgv&amp;e=.csv&quot;
+ sMarket(4,5) = &quot;番号&quot;
+ sMarket(4,6) = &quot;zh&quot;
+ sMarket(4,7) = &quot;HK&quot;
+ sMarket(4,8) = &quot;C04&quot;
+ sMarket(4,9) = &quot;44&quot;
+ sMarket(4,10) = &quot;1&quot;
+
+ sMarket(5,0) = &quot;オーストリア・ドル&quot;
+ sMarket(5,1) = &quot;$&quot;
+ sMarket(5,2) = &quot;シドニー&quot;
+ sMarket(5,3) = &quot;http://au.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;&amp;f=sl1d1t1c1ohgv&amp;e=.csv&quot;
+ sMarket(5,5) = &quot;シンボル&quot;
+ sMarket(5,6) = &quot;en&quot;
+ sMarket(5,7) = &quot;AU&quot;
+ sMarket(5,8) = &quot;C09&quot;
+ sMarket(5,9) = &quot;44&quot;
+ sMarket(5,10) = &quot;1&quot;
+
+&apos; ****************************End of the default subset*********************************
+ CompleteMarketList()
+
+ LocalizedCurrencies()
+
+ With TransactModel
+ .lblStockNames.Label = sStockname
+ .lblQuantity.Label = &quot;株数&quot;
+ .lblRate.Label = &quot;価格&quot;
+ .lblDate.Label = &quot;取引日&quot;
+ .hlnCommission.Label = &quot;その他の経費n&quot;
+ .lblCommission.Label = &quot;手数料&quot;
+ .lblMinimum.Label = &quot;最低手数料&quot;
+ .lblFix.Label = &quot;固定費/諸経費&quot;
+ .cmdGoOn.Label = sOK
+ .cmdCancel.Label = sCancel
+ End With
+
+ With StockRatesModel
+ .optPerShare.Label = &quot;配当金/株式数&quot;
+ .optTotal.Label = &quot;配当金の総額&quot;
+ .lblDividend.Label = &quot;金額&quot;
+ .lblExchangeRate.Label = &quot;交換比率(旧株-&gt;新株)&quot;
+ .lblColon.Label = &quot;:&quot;
+ .lblDate.Label = &quot;交換日:&quot;
+ .lblStockNames.Label = sStockname
+ .lblStartDate.Label = sStartDate
+ .lblEndDate.Label = sEndDate
+ .optDaily.Label = &quot;~毎日&quot;
+ .optWeekly.Label = &quot;~毎週&quot;
+ .hlnInterval.Label = &quot;期間&quot;
+ .cmdGoOn.Label = sOk
+ .cmdCancel.Label = sCancel
+ End With
+End Sub
+</script:module> \ No newline at end of file
diff --git a/wizards/source/depot/Lang_ko.xba b/wizards/source/depot/Lang_ko.xba
new file mode 100644
index 000000000000..1b701dcbab67
--- /dev/null
+++ b/wizards/source/depot/Lang_ko.xba
@@ -0,0 +1,158 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Lang_ko" script:language="StarBasic">Option Explicit
+
+Sub LoadKoreanLanguage()
+
+ sProductname = GetProductname
+ sOK = &quot;~확인&quot;
+ sCancel = &quot;취소&quot;
+ sColumnHeader = &quot;열 머리글&quot;
+ sInsertStockName = &quot;주식 종목을 삽입해주십시오.&quot;
+ sTitle = &quot;&lt;PRODUCTNAME&gt;: 주식 매수&quot;
+ sTitle = ReplaceString(sTitle, sProductName, &quot;&lt;PRODUCTNAME&gt;&quot;)
+ sMsgError = &quot;입력 오류&quot;
+ sMsgNoName = sInsertStockname
+ sMsgNoQuantity = &quot;0 이하의 매수를 입력해주십시오.&quot;
+ sMsgNoDividend = &quot;한 주당 배당분 또는 총배당분을 입력해주십시오.&quot;
+ sMsgNoExchangeRate = &quot;정확한 환율을 입력해주십시오 (구주를 신주로 소급 시).&quot;
+ sMsgNoValidExchangeDate = &quot;유효한 배당 결제일을 입력해주십시오.&quot;
+ sMsgWrongExchangeDate = &quot;배당 기준일이 경과하여 배당할 수 없습니다.&quot;
+ sMsgSellTooMuch = &quot;이렇게 많은 주식을 팔 수 없습니다. 최대 매도수: &quot;
+ sMsgConfirm = &quot;확인 필요&quot;
+ sMsgFreeStock = &quot;공짜 주식을 입력하시겠습니까?&quot;
+ sMsgTotalLoss = &quot;주가 폭락세를 입력하시겠습니까?&quot;
+ sMsgAuthorization = &quot;안정성 조회&quot;
+ sMsgDeleteAll = &quot;모든 주가 움직임을 삭제하고 계좌 현황을 원래대로 하시겠습니까?&quot;
+ cSplit = &quot;주식 배당일 &quot;
+ sHistory = &quot;내역&quot;
+ TransactTitle(1) = &quot;주식 관리: 주식 매도&quot;
+ TransactTitle(2) = &quot;주식 관리: 주식 매수&quot;
+ StockRatesTitle(1) = &quot;주식 관리: 배당금 지불&quot;
+ StockRatesTitle(2) = &quot;주식 관리: 주식 배분&quot;
+ StockRatesTitle(3) = sHistory
+ sDepotCurrency = &quot;주식 계좌 통화&quot;
+ sStockName = &quot;주식 종목명&quot;
+ TransactMode = LIFO &apos; Possible values: &quot;FIFO&quot; and &quot;LIFO&quot;
+ DateCellStyle = &quot;결과, 날짜&quot;
+ CurrCellStyle = &quot;1&quot;
+ sStartDate = &quot;매매일:&quot;
+ sEndDate = &quot;만기일:&quot;
+ sStartUpWelcome = &quot;이 템플릿을 사용하여 주식 투자 관리를 효율적으로 할 수 있습니다.&quot;
+ sStartUpChooseMarket = &quot;인터넷 업데이트를 위해 우선 관련 통화와 증권 장소를 선택하십시오.&quot;
+ sStartUpHint = &quot;&lt;내역&gt; 기능은 미국 시장용으로만 사용할 수 있습니다.&quot;
+ sStartupHint = ReplaceString(sStartUpHint, sHistory, &quot;&lt;History&gt;&quot;)
+ sNoInternetUpdate = &quot;인터넷 업데이트 없음&quot;
+ sMarketPlace = &quot;증권 장소:&quot;
+ sNoInternetDataAvailable = &quot;인터넷 시세는 받을 수 없었습니다.&quot;
+ sCheckInternetSettings = &quot;원인: &lt;BR&gt; 인터넷 설정을 점검해야만 합니다.&lt;BR&gt; 옳지 않은 암호&lt;예를 들어 잘못된 문자 또는 종목 코드&gt;를 입력했습니다.&quot;
+ sCheckInternetSettings = ReplaceString(sCheckInternetSettings, chr(13), &quot;&lt;BR&gt;&quot;)
+
+ sMsgEndDatebeforeNow = &quot;만기일은 오늘 날짜 전에 기입되어야 합니다.&quot;
+ sMsgStartDatebeforeEndDate = &quot;매매일은 만기일 전에 기입되어야 합니다.&quot;
+
+ sMarket(0,0) = &quot;미국 달러&quot;
+ sMarket(0,1) = &quot;$&quot;
+ sMarket(0,2) = &quot;뉴욕&quot;
+ sMarket(0,3) = &quot;http://finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;&amp;f=sl1d1t1c1ohgv&amp;e=.csv&quot;
+ sMarket(0,4) = &quot;http://ichart.finance.yahoo.com/table.csv?&quot; &amp;_
+ &quot;s=&lt;StockID&gt;&amp;d=&lt;EndMonth&gt;&amp;e=&lt;EndDay&gt;&amp;f=&lt;Endyear&gt;&amp;g=d&amp;&quot; &amp;_
+ &quot;a=&lt;StartMonth&gt;&amp;b=&lt;StartDay&gt;&amp;c=&lt;Startyear&gt;&amp;ignore=.csv&quot;
+ sMarket(0,5) = &quot;기호&quot;
+ sMarket(0,6) = &quot;en&quot;
+ sMarket(0,7) = &quot;US&quot;
+ sMarket(0,8) = &quot;409&quot;
+ sMarket(0,9) = &quot;44&quot;
+ sMarket(0,10) = &quot;1&quot;
+
+ sMarket(1,0) = &quot;유로&quot;
+ sMarket(1,1) = chr(8364)
+ sMarket(1,2) = &quot;프랑크푸르트&quot;
+ sMarket(1,3) = &quot;http://de.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;.F&amp;f=sl1t1c1ghpv&amp;e=.csv&quot;
+ sMarket(1,5) = &quot;WKN&quot;
+ sMarket(1,6) = &quot;de;nl;pt;el&quot;
+ sMarket(1,7) = &quot;DE;NL;PT;GR&quot;
+ sMarket(1,8) = &quot;407;413;816;408&quot;
+ sMarket(1,9) = &quot;59/9&quot;
+ sMarket(1,10) = &quot;1&quot;
+
+ sMarket(2,0) = &quot;영국 파운드&quot;
+ sMarket(2,1) = &quot;£&quot;
+ sMarket(2,2) = &quot;런던&quot;
+ sMarket(2,3) = &quot;http://uk.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;.L&amp;m=*&amp;f=sl1t1c1ghov&amp;e=.csv&quot;
+ sMarket(2,5) = &quot;기호&quot;
+ sMarket(2,6) = &quot;en&quot;
+ sMarket(2,7) = &quot;GB&quot;
+ sMarket(2,8) = &quot;809&quot;
+ sMarket(2,9) = &quot;44&quot;
+ sMarket(2,10) = &quot;1&quot;
+
+ sMarket(3,0) = &quot;엔화&quot;
+ sMarket(3,1) = &quot;¥&quot;
+ sMarket(3,2) = &quot;도쿄&quot;
+ sMarket(3,3) = &quot;&quot;
+ sMarket(3,5) = &quot;코드&quot;
+ sMarket(3,6) = &quot;ja&quot;
+ sMarket(3,7) = &quot;JP&quot;
+ sMarket(3,8) = &quot;411&quot;
+ sMarket(3,9) = &quot;&quot;
+ sMarket(3,10) = &quot;&quot;
+
+ sMarket(4,0) = &quot;홍콩 달러&quot;
+ sMarket(4,1) = &quot;HK$&quot;
+ sMarket(4,2) = &quot;홍콩&quot;
+ sMarket(4,3) = &quot;http://hk.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;.HK&amp;f=sl1d1t1c1ohgv&amp;e=.csv&quot;
+ sMarket(4,5) = &quot;번호&quot;
+ sMarket(4,6) = &quot;zh&quot;
+ sMarket(4,7) = &quot;HK&quot;
+ sMarket(4,8) = &quot;C04&quot;
+ sMarket(4,9) = &quot;44&quot;
+ sMarket(4,10) = &quot;1&quot;
+
+ sMarket(5,0) = &quot;호주 달러&quot;
+ sMarket(5,1) = &quot;$&quot;
+ sMarket(5,2) = &quot;시드니&quot;
+ sMarket(5,3) = &quot;http://au.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;&amp;f=sl1d1t1c1ohgv&amp;e=.csv&quot;
+ sMarket(5,5) = &quot;기호&quot;
+ sMarket(5,6) = &quot;en&quot;
+ sMarket(5,7) = &quot;AU&quot;
+ sMarket(5,8) = &quot;C09&quot;
+ sMarket(5,9) = &quot;44&quot;
+ sMarket(5,10) = &quot;1&quot;
+
+&apos; ****************************End of the default subset*********************************
+ CompleteMarketList()
+
+ LocalizedCurrencies()
+
+ With TransactModel
+ .lblStockNames.Label = sStockname
+ .lblQuantity.Label = &quot;수량&quot;
+ .lblRate.Label = &quot;시세&quot;
+ .lblDate.Label = &quot;배당 결산일&quot;
+ .hlnCommission.Label = &quot;기타 지출&quot;
+ .lblCommission.Label = &quot;수수료&quot;
+ .lblMinimum.Label = &quot;최저 수수료&quot;
+ .lblFix.Label = &quot;약정 금액/기타 경비&quot;
+ .cmdGoOn.Label = sOK
+ .cmdCancel.Label = sCancel
+ End With
+
+ With StockRatesModel
+ .optPerShare.Label = &quot;배당분/주&quot;
+ .optTotal.Label = &quot;배당분 합계&quot;
+ .lblDividend.Label = &quot;금액&quot;
+ .lblExchangeRate.Label = &quot;환율(구주-&gt;신주)&quot;
+ .lblColon.Label = &quot;:&quot;
+ .lblDate.Label = &quot;환율일자&quot;
+ .lblStockNames.Label = sStockname
+ .lblStartDate.Label = sStartDate
+ .lblEndDate.Label = sEndDate
+ .optDaily.Label = &quot;~매일&quot;
+ .optWeekly.Label = &quot;~매주&quot;
+ .hlnInterval.Label = &quot;기간&quot;
+ .cmdGoOn.Label = sOk
+ .cmdCancel.Label = sCancel
+ End With
+End Sub
+</script:module> \ No newline at end of file
diff --git a/wizards/source/depot/Lang_sv.xba b/wizards/source/depot/Lang_sv.xba
new file mode 100644
index 000000000000..bbfe930b60ca
--- /dev/null
+++ b/wizards/source/depot/Lang_sv.xba
@@ -0,0 +1,157 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Lang_sv" script:language="StarBasic">Option Explicit
+
+Sub LoadSwedishLanguage()
+ sProductname = GetProductname
+ sOK = &quot;~OK&quot;
+ sCancel = &quot;Avbryt&quot;
+ sColumnHeader = &quot;Kolumnhuvud&quot;
+ sInsertStockName = &quot;Infoga först några aktier i Din portfölj!&quot;
+ sTitle = &quot;&lt;PRODUCTNAME&gt;: Aktieförvaltning&quot;
+ sTitle = ReplaceString(sTitle, sProductName, &quot;&lt;PRODUCTNAME&gt;&quot;)
+ sMsgError = &quot;Inmatningsfel&quot;
+ sMsgNoName = sInsertStockname
+ sMsgNoQuantity = &quot;Var vänlig och mata in ett större antal än 0&quot;
+ sMsgNoDividend = &quot;Var vänlig och mata in utdelning per styck eller den totala utdelningen&quot;
+ sMsgNoExchangeRate = &quot;Var vänlig och mata in en korrekt omräkningskurs (gamla aktier -&gt; nya aktier).&quot;
+ sMsgNoValidExchangeDate = &quot;Var vänlig och mata in ett giltigt datum för aktiesplitten.&quot;
+ sMsgWrongExchangeDate = &quot;Split är inte möjlig eftersom det redan finns transaktioner efter splitdatum.&quot;
+ sMsgSellTooMuch = &quot;Så många aktier kan Du inte sälja. Maximum: &quot;
+ sMsgConfirm = &quot;Bekräftelse krävs&quot;
+ sMsgFreeStock = &quot;Avser Du att mata in gratisaktier?&quot;
+ sMsgTotalLoss = &quot;Avser Du att mata in en totalförlust?&quot;
+ sMsgAuthorization = &quot;Säkerhetskontroll&quot;
+ sMsgDeleteAll = &quot;Vill Du ta bort alla rörelser och återställa portföljöversikten?&quot;
+ cSplit = &quot;Aktiesplit den &quot;
+ sHistory = &quot;Historik&quot;
+ TransactTitle(1) = &quot;Sälja aktier&quot;
+ TransactTitle(2) = &quot;Köpa aktier&quot;
+ StockRatesTitle(1) = &quot;Aktieutdelning&quot;
+ StockRatesTitle(2) = &quot;Aktiesplit&quot;
+ StockRatesTitle(3) = sHistory
+ sDepotCurrency = &quot;Portföljvaluta&quot;
+ sStockName = &quot;Aktienamn&quot;
+ TransactMode = LIFO &apos; Possible values: &quot;FIFO&quot; and &quot;LIFO&quot;
+ DateCellStyle = &quot;Resultat datum&quot;
+ CurrCellStyle = &quot;1&quot;
+ sStartDate = &quot;Startdatum:&quot;
+ sEndDate = &quot;Slutdatum:&quot;
+ sStartUpWelcome = &quot;Med hjälp av den här mallen kan Du förvalta Din aktieportfölj effektivt&quot;
+ sStartUpChooseMarket = &quot;Välj först Din referensvaluta och därigenom börs för Internet-uppdateringen!&quot;
+ sStartUpHint = &quot;Tyvärr är &lt;History&gt;-funktionen bara tillgänglig för den amerikanska marknaden!&quot;
+ sStartupHint = ReplaceString(sStartUpHint, sHistory, &quot;&lt;History&gt;&quot;)
+ sNoInternetUpdate = &quot;utan Internet-uppdatering&quot;
+ sMarketPlace = &quot;Börs:&quot;
+ sNoInternetDataAvailable = &quot;Det gick inte att ta emot Internet-kurser!&quot;
+ sCheckInternetSettings = &quot;Detta kan bero på att: &lt;BR&gt; Dina Internet-inställningar måste ändras.&lt;BR&gt; Du har angivit ett felaktigt ID (t.ex. symbol, värdepappersnr.) för aktien.&quot;
+ sCheckInternetSettings = ReplaceString(sCheckInternetSettings, chr(13), &quot;&lt;BR&gt;&quot;)
+
+ sMsgEndDatebeforeNow = &quot;Slutdatum måste ligga före idag!&quot;
+ sMsgStartDatebeforeEndDate = &quot;Startdatum måste ligga före slutdatum!&quot;
+
+ sMarket(0,0) = &quot;Amerikansk dollar&quot;
+ sMarket(0,1) = &quot;$&quot;
+ sMarket(0,2) = &quot;New York&quot;
+ sMarket(0,3) = &quot;http://finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;&amp;f=sl1d1t1c1ohgv&amp;e=.csv&quot;
+ sMarket(0,4) = &quot;http://ichart.finance.yahoo.com/table.csv?&quot; &amp;_
+ &quot;s=&lt;StockID&gt;&amp;d=&lt;EndMonth&gt;&amp;e=&lt;EndDay&gt;&amp;f=&lt;Endyear&gt;&amp;g=d&amp;&quot; &amp;_
+ &quot;a=&lt;StartMonth&gt;&amp;b=&lt;StartDay&gt;&amp;c=&lt;Startyear&gt;&amp;ignore=.csv&quot;
+ sMarket(0,5) = &quot;Symbol&quot;
+ sMarket(0,6) = &quot;en&quot;
+ sMarket(0,7) = &quot;US&quot;
+ sMarket(0,8) = &quot;409&quot;
+ sMarket(0,9) = &quot;44&quot;
+ sMarket(0,10) = &quot;1&quot;
+
+ sMarket(1,0) = &quot;Euro&quot;
+ sMarket(1,1) = chr(8364)
+ sMarket(1,2) = &quot;Frankfurt&quot;
+ sMarket(1,3) = &quot;http://de.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;.F&amp;f=sl1t1c1ghpv&amp;e=.csv&quot;
+ sMarket(1,5) = &quot;Värdepappersnr&quot;
+ sMarket(1,6) = &quot;de;nl;pt;el&quot;
+ sMarket(1,7) = &quot;DE;NL;PT;GR&quot;
+ sMarket(1,8) = &quot;407;413;816;408&quot;
+ sMarket(1,9) = &quot;59/9&quot;
+ sMarket(1,10) = &quot;1&quot;
+
+ sMarket(2,0) = &quot;Engelskt pund&quot;
+ sMarket(2,1) = &quot;£&quot;
+ sMarket(2,2) = &quot;London&quot;
+ sMarket(2,3) = &quot;http://uk.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;.L&amp;m=*&amp;f=sl1t1c1ghov&amp;e=.csv&quot;
+ sMarket(2,5) = &quot;Symbol&quot;
+ sMarket(2,6) = &quot;en&quot;
+ sMarket(2,7) = &quot;GB&quot;
+ sMarket(2,8) = &quot;809&quot;
+ sMarket(2,9) = &quot;44&quot;
+ sMarket(2,10) = &quot;1&quot;
+
+ sMarket(3,0) = &quot;Japansk yen&quot;
+ sMarket(3,1) = &quot;¥&quot;
+ sMarket(3,2) = &quot;Tokyo&quot;
+ sMarket(3,3) = &quot;&quot;
+ sMarket(3,5) = &quot;Kod&quot;
+ sMarket(3,6) = &quot;ja&quot;
+ sMarket(3,7) = &quot;JP&quot;
+ sMarket(3,8) = &quot;411&quot;
+ sMarket(3,9) = &quot;&quot;
+ sMarket(3,10) = &quot;&quot;
+
+ sMarket(4,0) = &quot;Hongkongdollar&quot;
+ sMarket(4,1) = &quot;HK$&quot;
+ sMarket(4,2) = &quot;Hongkong&quot;
+ sMarket(4,3) = &quot;http://hk.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;&amp;f=sl1d1t1c1ohgv&amp;e=.csv&quot;
+ sMarket(4,5) = &quot;Nummer&quot;
+ sMarket(4,6) = &quot;zh&quot;
+ sMarket(4,7) = &quot;HK&quot;
+ sMarket(4,8) = &quot;C04&quot;
+ sMarket(4,9) = &quot;44&quot;
+ sMarket(4,10) = &quot;1&quot;
+
+ sMarket(5,0) = &quot;Australisk dollar&quot;
+ sMarket(5,1) = &quot;$&quot;
+ sMarket(5,2) = &quot;Sydney&quot;
+ sMarket(5,3) = &quot;http://au.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;&amp;f=sl1d1t1c1ohgv&amp;e=.csv&quot;
+ sMarket(5,5) = &quot;Symbol&quot;
+ sMarket(5,6) = &quot;en&quot;
+ sMarket(5,7) = &quot;AU&quot;
+ sMarket(5,8) = &quot;C09&quot;
+ sMarket(5,9) = &quot;44&quot;
+ sMarket(5,10) = &quot;1&quot;
+
+&apos; ****************************End of the default subset*********************************
+ CompleteMarketList()
+
+ LocalizedCurrencies()
+
+ With TransactModel
+ .lblStockNames.Label = sStockname
+ .lblQuantity.Label = &quot;Antal&quot;
+ .lblRate.Label = &quot;Kurs&quot;
+ .lblDate.Label = &quot;Transaktionsdatum&quot;
+ .hlnCommission.Label = &quot;Övriga utgifter&quot;
+ .lblCommission.Label = &quot;Provision&quot;
+ .lblMinimum.Label = &quot;Minimiprovision&quot;
+ .lblFix.Label = &quot;Fast belopp/omkostnader&quot;
+ .cmdGoOn.Label = sOK
+ .cmdCancel.Label = sCancel
+ End With
+
+ With StockRatesModel
+ .optPerShare.Label = &quot;Utdelning per aktie&quot;
+ .optTotal.Label = &quot;Utdelning totalt&quot;
+ .lblDividend.Label = &quot;Belopp&quot;
+ .lblExchangeRate.Label = &quot;Omräkningskurs (gammal-&gt;ny)&quot;
+ .lblColon.Label = &quot;:&quot;
+ .lblDate.Label = &quot;Omräkningsdatum:&quot;
+ .lblStockNames.Label = sStockname
+ .lblStartDate.Label = sStartDate
+ .lblEndDate.Label = sEndDate
+ .optDaily.Label = &quot;~Dagligen&quot;
+ .optWeekly.Label = &quot;~Varje vecka&quot;
+ .hlnInterval.Label = &quot;Period&quot;
+ .cmdGoOn.Label = sOk
+ .cmdCancel.Label = sCancel
+ End With
+End Sub
+</script:module> \ No newline at end of file
diff --git a/wizards/source/depot/Lang_tw.xba b/wizards/source/depot/Lang_tw.xba
new file mode 100644
index 000000000000..fbe54a413132
--- /dev/null
+++ b/wizards/source/depot/Lang_tw.xba
@@ -0,0 +1,158 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Lang_tw" script:language="StarBasic">Option Explicit
+
+Sub LoadChineseTradLanguage()
+
+ sProductname = GetProductname
+ sOK = &quot;確定&quot;
+ sCancel = &quot;取消&quot;
+ sColumnHeader = &quot;欄標簽&quot;
+ sInsertStockName = &quot;請先填入股票名稱!&quot;
+ sTitle = &quot;&lt;PRODUCTNAME&gt;: 股票管理&quot;
+ sTitle = ReplaceString(sTitle, sProductName, &quot;&lt;PRODUCTNAME&gt;&quot;)
+ sMsgError = &quot;輸入無效&quot;
+ sMsgNoName = sInsertStockname
+ sMsgNoQuantity = &quot;請輸入大於0的交易股數&quot;
+ sMsgNoDividend = &quot;請輸入每股股息金額或股息總額&quot;
+ sMsgNoExchangeRate = &quot;請鍵入正確的換算比率(舊股票 -&gt; 新股票)。&quot;
+ sMsgNoValidExchangeDate = &quot;請輸入股票分割的日期。&quot;
+ sMsgWrongExchangeDate = &quot;無法分割股票,因為分割日期之後已經買進或賣出股票。&quot;
+ sMsgSellTooMuch = &quot;最多能出售的股票數: &quot;
+ sMsgConfirm = &quot;需要确認&quot;
+ sMsgFreeStock = &quot;需要輸入一個贈送的股票?&quot;
+ sMsgTotalLoss = &quot;要輸入一個全部損失的股票?&quot;
+ sMsgAuthorization = &quot;安全詢問&quot;
+ sMsgDeleteAll = &quot;您要刪除所有的交易資料,重新建立一個股票一覽表?&quot;
+ cSplit = &quot;股票分割的日期 &quot;
+ sHistory = &quot;紀錄&quot;
+ TransactTitle(1) = &quot;出售股票&quot;
+ TransactTitle(2) = &quot;購買股票&quot;
+ StockRatesTitle(1) = &quot;支付股息&quot;
+ StockRatesTitle(2) = &quot;股票分割&quot;
+ StockRatesTitle(3) = sHistory
+ sDepotCurrency = &quot;股票的貨幣&quot;
+ sStockName = &quot;股票名稱&quot;
+ TransactMode = LIFO &apos; Possible values: &quot;FIFO&quot; and &quot;LIFO&quot;
+ DateCellStyle = &quot;結果 日期&quot;
+ CurrCellStyle = &quot;1&quot;
+ sStartDate = &quot;交割日期:&quot;
+ sEndDate = &quot;到期日期:&quot;
+ sStartUpWelcome = &quot;這個樣式用於高效能地管理股票交易。&quot;
+ sStartUpChooseMarket = &quot;請先選一個參照的貨幣和一個可直接從 Internet 更新資料的贈券交易所。&quot;
+ sStartUpHint = &quot;很遺憾,&lt;History&gt;-功能僅適用於美國的交易所。&quot;
+ sStartupHint = ReplaceString(sStartUpHint, sHistory, &quot;&lt;History&gt;&quot;)
+ sNoInternetUpdate = &quot;不透過 internet 更新&quot;
+ sMarketPlace = &quot;證券交易所:&quot;
+ sNoInternetDataAvailable = &quot;無法接受 Internet 股票價格!&quot;
+ sCheckInternetSettings = &quot;可能的原因:&lt;BR&gt;Internet 設定不正確,需要重新設定。&lt;BR&gt;輸入了一個錯誤的股票代碼。&quot;
+ sCheckInternetSettings = ReplaceString(sCheckInternetSettings, chr(13), &quot;&lt;BR&gt;&quot;)
+
+ sMsgEndDatebeforeNow = &quot;到期日期必須是在今日之前!&quot;
+ sMsgStartDatebeforeEndDate = &quot;交割日期必須是在到期日期之前!&quot;
+
+ sMarket(0,0) = &quot;美元&quot;
+ sMarket(0,1) = &quot;$&quot;
+ sMarket(0,2) = &quot;紐約&quot;
+ sMarket(0,3) = &quot;http://finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;&amp;f=sl1d1t1c1ohgv&amp;e=.csv&quot;
+ sMarket(0,4) = &quot;http://ichart.finance.yahoo.com/table.csv?&quot; &amp;_
+ &quot;s=&lt;StockID&gt;&amp;d=&lt;EndMonth&gt;&amp;e=&lt;EndDay&gt;&amp;f=&lt;Endyear&gt;&amp;g=d&amp;&quot; &amp;_
+ &quot;a=&lt;StartMonth&gt;&amp;b=&lt;StartDay&gt;&amp;c=&lt;Startyear&gt;&amp;ignore=.csv&quot;
+ sMarket(0,5) = &quot;股票符號&quot;
+ sMarket(0,6) = &quot;en&quot;
+ sMarket(0,7) = &quot;US&quot;
+ sMarket(0,8) = &quot;409&quot;
+ sMarket(0,9) = &quot;44&quot;
+ sMarket(0,10) = &quot;1&quot;
+
+ sMarket(1,0) = &quot;歐元&quot;
+ sMarket(1,1) = chr(8364)
+ sMarket(1,2) = &quot;法蘭克福&quot;
+ sMarket(1,3) = &quot;http://de.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;.F&amp;f=sl1t1c1ghpv&amp;e=.csv&quot;
+ sMarket(1,5) = &quot;股代碼&quot;
+ sMarket(1,6) = &quot;de;nl;pt;el&quot;
+ sMarket(1,7) = &quot;DE;NL;PT;GR&quot;
+ sMarket(1,8) = &quot;407;413;816;408&quot;
+ sMarket(1,9) = &quot;59/9&quot;
+ sMarket(1,10) = &quot;1&quot;
+
+ sMarket(2,0) = &quot;英鎊&quot;
+ sMarket(2,1) = &quot;£&quot;
+ sMarket(2,2) = &quot;倫敦&quot;
+ sMarket(2,3) = &quot;http://uk.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;.L&amp;m=*&amp;f=sl1t1c1ghov&amp;e=.csv&quot;
+ sMarket(2,5) = &quot;股票符號&quot;
+ sMarket(2,6) = &quot;en&quot;
+ sMarket(2,7) = &quot;GB&quot;
+ sMarket(2,8) = &quot;809&quot;
+ sMarket(2,9) = &quot;44&quot;
+ sMarket(2,10) = &quot;1&quot;
+
+ sMarket(3,0) = &quot;日元&quot;
+ sMarket(3,1) = &quot;¥&quot;
+ sMarket(3,2) = &quot;東京&quot;
+ sMarket(3,3) = &quot;&quot;
+ sMarket(3,5) = &quot;代碼&quot;
+ sMarket(3,6) = &quot;ja&quot;
+ sMarket(3,7) = &quot;JP&quot;
+ sMarket(3,8) = &quot;411&quot;
+ sMarket(3,9) = &quot;&quot;
+ sMarket(3,10) = &quot;&quot;
+
+ sMarket(4,0) = &quot;港幣&quot;
+ sMarket(4,1) = &quot;HK$&quot;
+ sMarket(4,2) = &quot;香港&quot;
+ sMarket(4,3) = &quot;http://hk.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;.HK&amp;f=sl1d1t1c1ohgv&amp;e=.csv&quot;
+ sMarket(4,5) = &quot;編號&quot;
+ sMarket(4,6) = &quot;zh&quot;
+ sMarket(4,7) = &quot;HK&quot;
+ sMarket(4,8) = &quot;C04&quot;
+ sMarket(4,9) = &quot;44&quot;
+ sMarket(4,10) = &quot;1&quot;
+
+ sMarket(5,0) = &quot;澳元&quot;
+ sMarket(5,1) = &quot;$&quot;
+ sMarket(5,2) = &quot;悉尼&quot;
+ sMarket(5,3) = &quot;http://au.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;&amp;f=sl1d1t1c1ohgv&amp;e=.csv&quot;
+ sMarket(5,5) = &quot;股票符號&quot;
+ sMarket(5,6) = &quot;en&quot;
+ sMarket(5,7) = &quot;AU&quot;
+ sMarket(5,8) = &quot;C09&quot;
+ sMarket(5,9) = &quot;44&quot;
+ sMarket(5,10) = &quot;1&quot;
+
+&apos; ****************************End of the default subset*********************************
+ CompleteMarketList()
+
+ LocalizedCurrencies()
+
+ With TransactModel
+ .lblStockNames.Label = sStockname
+ .lblQuantity.Label = &quot;數量&quot;
+ .lblRate.Label = &quot;股票價格&quot;
+ .lblDate.Label = &quot;交易日期&quot;
+ .hlnCommission.Label = &quot;其它的支出費用&quot;
+ .lblCommission.Label = &quot;手續費&quot;
+ .lblMinimum.Label = &quot;最低手續費&quot;
+ .lblFix.Label = &quot;固定金額/費用&quot;
+ .cmdGoOn.Label = sOK
+ .cmdCancel.Label = sCancel
+ End With
+
+ With StockRatesModel
+ .optPerShare.Label = &quot;每股股息&quot;
+ .optTotal.Label = &quot;股息總計&quot;
+ .lblDividend.Label = &quot;金額&quot;
+ .lblExchangeRate.Label = &quot;轉換比率(舊股票 -&gt; 新股票)&quot;
+ .lblColon.Label = &quot;:&quot;
+ .lblDate.Label = &quot;轉換日期:&quot;
+ .lblStockNames.Label = sStockname
+ .lblStartDate.Label = sStartDate
+ .lblEndDate.Label = sEndDate
+ .optDaily.Label = &quot;每日&quot;
+ .optWeekly.Label = &quot;每週&quot;
+ .hlnInterval.Label = &quot;時間週期&quot;
+ .cmdGoOn.Label = sOk
+ .cmdCancel.Label = sCancel
+ End With
+End Sub
+</script:module> \ No newline at end of file
diff --git a/wizards/source/depot/Lang_zh.xba b/wizards/source/depot/Lang_zh.xba
new file mode 100644
index 000000000000..94e05bfe5ecd
--- /dev/null
+++ b/wizards/source/depot/Lang_zh.xba
@@ -0,0 +1,158 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Lang_zh" script:language="StarBasic">Option Explicit
+
+Sub LoadChineseSimpleLanguage()
+
+ sProductname = GetProductname
+ sOK = &quot;确定&quot;
+ sCancel = &quot;取消&quot;
+ sColumnHeader = &quot;列标题&quot;
+ sInsertStockName = &quot;请首先往您的帐号内输入一些股票名称!&quot;
+ sTitle = &quot;&lt;PRODUCTNAME&gt;:股票管理&quot;
+ sTitle = ReplaceString(sTitle, sProductName, &quot;&lt;PRODUCTNAME&gt;&quot;)
+ sMsgError = &quot;输入错误&quot;
+ sMsgNoName = sInsertStockname
+ sMsgNoQuantity = &quot;请输入大于0的交易股数&quot;
+ sMsgNoDividend = &quot;请输入每股的红利金额或红利总额&quot;
+ sMsgNoExchangeRate = &quot;请输入一个正确的兑换率(旧股-&gt; 新股)。&quot;
+ sMsgNoValidExchangeDate = &quot;请输入拆股生效日期。&quot;
+ sMsgWrongExchangeDate = &quot;因为在拆股生效后已经进行了股票交易,所以无法拆股。&quot;
+ sMsgSellTooMuch = &quot;您最多能出售的股票数为: &quot;
+ sMsgConfirm = &quot;需要确认&quot;
+ sMsgFreeStock = &quot;您想要输入赠送股票?&quot;
+ sMsgTotalLoss = &quot;您想要输入总亏损值?&quot;
+ sMsgAuthorization = &quot;安全查询&quot;
+ sMsgDeleteAll = &quot;您要删除所有的交易信息并重新建立股票帐号一览表吗?&quot;
+ cSplit = &quot;股票拆股日期 &quot;
+ sHistory = &quot;记录&quot;
+ TransactTitle(1) = &quot;出售股票&quot;
+ TransactTitle(2) = &quot;购买股票&quot;
+ StockRatesTitle(1) = &quot;支付红利&quot;
+ StockRatesTitle(2) = &quot;股票拆股&quot;
+ StockRatesTitle(3) = sHistory
+ sDepotCurrency = &quot;股票交易的货币&quot;
+ sStockName = &quot;股票名称&quot;
+ TransactMode = LIFO &apos; Possible values: &quot;FIFO&quot; and &quot;LIFO&quot;
+ DateCellStyle = &quot;结果 日期&quot;
+ CurrCellStyle = &quot;1&quot;
+ sStartDate = &quot;起始日期:&quot;
+ sEndDate = &quot;终止日期:&quot;
+ sStartUpWelcome = &quot;这个样式能够帮助您有效地管理自己的股票帐号&quot;
+ sStartUpChooseMarket = &quot;请首先选择采用的参考货币以及要直接用国际互联网来更新资料的证券交易所!&quot;
+ sStartUpHint = &quot;很遗憾,&lt;History&gt;功能仅可供美国市场使用!&quot;
+ sStartupHint = ReplaceString(sStartUpHint, sHistory, &quot;&lt;History&gt;&quot;)
+ sNoInternetUpdate = &quot;不通过国际互联网更新&quot;
+ sMarketPlace = &quot;交易所:&quot;
+ sNoInternetDataAvailable = &quot;无法获得国际互联网上的行情!&quot;
+ sCheckInternetSettings = &quot;可能的原因是:&lt;BR&gt;您的国际互联网设定不正确,需要重新设定。&lt;BR&gt;输入了一个错误的股票号码。&quot;
+ sCheckInternetSettings = ReplaceString(sCheckInternetSettings, chr(13), &quot;&lt;BR&gt;&quot;)
+
+ sMsgEndDatebeforeNow = &quot;终止日期必须在今天之前!&quot;
+ sMsgStartDatebeforeEndDate = &quot;起始日期必须在终止日期之前!&quot;
+
+ sMarket(0,0) = &quot;美元&quot;
+ sMarket(0,1) = &quot;$&quot;
+ sMarket(0,2) = &quot;纽约&quot;
+ sMarket(0,3) = &quot;http://finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;&amp;f=sl1d1t1c1ohgv&amp;e=.csv&quot;
+ sMarket(0,4) = &quot;http://ichart.finance.yahoo.com/table.csv?&quot; &amp;_
+ &quot;s=&lt;StockID&gt;&amp;d=&lt;EndMonth&gt;&amp;e=&lt;EndDay&gt;&amp;f=&lt;Endyear&gt;&amp;g=d&amp;&quot; &amp;_
+ &quot;a=&lt;StartMonth&gt;&amp;b=&lt;StartDay&gt;&amp;c=&lt;Startyear&gt;&amp;ignore=.csv&quot;
+ sMarket(0,5) = &quot;图标&quot;
+ sMarket(0,6) = &quot;en&quot;
+ sMarket(0,7) = &quot;US&quot;
+ sMarket(0,8) = &quot;409&quot;
+ sMarket(0,9) = &quot;44&quot;
+ sMarket(0,10) = &quot;1&quot;
+
+ sMarket(1,0) = &quot;欧元&quot;
+ sMarket(1,1) = chr(8364)
+ sMarket(1,2) = &quot;法兰克福&quot;
+ sMarket(1,3) = &quot;http://de.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;.F&amp;f=sl1t1c1ghpv&amp;e=.csv&quot;
+ sMarket(1,5) = &quot;代码&quot;
+ sMarket(1,6) = &quot;de;nl;pt;el&quot;
+ sMarket(1,7) = &quot;DE;NL;PT;GR&quot;
+ sMarket(1,8) = &quot;407;413;816;408&quot;
+ sMarket(1,9) = &quot;59/9&quot;
+ sMarket(1,10) = &quot;1&quot;
+
+ sMarket(2,0) = &quot;英镑&quot;
+ sMarket(2,1) = &quot;£&quot;
+ sMarket(2,2) = &quot;伦敦&quot;
+ sMarket(2,3) = &quot;http://uk.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;.L&amp;m=*&amp;f=sl1t1c1ghov&amp;e=.csv&quot;
+ sMarket(2,5) = &quot;股票代码&quot;
+ sMarket(2,6) = &quot;en&quot;
+ sMarket(2,7) = &quot;GB&quot;
+ sMarket(2,8) = &quot;809&quot;
+ sMarket(2,9) = &quot;44&quot;
+ sMarket(2,10) = &quot;1&quot;
+
+ sMarket(3,0) = &quot;日元&quot;
+ sMarket(3,1) = &quot;¥&quot;
+ sMarket(3,2) = &quot;东京&quot;
+ sMarket(3,3) = &quot;&quot;
+ sMarket(3,5) = &quot;代码&quot;
+ sMarket(3,6) = &quot;ja&quot;
+ sMarket(3,7) = &quot;JP&quot;
+ sMarket(3,8) = &quot;411&quot;
+ sMarket(3,9) = &quot;&quot;
+ sMarket(3,10) = &quot;&quot;
+
+ sMarket(4,0) = &quot;港币&quot;
+ sMarket(4,1) = &quot;HK$&quot;
+ sMarket(4,2) = &quot;香港&quot;
+ sMarket(4,3) = &quot;http://hk.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;.HK&amp;f=sl1d1t1c1ohgv&amp;e=.csv&quot;
+ sMarket(4,5) = &quot;编号&quot;
+ sMarket(4,6) = &quot;zh&quot;
+ sMarket(4,7) = &quot;HK&quot;
+ sMarket(4,8) = &quot;C04&quot;
+ sMarket(4,9) = &quot;44&quot;
+ sMarket(4,10) = &quot;1&quot;
+
+ sMarket(5,0) = &quot;澳元&quot;
+ sMarket(5,1) = &quot;$&quot;
+ sMarket(5,2) = &quot;悉尼&quot;
+ sMarket(5,3) = &quot;http://au.finance.yahoo.com/d/quotes.csv?s=&lt;StockID&gt;&amp;f=sl1d1t1c1ohgv&amp;e=.csv&quot;
+ sMarket(5,5) = &quot;股票代码&quot;
+ sMarket(5,6) = &quot;en&quot;
+ sMarket(5,7) = &quot;AU&quot;
+ sMarket(5,8) = &quot;C09&quot;
+ sMarket(5,9) = &quot;44&quot;
+ sMarket(5,10) = &quot;1&quot;
+
+&apos; ****************************End of the default subset*********************************
+ CompleteMarketList()
+
+ LocalizedCurrencies()
+
+ With TransactModel
+ .lblStockNames.Label = sStockname
+ .lblQuantity.Label = &quot;数量&quot;
+ .lblRate.Label = &quot;股票牌价&quot;
+ .lblDate.Label = &quot;交易日期&quot;
+ .hlnCommission.Label = &quot;其它支出费用&quot;
+ .lblCommission.Label = &quot;手续费&quot;
+ .lblMinimum.Label = &quot;最低手续费&quot;
+ .lblFix.Label = &quot;固定金额/费用&quot;
+ .cmdGoOn.Label = sOK
+ .cmdCancel.Label = sCancel
+ End With
+
+ With StockRatesModel
+ .optPerShare.Label = &quot;每股红利&quot;
+ .optTotal.Label = &quot;红利总计&quot;
+ .lblDividend.Label = &quot;金额&quot;
+ .lblExchangeRate.Label = &quot;兑换率(旧-&gt;新)&quot;
+ .lblColon.Label = &quot;:&quot;
+ .lblDate.Label = &quot;兑换日期:&quot;
+ .lblStockNames.Label = sStockname
+ .lblStartDate.Label = sStartDate
+ .lblEndDate.Label = sEndDate
+ .optDaily.Label = &quot;每天&quot;
+ .optWeekly.Label = &quot;每周&quot;
+ .hlnInterval.Label = &quot;时间周期&quot;
+ .cmdGoOn.Label = sOk
+ .cmdCancel.Label = sCancel
+ End With
+End Sub
+</script:module> \ No newline at end of file
diff --git a/wizards/source/depot/delzip b/wizards/source/depot/delzip
new file mode 100644
index 000000000000..636fda90bfcb
--- /dev/null
+++ b/wizards/source/depot/delzip
@@ -0,0 +1 @@
+ECHO is OFF
diff --git a/wizards/source/depot/dialog.xlb b/wizards/source/depot/dialog.xlb
new file mode 100644
index 000000000000..764ea3f35335
--- /dev/null
+++ b/wizards/source/depot/dialog.xlb
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="Depot" library:readonly="true" library:passwordprotected="false">
+ <library:element library:name="Dialog2"/>
+ <library:element library:name="Dialog3"/>
+ <library:element library:name="Dialog4"/>
+</library:library>
diff --git a/wizards/source/depot/makefile.mk b/wizards/source/depot/makefile.mk
new file mode 100644
index 000000000000..2049b6a173a0
--- /dev/null
+++ b/wizards/source/depot/makefile.mk
@@ -0,0 +1,53 @@
+#*************************************************************************
+#
+# 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.
+#
+#*************************************************************************
+PRJ=..$/..
+
+PRJNAME=wizards
+TARGET=depotall
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+.INCLUDE : $(PRJ)$/util$/target.pmk
+
+# --- Files --------------------------------------------------------
+
+#
+# testresource.
+#
+# SRS2NAME = depot
+# SRC2FILES= webwizar.src
+# RESLIB2SRSFILES= $(SRS)$/webwizar.srs
+# RESLIB2NAME= wwz
+
+ZIP1TARGET = $(DEPOT_ALL_TARGET)
+ZIP1LIST = *.xdl *.xba *.xlb
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
+
diff --git a/wizards/source/depot/script.xlb b/wizards/source/depot/script.xlb
new file mode 100644
index 000000000000..372665b22760
--- /dev/null
+++ b/wizards/source/depot/script.xlb
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="Depot" library:readonly="true" library:passwordprotected="false">
+ <library:element library:name="Depot"/>
+ <library:element library:name="CommonLang"/>
+ <library:element library:name="Currency"/>
+ <library:element library:name="Internet"/>
+ <library:element library:name="Lang_de"/>
+ <library:element library:name="tools"/>
+ <library:element library:name="Lang_en"/>
+ <library:element library:name="Lang_fr"/>
+ <library:element library:name="Lang_it"/>
+ <library:element library:name="Lang_es"/>
+ <library:element library:name="Lang_sv"/>
+ <library:element library:name="Lang_zh"/>
+ <library:element library:name="Lang_tw"/>
+ <library:element library:name="Lang_ko"/>
+ <library:element library:name="Lang_ja"/>
+</library:library>
diff --git a/wizards/source/depot/tools.xba b/wizards/source/depot/tools.xba
new file mode 100644
index 000000000000..6399805419ee
--- /dev/null
+++ b/wizards/source/depot/tools.xba
@@ -0,0 +1,200 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="tools" script:language="StarBasic">REM ***** BASIC *****
+Option Explicit
+
+Sub RemoveSheet()
+ If oSheets.HasbyName(&quot;Link&quot;) then
+ oSheets.RemovebyName(&quot;Link&quot;)
+ End If
+End Sub
+
+
+Sub InitializeStatusLine(StatusText as String, MaxValue as Integer, FirstValue as Integer)
+ oStatusline = oDocument.GetCurrentController.GetFrame.CreateStatusIndicator()
+ oStatusLine.Start(StatusText, MaxValue)
+ oStatusline.SetValue(FirstValue)
+End Sub
+
+
+Sub MakeRangeVisible(oSheet as Object, RangeName as String, BIsVisible as Boolean)
+Dim oRangeAddress, oColumns as Object
+Dim i, iStartColumn, iEndColumn as Integer
+ oRangeAddress = oSheet.GetCellRangeByName(RangeName).RangeAddress
+ iStartColumn = oRangeAddress.StartColumn
+ iEndColumn = oRangeAddress.EndColumn
+ oColumns = oSheet.Columns
+ For i = iStartColumn To iEndColumn
+ oSheet.Columns(i).IsVisible = bIsVisible
+ Next i
+End Sub
+
+
+Function GetRowIndex(oSheet as Object, RowName as String)
+Dim oRange as Object
+ oRange = oSheet.GetCellRangeByName(RowName)
+ GetRowIndex = oRange.RangeAddress.StartRow
+End Function
+
+
+Function GetTransactionCount(iStartRow as Integer)
+Dim iEndRow as Integer
+ iStartRow = GetRowIndex(oMovementSheet, &quot;ColumnsToHide&quot;)
+ iEndRow = GetRowIndex(oMovementSheet, &quot;HiddenRow3&quot; )
+ GetTransactionCount = iEndRow -iStartRow - 2
+End Function
+
+
+Function GetStocksCount(iStartRow as Integer)
+Dim iEndRow as Integer
+ iStartRow = GetRowIndex(oFirstSheet, &quot;HiddenRow1&quot;)
+ iEndRow = GetRowIndex(oFirstSheet, &quot;HiddenRow2&quot;)
+ GetStocksCount = iEndRow -iStartRow - 1
+End Function
+
+
+Function FillListbox(ListboxControl as Object, MsgTitle as String, bShowMessage) as Boolean
+Dim i, StocksCount as Integer
+Dim iStartRow as Integer
+Dim oCell as Object
+ &apos; Add stock names to empty list box
+ StocksCount = GetStocksCount(iStartRow)
+ If StocksCount &gt; 0 Then
+ ListboxControl.Model.StringItemList() = NullList()
+ For i = 1 To StocksCount
+ oCell = oFirstSheet.GetCellByPosition(SBCOLUMNNAME1,iStartRow + i)
+ ListboxControl.AddItem(oCell.String, i-1)
+ Next
+ FillListbox() = True
+ Else
+ If bShowMessage Then
+ Msgbox(sInsertStockName, 16, MsgTitle)
+ FillListbox() = False
+ End If
+ End If
+End Function
+
+
+Sub CellValuetoControl(oSheet, oControl as Object, CellName as String)
+Dim oCell as Object
+Dim StringValue
+ oCell = GetCellByName(oSheet, CellName)
+ If oControl.PropertySetInfo.HasPropertyByName(&quot;EffectiveValue&quot;) Then
+ oControl.EffectiveValue = oCell.Value
+ Else
+ oControl.Value = oCell.Value
+ End If
+&apos; If oCell.FormulaResultType = 1 Then
+&apos; StringValue = oNumberFormatter.GetInputString(oCell.NumberFormat, oCell.Value)
+&apos; oControl.Text = DeleteStr(StringValue, &quot;%&quot;)
+&apos; Else
+&apos; oControl.Text = oCell.String
+&apos; End If
+End Sub
+
+
+Sub RemoveStockRows(oSheet as Object, iStartRow, RowCount as Integer)
+ If RowCount &gt; 0 Then
+ oSheet.Rows.RemoveByIndex(iStartRow, RowCount)
+ End If
+End Sub
+
+
+Sub AddValueToCellContent(iCellCol, iCellRow as Integer, AddValue)
+Dim oCell as Object
+Dim OldValue
+ oCell = oMovementSheet.GetCellByPosition(iCellCol, iCellRow)
+ OldValue = oCell.Value
+ oCell.Value = OldValue + AddValue
+End Sub
+
+
+Sub CheckInputDate(aEvent as Object)
+Dim oRefDialog as Object
+Dim oRefModel as Object
+Dim oDateModel as Object
+ oDateModel = aEvent.Source.Model
+ oRefModel = DlgReference.GetControl(&quot;cmdGoOn&quot;).Model
+ oRefModel.Enabled = oDateModel.Date &lt;&gt; 0
+End Sub
+
+
+
+&apos; Updates the cell with the CurrentValue after checking if the
+&apos; Newdate is later than the one that is refered to in the annotation
+&apos; of the cell
+Sub InsertCurrentValue(CurValue as Double, iRow as Integer, Newdate as Date)
+Dim oCell as Object
+Dim OldDate as Date
+ oCell = oFirstSheet.GetCellByPosition(SBCOLUMNRATE1, iRow)
+ OldDate = CDate(oCell.Annotation.Text.String)
+ If NewDate &gt;= OldDate Then
+ oCell.SetValue(CurValue)
+ oCell.Annotation.Text.SetString(CStr(NewDate))
+ End If
+End Sub
+
+
+Sub SplitCellValue(oSheet, FirstNumber, SecondNumber, iCol, iRow, NoteText)
+Dim oCell as Object
+Dim OldValue
+ oCell = oSheet.GetCellByPosition(iCol, iRow)
+ OldValue = oCell.Value
+ oCell.Value = OldValue * FirstNumber / SecondNumber
+ If NoteText &lt;&gt; &quot;&quot; Then
+ oCell.Annotation.SetString(NoteText)
+ End If
+End Sub
+
+
+Function GetStockRowIndex(ByVal Stockname) as Integer
+Dim i, StocksCount as Integer
+Dim iStartRow as Integer
+Dim oCell as Object
+ StocksCount = GetStocksCount(iStartRow)
+ For i = 1 To StocksCount
+ oCell = oFirstSheet.GetCellByPosition(SBCOLUMNNAME1,iStartRow + i)
+ If oCell.String = Stockname Then
+ GetStockRowIndex = iStartRow + i
+ Exit Function
+ End If
+ Next
+ GetStockRowIndex = -1
+End Function
+
+
+Function GetStockID(StockName as String, Optional iFirstRow as Integer) as String
+Dim CellStockName as String
+Dim i as Integer
+Dim iCount as Integer
+Dim iLastRow as Integer
+ If IsMissing(iFirstRow) Then
+ iFirstRow = GetRowIndex(oFirstSheet, &quot;HiddenRow1&quot;)
+ End If
+ iCount = GetStocksCount(iFirstRow)
+ iLastRow = iFirstRow + iCount
+ For i = iFirstRow To iLastRow
+ CellStockName = oFirstSheet.GetCellByPosition(SBCOLUMNNAME1, i).String
+ If CellStockname = StockName Then
+ Exit For
+ End If
+ Next i
+ If i &gt; iLastRow Then
+ GetStockID() = &quot;&quot;
+ Else
+ If Not IsMissing(iFirstRow) Then
+ iFirstRow = i
+ End If
+ GetStockID() = oFirstSheet.GetCellByPosition(SBCOLUMNID1, i).String
+ End If
+End Function
+
+
+Function CheckDocLocale(LocLanguage as String, LocCountry as String)
+Dim bIsDocLanguage as Boolean
+Dim bIsDocCountry as Boolean
+ bIsDocLanguage = Instr(1, LocLanguage, sDocLanguage, SBBINARY) &lt;&gt; 0
+ bIsDocCountry = Instr(1, LocCountry, sDocCountry, SBBINARY) &lt;&gt; 0 OR SDocCountry = &quot;&quot;
+ CheckDocLocale = (bIsDocLanguage And bIsDocCountry)
+End Function
+</script:module> \ No newline at end of file
diff --git a/wizards/source/euro/AutoPilotRun.xba b/wizards/source/euro/AutoPilotRun.xba
new file mode 100644
index 000000000000..6c5adb9ea64a
--- /dev/null
+++ b/wizards/source/euro/AutoPilotRun.xba
@@ -0,0 +1,409 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="AutoPilotRun" script:language="StarBasic">Option Explicit
+
+Public SourceDir as String
+Public TargetDir as String
+Public TargetStemDir as String
+Public SourceFile as String
+Public TargetFile as String
+Public Source as String
+Public SubstFile as String
+Public SubstDir as String
+Public NoArgs()
+Public FilterList(9) as String
+Public GoOn as Boolean
+Public DoUnprotect as Integer
+Public Password as String
+Public DocIndex as Integer
+Public oPathSettings as Object
+Public oUcb as Object
+Public TotDocCount as Integer
+Public sTotDocCount as String
+Public OpenProperties(1) as New com.sun.star.beans.PropertyValue
+
+
+Sub StartAutoPilot()
+Dim i As Integer
+Dim oFactoryKey as Object
+ BasicLibraries.LoadLibrary(&quot;Tools&quot;)
+ BasicLibraries.LoadLibrary(&quot;ImportWizard&quot;)
+ If InitResources(&quot;Euro Converter&quot;, &quot;eur&quot;) Then
+ oUcb = createUnoService(&quot;com.sun.star.ucb.SimpleFileAccess&quot;)
+ oLocale = GetStarOfficeLocale()
+ InitializeConverter(oLocale, 2)
+ ToggleGoOnButton()
+ oFactoryKey = GetRegistryKeyContent(&quot;org.openoffice.Setup/Office/Factories&quot;)
+ DialogModel.chkTextDocuments.Enabled = oFactoryKey.hasbyName(&quot;com.sun.star.text.TextDocument&quot;)
+ DialogModel.cmdGoOn.DefaultButton = True
+ DialogModel.lstCurrencies.TabIndex = 12
+ DialogConvert.GetControl(&quot;optWholeDir&quot;).SetFocus()
+ DialogConvert.Execute()
+ DialogConvert.Dispose()
+ End If
+End Sub
+
+
+Sub ConvertDocuments()
+Dim FilesList()
+Dim bDisposable as Boolean
+
+ If Source &lt;&gt; &quot;&quot; And TargetDir &lt;&gt; &quot;&quot; Then
+ If DialogModel.optSingleFile.State = 1 Then
+ SourceFile = Source
+ TotDocCount = 1
+ Else
+ SourceDir = Source
+ TargetStemDir = TargetDir
+ FilterList(0) = &quot;application/x-starcalc&quot;
+ FilterList(1) = &quot;application/vnd.stardivision.calc&quot;
+ FilterList(2) = &quot;application/vnd.sun.xml.calc&quot;
+ FilterList(3) = &quot;application/vnd.oasis.opendocument.spreadsheet&quot;
+ If DialogModel.chkTextDocuments.State = 1 Then
+ ReDim Preserve FilterList(8) as String
+
+ FilterList(4) = &quot;application/x-starwriter&quot;
+ FilterList(5) = &quot;application/vnd.stardivision.writer&quot;
+ FilterList(6) = &quot;application/vnd.stardivision.writer/web&quot;
+ FilterList(7) = &quot;application/vnd.sun.xml.writer&quot;
+ FilterList(8) = &quot;application/vnd.oasis.opendocument.text&quot;
+ End If
+ FilesList() = ReadDirectories(SourceDir, bRecursive, True, False, FilterList())
+ TotDocCount = Ubound(FilesList(),1) + 1
+ End If
+ InitializeProgressPage(DialogModel)
+&apos; ChangeToNextProgressStep()
+ sTotDocCount = CStr(TotDocCount)
+ OpenProperties(0).Name = &quot;Hidden&quot;
+ OpenProperties(0).Value = True
+ OpenProperties(1).Name = &quot;AsTemplate&quot;
+ OpenProperties(1).Value = False
+ For DocIndex = 0 To TotDocCount - 1
+ If InitializeDocument(FilesList(), bDisposable) Then
+ If StoreDocument() Then
+ ConvertDocument()
+ oDocument.Store
+ End If
+ If bDisposable Then
+ oDocument.Dispose()
+ End If
+ End If
+ Next DocIndex
+ DialogModel.cmdBack.Enabled = True
+ DialogModel.cmdGoOn.Enabled = True
+ DialogModel.cmdGoOn.Label = sReady
+ DialogModel.cmdCancel.Label = sEnd
+ End If
+End Sub
+
+
+Function InitializeDocument(FilesList(), bDisposable as Boolean) as Boolean
+&apos; The Autopilot is started from step No. 2
+Dim sViewPath as String
+Dim bIsReadOnly as Boolean
+Dim sExtension as String
+ On Local Error Goto NEXTFILE
+ If Not bCancelTask Then
+ If DialogModel.optWholeDir.State = 1 Then
+ SourceFile = FilesList(DocIndex,0)
+ TargetFile = ReplaceString(SourceFile,TargetStemDir,SourceDir)
+ TargetDir = DirectorynameoutofPath(TargetFile, &quot;/&quot;)
+ Else
+ SourceFile = Source
+ TargetFile = TargetDir &amp; &quot;/&quot; &amp; FileNameoutofPath(SourceFile, &quot;/&quot;)
+ End If
+ If CreateFolder(TargetDir) Then
+ sExtension = GetFileNameExtension(SourceFile, &quot;/&quot;)
+ oDocument = OpenDocument(SourceFile, OpenProperties(), bDisposable)
+ If (oDocument.IsReadOnly) AND (UCase(SourceFile) = UCase(TargetFile)) Then
+ bIsReadOnly = True
+ Msgbox(sMsgDOCISREADONLY, 16, GetProductName())
+ Else
+ bIsReadOnly = False
+ RetrieveDocumentObjects()
+ sViewPath = CutPathView(SourceFile, 60)
+ DialogModel.lblCurDocument.Label = Str(DocIndex+1) &amp; &quot;/&quot; &amp; sTotDocCount &amp; &quot; (&quot; &amp; sViewPath &amp; &quot;)&quot;
+ End If
+ InitializeDocument() = Not bIsReadOnly
+ Else
+ InitializeDocument() = False
+ End If
+ Else
+ InitializeDocument() = False
+ End If
+NEXTFILE:
+ If Err &lt;&gt; 0 Then
+ InitializeDocument() = False
+ Resume LETSGO
+LETSGO:
+ End If
+End Function
+
+
+Sub ChangeToNextProgressStep()
+ DialogModel.lblCurProgress.FontWeight = com.sun.star.awt.FontWeight.NORMAL
+ DialogConvert.GetControl(&quot;lblCurProgress&quot;).Visible = True
+End Sub
+
+
+Function StoreDocument() as Boolean
+Dim sCurFileExists as String
+Dim iOverWrite as Integer
+ If (TargetFile &lt;&gt; &quot;&quot;) And (Not bCancelTask) Then
+ On Local Error Goto NOSAVING
+ If oUcb.Exists(TargetFile) Then
+ sCurFileExists = ReplaceString(sMsgFileExists, ConvertFromUrl(TargetFile), &quot;&lt;1&gt;&quot;)
+ sCurFileExists = ReplaceString(sCurFileExists, chr(13), &quot;&lt;CR&gt;&quot;)
+ iOverWrite = Msgbox (sCurFileExists, 32 + 3, sMsgDLGTITLE)
+ Select Case iOverWrite
+ Case 1 &apos; OK
+ Case 2 &apos; Abort
+ bCancelTask = True
+ StoreDocument() = False
+ Exit Function
+ Case 7 &apos; No
+ StoreDocument() = False
+ Exit Function
+ End Select
+ End If
+ If TargetFile &lt;&gt; SourceFile Then
+ oDocument.StoreAsUrl(TargetFile,NoArgs)
+ Else
+ oDocument.Store
+ End If
+ StoreDocument() = True
+ NOSAVING:
+ If Err &lt;&gt; 0 Then
+ StoreDocument() = False
+ Resume CLERROR
+ End If
+ CLERROR:
+ End If
+End Function
+
+
+Sub SwapExtent()
+ DialogModel.chkRecursive.Enabled = DialogModel.optWholeDir.State = 1
+ If DialogModel.optWholeDir.State = 1 Then
+ DialogModel.lblSource.Label = sSOURCEDIR
+ If Not IsNull(SubstFile) Then
+ SubstFile = DialogModel.txtSource.Text
+ DialogModel.txtSource.Text = SubstDir
+ End If
+ Else
+ DialogModel.LblSource.Label = sSOURCEFILE
+ If Not IsNull(SubstDir) Then
+ SubstDir = DialogModel.txtSource.Text
+ DialogModel.txtSource.Text = SubstFile
+ End If
+ End If
+ ToggleGoOnButton()
+End Sub
+
+
+Function InitializeThirdStep() as Boolean
+Dim TextBoxText as String
+ Source = AssignFileName(DialogModel.txtSource.Text, DialogModel.lblSource.Label, True)
+ If CheckTextBoxPath(DialogModel.txtTarget, True, True, sMsgDLGTITLE, True) Then
+ TargetDir = AssignFileName(DialogModel.txtTarget.Text, DialogModel.lblTarget.Label, False)
+ Else
+ TargetDir = &quot;&quot;
+ End If
+ If Source &lt;&gt; &quot;&quot; And TargetDir &lt;&gt; &quot;&quot; Then
+ bRecursive = DialogModel.chkRecursive.State = 1
+ bDoUnprotect = DialogModel.chkProtect.State = 1
+ DialogModel.lblRetrieval.FontWeight = com.sun.star.awt.FontWeight.BOLD
+ DialogModel.lblRetrieval.Label = sPrgsRETRIEVAL
+ DialogModel.lblCurProgress.Label = sPrgsCONVERTING
+ If DialogModel.optWholeDir.State = 1 Then
+ TextBoxText = sSOURCEDIR &amp; &quot; &quot; &amp; ConvertFromUrl(Source) &amp; chr(13)
+ If DialogModel.chkRecursive.State = 1 Then
+ TextBoxText = TextBoxText &amp; DeleteStr(sInclusiveSubDir,&quot;~&quot;) &amp; chr(13)
+ End If
+ Else
+ TextBoxText = sSOURCEFILE &amp; &quot; &quot; &amp; ConvertFromUrl(Source) &amp; chr(13)
+ End If
+ TextBoxText = TextBoxText &amp; sTARGETDIR &amp; &quot; &quot; &amp; ConvertFromUrl(TargetDir) &amp; chr(13)
+ If DialogModel.chkProtect.State = 1 Then
+ TextBoxText = TextboxText &amp; sPrgsUNPROTECT
+ End If
+ DialogModel.txtConfig.Text = TextBoxText
+ ToggleProgressStep()
+ DialogModel.cmdGoOn.Enabled = False
+ InitializeThirdStep() = True
+ Else
+ InitializeThirdStep() = False
+ End If
+End Function
+
+
+Sub ToggleProgressStep(Optional aEvent as Object)
+Dim bMakeVisible as Boolean
+Dim LocStep as Integer
+ &apos; If the Sub is call by the &apos;cmdBack&apos; Button then set the &apos;bMakeVisible&apos; variable accordingly
+ bMakeVisible = IsMissing(aEvent)
+ If bMakeVisible Then
+ DialogModel.Step = 3
+ Else
+ DialogModel.Step = 2
+ End If
+ DialogConvert.GetControl(&quot;lblCurrencies&quot;).Visible = Not bMakeVisible
+ DialogConvert.GetControl(&quot;lstCurrencies&quot;).Visible = Not bMakeVisible
+ DialogConvert.GetControl(&quot;cmdBack&quot;).Visible = bMakeVisible
+ DialogConvert.GetControl(&quot;cmdGoOn&quot;).Visible = bMakeVisible
+ DialogModel.imgPreview.ImageUrl = BitmapDir &amp; &quot;euro_&quot; &amp; DialogModel.Step &amp; &quot;.bmp&quot;
+End Sub
+
+
+Sub EnableStep2DialogControls(OnValue as Boolean)
+ With DialogModel
+ .hlnExtent.Enabled = OnValue
+ .optWholeDir.Enabled = OnValue
+ .optSingleFile.Enabled = OnValue
+ .chkProtect.Enabled = OnValue
+ .cmdCallSourceDialog.Enabled = OnValue
+ .cmdCallTargetDialog.Enabled = OnValue
+ .lblSource.Enabled = OnValue
+ .lblTarget.Enabled = OnValue
+ .txtSource.Enabled = OnValue
+ .txtTarget.Enabled = OnValue
+ .imgPreview.Enabled = OnValue
+ .lstCurrencies.Enabled = OnValue
+ .lblCurrencies.Enabled = OnValue
+ If OnValue Then
+ ToggleGoOnButton()
+ .chkRecursive.Enabled = .optWholeDir.State = 1
+ Else
+ .cmdGoOn.Enabled = False
+ .chkRecursive.Enabled = False
+ End If
+ End With
+End Sub
+
+
+Sub InitializeProgressPage()
+ DialogConvert.GetControl(&quot;lblRetrieval&quot;).Visible = False
+ DialogConvert.GetControl(&quot;lblCurProgress&quot;).Visible = False
+ DialogModel.lblRetrieval.FontWeight = com.sun.star.awt.FontWeight.NORMAL
+ DialogModel.lblCurProgress.FontWeight = com.sun.star.awt.FontWeight.BOLD
+ DialogConvert.GetControl(&quot;lblRetrieval&quot;).Visible = True
+ DialogConvert.GetControl(&quot;lblCurProgress&quot;).Visible = True
+End Sub
+
+
+Function AssignFileName(sPath as String, ByVal HeaderString, bCheckFileType as Boolean) as String
+Dim bIsValid as Boolean
+Dim sLocMimeType as String
+Dim sNoDirMessage as String
+ HeaderString = DeleteStr(HeaderString, &quot;:&quot;)
+ sPath = ConvertToUrl(Trim(sPath))
+ bIsValid = oUcb.Exists(sPath)
+ If bIsValid Then
+ If DialogModel.optSingleFile.State = 1 Then
+ If bCheckFileType Then
+ sLocMimeType = GetRealFileContent(sPath)
+ If DialogModel.chkTextDocuments.State = 1 Then
+ If (Instr(1, sLocMimeType, &quot;text&quot;) = 0) And (Instr(1, sLocMimeType, &quot;calc&quot;) = 0) Then
+ Msgbox(sMsgFileInvalid, 48, sMsgDLGTITLE)
+ bIsValid = False
+ End If
+ Else
+ If (Instr(1, sLocMimeType, &quot;spreadsheet&quot;) = 0) And (Instr(1, sLocMimeType, &quot;calc&quot;)) = 0 Then
+ Msgbox(sMsgFileInvalid, 48, sMsgDLGTITLE)
+ bIsValid = False
+ End If
+ End If
+ End If
+ Else
+ If Not oUcb.IsFolder(sPath) Then
+ sNoDirMessage = ReplaceString(sMsgNODIRECTORY,sPath,&quot;&lt;1&gt;&quot;)
+ Msgbox(sNoDirMessage,48, sMsgDLGTITLE)
+ bIsValid = False
+ Else
+ sPath = RTrimStr(sPath,&quot;/&quot;)
+ sPath = sPath &amp; &quot;/&quot;
+ End If
+ End if
+ Else
+ Msgbox(HeaderString &amp; &quot; &apos;&quot; &amp; ConvertFromUrl(sPath) &amp; &quot;&apos; &quot; &amp; sMsgNOTTHERE,48, sMsgDLGTITLE)
+ End If
+ If bIsValid Then
+ AssignFileName() = sPath
+ Else
+ AssignFilename() = &quot;&quot;
+ End If
+End Function
+
+
+Sub ToggleGoOnButton()
+Dim bDoEnable as Boolean
+Dim sLocMimeType as String
+Dim sPath as String
+ bDoEnable = Ubound(DialogModel.lstCurrencies.SelectedItems()) &gt; -1
+ If bDoEnable Then
+ &apos; Check if Source is set correctly
+ sPath = ConvertToUrl(Trim(DialogModel.txtSource.Text))
+ bDoEnable = oUcb.Exists(sPath)
+ End If
+ DialogModel.cmdGoOn.Enabled = bDoEnable
+End Sub
+
+
+Sub CallFolderPicker()
+ GetFolderName(DialogModel.txtTarget)
+ ToggleGoOnButton()
+End Sub
+
+
+Sub CallFilePicker()
+ If DialogModel.optSingleFile.State = 1 Then
+ Dim oMasterKey as Object
+ Dim oTypes() as Object
+ Dim oUIKey() as Object
+
+ oMasterKey = GetRegistryKeyContent(&quot;org.openoffice.TypeDetection.Types&quot;)
+ oTypes() = oMasterKey.Types
+ oUIKey = GetRegistryKeyContent(&quot;org.openoffice.Office.UI/FilterClassification/LocalFilters&quot;)
+ If DialogModel.chkTextDocuments.State = 1 Then
+ Dim FilterNames(11,1) as String
+ FilterNames(6,0) = oTypes.GetByName(&quot;writer_StarOffice_XML_Writer&quot;).UIName
+ FilterNames(6,1) = &quot;*.sxw&quot;
+ FilterNames(7,0) = oTypes.GetByName(&quot;writer_StarOffice_XML_Writer_Template&quot;).UIName
+ FilterNames(7,1) = &quot;*.stw&quot;
+ FilterNames(8,0) = oUIKey.Classes.GetByName(&quot;sw3to5&quot;).DisplayName
+ FilterNames(8,1) = &quot;*.sdw&quot;
+ FilterNames(9,0) = oUIKey.Classes.GetByName(&quot;sw3to5templ&quot;).DisplayName
+ Filternames(9,1) = &quot;*.vor&quot;
+ FilterNames(10,0) = oTypes.GetByName(&quot;writer8&quot;).UIName
+ FilterNames(10,1) = &quot;*.odt&quot;
+ FilterNames(11,0) = oTypes.GetByName(&quot;writer8_template&quot;).UIName
+ FilterNames(11,1) = &quot;*.ott&quot;
+ Else
+ ReDim FilterNames(5,1) as String
+ End If
+ FilterNames(0,0) = oTypes.GetByName(&quot;calc_StarOffice_XML_Calc&quot;).UIName
+ Filternames(0,1) = &quot;*.sxc&quot;
+ FilterNames(1,0) = oTypes.GetByName(&quot;calc_StarOffice_XML_Calc_Template&quot;).UIName
+ Filternames(1,1) = &quot;*.stc&quot;
+ FilterNames(2,0) = oUIKey.Classes.GetByName(&quot;sc345&quot;).DisplayName
+ FilterNames(2,1) = &quot;*.sdc&quot;
+ FilterNames(3,0) = oUIKey.Classes.GetByName(&quot;sc345templ&quot;).DisplayName
+ Filternames(3,1) = &quot;*.vor&quot;
+ FilterNames(4,0) = oTypes.GetByName(&quot;calc8&quot;).UIName
+ Filternames(4,1) = &quot;*.ods&quot;
+ FilterNames(5,0) = oTypes.GetByName(&quot;calc8_template&quot;).UIName
+ Filternames(5,1) = &quot;*.ots&quot;
+ GetFileName(DialogModel.txtSource, Filternames())
+ Else
+ GetFolderName(DialogModel.txtSource)
+ End If
+ ToggleGoOnButton()
+End Sub
+
+
+Sub PreviousStep()
+ DialogModel.Step = 2
+ DialogModel.cmdGoOn.Label = sGOON
+ DialogModel.cmdCancel.Label = sCANCEL
+End Sub
+</script:module>
diff --git a/wizards/source/euro/Common.xba b/wizards/source/euro/Common.xba
new file mode 100644
index 000000000000..42a5c643dd22
--- /dev/null
+++ b/wizards/source/euro/Common.xba
@@ -0,0 +1,272 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Common" script:language="StarBasic"> REM ***** BASIC *****
+Public DialogModel as Object
+Public DialogConvert as Object
+Public DialogPassword as Object
+Public PasswordModel as Object
+
+Sub RetrieveDocumentObjects()
+ CurMimeType = Tools.GetDocumentType(oDocument)
+ If Instr(1, CurMimeType, &quot;calc&quot;) &lt;&gt; 0 Then
+ oSheets = oDocument.Sheets
+ oSheet = oDocument.Sheets.GetbyIndex(0)
+ oAddressRanges = oDocument.createInstance(&quot;com.sun.star.sheet.SheetCellRanges&quot;)
+ End If
+ &apos; Retrieve the indices for the cellformatations
+ oFormats = oDocument.NumberFormats
+End Sub
+
+
+Sub CancelTask()
+&apos; If Not DocDisposed Then
+&apos; ReprotectSheets()
+&apos; End If
+ If DialogModel.Step = 3 And (Not bCancelTask) Then
+ If Msgbox(sMsgCancelConversion, 36, sMsgCancelTitle) = 6 Then
+ bCancelTask = True
+ DialogConvert.EndExecute
+ Else
+ bCancelTask = False
+ End If
+ Else
+ DialogConvert.EndExecute()
+ End If
+End Sub
+
+
+Function ConvertDocument()
+ GoOn = True
+&apos; DocDisposed = True
+ InitializeProgressbar()
+ If Instr(1, CurMimeType, &quot;calc&quot;) &lt;&gt; 0 Then
+ bDocHasProtectedSheets = CheckSheetProtection(oSheets)
+ If bDocHasProtectedSheets Then
+ bDocHasProtectedSheets = UnprotectSheetsWithPassword(oSheets, bDoUnProtect)
+ End If
+ If Not bDocHasProtectedSheets Then
+ If Not bRangeListDefined Then
+ TotCellCount = 0
+ CreateRangeEnumeration(True)
+ Else
+ IncreaseStatusvalue(SBRelGet/3)
+ End If
+ RangeIndex = Ubound(RangeList())
+ If RangeIndex &gt; -1 Then
+ ConvertThehardWay(RangeList(), True, False)
+ MakeStyleEnumeration(True)
+ oDocument.calculateAll()
+ End If
+ ReprotectSheets()
+ bRangeListDefined = False
+ End If
+ Else
+ DialogModel.ProgressBar.ProgressValue = 10 &apos; oStatusline.SetValue(10)
+ ConvertTextFields()
+ DialogModel.ProgressBar.ProgressValue = 80 &apos; oStatusline.SetValue(80)
+ ConvertWriterTables()
+ End If
+ EndStatusLine()
+ On Local Error Goto 0
+End Function
+
+
+Sub SwitchNumberFormat(oObject as Object, oFormats as object)
+Dim nFormatLanguage as Integer
+Dim nFormatDecimals as Integer
+Dim nFormatLeading as Integer
+Dim bFormatLeading as Integer
+Dim bFormatNegRed as Integer
+Dim bFormatThousands as Integer
+Dim i as Integer
+Dim aNewStr as String
+Dim iNumberFormat as Long
+Dim AddToList as Boolean
+Dim sOldCurrSymbol as String
+ On Local Error Resume Next
+ iNumberFormat = oObject.NumberFormat
+ On Local Error GoTo NOKEY
+ aFormat() = oFormats.getByKey(iNumberFormat)
+ On Local Error GoTo 0
+ sOldCurrSymbol = aFormat.CurrencySymbol
+ If sOldCurrSymbol = CurrValue(CurrIndex,5) Then
+ aSimpleStr = &quot;0 [$EUR]&quot;
+ Else
+ aSimpleStr = &quot;0 [$&quot; &amp; sEuroSign &amp; aFormat.CurrencyExtension &amp; &quot;]&quot;
+ End If
+
+ nSimpleKey = Numberformat(oFormats, aSimpleStr, oLocale)
+ &apos; set new Currency format with according settings
+ nFormatDecimals = 2
+ nFormatLeading = aFormat.LeadingZeros
+ bFormatNegRed = aFormat.NegativeRed
+ bFormatThousands = aFormat.ThousandsSeparator
+ aNewStr = oFormats.generateFormat( nSimpleKey, aFormat.Locale, bFormatThousands, bFormatNegRed, nFormatDecimals, nFormatLeading)
+ oObject.NumberFormat = Numberformat(oFormats, aNewStr, aFormat.Locale)
+ NOKEY:
+ If Err &lt;&gt; 0 Then
+ Resume CLERROR
+ End If
+ CLERROR:
+End Sub
+
+
+Function Numberformat( oFormats as Object, aFormatStr as String, oLocale as Object)
+Dim nRetkey
+Dim l as String
+Dim c as String
+ nRetKey = oFormats.queryKey( aFormatStr, oLocale, True )
+ If nRetKey = -1 Then
+ l = oLocale.Language
+ c = oLocale.Country
+ nRetKey = oFormats.addNew( aFormatStr, oLocale )
+ If nRetKey = -1 Then nRetKey = 0
+ End If
+ Numberformat = nRetKey
+End Function
+
+
+Function CheckFormatType( FormatObject as object)
+Dim i as Integer
+Dim LocCurrIndex as Integer
+Dim nFormatFormatString as String
+Dim FormatLangID as Integer
+Dim sFormatCurrExt as String
+Dim oFormatofObject() as Object
+
+ &apos; Retrieve the Format of the Object
+ On Local Error GoTo NOKEY
+ oFormatofObject = oFormats.getByKey(FormatObject.NumberFormat)
+ On Local Error GoTo 0
+ If NOT INT(oFormatofObject.Type) AND com.sun.star.util.NumberFormat.CURRENCY Then
+ CheckFormatType = False
+ Exit Function
+ End If
+ If FieldinArray(CurrSymbolList(),2,oFormatofObject.CurrencySymbol) Then
+ &apos; If the Currencysymbol of the object ist the one needed, then check the Currency extension
+ sFormatCurrExt = oFormatofObject.CurrencyExtension
+
+ If FieldInList(CurExtension(),2,sFormatCurrExt) Then
+ &apos; The Currency - extension also fits
+ CheckFormatType = True
+ Else
+ &apos; The Currency - symbol is Euro-conforming (like &apos;DEM&apos;), so there is no Currency-Extension
+ CheckFormatType = oFormatofObject.CurrencySymbol = CurrsymbolList(2)
+ End If
+ Else
+ &apos; The Currency Symbol of the object is not the desired one
+ If oFormatofObject.CurrencySymbol = &quot;&quot; Then
+ &apos; Format is &quot;automatic&quot;
+ CheckFormatType = CheckLocale(oFormatofObject.Locale)
+ Else
+ CheckFormatType = False
+ End If
+ End If
+
+ NOKEY:
+ If Err &lt;&gt; 0 Then
+ CheckFormatType = False
+ Resume CLERROR
+ End If
+ CLERROR:
+End Function
+
+
+Sub StartConversion()
+ GoOn = True
+ Select Case DialogModel.Step
+ Case 1
+ If DialogModel.chkComplete.State = 1 Then
+ ConvertWholeDocument()
+ Else
+ ConvertRangesorStylesofDocument()
+ End If
+ Case 2
+ bCancelTask = False
+ If InitializeThirdStep() Then
+ ConvertDocuments()
+ bCancelTask = True
+ End If
+ Case 3
+ DialogConvert.EndExecute()
+ End Select
+End Sub
+
+
+Sub IncreaseStatusValue(AddStatusValue as Integer)
+ StatusValue = Int(StatusValue + AddStatusValue)
+ If DialogModel.Step = 3 Then
+ DialogModel.ProgressBar.ProgressValue = StatusValue
+ Else
+ oStatusline.SetValue(StatusValue)
+ End If
+End Sub
+
+
+Sub SelectCurrency()
+Dim AddtoList as Boolean
+Dim NullList()
+Dim OldCurrIndex as Integer
+ bRangeListDefined = False
+ OldCurrIndex = CurrIndex
+ CurrIndex = DialogModel.lstCurrencies.SelectedItems(0)
+ If OldCurrIndex &lt;&gt; CurrIndex Then
+ InitializeCurrencyValues(CurrIndex)
+ CurExtension(0) = LangIDValue(CurrIndex,0,2)
+ CurExtension(1) = LangIDValue(CurrIndex,1,2)
+ CurExtension(2) = LangIDValue(CurrIndex,2,2)
+ If DialogModel.Step = 1 Then
+ EnableStep1DialogControls(False,False, False)
+ If DialogModel.optCellTemplates.State = 1 Then
+ EnableStep1DialogControls(False, False, False)
+ CreateStyleEnumeration()
+ ElseIf ((DialogModel.optSheetRanges.State = 1) OR (DialogModel.optDocRanges.State = 1)) AND (DialogModel.Step = 1) Then
+ CreateRangeEnumeration(False)
+ If Ubound(RangeList()) = -1 Then
+ DialogModel.lstSelection.StringItemList() = NullList()
+ End If
+ ElseIf DialogModel.optSelRange.State= 1 Then
+ &apos;Preselected Range
+ End If
+ EnableStep1DialogControls(True, True, True)
+ ElseIf DialogModel.Step = 2 Then
+ EnableStep2DialogControls(True)
+ End If
+ End If
+End Sub
+
+
+Sub FillUpCurrencyListbox()
+Dim i as Integer
+Dim MaxIndex as Integer
+ MaxIndex = Ubound(CurrValue(),1)
+ Dim LocList(MaxIndex) as String
+ For i = 0 To MaxIndex
+ LocList(i) = CurrValue(i,0)
+ Next i
+ DialogModel.lstCurrencies.StringItemList() = LocList()
+ If CurrIndex &gt; -1 Then
+ SelectListboxItem(DialogModel.lstCurrencies, CurrIndex)
+ End If
+End Sub
+
+
+Sub InitializeProgressbar()
+ CurCellCount = 0
+ If Not IsNull(oStatusLine) Then
+ oStatusline.Start(sStsPROGRESS, 100)
+ Else
+ DialogModel.ProgressBar.ProgressValue = 0
+ End If
+ StatusValue = 0
+End Sub
+
+
+Sub EndStatusLine()
+ If Not IsNull(oStatusLine) Then
+ oStatusline.End
+ Else
+ DialogModel.ProgressBar.ProgressValue = 100
+ End If
+End Sub
+</script:module> \ No newline at end of file
diff --git a/wizards/source/euro/ConvertRun.xba b/wizards/source/euro/ConvertRun.xba
new file mode 100644
index 000000000000..a15c88412228
--- /dev/null
+++ b/wizards/source/euro/ConvertRun.xba
@@ -0,0 +1,317 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="ConvertRun" script:language="StarBasic">Option Explicit
+
+Public oPreSelRange as Object
+
+Sub Main()
+ BasicLibraries.LoadLibrary(&quot;Tools&quot;)
+ If InitResources(&quot;Euro Converter&quot;, &quot;eur&quot;) Then
+ bDoUnProtect = False
+ bPreSelected = True
+ oDocument = ThisComponent
+ RetrieveDocumentObjects() &apos; Statusline, SheetsCollection etc.
+ InitializeConverter(oDocument.CharLocale, 1)
+ GetPreSelectedRange()
+ If GoOn Then
+ DialogModel.lstCurrencies.TabIndex = 2
+ DialogConvert.GetControl(&quot;chkComplete&quot;).SetFocus()
+ DialogConvert.Execute
+ End If
+ DialogConvert.Dispose
+ End If
+End Sub
+
+
+Sub SelectListItem()
+Dim Listbox as Object
+Dim oListSheet as Object
+Dim CurStyleName as String
+Dim oCursheet as Object
+Dim oTempRanges as Object
+Dim sCurSheetName as String
+Dim RangeName as String
+Dim oSheetRanges as Object
+Dim ListIndex as Integer
+Dim a as Integer
+Dim i as Integer
+Dim n as Integer
+Dim m as Integer
+Dim MaxIndex as Integer
+ Listbox = DialogModel.lstSelection
+ If Ubound(Listbox.SelectedItems()) &gt; -1 Then
+ EnableStep1DialogControls(False, False, False)
+ oSelRanges = oDocument.createInstance(&quot;com.sun.star.sheet.SheetCellRanges&quot;)
+
+ &apos; Is the sheet the basis, then the sheetobject has to be created
+ If DialogModel.optDocRanges.State = 1 Then
+ &apos; Document is the basis for the conversion
+ ListIndex = Listbox.SelectedItems(0)
+ oCurSheet = RetrieveSheetoutofRangeName(Listbox.StringItemList(ListIndex))
+ oDocument.CurrentController.SetActiveSheet(oCurSheet)
+ Else
+ oCurSheet = oDocument.CurrentController.ActiveSheet
+ End If
+ sCurSheetName = oCurSheet.Name
+ If DialogModel.optCellTemplates.State = 1 Then
+ Dim CurIndex as Integer
+ For i = 0 To Ubound(Listbox.SelectedItems())
+ CurIndex = Listbox.SelectedItems(i)
+ CurStylename = Listbox.StringItemList(CurIndex)
+ oSheetRanges = oCursheet.CellFormatRanges.createEnumeration
+ While oSheetRanges.hasMoreElements
+ oRange = oSheetRanges.NextElement
+ If oRange.getPropertyState(&quot;NumberFormat&quot;) = 1 Then
+ If oRange.CellStyle = CurStyleName Then
+ oSelRanges.InsertbyName(&quot;&quot;,oRange)
+ End If
+ End If
+ Wend
+ Next i
+ Else
+ &apos; Hard Formatation is selected
+ a = -1
+ For n = 0 To Ubound(Listbox.SelectedItems())
+ m = Listbox.SelectedItems(n)
+ RangeName = Listbox.StringItemList(m)
+ oListSheet = RetrieveSheetoutofRangeName(RangeName)
+ a = a + 1
+ MaxIndex = Ubound(SelRangeList())
+ If a &gt; MaxIndex Then
+ Redim Preserve SelRangeList(MaxIndex + SBRANGEUBOUND)
+ End If
+ SelRangeList(a) = RangeName
+ If oListSheet.Name = sCurSheetName Then
+ oRange = RetrieveRangeoutofRangeName(RangeName)
+ oSelRanges.InsertbyName(&quot;&quot;,oRange)
+ End If
+ Next n
+ End If
+ If a &gt; -1 Then
+ ReDim Preserve SelRangeList(a)
+ Else
+ ReDim SelRangeList()
+ End If
+ oDocument.CurrentController.Select(oSelRanges)
+ EnableStep1DialogControls(True, True, True)
+ End If
+End Sub
+
+
+&apos; Procedure that is called by an event
+Sub RetrieveEnableValue()
+Dim EnableValue as Boolean
+ EnableValue = Not DialogModel.lstSelection.Enabled
+ EnableStep1DialogControls(True, EnableValue, True)
+End Sub
+
+
+Sub EnableStep1DialogControls(bCurrEnabled as Boolean, bFrameEnabled as Boolean, bButtonsEnabled as Boolean)
+Dim bCurrIsSelected as Boolean
+Dim bObjectIsSelected as Boolean
+Dim bConvertWholeDoc as Boolean
+Dim bDoEnableFrame as Boolean
+ bConvertWholeDoc = DialogModel.chkComplete.State = 1
+ bDoEnableFrame = bFrameEnabled And (NOT bConvertWholeDoc)
+
+ &apos; Controls around the Selection Listbox
+ With DialogModel
+ .lblCurrencies.Enabled = bCurrEnabled
+ .lstCurrencies.Enabled = bCurrEnabled
+ .lstSelection.Enabled = bDoEnableFrame
+ .lblSelection.Enabled = bDoEnableFrame
+ .hlnSelection.Enabled = bDoEnableFrame
+ .optCellTemplates.Enabled = bDoEnableFrame
+ .optSheetRanges.Enabled = bDoEnableFrame
+ .optDocRanges.Enabled = bDoEnableFrame
+ .optSelRange.Enabled = bDoEnableFrame
+ End With
+ &apos; The CheckBox has the Value &apos;1&apos; when the Controls in the Frame are disabled
+ If bButtonsEnabled Then
+ bCurrIsSelected = Ubound(DialogModel.lstCurrencies.SelectedItems()) &lt;&gt; -1
+ &apos; Enable GoOnButton only when Currency is selected
+ DialogModel.cmdGoOn.Enabled = bCurrIsSelected
+ DialogModel.chkComplete.Enabled = bCurrIsSelected
+ If bDoEnableFrame AND DialogModel.cmdGoOn.Enabled Then
+ &apos; If FrameControls are enabled, check if Listbox is Empty
+ bObjectIsSelected = Ubound(DialogModel.lstSelection.SelectedItems()) &lt;&gt; -1
+ DialogModel.cmdGoOn.Enabled = bObjectIsSelected
+ End If
+ Else
+ DialogModel.cmdGoOn.Enabled = False
+ DialogModel.chkComplete.Enabled = False
+ End If
+End Sub
+
+
+Sub ConvertRangesOrStylesOfDocument()
+Dim i as Integer
+Dim ItemName as String
+Dim SelList() as String
+Dim oSheetRanges as Object
+
+ bDocHasProtectedSheets = CheckSheetProtection(oSheets)
+ If bDocHasProtectedSheets Then
+ bDocHasProtectedSheets = UnprotectSheetsWithPassWord(oSheets, bDoUnProtect)
+ DialogModel.cmdGoOn.Enabled = False
+ End If
+ If Not bDocHasProtectedSheets Then
+ EnableStep1DialogControls(False, False, False)
+ InitializeProgressBar()
+ If DialogModel.optSelRange.State = 1 Then
+ SelectListItem()
+ End If
+ SelList() = DialogConvert.GetControl(&quot;lstSelection&quot;).SelectedItems()
+ If DialogModel.optCellTemplates.State = 1 Then
+ &apos; Option &apos;Soft&apos; Formatation is selected
+ AssignRangestoStyle(DialogModel.lstSelection.StringItemList(), SelList())
+ ConverttheSoftWay(SelList(), True)
+ ElseIf DialogModel.optSelRange.State = 1 Then
+ oSheetRanges = oPreSelRange.CellFormatRanges.createEnumeration
+ While oSheetRanges.hasMoreElements
+ oRange = oSheetRanges.NextElement
+ If CheckFormatType(oRange) Then
+ ConvertCellCurrencies(oRange)
+ SwitchNumberFormat(oRange, oFormats, sEuroSign)
+ End If
+ Wend
+ Else
+ ConverttheHardWay(SelList(), False, True)
+ End If
+ oStatusline.End
+ EnableStep1DialogControls(True, False, True)
+ DialogModel.cmdGoOn.Enabled = True
+ oDocument.CurrentController.Select(oSelRanges)
+ End If
+End Sub
+
+
+Sub ConvertWholeDocument()
+Dim s as Integer
+ DialogModel.cmdGoOn.Enabled = False
+ DialogModel.chkComplete.Enabled = False
+ GoOn = ConvertDocument()
+ EmptyListbox(DialogModel.lstSelection())
+ EnableStep1DialogControls(True, True, True)
+End Sub
+
+
+&apos; Everything previously selected will be deselected
+Sub EmptySelection()
+Dim RangeName as String
+Dim i as Integer
+Dim MaxIndex as Integer
+Dim EmptySelRangeList() as String
+
+ If Not IsNull(oSelRanges) Then
+ If oSelRanges.HasElements Then
+ EmptySelRangeList() = ArrayOutofString(oSelRanges.RangeAddressesasString, &quot;;&quot;, MaxIndex)
+ For i = 0 To MaxIndex
+ oSelRanges.RemovebyName(EmptySelRangeList(i))
+ Next i
+ End If
+ oDocument.CurrentController.Select(oSelRanges)
+ Else
+ oSelRanges = oDocument.createInstance(&quot;com.sun.star.sheet.SheetCellRanges&quot;)
+ End If
+End Sub
+
+
+Function AddSelectedRangeToSelRangesEnum() as Object
+Dim oLocRange as Object
+ osheet = oDocument.CurrentController.GetActiveSheet
+ oSelRanges = oDocument.createInstance(&quot;com.sun.star.sheet.SheetCellRanges&quot;)
+ &apos; Check if a Currency-Range has been selected
+ oLocRange = oDocument.CurrentController.Selection
+ bPreSelected = oLocRange.SupportsService(&quot;com.sun.star.sheet.SheetCellRange&quot;)
+ If bPreSelected Then
+ oSelRanges.InsertbyName(&quot;&quot;,oLocRange)
+ AddSelectedRangeToSelRangesEnum() = oLocRange
+ End If
+End Function
+
+
+Sub GetPreSelectedRange()
+Dim i as Integer
+Dim OldCurrSymbolList(2) as String
+Dim OldCurrIndex as Integer
+Dim OldCurExtension(2) as String
+ oPreSelRange = AddSelectedRangeToSelRangesEnum()
+
+ DialogModel.chkComplete.State = Abs(Not(bPreSelected))
+ If bPreSelected Then
+ DialogModel.optSelRange.State = 1
+ AddRangeToListbox(oPreSelRange)
+ Else
+ DialogModel.optCellTemplates.State = 1
+ CreateStyleEnumeration()
+ End If
+ EnableStep1DialogControls(True, bPreSelected, True)
+ DialogModel.optSelRange.Enabled = bPreSelected
+End Sub
+
+
+Sub AddRangeToListbox(oLocRange as Object)
+ EmptyListBox(DialogModel.lstSelection)
+ PreName = RetrieveRangeNamefromAddress(oLocRange)
+ AddSingleItemToListbox(DialogModel.lstSelection, Prename)&apos;, 0)
+ SelectListboxItem(DialogModel.lstCurrencies, CurrIndex)
+ TotCellCount = CountRangeCells(oLocRange)
+End Sub
+
+
+Sub CheckRangeSelection(Optional oEvent)
+ EmptySelection()
+ AddRangeToListbox(oPreSelRange)
+ oPreSelRange = AddSelectedRangeToSelRangesEnum()
+End Sub
+
+
+&apos; Checks if a Field (LocField) is already defined in an Array
+&apos; Returns &apos;True&apos; or &apos;False&apos;
+Function FieldinList(LocList(), MaxIndex as integer, ByVal LocField ) As Boolean
+Dim i as integer
+ LocField = Ucase(LocField)
+ For i = Lbound(LocList()) to MaxIndex
+ If Ucase(LocList(i)) = LocField then
+ FieldInList = True
+ Exit Function
+ End if
+ Next
+ FieldInList = False
+End Function
+
+
+Function CheckLocale(oLocale) as Boolean
+Dim i as Integer
+Dim LocCountry as String
+Dim LocLanguage as String
+ LocCountry = oLocale.Country
+ LocLanguage = oLocale.Language
+ For i = 0 To 1
+ If LocLanguage = LangIDValue(CurrIndex,i,0) AND LocCountry = LangIDValue(CurrIndex,i,1) Then
+ CheckLocale = True
+ Exit Function
+ End If
+ Next i
+ CheckLocale = False
+End Function
+
+
+Sub SetOptionValuestoNull()
+ With DialogModel
+ .optCellTemplates.State = 0
+ .optSheetRanges.State = 0
+ .optDocRanges.State = 0
+ .optSelRange.State = 0
+ End With
+End Sub
+
+
+
+Sub SetStatusLineText(sStsREPROTECT as String)
+ If Not IsNull(oStatusLine) Then
+ oStatusline.SetText(sStsREPROTECT)
+ End If
+End Sub
+</script:module> \ No newline at end of file
diff --git a/wizards/source/euro/DlgConvert.xdl b/wizards/source/euro/DlgConvert.xdl
new file mode 100644
index 000000000000..43bfeea34d9a
--- /dev/null
+++ b/wizards/source/euro/DlgConvert.xdl
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
+<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="DialogConvert" dlg:left="96" dlg:top="28" dlg:width="270" dlg:height="210" dlg:page="2" dlg:help-url="HID:34660" dlg:closeable="true" dlg:moveable="true">
+ <dlg:bulletinboard>
+ <dlg:text dlg:id="lblCurrencies" dlg:tab-index="1" dlg:left="170" dlg:top="39" dlg:width="89" dlg:height="8" dlg:value="lblCurrencies"/>
+ <dlg:checkbox dlg:id="chkComplete" dlg:tab-index="0" dlg:left="12" dlg:top="43" dlg:width="129" dlg:height="10" dlg:page="1" dlg:help-url="HID:34661" dlg:value="chkComplete" dlg:checked="true">
+ <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:Euro.ConvertRun.RetrieveEnableValue?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:checkbox>
+ <dlg:menulist dlg:id="lstCurrencies" dlg:tab-index="2" dlg:left="170" dlg:top="51" dlg:width="90" dlg:height="12" dlg:help-url="HID:34669" dlg:spin="true" dlg:linecount="12">
+ <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:Euro.Common.SelectCurrency?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:menulist>
+ <dlg:radiogroup>
+ <dlg:radio dlg:id="optCellTemplates" dlg:tab-index="3" dlg:left="12" dlg:top="96" dlg:width="129" dlg:height="10" dlg:page="1" dlg:help-url="HID:34662" dlg:value="optCellTemplates">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Euro.Soft.CreateStyleEnumeration?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:radio>
+ <dlg:radio dlg:id="optSheetRanges" dlg:tab-index="4" dlg:left="12" dlg:top="110" dlg:width="130" dlg:height="10" dlg:page="1" dlg:help-url="HID:34663" dlg:value="optSheetRanges">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Euro.Hard.CreateRangeList?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:radio>
+ <dlg:radio dlg:id="optDocRanges" dlg:tab-index="5" dlg:left="12" dlg:top="124" dlg:width="130" dlg:height="10" dlg:page="1" dlg:help-url="HID:34664" dlg:value="optDocRanges">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Euro.Hard.CreateRangeList?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:radio>
+ <dlg:radio dlg:id="optSelRange" dlg:tab-index="6" dlg:left="12" dlg:top="138" dlg:width="130" dlg:height="10" dlg:page="1" dlg:help-url="HID:34665" dlg:value="optSelRange">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Euro.ConvertRun.CheckRangeSelection?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:radio>
+ </dlg:radiogroup>
+ <dlg:text dlg:id="lblSelection" dlg:tab-index="7" dlg:left="170" dlg:top="84" dlg:width="73" dlg:height="8" dlg:page="1" dlg:value="lblSelection"/>
+ <dlg:menulist dlg:id="lstSelection" dlg:tab-index="8" dlg:left="170" dlg:top="96" dlg:width="90" dlg:height="52" dlg:page="1" dlg:help-url="HID:34666" dlg:multiselection="true">
+ <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:Euro.ConvertRun.SelectListItem?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:menulist>
+ <dlg:radiogroup>
+ <dlg:radio dlg:id="optSingleFile" dlg:tab-index="9" dlg:left="12" dlg:top="51" dlg:width="146" dlg:height="10" dlg:page="2" dlg:help-url="HID:34667" dlg:value="optSingleFile">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Euro.AutoPilotRun.SwapExtent?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:radio>
+ <dlg:radio dlg:id="optWholeDir" dlg:tab-index="10" dlg:left="12" dlg:top="65" dlg:width="146" dlg:height="10" dlg:page="2" dlg:help-url="HID:34668" dlg:value="optWholeDir" dlg:checked="true">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Euro.AutoPilotRun.SwapExtent?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:radio>
+ </dlg:radiogroup>
+ <dlg:textfield dlg:id="txtConfig" dlg:tab-index="11" dlg:left="6" dlg:top="50" dlg:width="258" dlg:height="55" dlg:page="3" dlg:vscroll="true" dlg:multiline="true" dlg:readonly="true"/>
+ <dlg:textfield dlg:id="txtSource" dlg:tab-index="12" dlg:left="80" dlg:top="82" dlg:width="165" dlg:height="12" dlg:page="2" dlg:help-url="HID:34670">
+ <script:event script:event-name="on-textchange" script:macro-name="vnd.sun.star.script:Euro.AutoPilotRun.ToggleGoOnButton?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:textfield>
+ <dlg:button dlg:id="cmdCallSourceDialog" dlg:tab-index="13" dlg:left="249" dlg:top="81" dlg:width="15" dlg:height="14" dlg:page="2" dlg:help-url="HID:34677" dlg:value="...">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Euro.AutoPilotRun.CallFilePicker?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:checkbox dlg:id="chkRecursive" dlg:tab-index="14" dlg:left="12" dlg:top="98" dlg:width="252" dlg:height="10" dlg:page="2" dlg:help-url="HID:34671" dlg:value="chkRecursive" dlg:checked="false"/>
+ <dlg:checkbox dlg:id="chkTextDocuments" dlg:tab-index="15" dlg:left="12" dlg:top="112" dlg:width="251" dlg:height="10" dlg:page="2" dlg:help-url="HID:34680" dlg:value="chkTextDocuments" dlg:checked="false"/>
+ <dlg:checkbox dlg:id="chkProtect" dlg:tab-index="16" dlg:left="12" dlg:top="126" dlg:width="251" dlg:height="10" dlg:page="2" dlg:help-url="HID:34679" dlg:value="chkProtect" dlg:checked="false"/>
+ <dlg:textfield dlg:id="txtTarget" dlg:tab-index="17" dlg:left="80" dlg:top="143" dlg:width="165" dlg:height="12" dlg:page="2" dlg:help-url="HID:34672"/>
+ <dlg:button dlg:id="cmdCallTargetDialog" dlg:tab-index="18" dlg:left="249" dlg:top="142" dlg:width="15" dlg:height="14" dlg:page="2" dlg:help-url="HID:34678" dlg:value="...">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Euro.AutoPilotRun.CallFolderPicker?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:progressmeter dlg:id="ProgressBar" dlg:tab-index="19" dlg:left="85" dlg:top="152" dlg:width="179" dlg:height="10" dlg:page="3"/>
+ <dlg:text dlg:id="lblHint" dlg:tab-index="20" dlg:left="6" dlg:top="166" dlg:width="258" dlg:height="20" dlg:value="lblHint" dlg:multiline="true"/>
+ <dlg:text dlg:id="lblTarget" dlg:tab-index="21" dlg:left="6" dlg:top="145" dlg:width="73" dlg:height="8" dlg:page="2" dlg:value="lblTarget"/>
+ <dlg:text dlg:id="lblSource" dlg:tab-index="22" dlg:left="6" dlg:top="84" dlg:width="73" dlg:height="8" dlg:page="2" dlg:value="lblSource"/>
+ <dlg:text dlg:id="lblCurProgress" dlg:tab-index="23" dlg:left="16" dlg:top="130" dlg:width="208" dlg:height="8" dlg:page="3"/>
+ <dlg:text dlg:id="lblRetrieval" dlg:tab-index="24" dlg:left="9" dlg:top="119" dlg:width="216" dlg:height="8" dlg:page="3" dlg:value="lblRetrieval"/>
+ <dlg:text dlg:id="lblConfig" dlg:tab-index="25" dlg:left="6" dlg:top="39" dlg:width="94" dlg:height="8" dlg:page="3" dlg:value="lblConfig"/>
+ <dlg:text dlg:id="lblCurDocument" dlg:tab-index="26" dlg:left="16" dlg:top="141" dlg:width="208" dlg:height="8" dlg:page="3"/>
+ <dlg:img dlg:id="imgPreview" dlg:tab-index="27" dlg:left="6" dlg:top="6" dlg:width="258" dlg:height="26" dlg:src="file:///D:/office630np/share/template/german/wizard/bitmap/euro_2.bmp"/>
+ <dlg:fixedline dlg:id="hlnSelection" dlg:tab-index="28" dlg:left="7" dlg:top="72" dlg:width="258" dlg:height="8" dlg:page="1" dlg:value="hlnSelection"/>
+ <dlg:fixedline dlg:id="hlnExtent" dlg:tab-index="29" dlg:left="6" dlg:top="39" dlg:width="156" dlg:height="8" dlg:page="2" dlg:value="hlnExtent"/>
+ <dlg:fixedline dlg:id="hlnProgress" dlg:tab-index="30" dlg:left="6" dlg:top="108" dlg:width="258" dlg:height="8" dlg:page="3" dlg:value="hlnProgress"/>
+ <dlg:fixedline dlg:id="FixedLine1" dlg:tab-index="31" dlg:left="6" dlg:top="152" dlg:width="258" dlg:height="9" dlg:page="1"/>
+ <dlg:text dlg:id="lblProgress" dlg:tab-index="32" dlg:left="6" dlg:top="153" dlg:width="79" dlg:height="8" dlg:page="3" dlg:value="lblProgress"/>
+ <dlg:button dlg:id="cmdCancel" dlg:tab-index="33" dlg:left="6" dlg:top="190" dlg:width="53" dlg:height="14" dlg:help-url="HID:34673" dlg:value="cmdCancel">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Euro.Common.CancelTask?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:button dlg:id="cmdHelp" dlg:tab-index="34" dlg:left="63" dlg:top="190" dlg:width="53" dlg:height="14" dlg:value="cmdHelp" dlg:button-type="help"/>
+ <dlg:button dlg:id="cmdBack" dlg:tab-index="35" dlg:left="155" dlg:top="190" dlg:width="53" dlg:height="14" dlg:help-url="HID:34675" dlg:value="cmdBack">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Euro.AutoPilotRun.PreviousStep?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:button dlg:id="cmdGoOn" dlg:tab-index="36" dlg:left="211" dlg:top="190" dlg:width="53" dlg:height="14" dlg:help-url="HID:34676" dlg:value="cmdGoOn">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Euro.Common.StartConversion?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ </dlg:bulletinboard>
+</dlg:window> \ No newline at end of file
diff --git a/wizards/source/euro/DlgPassword.xdl b/wizards/source/euro/DlgPassword.xdl
new file mode 100644
index 000000000000..def861d97ebe
--- /dev/null
+++ b/wizards/source/euro/DlgPassword.xdl
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
+<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="DlgPassword" dlg:left="77" dlg:top="93" dlg:width="310" dlg:height="65" dlg:closeable="true" dlg:moveable="true" dlg:title="DlgPassword">
+ <dlg:bulletinboard>
+ <dlg:button dlg:id="cmdGoOn" dlg:tab-index="0" dlg:left="251" dlg:top="6" dlg:width="53" dlg:height="14" dlg:help-url="HID:34690" dlg:value="cmdGoOn">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Euro.Protect.ReadPassword?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:button dlg:id="cmdCancel" dlg:tab-index="1" dlg:left="251" dlg:top="24" dlg:width="53" dlg:height="14" dlg:help-url="HID:34691" dlg:value="cmdCancel">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Euro.Protect.RejectPassword?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:button dlg:id="cmdHelp" dlg:tab-index="2" dlg:left="251" dlg:top="45" dlg:width="53" dlg:height="14" dlg:tag="34692" dlg:value="cmdHelp" dlg:button-type="help"/>
+ <dlg:textfield dlg:id="txtPassword" dlg:tab-index="3" dlg:left="11" dlg:top="18" dlg:width="232" dlg:height="12" dlg:help-url="HID:34693" dlg:echochar="*"/>
+ <dlg:fixedline dlg:id="hlnPassword" dlg:tab-index="4" dlg:left="6" dlg:top="6" dlg:width="238" dlg:height="8" dlg:value="hlnPassword"/>
+ </dlg:bulletinboard>
+</dlg:window> \ No newline at end of file
diff --git a/wizards/source/euro/Hard.xba b/wizards/source/euro/Hard.xba
new file mode 100644
index 000000000000..c500946bd9d5
--- /dev/null
+++ b/wizards/source/euro/Hard.xba
@@ -0,0 +1,229 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Hard" script:language="StarBasic">REM ***** BASIC *****
+Option Explicit
+
+
+Sub CreateRangeList()
+Dim MaxIndex as Integer
+ MaxIndex = -1
+ EnableStep1DialogControls(False, False, False)
+ EmptySelection()
+ DialogModel.lblSelection.Label = sCURRRANGES
+ EmptyListbox(DialogModel.lstSelection)
+ oDocument.CurrentController.Select(oSelRanges)
+ If (DialogModel.optSheetRanges.State = 1) AND (DialogModel.chkComplete.State &lt;&gt; 1) Then
+ &apos; Conversion on a sheet?
+ SetStatusLineText(sStsRELRANGES)
+ osheet = oDocument.CurrentController.GetActiveSheet
+ oRanges = osheet.CellFormatRanges.createEnumeration()
+ MaxIndex = AddSheetRanges(oRanges, MaxIndex, oSheet, False)
+ If MaxIndex &gt; -1 Then
+ ReDim Preserve RangeList(MaxIndex)
+ End If
+ Else
+ CreateRangeEnumeration(False)
+ bRangeListDefined = True
+ End If
+ EnableStep1DialogControls(True, True, True)
+ SetStatusLineText(&quot;&quot;)
+End Sub
+
+
+Sub CreateRangeEnumeration(bAutopilot as Boolean)
+Dim i as Integer
+Dim MaxIndex as integer
+Dim sStatustext as String
+ MaxIndex = -1
+ If Not bRangeListDefined Then
+ &apos; Cellranges are not yet defined
+ oSheets = oDocument.Sheets
+ For i = 0 To oSheets.Count-1
+ oSheet = oSheets.GetbyIndex(i)
+ If bAutopilot Then
+ IncreaseStatusValue(SBRELGET/osheets.Count)
+ Else
+ sStatustext = ReplaceString(sStsRELSHEETRANGES,Str(i+1),&quot;%1Number%1&quot;)
+ sStatustext = ReplaceString(sStatusText,oSheets.Count,&quot;%2TotPageCount%2&quot;)
+ SetStatusLineText(sStatusText)
+ End If
+ oRanges = osheet.CellFormatRanges.createEnumeration
+ MaxIndex = AddSheetRanges(oRanges, MaxIndex, oSheet, bAutopilot)
+ Next i
+ Else
+ If Not bAutoPilot Then
+ SetStatusLineText(sStsRELRANGES)
+ &apos; cellranges already defined
+ For i = 0 To Ubound(RangeList())
+ If RangeList(i) &lt;&gt; &quot;&quot; Then
+ AddSingleItemToListBox(DialogModel.lstSelection, RangeList(i))
+ End If
+ Next
+ End If
+ End If
+ If MaxIndex &gt; -1 Then
+ ReDim Preserve RangeList(MaxIndex)
+ Else
+ ReDim RangeList()
+ End If
+ Rangeindex = MaxIndex
+End Sub
+
+
+Function AddSheetRanges(oRanges as Object, r as Integer, oSheet as Object, bAutopilot)
+Dim RangeName as String
+Dim AddtoList as Boolean
+Dim iCurStep as Integer
+Dim MaxIndex as Integer
+ iCurStep = DialogModel.Step
+ While oRanges.hasMoreElements
+ oRange = oRanges.NextElement
+ AddToList = CheckFormatType(oRange)
+ If AddToList Then
+ RangeName = RetrieveRangeNamefromAddress(oRange)
+ TotCellCount = TotCellCount + CountRangeCells(oRange)
+ If Not bAutoPilot Then
+ AddSingleItemToListbox(DialogModel.lstSelection, RangeName)
+ End If
+ &apos; The Ranges are only passed to an Array when the whole Document is the basis
+ &apos; Redimension the RangeList Array if necessary
+ MaxIndex = Ubound(RangeList())
+ r = r + 1
+ If r &gt; MaxIndex Then
+ MaxIndex = MaxIndex + SBRANGEUBOUND
+ ReDim Preserve RangeList(MaxIndex)
+ End If
+ RangeList(r) = RangeName
+ End If
+ Wend
+ AddSheetRanges = r
+End Function
+
+
+&apos; adds a section to the collection
+Sub SelectRange()
+Dim i as Integer
+Dim RangeName as String
+Dim SelItem as String
+Dim CurRange as String
+Dim SheetRangeName as String
+Dim DescriptionList() as String
+Dim MaxRangeIndex as Integer
+Dim StatusValue as Integer
+ StatusValue = 0
+ MaxRangeIndex = Ubound(SelRangeList())
+ CurSheetName = oSheet.Name
+ For i = 0 To MaxRangeIndex
+ SelItem = SelRangeList(i)
+ &apos; Is the Range already included in the collection?
+ oRange = RetrieveRangeoutOfRangename(SelItem)
+ TotCellCount = TotCellCount + CountRangeCells(oRange)
+ DescriptionList() = ArrayOutofString(SelItem,&quot;.&quot;,1)
+ SheetRangeName = DeleteStr(DescriptionList(0),&quot;&apos;&quot;)
+ If SheetRangeName = CurSheetName Then
+ oSelRanges.InsertbyName(&quot;&quot;,oRange)
+ End If
+ IncreaseStatusValue(SBRELGET/MaxRangeIndex)
+ Next i
+End Sub
+
+
+Sub ConvertThehardWay(ListboxList(), SwitchFormat as Boolean, bRemove as Boolean)
+Dim i as Integer
+Dim AddCells as Long
+Dim OldStatusValue as Single
+Dim RangeName as String
+Dim LastIndex as Integer
+Dim oSelListbox as Object
+
+ oSelListbox = DialogConvert.GetControl(&quot;lstSelection&quot;)
+ Lastindex = Ubound(ListboxList())
+ If TotCellCount &gt; 0 Then
+ OldStatusValue = StatusValue
+ &apos; hard format
+ For i = 0 To LastIndex
+ RangeName = ListboxList(i)
+ oRange = RetrieveRangeoutofRangeName(RangeName)
+ ConvertCellCurrencies(oRange)
+ If bRemove Then
+ If oSelRanges.HasbyName(RangeName) Then
+ oSelRanges.RemovebyName(RangeName)
+ oDocument.CurrentController.Select(oSelRanges)
+ End If
+ End If
+ If SwitchFormat Then
+ If oRange.getPropertyState(&quot;NumberFormat&quot;) &lt;&gt; 1 Then
+ &apos; Range is hard formatted
+ SwitchNumberFormat(oRange, oFormats, sEuroSign)
+ End If
+ Else
+ SwitchNumberFormat(oRange, oFormats, sEuroSign)
+ End If
+ AddCells = CountRangeCells(oRange)
+ CurCellCount = AddCells
+ IncreaseStatusValue((CurCellCount/TotCellCount)*(100-OldStatusValue))
+ If bRemove Then
+ RemoveListBoxItemByName(oSelListbox.Model,Rangename)
+ End If
+ Next
+ End If
+End Sub
+
+
+Sub ConvertCellCurrencies(oRange as Object)
+Dim oValues as Object
+Dim oCells as Object
+Dim oCell as Object
+ oValues = oRange.queryContentCells(com.sun.star.sheet.CellFlags.VALUE)
+ If (oValues.Count &gt; 0) Then
+ oCells = oValues.Cells.createEnumeration
+ While oCells.hasMoreElements
+ oCell = oCells.nextElement
+ ModifyObjectValuewithCurrFactor(oCell)
+ Wend
+ End If
+End Sub
+
+
+Sub ModifyObjectValuewithCurrFactor(oDocObject as Object)
+Dim oDocObjectValue as double
+ oDocObjectValue = oDocObject.Value
+ oDocObject.Value = Round(oDocObjectValue/CurrFactor, 2)
+End Sub
+
+
+Function CheckIfRangeisCurrency(FormatObject as Object)
+Dim oFormatofObject() as Object
+ &apos; Retrieve the Format of the Object
+ On Local Error GoTo NOKEY
+ oFormatofObject() = oFormats.getByKey(FormatObject.NumberFormat)
+ On Local Error GoTo 0
+ CheckIfRangeIsCurrency = INT(oFormatofObject.Type) AND com.sun.star.util.NumberFormat.CURRENCY
+ Exit Function
+NOKEY:
+ CheckIfRangeisCurrency = False
+ Resume CLERROR
+ CLERROR:
+End Function
+
+
+Function CountColumnsForRow(IndexArray() as String, Row as Integer)
+Dim i as Integer
+Dim NoNulls as Boolean
+ For i = 1 To Ubound(IndexArray,2)
+ If IndexArray(Row,i)= &quot;&quot; Then
+ NoNulls = False
+ Exit For
+ End If
+ Next
+ CountColumnsForRow = i
+End Function
+
+
+Function CountRangeCells(oRange as Object) As Long
+Dim oRangeAddress as Object
+Dim LocCellCount as Long
+ oRangeAddress = oRange.RangeAddress
+ LocCellCount = (oRangeAddress.EndColumn - oRangeAddress.StartColumn + 1) * (oRangeAddress.EndRow - oRangeAddress.StartRow + 1)
+ CountRangeCells = LocCellCount
+End Function</script:module> \ No newline at end of file
diff --git a/wizards/source/euro/Init.xba b/wizards/source/euro/Init.xba
new file mode 100644
index 000000000000..45fdafdbafe5
--- /dev/null
+++ b/wizards/source/euro/Init.xba
@@ -0,0 +1,604 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Init" script:language="StarBasic">Option Explicit
+REM ***** BASIC *****
+
+
+
+Public Const SBRANGEUBOUND = 20
+Public StyleRangeAssignmentList(SBRANGEUBOUND)as String
+Public SelRangeList(SBRANGEUBOUND) as String
+Public RangeList(SBRANGEUBOUND) as String
+Public UnprotectList() as String
+Public FilterNames(2,1) as String
+Public bDoUnProtect as Boolean
+Public bCancelTask as Boolean
+
+Public sREADY as String
+Public sPROTECT as String
+Public sCONTINUE as String
+
+Public sSELTEMPL as String
+Public sSELCELL as String
+Public sCURRRANGES as String
+Public sTEMPLATES as String
+
+Public sSOURCEFILE as String
+Public sSOURCEDIR as String
+Public sTARGETDIR as String
+
+Public sStsPROGRESS as String
+Public sStsCELLPROGRSS as String
+Public sStsRELRANGES as String
+Public sStsRELSHEETRANGES as String
+Public sStsREPROTECT as String
+
+Public sMsgSELDIR as String
+Public sMsgSELFILE as String
+Public sMsgTARGETDIR as String
+Public sMsgNOTTHERE as String
+Public sMsgDLGTITLE as String
+Public sMsgUNPROTECT as String
+Public sMsgPWPROTECT as String
+Public sMsgWRONGPW as String
+Public sMsgSHEETPROTECTED as String
+Public sMsgWARNING as String
+Public sMsgSHEETSNOPROTECT as String
+Public sMsgSHEETNOPROTECT as String
+Public sMsgCHOOSECURRENCY as String
+Public sMsgPASSWORD as String
+Public sMsgOK as String
+Public sMsgCANCEL as String
+Public sMsgFileInvalid as String
+Public sMsgNODIRECTORY as String
+Public sMsgDOCISREADONLY as String
+Public sMsgFileExists as String
+Public sMsgCancelConversion as String
+Public sMsgCancelTitle as String
+Public sCurrPORTUGUESE as String
+Public sCurrDUTCH as String
+Public sCurrFRENCH as String
+Public sCurrSPANISH as String
+Public sCurrITALIAN as String
+Public sCurrGERMAN as String
+Public sCurrBELGIAN as String
+Public sCurrIRISH as String
+Public sCurrLUXEMBOURG as String
+Public sCurrAUSTRIAN as String
+Public sCurrFINNISH as String
+Public sCurrGREEK as String
+Public sCurrSLOVENIAN as String
+Public sCurrCYPRIOT as String
+Public sCurrMALTESE as String
+Public sCurrSLOVAK as String
+Public sCurrUNKNOWN as String
+Public sCurrSYSUNKNOWN as String
+
+Public sPrgsRETRIEVAL as String
+Public sPrgsCONVERTING as String
+Public sPrgsUNPROTECT as String
+Public sInclusiveSubDir as String
+
+Public Const SBCOUNTRYCOUNT = 15
+Public CurMimeType as String
+Public CurCellCount as Long
+Public oSheets as Object
+Public oStyles as Object
+Public oStyle as Object
+Public oFormats as Object
+Public aSimpleStr as String
+Public nSimpleKey as Long
+Public aFormat() as Variant
+Public oRanges as Object
+Public oRange as Object
+Public nLanguage as integer
+Public nFormatLanguage as integer
+Public aCellFormat as Variant
+Public oDocument as Object
+Public StartCol, StartRow, EndCol, EndRow as String
+Public oSheet as Object
+Public IntStartCol, IntStartRow, IntEndCol, IntEndRow as integer
+Public oSelRanges as Object
+Public nFormatType as Integer
+Public sFormatCurrency as String
+Public sFormatLanguage as String
+Public CurSheetName as String
+Public oStatusLine as Object
+Public Const SBRELGET = 50
+Public StatusValue as Single
+Public TotCellCount as Long
+Public StyleIndex as Integer
+Public RangeIndex as Integer
+Public CurrIndex as Integer
+Public ActLangNumber(1) as Integer
+Public CurExtension(2) as String
+Public Currfactor as Double
+Public CurrSymbolList(2) as String
+Public CurrLanguage as String
+Public CurrValue(15,5)
+Public LangIDValue(15,2,2) as String
+Public PreName as String
+Public Separator as String
+Public BitmapDir as String
+Public TypeIndex as Integer, CSIndex as Integer, LangIndex as Integer, FSIndex as Integer
+Public oLocale as New com.sun.star.lang.Locale
+Public sEuroSign as String
+Public oPointer as Object
+Public sDocType as String
+Public bPreSelected as Boolean
+Public bRecursive as Boolean
+Public bCancelProtection as Boolean
+Public CurrRoundMode as Boolean
+Public bRangeListDefined as Boolean
+Public bDocHasProtectedSheets as Boolean
+Public sGOON as String
+Public sHELP as String
+Public sCANCEL as String
+Dim sEnd as String
+
+Sub InitializeResources()
+Dim LocWorkPath as String
+ With DialogModel
+ &apos; Strings that are also needed by the Password Dialog
+ sGoOn = GetResText(1003)
+ sHelp = GetResText(1001)
+ sCANCEL = GetResText(1418)
+ sEnd = GetResText(1000)
+ sPROTECT = GetResText(1005)
+ sCONTINUE = GetResText(1007)
+ sSELTEMPL = GetResText(1106)
+ sSELCELL = GetResText(1107)
+ sCURRRANGES = GetResText(1108)
+ sTEMPLATES = GetResText(1109)
+ sStsPROGRESS = GetResText(1300)
+ sStsCELLPROGRSS = GetResText(1301)
+ sStsRELSHEETRANGES = GetResText(1302)
+ sStsRELRANGES = GetResText(1303)
+ sStsREPROTECT = GetResText(1304)
+ sREADY = GetResText(1400)
+ sMsgSELDIR = GetResText(1401)
+ sMsgSELFILE = GetResText(1402)
+ sMsgTARGETDIR = GetResText(1403)
+ sMsgNOTTHERE = GetResText(1404)
+ sMsgDLGTITLE = GetResText(1405)
+ sMsgUNPROTECT = GetResText(1406)
+ sMsgPWPROTECT = GetResText(1407)
+ sMsgWRONGPW = GetResText(1408)
+ sMsgSHEETPROTECTED = GetResText(1409)
+ sMsgWARNING = GetResText(1410)
+ sMsgSHEETSNOPROTECT = GetResText(1411)
+ sMsgSHEETNOPROTECT = GetResText(1412)
+ sMsgCHOOSECURRENCY = GetResText(1415)
+ sMsgPASSWORD = GetResText(1416)
+ sMsgOK = GetResText(1417)
+ sMsgCANCEL = GetResText(1418)
+ sMsgFILEINVALID = GetResText(1419)
+ sMsgFILEINVALID = ReplaceString(sMsgFILEINVALID,&quot;%PRODUCTNAME&quot;, GetProductname())
+ SMsgNODIRECTORY = GetResText(1420)
+ sMsgDOCISREADONLY = GetResText(1421)
+ sMsgFileExists = GetResText(1422)
+ sMsgCancelConversion = GetResText(1423)
+ sMsgCancelTitle = GetResText(1424)
+ sCurrPORTUGUESE = GetResText(1500)
+ sCurrDUTCH = GetResText(1501)
+ sCurrFRENCH = GetResText(1502)
+ sCurrSPANISH = GetResText(1503)
+ sCurrITALIAN = GetResText(1504)
+ sCurrGERMAN = GetResText(1505)
+ sCurrBELGIAN = GetResText(1506)
+ sCurrIRISH = GetResText(1507)
+ sCurrLUXEMBOURG = GetResText(1508)
+ sCurrAUSTRIAN = GetResText(1509)
+ sCurrFINNISH = GetResText(1510)
+ sCurrGREEK = GetResText(1511)
+ sCurrSLOVENIAN = GetResText(1512)
+ sCurrCYPRIOT = GetResText(1513)
+ sCurrMALTESE = GetResText(1514)
+ sCurrSLOVAK = GetResText(1515)
+ sCurrUNKNOWN = GetResText(1516)
+ sCurrSYSUNKNOWN = GetResText(1517)
+ .cmdCancel.Label = sCANCEL
+ .cmdHelp.Label = sHELP
+ .cmdBack.Label = GetResText(1002)
+ .cmdGoOn.Label = sGOON
+ .lblHint.Label = GetResText(1004)
+ .lblCurrencies.Label = GetResText(1006)
+ .cmdBack.Enabled = False
+ If .Step = 1 Then
+ .chkComplete.Label = GetResText(1100)
+ .hlnSelection.Label = GetResText(1101)
+ .optCellTemplates.Label = GetResText(1102)
+ .optSheetRanges.Label = GetResText(1103)
+ .optDocRanges.Label = GetResText(1104)
+ .optSelRange.Label = GetResText(1105)
+ sCURRRANGES = GetResText(1108)
+ .lblSelection.Label = sCURRRANGES
+ Else
+ .lblProgress.Label = sStsPROGRESS
+ .hlnExtent.Label = GetResText(1200)
+ .optSingleFile.Label = GetResText(1201)
+ .optWholeDir.Label = GetResText(1202)
+ .chkProtect.Label = GetResText(1207)
+ .chkTextDocuments.Label = GetResText(1210)
+
+ sSOURCEFILE = GetResText(1203)
+ sSOURCEDIR = GetResText(1204)
+ .lblSource.Label = sSOURCEDIR
+ sInclusiveSubDir = GetResText(1205)
+ .chkRecursive.Label = sInclusiveSubDir
+ sTARGETDIR = GetResText(1206)
+ .lblTarget.Label = STARGETDIR
+
+ LocWorkPath = GetPathSettings(&quot;Work&quot;)
+ If Not oUcb.Exists(LocWorkPath) Then
+ ShowNoOfficePathError()
+ Stop
+ End If
+
+ .txtSource.Text = ConvertfromUrl(LocWorkPath)
+
+ SubstDir = .txtSource.Text
+ .txtTarget.Text = .txtSource.Text
+ .hlnProgress.Label = GetResText(1600)
+ .lblConfig.Label = GetResText(1603)
+ sPrgsRETRIEVAL = GetResText(1601)
+ sPrgsCONVERTING = GetResText(1602)
+ sPrgsUNPROTECT = GetResText(1604)
+ End If
+ End With
+End Sub
+
+Sub InitializeLanguages()
+ sEuroSign = chr(8364)
+
+&apos; CURRENCIES_PORTUGUESE
+ LangIDValue(0,0,0) = &quot;pt&quot;
+ LangIDValue(0,0,1) = &quot;&quot;
+ LangIDValue(0,0,2) = &quot;-816&quot;
+
+&apos; CURRENCIES_DUTCH
+ LangIDValue(1,0,0) = &quot;nl&quot;
+ LangIDValue(1,0,1) = &quot;&quot;
+ LangIDValue(1,0,2) = &quot;-413&quot;
+
+&apos; CURRENCIES_FRENCH
+ LangIDValue(2,0,0) = &quot;fr&quot;
+ LangIDValue(2,0,1) = &quot;&quot;
+ LangIDValue(2,0,2) = &quot;-40C&quot;
+
+&apos; CURRENCIES_SPANISH
+ LangIDValue(3,0,0) = &quot;es&quot;
+ LangIDValue(3,0,1) = &quot;&quot;
+ LangIDValue(3,0,2) = &quot;-40A&quot;
+
+ &apos;Spanish modern
+ LangIDValue(3,1,0) = &quot;es&quot;
+ LangIDValue(3,1,1) = &quot;&quot;
+ LangIDValue(3,1,2) = &quot;-C0A&quot;
+
+ &apos;Spanish katalanic
+ LangIDValue(3,2,0) = &quot;es&quot;
+ LangIDValue(3,2,1) = &quot;&quot;
+ LangIDValue(3,2,2) = &quot;-403&quot;
+
+&apos; CURRENCIES_ITALIAN
+ LangIDValue(4,0,0) = &quot;it&quot;
+ LangIDValue(4,0,1) = &quot;&quot;
+ LangIDValue(4,0,2) = &quot;-410&quot;
+
+&apos; CURRENCIES_GERMAN
+ LangIDValue(5,0,0) = &quot;de&quot;
+ LangIDValue(5,0,1) = &quot;DE&quot;
+ LangIDValue(5,0,2) = &quot;-407&quot;
+
+&apos; CURRENCIES_BELGIAN
+ LangIDValue(6,0,0) = &quot;fr&quot;
+ LangIDValue(6,0,1) = &quot;BE&quot;
+ LangIDValue(6,0,2) = &quot;-80C&quot;
+
+ LangIDValue(6,1,0) = &quot;nl&quot;
+ LangIDValue(6,1,1) = &quot;BE&quot;
+ LangIDValue(6,1,2) = &quot;-813&quot;
+
+&apos; CURRENCIES_IRISH
+ LangIDValue(7,0,0) = &quot;en&quot;
+ LangIDValue(7,0,1) = &quot;IE&quot;
+ LangIDValue(7,0,2) = &quot;-1809&quot;
+
+ LangIDValue(7,1,0) = &quot;ga&quot;
+ LangIDValue(7,1,1) = &quot;IE&quot;
+ LangIDValue(7,1,2) = &quot;-83C&quot;
+
+&apos; CURRENCIES_LUXEMBOURG
+ LangIDValue(8,0,0) = &quot;fr&quot;
+ LangIDValue(8,0,1) = &quot;LU&quot;
+ LangIDValue(8,0,2) = &quot;-140C&quot;
+
+ LangIDValue(8,1,0) = &quot;de&quot;
+ LangIDValue(8,1,1) = &quot;LU&quot;
+ LangIDValue(8,1,2) = &quot;-1007&quot;
+
+&apos; CURRENCIES_AUSTRIAN
+ LangIDValue(9,0,0) = &quot;de&quot;
+ LangIDValue(9,0,1) = &quot;AT&quot;
+ LangIDValue(9,0,2) = &quot;-C07&quot;
+
+&apos; CURRENCIES_FINNISH
+ LangIDValue(10,0,0) = &quot;fi&quot;
+ LangIDValue(10,0,1) = &quot;FI&quot;
+ LangIDValue(10,0,2) = &quot;-40B&quot;
+
+ LangIDValue(10,1,0) = &quot;sv&quot;
+ LangIDValue(10,1,1) = &quot;FI&quot;
+ LangIDValue(10,1,2) = &quot;-81D&quot;
+
+&apos; CURRENCIES_GREEK
+ LangIDValue(11,0,0) = &quot;el&quot;
+ LangIDValue(11,0,1) = &quot;GR&quot;
+ LangIDValue(11,0,2) = &quot;-408&quot;
+
+&apos; CURRENCIES_SLOVENIAN
+ LangIDValue(12,0,0) = &quot;sl&quot;
+ LangIDValue(12,0,1) = &quot;SI&quot;
+ LangIDValue(12,0,2) = &quot;-424&quot;
+
+&apos; CURRENCIES_CYPRIOT
+ LangIDValue(13,0,0) = &quot;el&quot;
+ LangIDValue(13,0,1) = &quot;CY&quot;
+ LangIDValue(13,0,2) = &quot;-408&quot;
+
+&apos; CURRENCIES_MALTESE
+ LangIDValue(14,0,0) = &quot;mt&quot;
+ LangIDValue(14,0,1) = &quot;MT&quot;
+ LangIDValue(14,0,2) = &quot;-43A&quot;
+
+&apos; CURRENCIES_SLOVAK
+ LangIDValue(15,0,0) = &quot;sk&quot;
+ LangIDValue(15,0,1) = &quot;SK&quot;
+ LangIDValue(15,0,2) = &quot;-41B&quot;
+
+End Sub
+
+
+
+Sub InitializeCurrencies()
+Dim i as Integer
+ GoOn = True
+
+ CurrValue(0,0) = sCurrPORTUGUESE
+ &apos; real conversion rate
+ CurrValue(0,1) = 200.482
+ &apos; rounded conversion rate
+ CurrValue(0,2) = 200
+ CurrValue(0,3) = &quot;Esc.&quot;
+ CurrValue(0,4) = &quot;Esc.&quot;
+ CurrValue(0,5) = &quot;PTE&quot;
+
+ CurrValue(1,0) = sCurrDUTCH
+ &apos; real conversion rate
+ CurrValue(1,1) = 2.20371
+ &apos; rounded conversion rate
+ CurrValue(1,2) = 2
+ CurrValue(1,3) = &quot;F&quot;
+ CurrValue(1,4) = &quot;fl&quot;
+ CurrValue(1,5) = &quot;NLG&quot;
+
+ CurrValue(2,0) = sCurrFRENCH
+ &apos; real conversion rate
+ CurrValue(2,1) = 6.55957
+ &apos; rounded conversion rate
+ CurrValue(2,2) = 7
+ CurrValue(2,3) = &quot;F&quot;
+ CurrValue(2,4) = &quot;F&quot;
+ CurrValue(2,5) = &quot;FRF&quot;
+
+ CurrValue(3,0) = sCurrSPANISH
+ &apos; real conversion rate
+ CurrValue(3,1) = 166.386
+ &apos; rounded conversion rate
+ CurrValue(3,2) = 170
+ CurrValue(3,3) = &quot;Pts&quot;
+ CurrValue(3,4) = &quot;Pts&quot;
+ CurrValue(3,5) = &quot;ESP&quot;
+
+ CurrValue(4,0) = sCurrITALIAN
+ &apos; real conversion rate
+ CurrValue(4,1) = 1936.27
+ &apos; rounded conversion rate
+ CurrValue(4,2) = 2000
+ CurrValue(4,3) = &quot;L.&quot;
+ CurrValue(4,4) = &quot;L.&quot;
+ CurrValue(4,5) = &quot;ITL&quot;
+
+ CurrValue(5,0) = sCurrGERMAN
+ &apos; real conversion rate
+ CurrValue(5,1) = 1.95583
+ &apos; rounded conversion rate
+ CurrValue(5,2) = 2
+ CurrValue(5,3) = &quot;DM&quot;
+ CurrValue(5,4) = &quot;DM&quot;
+ CurrValue(5,5) = &quot;DEM&quot;
+
+ CurrValue(6,0) = sCurrBELGIAN
+ &apos; real conversion rate
+ CurrValue(6,1) = 40.3399
+ &apos; rounded conversion rate
+ CurrValue(6,2) = 40
+ CurrValue(6,3) = &quot;FB&quot;
+ CurrValue(6,4) = &quot;BF&quot;
+ CurrValue(6,5) = &quot;BEF&quot;
+
+ CurrValue(7,0) = sCurrIRISH
+ &apos; real conversion rate
+ CurrValue(7,1) = 0.787564
+ &apos; rounded conversion rate
+ CurrValue(7,2) = 0.8
+ CurrValue(7,3) = &quot;IR£&quot;
+ CurrValue(7,4) = &quot;£&quot;
+ CurrValue(7,5) = &quot;IEP&quot;
+
+ CurrValue(8,0) = sCurrLUXEMBOURG
+ &apos; real conversion rate
+ CurrValue(8,1) = 40.3399
+ &apos; rounded conversion rate
+ CurrValue(8,2) = 40
+ CurrValue(8,3) = &quot;F&quot;
+ CurrValue(8,4) = &quot;F&quot;
+ CurrValue(8,5) = &quot;LUF&quot;
+
+ CurrValue(9,0) = sCurrAUSTRIAN
+ &apos; real conversion rate
+ CurrValue(9,1) = 13.7603
+ &apos; rounded conversion rate
+ CurrValue(9,2) = 15
+ CurrValue(9,3) = &quot;öS&quot;
+ CurrValue(9,4) = &quot;S&quot;
+ CurrValue(9,5) = &quot;ATS&quot;
+
+ CurrValue(10,0) = sCurrFINNISH
+ &apos; real conversion rate
+ CurrValue(10,1) = 5.94573
+ &apos; rounded conversion rate
+ CurrValue(10,2) = 6
+ CurrValue(10,3) = &quot;mk&quot;
+ CurrValue(10,4) = &quot;mk&quot;
+ CurrValue(10,5) = &quot;FIM&quot;
+
+ CurrValue(11,0) = sCurrGREEK
+ &apos; real conversion rate
+ CurrValue(11,1) = 340.750
+ &apos; rounded conversion rate
+ CurrValue(11,2) = 400
+ CurrValue(11,3) = chr(916) &amp; chr(961) &amp; chr(967)
+ CurrValue(11,4) = chr(916) &amp; chr(961) &amp; chr(967)
+ CurrValue(11,5) = &quot;GRD&quot;
+
+ CurrValue(12,0) = sCurrSLOVENIAN
+ &apos; real conversion rate
+ CurrValue(12,1) = 239.64
+ &apos; rounded conversion rate
+ CurrValue(12,2) = 240
+ CurrValue(12,3) = &quot;SIT&quot;
+ CurrValue(12,4) = &quot;SIT&quot;
+ CurrValue(12,5) = &quot;SIT&quot;
+
+ CurrValue(13,0) = sCurrCYPRIOT
+ &apos; real conversion rate
+ CurrValue(13,1) = 0.585274
+ &apos; rounded conversion rate
+ CurrValue(13,2) = 0.6
+ CurrValue(13,3) = &quot;£C&quot;
+ CurrValue(13,4) = &quot;£&quot;
+ CurrValue(13,5) = &quot;CYP&quot;
+
+ CurrValue(14,0) = sCurrMALTESE
+ &apos; real conversion rate
+ CurrValue(14,1) = 0.429300
+ &apos; rounded conversion rate
+ CurrValue(14,2) = 0.4
+ CurrValue(14,3) = chr(8356)
+ CurrValue(14,4) = &quot;Lm&quot;
+ CurrValue(14,5) = &quot;MTL&quot;
+
+ CurrValue(15,0) = sCurrSLOVAK
+ &apos; real conversion rate
+ CurrValue(15,1) = 30.1260
+ &apos; rounded conversion rate
+ CurrValue(15,2) = 30
+ CurrValue(15,3) = &quot;Sk&quot;
+ CurrValue(15,4) = &quot;Sk&quot;
+ CurrValue(15,5) = &quot;SKK&quot;
+
+ i = -1
+ CurrSymbolList(0) = &quot;&quot;
+ CurrSymbolList(1) = &quot;&quot;
+ InitializeCurrencyValues(CurrIndex)
+End Sub
+
+
+Sub InitializeControls()
+ If CurrIndex = -1 Then
+ If DialogModel.Step = 1 Then
+ EnableStep1DialogControls(True, False, False)
+ ElseIf DialogModel.Step = 2 Then
+ EnableStep2DialogControls(True)
+ End If
+ End If
+End Sub
+
+
+Sub InitializeConverter(oLocale, iDialogPage as Integer)
+Dim Isthere as Boolean
+ bCancelProtection = False
+ bRangeListDefined = False
+ PWIndex = -1
+ If iDialogPage = 1 Then
+ ToggleWindow(False)
+ sDocType = Tools.GetDocumentType(ThisComponent)
+ If sDocType = &quot;sCalc&quot; Then
+ bDocHasProtectedSheets = CheckSheetProtection(oSheets)
+ End If
+ oStatusline = ThisComponent.GetCurrentController.GetFrame.CreateStatusIndicator()
+ End If
+ DialogConvert = LoadDialog(&quot;Euro&quot;, &quot;DlgConvert&quot;)
+ DialogModel = DialogConvert.Model
+ DialogPassword = LoadDialog(&quot;Euro&quot;, &quot;DlgPassword&quot;)
+ PasswordModel = DialogPassword.Model
+ DialogModel.Step = iDialogPage
+ InitializeResources()
+ InitializeLanguages()
+ InitializeLocales(oLocale)
+ InitializeCurrencies()
+ InitializeControls()
+ BitmapDir = GetOfficeSubPath(&quot;Template&quot;, &quot;wizard/bitmap&quot;)
+ If BitmapDir = &quot;&quot; Then
+ Stop
+ End If
+ FillUpCurrencyListbox()
+ DialogModel.imgPreview.ImageUrl = BitmapDir &amp; &quot;euro_&quot; &amp; DialogModel.Step &amp; &quot;.bmp&quot;
+ DialogConvert.Title = sMsgDLGTITLE
+ DialogModel.cmdGoOn.DefaultButton = True
+ If iDialogPage = 1 Then
+ ToggleWindow(True)
+ End If
+End Sub
+
+
+Sub InitializeCurrencyValues(CurrIndex)
+ If CurrIndex &lt;&gt; -1 Then
+ CurrLanguage = CurrValue(CurrIndex,0)
+ CurrFactor = CurrValue(CurrIndex,1)
+ CurrSymbolList(0) = CurrValue(CurrIndex,3)
+ CurrSymbolList(1) = CurrValue(CurrIndex,4)
+ CurrSymbolList(2) = CurrValue(CurrIndex,5)
+ End If
+End Sub
+
+
+Function InitializeLocales(oLocale) as Boolean
+Dim i as Integer, n as Integer, m as Integer
+Dim sLanguage as String, sCountry as String
+Dim bTakeThisLocale as Boolean
+ sLanguage = oLocale.Language
+ sCountry = oLocale.Country
+ For n = 0 To SBCOUNTRYCOUNT - 1
+ For m = 0 TO 1
+ If DialogModel.Step = 2 Then
+ bTakeThisLocale = LangIDValue(n,m,0) = sLanguage
+ Else
+ bTakeThisLocale = LangIDValue(n,m,0) = sLanguage
+ End If
+ If bTakeThisLocale Then
+ CurrIndex = n
+ For i = 0 To 2
+ CurExtension(i) = LangIDValue(CurrIndex,i,2)
+ Next i
+ InitializeLocales = True
+ Exit Function
+ End If
+ Next m
+ Next n
+ CurrIndex = -1
+ InitializeLocales = False
+End Function
+</script:module>
diff --git a/wizards/source/euro/Protect.xba b/wizards/source/euro/Protect.xba
new file mode 100644
index 000000000000..8a852e9c3e5c
--- /dev/null
+++ b/wizards/source/euro/Protect.xba
@@ -0,0 +1,175 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Protect" script:language="StarBasic">REM ***** BASIC *****
+Option Explicit
+
+Public PWIndex as Integer
+
+
+Function UnprotectSheetsWithPassWord(oSheets as Object, bDoUnProtect as Boolean)
+Dim i as Integer
+Dim MaxIndex as Integer
+Dim iMsgResult as Integer
+ PWIndex = -1
+ If bDocHasProtectedSheets Then
+ If Not bDoUnprotect Then
+ &apos; At First query if sheets shall generally be unprotected
+ iMsgResult = Msgbox(sMsgUNPROTECT,36,sMsgDLGTITLE)
+ bDoUnProtect = iMsgResult = 6
+ End If
+ If bDoUnProtect Then
+ MaxIndex = oSheets.Count-1
+ For i = 0 To MaxIndex
+ bDocHasProtectedSheets = Not UnprotectSheet(oSheets(i))
+ If bDocHasProtectedSheets Then
+ ReprotectSheets()
+ Exit For
+ End If
+ Next i
+ If PWIndex = -1 Then
+ ReDim UnProtectList() as String
+ Else
+ ReDim Preserve UnProtectList(PWIndex) as String
+ End If
+ Else
+ Msgbox (sMsgSHEETSNOPROTECT, 64, sMsgDLGTITLE)
+ End If
+ End If
+ UnProtectSheetsWithPassword = bDocHasProtectedSheets
+End Function
+
+
+Function UnprotectSheet(oListSheet as Object)
+Dim ListSheetName as String
+Dim sStatustext as String
+Dim i as Integer
+Dim bOneSheetIsUnprotected as Boolean
+ i = -1
+ ListSheetName = oListSheet.Name
+ If oListSheet.IsProtected Then
+ oListSheet.Unprotect(&quot;&quot;)
+ If oListSheet.IsProtected Then
+ &apos; Sheet is protected by a Password
+ bOneSheetIsUnProtected = UnprotectSheetWithDialog(oListSheet, ListSheetName)
+ UnProtectSheet() = bOneSheetIsUnProtected
+ Else
+ &apos; The Sheet could be unprotected without a password
+ AddSheettoUnprotectionlist(ListSheetName,&quot;&quot;)
+ UnprotectSheet() = True
+ End If
+ Else
+ UnprotectSheet() = True
+ End If
+End Function
+
+
+Function UnprotectSheetWithDialog(oListSheet as Object, ListSheetName as String) as Boolean
+Dim PWIsCorrect as Boolean
+Dim QueryText as String
+ oDocument.CurrentController.SetActiveSheet(oListSheet)
+ QueryText = ReplaceString(sMsgPWPROTECT,&quot;&apos;&quot; &amp; ListSheetName &amp; &quot;&apos;&quot;, &quot;%1TableName%1&quot;)
+ &apos;&quot;Please insert the password to unprotect the sheet &apos;&quot; &amp; ListSheetName&apos;&quot;
+ Do
+ ExecutePasswordDialog(QueryText)
+ If bCancelProtection Then
+ bCancelProtection = False
+ Msgbox (sMsgSHEETSNOPROTECT, 64, sMsgDLGTITLE)
+ UnprotectSheetWithDialog() = False
+ exit Function
+ End If
+ oListSheet.Unprotect(Password)
+ If oListSheet.IsProtected Then
+ PWIsCorrect = False
+ Msgbox (sMsgWRONGPW, 64, sMsgDLGTITLE)
+ Else
+ &apos; Sheet could be unprotected
+ AddSheettoUnprotectionlist(ListSheetName,Password)
+ PWIsCorrect = True
+ End If
+ Loop Until PWIsCorrect
+ UnprotectSheetWithDialog() = True
+End Function
+
+
+Sub ExecutePasswordDialog(QueryText as String)
+ With PasswordModel
+ .Title = QueryText
+ .hlnPassword.Label = sMsgPASSWORD
+ .cmdCancel.Label = sMsgCANCEL
+ .cmdHelp.Label = sHELP
+ .cmdGoOn.Label = sMsgOK
+ .cmdGoOn.DefaultButton = True
+ End With
+ DialogPassword.Execute
+End Sub
+
+Sub ReadPassword()
+ Password = PasswordModel.txtPassword.Text
+ DialogPassword.EndExecute
+End Sub
+
+
+Sub RejectPassword()
+ bCancelProtection = True
+ DialogPassword.EndExecute
+End Sub
+
+
+&apos; Reprotects the previousliy protected sheets
+&apos; The passwordinformation is stored in the List &apos;UnProtectList()&apos;
+Sub ReprotectSheets()
+Dim i as Integer
+Dim oProtectSheet as Object
+Dim ProtectList() as String
+Dim SheetName as String
+Dim SheetPassword as String
+ If PWIndex &gt; -1 Then
+ SetStatusLineText(sStsREPROTECT)
+ For i = 0 To PWIndex
+ ProtectList() = ArrayOutOfString(UnProtectList(i),&quot;;&quot;)
+ SheetName = ProtectList(0)
+ If Ubound(ProtectList()) &gt; 0 Then
+ SheetPassWord = ProtectList(1)
+ Else
+ SheetPassword = &quot;&quot;
+ End If
+ oProtectSheet = oSheets.GetbyName(SheetName)
+ If Not oProtectSheet.IsProtected Then
+ oProtectSheet.Protect(SheetPassWord)
+ End If
+ Next i
+ SetStatusLineText(&quot;&quot;)
+ End If
+ PWIndex = -1
+ ReDim UnProtectList()
+End Sub
+
+
+&apos; Add a Sheet to the list of sheets that finally have to be
+&apos; unprotected
+Sub AddSheettoUnprotectionlist(ListSheetName as String, Password as String)
+Dim MaxIndex as Integer
+ MaxIndex = Ubound(UnProtectList())
+ PWIndex = PWIndex + 1
+ If PWIndex &gt; MaxIndex Then
+ ReDim Preserve UnprotectList(MaxIndex + SBRANGEUBOUND)
+ End If
+ UnprotectList(PWIndex) = ListSheetName &amp; &quot;;&quot; &amp; Password
+End Sub
+
+
+Function CheckSheetProtection(oSheets as Object) as Boolean
+Dim MaxIndex as Integer
+Dim i as Integer
+Dim bProtectedSheets as Boolean
+ bProtectedSheets = False
+ MaxIndex = oSheets.Count-1
+ For i = 0 To MaxIndex
+ bProtectedSheets = oSheets(i).IsProtected
+ If bProtectedSheets Then
+ CheckSheetProtection() = True
+ Exit Function
+ End If
+ Next i
+ CheckSheetProtection() = False
+End Function</script:module> \ No newline at end of file
diff --git a/wizards/source/euro/Soft.xba b/wizards/source/euro/Soft.xba
new file mode 100644
index 000000000000..b4088e931156
--- /dev/null
+++ b/wizards/source/euro/Soft.xba
@@ -0,0 +1,239 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Soft" script:language="StarBasic">Option Explicit
+REM ***** BASIC *****
+
+
+Sub CreateStyleEnumeration()
+ EmptySelection()
+ EmptyListbox(DialogModel.lstSelection)
+ CurSheetName = oDocument.CurrentController.GetActiveSheet.Name
+ MakeStyleEnumeration(False)
+ DialogModel.lblSelection.Label = sTEMPLATES
+End Sub
+
+
+Sub MakeStyleEnumeration(bAddToListbox as Boolean)
+Dim m as integer
+Dim aStyleFormat as Object
+Dim Stylename as String
+ StyleIndex = -1
+ oStyles = oDocument.StyleFamilies.GetbyIndex(0)
+ For m = 0 To oStyles.count-1
+ oStyle = oStyles.GetbyIndex(m)
+ StyleName = oStyle.Name
+ If CheckFormatType(oStyle) Then
+ If Not bAddToListBox Then
+ AddSingleItemToListbox(DialogModel.lstSelection, Stylename)
+ Else
+ SwitchNumberFormat(ostyle, oFormats, sEuroSign)
+ End If
+ StyleIndex = StyleIndex + 1
+ If StyleIndex &gt; Ubound(StyleRangeAssignMentList()) Then
+ Redim Preserve StyleRangeAssignmentList(StyleIndex)
+ End If
+ StyleRangeAssignmentList(StyleIndex) = &quot;&lt;STYLENAME&gt;&quot; &amp; Stylename &amp; &quot;&lt;/STYLENAME&gt;&quot; &amp; _
+ &quot;&lt;DEFINED&gt;FALSE&lt;/DEFINED&gt;&quot; &amp; &quot;&lt;RANGES&gt;&lt;/RANGES&gt;&quot; &amp;_
+ &quot;&lt;CELLCOUNT&gt;0&lt;/CELLCOUNT&gt;&quot; &amp;_
+ &quot;&lt;SELECTED&gt;FALSE&lt;/SELECTED&gt;&quot;
+ End If
+ Next m
+ If StyleIndex &gt; -1 Then
+ Redim Preserve StyleRangeAssignmentList(StyleIndex)
+ Else
+ ReDim StyleRangeAssignmentList()
+ End If
+End Sub
+
+
+Sub AssignRangestoStyle(StyleList(), SelList())
+Dim i as Integer
+Dim n as integer
+Dim LastIndex as Integer
+Dim CurStyleName as String
+Dim AssignString as String
+ LastIndex = Ubound(StyleList())
+ StatusValue = 0
+ SetStatusLineText(sStsRELRANGES)
+ For i = 0 To LastIndex
+ CurStyleName = StyleList(i)
+ n = PartStringInArray(StyleRangeAssignmentList(), CurStyleName, 0)
+ AssignString = StyleRangeAssignmentlist(n)
+ If IndexInArray(CurStyleName, SelList()) &lt;&gt; -1 Then
+ &apos; Style is selected
+ If FindPartString(AssignString, &quot;&lt;DEFINED&gt;&quot;, &quot;&lt;/DEFINED&gt;&quot;, 1) = &quot;FALSE&quot; Then
+ AssignString = ReplaceString(AssignString, &quot;&lt;SELECTED&gt;TRUE&lt;/SELECTED&gt;&quot;, &quot;&lt;SELECTED&gt;FALSE&lt;/SELECTED&gt;&quot;)
+ AssignCellFormatRanges(n, AssignString, CurStyleName)
+ End If
+ Else
+ &apos; Style is not selected
+ If FindPartString(AssignString, &quot;&lt;SELECTED&gt;&quot;, &quot;&lt;/SELECTED&gt;&quot;, 1) = &quot;FALSE&quot; Then
+ DeselectStyle(CurStyleName, n)
+ End If
+ End If
+ IncreaseStatusvalue(SBRELGET/(LastIndex+1))
+ Next i
+End Sub
+
+
+Sub AssignCellFormatRanges(n as Integer, AssignString as String, CurStyleName as String)
+Dim oRanges() as Object
+Dim oRange as Object
+Dim oRangeAddress
+Dim oSheet as Object
+Dim StyleCellCount as Long
+Dim i as Integer
+Dim MaxIndex as Integer
+Dim RangeString as String
+Dim SheetName as String
+Dim RangeName as String
+Dim CellCountString as String
+ StyleCellCount = 0
+ RangeString = &quot;&lt;RANGES&gt;&quot;
+ MaxIndex = oSheets.Count-1
+ For i = 0 To MaxIndex
+ oSheet = oSheets(i)
+ SheetName = oSheet.Name
+ oRanges = osheet.CellFormatRanges.CreateEnumeration
+ While oRanges.hasMoreElements
+ oRange = oRanges.NextElement
+ If oRange.getPropertyState(&quot;NumberFormat&quot;) = 1 Then
+ If oRange.CellStyle = CurStyleName Then
+ oRangeAddress = oRange.RangeAddress
+ RangeName = RetrieveRangeNamefromAddress(oRange)
+ RangeString = RangeString &amp; RangeName &amp; &quot;,&quot;
+ StyleCellCount = StyleCellCount + CountRangeCells(oRange)
+ End If
+ End If
+ Wend
+ Next i
+ If StyleCellCount &gt; 0 Then
+ TotCellCount = TotCellCount + StyleCellCount
+ RangeString = RTrimStr(RangeString,&quot;,&quot;)
+ RangeString = RangeString &amp; &quot;&lt;/RANGES&gt;&quot;
+ CellCountString = &quot;&lt;CELLCOUNT&gt;&quot; &amp; StyleCellCount &amp; &quot;&lt;/CELLCOUNT&quot;
+ AssignString = ReplaceString(AssignString, RangeString,&quot;&lt;RANGES&gt;&lt;/RANGES&gt;&quot;)
+ AssignString = ReplaceString(AssignString, CellCountString,&quot;&lt;CELLCOUNT&gt;0&lt;/CELLCOUNT&gt;&quot;)
+ End If
+ AssignString = ReplaceString(AssignString, &quot;&lt;DEFINED&gt;TRUE&lt;/DEFINED&gt;&quot;, &quot;&lt;DEFINED&gt;FALSE&lt;/DEFINED&gt;&quot;)
+ StyleRangeAssignmentList(n) = AssignString
+End Sub
+
+
+&apos; deletes a styletemplate from the Collection that selects the ranges
+Sub DeselectStyle(DeSelStyleName as String, n as Integer)
+Dim i as Integer
+Dim RangeName as String
+Dim SelectString as String
+Dim AssignString as String
+Dim StyleRangeList() as String
+Dim MaxIndex as Integer
+ SelectString =&quot;&lt;SELECTED&gt;FALSE&lt;/SELECTED&gt;&quot;
+ AssignString = StyleRangeAssignmentList(n)
+ RangeString = FindPartString(AssignString,&quot;&lt;RANGES&gt;&quot;,&quot;&lt;/RANGES&gt;&quot;,1)
+ StyleRangeList() = ArrayoutofString(RangeString,&quot;,&quot;)
+ MaxIndex = Ubound(StyleRangeList())
+ For i = 0 To MaxIndex
+ RangeName = StyleRangeList(i)
+ If oSelRanges.HasbyName(RangeName) Then
+ oSelRanges.RemovebyName(RangeName)
+ End If
+ Next i
+ AssignString = ReplaceString(AssignString, &quot;&lt;SELECTED&gt;FALSE&lt;/SELECTED&gt;&quot;, &quot;&lt;SELECTED&gt;TRUE&lt;/SELECTED&gt;&quot;)
+ StyleRangeAssignmentList(n) = AssignString
+End Sub
+
+
+Function RetrieveRangeNamefromAddress(oRange as Object) as String
+Dim Rangename as String
+Dim oAddressRanges as Object
+ oAddressRanges = oDocument.createInstance(&quot;com.sun.star.sheet.SheetCellRanges&quot;)
+ oAddressRanges.InsertbyName(&quot;&quot;,oRange)
+ Rangename = oAddressRanges.RangeAddressesasString
+&apos; Msgbox &quot;Adresse: &quot; &amp; oRangeAddress.StartColumn &amp; &quot; ; &quot; &amp; oRangeAddress.EndColumn &amp; &quot; ; &quot; &amp; oRangeAddress.StartRow &amp; &quot; ; &quot; &amp; oRangeAddress.EndRow &amp; chr(13) &amp; RangeName
+&apos; oAddressRanges.RemovebyName(RangeName)
+ RetrieveRangeNamefromAddress = Rangename
+End Function
+
+
+&apos; creates a sheet object from an according sectionname
+Function RetrieveSheetoutofRangeName(TableText as String)
+Dim DescriptionList() as String
+Dim SheetName as String
+Dim MaxIndex as integer
+ &apos; find out in which sheet the range is
+ DescriptionList() = ArrayOutofString(TableText,&quot;.&quot;,MaxIndex)
+ SheetName = DescriptionList(0)
+ SheetName = DeleteStr(SheetName,&quot;&apos;&quot;)
+ &apos; set the viewcursor on this sheet
+ RetrieveSheetoutofRangeName = oSheets.GetbyName(SheetName)
+End Function
+
+
+&apos; creates a rangeobject from an according rangename
+Function RetrieveRangeoutofRangeName(TableText as String)
+ oSheet = RetrieveSheetoutofRangeName(TableText)
+ oRange = oSheet.GetCellRangebyName(TableText)
+ RetrieveRangeoutofRangeName = oRange
+End Function
+
+
+Sub ConvertTheSoftWay(StyleList(), bDeSelect as Boolean)
+Dim i as Integer
+Dim l as Integer
+Dim s as Integer
+Dim n as Integer
+Dim CurStyleName as String
+Dim RangeName as String
+Dim OldStatusValue as Integer
+Dim LastIndex as Integer
+Dim oSelListbox as Object
+Dim StyleRangeList() as String
+Dim MaxIndex as Integer
+ oSelListbox = DialogConvert.GetControl(&quot;lstSelection&quot;)
+ LastIndex = Ubound(StyleList())
+ OldStatusValue = StatusValue
+ For i = 0 To LastIndex
+ CurStyleName = StyleList(i)
+ oStyle = oStyles.GetbyName(CurStyleName)
+ StyleRangeList() = GetAssignedRanges(CurStyleName, n)
+ MaxIndex = Ubound(StyleRangeList())
+ For s = 0 To MaxIndex
+ RangeName = StyleRangeList(s)
+ oRange = RetrieveRangeoutofRangeName(RangeName)
+ If oRange.getPropertyState(&quot;NumberFormat&quot;) = 1 Then
+ &apos; Range is hard formatted
+ ConvertCellCurrencies(oRange)
+ CurCellCount = CountRangeCells(oRange)
+ End If
+ IncreaseStatusvalue((CurCellCount/TotCellCount)*(95-OldStatusValue))
+ If bDeSelect Then
+ &apos; Note: On Problems see Bug #73157
+ If oSelRanges.HasbyName(RangeName) Then
+ oSelRanges.RemovebyName(RangeName)
+ oDocument.CurrentController.Select(oSelRanges)
+ End If
+ End If
+ Next s
+ SwitchNumberFormat(ostyle, oFormats, sEuroSign)
+ StyleRangeAssignmentList(n) = &quot;&quot;
+ l = GetItemPos(oSelListBox.Model, CurStyleName)
+ oSelListbox.RemoveItems(l,1)
+ Next
+End Sub
+
+
+Function GetAssignedRanges(CurStyleName as String, n as Integer)
+Dim StyleRangeList() as String
+Dim RangeString as String
+Dim AssignString as String
+ n = PartStringInArray(StyleRangeAssignmentList(), CurStyleName, 0)
+ If n &lt;&gt; -1 Then
+ AssignString = StyleRangeAssignmentList(n)
+ RangeString = FindPartString(AssignString,&quot;&lt;RANGES&gt;&quot;, &quot;&lt;/RANGES&gt;&quot;,1)
+ If RangeString &lt;&gt; &quot;&quot; Then
+ StyleRangeList() = ArrayoutofString(RangeString,&quot;,&quot;)
+ End If
+ End If
+ GetAssignedRanges() = StyleRangeList()
+End Function</script:module> \ No newline at end of file
diff --git a/wizards/source/euro/Writer.xba b/wizards/source/euro/Writer.xba
new file mode 100644
index 000000000000..0d153b7058e2
--- /dev/null
+++ b/wizards/source/euro/Writer.xba
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Writer" script:language="StarBasic">REM ***** BASIC *****
+
+
+Sub ConvertWriterTables()
+Dim CellString as String
+Dim oParagraphs as Object
+Dim oPara as Object
+Dim i as integer
+Dim sCellNames()
+Dim oCell as Object
+ oParagraphs = oDocument.Text.CreateEnumeration
+ While oParagraphs.HasMoreElements
+ oPara = oParagraphs.NextElement
+ If NOT oPara.supportsService(&quot;com.sun.star.text.Paragraph&quot;) Then
+ &apos; Note: As cells might be splitted or merged
+ &apos; you cannot refer to them via their indices
+ sCellNames = oPara.CellNames
+ For i = 0 To Ubound(sCellNames)
+ If sCellNames(i) &lt;&gt; &quot;&quot; Then
+ oCell = oPara.getCellByName(sCellNames(i))
+ If CheckFormatType(oCell) Then
+ SwitchNumberFormat(oCell, oFormats, sEuroSign)
+ ModifyObjectValuewithCurrFactor(oCell)
+ End If
+ End If
+ Next
+ End If
+ Wend
+End Sub
+
+
+Sub ModifyObjectValuewithCurrFactor(oDocObject as Object)
+ oDocObjectValue = oDocObject.Value
+ oDocObject.Value = oDocObjectValue/CurrFactor
+End Sub
+
+
+Sub ConvertTextFields()
+Dim oTextFields as Object
+Dim oTextField as Object
+Dim FieldValue
+Dim oDocObjectValue as double
+Dim InstanceNames(500) as String
+Dim CurInstanceName as String
+Dim MaxIndex as Integer
+ MaxIndex = 0
+ oTextfields = oDocument.getTextfields.CreateEnumeration
+ While oTextFields.hasmoreElements
+ oTextField = oTextFields.NextElement
+ If oTextField.PropertySetInfo.HasPropertybyName(&quot;NumberFormat&quot;) Then
+ If CheckFormatType(oTextField) Then
+ If oTextField.PropertySetInfo.HasPropertybyName(&quot;Value&quot;) Then
+ If Not oTextField.SupportsService(&quot;com.sun.star.text.TextField.GetExpression&quot;) Then
+ oTextField.Content = CStr(Round(oTextField.Value/CurrFactor,2))
+ End If
+ ElseIf oTextField.TextFieldMaster.PropertySetInfo.HasPropertyByName(&quot;Value&quot;) Then
+ CurInstanceName = oTextField.TextFieldMaster.InstanceName
+ If Not FieldinArray(InstanceNames(), MaxIndex, CurInstanceName) Then
+ oTextField.TextFieldMaster.Content = CStr(Round(oTextField.TextFieldMaster.Value/CurrFactor,2))
+ InstanceNames(MaxIndex) = CurInstanceName
+ MaxIndex = MaxIndex + 1
+ End If
+ End If
+ SwitchNumberFormat(oTextField, oFormats, sEuroSign)
+ End If
+ End If
+ Wend
+ oDocument.GetTextFields.refresh()
+End Sub
+</script:module> \ No newline at end of file
diff --git a/wizards/source/euro/delzip b/wizards/source/euro/delzip
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/wizards/source/euro/delzip
diff --git a/wizards/source/euro/dialog.xlb b/wizards/source/euro/dialog.xlb
new file mode 100644
index 000000000000..c461ce54f0cd
--- /dev/null
+++ b/wizards/source/euro/dialog.xlb
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="Euro" library:readonly="true" library:passwordprotected="false">
+ <library:element library:name="DlgConvert"/>
+ <library:element library:name="DlgPassword"/>
+</library:library>
diff --git a/wizards/source/euro/euro.src b/wizards/source/euro/euro.src
new file mode 100644
index 000000000000..257632f8bbb4
--- /dev/null
+++ b/wizards/source/euro/euro.src
@@ -0,0 +1,476 @@
+/*************************************************************************
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+#define STEP_ZERO 1000
+#define STEP_CONVERTER 1100
+#define STEP_AUTOPILOT 1200
+#define STATUSLINE 1300
+#define MESSAGES 1400
+#define CURRENCIES 1500
+#define STEP_LASTPAGE 1600
+// --------------------------------------------------------------------
+String STEP_ZERO
+{
+Text [ en-US ] = "~Cancel";
+};
+
+String STEP_ZERO + 1
+{
+Text [ en-US ] = "~Help";
+};
+
+String STEP_ZERO + 2
+{
+Text [ en-US ] = "<<~Back";
+};
+
+String STEP_ZERO + 3
+{
+Text [ en-US ] = "~Convert";
+};
+
+String STEP_ZERO + 4
+{
+Text [ en-US ] = "Note: Currency amounts from external links and currency conversion factors in formulas cannot be converted.";
+};
+
+String STEP_ZERO + 5
+{
+Text [ en-US ] = "First, unprotect all sheets.";
+};
+
+String STEP_ZERO + 6
+{
+Text [ en-US ] = "Currencies:";
+};
+
+
+String STEP_ZERO + 7
+{
+Text [ en-US ] = "C~ontinue>>";
+};
+
+
+String STEP_ZERO + 8
+{
+Text [ en-US ] = "C~lose";
+};
+
+String STEP_CONVERTER
+{
+Text [ en-US ] = "~Entire document";
+};
+
+String STEP_CONVERTER + 1
+{
+Text [ en-US ] = "Selection";
+};
+
+String STEP_CONVERTER + 2
+{
+Text [ en-US ] = "Cell S~tyles";
+};
+
+String STEP_CONVERTER + 3
+{
+Text [ en-US ] = "Currency cells in the current ~sheet";
+};
+
+String STEP_CONVERTER + 4
+{
+Text [ en-US ] = "Currency cells in the entire ~document";
+};
+
+String STEP_CONVERTER + 5
+{
+Text [ en-US ] = "~Selected range";
+};
+
+String STEP_CONVERTER + 6
+{
+Text [ en-US ] = "Select Cell Styles";
+};
+
+String STEP_CONVERTER + 7
+{
+Text [ en-US ] = "Select currency cells";
+};
+
+String STEP_CONVERTER + 8
+{
+Text [ en-US ] = "Currency ranges:";
+};
+
+String STEP_CONVERTER + 9
+{
+Text [ en-US ] = "Templates:";
+};
+
+
+String STEP_AUTOPILOT
+{
+Text [ en-US ] = "Extent";
+};
+
+String STEP_AUTOPILOT + 1
+{
+Text [ en-US ] = "~Single %PRODUCTNAME Calc document";
+};
+
+String STEP_AUTOPILOT + 2
+{
+Text [ en-US ] = "Complete ~directory";
+};
+
+String STEP_AUTOPILOT + 3
+{
+Text [ en-US ] = "Source Document:";
+};
+
+String STEP_AUTOPILOT + 4
+{
+Text [ en-US ] = "Source directory:";
+};
+
+String STEP_AUTOPILOT + 5
+{
+Text [ en-US ] = "~Including subfolders";
+};
+
+String STEP_AUTOPILOT + 6
+{
+Text [ en-US ] = "Target directory:";
+};
+
+
+String STEP_AUTOPILOT + 7
+{
+Text [ en-US ] = "Temporarily unprotect sheet without query";
+};
+
+
+String STEP_AUTOPILOT + 10
+{
+Text [ en-US ] = "Also convert fields and tables in text documents";
+};
+
+
+String STATUSLINE
+{
+Text [ en-US ] = "Conversion status: ";
+};
+
+String STATUSLINE + 1
+{
+Text [ en-US ] = "Conversion status of the cell templates:";
+};
+
+String STATUSLINE + 2
+{
+Text [ en-US ] = "Registration of the relevant ranges: Sheet %1Number%1 of %2TotPageCount%2";
+};
+
+
+String STATUSLINE + 3
+{
+Text [ en-US ] = "Entry of the ranges to be converted...";
+};
+
+
+
+String STATUSLINE + 4
+{
+Text [ en-US ] = "Sheet protection for each sheet will be restored...";
+};
+
+
+String STATUSLINE + 5
+{
+Text [ en-US ] = "Conversion of the currency units in the cell templates...";
+};
+
+
+
+String MESSAGES
+{
+Text [ en-US ] = "~Finish";
+};
+
+String MESSAGES + 1
+{
+Text [ en-US ] = "Select directory";
+};
+
+String MESSAGES + 2
+{
+Text [ en-US ] = "Select file";
+};
+
+String MESSAGES + 3
+{
+Text [ en-US ] = "Select target directory";
+};
+
+String MESSAGES + 4
+{
+Text [ en-US ] = "non-existant";
+};
+
+
+String MESSAGES + 5
+{
+Text [ en-US ] = "Euro Converter";
+};
+
+
+
+String MESSAGES + 6
+{
+Text [ en-US ] = "Should protected spreadsheets be temporarily unprotected?";
+};
+
+
+String MESSAGES + 7
+{
+Text [ en-US ] = "Enter the password to unprotect the table %1TableName%1";
+};
+
+
+String MESSAGES + 8
+{
+Text [ en-US ] = "Wrong Password!";
+};
+
+
+String MESSAGES + 9
+{
+Text [ en-US ] = "Protected Sheet";
+};
+
+
+String MESSAGES + 10
+{
+Text [ en-US ] = "Warning!";
+};
+
+
+String MESSAGES + 11
+{
+Text [ en-US ] = "Protection for the sheets will not be removed.";
+};
+
+
+String MESSAGES + 12
+{
+Text [ en-US ] = "Sheet cannot be unprotected";
+};
+
+
+String MESSAGES + 13
+{
+Text [ en-US ] = "The Wizard cannot edit this document as cell formats cannot be modified in documents containing protected spreadsheets.";
+};
+
+
+
+String MESSAGES + 14
+{
+Text [ en-US ] = "Please note that the Euro Converter will, otherwise, not be able to edit this document!";
+};
+
+
+
+String MESSAGES + 15
+{
+Text [ en-US ] = "Please choose a currency to be converted first!";
+};
+
+String MESSAGES + 16
+{
+Text [ en-US ] = "Password:";
+};
+
+String MESSAGES + 17
+{
+Text [ en-US ] = "OK";
+};
+
+String MESSAGES + 18
+{
+Text [ en-US ] = "Cancel";
+};
+
+
+ String MESSAGES + 19
+{
+Text [ en-US ] = "Please select a %PRODUCTNAME Calc document for editing!";
+};
+
+
+String MESSAGES + 20
+{
+Text [ en-US ] = "'<1>' is not a directory!";
+};
+
+
+String MESSAGES + 21
+{
+Text [ en-US ] = "Document is read-only!";
+};
+
+
+String MESSAGES + 22
+{
+ Text [ en-US ] = "The '<1>' file already exists.<CR>Do you want to overwrite it?";
+};
+
+
+String MESSAGES + 23
+{
+ Text [ en-US ] = "Do you really want to terminate conversion at this point?";
+};
+
+String MESSAGES + 24
+{
+ Text [ en-US ] = "Cancel Wizard";
+};
+
+ String CURRENCIES
+{
+Text [ en-US ] = "Portuguese Escudo";
+};
+
+String CURRENCIES + 1
+{
+Text [ en-US ] = "Dutch Guilder";
+};
+
+String CURRENCIES + 2
+{
+Text [ en-US ] = "French Franc";
+};
+
+String CURRENCIES + 3
+{
+Text [ en-US ] = "Spanish Peseta";
+};
+
+String CURRENCIES + 4
+{
+Text [ en-US ] = "Italian Lira";
+};
+
+String CURRENCIES + 5
+{
+Text [ en-US ] = "German Mark";
+};
+
+String CURRENCIES + 6
+{
+Text [ en-US ] = "Belgian Franc";
+};
+
+String CURRENCIES + 7
+{
+Text [ en-US ] = "Irish Punt";
+};
+
+String CURRENCIES + 8
+{
+Text [ en-US ] = "Luxembourg Franc";
+};
+
+String CURRENCIES + 9
+{
+Text [ en-US ] = "Austrian Schilling";
+};
+
+String CURRENCIES + 10
+{
+Text [ en-US ] = "Finnish Mark";
+};
+
+String CURRENCIES + 11
+{
+Text [ en-US ] = "Greek Drachma";
+};
+
+String CURRENCIES + 12
+{
+Text [ en-US ] = "Slovenian Tolar";
+};
+
+String CURRENCIES + 13
+{
+Text [ en-US ] = "Cypriot Pound";
+};
+
+String CURRENCIES + 14
+{
+Text [ en-US ] = "Maltese Lira";
+};
+
+String CURRENCIES + 15
+{
+Text [ en-US ] = "Slovak Koruna";
+};
+
+String CURRENCIES + 16
+{
+Text [ en-US ] = "The currency set for the document is not a European currency!";
+};
+
+String CURRENCIES + 17
+{
+Text [ en-US ] = "The language set for your operating system is not a language of the European Monetary Union.";
+};
+
+String STEP_LASTPAGE
+{
+Text [ en-US ] = "Progress";
+};
+
+
+String STEP_LASTPAGE + 1
+{
+Text [ en-US ] = "Retrieving the relevant documents...";
+};
+
+String STEP_LASTPAGE + 2
+{
+Text [ en-US ] = "Converting the documents...";
+};
+
+String STEP_LASTPAGE + 3
+{
+Text [ en-US ] = "Settings:";
+};
+
+String STEP_LASTPAGE + 4
+{
+Text [ en-US ] = "Sheet is always unprotected";
+};
diff --git a/wizards/source/euro/makefile.mk b/wizards/source/euro/makefile.mk
new file mode 100644
index 000000000000..f4b4c22306f5
--- /dev/null
+++ b/wizards/source/euro/makefile.mk
@@ -0,0 +1,53 @@
+#*************************************************************************
+#
+# 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.
+#
+#*************************************************************************
+
+PRJ=..$/..
+
+PRJNAME=wizards
+TARGET=euro
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+.INCLUDE : $(PRJ)$/util$/target.pmk
+
+# --- Files --------------------------------------------------------
+
+#
+# testresource.
+#
+SRS2NAME = euro
+SRC2FILES= euro.src
+RESLIB2SRSFILES= $(SRS)$/euro.srs
+RESLIB2NAME= eur
+
+ZIP1TARGET = $(EURO_ALL_TARGET)
+ZIP1LIST = *.xdl *.xba *.xlb
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
diff --git a/wizards/source/euro/script.xlb b/wizards/source/euro/script.xlb
new file mode 100644
index 000000000000..1bc4927c2a5a
--- /dev/null
+++ b/wizards/source/euro/script.xlb
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="Euro" library:readonly="true" library:passwordprotected="false">
+ <library:element library:name="ConvertRun"/>
+ <library:element library:name="AutoPilotRun"/>
+ <library:element library:name="Hard"/>
+ <library:element library:name="Soft"/>
+ <library:element library:name="Init"/>
+ <library:element library:name="Common"/>
+ <library:element library:name="Writer"/>
+ <library:element library:name="Protect"/>
+</library:library>
diff --git a/wizards/source/formwizard/DBMeta.xba b/wizards/source/formwizard/DBMeta.xba
new file mode 100644
index 000000000000..2d8dc2838f5c
--- /dev/null
+++ b/wizards/source/formwizard/DBMeta.xba
@@ -0,0 +1,330 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="DBMeta" script:language="StarBasic">REM ***** BASIC *****
+Option Explicit
+
+
+Public iCommandTypes() as Integer
+Public CurCommandType as Integer
+Public oDataSource as Object
+Public bEnableBinaryOptionGroup as Boolean
+&apos;Public bSelectContent as Boolean
+
+
+Function GetDatabaseNames(baddFirstListItem as Boolean)
+Dim sDatabaseList()
+ If oDBContext.HasElements Then
+ Dim LocDBList() as String
+ Dim MaxIndex as Integer
+ Dim i as Integer
+ LocDBList = oDBContext.ElementNames()
+ MaxIndex = Ubound(LocDBList())
+ If baddfirstListItem Then
+ ReDim Preserve sDatabaseList(MaxIndex + 1)
+ sDatabaseList(0) = sSelectDatasource
+ a = 1
+ Else
+ ReDim Preserve sDatabaseList(MaxIndex)
+ a = 0
+ End If
+ For i = 0 To MaxIndex
+ sDatabaseList(a) = oDBContext.ElementNames(i)
+ a = a + 1
+ Next i
+ End If
+ GetDatabaseNames() = sDatabaseList()
+End Function
+
+
+Sub GetSelectedDBMetaData(sDBName as String)
+Dim OldsDBname as String
+Dim DBIndex as Integer
+Dim LocList() as String
+&apos; If bStartUp Then
+&apos; bStartUp = false
+&apos; Exit Sub
+&apos; End Sub
+ ToggleDatabasePage(False)
+ With DialogModel
+ If GetConnection(sDBName) Then
+ If GetDBMetaData() Then
+ LocList() = AddListToList(Array(sSelectDBTable), TableNames())
+ .lstTables.StringItemList() = AddListToList(LocList(), QueryNames())
+&apos; bSelectContent = True
+ .lstTables.SelectedItems() = Array(0)
+ iCommandTypes() = CreateCommandTypeList()
+ EmptyFieldsListboxes()
+ End If
+ End If
+ bEnableBinaryOptionGroup = False
+ .lstTables.Enabled = True
+ .lblTables.Enabled = True
+&apos; Else
+&apos; DialogModel.lstTables.StringItemList = Array(sSelectDBTable)
+&apos; EmptyFieldsListboxes()
+&apos; End If
+ ToggleDatabasePage(True)
+ End With
+End Sub
+
+
+Function GetConnection(sDBName as String)
+Dim oInteractionHandler as Object
+Dim bExitLoop as Boolean
+Dim bGetConnection as Boolean
+Dim iMsg as Integer
+Dim Nulllist()
+ If Not IsNull(oDBConnection) Then
+ oDBConnection.Dispose()
+ End If
+ oDataSource = oDBContext.GetByName(sDBName)
+&apos; If Not oDBContext.hasbyName(sDBName) Then
+&apos; GetConnection() = False
+&apos; Exit Function
+&apos; End If
+ If Not oDataSource.IsPasswordRequired Then
+ oDBConnection = oDBContext.GetByName(sDBName).GetConnection(&quot;&quot;,&quot;&quot;)
+ GetConnection() = True
+ Else
+ oInteractionHandler = createUnoService(&quot;com.sun.star.task.InteractionHandler&quot;)
+ oDataSource = oDBContext.GetByName(sDBName)
+ On Local Error Goto NOCONNECTION
+ Do
+ bExitLoop = True
+ oDBConnection = oDataSource.ConnectWithCompletion(oInteractionHandler)
+ NOCONNECTION:
+ bGetConnection = Err = 0
+ If bGetConnection Then
+ bGetConnection = Not IsNull(oDBConnection)
+ If Not bGetConnection Then
+ Exit Do
+ End If
+ End If
+ If Not bGetConnection Then
+ iMsg = Msgbox (sMsgNoConnection,32 + 2, sMsgWizardName)
+ bExitLoop = iMsg = SBCANCEL
+ Resume CLERROR
+ CLERROR:
+ End If
+ Loop Until bExitLoop
+ On Local Error Goto 0
+ If Not bGetConnection Then
+ DialogModel.lstTables.StringItemList() = Array(sSelectDBTable)
+ DialogModel.lstFields.StringItemList() = NullList()
+ DialogModel.lstSelFields.StringItemList() = NullList()
+ End If
+ GetConnection() = bGetConnection
+ End If
+End Function
+
+
+Function GetDBMetaData()
+ If oDBContext.HasElements Then
+ Tablenames() = oDBConnection.Tables.ElementNames()
+ Querynames() = oDBConnection.Queries.ElementNames()
+ GetDBMetaData = True
+ Else
+ MsgBox(sMsgErrNoDatabase, 64, sMsgWizardName)
+ GetDBMetaData = False
+ End If
+End Function
+
+
+Sub GetTableMetaData()
+Dim iType as Long
+Dim m as Integer
+Dim Found as Boolean
+Dim i as Integer
+Dim sFieldName as String
+Dim n as Integer
+Dim WidthIndex as Integer
+Dim oField as Object
+ MaxIndex = Ubound(DialogModel.lstSelFields.StringItemList())
+ Dim ColumnMap(MaxIndex)as Integer
+ FieldNames() = DialogModel.lstSelFields.StringItemList()
+ &apos; Build a structure which maps the position of a selected field (within the selection) to the the column position within
+ &apos; the table. So we ensure that the controls are placed in the same order the according fields are selected.
+ For i = 0 To Ubound(FieldNames())
+ sFieldName = FieldNames(i)
+ Found = False
+ n = 0
+ While (n&lt; MaxIndex And (Not Found))
+ If (FieldNames(n) = sFieldName) Then
+ Found = True
+ ColumnMap(n) = i
+ End If
+ n = n + 1
+ Wend
+ Next i
+ For n = 0 to MaxIndex
+ sFieldname = FieldNames(n)
+ oField = oColumns.GetByName(sFieldName)
+ iType = oField.Type
+ FieldMetaValues(n,0) = oField.Type
+ FieldMetaValues(n,1) = AssignFieldLength(oField.Precision)
+ FieldMetaValues(n,2) = GetValueoutofList(iType, WidthList(),1, WidthIndex)
+ FieldMetaValues(n,3) = WidthList(WidthIndex,3)
+ FieldMetaValues(n,4) = oField.FormatKey
+ FieldMetaValues(n,5) = oField.DefaultValue
+ FieldMetaValues(n,6) = oField.IsCurrency
+ FieldMetaValues(n,7) = oField.Scale
+&apos; If oField.Description &lt;&gt; &quot;&quot; Then
+&apos;&apos; Todo: What&apos;s wrong with this line?
+&apos; Msgbox oField.Helptext
+&apos; End If
+ FieldMetaValues(n,8) = oField.Description
+ Next
+ ReDim oDBShapeList(MaxIndex) as Object
+ ReDim oTCShapeList(MaxIndex) as Object
+ ReDim oDBModelList(MaxIndex) as Object
+ ReDim oGroupShapeList(MaxIndex) as Object
+End Sub
+
+
+Function GetSpecificFieldNames() as Integer
+Dim n as Integer
+Dim m as Integer
+Dim s as Integer
+Dim iType as Integer
+Dim oField as Object
+Dim MaxIndex as Integer
+Dim EmptyList()
+ If Ubound(DialogModel.lstTables.StringItemList()) &gt; -1 Then
+ FieldNames() = oColumns.GetElementNames()
+ MaxIndex = Ubound(FieldNames())
+ If MaxIndex &lt;&gt; -1 Then
+ Dim ResultFieldNames(MaxIndex)
+ ReDim ImgFieldNames(MaxIndex)
+ m = 0
+ For n = 0 To MaxIndex
+ oField = oColumns.GetByName(FieldNames(n))
+ iType = oField.Type
+ If GetIndexInMultiArray(WidthList(), iType, 0) &lt;&gt; -1 Then
+ ResultFieldNames(m) = FieldNames(n)
+ m = m + 1
+ End If
+ If GetIndexInMultiArray(ImgWidthList(), iType, 0) &lt;&gt; -1 Then
+ ImgFieldNames(s) = FieldNames(n)
+ s = s + 1
+ End If
+ Next n
+ If s &lt;&gt; 0 Then
+ Redim Preserve ImgFieldNames(s-1)
+ bEnableBinaryOptionGroup = True
+ Else
+ bEnableBinaryOptionGroup = False
+ End If
+ If (DialogModel.optBinariesasGraphics.State = 1) And (s &lt;&gt; 0) Then
+ ResultFieldNames() = AddListToList(ResultFieldNames(), ImgFieldNames())
+ Else
+ Redim Preserve ResultFieldNames(m-1)
+ End If
+ FieldNames() = ResultFieldNames()
+ DialogModel.lstFields.StringItemList = FieldNames()
+ InitializeListboxProcedures(DialogModel, DialogModel.lstFields, DialogModel.lstSelFields)
+ End If
+ GetSpecificFieldNames = MaxIndex
+ Else
+ GetSpecificFieldNames = -1
+ End If
+End Function
+
+
+Sub CreateDBForm()
+ If oDrawPage.Forms.Count = 0 Then
+ oDBForm = oDocument.CreateInstance(&quot;com.sun.star.form.component.Form&quot;)
+ oDrawpage.Forms.InsertByIndex (0, oDBForm)
+ Else
+ oDBForm = oDrawPage.Forms.GetByIndex(0)
+ End If
+ oDBForm.Name = &quot;Standard&quot;
+ oDBForm.DataSourceName = sDBName
+ oDBForm.Command = TableName
+ oDBForm.CommandType = CurCommandType
+End Sub
+
+
+Sub AddOrRemoveBinaryFieldsToWidthList()
+Dim LocWidthList()
+Dim MaxIndex as Integer
+Dim OldMaxIndex as Integer
+Dim s as Integer
+Dim n as Integer
+Dim m as Integer
+ If Not bDebug Then
+ On Local Error GoTo WIZARDERROR
+ End If
+ If DialogModel.optBinariesasGraphics.State = 1 Then
+ OldMaxIndex = Ubound(WidthList(),1)
+ If OldMaxIndex = 15 Then
+ MaxIndex = Ubound(WidthList(),1) + Ubound(ImgWidthList(),1) + 1
+ ReDim Preserve WidthList(MaxIndex,4)
+ s = 0
+ For n = OldMaxIndex + 1 To MaxIndex
+ For m = 0 To 3
+ WidthList(n,m) = ImgWidthList(s,m)
+ Next m
+ s = s + 1
+ Next n
+ MergeList(DialogModel.lstFields, ImgFieldNames())
+ End If
+ Else
+ ReDim Preserve WidthList(15, 4)
+ RemoveListItems(DialogModel.lstFields(), DialogModel.lstSelFields(), ImgFieldNames())
+ End If
+ DialogModel.lstSelFields.Tag = True
+WIZARDERROR:
+ If Err &lt;&gt; 0 Then
+ Msgbox(sMsgErrMsg, 16, GetProductName())
+ Resume LOCERROR
+ LOCERROR:
+ End If
+End Sub
+
+
+Function CreateCommandTypeList()
+Dim MaxTableIndex as Integer
+Dim MaxQueryIndex as Integer
+Dim MaxIndex as Integer
+Dim i as Integer
+Dim a as Integer
+ MaxTableIndex = Ubound(TableNames()
+ MaxQueryIndex = Ubound(QueryNames()
+ MaxIndex = MaxTableIndex + MaxQueryIndex + 1
+ If MaxIndex &gt; -1 Then
+ Dim LocCommandTypes(MaxIndex) as Integer
+ For i = 0 To MaxTableIndex
+ LocCommandTypes(i) = com.sun.star.sdb.CommandType.TABLE
+ Next i
+ a = i
+ For i = 0 To MaxQueryIndex
+ LocCommandTypes(a) = com.sun.star.sdb.CommandType.QUERY
+ a = a + 1
+ Next i
+ End If
+ CreateCommandTypeList() = LocCommandTypes()
+End Function
+
+
+Sub GetCurrentMetaValues(Index as Integer)
+ CurFieldType = FieldMetaValues(Index,0)
+ CurFieldLength = FieldMetaValues(Index,1)
+ CurControlType = FieldMetaValues(Index,2)
+ CurControlName = FieldMetaValues(Index,3)
+ CurFormatKey = FieldMetaValues(Index,4)
+ CurDefaultValue = FieldMetaValues(Index,5)
+ CurIsCurrency = FieldMetaValues(Index,6)
+ CurScale = FieldMetaValues(Index,7)
+ CurHelpText = FieldMetaValues(Index,8)
+ CurFieldName = FieldNames(Index)
+End Sub
+
+
+Function AssignFieldLength(FieldLength as Long) as Integer
+ If FieldLength &gt;= 65535 Then
+ AssignFieldLength() = -1
+ Else
+ AssignFieldLength() = FieldLength
+ End If
+End Function
+</script:module> \ No newline at end of file
diff --git a/wizards/source/formwizard/DlgFormDB.xdl b/wizards/source/formwizard/DlgFormDB.xdl
new file mode 100644
index 000000000000..ade138e06b9a
--- /dev/null
+++ b/wizards/source/formwizard/DlgFormDB.xdl
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
+<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="DlgFormDB" dlg:left="96" dlg:top="28" dlg:width="270" dlg:height="210" dlg:page="1" dlg:help-url="HID:34400" dlg:closeable="true" dlg:moveable="true">
+ <dlg:bulletinboard>
+ <dlg:text dlg:id="lblSelFields" dlg:tab-index="10" dlg:left="154" dlg:top="70" dlg:width="110" dlg:height="8" dlg:page="1" dlg:value="lblSelFields"/>
+ <dlg:menulist dlg:id="lstTables" dlg:tab-index="3" dlg:left="6" dlg:top="51" dlg:width="110" dlg:height="12" dlg:page="1" dlg:help-url="HID:34411" dlg:spin="true">
+ <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:FormWizard.FormWizard.FormGetFields?language=Basic&amp;location=application" script:language="Script"/>
+ <script:event script:event-name="on-mousedown" script:macro-name="vnd.sun.star.script:FormWizard.FormWizard.DeleteFirstTableListBoxEntry?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:menulist>
+ <dlg:img dlg:id="imgTheme" dlg:tab-index="1" dlg:left="6" dlg:top="6" dlg:width="258" dlg:height="26" dlg:scale-image="false"/>
+ <dlg:button dlg:id="cmdCancel" dlg:tab-index="33" dlg:left="6" dlg:top="190" dlg:width="53" dlg:height="14" dlg:help-url="HID:34401" dlg:value="cmdCancel" dlg:button-type="cancel"/>
+ <dlg:button dlg:id="cmdHelp" dlg:tab-index="34" dlg:left="63" dlg:top="190" dlg:width="53" dlg:height="14" dlg:tag="34400" dlg:value="cmdHelp" dlg:button-type="help"/>
+ <dlg:button dlg:id="cmdBack" dlg:tab-index="35" dlg:left="155" dlg:top="190" dlg:width="53" dlg:height="14" dlg:help-url="HID:34402" dlg:value="cmdBack">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:FormWizard.FormWizard.PreviousStep?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:button dlg:id="cmdGoOn" dlg:tab-index="36" dlg:left="211" dlg:top="190" dlg:width="53" dlg:height="14" dlg:help-url="HID:34403" dlg:value="cmdGoOn">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:FormWizard.FormWizard.NextStep?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:text dlg:id="lblTables" dlg:tab-index="2" dlg:left="6" dlg:top="40" dlg:width="72" dlg:height="8" dlg:page="1" dlg:value="lblTables"/>
+ <dlg:text dlg:id="lblFields" dlg:tab-index="4" dlg:left="6" dlg:top="70" dlg:width="109" dlg:height="8" dlg:page="1" dlg:value="lblFields"/>
+ <dlg:button dlg:id="cmdMoveSelected" dlg:tab-index="6" dlg:left="122" dlg:top="84" dlg:width="25" dlg:height="14" dlg:page="1" dlg:help-url="HID:34422" dlg:value="-&gt;">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Tools.Listbox.FormMoveSelected?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:button dlg:id="cmdMoveAll" dlg:tab-index="7" dlg:left="122" dlg:top="101" dlg:width="25" dlg:height="14" dlg:page="1" dlg:help-url="HID:34423" dlg:value="=&gt;&gt;">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Tools.Listbox.FormMoveAll?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:button dlg:id="cmdRemoveSelected" dlg:tab-index="8" dlg:left="122" dlg:top="118" dlg:width="25" dlg:height="14" dlg:page="1" dlg:help-url="HID:34424" dlg:value="&lt;-">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Tools.Listbox.FormRemoveSelected?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:button dlg:id="cmdRemoveAll" dlg:tab-index="9" dlg:left="122" dlg:top="135" dlg:width="25" dlg:height="14" dlg:page="1" dlg:help-url="HID:34425" dlg:value="&lt;&lt;=">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Tools.Listbox.FormRemoveAll?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:radiogroup>
+ <dlg:radio dlg:id="optIgnoreBinaries" dlg:tab-index="14" dlg:left="122" dlg:top="169" dlg:width="104" dlg:height="10" dlg:page="1" dlg:help-url="HID:34427" dlg:value="optIgnoreBinaries" dlg:checked="true">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:FormWizard.DBMeta.AddOrRemoveBinaryFieldsToWidthList?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:radio>
+ <dlg:radio dlg:id="optBinariesasGraphics" dlg:tab-index="13" dlg:left="12" dlg:top="169" dlg:width="104" dlg:height="10" dlg:page="1" dlg:help-url="HID:34426" dlg:value="optBinariesasGraphics">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:FormWizard.DBMeta.AddOrRemoveBinaryFieldsToWidthList?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:radio>
+ </dlg:radiogroup>
+ <dlg:menulist dlg:id="lstFields" dlg:tab-index="5" dlg:left="6" dlg:top="81" dlg:width="110" dlg:height="70" dlg:page="1" dlg:help-url="HID:34420" dlg:multiselection="true">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Tools.Listbox.FormMoveSelected?language=Basic&amp;location=application" script:language="Script"/>
+ <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:Tools.Listbox.FormSetMoveRights?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:menulist>
+ <dlg:menulist dlg:id="lstSelFields" dlg:tab-index="11" dlg:left="154" dlg:top="81" dlg:width="110" dlg:height="70" dlg:page="1" dlg:help-url="HID:34421" dlg:multiselection="true">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Tools.Listbox.FormRemoveSelected?language=Basic&amp;location=application" script:language="Script"/>
+ <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:Tools.Listbox.FormSetMoveRights?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:menulist>
+ <dlg:text dlg:id="lblStyles" dlg:tab-index="25" dlg:left="150" dlg:top="39" dlg:width="114" dlg:height="8" dlg:page="2" dlg:value="lblStyles"/>
+ <dlg:button dlg:id="cmdArrange1" dlg:tab-index="16" dlg:left="12" dlg:top="50" dlg:width="23" dlg:height="25" dlg:page="2" dlg:tag="1" dlg:help-url="HID:34431">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:FormWizard.Layouter.ChangeArrangemode?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:button dlg:id="cmdArrange2" dlg:tab-index="17" dlg:left="39" dlg:top="50" dlg:width="23" dlg:height="25" dlg:page="2" dlg:tag="2" dlg:help-url="HID:34432">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:FormWizard.Layouter.ChangeArrangemode?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:button dlg:id="cmdArrange3" dlg:tab-index="18" dlg:left="66" dlg:top="50" dlg:width="23" dlg:height="25" dlg:page="2" dlg:tag="3" dlg:help-url="HID:34433">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:FormWizard.Layouter.ChangeArrangemode?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:button dlg:id="cmdArrange4" dlg:tab-index="19" dlg:left="93" dlg:top="50" dlg:width="23" dlg:height="25" dlg:page="2" dlg:tag="4" dlg:help-url="HID:34434">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:FormWizard.Layouter.ChangeArrangemode?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:button dlg:id="cmdArrange5" dlg:tab-index="20" dlg:left="120" dlg:top="50" dlg:width="23" dlg:height="25" dlg:page="2" dlg:tag="5" dlg:help-url="HID:34435">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:FormWizard.Layouter.ChangeArrangemode?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:menulist dlg:id="lstStyles" dlg:tab-index="26" dlg:left="150" dlg:top="50" dlg:width="114" dlg:height="86" dlg:page="2" dlg:help-url="HID:34443">
+ <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:FormWizard.tools.ImportStyles?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:menulist>
+ <dlg:radiogroup>
+ <dlg:radio dlg:id="optBorder0" dlg:tab-index="22" dlg:left="12" dlg:top="95" dlg:width="131" dlg:height="10" dlg:page="2" dlg:help-url="HID:34438" dlg:value="optBorder0">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:FormWizard.Layouter.ChangeBorderLayouts?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:radio>
+ <dlg:radio dlg:id="optBorder1" dlg:tab-index="23" dlg:left="12" dlg:top="109" dlg:width="131" dlg:height="10" dlg:page="2" dlg:help-url="HID:34439" dlg:value="optBorder1">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:FormWizard.Layouter.ChangeBorderLayouts?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:radio>
+ <dlg:radio dlg:id="optBorder2" dlg:tab-index="24" dlg:left="12" dlg:top="123" dlg:width="131" dlg:height="10" dlg:page="2" dlg:help-url="HID:34440" dlg:value="optBorder2">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:FormWizard.Layouter.ChangeBorderLayouts?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:radio>
+ </dlg:radiogroup>
+ <dlg:fixedline dlg:id="hlnBinaries" dlg:tab-index="12" dlg:left="6" dlg:top="158" dlg:width="258" dlg:height="8" dlg:page="1" dlg:value="hlnBinaries"/>
+ <dlg:radiogroup>
+ <dlg:radio dlg:id="optTiled" dlg:tab-index="31" dlg:left="156" dlg:top="154" dlg:width="81" dlg:height="10" dlg:page="2" dlg:tag="11" dlg:help-url="HID:34444" dlg:value="optTiled" dlg:checked="true">
+ <script:event script:event-name="on-mouseup" script:macro-name="vnd.sun.star.script:WebWizard.Common.SetBackGraphicStyle?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:radio>
+ <dlg:radio dlg:id="optArea" dlg:tab-index="32" dlg:left="156" dlg:top="168" dlg:width="81" dlg:height="10" dlg:page="2" dlg:tag="10" dlg:help-url="HID:34445" dlg:value="optArea">
+ <script:event script:event-name="on-mouseup" script:macro-name="vnd.sun.star.script:WebWizard.Common.SetBackGraphicStyle?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:radio>
+ </dlg:radiogroup>
+ <dlg:fixedline dlg:id="hlnBackground" dlg:tab-index="30" dlg:left="150" dlg:top="143" dlg:width="114" dlg:height="8" dlg:page="2" dlg:value="hlnBackground"/>
+ <dlg:fixedline dlg:id="hlnAlign" dlg:tab-index="27" dlg:left="6" dlg:top="143" dlg:width="137" dlg:height="8" dlg:page="2" dlg:value="hlnAlign"/>
+ <dlg:fixedline dlg:id="hlnBorderLayout" dlg:tab-index="21" dlg:left="6" dlg:top="83" dlg:width="137" dlg:height="8" dlg:page="2" dlg:value="hlnBorderLayout"/>
+ <dlg:fixedline dlg:id="hlnArrangements" dlg:tab-index="15" dlg:left="6" dlg:top="39" dlg:width="137" dlg:height="8" dlg:page="2" dlg:value="hlnArrangements"/>
+ <dlg:radiogroup>
+ <dlg:radio dlg:id="optAlign0" dlg:tab-index="28" dlg:left="12" dlg:top="154" dlg:width="131" dlg:height="10" dlg:page="2" dlg:help-url="HID:34441" dlg:value="optAlign0">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:FormWizard.Layouter.ChangeLabelAlignments?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:radio>
+ <dlg:radio dlg:id="optAlign2" dlg:tab-index="29" dlg:left="12" dlg:top="168" dlg:width="131" dlg:height="10" dlg:page="2" dlg:help-url="HID:34442" dlg:value="optAlign2">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:FormWizard.Layouter.ChangeLabelAlignments?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:radio>
+ </dlg:radiogroup>
+ <dlg:fixedline dlg:id="FixedLine1" dlg:tab-index="0" dlg:left="6" dlg:top="180" dlg:width="258" dlg:height="6"/>
+ </dlg:bulletinboard>
+</dlg:window> \ No newline at end of file
diff --git a/wizards/source/formwizard/FormWizard.xba b/wizards/source/formwizard/FormWizard.xba
new file mode 100644
index 000000000000..99103d9335bc
--- /dev/null
+++ b/wizards/source/formwizard/FormWizard.xba
@@ -0,0 +1,427 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="FormWizard" script:language="StarBasic">Option Explicit
+
+Public DocumentName as String
+Public FormPath as String
+Public WizardPath as String
+Public WebWizardPath as String
+Public WorkPath as String
+Public TempPath as String
+Public TexturePath as String
+Public sQueryName as String
+Public oDBConnection as Object
+Public bWithBackGraphic as Boolean
+Public bNeedFieldRefresh as Boolean
+Public oDBForm as Object
+Public oColumns() as Object
+Public sDatabaseList() as String
+Public TableNames() as String
+Public QueryNames() as String
+Public FieldNames() as String
+Public ImgFieldNames() as String
+Public oDBContext as Object
+Public oUcb as Object
+Public oDocInfo as Object
+Public WidthList(15,3)
+Public ImgWidthList(3,3)
+Public sDBName as String
+Public Tablename as String
+Public Const SBSIZETEXT = &quot;The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.&quot;
+Public bDisposeDoc as Boolean
+Public bDebug as Boolean
+&apos;Public bStartUp as Boolean
+Public bConnectionIsovergiven as Boolean
+Public FormName As String
+Public sFormUrl as String
+Public oFormDocuments
+
+
+&apos; The macro can be called in 4 possible scenarios:
+&apos; Scenario 1. No parameters at given
+&apos; Scenario 2: Only Datasourcename is given, but no connection and no Content
+&apos; Scenario 3: a data source and a connection are given
+&apos; Scenario 4: all parameters (data source name, connection, object type and object) are given
+
+Sub Main()
+Dim oLocDBContext as Object
+Dim oLocConnection as Object
+
+&apos; Scenario 1. No parameters at given
+ MainWithDefault()
+
+&apos; Scenario 2: Only Datasourcename is given, but no connection and no Content
+&apos; MainWithDefault(&quot;Bibliography&quot;)
+
+&apos; Scenario 3: a data source and a connection are given
+&apos; oLocDBContext = CreateUnoService(&quot;com.sun.star.sdb.DatabaseContext&quot;)
+&apos; oLocConnection = oLocDBContext.GetByName(&quot;Bibliography&quot;).GetConnection(&quot;&quot;,&quot;&quot;)
+&apos; MainWithDefault(&quot;Bibliography&quot;, oLocConnection)
+
+&apos; Scenario 4: all parameters (data source name, connection, object type and object) are given
+&apos; oLocDBContext = CreateUnoService(&quot;com.sun.star.sdb.DatabaseContext&quot;)
+&apos; oLocConnection = oLocDBContext.GetByName(&quot;Bibliography&quot;).GetConnection(&quot;&quot;,&quot;&quot;)
+&apos; MainWithDefault(&quot;Bibliography&quot;, oLocConnection, com.sun.star.sdb.CommandType.TABLE, &quot;biblio&quot;)
+End Sub
+
+
+Sub MainWithDefault(Optional DatasourceName as String, Optional oConnection as Object, Optional CommandType as Integer, Optional sContent as String)
+Dim i as Integer
+Dim SelCount as Integer
+Dim RetValue as Integer
+Dim SelList(0) as Integer
+Dim LocList() as String
+ SelList(0) = 0
+ BasicLibraries.LoadLibrary(&quot;Tools&quot;)
+ BasicLibraries.LoadLibrary(&quot;WebWizard&quot;)
+ bDebug = False
+ If Not bDebug Then
+ On Local Error GoTo WIZARDERROR
+ End If
+ OpenFormDocument()
+ CurArrangement = 0
+ bControlsareCreated = False
+ bEnableBinaryOptionGroup = False
+ bDisposeDoc = True
+ MaxIndex = -1
+ If Not InitResources(&quot;Formwizard&quot;,&quot;dbw&quot;) Then
+ Exit Sub
+ End If
+ oDBContext = CreateUnoService(&quot;com.sun.star.sdb.DatabaseContext&quot;)
+ oUcb = createUnoService(&quot;com.sun.star.ucb.SimpleFileAccess&quot;)
+ If GetFormWizardPaths() = False Then
+ Exit Sub
+ End If
+ oDocument.GetCurrentController().Frame.ComponentWindow.Enable = False
+ oProgressBar.Value = 10
+ LoadLanguage()
+ oProgressBar.Value = 20
+ InitializeWidthList()
+ oProgressBar.Value = 30
+ Styles() = getListBoxArrays(oUcb, &quot;/stl&quot;)
+ CurIndex = GetCurIndex(DialogModel, Styles(), 2)
+ oProgressBar.Value = 40
+ ConfigurePageStyle()
+ oProgressBar.Value = 50
+ InitializeLabelValues()
+ bNeedFieldRefresh = True
+ SetDialogLanguage()
+&apos; bStartUp = true
+ With DialogModel
+ .cmdBack.Enabled = False
+ .cmdGoOn.Enabled = False
+ .lblTables.Enabled = False
+ .lstSelFields.Tag = False
+ .Step = 1
+ End With
+ oProgressBar.Value = 60
+ bConnectionIsovergiven = Not IsMissing(oConnection)
+ If Not IsMissing(DataSourceName) Then
+ sDBName = DataSourceName
+ If Not IsMissing(oConnection) Then
+ &apos; Scenario 3: a data source and a connection are given
+ Set oDBConnection = oConnection
+ oDataSource = oDBContext.GetByName(DataSourceName)
+ DialogModel.lstTables.Enabled = True
+ DialogModel.lblTables.Enabled = True
+ If GetDBMetaData() Then
+ LocList() = AddListToList(TableNames(), QueryNames())
+ iCommandTypes = CreateCommandTypeList()
+ If Not IsMissing(sContent) Then
+ &apos; Scenario 4: all parameters (data source name, connection, object type and object) are given
+ DialogModel.lstTables.StringItemList() = LocList()
+ iCommandTypes() = CreateCommandTypeList()
+ SelCount = CountItemsInArray(DialogModel.lstTables.StringItemList(), sContent)
+ If SelCount = 1 Then
+ DlgFormDB.GetControl(&quot;lstTables&quot;).SelectItem(sContent, True)
+ Else
+ If CommandType = com.sun.star.sdb.CommandType.QUERY Then
+ SelIndex = IndexInArray(sContent, QueryNames()
+ DlgFormDB.GetControl(&quot;lstTables&quot;).SelectItemPos(SelIndex, True)
+ ElseIf CommandType = com.sun.star.sdb.CommandType.TABLE Then
+ SelIndex = IndexInArray(sContent, TableNames()
+ DlgFormDB.GetControl(&quot;lstTables&quot;).SelectItemPos(Ubound(QueryNames()+1 + SelIndex, True)
+ End If
+ End If
+ CurCommandType = CommandType
+ FillUpFieldsListbox(False)
+ Else
+ LocList() = AddListToList(Array(sSelectDBTable), LocList())
+ DialogModel.lstTables.StringItemList() = LocList()
+&apos; bSelectContent = True
+ DialogModel.lstTables.SelectedItems() = Array(0)
+
+ End If
+ End If
+ Else
+ &apos; Scenario 2: Only Datasourcename is given, but no connection and no Content
+ GetSelectedDBMetaData(sDBName)
+ End If
+ Else
+ &apos; Scenario 1: No parameters are given
+ ToggleListboxControls(DialogModel, False)
+ End If
+ oProgressBar.Value = 80
+ bWithBackGraphic = LoadNewStyles(oDocument, DialogModel, CurIndex, Styles(CurIndex, 8), Styles(), TexturePath)
+ DlgFormDB.Title = WizardTitle(1)
+ DialogModel.lstStyles.StringItemList() = ArrayfromMultiArray(Styles, 1)
+ DialogModel.lstStyles.SelectedItems() = SelList()
+ ControlCaptionsToStandardLayout()
+ oDocument.GetCurrentController().Frame.ComponentWindow.Enable = True
+ oProgressBar.Value = 90
+ DialogModel.imgTheme.ImageURL = FormPath &amp; &quot;FormWizard_1.bmp&quot;
+ DialogModel.imgTheme.BackGroundColor = RGB(0,60,126)
+ ToggleDatabasePage(True)
+ oProgressBar.Value = 100
+ DlgFormDB.GetControl(&quot;lstTables&quot;).SetFocus()
+ oProgressbar.End
+ RetValue = DlgFormDB.Execute()
+ DlgFormDB.Dispose()
+ If bDisposeDoc Then
+ Dim aPropertyValues(2) as new com.sun.star.beans.PropertyValue
+ oFormDocuments = oDataSource.getFormDocuments()
+ DlgFormDB.Dispose()
+ oDocument.dispose()
+ Dim bLinkExists as Boolean
+ i = 1
+ Dim FormBaseName as String
+ FormBaseName = FormName
+ Do
+ bLinkExists = oFormDocuments.HasbyHierarchicalName(FormName)
+ If bLinkExists Then
+ i = i + 1
+ FormName = FormBaseName &amp; &quot;_&quot; &amp; i
+ End If
+ Loop Until Not bLinkExists
+ aPropertyValues(0).Name = &quot;Name&quot;
+ aPropertyValues(0).Value = FormName
+ aPropertyValues(1).Name = &quot;Parent&quot;
+ aPropertyValues(1).Value = oFormDocuments()
+ aPropertyValues(2).Name = &quot;URL&quot;
+ aPropertyValues(2).Value = sFormUrl
+ Dim oDBDocument
+ oDBDocument = oFormDocuments.createInstanceWithArguments(&quot;com.sun.star.sdb.DocumentDefinition&quot;, aPropertyValues())
+ oFormDocuments.insertbyName(FormName, oDBDocument)
+ ElseIf RetValue = 0 Then
+ RemoveNirwanaShapes()
+ End If
+ If ((Not IsNull(oDBConnection)) And (Not bConnectionIsovergiven)) Then
+ oDBConnection.Dispose()
+ End If
+WIZARDERROR:
+ If Err &lt;&gt; 0 Then
+ Msgbox(sMsgErrMsg, 16, GetProductName())
+ Resume LOCERROR
+ LOCERROR:
+ End If
+End Sub
+
+
+Sub FormGetFields()
+Dim i as Integer
+&apos; If bSelectContent Then
+&apos; bSelectContent = False
+&apos; Exit Sub
+&apos; End If
+ DeleteFirstListBoxEntry(&quot;lstTables&quot;, sSelectDBTable)
+ ToggleDatabasePage(False)
+ FillUpFieldsListbox(True)
+ ToggleDatabasePage(True)
+End Sub
+
+
+Sub FillUpFieldsListbox(bGetCommandType as Boolean)
+Dim SelIndex as Integer
+Dim QueryIndex as Integer
+ If Not bDebug Then
+ On Local Error GoTo NOFIELDS
+ End If
+ SelIndex = DlgFormDB.GetControl(&quot;lstTables&quot;).getSelectedItemPos() &apos;.SelectedItems())
+ If SelIndex &gt; -1 Then
+ If bGetCommandType Then
+ CurCommandType = iCommandTypes(SelIndex)
+ End If
+ If CurCommandType = com.sun.star.sdb.CommandType.QUERY Then
+ QueryIndex = SelIndex - Ubound(Tablenames()) - 1
+ Tablename = QueryNames(QueryIndex)
+ oColumns = oDBConnection.Queries.GetByName(TableName).Columns
+ Else
+ Tablename = Tablenames(SelIndex)
+ oColumns = oDBConnection.Tables.GetByName(Tablename).Columns
+ End If
+ If GetSpecificFieldNames() &lt;&gt; -1 Then
+ ToggleListboxControls(DialogModel, True)
+ Exit Sub
+ End If
+ End If
+ EmptyFieldsListboxes()
+NOFIELDS:
+ If Err &lt;&gt; 0 Then
+ MsgBox sMsgErrCouldNotOpenObject, 16, sMsgWizardName
+ End If
+End Sub
+
+
+Sub PreviousStep()
+ If Not bDebug Then
+ On Local Error GoTo WIZARDERROR
+ End If
+ With DialogModel
+ .Step = 1
+ .cmdBack.Enabled = False
+ .cmdGoOn.Enabled = True
+ .lstSelFields.Tag = Not bControlsareCreated
+ .cmdGoOn.Label = sGoOn
+ .imgTheme.ImageUrl = FormPath &amp; &quot;FormWizard_1.bmp&quot;
+ End With
+ FormSetMoveRights()
+WIZARDERROR:
+ If Err &lt;&gt; 0 Then
+ Msgbox(sMsgErrMsg, 16, GetProductName())
+ Resume LOCERROR
+ LOCERROR:
+ End If
+End Sub
+
+
+Sub NextStep()
+ If Not bDebug Then
+ On Local Error GoTo WIZARDERROR
+ End If
+ Select Case DialogModel.Step
+ Case 1
+ bControlsAreCreated = Not (cBool(DialogModel.lstSelFields.Tag))
+ If Not bControlsAreCreated Then
+ GetTableMetaData()
+ CreateDBForm()
+ RemoveShapes()
+ InitializeLayoutSettings()
+ oDBForm.Load
+ End If
+ DialogModel.cmdGoOn.Label = sReady
+ DialogModel.cmdBack.Enabled = True
+ DialogModel.Step = 2
+ bDisposeDoc = False
+ Case 2
+ StoreForm()
+ DlgFormDB.EndExecute()
+ exit Sub
+ End Select
+ DialogModel.imgTheme.ImageUrl = FormPath &amp; &quot;FormWizard_&quot; &amp; DialogModel.Step &amp; &quot;.bmp&quot;
+ DlgFormDB.Title = WizardTitle(DialogModel.Step)
+WIZARDERROR:
+ If Err &lt;&gt; 0 Then
+ Msgbox(sMsgErrMsg, 16, GetProductName())
+ Resume LOCERROR
+ LOCERROR:
+ End If
+End Sub
+
+
+Sub InitializeLayoutSettings()
+ SwitchArrangementButtons(cTabled)
+ SwitchAlignMode(SBALIGNLEFT)
+ SwitchBorderMode(SB3DBORDER)
+ ToggleBorderGroup(bControlsAreCreated)
+ ToggleAlignGroup(bControlsAreCreated)
+ ArrangeControls()
+ If OldAlignMode &lt;&gt; 0 Then
+ DlgFormDB.GetControl(&quot;optAlign2&quot;).Model.State = 0
+ End If
+End Sub
+
+
+Sub ToggleDatabasePage(bDoEnable as Boolean)
+ With DialogModel
+ .cmdBack.Enabled = False
+ .cmdHelp.Enabled = bDoEnable
+ .cmdGoOn.Enabled = Ubound(DialogModel.lstSelFields.StringItemList()) &lt;&gt; -1
+ .hlnBinaries.Enabled = ((bDoEnable = True) And (bEnableBinaryOptionGroup = True))
+ .optIgnoreBinaries.Enabled = ((bDoEnable = True) And (bEnableBinaryOptionGroup = True))
+ .optBinariesasGraphics.Enabled = ((bDoEnable = True) And (bEnableBinaryOptionGroup = True))
+ End With
+End Sub
+
+
+&apos; This Sub is called from the Procedure &quot;StoreDocument&quot; in the &quot;Tools&quot; Library
+Sub CommitLastDocumentChanges(sTargetPath as String)
+Dim i as Integer
+Dim sBookmarkName as String
+Dim oDBBookmarks as Object
+Dim bLinkExists as Boolean
+Dim sBaseBookmarkName as String
+ sBookmarkName = GetFileNamewithoutExtension(FileNameoutofPath(sTargetPath))
+ sBaseBookmarkName = sBookmarkName
+ oDBBookmarks = oDataSource.GetBookmarks()
+ i = 1
+ Do
+ bLinkExists = oDBBookmarks.HasbyName(sBookmarkName)
+ If bLinkExists Then
+ i = i + 1
+ sBookmarkName = sBaseBookmarkName &amp; &quot;_&quot; &amp; i
+ Else
+ oDBBookmarks.insertByName(sBookmarkName, sTargetPath)
+ End If
+ Loop Until Not bLinkExists
+ bDisposeDoc = False
+ GroupShapesTogether()
+ ToggleDesignMode(oDocument)
+ oDBForm.Reload()
+End Sub
+
+
+Sub StoreFormInDatabase()
+ Dim NoArgs() as new com.sun.star.beans.PropertyValue
+ FormName = &quot;Form_&quot; &amp; sDBName &amp; &quot;_&quot; &amp; TableName &amp; &quot;.sxw&quot;
+ sFormUrl = TempPath &amp; &quot;/&quot; &amp; FormName
+ oDocument.StoreAsUrl(sFormUrl, NoArgs())
+ bdisposeDoc = true
+ DlgFormDB.Endexecute()
+End Sub
+
+
+
+Sub StoreForm()
+Dim sTargetPath as String
+Dim TypeNames(0,2) as String
+Dim oMasterKey as Object
+Dim oTypes() as Object
+ oMasterKey = GetRegistryKeyContent(&quot;org.openoffice.TypeDetection.Types/&quot;)
+ oTypes() = oMasterKey.Types
+ TypeNames(0,0) = GetFilterName(&quot;StarOffice XML (Writer)&quot;)
+ TypeNames(0,1) = &quot;*.sxw&quot;
+ TypeNames(0,2) = &quot;&quot;
+ StoreFormInDatabase()
+&apos; sTargetPath = StoreDocument(oDocument, TypeNames(), &quot;Form_&quot; &amp; sDBName &amp; &quot;_&quot; &amp; TableName &amp; &quot;.sxw&quot;, WorkPath, 1)
+End Sub
+
+
+
+Sub EmptyFieldsListboxes()
+Dim NullList() as String
+ ToggleListboxControls(DialogModel, False)
+ DialogModel.lstFields.StringItemList() = NullList()
+ DialogModel.lstSelFields.StringItemList() = NullList()
+ bEnableBinaryOptionGroup = False
+End Sub
+
+
+Sub DeleteFirstTableListBoxEntry()
+ DeleteFirstListBoxEntry(&quot;lstTables&quot;, sSelectDBTable)
+End Sub
+
+Sub DeleteFirstListboxEntry(ListBoxName as String, DelEntryName as String)
+Dim oListbox as Object
+Dim sFirstItem as String
+dim iSelPos as Integer
+ oListBox = DlgFormDB.getControl(ListBoxName)
+ sFirstItem = oListBox.getItem(0)
+ If sFirstItem = DelEntryName Then
+ iSelPos = oListBox.getSelectedItemPos()
+ oListBox.removeItems(0, 1)
+ If iSelPos &gt; 0 Then
+ oListBox.selectItemPos(iSelPos-1, True)
+ End If
+ End If
+End Sub
+</script:module> \ No newline at end of file
diff --git a/wizards/source/formwizard/Language.xba b/wizards/source/formwizard/Language.xba
new file mode 100644
index 000000000000..5a2dcb1c67fe
--- /dev/null
+++ b/wizards/source/formwizard/Language.xba
@@ -0,0 +1,285 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Language" script:language="StarBasic">Option Explicit
+
+
+Global Const RID_COMMON = 1000
+Global Const RID_FORM = 2200
+
+Public Const SBCANCEL = 2
+Public Const SBREPEAT = 4
+Public LabelDiffHeight as Long
+Public BasicLabelDiffHeight as Long
+
+Public WizardTitle(1 To 3) as String
+Public DlgFormDB as Object
+Public DialogModel as Object
+
+Dim sMsgWizardName as String
+Dim sMsgErrMsg as String
+Dim sMsgErrNoDatabase as String
+Dim sMsgErrNoTableInDatabase as String
+Dim sMsgErrTitleSuggestedExist as String
+Dim sMsgErrTitleSyntaxError as String
+Dim sMsgErrTitleAsTableExist as String
+Dim sMsgProgressText as String
+Dim sMsgCreatedForm as String
+Dim sMsgErrCouldNotOpenObject as String
+Dim sMsgErrNameToLong as String
+Dim sTimeAppendix as String
+Dim sDateAppendix as String
+Public sGoOn as String
+Public sReady as String
+Public sMsgNoConnection as String
+Public sWriterFilterName as String
+Public XPixelFactor as Long
+Public YPixelFactor as Long
+Public sSelectDatasource as String
+Public sSelectDBTable as String
+
+
+
+Sub LoadLanguage ()
+ sMsgWizardName = GetResText(RID_FORM + 0)
+ sMsgErrMsg = GetResText(RID_COMMON + 6)
+ sMsgErrNoDatabase = GetResText(RID_COMMON + 8)
+ sMsgErrNoTableInDatabase = GetResText(RID_COMMON + 9)
+ sMsgErrTitleSuggestedExist = GetResText(RID_COMMON + 10)
+ sMsgErrTitleAsTableExist = GetResText(RID_COMMON + 10)
+ sMsgErrTitleSyntaxError = GetResText(RID_COMMON + 11)
+ sMsgNoConnection = GetResText(RID_COMMON + 14
+ sMsgProgressText = GetResText(RID_FORM + 2)
+ sMsgCreatedForm = GetResText(RID_FORM + 26)
+ sMsgErrNameToLong = GetResText (RID_FORM + 27)
+ sMsgErrCouldNotOpenObject = GetResText (RID_COMMON + 13)
+
+ &apos; Internal Logic
+ sDateAppendix = GetResText(RID_FORM + 4)
+ sTimeAppendix = GetResText(RID_FORM + 5)
+
+ sReady = GetResText(RID_COMMON + 0)
+End Sub
+
+
+Sub SetDialogLanguage ()
+Dim i as Integer
+Dim ButtonHelpText as String
+Dim CmdButton as Object
+Dim IDArray as Variant
+Dim FNameAddOn as String
+Dim slblSelFields as String
+Dim slblFields as String
+
+ DlgFormDB = LoadDialog(&quot;FormWizard&quot;, &quot;DlgFormDB&quot;)
+ DialogModel = DlgFormDB.Model
+
+ With DialogModel
+ .cmdCancel.Label = GetResText(RID_COMMON + 1)
+ .cmdBack.Label = GetResText(RID_COMMON + 2)
+ .cmdHelp.Label = GetResText(RID_COMMON + 20)
+ sGoOn = GetResText(RID_COMMON + 3)
+ .cmdGoOn.Label = sGoOn
+ .lblTables.Label = GetResText(RID_FORM + 6)
+
+ slblFields = GetResText(RID_FORM + 12)
+ slblSelFields = GetResText(RID_FORM + 13)
+ .lblFields.Label = slblFields
+ .lblSelFields.Label = slblSelFields
+
+ .lblStyles.Label = GetResText(RID_FORM + 21)
+ .hlnBorderLayout.Label = GetResText(RID_FORM + 28)
+ .hlnAlign.Label = GetResText(RID_FORM + 32)
+ .hlnArrangements.Label = GetResText(RID_FORM + 35)
+
+ WizardTitle(1) = sMsgWizardName &amp; &quot; - &quot; &amp; GetResText(RID_FORM + 45)
+ WizardTitle(2) = sMsgWizardName &amp; &quot; - &quot; &amp; GetResText(RID_FORM + 46)
+ WizardTitle(3) = sMsgWizardName &amp; &quot; - &quot; &amp; GetResText(RID_FORM + 47)
+
+ .hlnBinaries.Label = GetResText(RID_FORM + 50)
+ .optIgnoreBinaries.Label = GetResText(RID_FORM + 51)
+ .optBinariesasGraphics.Label = GetResText(RID_FORM + 52)
+
+ .hlnBackground.Label = GetResText(RID_FORM + 55)
+ .optTiled.Label = GetResText(RID_FORM + 56)
+ .optArea.Label = GetResText(RID_FORM + 57)
+
+ .optBorder0.Label = GetResText(RID_FORM + 29)
+ .optBorder1.Label = GetResText(RID_FORM + 30)
+ .optBorder2.Label = GetResText(RID_FORM + 31)
+ .optBorder1.State = 1
+
+ .optAlign0.Label = GetResText(RID_FORM + 33)
+ .optAlign2.Label = GetResText(RID_FORM + 34)
+ .optAlign0.State = 1
+
+ FNameAddOn = &quot;&quot;
+ If isHighContrast(DlgFormDB.getPeer) Then FNameAddOn = &quot;_hc&quot;
+
+ IDArray = Array(36, 37, 40, 38, 39)
+ For i = 1 To 5
+ ButtonHelpText = GetResText(RID_FORM + IDArray(i-1)
+ cmdButton = DlgFormDB.getControl(&quot;cmdArrange&quot; &amp; i)
+ cmdButton.Model.ImageURL = FormPath &amp; &quot;Arrange_&quot; &amp; i &amp; FNameAddOn &amp; &quot;.gif&quot;
+ cmdButton.Model.HelpText = ButtonHelpText
+ cmdButton.getPeer().setProperty(&quot;AccessibleName&quot;, ButtonHelpText)
+ Next i
+&apos; .cmdArrange1.ImageURL = FormPath &amp; &quot;Arrange_1&quot; &amp; FNameAddOn &amp; &quot;.gif&quot;
+&apos; .cmdArrange1.HelpText = GetResText(RID_FORM + 36)
+&apos;
+&apos; .cmdArrange2.ImageURL = FormPath &amp; &quot;Arrange_2&quot; &amp; FNameAddOn &amp; &quot;.gif&quot;
+&apos; .cmdArrange2.HelpText = GetResText(RID_FORM + 37)
+&apos;
+&apos; .cmdArrange3.ImageURL = FormPath &amp; &quot;Arrange_3&quot; &amp; FNameAddOn &amp; &quot;.gif&quot;
+&apos; .cmdArrange3.HelpText = GetResText(RID_FORM + 40)
+&apos;
+&apos; .cmdArrange4.ImageURL = FormPath &amp; &quot;Arrange_4&quot; &amp; FNameAddOn &amp; &quot;.gif&quot;
+&apos; .cmdArrange4.HelpText = GetResText(RID_FORM + 38)
+&apos;
+&apos; .cmdArrange5.ImageURL = FormPath &amp; &quot;Arrange_5&quot; &amp; FNameAddOn &amp; &quot;.gif&quot;
+&apos; .cmdArrange5.HelpText = GetResText(RID_FORM + 39)
+ sWriterFilterName = GetResText(RID_FORM + 70)
+ End With
+ DlgFormDB.GetControl(&quot;cmdMoveSelected&quot;).getPeer().setProperty(&quot;AccessibleName&quot;, GetResText(RID_COMMON + 39)
+ DlgFormDB.GetControl(&quot;cmdRemoveSelected&quot;).getPeer().setProperty(&quot;AccessibleName&quot;, GetResText(RID_COMMON + 40)
+ DlgFormDB.GetControl(&quot;cmdMoveAll&quot;).getPeer().setProperty(&quot;AccessibleName&quot;, GetResText(RID_COMMON + 41)
+ DlgFormDB.GetControl(&quot;cmdRemoveAll&quot;).getPeer().setProperty(&quot;AccessibleName&quot;, GetResText(RID_COMMON + 42)
+ DlgFormDB.getControl(&quot;lstFields&quot;).getPeer().setProperty(&quot;AccessibleName&quot;, DeleteStr(slblFields, &quot;~&quot;))
+ DlgFormDB.getControl(&quot;lstSelFields&quot;).getPeer().setProperty(&quot;AccessibleName&quot;, DeleteStr(slblSelFields, &quot;~&quot;))
+
+ sSelectDatasource = GetResText(RID_COMMON + 37)
+ sSelectDBTable = GetResText(RID_COMMON + 38)
+End Sub
+
+
+
+Sub InitializeWidthList()
+
+ If Ubound(WidthList(),1) &gt; 16 Then
+ ReDim WidthList(16,4)
+ End If
+
+ WidthList(0,0) = com.sun.star.sdbc.DataType.BIT &apos; = -7;
+ WidthList(0,1) = cCheckbox
+ WidthList(0,2) = False
+ WidthList(0,3) = &quot;CheckBox&quot;
+
+ WidthList(1,0) = com.sun.star.sdbc.DataType.TINYINT &apos; = -6;
+ WidthList(1,1) = cNumericBox
+ WidthList(1,2) = False
+ WidthList(1,3) = &quot;FormattedField&quot;
+
+ WidthList(2,0) = com.sun.star.sdbc.DataType.SMALLINT &apos; = 5;
+ WidthList(2,1) = cNumericBox
+ WidthList(2,2) = False
+ WidthList(2,3) = &quot;FormattedField&quot;
+
+ WidthList(3,0) = com.sun.star.sdbc.DataType.INTEGER &apos; = 4;
+ WidthList(3,1) = cNumericBox
+ WidthList(3,2) = False
+ WidthList(3,3) = &quot;FormattedField&quot;
+
+ WidthList(4,0) = com.sun.star.sdbc.DataType.BIGINT &apos; = -5;
+ WidthList(4,1) = cNumericBox
+ WidthList(4,2) = False
+ WidthList(4,3) = &quot;FormattedField&quot;
+
+ WidthList(5,0) = com.sun.star.sdbc.DataType.FLOAT &apos; = 6;
+ WidthList(5,1) = cNumericBox
+ WidthList(5,2) = False
+ WidthList(5,3) = &quot;FormattedField&quot;
+
+ WidthList(6,0) = com.sun.star.sdbc.DataType.REAL &apos; = 7;
+ WidthList(6,1) = cNumericBox
+ WidthList(6,2) = False
+ WidthList(6,3) = &quot;FormattedField&quot;
+
+ WidthList(7,0) = com.sun.star.sdbc.DataType.DOUBLE &apos; = 8;
+ WidthList(7,1) = cNumericBox
+ WidthList(7,2) = False
+ WidthList(7,3) = &quot;FormattedField&quot;
+
+ WidthList(8,0) = com.sun.star.sdbc.DataType.NUMERIC &apos; = 2;
+ WidthList(8,1) = cNumericBox
+ WidthList(8,2) = False
+ WidthList(8,3) = &quot;FormattedField&quot;
+
+ WidthList(9,0) = com.sun.star.sdbc.DataType.DECIMAL &apos; = 3; (including decimal places)
+ WidthList(9,1) = cNumericBox
+ WidthList(9,2) = False
+ WidthList(9,3) = &quot;FormattedField&quot;
+
+ WidthList(10,0) = com.sun.star.sdbc.DataType.CHAR &apos; = 1;
+ WidthList(10,1) = cTextBox
+ WidthList(10,2) = False
+ WidthList(10,3) = &quot;TextField&quot;
+
+ WidthList(11,0) = com.sun.star.sdbc.DataType.VARCHAR &apos; = 12;
+ WidthList(11,1) = cTextBox
+ WidthList(11,2) = True
+ WidthList(11,3) = &quot;TextField&quot;
+
+ WidthList(12,0) = com.sun.star.sdbc.DataType.LONGVARCHAR &apos; = -1;
+ WidthList(12,1) = cTextBox
+ WidthList(12,2) = True
+ WidthList(12,3) = &quot;TextField&quot;
+
+ WidthList(13,0) = com.sun.star.sdbc.DataType.DATE &apos; = 91;
+ WidthList(13,1) = cDateBox
+ WidthList(13,2) = False
+ WidthList(13,3) = &quot;DateField&quot;
+
+ WidthList(14,0) = com.sun.star.sdbc.DataType.TIME &apos; = 92;
+ WidthList(14,1) = cTimeBox
+ WidthList(14,2) = False
+ WidthList(14,3) = &quot;TimeField&quot;
+
+ WidthList(15,0) = com.sun.star.sdbc.DataType.TIMESTAMP &apos; = 93;
+ WidthList(15,1) = cDateBox
+ WidthList(15,2) = False
+ WidthList(15,3) = &quot;DateField&quot;
+
+ WidthList(16,0) = com.sun.star.sdbc.DataType.BOOLEAN &apos; = 16;
+ WidthList(16,1) = cCheckbox
+ WidthList(16,2) = False
+ WidthList(16,3) = &quot;CheckBox&quot;
+
+ ImgWidthList(0,0) = com.sun.star.sdbc.DataType.BINARY &apos; = -2;
+ ImgWidthList(0,1) = cImageControl
+ ImgWidthList(0,2) = False
+ ImgWidthList(0,3) = &quot;ImageControl&quot;
+
+ ImgWidthList(1,0) = com.sun.star.sdbc.DataType.VARBINARY &apos; = -3;
+ ImgWidthList(1,1) = cImageControl
+ ImgWidthList(1,2) = False
+ ImgWidthList(1,3) = &quot;ImageControl&quot;
+
+ ImgWidthList(2,0) = com.sun.star.sdbc.DataType.LONGVARBINARY &apos; = -4;
+ ImgWidthList(2,1) = cImageControl
+ ImgWidthList(2,2) = False
+ ImgWidthList(2,3) = &quot;ImageControl&quot;
+
+ ImgWidthList(3,0) = com.sun.star.sdbc.DataType.BLOB &apos; = 2004;
+ ImgWidthList(3,1) = cImageControl
+ ImgWidthList(3,2) = False
+ ImgWidthList(3,3) = &quot;ImageControl&quot;
+
+&apos; Note: the following Fieldtypes are ignored
+&apos;ExcludeList(0) = com.sun.star.sdbc.DataType.SQLNULL
+&apos;ExcludeList(1) = com.sun.star.sdbc.DataType.OTHER
+&apos;ExcludeList(2) = com.sun.star.sdbc.DataType.OBJECT
+&apos;ExcludeList(3) = com.sun.star.sdbc.DataType.DISTINCT
+&apos;ExcludeList(4) = com.sun.star.sdbc.DataType.STRUCT
+&apos;ExcludeList(5) = com.sun.star.sdbc.DataType.ARRAY
+&apos;ExcludeList(6) = com.sun.star.sdbc.DataType.CLOB
+&apos;ExcludeList(7) = com.sun.star.sdbc.DataType.REF
+
+ oModelService(cLabel) = &quot;com.sun.star.form.component.FixedText&quot;
+ oModelService(cTextBox) = &quot;com.sun.star.form.component.TextField&quot;
+ oModelService(cCheckBox) = &quot;com.sun.star.form.component.CheckBox&quot;
+ oModelService(cDateBox) = &quot;com.sun.star.form.component.DateField&quot;
+ oModelService(cTimeBox) = &quot;com.sun.star.form.component.TimeField&quot;
+ oModelService(cNumericBox) = &quot;com.sun.star.form.component.FormattedField&quot;
+ oModelService(cGridControl) = &quot;com.sun.star.form.component.GridControl&quot;
+ oModelService(cImageControl) = &quot;com.sun.star.form.component.DatabaseImageControl&quot;
+End Sub
+</script:module>
diff --git a/wizards/source/formwizard/Layouter.xba b/wizards/source/formwizard/Layouter.xba
new file mode 100644
index 000000000000..ae10314bbda3
--- /dev/null
+++ b/wizards/source/formwizard/Layouter.xba
@@ -0,0 +1,380 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Layouter" script:language="StarBasic">Option Explicit
+
+Public oProgressbar as Object
+Public ProgressValue as Integer
+Public oDocument as Object
+Public oController as Object
+Public oForm as Object
+Public oDrawPage as Object
+Public oPageStyle as Object
+
+Public nMaxColRightX as Long
+Public nMaxTCWidth as Long
+Public nMaxRowRightX as Long
+Public nMaxRowY as Long
+Public nSecMaxRowY as Long
+Public MaxIndex as Integer
+Public CurIndex as Integer
+
+Public Const cVertDistance = 200
+Public Const cHoriDistance = 300
+
+Public nPageWidth as Long
+Public nPageHeight as Long
+Public nFormWidth as Long
+Public nFormHeight as Long
+Public nMaxHoriPos as Long
+Public nMaxVertPos as Long
+
+Public CONST SBALIGNLEFT = 0
+Public CONST SBALIGNRIGHT = 2
+
+Public Const SBNOBORDER = 0
+Public Const SB3DBORDER = 1
+Public Const SBSIMPLEBORDER = 2
+
+Public CurArrangement as Integer
+Public CurBorderType as Integer
+Public CurAlignmode as Integer
+
+Public OldAlignMode as Integer
+Public OldBorderType as Integer
+Public OldArrangement as Integer
+
+Public Const cColumnarLeft = 1
+Public Const cColumnarTop = 2
+Public Const cTabled = 3
+Public Const cLeftJustified = 4
+Public Const cTopJustified = 5
+
+Public Const cXOffset = 1000
+Public Const cYOffset = 700
+&apos; This is the viewed space that we lose because of the symbol bars
+Public Const cSymbolMargin = 2000
+Public Const MaxFieldIndex = 200
+
+Public Const cControlCollectionCount = 9
+Public Const cLabel = 1
+Public Const cTextBox = 2
+Public Const cCheckBox = 3
+Public Const cDateBox = 4
+Public Const cTimeBox = 5
+Public Const cNumericBox = 6
+Public Const cCurrencyBox = 7
+Public Const cGridControl = 8
+Public Const cImageControl = 9
+
+Public Styles(100, 8) as String
+
+Public CurControlType as Integer
+Public CurFieldlength as Double
+Public CurFieldType as Integer
+Public CurFieldName as String
+Public CurControlName as String
+Public CurFormatKey as Long
+Public CurDefaultValue
+Public CurIsCurrency as Boolean
+Public CurScale as Integer
+Public CurHelpText as String
+
+Public FieldMetaValues(MaxFieldIndex, 8)
+&apos; Description of this List:
+&apos; CurFieldType = FieldMetaValues(Index,0)
+&apos; CurFieldLength = FieldMetaValues(Index,1)
+&apos; CurControlType = FieldMetaValues(Index,2) (ControlType eg. cLabel, cTextbox usw.)
+&apos; CurControlName = FieldMetaValues(Index,3)
+&apos; CurFormatKey = FieldMetaValues(Index,4)
+&apos; CurDefaultValue = FieldMetaValues(Index,5)
+&apos; CurIsCurrency = FieldMetaValues(Index,6)
+&apos; CurScale = FieldMetaValues(Index,7)
+&apos; CurHelpText = FieldMetaValues(Index,8)
+
+Public FieldNames(MaxFieldIndex) as string
+Public oModelService(cControlCollectionCount) as String
+Public oGridModel as Object
+
+
+Function InsertControl(oContainer as Object, oControlObject as object, aPoint as Object, aSize as Object)
+Dim oShape as object
+ oShape = oDocument.CreateInstance (&quot;com.sun.star.drawing.ControlShape&quot;)
+ oShape.Size = aSize
+ oShape.Position = aPoint
+ oShape.AnchorType = com.sun.star.text.TextContentAnchorType.AT_PARAGRAPH
+ oShape.control = oControlObject
+ oContainer.Add(oShape)
+ InsertControl() = oShape
+End Function
+
+
+Function ArrangeControls()
+Dim oShape as Object
+Dim i as Integer
+ oProgressbar = oDocument.GetCurrentController.GetFrame.CreateStatusIndicator
+ oProgressbar.Start(&quot;&quot;, MaxIndex)
+ If oDBForm.HasbyName(&quot;Grid1&quot;) Then
+ RemoveShapes()
+ End If
+ ToggleLayoutPage(False)
+ Select Case CurArrangement
+ Case cTabled
+ PositionGridControl(MaxIndex)
+ Case Else
+ PositionControls(MaxIndex)
+ End Select
+ ToggleLayoutPage(True)
+ oProgressbar.End
+End Function
+
+
+Sub OpenFormDocument()
+Dim NoArgs() as new com.sun.star.beans.PropertyValue
+Dim oViewSettings as Object
+ oDocument = CreateNewDocument(&quot;swriter&quot;)
+ oProgressbar = oDocument.GetCurrentController.GetFrame.CreateStatusIndicator()
+ oProgressbar.Start(&quot;&quot;, 100)
+ oDocument.ApplyFormDesignMode = False
+ oController = oDocument.GetCurrentController
+ oViewSettings = oDocument.CurrentController.ViewSettings
+ oViewSettings.ShowTableBoundaries = False
+ oViewSettings.ShowOnlineLayout = True
+ oDrawPage = oDocument.DrawPage
+ oPageStyle = oDocument.StyleFamilies.GetByName(&quot;PageStyles&quot;).GetByName(&quot;Standard&quot;)
+End Sub
+
+
+Sub InitializeLabelValues()
+Dim oLabelModel as Object
+Dim oTBModel as Object
+Dim oLabelShape as Object
+Dim oTBShape as Object
+Dim aTBSize As New com.sun.star.awt.Size
+Dim aLabelSize As New com.sun.star.awt.Size
+Dim aPoint As New com.sun.star.awt.Point
+Dim aSize As New com.sun.star.awt.Size
+Dim oLocControl as Object
+Dim oLocPeer as Object
+ oLabelModel = CreateUnoService(&quot;com.sun.star.form.component.FixedText&quot;)
+ oTBModel = CreateUnoService(&quot;com.sun.star.form.component.TextField&quot;)
+
+ Set oLabelShape = InsertControl(oDrawPage, oLabelModel, aPoint, aLabelSize)
+ Set oTBShape = InsertControl(oDrawPage, oTBModel, aPoint, aSize)
+
+ oLocPeer = oController.GetControl(oLabelModel).Peer
+ XPixelFactor = 100000/oLocPeer.GetInfo.PixelPerMeterX
+ YPixelFactor = 100000/oLocPeer.GetInfo.PixelPerMeterY
+ aLabelSize = GetPeerSize(oLabelModel, oLocControl, &quot;The quick brown fox...&quot;)
+ nTCHeight = (aLabelSize.Height+1) * YPixelFactor
+ aTBSize = GetPeerSize(oTBModel, oLocControl, &quot;The quick brown fox...&quot;)
+ nDBRefHeight = (aTBSize.Height+1) * YPixelFactor
+ BasicLabelDiffHeight = Clng((nDBRefHeight - nTCHeight)/2)
+ oDrawPage.Remove(oLabelShape)
+ oDrawPage.Remove(oTBShape)
+End Sub
+
+
+Sub ConfigurePageStyle()
+Dim aPageSize As New com.sun.star.awt.Size
+Dim aSize As New com.sun.star.awt.Size
+ oPageStyle.IsLandscape = True
+ aPageSize = oPageStyle.Size
+ nPageWidth = aPageSize.Width
+ nPageHeight = aPageSize.Height
+ aSize.Width = nPageHeight
+ aSize.Height = nPageWidth
+ oPageStyle.Size = aSize
+ nPageWidth = nPageHeight
+ nPageHeight = oPageStyle.Size.Height
+ nFormWidth = nPageWidth - oPageStyle.RightMargin - oPageStyle.LeftMargin - 2 * cXOffset
+ nFormHeight = nPageHeight - oPageStyle.TopMargin - oPageStyle.BottomMargin - 2 * cYOffset - cSymbolMargin
+End Sub
+
+
+&apos; Modify the Borders of the Controls
+Sub ChangeBorderLayouts(oEvent as Object)
+Dim oModel as Object
+Dim i as Integer
+Dim oCurModel as Object
+Dim sLocText as String
+Dim oGroupShape as Object
+Dim s as Integer
+ If Not bDebug Then
+ On Local Error GoTo WIZARDERROR
+ End If
+ oModel = oEvent.Source.Model
+ SwitchBorderMode(Val(Right(oModel.Name,1)))
+ ToggleLayoutPage(False)
+ If CurArrangement = cTabled Then
+ oGridModel.Border = CurBorderType
+ Else
+ If OldBorderType &lt;&gt; CurBorderType Then
+ For i = 0 To MaxIndex
+ If oDBShapeList(i).SupportsService(&quot;com.sun.star.drawing.GroupShape&quot;) Then
+ oGroupShape = oDBShapeList(i)
+ For s = 0 To oGroupShape.Count-1
+ oGroupShape(s).Control.Border = CurBorderType
+ Next s
+ Else
+ If oDBModelList(i).PropertySetInfo.HasPropertyByName(&quot;Border&quot;) Then
+ oDBModelList(i).Border = CurBorderType
+ End If
+ End If
+ Next i
+ End If
+ End If
+ ToggleLayoutPage(True)
+WIZARDERROR:
+ If Err &lt;&gt; 0 Then
+ Msgbox(sMsgErrMsg, 16, GetProductName())
+ Resume LOCERROR
+ LOCERROR:
+ DlgFormDB.Dispose()
+ End If
+End Sub
+
+
+Sub ChangeLabelAlignments(oEvent as Object)
+Dim i as Integer
+Dim oSize as New com.sun.star.awt.Size
+Dim oModel as Object
+ If Not bDebug Then
+ On Local Error GoTo WIZARDERROR
+ End If
+ oModel = oEvent.Source.Model
+ SwitchAlignMode(Val(Right(oModel.Name,1)))
+ ToggleLayoutPage(False)
+ If OldAlignMode &lt;&gt; CurAlignMode Then
+ For i = 0 To MaxIndex
+ oTCShapeList(i).GetControl.Align = CurAlignmode
+ Next i
+ End If
+ If CurAlignmode = com.sun.star.awt.TextAlign.RIGHT Then
+ For i = 0 To Ubound(oTCShapeList())
+ oSize = oTCShapeList(i).Size
+ oSize.Width = oDBShapeList(i).Position.X - oTCShapeList(i).Position.X - cHoriDistance
+ oTCShapeList(i).Size = oSize
+ Next i
+ End If
+
+WIZARDERROR:
+ If Err &lt;&gt; 0 Then
+ Msgbox(sMsgErrMsg, 16, GetProductName())
+ Resume LOCERROR
+ LOCERROR:
+ End If
+ ToggleLayoutPage(True)
+End Sub
+
+
+Sub ChangeArrangemode(oEvent as Object)
+Dim oModel as Object
+ If Not bDebug Then
+ On Local Error GoTo WIZARDERROR
+ End If
+ oModel = oEvent.Source.Model
+ SwitchArrangementButtons(Val(Right(oModel.Name,1)))
+ oModel.State = 1
+ DlgFormDB.GetControl(&quot;cmdArrange&quot; &amp; OldArrangement).Model.State = 0
+ If CurArrangement &lt;&gt; OldArrangement Then
+ ArrangeControls()
+ Select Case CurArrangement
+ Case cTabled
+ ToggleBorderGroup(False)
+ ToggleAlignGroup(False)
+ Case Else &apos; cColumnarTop,cLeftJustified, cTopJustified
+ ToggleAlignGroup(CurArrangement = cColumnarLeft)
+ If CurArrangement = cColumnarTop Then
+ If CurAlignMode = com.sun.star.awt.TextAlign.RIGHT Then
+ DialogModel.optAlign0.State = 1
+ CurAlignMode = com.sun.star.awt.TextAlign.LEFT
+ OldAlignMode = com.sun.star.awt.TextAlign.RIGHT
+ End If
+ End If
+ ControlCaptionstoStandardLayout()
+ oDBForm.Load
+ End Select
+ End If
+WIZARDERROR:
+ If Err &lt;&gt; 0 Then
+ Msgbox(sMsgErrMsg, 16, GetProductName())
+ Resume LOCERROR
+ LOCERROR:
+ End If
+End Sub
+
+
+Sub ToggleBorderGroup(bDoEnable as Boolean)
+ With DialogModel
+ .hlnBorderLayout.Enabled = bDoEnable
+ .optBorder0.Enabled = bDoEnable &apos; 0: No border
+ .optBorder1.Enabled = bDoEnable &apos; 1: 3D border
+ .optBorder2.Enabled = bDoEnable &apos; 2: simple border
+ End With
+End Sub
+
+
+Sub ToggleAlignGroup(ByVal bDoEnable as Boolean)
+ With DialogModel
+ If bDoEnable Then
+ bDoEnable = CurArrangement = cColumnarLeft
+ End If
+ .hlnAlign.Enabled = bDoEnable
+ .optAlign0.Enabled = bDoEnable
+ .optAlign2.Enabled = bDoEnable
+ End With
+End Sub
+
+
+Sub ToggleLayoutPage(bDoEnable as Boolean, Optional FocusControlName as String)
+ DialogModel.Enabled = bDoEnable
+ If bDoEnable Then
+ If Not bDebug Then
+ oDocument.UnlockControllers()
+ End If
+ ToggleOptionButtons(DialogModel,(bWithBackGraphic = True))
+ ToggleAlignGroup(bDoEnable)
+ ToggleBorderGroup(bDoEnable)
+ Else
+ If Not bDebug Then
+ oDocument.LockControllers()
+ End If
+ End If
+ If Not IsMissing(FocusControlName) Then
+ DlgFormDB.GetControl(FocusControlName).SetFocus()
+ End If
+End Sub
+
+
+Sub DestroyControlShapes(oDrawPage as Object)
+Dim i as Integer
+Dim oShape as Object
+ For i = oDrawPage.Count-1 To 0 Step -1
+ oShape = oDrawPage.GetByIndex(i)
+ If oShape.ShapeType = &quot;com.sun.star.drawing.ControlShape&quot; Then
+ oShape.Dispose()
+ End If
+ Next i
+End Sub
+
+
+Sub SwitchArrangementButtons(ByVal LocArrangement as Integer)
+ OldArrangement = CurArrangement
+ CurArrangement = LocArrangement
+ If OldArrangement &lt;&gt; 0 Then
+ DlgFormDB.GetControl(&quot;cmdArrange&quot; &amp; OldArrangement).Model.State = 0
+ End If
+ DlgFormDB.GetControl(&quot;cmdArrange&quot; &amp; CurArrangement).Model.State = 1
+End Sub
+
+
+Sub SwitchBorderMode(ByVal LocBorderType as Integer)
+ OldBorderType = CurBorderType
+ CurBorderType = LocBorderType
+End Sub
+
+
+Sub SwitchAlignMode(ByVal LocAlignMode as Integer)
+ OldAlignMode = CurAlignMode
+ CurAlignMode = LocAlignMode
+End Sub</script:module> \ No newline at end of file
diff --git a/wizards/source/formwizard/dbwizres.src b/wizards/source/formwizard/dbwizres.src
new file mode 100644
index 000000000000..c04d77b9fcdd
--- /dev/null
+++ b/wizards/source/formwizard/dbwizres.src
@@ -0,0 +1,3518 @@
+/*************************************************************************
+ *
+ * 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.
+ *
+ ************************************************************************/// common
+
+#define RID_COMMON_START 500
+#define RID_DB_COMMON_START 1000
+
+// db wizards
+
+#define RID_DB_FORM_WIZARD_START 2200
+#define RID_DB_QUERY_WIZARD_START 2300
+#define RID_DB_REPORT_WIZARD_START 2400
+#define RID_DB_TABLE_WIZARD_START 2500
+
+
+#define RID_LETTERWIZARDDIALOG_START 3000
+#define RID_LETTERWIZARDGREETING_START 3080
+#define RID_LETTERWIZARDSALUTATION_START 3090
+#define RID_LETTERWIZARDROADMAP_START 3100
+#define RID_LETTERWIZARDLANGUAGE_START 3110
+
+
+#define RID_FAXWIZARDDIALOG_START 3200
+#define RID_FAXWIZARDCOMMUNICATION_START 3270
+#define RID_FAXWIZARDGREETING_START 3280
+#define RID_FAXWIZARDSALUTATION_START 3290
+#define RID_FAXWIZARDROADMAP_START 3300
+
+// web wizard
+
+#define RID_WEBWIZARDDIALOG_START 4000
+#define RID_WEBWIZARDDIALOG_FTP 4200
+
+// agenda wizard
+
+#define RID_AGENDAWIZARDDIALOG_START 5000
+
+
+
+// ============================================================================
+
+String RID_COMMON_START + 0
+{
+ Text [ en-US ] = "The directory '%1' could not be created.<BR>There may not be enough space left on your hard disk.";
+};
+
+String RID_COMMON_START + 1
+{
+ Text [ en-US] = "The text document could not be created.<BR>Please check if the module 'PRODUCTNAME Writer' is installed.";
+};
+
+String RID_COMMON_START + 2
+{
+ Text [ en-US] = "The spreadsheet could not be created.<BR>Please check if the module 'PRODUCTNAME Calc' is installed.";
+};
+
+String RID_COMMON_START + 3
+{
+ Text [ en-US] = "The presentation could not be created.<BR>Please check if the module 'PRODUCTNAME Impress' is installed.";
+};
+
+String RID_COMMON_START + 4
+{
+ Text [ en-US] = "The drawing could not be created.<BR>Please check if the module 'PRODUCTNAME Draw' is installed.";
+};
+
+String RID_COMMON_START + 5
+{
+ Text [ en-US] = "The formula could not be created.<BR>Please check if the module 'PRODUCTNAME Math' is installed.";
+};
+
+String RID_COMMON_START + 6
+{
+ Text [ en-US] = "The files required could not be found.<BR>Please start the %PRODUCTNAME Setup and choose 'Repair'.";
+};
+
+String RID_COMMON_START + 7
+{
+ Text [ en-US] = "The file '<PATH>' already exists.<BR><BR>Would you like to overwrite the existing file?";
+};
+
+String RID_COMMON_START + 8
+{
+ Text [ en-US] = "Yes";
+};
+
+String RID_COMMON_START + 9
+{
+ Text [ en-US] = "Yes to All";
+};
+
+String RID_COMMON_START + 10
+{
+ Text [ en-US] = "No";
+};
+
+String RID_COMMON_START + 11
+{
+ Text [ en-US] = "Cancel";
+};
+
+String RID_COMMON_START + 12
+{
+ Text [ en-US] = "~Finish";
+};
+
+String RID_COMMON_START + 13
+{
+ Text [ en-US] = "< ~Back";
+};
+
+String RID_COMMON_START + 14
+{
+ Text [ en-US] = "~Next >";
+};
+
+String RID_COMMON_START + 15
+{
+ Text [ en-US ] = "~Help";
+};
+
+String RID_COMMON_START + 16
+{
+ Text [ en-US] = "Steps";
+};
+
+String RID_COMMON_START + 17
+{
+ Text [ en-US] = "Close";
+};
+
+String RID_COMMON_START + 18
+{
+ Text [ en-US] = "OK";
+};
+
+String RID_COMMON_START + 19
+{
+ Text [ en-US] = "The file already exists. Do you want to overwrite it?";
+};
+
+String RID_COMMON_START + 20
+{
+ Text [ en-US] = "Template created via <wizard_name> on <current_date>.";
+};
+
+String RID_COMMON_START + 21
+{
+ Text [ en-US] = "The wizard could not be run, because important files were not found.\nUnder 'Tools - Options - %PRODUCTNAME - Paths' click the 'Default' button to reset the paths to the original default settings.\nThen run the wizard again.";
+};
+
+
+// end of common section ======================================================
+
+
+String RID_DB_COMMON_START + 0
+{
+ Text [ en-US] = "C~reate";
+};
+String RID_DB_COMMON_START + 1
+{
+ Text [ en-US] = "~Cancel";
+};
+
+String RID_DB_COMMON_START + 2
+{
+ Text [ en-US] = "<< ~Back";
+};
+
+String RID_DB_COMMON_START + 3
+{
+ Text [ en-US] = "~Next >>";
+};
+String RID_DB_COMMON_START + 4
+{
+ Text [ en-US] = "~Database";
+};
+String RID_DB_COMMON_START + 5
+{
+ Text [ en-US] = "~Table name";
+};
+
+String RID_DB_COMMON_START + 6
+{
+ Text [ en-US] = "An error occurred while running the wizard. The wizard will be terminated.";
+};
+
+
+String RID_DB_COMMON_START + 14
+{
+ Text [ en-US ] = "No connection to the database could be established.";
+};
+
+String RID_DB_COMMON_START + 20
+{
+ Text [ en-US ] = "~Help";
+};
+
+String RID_DB_COMMON_START + 21
+{
+ Text [ en-US ] = "~Stop";
+};
+
+
+String RID_DB_COMMON_START + 30
+{
+ Text[ en-US ] = "The document could not be saved.";
+};
+
+
+String RID_DB_COMMON_START + 33
+{
+ Text[ en-US ] = "Exiting the wizard";
+};
+
+String RID_DB_COMMON_START + 34
+{
+ Text[ en-US ] = "Connecting to data source...";
+};
+
+String RID_DB_COMMON_START + 35
+{
+ Text[ en-US ] = "The connection to the data source could not be established.";
+};
+
+
+String RID_DB_COMMON_START + 36
+{
+ Text[ en-US ] = "The file path entered is not valid.";
+};
+
+
+String RID_DB_COMMON_START + 37
+{
+ Text[ en-US ] = "Please select a data source";
+};
+
+String RID_DB_COMMON_START + 38
+{
+ Text[ en-US ] = "Please select a table or query";
+};
+
+String RID_DB_COMMON_START + 39
+{
+ Text[ en-US ] = "Add field";
+};
+
+String RID_DB_COMMON_START + 40
+{
+ Text[ en-US ] = "Remove field";
+};
+
+String RID_DB_COMMON_START + 41
+{
+ Text[ en-US ] = "Add all fields";
+};
+
+String RID_DB_COMMON_START + 42
+{
+ Text[ en-US ] = "Remove all fields";
+};
+
+String RID_DB_COMMON_START + 43
+{
+ Text[ en-US ] = "Move field up";
+};
+
+String RID_DB_COMMON_START + 44
+{
+ Text[ en-US ] = "Move field down";
+};
+
+String RID_DB_COMMON_START + 45
+{
+ Text [ en-US] = "The field names from '%NAME' could not be retrieved.";
+};
+
+
+
+// ============================================================================
+// Form Wizard
+// ============================================================================
+
+String RID_DB_FORM_WIZARD_START + 0
+{
+ Text [ en-US ] = "Form Wizard";
+};
+
+String RID_DB_FORM_WIZARD_START + 1
+{
+ Text [ en-US ] = "Fields in ~the form";
+};
+
+String RID_DB_FORM_WIZARD_START + 2
+{
+ Text [ en-US ] = "Binary fields are always listed and selectable from the left list.\nIf possible, they are interpreted as images.";
+};
+
+String RID_DB_FORM_WIZARD_START + 3
+{
+ Text [ en-US ] = "A subform is a form that is inserted in another form.\nUse subforms to show data from tables or queries with a one-to-many relationship.";
+};
+
+String RID_DB_FORM_WIZARD_START + 4
+{
+ Text [ en-US ] = "~Add Subform";
+};
+
+String RID_DB_FORM_WIZARD_START + 5
+{
+ Text [ en-US ] = "~Subform based on existing relation";
+};
+
+String RID_DB_FORM_WIZARD_START + 6
+{
+ Text [ en-US ] = "Tables or queries";
+};
+
+String RID_DB_FORM_WIZARD_START + 7
+{
+ Text [ en-US ] = "Subform based on ~manual selection of fields";
+};
+
+String RID_DB_FORM_WIZARD_START + 8
+{
+ Text [ en-US ] = "~Which relation do you want to add?";
+};
+
+String RID_DB_FORM_WIZARD_START + 9
+{
+ Text [ en-US ] = "Fields in the ~subform";
+};
+
+String RID_DB_FORM_WIZARD_START + 12
+{
+ Text [ en-US ] = "~Available fields";
+};
+
+String RID_DB_FORM_WIZARD_START + 13
+{
+ Text [ en-US ] = "Fields in form";
+};
+
+
+String RID_DB_FORM_WIZARD_START + 19
+{
+ Text [ en-US ] = "The join '<FIELDNAME1>' and '<FIELDNAME2>' has been selected twice.\nBut joins may only be used once.";
+};
+
+String RID_DB_FORM_WIZARD_START + 20
+{
+ Text [ en-US ] = "~First joined subform field";
+};
+
+String RID_DB_FORM_WIZARD_START + 21
+{
+ Text [ en-US ] = "~Second joined subform field";
+};
+
+String RID_DB_FORM_WIZARD_START + 22
+{
+ Text [ en-US ] = "~Third joined subform field";
+};
+
+String RID_DB_FORM_WIZARD_START + 23
+{
+ Text [ en-US ] = "~Fourth joined subform field";
+};
+
+String RID_DB_FORM_WIZARD_START + 24
+{
+ Text [ en-US ] = "F~irst joined main form field";
+};
+
+String RID_DB_FORM_WIZARD_START + 25
+{
+ Text [ en-US ] = "S~econd joined main form field";
+};
+
+String RID_DB_FORM_WIZARD_START + 26
+{
+ Text [ en-US ] = "T~hird joined main form field";
+};
+
+String RID_DB_FORM_WIZARD_START + 27
+{
+ Text [ en-US ] = "F~ourth joined main form field";
+};
+
+
+
+String RID_DB_FORM_WIZARD_START + 28
+{
+ Text [ en-US ] = "Field border";
+};
+
+String RID_DB_FORM_WIZARD_START + 29
+{
+ Text [ en-US ] = "No border";
+};
+
+
+String RID_DB_FORM_WIZARD_START + 30
+{
+ Text [ en-US ] = "3D look";
+};
+
+String RID_DB_FORM_WIZARD_START + 31
+{
+ Text [ en-US ] = "Flat";
+};
+
+String RID_DB_FORM_WIZARD_START + 32
+{
+ Text [ en-US ] = "Label placement";
+};
+
+String RID_DB_FORM_WIZARD_START + 33
+{
+ Text [ en-US ] = "Align left";
+};
+
+String RID_DB_FORM_WIZARD_START + 34
+{
+ Text [ en-US ] = "Align right";
+};
+
+String RID_DB_FORM_WIZARD_START + 35
+{
+ Text [ en-US ] = "Arrangement of DB fields";
+};
+
+String RID_DB_FORM_WIZARD_START + 36
+{
+ Text [ en-US ] = "Columnar - Labels Left";
+};
+
+String RID_DB_FORM_WIZARD_START + 37
+{
+ Text [ en-US ] = "Columnar - Labels on Top";
+};
+
+String RID_DB_FORM_WIZARD_START + 38
+{
+ Text [ en-US ] = "In Blocks - Labels Left";
+};
+
+String RID_DB_FORM_WIZARD_START + 39
+{
+ Text [ en-US ] = "In Blocks - Labels Above";
+};
+
+String RID_DB_FORM_WIZARD_START + 40
+{
+ Text [ en-US ] = "As Data Sheet";
+};
+
+
+String RID_DB_FORM_WIZARD_START + 41
+{
+ Text [ en-US ] = "Arrangement of the main form";
+};
+
+String RID_DB_FORM_WIZARD_START + 42
+{
+ Text [ en-US ] = "Arrangement of the subform";
+};
+
+
+String RID_DB_FORM_WIZARD_START + 44
+{
+ Text [ en-US ] = "The form is to be ~used for entering new data only.";
+};
+
+String RID_DB_FORM_WIZARD_START + 45
+{
+ Text [ en-US ] = "Existing data will not be displayed ";
+};
+
+String RID_DB_FORM_WIZARD_START + 46
+{
+ Text [ en-US ] = "T~he form is to display all data";
+};
+
+String RID_DB_FORM_WIZARD_START + 47
+{
+ Text [ en-US ] = "Do not allow ~modification of existing data";
+};
+
+String RID_DB_FORM_WIZARD_START + 48
+{
+ Text [ en-US ] = "Do not allow ~deletion of existing data";
+};
+
+String RID_DB_FORM_WIZARD_START + 49
+{
+ Text [ en-US ] = "Do not allow ~addition of new data";
+};
+
+
+
+String RID_DB_FORM_WIZARD_START + 50
+{
+ Text [ en-US ] = "Name of ~the form";
+};
+
+
+
+String RID_DB_FORM_WIZARD_START + 51
+{
+ Text [ en-US ] = "How do you want to proceed after creating the form?";
+};
+
+
+String RID_DB_FORM_WIZARD_START + 52
+{
+ Text [ en-US ] = "~Work with the form";
+};
+
+String RID_DB_FORM_WIZARD_START + 53
+{
+ Text [ en-US ] = "~Modify the form";
+};
+
+
+String RID_DB_FORM_WIZARD_START + 55
+{
+ Text [ en-US ] = "~Page Styles";
+};
+
+
+
+String RID_DB_FORM_WIZARD_START + 80
+{
+ Text [ en-US ] = "Field selection";
+};
+
+
+String RID_DB_FORM_WIZARD_START + 81
+{
+ Text [ en-US ] = "Set up a subform";
+};
+
+
+String RID_DB_FORM_WIZARD_START + 82
+{
+ Text [ en-US ] = "Add subform fields";
+};
+
+String RID_DB_FORM_WIZARD_START + 83
+{
+ Text [ en-US ] = "Get joined fields";
+};
+
+String RID_DB_FORM_WIZARD_START + 84
+{
+ Text [ en-US ] = "Arrange controls";
+};
+
+String RID_DB_FORM_WIZARD_START + 85
+{
+ Text [ en-US ] = "Set data entry";
+};
+
+String RID_DB_FORM_WIZARD_START + 86
+{
+ Text [ en-US ] = "Apply styles";
+};
+
+String RID_DB_FORM_WIZARD_START + 87
+{
+ Text [ en-US ] = "Set name";
+};
+
+String RID_DB_FORM_WIZARD_START + 88
+{
+ Text [ en-US ] = "(Date)";
+};
+
+String RID_DB_FORM_WIZARD_START + 89
+{
+ Text [ en-US ] = "(Time)";
+};
+
+
+String RID_DB_FORM_WIZARD_START + 90
+{
+ Text [ en-US ] = "Select the fields of your form";
+};
+
+
+String RID_DB_FORM_WIZARD_START + 91
+{
+ Text [ en-US ] = "Decide if you want to set up a subform";
+};
+
+String RID_DB_FORM_WIZARD_START + 92
+{
+ Text [ en-US ] = "Select the fields of your subform";
+};
+
+String RID_DB_FORM_WIZARD_START + 93
+{
+ Text [ en-US ] = "Select the joins between your forms";
+};
+
+String RID_DB_FORM_WIZARD_START + 94
+{
+ Text [ en-US ] = "Arrange the controls on your form";
+};
+
+String RID_DB_FORM_WIZARD_START + 95
+{
+ Text [ en-US ] = "Select the data entry mode";
+};
+
+String RID_DB_FORM_WIZARD_START + 96
+{
+ Text [ en-US ] = "Apply the style of your form";
+};
+
+String RID_DB_FORM_WIZARD_START + 97
+{
+ Text [ en-US ] = "Set the name of the form";
+};
+
+String RID_DB_FORM_WIZARD_START + 98
+{
+ Text [ en-US ] = "A form with the name '%FORMNAME' already exists.\nChoose another name.";
+};
+
+
+// ============================================================================
+
+String RID_DB_QUERY_WIZARD_START + 0
+{
+ Text [ en-US ] = "Query Wizard";
+};
+
+String RID_DB_QUERY_WIZARD_START + 1
+{
+ Text [ en-US] = "Query";
+};
+
+
+String RID_DB_QUERY_WIZARD_START + 2
+{
+ Text [ en-US] = "Query Wizard";
+};
+
+
+String RID_DB_QUERY_WIZARD_START + 3
+{
+ Text [ en-US] = "~Tables";
+};
+
+String RID_DB_QUERY_WIZARD_START + 4
+{
+ Text [ en-US] = "A~vailable fields";
+};
+
+
+String RID_DB_QUERY_WIZARD_START + 5
+{
+ Text [ en-US] = "Name ~of the query";
+};
+
+String RID_DB_QUERY_WIZARD_START + 6
+{
+ Text [ en-US] = "Display ~Query";
+};
+
+String RID_DB_QUERY_WIZARD_START + 7
+{
+ Text [ en-US] = "~Modify Query";
+};
+
+String RID_DB_QUERY_WIZARD_START + 8
+{
+ Text [ en-US] = "~How do you want to proceed after creating the query?";
+};
+
+
+String RID_DB_QUERY_WIZARD_START + 9
+{
+ Text [ en-US] = "Match ~all of the following";
+};
+
+String RID_DB_QUERY_WIZARD_START + 10
+{
+ Text [ en-US] = "~Match any of the following";
+};
+
+String RID_DB_QUERY_WIZARD_START + 11
+{
+ Text [ en-US] = "~Detailed query (Shows all records of the query.)";
+};
+
+String RID_DB_QUERY_WIZARD_START + 12
+{
+ Text [ en-US] = "~Summary query (Shows only results of aggregate functions.)";
+};
+
+
+String RID_DB_QUERY_WIZARD_START + 16
+{
+ Text [ en-US] = "Aggregate functions";
+};
+
+
+String RID_DB_QUERY_WIZARD_START + 17
+{
+ Text [ en-US] = "Fields";
+};
+
+String RID_DB_QUERY_WIZARD_START + 18
+{
+ Text [ en-US] = "~Group by";
+};
+
+
+String RID_DB_QUERY_WIZARD_START + 19
+{
+ Text [ en-US] = "Field";
+};
+
+String RID_DB_QUERY_WIZARD_START + 20
+{
+ Text [ en-US] = "Alias";
+};
+
+String RID_DB_QUERY_WIZARD_START + 21
+{
+ Text [ en-US] = "Table: ";
+};
+
+
+String RID_DB_QUERY_WIZARD_START + 22
+{
+ Text [ en-US] = "Query: ";
+};
+
+
+String RID_DB_QUERY_WIZARD_START + 24
+{
+ Text [ en-US] = "Condition";
+};
+
+String RID_DB_QUERY_WIZARD_START + 25
+{
+ Text [ en-US] = "Value";
+};
+
+// --------------------------------------
+// don't change anything to the next 10 values
+// they are list elements and need to be as follows
+String RID_DB_QUERY_WIZARD_START + 26
+{
+ Text [ en-US] = "is equal to";
+};
+
+String RID_DB_QUERY_WIZARD_START + 27
+{
+ Text [ en-US] = "is not equal to";
+};
+
+
+String RID_DB_QUERY_WIZARD_START + 28
+{
+ Text [ en-US] = "is smaller than";
+};
+
+String RID_DB_QUERY_WIZARD_START + 29
+{
+ Text [ en-US] = "is greater than";
+};
+
+String RID_DB_QUERY_WIZARD_START + 30
+{
+ Text [ en-US] = "is equal or less than ";
+};
+
+String RID_DB_QUERY_WIZARD_START + 31
+{
+ Text [ en-US] = "is equal or greater than";
+};
+
+String RID_DB_QUERY_WIZARD_START + 32
+{
+ Text [ en-US] = "like";
+};
+
+String RID_DB_QUERY_WIZARD_START + 33
+{
+ Text [ en-US] = "not like";
+};
+
+String RID_DB_QUERY_WIZARD_START + 34
+{
+ Text [ en-US] = "is null";
+};
+
+String RID_DB_QUERY_WIZARD_START + 35
+{
+ Text [ en-US] = "is not null";
+};
+// --------------------------------------
+
+String RID_DB_QUERY_WIZARD_START + 36
+{
+ Text [ en-US] = "true";
+};
+
+String RID_DB_QUERY_WIZARD_START + 37
+{
+ Text [ en-US] = "false";
+};
+
+String RID_DB_QUERY_WIZARD_START + 38
+{
+ Text [ en-US] = "and";
+};
+
+String RID_DB_QUERY_WIZARD_START + 39
+{
+ Text [ en-US] = "or";
+};
+
+
+String RID_DB_QUERY_WIZARD_START + 40
+{
+ Text [ en-US] = "get the sum of";
+};
+
+String RID_DB_QUERY_WIZARD_START + 41
+{
+ Text [ en-US] = "get the average of";
+};
+
+
+String RID_DB_QUERY_WIZARD_START + 42
+{
+ Text [ en-US] = "get the minimum of";
+};
+
+String RID_DB_QUERY_WIZARD_START + 43
+{
+ Text [ en-US] = "get the maximum of";
+};
+
+
+String RID_DB_QUERY_WIZARD_START + 44
+{
+ Text [ en-US] = "get the sum of <FIELD>";
+};
+
+String RID_DB_QUERY_WIZARD_START + 45
+{
+ Text [ en-US] = "get the average of <FIELD>";
+};
+
+String RID_DB_QUERY_WIZARD_START + 46
+{
+ Text [ en-US] = "get the minimum of <FIELD>";
+};
+
+String RID_DB_QUERY_WIZARD_START + 47
+{
+ Text [ en-US] = "get the maximum of <FIELD>";
+};
+
+
+String RID_DB_QUERY_WIZARD_START + 48
+{
+ Text [ en-US] = "(none)";
+};
+
+String RID_DB_QUERY_WIZARD_START + 50
+{
+ Text [ en-US] = "Fie~lds in the Query: ";
+};
+
+
+String RID_DB_QUERY_WIZARD_START + 51
+{
+ Text [ en-US] = "Sorting order: ";
+};
+
+
+String RID_DB_QUERY_WIZARD_START + 52
+{
+ Text [ en-US] = "No sorting fields were assigned.";
+ };
+
+
+String RID_DB_QUERY_WIZARD_START + 53
+{
+ Text [ en-US] = "Search conditions: ";
+ };
+
+String RID_DB_QUERY_WIZARD_START + 54
+{
+ Text [ en-US] = "No conditions were assigned.";
+ };
+
+
+String RID_DB_QUERY_WIZARD_START + 55
+{
+ Text [ en-US] = "Aggregate functions: ";
+ };
+
+
+String RID_DB_QUERY_WIZARD_START + 56
+{
+ Text [ en-US] = "No aggregate functions were assigned.";
+ };
+
+
+String RID_DB_QUERY_WIZARD_START + 57
+{
+ Text [ en-US] = "Grouped by: ";
+};
+
+String RID_DB_QUERY_WIZARD_START + 58
+{
+ Text [ en-US] = "No Groups were assigned.";
+};
+
+
+String RID_DB_QUERY_WIZARD_START + 59
+{
+ Text [ en-US ] = "Grouping conditions: ";
+};
+
+
+String RID_DB_QUERY_WIZARD_START + 60
+{
+ Text [ en-US] = "No grouping conditions were assigned.";
+};
+
+
+String RID_DB_QUERY_WIZARD_START + 70
+{
+ Text [ en-US] = "Select the fields (columns) for your query";
+};
+
+String RID_DB_QUERY_WIZARD_START + 71
+{
+ Text [ en-US] = "Select the sorting order";
+};
+
+
+String RID_DB_QUERY_WIZARD_START + 72
+{
+ Text [ en-US] = "Select the search conditions";
+};
+
+
+String RID_DB_QUERY_WIZARD_START + 73
+{
+ Text [ en-US] = "Select the type of query";
+};
+
+String RID_DB_QUERY_WIZARD_START + 74
+{
+ Text [ en-US] = "Select the groups";
+};
+
+String RID_DB_QUERY_WIZARD_START + 75
+{
+ Text [ en-US] = "Select the grouping conditions";
+};
+
+
+String RID_DB_QUERY_WIZARD_START + 76
+{
+ Text [ en-US] = "Assign aliases if desired";
+};
+
+
+String RID_DB_QUERY_WIZARD_START + 77
+{
+ Text [ en-US] = "Check the overview and decide how to proceed";
+};
+
+
+String RID_DB_QUERY_WIZARD_START + 80
+{
+ Text [ en-US] = "Field selection";
+};
+
+
+String RID_DB_QUERY_WIZARD_START + 81
+{
+ Text [ en-US] = "Sorting order";
+};
+
+String RID_DB_QUERY_WIZARD_START + 82
+{
+ Text [ en-US] = "Search conditions";
+};
+
+String RID_DB_QUERY_WIZARD_START + 83
+{
+ Text [ en-US] = "Detail or summary";
+};
+
+String RID_DB_QUERY_WIZARD_START + 84
+{
+ Text [ en-US] = "Grouping";
+};
+
+String RID_DB_QUERY_WIZARD_START + 85
+{
+ Text [ en-US] = "Grouping conditions";
+};
+
+String RID_DB_QUERY_WIZARD_START + 86
+{
+ Text [ en-US] = "Aliases";
+};
+
+String RID_DB_QUERY_WIZARD_START + 87
+{
+ Text [ en-US] = "Overview";
+};
+
+
+String RID_DB_QUERY_WIZARD_START + 88
+{
+ Text [ en-US] = "A field that has not been assigned an aggregate function must be used in a group.";
+};
+
+
+String RID_DB_QUERY_WIZARD_START + 89
+{
+ Text [ en-US] = "The condition '<FIELDNAME> <LOGICOPERATOR> <VALUE>' was chosen twice. Each condition can only be chosen once";
+};
+
+String RID_DB_QUERY_WIZARD_START + 90
+{
+ Text [ en-US] = "The aggregate function <FUNCTION> has been assigned twice to the fieldname '<NUMERICFIELD>'.";
+};
+
+String RID_DB_QUERY_WIZARD_START + 91
+{
+ Text [ en-US] = ", ";
+};
+
+String RID_DB_QUERY_WIZARD_START + 92
+{
+ Text [ en-US] = "<FIELDTITLE> (<FIELDNAME>)";
+};
+
+
+String RID_DB_QUERY_WIZARD_START + 93
+{
+ Text [ en-US] = "<FIELDNAME> (<SORTMODE>)";
+};
+
+String RID_DB_QUERY_WIZARD_START + 94
+{
+ Text [ en-US] = "<FIELDNAME> <LOGICOPERATOR> <VALUE>";
+};
+
+String RID_DB_QUERY_WIZARD_START + 95
+{
+ Text [ en-US] = "<CALCULATEDFUNCTION> <FIELDNAME>";
+};
+
+
+String RID_DB_QUERY_WIZARD_START + 96
+{
+ Text [ en-US] = "<FIELDNAME> <LOGICOPERATOR> <VALUE>";
+};
+
+
+
+
+// ============================================================================
+
+String RID_DB_REPORT_WIZARD_START + 0
+{
+ Text [ en-US ] = "Report Wizard";
+};
+
+
+String RID_DB_REPORT_WIZARD_START + 3
+{
+ Text [ en-US ] = "~Table";
+};
+
+String RID_DB_REPORT_WIZARD_START + 4
+{
+ Text [ en-US ] = "Colu~mns";
+};
+
+
+String RID_DB_REPORT_WIZARD_START + 7
+{
+ Text [ en-US ] = "Report_";
+};
+
+String RID_DB_REPORT_WIZARD_START + 8
+{
+ Text [ en-US ] = "- undefined -";
+};
+
+String RID_DB_REPORT_WIZARD_START + 9
+{
+ Text [ en-US ] = "~Fields in report";
+};
+
+
+
+String RID_DB_REPORT_WIZARD_START + 11
+{
+ Text [ en-US ] = "Grouping";
+};
+
+String RID_DB_REPORT_WIZARD_START + 12
+{
+ Text [ en-US ] = "Sort options";
+};
+
+String RID_DB_REPORT_WIZARD_START + 13
+{
+ Text [ en-US ] = "Choose layout";
+};
+
+
+String RID_DB_REPORT_WIZARD_START + 14
+{
+ Text [ en-US ] = "Create report";
+};
+
+
+String RID_DB_REPORT_WIZARD_START + 15
+{
+ Text [ en-US ] = "Layout of data";
+};
+
+String RID_DB_REPORT_WIZARD_START + 16
+{
+ Text [ en-US ] = "Layout of headers and footers";
+};
+
+
+String RID_DB_REPORT_WIZARD_START + 19
+{
+ Text [ en-US ] = "Fields";
+};
+
+String RID_DB_REPORT_WIZARD_START + 20
+{
+ Text [ en-US ] = "~Sort by";
+};
+
+
+String RID_DB_REPORT_WIZARD_START + 21
+{
+ Text [ en-US ] = "T~hen by";
+};
+
+
+String RID_DB_REPORT_WIZARD_START + 22
+{
+ Text [ en-US ] = "Orientation";
+};
+
+String RID_DB_REPORT_WIZARD_START + 23
+{
+ Text [ en-US ] = "Portrait";
+};
+
+String RID_DB_REPORT_WIZARD_START + 24
+{
+ Text [ en-US ] = "Landscape";
+};
+
+
+
+String RID_DB_REPORT_WIZARD_START + 28
+{
+ Text [ en-US ] = "Which fields do you want to have in your report?";
+};
+
+
+String RID_DB_REPORT_WIZARD_START + 29
+{
+ Text [ en-US ] = "Do you want to add grouping levels?";
+};
+
+
+String RID_DB_REPORT_WIZARD_START + 30
+{
+ Text [ en-US ] = "According to which fields do you want to sort the data?";
+};
+
+
+String RID_DB_REPORT_WIZARD_START + 31
+{
+ Text [ en-US ] = "How do you want your report to look?";
+};
+
+
+String RID_DB_REPORT_WIZARD_START + 32
+{
+ Text [ en-US ] = "Decide how you want to proceed";
+};
+
+
+String RID_DB_REPORT_WIZARD_START + 33
+{
+ Text [ en-US ] = "Title of report";
+};
+
+
+String RID_DB_REPORT_WIZARD_START + 34
+{
+ Text [ en-US ] = "Display report";
+};
+
+String RID_DB_REPORT_WIZARD_START + 35
+{
+ Text [ en-US ] = "Create report";
+};
+
+String RID_DB_REPORT_WIZARD_START + 36
+{
+ Text [ en-US ] = "Ascending";
+};
+
+String RID_DB_REPORT_WIZARD_START + 37
+{
+ Text [ en-US ] = "Descending";
+};
+
+
+String RID_DB_REPORT_WIZARD_START + 40
+{
+ Text [ en-US ] = "~Dynamic report";
+};
+
+
+String RID_DB_REPORT_WIZARD_START + 41
+{
+ Text [ en-US ] = "~Create report now";
+};
+
+String RID_DB_REPORT_WIZARD_START + 42
+{
+ Text [ en-US ] = "~Modify report layout";
+};
+
+String RID_DB_REPORT_WIZARD_START + 43
+{
+ Text [ en-US ] = "Static report";
+};
+
+
+String RID_DB_REPORT_WIZARD_START + 44
+{
+ Text [ en-US ] = "Save as";
+};
+
+
+
+String RID_DB_REPORT_WIZARD_START + 50
+{
+ Text [ en-US ] = "Groupings";
+};
+
+String RID_DB_REPORT_WIZARD_START + 51
+{
+ Text [ en-US ] = "Then b~y";
+};
+
+String RID_DB_REPORT_WIZARD_START + 52
+{
+ Text [ en-US ] = "~Then by";
+};
+
+String RID_DB_REPORT_WIZARD_START + 53
+{
+ Text [ en-US ] = "Asc~ending";
+};
+
+String RID_DB_REPORT_WIZARD_START + 54
+{
+ Text [ en-US ] = "Ascend~ing";
+};
+
+String RID_DB_REPORT_WIZARD_START + 55
+{
+ Text [ en-US ] = "Ascendin~g";
+};
+
+String RID_DB_REPORT_WIZARD_START + 56
+{
+ Text [ en-US ] = "De~scending";
+};
+
+String RID_DB_REPORT_WIZARD_START + 57
+{
+ Text [ en-US ] = "Des~cending";
+};
+
+String RID_DB_REPORT_WIZARD_START + 58
+{
+ Text [ en-US ] = "De~scending";
+};
+
+
+String RID_DB_REPORT_WIZARD_START + 60
+{
+ Text [ en-US ] = "Binary fields cannot be displayed in the report.";
+};
+
+
+String RID_DB_REPORT_WIZARD_START + 61
+{
+ Text [ en-US ] = "The table '<TABLENAME>' does not exist.";
+};
+
+String RID_DB_REPORT_WIZARD_START + 62
+{
+ Text [ en-US ] = "Creating Report...";
+};
+
+String RID_DB_REPORT_WIZARD_START + 63
+{
+ Text [ en-US ] = "Number of records inserted: <COUNT>";
+};
+
+String RID_DB_REPORT_WIZARD_START + 64
+{
+ Text [ en-US ] = "The form '<REPORTFORM>' does not exist.";
+};
+
+String RID_DB_REPORT_WIZARD_START + 65
+{
+ Text [ en-US ] = "The query with the statement <BR>'<STATEMENT>' <BR> could not be run. <BR> Check your data source.";
+};
+
+String RID_DB_REPORT_WIZARD_START + 66
+{
+ Text [ en-US ] = "The following hidden control in the form '<REPORTFORM>' could not be read: '<CONTROLNAME>'.";
+};
+
+String RID_DB_REPORT_WIZARD_START + 67
+{
+ Text [ en-US ] = "Importing data...";
+};
+
+
+String RID_DB_REPORT_WIZARD_START + 68
+{
+ Text [ en-US ] = "Labeling fields";
+};
+
+
+String RID_DB_REPORT_WIZARD_START + 69
+{
+ Text [ en-US ] = "How do you want to label the fields?";
+};
+
+String RID_DB_REPORT_WIZARD_START + 70
+{
+ Text [ en-US ] = "Label";
+};
+
+
+String RID_DB_REPORT_WIZARD_START + 71
+{
+ Text [ en-US ] = "Field";
+};
+
+
+String RID_DB_REPORT_WIZARD_START + 72
+{
+ Text [ en-US ] = "An error occurred in the wizard.<BR>The template '%PATH' could be erroneous.<BR>Either the required sections or tables do not exist or exist under the wrong name.<BR>See the Help for more detailed information.<BR>Please select another template.";
+};
+
+
+String RID_DB_REPORT_WIZARD_START + 73
+{
+ Text [ en-US ] = "There is an invalid user field in a table.";
+};
+
+
+String RID_DB_REPORT_WIZARD_START + 74
+{
+ Text [ en-US ] = "The sort criterium '<FIELDNAME>' was chosen twice. Each criterium can only be chosen once.";
+};
+
+
+String RID_DB_REPORT_WIZARD_START + 75
+{
+ Text [ en-US ] = "Note: The dummy text will be replaced by data from the database when the report is created.";
+};
+
+
+String RID_DB_REPORT_WIZARD_START + 76
+{
+ Text [ en-US ] = "A report '%REPORTNAME' already exists in the database. Please assign another name.";
+};
+
+
+String RID_DB_REPORT_WIZARD_START + 78
+{
+ Text [ en-US ] = "How do you want to proceed after creating the report?";
+};
+
+String RID_DB_REPORT_WIZARD_START + 79
+{
+ Text [ en-US ] = "What kind of report do you want to create?";
+};
+
+String RID_DB_REPORT_WIZARD_START + 80
+{
+ Text [ en-US ] = "Tabular";
+};
+String RID_DB_REPORT_WIZARD_START + 81
+{
+ Text [ en-US ] = "Columnar, single-column";
+};
+String RID_DB_REPORT_WIZARD_START + 82
+{
+ Text [ en-US ] = "Columnar, two columns";
+};
+String RID_DB_REPORT_WIZARD_START + 83
+{
+ Text [ en-US ] = "Columnar, three columns";
+};
+String RID_DB_REPORT_WIZARD_START + 84
+{
+ Text [ en-US ] = "In blocks, labels left";
+};
+String RID_DB_REPORT_WIZARD_START + 85
+{
+ Text [ en-US ] = "In blocks, labels above";
+};
+String RID_DB_REPORT_WIZARD_START + 86
+{
+ Text [ en-US ] = "Title:";
+};
+String RID_DB_REPORT_WIZARD_START + 87
+{
+ Text [ en-US ] = "Author:";
+};
+String RID_DB_REPORT_WIZARD_START + 88
+{
+ Text [ en-US ] = "Date:";
+};
+String RID_DB_REPORT_WIZARD_START + 89
+{
+ Text [ en-US ] = "Page #page# of #count#";
+ Text [ x-comment ] = "Please don't translate the words #page# and #count#, these are placeholders.";
+};
+String RID_DB_REPORT_WIZARD_START + 90
+{
+ Text [ en-US ] = "Page number:";
+};
+String RID_DB_REPORT_WIZARD_START + 91
+{
+ Text [ en-US ] = "Page count:";
+};
+String RID_DB_REPORT_WIZARD_START + 92
+{
+ Text [ en-US ] = "No valid report template was found.";
+};
+
+// ============================================================================
+
+String RID_DB_TABLE_WIZARD_START + 1
+{
+ Text [ en-US] = "Table Wizard";
+};
+
+String RID_DB_TABLE_WIZARD_START + 2
+{
+ Text [ en-US] = "Select fields";
+};
+
+String RID_DB_TABLE_WIZARD_START + 3
+{
+ Text [ en-US] = "Set types and formats";
+};
+
+String RID_DB_TABLE_WIZARD_START + 4
+{
+ Text [ en-US] = "Set primary key";
+};
+
+String RID_DB_TABLE_WIZARD_START + 5
+{
+ Text [ en-US] = "Create table";
+};
+
+
+String RID_DB_TABLE_WIZARD_START + 8
+{
+ Text [ en-US] = "Select fields for your table";
+};
+
+String RID_DB_TABLE_WIZARD_START + 9
+{
+ Text [ en-US] = "Set field types and formats";
+};
+
+String RID_DB_TABLE_WIZARD_START + 10
+{
+ Text [ en-US] = "Set primary key";
+};
+
+String RID_DB_TABLE_WIZARD_START + 11
+{
+ Text [ en-US] = "Create table";
+};
+
+
+String RID_DB_TABLE_WIZARD_START + 14
+{
+ Text [ en-US] = "This wizard helps you to create a table for your database. After selecting a table category and a sample table, choose the fields you want to include in your table. You can include fields from more than one sample table.";
+};
+
+String RID_DB_TABLE_WIZARD_START + 15
+{
+ Text [ en-US] = "Ca~tegory";
+};
+
+
+String RID_DB_TABLE_WIZARD_START + 16
+{
+ Text [ en-US] = "B~usiness";
+};
+
+String RID_DB_TABLE_WIZARD_START + 17
+{
+ Text [ en-US] = "P~ersonal";
+};
+
+String RID_DB_TABLE_WIZARD_START + 18
+{
+ Text [ en-US] = "~Sample tables";
+};
+
+
+String RID_DB_TABLE_WIZARD_START + 19
+{
+ Text [ en-US] = "A~vailable fields";
+};
+
+
+String RID_DB_TABLE_WIZARD_START + 20
+{
+ Text [ en-US] = "Field information";
+};
+
+String RID_DB_TABLE_WIZARD_START + 21
+{
+ Text [ en-US] = "+";
+};
+
+String RID_DB_TABLE_WIZARD_START + 22
+{
+ Text [ en-US] = "-";
+};
+
+String RID_DB_TABLE_WIZARD_START + 23
+{
+ Text [ en-US] = "Field name";
+};
+
+String RID_DB_TABLE_WIZARD_START + 24
+{
+ Text [ en-US] = "Field type";
+};
+
+
+String RID_DB_TABLE_WIZARD_START + 25
+{
+ Text [ en-US] = "~Selected fields";
+};
+
+
+String RID_DB_TABLE_WIZARD_START + 26
+{
+ Text [ en-US] = "A primary key uniquely identifies each record in a database table. Primary keys ease the linking of information in separate tables, and it is recommended that you have a primary key in every table. Without a primary key, it will not be possible to enter data into this table.";
+};
+
+String RID_DB_TABLE_WIZARD_START + 27
+{
+ Text [ en-US] = "~Create a primary key";
+};
+
+
+String RID_DB_TABLE_WIZARD_START + 28
+{
+ Text [ en-US] = "~Automatically add a primary key";
+};
+
+String RID_DB_TABLE_WIZARD_START + 29
+{
+ Text [ en-US] = "~Use an existing field as a primary key";
+};
+
+String RID_DB_TABLE_WIZARD_START + 30
+{
+ Text [ en-US] = "Define p~rimary key as a combination of several fields ";
+};
+
+String RID_DB_TABLE_WIZARD_START + 31
+{
+ Text [ en-US] = "F~ieldname";
+};
+
+
+String RID_DB_TABLE_WIZARD_START + 32
+{
+ Text [ en-US] = "~Primary key fields";
+};
+
+
+String RID_DB_TABLE_WIZARD_START + 33
+{
+ Text [ en-US] = "Auto ~value";
+};
+
+
+String RID_DB_TABLE_WIZARD_START + 34
+{
+ Text [ en-US] = "What do you want to name your table?";
+};
+
+String RID_DB_TABLE_WIZARD_START + 35
+{
+ Text [ en-US] = "Congratulations. You have entered all the information needed to create your table.";
+};
+
+
+String RID_DB_TABLE_WIZARD_START + 36
+{
+ Text [ en-US] = "What do you want to do next?";
+};
+
+String RID_DB_TABLE_WIZARD_START + 37
+{
+ Text [ en-US] = "Modify the table design";
+};
+
+String RID_DB_TABLE_WIZARD_START + 38
+{
+ Text [ en-US] = "Insert data immediately";
+};
+
+String RID_DB_TABLE_WIZARD_START + 39
+{
+ Text [ en-US] = "C~reate a form based on this table";
+};
+
+String RID_DB_TABLE_WIZARD_START + 40
+{
+ Text [ en-US] = "The table you have created could not be opened.";
+};
+
+String RID_DB_TABLE_WIZARD_START + 41
+{
+ Text [ en-US] = "The table name '%TABLENAME' contains a character ('%SPECIALCHAR') that might not be supported by the database.";
+};
+
+
+String RID_DB_TABLE_WIZARD_START + 42
+{
+ Text [ en-US] = "The field name '%FIELDNAME' contains a special character ('%SPECIALCHAR') that might not be supported by the database.";
+};
+
+
+String RID_DB_TABLE_WIZARD_START + 43
+{
+ Text [ en-US] = "Field";
+};
+
+String RID_DB_TABLE_WIZARD_START + 44
+{
+ Text [ en-US] = "MyTable";
+};
+
+String RID_DB_TABLE_WIZARD_START + 45
+{
+ Text [ en-US] = "Add a Field";
+};
+
+String RID_DB_TABLE_WIZARD_START + 46
+{
+ Text [ en-US] = "Remove the selected Field";
+};
+
+String RID_DB_TABLE_WIZARD_START + 47
+{
+ Text [ en-US] = "The field cannot be inserted because this would exceed the maximum number of %COUNT possible fields in the database table";
+};
+
+String RID_DB_TABLE_WIZARD_START + 48
+{
+ Text [ en-US] = "The name '%TABLENAME' already exists.\nPlease enter another name.";
+};
+
+String RID_DB_TABLE_WIZARD_START + 49
+{
+ Text [ en-US] = "Catalog of the table";
+};
+
+String RID_DB_TABLE_WIZARD_START + 50
+{
+ Text [ en-US] = "Schema of the table";
+};
+
+String RID_DB_TABLE_WIZARD_START + 51
+{
+ Text [ en-US] = "The field '%FIELDNAME' already exists.";
+};
+
+
+
+// ============================================================================
+// ============================ ======================
+// ====================== LETTER WIZARD RESOURCES ================
+// ============================ ======================
+// ============================================================================
+
+
+String RID_LETTERWIZARDDIALOG_START + 1
+{
+ Text [ en-US] = "Letter Wizard";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 2
+{
+ Text [ en-US] = "Label9";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 3
+{
+ Text [ en-US] = "~Business letter";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 4
+{
+ Text [ en-US] = "~Formal personal letter";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 5
+{
+ Text [ en-US] = "~Personal letter";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 6
+{
+ Text [ en-US] = "~Use letterhead paper with pre-printed elements";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 7
+{
+ Text [ en-US] = "~Logo";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 8
+{
+ Text [ en-US] = "Return address";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 9
+{
+ Text [ en-US] = "~Include footer";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 10
+{
+ Text [ en-US] = "~Return address in envelope window";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 11
+{
+ Text [ en-US] = "~Logo";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 12
+{
+ Text [ en-US] = "~Return address in envelope window";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 13
+{
+ Text [ en-US] = "Letter Signs";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 14
+{
+ Text [ en-US] = "S~ubject line";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 15
+{
+ Text [ en-US] = "Salu~tation";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 16
+{
+ Text [ en-US] = "Fold ~marks";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 17
+{
+ Text [ en-US] = "~Complimentary close";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 18
+{
+ Text [ en-US] = "~Footer";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 19
+{
+ Text [ en-US] = "~Use user data for return address";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 20
+{
+ Text [ en-US] = "~New sender address:";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 21
+{
+ Text [ en-US] = "Use placeholders for ~recipient's address";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 22
+{
+ Text [ en-US] = "Use address database for ~mail merge";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 23
+{
+ Text [ en-US] = "Include ~only on second and following pages";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 24
+{
+ Text [ en-US] = "~Include page number";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 25
+{
+ Text [ en-US] = "Letter Template";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 26
+{
+ Text [ en-US] = "Create a ~letter from this template";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 27
+{
+ Text [ en-US] = "Make ~manual changes to this letter template";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 28
+{
+ Text [ en-US] = "Page design";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 29
+{
+ Text [ en-US] = "Page design";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 30
+{
+ Text [ en-US] = "Page design";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 31
+{
+ Text [ en-US] = "This wizard helps you to create a letter template. You can then use the template as the basis for writing letters as often as desired.";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 32
+{
+ Text [ en-US] = "~Height:";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 33
+{
+ Text [ en-US] = "~Width:";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 34
+{
+ Text [ en-US] = "S~pacing to left margin:";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 35
+{
+ Text [ en-US] = "Spacing ~to top margin:";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 36
+{
+ Text [ en-US] = "Height:";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 37
+{
+ Text [ en-US] = "Width:";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 38
+{
+ Text [ en-US] = "S~pacing to left margin:";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 39
+{
+ Text [ en-US] = "Spacing ~to top margin:";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 40
+{
+ Text [ en-US] = "Height:";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 41
+{
+ Text [ en-US] = "Use a typical letter format for this country:";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 42
+{
+ Text [ en-US] = "Sender's address";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 43
+{
+ Text [ en-US] = "Name:";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 44
+{
+ Text [ en-US] = "Street:";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 45
+{
+ Text [ en-US] = "ZIP code/State/City:";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 46
+{
+ Text [ en-US] = "Recipient's address";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 47
+{
+ Text [ en-US] = "Footer";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 48
+{
+ Text [ en-US] = "This wizard creates a letter template which enables you to create multiple letters with the same layout and settings.";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 49
+{
+ Text [ en-US] = "To create another new letter out of the template just navigate to the template location and double-click it.";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 50
+{
+ Text [ en-US] = "Template name:";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 51
+{
+ Text [ en-US] = "Location and file name:";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 52
+{
+ Text [ en-US] = "How do you want to proceed?";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 53
+{
+ Text [ en-US] = "Please choose the type of letter and page design";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 54
+{
+ Text [ en-US] = "Select the items to be printed";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 55
+{
+ Text [ en-US] = "Specify items already on your letterhead paper";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 56
+{
+ Text [ en-US] = "Specify the sender and recipient information";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 57
+{
+ Text [ en-US] = "Fill in the information you would like in the footer";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 58
+{
+ Text [ en-US] = "Please specify last settings";
+};
+
+//====================== Letter Wizard Greeting Start
+String RID_LETTERWIZARDSALUTATION_START + 1
+{
+ Text [ en-US] = "To Whom it May Concern";
+};
+
+String RID_LETTERWIZARDSALUTATION_START + 2
+{
+ Text [ en-US] = "Dear Sir or Madam";
+};
+
+String RID_LETTERWIZARDSALUTATION_START + 3
+{
+ Text [ en-US] = "Hello";
+};
+
+//====================== Letter Wizard Greeting Start
+String RID_LETTERWIZARDGREETING_START + 1
+{
+ Text [ en-US] = "Sincerely";
+};
+
+String RID_LETTERWIZARDGREETING_START + 2
+{
+ Text [ en-US] = "Best regards";
+};
+
+String RID_LETTERWIZARDGREETING_START + 3
+{
+ Text [ en-US] = "Cheers";
+};
+
+
+//====================== Letter Wizard Roadmap Start
+String RID_LETTERWIZARDROADMAP_START + 1
+{
+ Text [ en-US] = "Page design";
+};
+
+String RID_LETTERWIZARDROADMAP_START + 2
+{
+ Text [ en-US] = "Letterhead layout";
+};
+
+String RID_LETTERWIZARDROADMAP_START + 3
+{
+ Text [ en-US] = "Printed items";
+};
+
+String RID_LETTERWIZARDROADMAP_START + 4
+{
+ Text [ en-US] = "Recipient and sender";
+};
+
+String RID_LETTERWIZARDROADMAP_START + 5
+{
+ Text [ en-US] = "Footer";
+};
+
+String RID_LETTERWIZARDROADMAP_START + 6
+{
+ Text [ en-US] = "Name and location";
+};
+
+
+// ============================================================================
+// ============================ ======================
+// ====================== FAX WIZARD RESOURCES ================
+// ============================ ======================
+// ============================================================================
+
+
+String RID_FAXWIZARDDIALOG_START + 1
+{
+ Text [ en-US] = "Fax Wizard";
+};
+
+String RID_FAXWIZARDDIALOG_START + 2
+{
+ Text [ en-US] = "Label9";
+};
+
+String RID_FAXWIZARDDIALOG_START + 3
+{
+ Text [ en-US] = "~Business Fax";
+};
+
+String RID_FAXWIZARDDIALOG_START + 4
+{
+ Text [ en-US] = "~Personal Fax";
+};
+
+String RID_FAXWIZARDDIALOG_START + 5
+{
+ Text [ en-US] = "~Logo";
+};
+
+String RID_FAXWIZARDDIALOG_START + 6
+{
+ Text [ en-US] = "S~ubject line";
+};
+
+String RID_FAXWIZARDDIALOG_START + 7
+{
+ Text [ en-US] = "S~alutation";
+};
+
+String RID_FAXWIZARDDIALOG_START + 8
+{
+ Text [ en-US] = "~Complimentary close";
+};
+
+String RID_FAXWIZARDDIALOG_START + 9
+{
+ Text [ en-US] = "~Footer";
+};
+
+String RID_FAXWIZARDDIALOG_START + 10
+{
+ Text [ en-US] = "~Use user data for return address";
+};
+
+String RID_FAXWIZARDDIALOG_START + 11
+{
+ Text [ en-US] = "~New return address";
+};
+
+String RID_FAXWIZARDDIALOG_START + 12
+{
+ Text [ en-US] = "My Fax Template";
+};
+
+String RID_FAXWIZARDDIALOG_START + 13
+{
+ Text [ en-US] = "Create a ~fax from this template";
+};
+
+String RID_FAXWIZARDDIALOG_START + 14
+{
+ Text [ en-US] = "Make ~manual changes to this fax template";
+};
+
+String RID_FAXWIZARDDIALOG_START + 15
+{
+ Text [ en-US] = "Page design";
+};
+
+String RID_FAXWIZARDDIALOG_START + 16
+{
+ Text [ en-US] = "Page design";
+};
+
+String RID_FAXWIZARDDIALOG_START + 17
+{
+ Text [ en-US] = "This wizard helps you to create a fax template. The template can then be used to create a fax whenever needed.";
+};
+
+String RID_FAXWIZARDDIALOG_START + 18
+{
+ Text [ en-US] = "Return address";
+};
+
+String RID_FAXWIZARDDIALOG_START + 19
+{
+ Text [ en-US] = "Name:";
+};
+
+String RID_FAXWIZARDDIALOG_START + 20
+{
+ Text [ en-US] = "Street:";
+};
+
+String RID_FAXWIZARDDIALOG_START + 21
+{
+ Text [ en-US] = "ZIP code/State/City:";
+};
+
+String RID_FAXWIZARDDIALOG_START + 22
+{
+ Text [ en-US] = "Footer";
+};
+
+String RID_FAXWIZARDDIALOG_START + 23
+{
+ Text [ en-US] = "This wizard creates a fax template which enables you to create multiple faxes with the same layout and settings.";
+};
+
+String RID_FAXWIZARDDIALOG_START + 24
+{
+ Text [ en-US] = "To create another new fax out of the template, go to the location where you saved the template and double-click the file.";
+};
+
+String RID_FAXWIZARDDIALOG_START + 25
+{
+ Text [ en-US] = "Template Name:";
+};
+
+String RID_FAXWIZARDDIALOG_START + 26
+{
+ Text [ en-US] = "Location and file name:";
+};
+
+String RID_FAXWIZARDDIALOG_START + 27
+{
+ Text [ en-US] = "What do you want to do next?";
+};
+
+String RID_FAXWIZARDDIALOG_START + 28
+{
+ Text [ en-US] = "Choose the type of fax and a page design";
+};
+
+String RID_FAXWIZARDDIALOG_START + 29
+{
+ Text [ en-US] = "Select items to include in the fax template";
+};
+
+String RID_FAXWIZARDDIALOG_START + 30
+{
+ Text [ en-US] = "Specify sender and recipient information";
+};
+
+String RID_FAXWIZARDDIALOG_START + 31
+{
+ Text [ en-US] = "Enter text for the footer";
+};
+
+String RID_FAXWIZARDDIALOG_START + 32
+{
+ Text [ en-US] = "Choose a name and save the template";
+};
+
+String RID_FAXWIZARDDIALOG_START + 33
+{
+ Text [ en-US] = "Include ~only on second and following pages";
+};
+
+String RID_FAXWIZARDDIALOG_START + 34
+{
+ Text [ en-US] = "~Include page number";
+};
+
+String RID_FAXWIZARDDIALOG_START + 35
+{
+ Text [ en-US] = "~Date";
+};
+
+String RID_FAXWIZARDDIALOG_START + 36
+{
+ Text [ en-US] = "~Type of message";
+};
+
+String RID_FAXWIZARDDIALOG_START + 37
+{
+ Text [ en-US] = "Fax Number:";
+};
+
+String RID_FAXWIZARDDIALOG_START + 38
+{
+ Text [ en-US] = "Use placeholders for ~recipient's address";
+};
+
+String RID_FAXWIZARDDIALOG_START + 39
+{
+ Text [ en-US] = "Use address database for ~mail merge";
+};
+
+String RID_FAXWIZARDDIALOG_START + 40
+{
+ Text [ en-US] = "~New return address";
+};
+
+//====================== Fax Wizard Communication Start
+String RID_FAXWIZARDCOMMUNICATION_START + 1
+{
+ Text [ en-US] = "Important Information!";
+};
+
+String RID_FAXWIZARDCOMMUNICATION_START + 2
+{
+ Text [ en-US] = "For your information";
+};
+
+String RID_FAXWIZARDCOMMUNICATION_START + 3
+{
+ Text [ en-US] = "News!";
+};
+
+//====================== Fax Wizard Salutation Start
+String RID_FAXWIZARDSALUTATION_START + 1
+{
+ Text [ en-US] = "To whom it may concern,";
+};
+
+String RID_FAXWIZARDSALUTATION_START + 2
+{
+ Text [ en-US] = "Dear Sir or Madam,";
+};
+
+String RID_FAXWIZARDSALUTATION_START + 3
+{
+ Text [ en-US] = "Hello,";
+};
+
+String RID_FAXWIZARDSALUTATION_START + 4
+{
+ Text [ en-US] = "Hi,";
+};
+
+
+//====================== Fax Wizard Greeting Start
+String RID_FAXWIZARDGREETING_START + 1
+{
+ Text [ en-US] = "Sincerely";
+};
+
+String RID_FAXWIZARDGREETING_START + 2
+{
+ Text [ en-US] = "Yours faithfully";
+};
+
+String RID_FAXWIZARDGREETING_START + 3
+{
+ Text [ en-US] = "Regards";
+};
+
+String RID_FAXWIZARDGREETING_START + 4
+{
+ Text [ en-US] = "Love";
+};
+
+
+//====================== Fax Wizard Roadmap Start
+String RID_FAXWIZARDROADMAP_START + 1
+{
+ Text [ en-US] = "Page design";
+};
+
+String RID_FAXWIZARDROADMAP_START + 2
+{
+ Text [ en-US] = "Items to include";
+};
+
+String RID_FAXWIZARDROADMAP_START + 3
+{
+ Text [ en-US] = "Sender and Recipient";
+};
+
+String RID_FAXWIZARDROADMAP_START + 4
+{
+ Text [ en-US] = "Footer";
+};
+
+String RID_FAXWIZARDROADMAP_START + 5
+{
+ Text [ en-US] = "Name and location";
+};
+
+
+
+
+// ============================================================================
+// ============================ ======================
+// ====================== WEB WIZARD RESOURCES ================
+// ============================ ======================
+// ============================================================================
+
+
+String RID_WEBWIZARDDIALOG_START +1
+{
+ Text [ en-US ] = "Web Wizard";
+};
+
+String RID_WEBWIZARDDIALOG_START +2
+{
+ Text [ en-US ] = "This Web Wizard is to aid you in publishing documents on the Internet.\n\nIt will convert the documents so that they can be viewed by a web browser. In addition, it will generate a Table of Contents page with links for easy access to the documents. The Web Wizard will also allow you to customize the design and layout of your web site.\n\nYou will be able to keep the documents you have published on the web up-to-date and add or remove documents at any time.";
+};
+
+String RID_WEBWIZARDDIALOG_START +4
+{
+ Text [ en-US ] = "~Delete";
+};
+
+String RID_WEBWIZARDDIALOG_START +5
+{
+ Text [ en-US ] = "Introduction";
+};
+
+String RID_WEBWIZARDDIALOG_START +6
+{
+ Text [ en-US ] = "Select the documents you want to publish";
+};
+
+String RID_WEBWIZARDDIALOG_START +8
+{
+ Text [ en-US ] = "Document information ";
+};
+
+String RID_WEBWIZARDDIALOG_START +9
+{
+ Text [ en-US ] = "~Title:";
+};
+
+String RID_WEBWIZARDDIALOG_START +10
+{
+ Text [ en-US ] = "~Summary: ";
+};
+
+String RID_WEBWIZARDDIALOG_START +11
+{
+ Text [ en-US ] = "Au~thor:";
+};
+
+String RID_WEBWIZARDDIALOG_START +12
+{
+ Text [ en-US ] = "~Export to file format:";
+};
+
+String RID_WEBWIZARDDIALOG_START +13
+{
+ Text [ en-US ] = "Enter general information for your web site";
+};
+
+String RID_WEBWIZARDDIALOG_START +14
+{
+ Text [ en-US ] = "Title:";
+};
+
+String RID_WEBWIZARDDIALOG_START +16
+{
+ Text [ en-US ] = "Description:";
+};
+
+String RID_WEBWIZARDDIALOG_START +18
+{
+ Text [ en-US ] = "Created:";
+};
+
+String RID_WEBWIZARDDIALOG_START +20
+{
+ Text [ en-US ] = "E-mail:";
+};
+
+String RID_WEBWIZARDDIALOG_START +21
+{
+ Text [ en-US ] = "Copyright notice:";
+};
+
+String RID_WEBWIZARDDIALOG_START +22
+{
+ Text [ en-US ] = "Modified:";
+};
+
+
+String RID_WEBWIZARDDIALOG_START +24
+{
+ Text [ en-US ] = "~Preview";
+};
+
+String RID_WEBWIZARDDIALOG_START +25
+{
+ Text [ en-US ] = "Where do you want to publish your web site?";
+};
+
+String RID_WEBWIZARDDIALOG_START +26
+{
+ Text [ en-US ] = "Publish the new web site:";
+};
+
+String RID_WEBWIZARDDIALOG_START +27
+{
+ Text [ en-US ] = "To a ~local folder";
+};
+
+String RID_WEBWIZARDDIALOG_START +28
+{
+ Text [ en-US ] = "...";
+};
+
+String RID_WEBWIZARDDIALOG_START +29
+{
+ Text [ en-US ] = "To a ~web server via FTP";
+};
+
+String RID_WEBWIZARDDIALOG_START +31
+{
+ Text [ en-US ] = "~Configure...";
+};
+
+String RID_WEBWIZARDDIALOG_START +32
+{
+ Text [ en-US ] = "To a ZIP ~archive";
+};
+
+String RID_WEBWIZARDDIALOG_START +33
+{
+ Text [ en-US ] = "...";
+};
+
+String RID_WEBWIZARDDIALOG_START +34
+{
+ Text [ en-US ] = "~Save settings (recommended)";
+};
+
+String RID_WEBWIZARDDIALOG_START +35
+{
+ Text [ en-US ] = "Save ~as:";
+};
+
+String RID_WEBWIZARDDIALOG_START +36
+{
+ Text [ en-US ] = "~Choose settings for the Web Wizard";
+};
+
+String RID_WEBWIZARDDIALOG_START +37
+{
+ Text [ en-US ] = "Web site content ";
+};
+
+String RID_WEBWIZARDDIALOG_START +38
+{
+ Text [ en-US ] = "~Add...";
+};
+
+String RID_WEBWIZARDDIALOG_START +39
+{
+ Text [ en-US ] = "Remo~ve";
+};
+
+String RID_WEBWIZARDDIALOG_START +40
+{
+ Text [ en-US ] = "Choose a layout for the table of contents of your web site";
+};
+
+String RID_WEBWIZARDDIALOG_START +41
+{
+ Text [ en-US ] = "Select a style for the table of contents page";
+};
+
+String RID_WEBWIZARDDIALOG_START +42
+{
+ Text [ en-US ] = "~Style:";
+};
+
+String RID_WEBWIZARDDIALOG_START +48
+{
+ Text [ en-US ] = "~Layouts: ";
+};
+
+String RID_WEBWIZARDDIALOG_START +50
+{
+ Text [ en-US ] = "~Description";
+};
+
+String RID_WEBWIZARDDIALOG_START +51
+{
+ Text [ en-US ] = "~Author";
+};
+
+String RID_WEBWIZARDDIALOG_START +52
+{
+ Text [ en-US ] = "Cr~eation date";
+};
+
+String RID_WEBWIZARDDIALOG_START +53
+{
+ Text [ en-US ] = "~Last change date";
+};
+
+String RID_WEBWIZARDDIALOG_START +54
+{
+ Text [ en-US ] = "~File name";
+};
+
+String RID_WEBWIZARDDIALOG_START +55
+{
+ Text [ en-US ] = "File forma~t";
+};
+
+String RID_WEBWIZARDDIALOG_START +56
+{
+ Text [ en-US ] = "File format ~icon";
+};
+
+String RID_WEBWIZARDDIALOG_START +57
+{
+ Text [ en-US ] = "Number ~of pages";
+};
+
+String RID_WEBWIZARDDIALOG_START +58
+{
+ Text [ en-US ] = "~Size in KB";
+};
+
+String RID_WEBWIZARDDIALOG_START +59
+{
+ Text [ en-US ] = "Click 'Preview' to see a preview in your browser:";
+};
+
+String RID_WEBWIZARDDIALOG_START +60
+{
+ Text [ en-US ] = "Customize the selected layout";
+};
+
+String RID_WEBWIZARDDIALOG_START +61
+{
+ Text [ en-US ] = "Include the following information for each document in the table of contents:";
+};
+
+String RID_WEBWIZARDDIALOG_START +62
+{
+ Text [ en-US ] = "Optimize the layout for screen resolution:";
+};
+
+String RID_WEBWIZARDDIALOG_START +64
+{
+ Text [ en-US ] = "~640x480";
+};
+
+String RID_WEBWIZARDDIALOG_START +65
+{
+ Text [ en-US ] = "~800x600";
+};
+
+String RID_WEBWIZARDDIALOG_START +66
+{
+ Text [ en-US ] = "~1024x768";
+};
+
+String RID_WEBWIZARDDIALOG_START +70
+{
+ Text [ en-US ] = "Generating Your Web Site";
+};
+
+String RID_WEBWIZARDDIALOG_START +71
+{
+ Text [ en-US ] = "%START - %END/%TOTAL";
+};
+
+String RID_WEBWIZARDDIALOG_START +72
+{
+ Text [ en-US ] = "myWebsite";
+};
+
+String RID_WEBWIZARDDIALOG_START +73
+{
+ Text [ en-US ] = "FTP target '%FILENAME' is a file.";
+};
+
+
+String RID_WEBWIZARDDIALOG_START +74
+{
+ Text [ en-US ] = "The local target '%FILENAME' is a file.";
+};
+
+String RID_WEBWIZARDDIALOG_START +75
+{
+ Text [ en-US ] = "The ZIP target '%FILENAME' already exists. Do you want to overwrite the existing target? ";
+};
+
+String RID_WEBWIZARDDIALOG_START +76
+{
+ Text [ en-US ] = "The FTP target directory '%FILENAME' is not empty. Some files might be overwritten. Do you want to continue?";
+};
+
+String RID_WEBWIZARDDIALOG_START +77
+{
+ Text [ en-US ] = "The local target directory '%FILENAME' is not empty. Some files might be overwritten. Do you want to continue?";
+};
+
+String RID_WEBWIZARDDIALOG_START +78
+{
+ Text [ en-US ] = "Settings already exist under the given name. Do you want to overwrite the existing settings? ";
+};
+
+String RID_WEBWIZARDDIALOG_START +79
+{
+ Text [ en-US ] = "Exporting documents...";
+};
+
+String RID_WEBWIZARDDIALOG_START +80
+{
+ Text [ en-US ] = "Preparing export...";
+};
+
+String RID_WEBWIZARDDIALOG_START +81
+{
+ Text [ en-US ] = "Copying layout files...";
+};
+
+String RID_WEBWIZARDDIALOG_START +82
+{
+ Text [ en-US ] = "Preparing table of contents generation...";
+};
+
+String RID_WEBWIZARDDIALOG_START +83
+{
+ Text [ en-US ] = "Generating table of contents...";
+};
+
+String RID_WEBWIZARDDIALOG_START +84
+{
+ Text [ en-US ] = "Initializing...";
+};
+
+String RID_WEBWIZARDDIALOG_START +86
+{
+ Text [ en-US ] = "Preparing to publish...";
+};
+
+String RID_WEBWIZARDDIALOG_START +87
+{
+ Text [ en-US ] = "Publishing to local directory...";
+};
+
+String RID_WEBWIZARDDIALOG_START +88
+{
+ Text [ en-US ] = "Publishing to FTP destination...";
+};
+
+String RID_WEBWIZARDDIALOG_START +89
+{
+ Text [ en-US ] = "Publishing to a ZIP archive...";
+};
+
+String RID_WEBWIZARDDIALOG_START + 90
+{
+ Text [ en-US ] = "Finishing...";
+};
+
+String RID_WEBWIZARDDIALOG_START + 94
+{
+ Text [ en-US ] = "Graphic files";
+};
+
+String RID_WEBWIZARDDIALOG_START + 95
+{
+ Text [ en-US ] = "All files";
+};
+
+String RID_WEBWIZARDDIALOG_START + 96
+{
+ Text [ en-US ] = "~ZIP archive files";
+};
+
+String RID_WEBWIZARDDIALOG_START + 98
+{
+ Text [ en-US ] = "Background images";
+};
+
+String RID_WEBWIZARDDIALOG_START + 99
+{
+ Text [ en-US ] = "Choose a background image: ";
+};
+
+String RID_WEBWIZARDDIALOG_START + 100
+{
+ Text [ en-US ] = "Icon sets";
+};
+
+String RID_WEBWIZARDDIALOG_START + 101
+{
+ Text [ en-US ] = "Choose an icon set:";
+};
+
+String RID_WEBWIZARDDIALOG_START +102
+{
+ Text [ en-US ] = "Other...";
+};
+
+String RID_WEBWIZARDDIALOG_START +103
+{
+ Text [ en-US ] = "None";
+};
+
+String RID_WEBWIZARDDIALOG_START +104
+{
+ Text [ en-US ] = "Your web site was created successfully into: %FILENAME";
+};
+
+String RID_WEBWIZARDDIALOG_START +105
+{
+ Text [ en-US ] = "One or more errors occurred when generating the web site.";
+};
+
+String RID_WEBWIZARDDIALOG_START +106
+{
+ Text [ en-US ] = "An error occurred while generating the table of contents page(s). ";
+};
+
+String RID_WEBWIZARDDIALOG_START +107
+{
+ Text [ en-US ] = "An error occurred while copying the layout files. ";
+};
+
+String RID_WEBWIZARDDIALOG_START +108
+{
+ Text [ en-US ] = "An error occurred while gathering document information for '%FILENAME'. ";
+};
+
+String RID_WEBWIZARDDIALOG_START +109
+{
+ Text [ en-US ] = "An error occurred while exporting the document '%FILENAME'.";
+};
+
+String RID_WEBWIZARDDIALOG_START +110
+{
+ Text [ en-US ] = "An error occurred while creating a directory for exporting '%FILENAME'.";
+};
+
+String RID_WEBWIZARDDIALOG_START +111
+{
+ Text [ en-US ] = "A security error occurred while exporting the document '%FILENAME'.";
+};
+
+String RID_WEBWIZARDDIALOG_START +112
+{
+ Text [ en-US ] = "An input/output error occurred while exporting the document '%FILENAME'.";
+};
+
+String RID_WEBWIZARDDIALOG_START +113
+{
+ Text [ en-US ] = "An error occurred while copying media files to the temporary directory.";
+};
+
+String RID_WEBWIZARDDIALOG_START +114
+{
+ Text [ en-US ] = "The web site could not be copied to the following destination: %URL";
+};
+
+String RID_WEBWIZARDDIALOG_START +115
+{
+ Text [ en-US ] = "An unexpected error occurred: %ERROR";
+};
+
+String RID_WEBWIZARDDIALOG_START +116
+{
+ Text [ en-US ] = "An unexpected error occurred while validating the file: '%FILENAME'";
+};
+
+String RID_WEBWIZARDDIALOG_START +117
+{
+ Text [ en-US ] = "%FILENAME' is a folder.";
+};
+
+String RID_WEBWIZARDDIALOG_START +118
+{
+ Text [ en-US ] = "Loading Web Wizard Settings...";
+};
+
+String RID_WEBWIZARDDIALOG_START +119
+{
+ Text [ en-US ] = "An unexpected error occurred.";
+};
+
+String RID_WEBWIZARDDIALOG_START +120
+{
+ Text [ en-US ] = "Validating documents...";
+};
+
+String RID_WEBWIZARDDIALOG_START +121
+{
+ Text [ en-US ] = "My Archive";
+};
+
+String RID_WEBWIZARDDIALOG_START +122
+{
+ Text [ en-US ] = "Introduction ";
+};
+
+String RID_WEBWIZARDDIALOG_START +123
+{
+ Text [ en-US ] = "Documents ";
+};
+
+String RID_WEBWIZARDDIALOG_START +124
+{
+ Text [ en-US ] = "Main layout";
+};
+
+String RID_WEBWIZARDDIALOG_START +125
+{
+ Text [ en-US ] = "Layout details";
+};
+
+String RID_WEBWIZARDDIALOG_START +126
+{
+ Text [ en-US ] = "Style";
+};
+
+String RID_WEBWIZARDDIALOG_START +127
+{
+ Text [ en-US ] = "Web site information";
+};
+
+String RID_WEBWIZARDDIALOG_START +128
+{
+ Text [ en-US ] = "Preview";
+};
+
+String RID_WEBWIZARDDIALOG_START +130
+{
+ Text [ en-US ] = "The selected settings will be deleted.\n\nDo you really want to delete these settings? ";
+};
+
+String RID_WEBWIZARDDIALOG_START +131
+{
+ Text [ en-US ] = "%NUMBER pages";
+};
+
+String RID_WEBWIZARDDIALOG_START +132
+{
+ Text [ en-US ] = "%NUMBER slides";
+};
+
+String RID_WEBWIZARDDIALOG_START +133
+{
+ Text [ en-US ] = "Created: %DATE";
+};
+
+String RID_WEBWIZARDDIALOG_START +134
+{
+ Text [ en-US ] = "Last modified: %DATE";
+};
+
+String RID_WEBWIZARDDIALOG_START +135
+{
+ Text [ en-US ] = "Web Wizard Settings";
+};
+
+String RID_WEBWIZARDDIALOG_START +136
+{
+ Text [ en-US ] = "Background image:";
+};
+
+String RID_WEBWIZARDDIALOG_START +137
+{
+ Text [ en-US ] = "Icon set:";
+};
+
+String RID_WEBWIZARDDIALOG_START +138
+{
+ Text [ en-US ] = "The icon set is used for presentations in HTML format.";
+};
+
+String RID_WEBWIZARDDIALOG_START +139
+{
+ Text [ en-US ] = "HTML Metadata";
+};
+
+String RID_WEBWIZARDDIALOG_START +140
+{
+ Text [ en-US ] = "Choose...";
+};
+
+String RID_WEBWIZARDDIALOG_START +141
+{
+ Text [ en-US ] = "Choose...";
+};
+
+String RID_WEBWIZARDDIALOG_START +142
+{
+ Text [ en-US ] = "<default>";
+};
+
+String RID_WEBWIZARDDIALOG_START +143
+{
+ Text [ en-US ] = "Publishing via FTP Proxy is not supported.";
+};
+
+String RID_WEBWIZARDDIALOG_START +144
+{
+ Text [ en-US ] = "<no background image>";
+};
+
+String RID_WEBWIZARDDIALOG_START +145
+{
+ Text [ en-US ] = "<no icon set>";
+};
+
+String RID_WEBWIZARDDIALOG_START +146
+{
+ Text [ en-US ] = "The FTP directory '%FILENAME' could not be created.";
+};
+
+String RID_WEBWIZARDDIALOG_START +147
+{
+ Text [ en-US ] = "The FTP directory '%FILENAME' does not exist. \nCreate the directory now?";
+};
+
+String RID_WEBWIZARDDIALOG_START +148
+{
+ Text [ en-US ] = "The Zip file '%FILENAME' cannot be created: a directory of the same name already exists.";
+};
+
+String RID_WEBWIZARDDIALOG_START +149
+{
+ Text [ en-US ] = "The local directory '%FILENAME' cannot be created. \nPlease check your write-access.";
+};
+
+String RID_WEBWIZARDDIALOG_START +150
+{
+ Text [ en-US ] = "The local directory '%FILENAME' does not exist. \nCreate the directory now?";
+};
+
+String RID_WEBWIZARDDIALOG_START +151
+{
+ Text [ en-US ] = "Size: %NUMBERKB";
+};
+
+
+String RID_WEBWIZARDDIALOG_START +152
+{
+ Text [ en-US ] = "File not found. Would you like to specify a new file location?";
+};
+
+
+
+// ============================================================================
+// ================= WEB WIZARD FTP DIALOG RESOURCES =============
+// ============================================================================
+
+
+
+
+String RID_WEBWIZARDDIALOG_FTP +0
+{
+ Text [ en-US ] = "FTP Connection";
+};
+
+String RID_WEBWIZARDDIALOG_FTP +1
+{
+ Text [ en-US ] = "~User name:";
+};
+
+String RID_WEBWIZARDDIALOG_FTP +2
+{
+ Text [ en-US ] = "~Password:";
+};
+
+String RID_WEBWIZARDDIALOG_FTP +3
+{
+ Text [ en-US ] = "Connect";
+};
+
+String RID_WEBWIZARDDIALOG_FTP +4
+{
+ Text [ en-US ] = "1. Enter FTP connection information.";
+};
+
+String RID_WEBWIZARDDIALOG_FTP +5
+{
+ Text [ en-US ] = "~Server name or IP address:";
+};
+
+String RID_WEBWIZARDDIALOG_FTP +6
+{
+ Text [ en-US ] = "2. Connect to the server.";
+};
+
+String RID_WEBWIZARDDIALOG_FTP +7
+{
+ Text [ en-US ] = "3. ~Choose a remote directory (optional).";
+};
+
+String RID_WEBWIZARDDIALOG_FTP +8
+{
+ Text [ en-US ] = "...";
+};
+
+String RID_WEBWIZARDDIALOG_FTP +9
+{
+ Text [ en-US ] = "Connection status is unknown";
+};
+
+String RID_WEBWIZARDDIALOG_FTP +10
+{
+ Text [ en-US ] = "Connection was established successfully";
+};
+
+String RID_WEBWIZARDDIALOG_FTP +11
+{
+ Text [ en-US ] = "Username or password is wrong";
+};
+
+String RID_WEBWIZARDDIALOG_FTP +12
+{
+ Text [ en-US ] = "Could not resolve server name";
+};
+
+String RID_WEBWIZARDDIALOG_FTP +13
+{
+ Text [ en-US ] = "You do not have sufficient user rights";
+};
+
+String RID_WEBWIZARDDIALOG_FTP +14
+{
+ Text [ en-US ] = "Cannot connect to server";
+};
+
+String RID_WEBWIZARDDIALOG_FTP +15
+{
+ Text [ en-US ] = "Unexpected error";
+};
+
+String RID_WEBWIZARDDIALOG_FTP +16
+{
+ Text [ en-US ] = "FTP publishing directory";
+};
+
+String RID_WEBWIZARDDIALOG_FTP +17
+{
+ Text [ en-US ] = "This is not an FTP folder";
+};
+
+String RID_WEBWIZARDDIALOG_FTP +18
+{
+ Text [ en-US ] = "Connecting...";
+};
+
+
+// ============================================================================
+// ============================ ======================
+// ====================== AGENDA WIZARD RESOURCES ================
+// ============================ ======================
+// ============================================================================
+
+String RID_AGENDAWIZARDDIALOG_START +1
+{
+ Text [en-US ] = "Agenda Wizard";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +2
+{
+ Text [en-US ] = "Make ~manual changes to this agenda template";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +3
+{
+ Text [en-US ] = "Template name:";
+};
+
+String RID_AGENDAWIZARDDIALOG_START + 4
+{
+ Text [en-US ] = "Location and file name:";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +5
+{
+ Text [en-US ] = "What do you want to do next?";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +6
+{
+ Text [en-US ] = "Please choose the page design for the agenda";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +7
+{
+ Text [en-US ] = "Please select the headings you wish to include in your agenda template";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +8
+{
+ Text [en-US ] = "Please enter general information for the event";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +9
+{
+ Text [en-US ] = "Please specify items for the agenda";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +10
+{
+ Text [en-US ] = "Please select the names you wish to include in your agenda template";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +11
+{
+ Text [en-US ] = "Choose a name and save the template";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +12
+{
+ Text [en-US ] = "Include form for recording minutes";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +13
+{
+ Text [en-US ] = "This wizard helps you to create an agenda template. The template can then be used to create an agenda whenever needed.";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +14
+{
+ Text [en-US ] = "Time:";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +15
+{
+ Text [en-US ] = "Name:";
+};
+
+String RID_AGENDAWIZARDDIALOG_START + 16
+{
+ Text [en-US ] = "Location:";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +17
+{
+ Text [en-US ] = "Placeholders will be used in empty fields. You can replace placeholders with text later.";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +18
+{
+ Text [en-US ] = "...";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +19
+{
+ Text [en-US ] = "Create an ~agenda from this template";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +20
+{
+ Text [en-US ] = "To create a new agenda out of the template, go to the location where you saved the template and double-click the file.";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +21
+{
+ Text [en-US ] = "Agenda item";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +22
+{
+ Text [en-US ] = "Responsible";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +23
+{
+ Text [en-US ] = "Duration";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +24
+{
+ Text [en-US ] = "Meeting called by";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +25
+{
+ Text [en-US ] = "Chairperson";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +26
+{
+ Text [en-US ] = "Minute keeper";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +27
+{
+ Text [en-US ] = "Moderator";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +28
+{
+ Text [en-US ] = "Attendees";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +29
+{
+ Text [en-US ] = "Observers";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +30
+{
+ Text [en-US ] = "Facility personnel";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +31
+{
+ Text [en-US ] = "The agenda template will include placeholders for the names of the selected people. When creating an agenda from the template, you can replace these placeholder with the appropriate names.";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +32
+{
+ Text [en-US ] = "Type of meeting";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +33
+{
+ Text [en-US ] = "Please read";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +34
+{
+ Text [en-US ] = "Please bring";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +35
+{
+ Text [en-US ] = "Notes";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +36
+{
+ Text [en-US ] = "The agenda template will include placeholders for the selected items.";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +38
+{
+ Text [en-US ] = "Date:";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +39
+{
+ Text [en-US ] = "This wizard creates an agenda template which enables you to create multiple agendas with the same layout and settings.";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +40
+{
+ Text [en-US ] = "Page design:";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +41
+{
+ Text [en-US ] = "myAgendaTemplate.stw";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +42
+{
+ Text [en-US ] = "My Agenda Template";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +43
+{
+ Text [en-US ] = "An unexpected error occurred while saving the agenda template.";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +44
+{
+ Text [en-US ] = "Name";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +45
+{
+ Text [en-US ] = "Date";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +46
+{
+ Text [en-US ] = "Time";
+};
+
+String RID_AGENDAWIZARDDIALOG_START + 47
+{
+ Text [en-US ] = "Location";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +48
+{
+ Text [en-US ] = "Click to replace this text";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +50
+{
+ Text [en-US ] = "Page design";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +51
+{
+ Text [en-US ] = "General information";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +52
+{
+ Text [en-US ] = "Headings to include";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +53
+{
+ Text [en-US ] = "Names";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +54
+{
+ Text [en-US ] = "Agenda items";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +55
+{
+ Text [en-US ] = "Name and location";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +56
+{
+ Text [en-US ] = "An unexpected error occurred while opening the agenda template.";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +57
+{
+ Text [en-US ] = "Type of meeting";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +58
+{
+ Text [en-US ] = "Please bring";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +59
+{
+ Text [en-US ] = "Please read";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +60
+{
+ Text [en-US ] = "Notes";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +61
+{
+ Text [en-US ] = "Meeting called by";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +62
+{
+ Text [en-US ] = "Chairperson";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +63
+{
+ Text [en-US ] = "Attendees";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +64
+{
+ Text [en-US ] = "Minute keeper";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +65
+{
+ Text [en-US ] = "Moderator";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +66
+{
+ Text [en-US ] = "Observers";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +67
+{
+ Text [en-US ] = "Facility personnel";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +68
+{
+ Text [en-US ] = "Insert";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +69
+{
+ Text [en-US ] = "Remove";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +70
+{
+ Text [en-US ] = "Move up";
+};
+
+String RID_AGENDAWIZARDDIALOG_START +71
+{
+ Text [en-US ] = "Move down";
+};
+
diff --git a/wizards/source/formwizard/delzip b/wizards/source/formwizard/delzip
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/wizards/source/formwizard/delzip
diff --git a/wizards/source/formwizard/develop.xba b/wizards/source/formwizard/develop.xba
new file mode 100644
index 000000000000..a12d1af37461
--- /dev/null
+++ b/wizards/source/formwizard/develop.xba
@@ -0,0 +1,533 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="develop" script:language="StarBasic">REM ***** BASIC *****
+Option Explicit
+
+Public oDBShapeList() as Object
+Public oTCShapeList() as Object
+Public oDBModelList() as Object
+Public oGroupShapeList() as Object
+
+Public oGridShape as Object
+Public a as Integer
+Public StartA as Integer
+Public bIsFirstRun as Boolean
+Public bIsVeryFirstRun as Boolean
+Public bControlsareCreated as Boolean
+Public nDBRefHeight as Long
+Public nXTCPos&amp;, nYTCPos&amp;, nXDBPos&amp;, nYDBPos&amp;, nTCHeight&amp;, nTCWidth&amp;, nDBHeight&amp;, nDBWidth&amp;
+
+Dim iReduceWidth as Integer
+
+Function PositionControls(Maxindex as Integer)
+Dim oTCModel as Object
+Dim oDBModel as Object
+Dim i as Integer
+ InitializePosSizes()
+ bIsFirstRun = True
+ bIsVeryFirstRun = True
+ a = 0
+ StartA = 0
+ nMaxRowY = 0
+ nSecMaxRowY = 0
+ If CurArrangement = cLeftJustified Or cTopJustified Then
+ DialogModel.optAlign0.State = 1
+ End If
+ For i = 0 To MaxIndex
+ GetCurrentMetaValues(i)
+ oTCModel = InsertTextControl(i)
+ If CurFieldType = com.sun.star.sdbc.DataType.TIMESTAMP Then
+ InsertTimeStampShape(i)
+ Else
+ InsertDBControl(i)
+ bIsVeryFirstRun = False
+ oDBModelList(i).LabelControl = oTCModel
+ End If
+ GetLabelDiffHeight(i+1)
+ ResetPosSizes(i)
+ oProgressbar.Value = i
+ Next i
+ ControlCaptionstoStandardLayout()
+ bControlsareCreated = True
+End Function
+
+
+Sub ResetPosSizes(LastIndex as Integer)
+ Select Case CurArrangement
+ Case cColumnarLeft
+ nYDBPos = nYDBPos + nDBHeight + cVertDistance
+ If (nYDBPos &gt; cYOffset + nFormHeight) Or (LastIndex = MaxIndex) Then
+ RepositionColumnarLeftControls(LastIndex)
+ nXTCPos = nMaxColRightX + 2 * cHoriDistance
+ nXDBPos = nXTCPos + cHoriDistance + nMaxTCWidth
+ nYDBPos = cYOffset
+ bIsFirstRun = True
+ StartA = LastIndex + 1
+ a = 0
+ Else
+ a = a + 1
+ End If
+ nYTCPos = nYDBPos + LABELDIFFHEIGHT
+ Case cColumnarTop
+ nYTCPos = nYDBPos + nDBHeight + cVertDistance
+ If nYTCPos &gt; cYOffset + nFormHeight Then
+ nXDBPos = nMaxColRightX + cHoriDistance
+ nXTCPos = nXDBPos
+ nYDBPos = cYOffset + nTCHeight + cVertDistance
+ nYTCPos = cYOffset
+ bIsFirstRun = True
+ StartA = LastIndex + 1
+ a = 0
+ Else
+ a = a + 1
+ End If
+ Case cLeftJustified,cTopJustified
+ If nMaxColRightX &gt; cXOffset + nFormWidth Then
+ Dim nOldYTCPos as Long
+ nOldYTCPos = nYTCPos
+ CheckJustifiedPosition()
+ Else
+ nXTCPos = nMaxColRightX + CHoriDistance
+ If CurArrangement = cLeftJustified Then
+ nYTCPos = nYDBPos + LabelDiffHeight
+ End If
+ End If
+ a = a + 1
+ End Select
+End Sub
+
+
+Sub RepositionColumnarLeftControls(LastIndex as Integer)
+Dim aSize As New com.sun.star.awt.Size
+Dim aPoint As New com.sun.star.awt.Point
+Dim i as Integer
+ aSize = GetSize(nMaxTCWidth, nTCHeight)
+ bIsFirstRun = True
+ For i = StartA To LastIndex
+ If i = StartA Then
+ nXTCPos = oTCShapeList(i).Position.X
+ nXDBPos = nXTCPos + nMaxTCWidth + cHoriDistance
+ End If
+ ResetDBShape(oDBShapeList(i), nXDBPos)
+ CheckOuterPoints(nXDBPos, nDBWidth, nYDBPos, nDBHeight, True)
+ Next i
+End Sub
+
+
+Sub ResetDBShape(oLocDBShape as Object, iXPos as Long)
+Dim aSize As New com.sun.star.awt.Size
+Dim aPoint As New com.sun.star.awt.Point
+ nYDBPos = oLocDBShape.Position.Y
+ nDBWidth = oLocDBShape.Size.Width
+ nDBHeight = oLocDBShape.Size.Height
+ aPoint = GetPoint(iXPos,nYDBPos)
+ oLocDBShape.SetPosition(aPoint)
+End Sub
+
+
+Sub InitializePosSizes()
+ nXTCPos = cXOffset
+ nTCWidth = 2000
+ nDBWidth = 2000
+ nDBHeight = nDBRefHeight
+ iReduceWidth = 0
+ Select Case CurArrangement
+ Case cColumnarLeft, cLeftJustified
+ GetLabelDiffHeight(0)
+ nYTCPos = cYOffset + LABELDIFFHEIGHT
+ nXDBPos = cXOffset + 3050
+ nYDBPos = cYOffset
+ Case cColumnarTop, cTopJustified
+ nXDBPos = cXOffset
+ nYTCPos = cYOffset
+ End Select
+End Sub
+
+
+Function InsertTextControl(i as Integer) as Object
+Dim oShape as Object
+Dim oModel as Object
+Dim aPoint as New com.sun.star.awt.Point
+Dim aSize As New com.sun.star.awt.Size
+ If bControlsareCreated Then
+ Set oShape = oTCShapeList(i)
+ Set oModel = oShape.GetControl
+ If CurArrangement = cLeftJustified Then
+ nTCWidth = GetPreferredWidth(oModel, True, CurFieldname)
+ Else
+ nTCWidth = oShape.Size.Width
+ End If
+ oShape.Position = GetPoint(nXTCPos, nYTCPos)
+ If CurArrangement = cColumnarTop Then
+ oModel.Align = com.sun.star.awt.TextAlign.LEFT
+ End If
+ Else
+ oModel = CreateUnoService(oModelService(cLabel))
+ aPoint = GetPoint(nXTCPos, nYTCPos)
+ aSize = GetSize(nTCWidth,nTCHeight)
+ Set oShape = InsertControl(oDrawPage, oModel, aPoint, aSize)
+ Set oTCShapeList(i)= oShape
+ If bIsVeryFirstRun Then
+ If CurArrangement = cColumnarTop Then
+ nYDBPos = nYTCPos + nTCHeight
+ End If
+ End If
+ nTCWidth = GetPreferredWidth(oModel, True, CurFieldName)
+ End If
+ If CurArrangement = cColumnarLeft Then
+ &apos; Note This If Sequence must be called before retrieving the outer Points
+ If bIsFirstRun Then
+ nMaxTCWidth = nTCWidth
+ bIsFirstRun = False
+ ElseIf nTCWidth &gt; nMaxTCWidth Then
+ nMaxTCWidth = nTCWidth
+ End If
+ End If
+ CheckOuterPoints(oShape.Position.X, nTCWidth, nYTCPos, nTCHeight, False)
+ Select Case CurArrangement
+ Case cLeftJustified
+ nXDBPos = nMaxColRightX
+ Case cColumnarTop,cTopJustified
+ oModel.Align = com.sun.star.awt.TextAlign.LEFT
+ nXDBPos = nXTCPos
+ nYDBPos = nYTCPos + nTCHeight
+ If CurFieldLength = 20 And nDBWidth &gt; 2 * nTCWidth Then
+ iReduceWidth = iReduceWidth + 1
+ End If
+ End Select
+ oShape.SetSize(GetSize(nTCWidth,nTCHeight))
+ If CurHelpText &lt;&gt; &quot;&quot; Then
+ oModel.HelpText = CurHelptext
+ End If
+ InsertTextControl = oModel
+End Function
+
+
+Sub InsertDBControl(i as Integer)
+Dim aPoint as New com.sun.star.awt.Point
+Dim aSize As New com.sun.star.awt.Size
+Dim oControl as Object
+Dim iColRightX as Long
+
+ aPoint = GetPoint(nXDBPos, nYDBPos)
+ If bControlsAreCreated Then
+ oDBShapeList(i).Position = aPoint
+ Else
+ oDBModelList(i) = CreateUnoService(oModelService(CurControlType))
+ oDBShapeList(i) = InsertControl(oDrawPage, oDBModelList(i), aPoint, aSize)
+ SetNumerics(oDBModelList(i), CurFieldType)
+ If CurControlType = cCheckBox Then
+ oDBModelList(i).Label = &quot;&quot;
+ End If
+ oDBModelList(i).DataField = CurFieldName
+ End If
+ nDBHeight = GetDBHeight(oDBModelList(i))
+ nDBWidth = GetPreferredWidth(oDBModelList(i),True)
+ aSize = GetSize(nDBWidth,nDBHeight)
+ oDBShapeList(i).SetSize(aSize)
+ CheckOuterPoints(nXDBPos, nDBWidth, nYDBPos, nDBHeight, True)
+End Sub
+
+
+Function InsertTimeStampShape(i as Integer) as Object
+Dim oDateModel as Object
+Dim oTimeModel as Object
+Dim oDateShape as Object
+Dim oTimeShape as Object
+Dim oDateTimeShape as Object
+Dim aPoint as New com.sun.star.awt.Point
+Dim aSize as New com.sun.star.awt.Size
+Dim nDateWidth as Long
+Dim nTimeWidth as Long
+Dim oGroupShape as Object
+ aPoint = GetPoint(nXDBPos, nYDBPos)
+ If bControlsAreCreated Then
+ oDBShapeList(i).Position = aPoint
+ nDBWidth = oDBShapeList(i).Size.Width
+ nDBHeight = oDBShapeList(i).Size.Height
+ Else
+ oGroupShape = oDocument.CreateInstance(&quot;com.sun.star.drawing.GroupShape&quot;)
+ oGroupShape.AnchorType = com.sun.star.text.TextContentAnchorType.AT_PARAGRAPH
+ oDrawPage.Add(oGroupShape)
+ CurFieldType = com.sun.star.sdbc.DataType.DATE
+ oDateModel = CreateUnoService(&quot;com.sun.star.form.component.DateField&quot;)
+ oDateModel.DataField = CurFieldName
+ oDateShape = InsertControl(oGroupShape, oDateModel, aPoint, aSize)
+ SetNumerics(oDateModel, CurFieldType)
+ nDBHeight = GetDBHeight(oDateModel)
+ nDateWidth = GetPreferredWidth(oDateModel,True)
+ aSize = GetSize(nDateWidth,nDBHeight)
+ oDateShape.SetSize(aSize)
+
+ CurFieldType = com.sun.star.sdbc.DataType.TIME
+ oTimeModel = CreateUnoService(&quot;com.sun.star.form.component.TimeField&quot;)
+ oTimeModel.DataField = CurFieldName
+ oTimeShape = InsertControl(oGroupShape, oTimeModel, aPoint, aSize)
+ oTimeShape.Position = GetPoint(nXDBPos + 10 + nDateWidth,nYDBPos)
+ nTimeWidth = GetPreferredWidth(oTimeModel)
+ aSize = GetSize(nTimeWidth,nDBHeight)
+ oTimeShape.SetSize(aSize)
+ nDBWidth = nDateWidth + nTimeWidth + 10
+ oGroupShape.Position = aPoint
+ oGroupShape.Size = GetSize(nDBWidth, nDBHeight)
+ Set oDBShapeList(i)= oGroupShape
+ End If
+ CheckOuterPoints(nXDBPos, nDBWidth, nYDBPos, nDBHeight, True)
+ InsertTimeStampShape() = oDBShapeList(i)
+End Function
+
+
+&apos; Note: on all Controls except for the checkbox the Label has to be set
+&apos; a bit under the DBControl because its Height is also smaller
+Sub GetLabelDiffHeight(Index as Integer)
+ If (CurArrangement = cLeftJustified) Or (CurArrangement = cColumnarLeft) Then
+ If Index &lt;= Ubound(FieldMetaValues()) Then
+ If FieldMetaValues(Index,2) = cCheckBox Then
+ LabelDiffHeight = 0
+ Else
+ LabelDiffHeight = BasicLabelDiffHeight
+ End If
+ End If
+ End If
+End Sub
+
+
+Sub CheckJustifiedPosition()
+Dim nLeftDist as Long
+Dim nRightDist as Long
+Dim oLocDBShape as Object
+Dim oLocTextShape as Object
+Dim nBaseWidth as Long
+ nBaseWidth = nFormWidth + cXOffset
+ nLeftDist = nMaxColRightX - nBaseWidth
+ nRightDist = nBaseWidth - nXTCPos + cHoriDistance
+ If nLeftDist &lt; 0.5 * nRightDist and iReduceWidth &gt; 2 Then
+ &apos; Fieldwidths in the line can be made smaller
+ AdjustLineWidth(StartA, a, nLeftDist, - 1)
+ If CurArrangement = cLeftjustified Then
+ nYDBPos = nMaxRowY + cVertDistance
+ nYTCPos = nYDBPos + LABELDIFFHEIGHT
+ nXTCPos = cXOffset
+ Else
+ nYTCPos = nMaxRowY + cVertDistance
+ nYDBPos = nYTCPos + nTCHeight
+ nXTCPos = cXOffset
+ nXDBPos = cXOffset
+ End If
+ bIsFirstRun = True
+ StartA = a + 1
+ Else
+ Set oLocDBShape = oDBShapeList(a)
+ Set oLocTextShape = oTCShapeList(a)
+ If CurArrangement = cLeftJustified Then
+ If nYDBPos + nDBHeight = nMaxRowY Then
+ &apos; The last Control was the highes in the row
+ nYDBPos = nSecMaxRowY + cVertDistance
+ Else
+ nYDBPos = nMaxRowY + cVertDistance
+ End If
+ nYTCPos = nYDBPos + LABELDIFFHEIGHT
+ nXDBPos = cXOffset + nTCWidth
+ oLocTextShape.Position = GetPoint(cXOffset, nYTCPos)
+ oLocDBShape.Position = GetPoint(nXDBPos, nYDBPos)
+ &apos; PosSizes for the next two Controls
+ nXTCPos = oLocDBShape.Position.X + oLocDBShape.Size.Width + cHoriDistance
+ bIsFirstRun = True
+ CheckOuterPoints(nXDBPos, nDBWidth, nYDBPos, nDBHeight, True)
+ nXDBPos = nMaxColRightX + cHoriDistance
+ Else &apos; cTopJustified
+ If nYDBPos + nDBHeight = nMaxRowY Then
+ &apos; The last Control was the highest in the row
+ nYTCPos = nSecMaxRowY + cVertDistance
+ Else
+ nYTCPos = nMaxRowY + cVertDistance
+ End If
+ nYDBPos = nYTCPOS + nTCHeight
+ nXDBPos = cXOffset
+ nXTCPos = cXOffset
+ oLocTextShape.Position = GetPoint(cXOffset, nYTCPos)
+ oLocDBShape.Position = GetPoint(cXOffset, nYDBPos)
+ bIsFirstRun = True
+ If nDBWidth &gt; nTCWidth Then
+ CheckOuterPoints(nXDBPos, nDBWidth, nYDBPos, nDBHeight, True)
+ Else
+ CheckOuterPoints(nXDBPos, nTCWidth, nYDBPos, nDBHeight, True)
+ End If
+ nXTCPos = nMaxColRightX + cHoriDistance
+ nXDBPos = nXTCPos
+ End If
+ AdjustLineWidth(StartA, a-1, nRightDist, 1)
+ StartA = a
+ End If
+ iReduceWidth = 0
+End Sub
+
+
+
+Function GetCorrWidth(StartIndex as Integer, EndIndex as Integer, nDist as Long, Widthfactor as Integer) as Integer
+Dim ShapeCount as Integer
+ If WidthFactor &gt; 0 Then
+ ShapeCount = EndIndex-StartIndex + 1
+ Else
+ ShapeCount = iReduceWidth
+ End If
+ GetCorrWidth() = (nDist)/ShapeCount
+End Function
+
+
+Sub AdjustLineWidth(StartIndex as Integer, EndIndex as Integer, nDist as Long, Widthfactor as Integer)
+Dim i as Integer
+Dim oLocDBShape as Object
+Dim oLocTCShape as Object
+Dim CorrWidth as Integer
+Dim bAdjustPos as Boolean
+Dim iLocTCPosX as Long
+Dim iLocDBPosX as Long
+ CorrWidth = GetCorrWidth(StartIndex, EndIndex, nDist, Widthfactor)
+ bAdjustPos = False
+ iLocTCPosX = cXOffset
+ For i = StartIndex To EndIndex
+ Set oLocDBShape = oDBShapeList(i)
+ Set oLocTCShape = oTCShapeList(i)
+ If bAdjustPos Then
+ oLocTCShape.Position = GetPoint(iLocTCPosX, oLocTCShape.Position.Y)
+ If CurArrangement = cLeftJustified Then
+ iLocDBPosX = oLocTCShape.Position.X + oLocTCShape.Size.Width
+ oLocDBShape.Position = GetPoint(iLocDBPosX, oLocDBShape.Position.Y)
+ Else
+ oLocDBShape.Position = GetPoint(iLocTCPosX, oLocTCShape.Position.Y + nTCHeight)
+ End If
+ Else
+ bAdjustPos = True
+ End If
+ If CDbl(FieldMetaValues(i,1)) &gt; 20 or WidthFactor &gt; 0 Then
+ If (CurArrangement = cTopJustified) And (oLocTCShape.Size.Width &gt; oLocDBShape.Size.Width) Then
+ oLocDBShape.Size = GetSize(oLocTCShape.Size.Width + WidthFactor * CorrWidth, oLocDBShape.Size.Height)
+ Else
+ oLocDBShape.Size = GetSize(oLocDBShape.Size.Width + WidthFactor * CorrWidth, oLocDBShape.Size.Height)
+ End If
+ End If
+ iLocTCPosX = oLocDBShape.Position.X + oLocDBShape.Size.Width + cHoriDistance
+ If CurArrangement = cTopJustified Then
+ If oLocTCShape.Size.Width &gt; oLocDBShape.Size.Width Then
+ iLocTCPosX = oLocDBShape.Position.X + oLocTCShape.Size.Width + cHoriDistance
+ End If
+ End If
+ Next i
+End Sub
+
+
+Sub CheckOuterPoints(nXPos, nWidth, nYPos, nHeight, bIsDBField as Boolean)
+Dim nColRightX as Long
+Dim nRowY as Long
+Dim nOldMaxRowY as Long
+ If CurArrangement = cLeftJustified Or CurArrangement = cTopJustified Then
+ If bIsDBField Then
+ &apos; Only at DBControls you can measure the Value of nMaxRowY
+ If bIsFirstRun Then
+ nMaxRowY = nYPos + nHeight
+ nSecMaxRowY = nMaxRowY
+ Else
+ nRowY = nYPos + nHeight
+ If nRowY &gt;= nMaxRowY Then
+ nOldMaxRowY = nMaxRowY
+ nSecMaxRowY = nOldMaxRowY
+ nMaxRowY = nRowY
+ End If
+ End If
+ End If
+ End If
+ &apos; Find the outer right point
+ If bIsFirstRun Then
+ nMaxColRightX = nXPos + nWidth
+ bIsFirstRun = False
+ Else
+ nColRightX = nXPos + nWidth
+ If nColRightX &gt; nMaxColRightX Then
+ nMaxColRightX = nColRightX
+ End If
+ End If
+End Sub
+
+
+Function PositionGridControl(MaxIndex as Integer)
+Dim oControl as Object
+Dim n as Integer
+Dim oColumn as Object
+Dim aPoint as New com.sun.star.awt.Point
+Dim aSize as New com.sun.star.awt.Size
+ If bControlsareCreated Then
+ ShapesToNirwana()
+ End If
+ oGridModel = CreateUnoService(oModelService(cGridControl))
+ oGridModel.Name = &quot;Grid1&quot;
+ aPoint = GetPoint(cXOffset, cYOffset)
+ aSize = GetSize(nFormWidth, nFormHeight)
+ oDBForm.InsertByName (oGridModel.Name, oGridModel)
+ oGridShape = InsertControl(oDrawPage, oGridModel, aPoint, aSize)
+ For n = 0 to MaxIndex
+ GetCurrentMetaValues(n)
+ If CurFieldType = com.sun.star.sdbc.DataType.TIMESTAMP Then
+ oColumn = SetupGridColumn(oGridModel,&quot;DateField&quot;, False, com.sun.star.sdbc.DataType.DATE, CurFieldName &amp; &quot; &quot; &amp; sDateAppendix)
+ oColumn = SetupGridColumn(oGridModel,&quot;TimeField&quot;, False, com.sun.star.sdbc.DataType.TIME, CurFieldName &amp; &quot; &quot; &amp; sTimeAppendix)
+ Else
+ If CurControlType = cImageControl Then
+ oColumn = SetupGridColumn(oGridModel,&quot;TextField&quot;, True, CurFieldType, CurFieldName)
+ Else
+ oColumn = SetupGridColumn(oGridModel, CurControlName, False, CurFieldType, CurFieldName)
+ End If
+ End If
+ oProgressbar.Value = n
+ next n
+End Function
+
+
+Function SetupGridColumn(oGridModel as Object, ControlName as String, bHidden as Boolean, iLocFieldType as Integer, ColName as String) as Object
+Dim oColumn as Object
+ CurControlName = ControlName
+ oColumn = oGridModel.CreateColumn(CurControlName)
+ oColumn.Name = CalcUniqueContentName(oGridModel, CurControlName)
+ oColumn.Hidden = bHidden
+ SetNumerics(oColumn, iLocFieldType)
+ oColumn.DataField = CurFieldName
+ oColumn.Label = ColName
+ oColumn.Width = 0 &apos; Width of column is adjusted to Columname
+ oGridModel.insertByName(oColumn.Name, oColumn)
+End Function
+
+
+Sub ControlCaptionstoStandardLayout()
+Dim i as Integer
+Dim iBorderType as Integer
+Dim oCurModel as Object
+Dim oStyle as Object
+Dim iStandardColor as Long
+ If CurArrangement &lt;&gt; cTabled Then
+ oStyle = oDocument.StyleFamilies.GetByName(&quot;ParagraphStyles&quot;).GetByName(&quot;Standard&quot;)
+ iStandardColor = oStyle.CharColor
+ For i = 0 To MaxIndex
+ oCurModel = oTCShapeList(i).GetControl
+ If i = 0 Then
+ If oCurModel.TextColor = iStandardColor Then
+ Exit Sub
+ End If
+ End If
+ oCurModel.TextColor = iStandardColor
+ Next i
+ End If
+End Sub
+
+
+Sub GroupShapesTogether()
+Dim i as Integer
+ If CurArrangement &lt;&gt; cTabled Then
+ For i = 0 To MaxIndex
+ oGroupShapeList(i) = CreateUnoService(&quot;com.sun.star.drawing.ShapeCollection&quot;)
+ oGroupShapeList(i).Add(oTCShapeList(i))
+ oGroupShapeList(i).Add(oDBShapeList(i))
+ oDrawPage.Group(oGroupShapeList(i))
+ Next i
+ Else
+ RemoveNirwanaShapes()
+ End If
+End Sub</script:module> \ No newline at end of file
diff --git a/wizards/source/formwizard/dialog.xlb b/wizards/source/formwizard/dialog.xlb
new file mode 100644
index 000000000000..d680f29292e8
--- /dev/null
+++ b/wizards/source/formwizard/dialog.xlb
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="FormWizard" library:readonly="true" library:passwordprotected="false">
+ <library:element library:name="DlgFormDB"/>
+</library:library>
diff --git a/wizards/source/formwizard/makefile.mk b/wizards/source/formwizard/makefile.mk
new file mode 100644
index 000000000000..3a5ec422625f
--- /dev/null
+++ b/wizards/source/formwizard/makefile.mk
@@ -0,0 +1,53 @@
+#*************************************************************************
+#
+# 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.
+#
+#*************************************************************************
+PRJ=..$/..
+
+PRJNAME=wizards
+TARGET=formwizardall
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+.INCLUDE : $(PRJ)$/util$/target.pmk
+
+# --- Files --------------------------------------------------------
+
+#
+# testresource.
+#
+SRS2NAME = dbwizres
+SRC2FILES= dbwizres.src
+RESLIB2SRSFILES= $(SRS)$/dbwizres.srs
+RESLIB2NAME= dbw
+
+ZIP1TARGET = $(FORMWIZARD_ALL_TARGET)
+ZIP1LIST = *.xdl *.xba *.xlb
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
+
diff --git a/wizards/source/formwizard/script.xlb b/wizards/source/formwizard/script.xlb
new file mode 100644
index 000000000000..0b79b7f078ba
--- /dev/null
+++ b/wizards/source/formwizard/script.xlb
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="FormWizard" library:readonly="true" library:passwordprotected="false">
+ <library:element library:name="FormWizard"/>
+ <library:element library:name="Layouter"/>
+ <library:element library:name="Language"/>
+ <library:element library:name="DBMeta"/>
+ <library:element library:name="tools"/>
+ <library:element library:name="develop"/>
+</library:library>
diff --git a/wizards/source/formwizard/tools.xba b/wizards/source/formwizard/tools.xba
new file mode 100644
index 000000000000..174987e35971
--- /dev/null
+++ b/wizards/source/formwizard/tools.xba
@@ -0,0 +1,349 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="tools" script:language="StarBasic">REM ***** BASIC *****
+Option Explicit
+Public Const SBMAXTEXTSIZE = 50
+
+
+Function SetProgressValue(iValue as Integer)
+ If iValue = 0 Then
+ oProgressbar.End
+ End If
+ ProgressValue = iValue
+ oProgressbar.Value = iValue
+End Function
+
+
+Function GetPreferredWidth(oModel as Object, bGetMaxWidth as Boolean, Optional LocText)
+Dim aPeerSize as new com.sun.star.awt.Size
+Dim nWidth as Integer
+Dim oControl as Object
+ If Not IsMissing(LocText) Then
+ &apos; Label
+ aPeerSize = GetPeerSize(oModel, oControl, LocText)
+ ElseIf CurControlType = cImageControl Then
+ GetPreferredWidth() = 2000
+ Exit Function
+ Else
+ aPeerSize = GetPeerSize(oModel, oControl)
+ End If
+ nWidth = aPeerSize.Width
+ &apos; We increase the preferred Width a bit so that the control does not become too small
+ &apos; when we change the border from &quot;3D&quot; to &quot;Flat&quot;
+ GetPreferredWidth = (nWidth + 10) * XPixelFactor &apos; PixelTo100thmm(nWidth)
+End Function
+
+
+Function GetPreferredHeight(oModel as Object, Optional LocText)
+Dim aPeerSize as new com.sun.star.awt.Size
+Dim nHeight as Integer
+Dim oControl as Object
+ If Not IsMissing(LocText) Then
+ &apos; Label
+ aPeerSize = GetPeerSize(oModel, oControl, LocText)
+ ElseIf CurControlType = cImageControl Then
+ GetPreferredHeight() = 2000
+ Exit Function
+ Else
+ aPeerSize = GetPeerSize(oModel, oControl)
+ End If
+ nHeight = aPeerSize.Height
+ &apos; We increase the preferred Height a bit so that the control does not become too small
+ &apos; when we change the border from &quot;3D&quot; to &quot;Flat&quot;
+ GetPreferredHeight = (nHeight+1) * YPixelFactor &apos; PixelTo100thmm(nHeight)
+End Function
+
+
+Function GetPeerSize(oModel as Object, oControl as Object, Optional LocText)
+Dim oPeer as Object
+Dim aPeerSize as new com.sun.star.awt.Size
+Dim NullValue
+ oControl = oController.GetControl(oModel)
+ oPeer = oControl.GetPeer()
+ If oControl.Model.PropertySetInfo.HasPropertybyName(&quot;EffectiveMax&quot;) Then
+ If oControl.Model.EffectiveMax = 0 Then
+ &apos; This is relevant for decimal fields
+ oControl.Model.EffectiveValue = 999.9999
+ Else
+ oControl.Model.EffectiveValue = oControl.Model.EffectiveMax
+ End If
+ GetPeerSize() = oPeer.PreferredSize()
+ oControl.Model.EffectiveValue = NullValue
+ ElseIf Not IsMissing(LocText) Then
+ oControl.Text = LocText
+ GetPeerSize() = oPeer.PreferredSize()
+ ElseIf CurFieldType = com.sun.star.sdbc.DataType.BIT Then
+ GetPeerSize() = oPeer.PreferredSize()
+ ElseIf CurFieldType = com.sun.star.sdbc.DataType.BOOLEAN Then
+ GetPeerSize() = oPeer.PreferredSize()
+ ElseIf CurFieldType = com.sun.star.sdbc.DataType.DATE Then
+ oControl.Model.Date = Date
+ GetPeerSize() = oPeer.PreferredSize()
+ oControl.Model.Date = NullValue
+ ElseIf CurFieldType = com.sun.star.sdbc.DataType.TIME Then
+ oControl.Time = Time
+ GetPeerSize() = oPeer.PreferredSize()
+ oControl.Time = NullValue
+ Else
+ If oControl.MaxTextLen &gt; SBMAXTEXTSIZE Then
+ oControl.Text = Mid(SBSIZETEXT,1, SBMAXTEXTSIZE)
+ Else
+ oControl.Text = Mid(SBSIZETEXT,1, oControl.MaxTextLen)
+ End If
+ GetPeerSize() = oPeer.PreferredSize()
+ oControl.Text = &quot;&quot;
+ End If
+End Function
+
+
+Function TwipToCM(BYVAL nValue as long) as String
+ TwipToCM = trim(str(nValue / 567)) + &quot;cm&quot;
+End function
+
+
+Function TwipTo100telMM(BYVAL nValue as long) as long
+ TwipTo100telMM = nValue / 0.567
+End function
+
+
+Function TwipToPixel(BYVAL nValue as long) as long &apos; not an exact calculation
+ TwipToPixel = nValue / 15
+End function
+
+
+Function PixelTo100thMMX(oControl as Object) as long
+ oPeer = oControl.GetPeer()
+ PixelTo100mmX = Clng(Peer.GetInfo.PixelPerMeterX/100000)
+
+&apos; PixelTo100thMM = nValue * 28 &apos; not an exact calculation
+End function
+
+
+Function PixelTo100thMMY(oControl as Object) as long
+ oPeer = oControl.GetPeer()
+ PixelTo100mmX = Clng(Peer.GetInfo.PixelPerMeterY/100000)
+
+&apos; PixelTo100thMM = nValue * 28 &apos; not an exact calculation
+End function
+
+
+Function GetPoint(xPos, YPos) as New com.sun.star.awt.Point
+Dim aPoint as New com.sun.star.awt.Point
+ aPoint.X = xPos
+ aPoint.Y = yPos
+ GetPoint() = aPoint
+End Function
+
+
+Function GetSize(iWidth, iHeight) As New com.sun.star.awt.Size
+Dim aSize As New com.sun.star.awt.Size
+ aSize.Width = iWidth
+ aSize.Height = iHeight
+ GetSize() = aSize
+End Function
+
+
+Sub ImportStyles()
+Dim OldIndex as Integer
+ If Not bDebug Then
+ On Local Error GoTo WIZARDERROR
+ End If
+ OldIndex = CurIndex
+ CurIndex = GetCurIndex(DialogModel.lstStyles, Styles(),8)
+ If CurIndex &lt;&gt; OldIndex Then
+ ToggleLayoutPage(False)
+ Dim sImportPath as String
+ sImportPath = Styles(CurIndex, 8)
+ bWithBackGraphic = LoadNewStyles(oDocument, DialogModel, CurIndex, sImportPath, Styles(), TexturePath)
+ ControlCaptionsToStandardLayout()
+ ToggleLayoutPage(True, &quot;lstStyles&quot;)
+ End If
+WIZARDERROR:
+ If Err &lt;&gt; 0 Then
+ Msgbox(sMsgErrMsg, 16, GetProductName())
+ Resume LOCERROR
+ LOCERROR:
+ End If
+End Sub
+
+
+
+Function SetNumerics(ByVal oLocObject as Object, iLocFieldType as Integer) as Object
+ If CurControlType = cNumericBox Then
+ oLocObject.TreatAsNumber = True
+ Select Case iLocFieldType
+ Case com.sun.star.sdbc.DataType.BIGINT
+ oLocObject.EffectiveMax = 2147483647 * 2147483647
+ oLocObject.EffectiveMin = -(-2147483648 * -2147483648)
+&apos; oLocObject.DecimalAccuracy = 0
+ Case com.sun.star.sdbc.DataType.INTEGER
+ oLocObject.EffectiveMax = 2147483647
+ oLocObject.EffectiveMin = -2147483648
+ Case com.sun.star.sdbc.DataType.SMALLINT
+ oLocObject.EffectiveMax = 32767
+ oLocObject.EffectiveMin = -32768
+ Case com.sun.star.sdbc.DataType.TINYINT
+ oLocObject.EffectiveMax = 127
+ oLocObject.EffectiveMin = -128
+ Case com.sun.star.sdbc.DataType.FLOAT, com.sun.star.sdbc.DataType.REAL, com.sun.star.sdbc.DataType.DOUBLE, com.sun.star.sdbc.DataType.DECIMAL, com.sun.star.sdbc.DataType.NUMERIC
+&apos;Todo: oLocObject.DecimalAccuracy = ...
+ oLocObject.EffectiveDefault = CurDefaultValue
+&apos; Todo: HelpText???
+ End Select
+ If oLocObject.PropertySetinfo.HasPropertyByName(&quot;Width&quot;)Then &apos; Note: an Access AutoincrementField does not provide this property Width
+ oLocObject.Width = CurFieldLength + CurScale + 1
+ End If
+ If CurIsCurrency Then
+&apos;Todo: How do you set currencies?
+ End If
+ ElseIf CurControlType = cTextBox Then &apos;com.sun.star.sdbc.DataType.CHAR, com.sun.star.sdbc.DataType.VARCHAR, com.sun.star.sdbc.DataType.LONGVARCHAR
+ If CurFieldLength = 0 Then &apos;Or oLocObject.MaxTextLen &gt; SBMAXTEXTSIZE
+ oLocObject.MaxTextLen = SBMAXTEXTSIZE
+ CurFieldLength = SBMAXTEXTSIZE
+ Else
+ oLocObject.MaxTextLen = CurFieldLength
+ End If
+ oLocObject.DefaultText = CurDefaultValue
+ ElseIf CurControlType = cDateBox Then
+&apos; Todo Why does this not work?: oLocObject.DefaultDate = CurDefaultValue
+ ElseIf CurControlType = cTimeBox Then &apos; com.sun.star.sdbc.DataType.DATE, com.sun.star.sdbc.DataType.TIME
+ oLocObject.DefaultTime = CurDefaultValue
+&apos; Todo: Property TimeFormat? frome where?
+ ElseIf CurControlType = cCheckBox Then
+&apos; Todo Why does this not work?: oLocObject.DefautState = CurDefaultValue
+ End If
+ If oLocObject.PropertySetInfo.HasPropertybyName(&quot;FormatKey&quot;) Then
+ On Local Error Resume Next
+ oLocObject.FormatKey = CurFormatKey
+ End If
+End Function
+
+
+&apos; Destroy all Shapes in Nirwana
+Sub RemoveShapes()
+Dim n as Integer
+Dim oControl as Object
+Dim oShape as Object
+ For n = oDrawPage.Count-1 To 0 Step -1
+ oShape = oDrawPage(n)
+ If oShape.Position.Y &gt; -2000 Then
+ oDrawPage.Remove(oShape)
+ End If
+ Next n
+End Sub
+
+
+&apos; Destroy all Shapes in Nirwana
+Sub RemoveNirwanaShapes()
+Dim n as Integer
+Dim oControl as Object
+Dim oShape as Object
+ For n = oDrawPage.Count-1 To 0 Step -1
+ oShape = oDrawPage(n)
+ If oShape.Position.Y &lt; -2000 Then
+ oDrawPage.Remove(oShape)
+ End If
+ Next n
+End Sub
+
+
+
+&apos; Note: as Shapes cannot be removed from the DrawPage without destroying
+&apos; the object we have to park them somewhere beyond the visible area of the page
+Sub ShapesToNirwana()
+Dim n as Integer
+Dim oControl as Object
+ For n = 0 To oDrawPage.Count-1
+ oDrawPage(n).Position = GetPoint(-20, -10000)
+ Next n
+End Sub
+
+
+Function CalcUniqueContentName(BYVAL oContainer as Object, sBaseName as String) as String
+
+Dim nPostfix as Integer
+Dim sReturn as String
+ nPostfix = 2
+ sReturn = sBaseName
+ while (oContainer.hasByName(sReturn))
+ sReturn = sBaseName &amp; nPostfix
+ nPostfix = nPostfix + 1
+ Wend
+ CalcUniqueContentName = sReturn
+End Function
+
+
+Function CountItemsInArray(BigArray(), SearchItem)
+Dim i as Integer
+Dim MaxIndex as Integer
+Dim ResCount as Integer
+ ResCount = 0
+ MaxIndex = Ubound(BigArray())
+ For i = 0 To MaxIndex
+ If SearchItem = BigArray(i) Then
+ ResCount = ResCount + 1
+ End If
+ Next i
+ CountItemsInArray() = ResCount
+End Function
+
+
+Function GetDBHeight(oDBModel as Object)
+ If CurControlType = cImageControl Then
+ nDBHeight = 2000
+ Else
+ If CurFieldType = com.sun.star.sdbc.DataType.LONGVARCHAR Then
+ oDBModel.MultiLine = True
+ nDBHeight = nDBRefHeight * 4
+ Else
+ nDBHeight = nDBRefHeight
+ End If
+ End If
+ GetDBHeight() = nDBHeight
+End Function
+
+
+Function GetFormWizardPaths() as Boolean
+ FormPath = GetOfficeSubPath(&quot;Template&quot;,&quot;wizard/bitmap&quot;)
+ If FormPath &lt;&gt; &quot;&quot; Then
+ WebWizardPath = GetOfficeSubPath(&quot;Template&quot;,&quot;wizard/web&quot;)
+ If WebWizardPath &lt;&gt; &quot;&quot; Then
+ WizardPath = GetOfficeSubPath(&quot;Template&quot;,&quot;wizard/&quot;)
+ If Wizardpath &lt;&gt; &quot;&quot; Then
+ TexturePath = GetOfficeSubPath(&quot;Gallery&quot;, &quot;www-back/&quot;)
+ If TexturePath &lt;&gt; &quot;&quot; Then
+ WorkPath = GetPathSettings(&quot;Work&quot;)
+ If WorkPath &lt;&gt; &quot;&quot; Then
+ TempPath = GetPathSettings(&quot;Temp&quot;)
+ If TempPath &lt;&gt; &quot;&quot; Then
+ GetFormWizardPaths = True
+ Exit Function
+ End If
+ End If
+ End If
+ End If
+ End If
+ End If
+ DisposeDocument(oDocument)
+ GetFormWizardPaths() = False
+End Function
+
+
+Function GetFilterName(sApplicationKey as String) as String
+Dim oArgs()
+Dim oFactory
+Dim i as Integer
+Dim Maxindex as Integer
+Dim UIName as String
+ oFactory = createUnoService(&quot;com.sun.star.document.FilterFactory&quot;)
+ oArgs() = oFactory.getByName(sApplicationKey)
+ MaxIndex = Ubound(oArgs())
+ For i = 0 to MaxIndex
+ If (oArgs(i).Name=&quot;UIName&quot;) Then
+ UIName = oArgs(i).Value
+ Exit For
+ End If
+ next i
+ GetFilterName() = UIName
+End Function
+</script:module>
diff --git a/wizards/source/gimmicks/AutoText.xba b/wizards/source/gimmicks/AutoText.xba
new file mode 100644
index 000000000000..5d3cc18e5e13
--- /dev/null
+++ b/wizards/source/gimmicks/AutoText.xba
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="AutoText" script:language="StarBasic">&apos; BASIC
+Option Explicit
+Dim oDocument as Object
+Dim sDocumentTitle as String
+
+
+Sub Main()
+Dim oTable as Object
+Dim oRows as Object
+Dim oDocuText as Object
+Dim oAutoTextCursor as Object
+Dim oAutoTextContainer as Object
+Dim oAutogroup as Object
+Dim oAutoText as Object
+Dim oCharStyles as Object
+Dim oContentStyle as Object
+Dim oHeaderStyle as Object
+Dim oGroupTitleStyle as Object
+Dim n, m, iAutoCount as Integer
+ BasicLibraries.LoadLibrary(&quot;Tools&quot;)
+ sDocumentTitle = &quot;Installed AutoTexts&quot;
+
+ &apos; Open a new empty document
+ oDocument = CreateNewDocument(&quot;swriter&quot;)
+ If Not IsNull(oDocument) Then
+ oDocument.DocumentProperties.Title = sDocumentTitle
+ oDocuText = oDocument.Text
+
+ &apos; Create The Character-templates
+ oCharStyles = oDocument.StyleFamilies.GetByName(&quot;CharacterStyles&quot;)
+
+ &apos; The Characterstyle for the Header that describes the Title of Autotextgroups
+ oGroupTitleStyle = oDocument.createInstance(&quot;com.sun.star.style.CharacterStyle&quot;)
+ oCharStyles.InsertbyName(&quot;AutoTextGroupTitle&quot;, oGroupTitleStyle)
+
+ oGroupTitleStyle.CharWeight = com.sun.star.awt.FontWeight.BOLD
+ oGroupTitleStyle.CharHeight = 14
+
+ &apos; The Characterstyle for the Header that describes the Title of Autotextgroups
+ oHeaderStyle = oDocument.createInstance(&quot;com.sun.star.style.CharacterStyle&quot;)
+ oCharStyles.InsertbyName(&quot;AutoTextHeading&quot;, oHeaderStyle)
+ oHeaderStyle.CharWeight = com.sun.star.awt.FontWeight.BOLD
+
+ &apos; &quot;Ordinary&quot; Table Content
+ oContentStyle = oDocument.createInstance(&quot;com.sun.star.style.CharacterStyle&quot;)
+ oCharStyles.InsertbyName(&quot;TableContent&quot;, oContentStyle)
+
+ oAutoTextContainer = CreateUnoService(&quot;com.sun.star.text.AutoTextContainer&quot;)
+
+ oAutoTextCursor = oDocuText.CreateTextCursor()
+
+ oAutoTextCursor.CharStyleName = &quot;AutoTextGroupTitle&quot;
+ &apos; Link the Title with the following table
+ oAutoTextCursor.ParaKeepTogether = True
+
+ For n = 0 To oAutoTextContainer.Count - 1
+ oAutoGroup = oAutoTextContainer.GetByIndex(n)
+
+ oAutoTextCursor.SetString(oAutoGroup.Title)
+ oAutoTextCursor.CollapseToEnd()
+ oDocuText.insertControlCharacter(oAutoTextCursor,com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK,False)
+ oTable = oDocument.CreateInstance(&quot;com.sun.star.text.TextTable&quot;)
+ &apos; Divide the table if necessary
+ oTable.Split = True
+&apos; oTable.KeepTogether = False
+ oTable.RepeatHeadLine = True
+ oAutoTextCursor.Text.InsertTextContent(oAutoTextCursor,oTable,False)
+ InsertStringToCell(&quot;AutoText Name&quot;,oTable.GetCellbyPosition(0,0), &quot;AutoTextHeading&quot;)
+ InsertStringToCell(&quot;AutoText Shortcut&quot;,oTable.GetCellbyPosition(1,0), &quot;AutoTextHeading&quot;)
+ &apos; Insert one row at the bottom of the table
+ oRows = oTable.Rows
+ iAutoCount = oAutoGroup.Count
+ For m = 0 To iAutoCount-1
+ &apos; Insert the name and the title of all Autotexts
+ oAutoText = oAutoGroup.GetByIndex(m)
+ InsertStringToCell(oAutoGroup.Titles(m), oTable.GetCellbyPosition(0, m + 1), &quot;TableContent&quot;)
+ InsertStringToCell(oAutoGroup.ElementNames(m), oTable.GetCellbyPosition(1, m + 1), &quot;TableContent&quot;)
+ If m &lt; iAutoCount-1 Then
+ oRows.InsertbyIndex(m + 2,1)
+ End If
+ Next m
+ oDocuText.insertControlCharacter(oAutoTextCursor,com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK,False)
+ oAutoTextCursor.CollapseToEnd()
+ Next n
+ End If
+End Sub
+
+
+Sub InsertStringToCell(sCellString as String, oCell as Object, sCellStyle as String)
+Dim oCellCursor as Object
+ oCellCursor = oCell.CreateTextCursor()
+ oCellCursor.CharStyleName = sCellStyle
+ oCell.Text.insertString(oCellCursor,sCellString,False)
+ oDocument.CurrentController.Select(oCellCursor)
+End Sub</script:module>
diff --git a/wizards/source/gimmicks/ChangeAllChars.xba b/wizards/source/gimmicks/ChangeAllChars.xba
new file mode 100644
index 000000000000..aa0abaa1cca8
--- /dev/null
+++ b/wizards/source/gimmicks/ChangeAllChars.xba
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="ChangeAllChars" script:language="StarBasic">&apos; This macro replaces all characters in a writer-documet through &quot;x&quot; or &quot;X&quot; signs.
+&apos; It works on the currently activated document.
+Private const UPPERREPLACECHAR = &quot;X&quot;
+Private const LOWERREPLACECHAR = &quot;x&quot;
+
+Private MSGBOXTITLE
+Private NOTSAVEDTEXT
+Private WARNING
+
+Sub ChangeAllChars &apos; Change all chars in the active document
+Dim oSheets, oPages as Object
+Dim i as Integer
+Const MBYES = 6
+Const MBABORT = 2
+Const MBNO = 7
+ BasicLibraries.LoadLibrary(&quot;Tools&quot;)
+ MSGBOXTITLE = &quot;Change All Characters to an &apos;&quot; &amp; UPPERREPLACECHAR &amp; &quot;&apos;&quot;
+ NOTSAVEDTEXT = &quot;This document has already been modified: All characters will be changed to an &quot; &amp; UPPERREPLACECHAR &amp; &quot;&apos;. Should the document be saved now?&quot;
+ WARNING = &quot;This macro changes all characters and numbers to an &apos;&quot; &amp; UPPERREPLACECHAR &amp; &quot;&apos; in this document.&quot;
+
+ On Local Error GoTo NODOCUMENT
+ oDocument = StarDesktop.ActiveFrame.Controller.Model
+ NODOCUMENT:
+ If Err &lt;&gt; 0 Then
+ Msgbox(WARNING &amp; chr(13) &amp; &quot;First, activate a Writer document.&quot; , 16, GetProductName())
+ Exit Sub
+ End If
+ On Local Error Goto 0
+
+ sDocType = GetDocumentType(oDocument)
+
+ If oDocument.IsModified And oDocument.Url &lt;&gt; &quot;&quot; Then
+ Status = MsgBox(NOTSAVEDTEXT, 3+32, MSGBOXTITLE)
+ Select Case Status
+ Case MBYES
+ oDocument.Store
+ Case MBABORT, MBNO
+ End
+ End Select
+ Else
+ Status = MsgBox(WARNING, 3+32, MSGBOXTITLE)
+ If Status = MBNO Or Status = MBABORT Then &apos; No, Abort
+ End
+ End If
+ End If
+
+ Select Case sDocType
+ Case &quot;swriter&quot;
+ ReplaceAllStrings(oDocument)
+
+ Case Else
+ Msgbox(&quot;This macro only works with Writer documents.&quot;, 16, GetProductName())
+ End Select
+End Sub
+
+
+Sub ReplaceAllStrings(oContainer as Object)
+ ReplaceStrings(oContainer, &quot;[a-z]&quot;, LOWERREPLACECHAR)
+ ReplaceStrings(oContainer, &quot;[à-þ]&quot;, LOWERREPLACECHAR)
+ ReplaceStrings(oContainer, &quot;[A-Z]&quot;, UPPERREPLACECHAR)
+ ReplaceStrings(oContainer, &quot;[À-ß]&quot;, UPPERREPLACECHAR)
+ ReplaceStrings(oContainer, &quot;[0-9]&quot;, UPPERREPLACECHAR)
+End Sub
+
+
+Sub ReplaceStrings(oContainer as Object, sSearchString, sReplaceString as String)
+ oReplaceDesc = oContainer.createReplaceDescriptor()
+ oReplaceDesc.SearchCaseSensitive = True
+ oReplaceDesc.SearchRegularExpression = True
+ oReplaceDesc.Searchstring = sSearchString
+ oReplaceDesc.ReplaceString = sReplaceString
+ oReplCount = oContainer.ReplaceAll(oReplaceDesc)
+End Sub</script:module> \ No newline at end of file
diff --git a/wizards/source/gimmicks/GetTexts.xba b/wizards/source/gimmicks/GetTexts.xba
new file mode 100644
index 000000000000..c98e7d51f580
--- /dev/null
+++ b/wizards/source/gimmicks/GetTexts.xba
@@ -0,0 +1,522 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="GetTexts" script:language="StarBasic">Option Explicit
+&apos; Macro-Description:
+&apos; This Macro extracts the Strings out of the currently activated document und inserts them into a logdocument
+&apos; The aim of the macro is to provide the programmer an insight into the StarOffice API
+&apos; It focusses on how document-Objects are accessed.
+&apos; Therefor not only texts of the document-body are retrieved but also Texts of general
+&apos; document Objects like, Annotations, charts and general Document Information
+
+Public oLogDocument, oLogText, oLogCursor, oLogHeaderStyle, oLogBodyTextStyle as Object
+Public oDocument as Object
+Public LogArray(1000) as String
+Public LogIndex as Integer
+Public oLocHeaderStyle as Object
+
+Sub Main
+Dim sDocType as String
+Dim oHyperCursor as Object
+Dim oCharStyles as Object
+ BasicLibraries.LoadLibrary(&quot;Tools&quot;)
+ On Local Error GoTo NODOCUMENT
+ oDocument = StarDesktop.ActiveFrame.Controller.Model
+ sDocType = GetDocumentType(oDocument)
+ NODOCUMENT:
+ If Err &lt;&gt; 0 Then
+ Msgbox(&quot;This macro extracts all data from the active Writer, Calc or Draw document.&quot; &amp; chr(13) &amp;_
+ &quot;To start this macro you have to activate a document first.&quot; , 16, GetProductName)
+ Exit Sub
+ End If
+ On Local Error Goto 0
+
+ &apos; Open a new document where all the texts are inserted
+ oLogDocument = CreateNewDocument(&quot;swriter&quot;)
+ If Not IsNull(oLogDocument) Then
+ oLogText = oLogDocument.Text
+
+ &apos; create and define the character styles of the Log-document
+ oCharStyles = oLogDocument.StyleFamilies.GetByName(&quot;CharacterStyles&quot;)
+ oLogHeaderStyle = oLogDocument.createInstance(&quot;com.sun.star.style.CharacterStyle&quot;)
+ oCharStyles.InsertbyName(&quot;Log Header&quot;, oLogHeaderStyle)
+
+ oLogHeaderStyle.charWeight = com.sun.star.awt.FontWeight.BOLD
+ oLogBodyTextStyle = oLogDocument.createInstance(&quot;com.sun.star.style.CharacterStyle&quot;)
+ oCharStyles.InsertbyName(&quot;Log Body&quot;, oLogBodyTextStyle)
+
+ &apos; Insert the title of the activated document as a hyperlink
+ oHyperCursor = oLogText.createTextCursor()
+ oHyperCursor.CharWeight = com.sun.star.awt.FontWeight.BOLD
+ oHyperCursor.gotoStart(False)
+ oHyperCursor.HyperLinkURL = oDocument.URL
+ oHyperCursor.HyperLinkTarget = oDocument.URL
+ If oDocument.DocumentProperties.Title &lt;&gt; &quot;&quot; Then
+ oHyperCursor.HyperlinkName = oDocument.DocumentProperties.Title
+ End If
+ oLogText.insertString(oHyperCursor, oDocument.DocumentProperties.Title, False)
+ oLogText.insertControlCharacter(oHyperCursor,com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK,False)
+
+ oLogCursor = oLogText.createTextCursor()
+ oLogCursor.GotoEnd(False)
+ &apos; &quot;Switch off&quot; the Hyperlink - Properties
+ oLogCursor.SetPropertyToDefault(&quot;HyperLinkURL&quot;)
+ oLogCursor.SetPropertyToDefault(&quot;HyperLinkTarget&quot;)
+ oLogCursor.SetPropertyToDefault(&quot;HyperLinkName&quot;)
+ LogIndex = 0
+
+ &apos; Get the Properties of the document
+ GetDocumentProps()
+
+ Select Case sDocType
+ Case &quot;swriter&quot;
+ GetWriterStrings()
+ Case &quot;scalc&quot;
+ GetCalcStrings()
+ Case &quot;sdraw&quot;, &quot;simpress&quot;
+ GetDrawStrings()
+ Case Else
+ Msgbox(&quot;This macro only works with a Writer, Calc or Draw/Impress document.&quot;, 16, GetProductName())
+ End Select
+ End If
+End Sub
+
+
+&apos; ***********************************************Calc-Documents**************************************************
+
+Sub GetCalcStrings()
+Dim i, n as integer
+Dim oSheet as Object
+Dim SheetName as String
+Dim oSheets as Object
+ &apos; Create a sequence of all sheets within the document
+ oSheets = oDocument.Sheets
+
+ For i = 0 to osheets.Count - 1
+ oSheet = osheets.GetbyIndex(i)
+ SheetName = oSheet.Name
+ MakeLogHeadLine(&quot;Sheet No. &quot; &amp; i &amp; &quot;(&quot; &amp; SheetName &amp; &quot;)&quot; )
+
+ &apos; Check the &quot;body&quot; of the sheet
+ GetCellTexts(oSheet)
+
+ If oSheet.IsScenario then
+ MakeLogHeadLine(&quot;Scenario Comments from &quot; &amp; SheetName &amp; &quot;&apos;&quot;)
+ WriteStringtoLogFile(osheet.ScenarioComment)
+ End if
+
+ GetAnnotations(oSheet, &quot;Annotations from &apos;&quot; &amp; SheetName &amp; &quot;&apos;&quot;)
+
+ GetChartStrings(oSheet, &quot;Charts from &apos;&quot; &amp; SheetName &amp; &quot;&apos;&quot;)
+
+ GetControlStrings(oSheet.DrawPage, &quot;Controls from &apos;&quot; &amp; SheetName &amp; &quot;&apos;&quot;)
+ Next
+
+ &apos; Pictures
+ GetCalcGraphicNames()
+
+ GetNamedRanges()
+End Sub
+
+
+Sub GetCellTexts(oSheet as Object)
+Dim BigRange, BigEnum, oCell as Object
+ BigRange = oDocument.CreateInstance(&quot;com.sun.star.sheet.SheetCellRanges&quot;)
+ BigRange.InsertbyName(&quot;&quot;,oSheet)
+ BigEnum = BigRange.GetCells.CreateEnumeration
+ While BigEnum.hasmoreElements
+ oCell = BigEnum.NextElement
+ If oCell.String &lt;&gt; &quot;&quot; And Val(oCell.String) = 0then
+ WriteStringtoLogFile(oCell.String)
+ End If
+ Wend
+End Sub
+
+
+Sub GetAnnotations(oSheet as Object, HeaderLine as String)
+Dim oNotes as Object
+Dim n as Integer
+ oNotes = oSheet.getAnnotations
+ If oNotes.hasElements() then
+ MakeLogHeadLine(HeaderLine)
+ For n = 0 to oNotes.Count-1
+ WriteStringtoLogFile(oNotes.GetbyIndex(n).String)
+ Next
+ End if
+End Sub
+
+
+Sub GetNamedRanges()
+Dim i as integer
+ MakeLogHeadLine(&quot;Named Ranges&quot;)
+ For i = 0 To oDocument.NamedRanges.Count - 1
+ WriteStringtoLogFile(oDocument.NamedRanges.GetbyIndex(i).Name)
+ Next
+End Sub
+
+
+Sub GetCalcGraphicNames()
+Dim n,m as integer
+ MakeLogHeadLine(&quot;Graphics&quot;)
+ For n = 0 To oDocument.Drawpages.count-1
+ For m = 0 To oDocument.Drawpages.GetbyIndex(n).Count - 1
+ WriteStringtoLogFile(oDocument.DrawPages.GetbyIndex(n).GetbyIndex(m).Text.String)
+ Next m
+ Next n
+End Sub
+
+
+&apos; ***********************************************Writer-Documents**************************************************
+
+Sub GetParagraphTexts(oParaObject as Object, HeadLine as String)
+Dim ParaEnum as Object
+Dim oPara as Object
+Dim oTextPortEnum as Object
+Dim oTextPortion as Object
+Dim i as integer
+Dim oCellNames()
+Dim oCell as Object
+
+ MakeLogHeadLine(HeadLine)
+ ParaEnum = oParaObject.Text.CreateEnumeration
+
+ While ParaEnum.HasMoreElements
+ oPara = ParaEnum.NextElement
+
+ &apos; Note: The Enumeration ParaEnum lists all tables and Paragraphs.
+ &apos; Therefor we have to find out what kind of object &quot;oPara&quot; actually is
+ If oPara.supportsService(&quot;com.sun.star.text.Paragraph&quot;) Then
+ &apos; &quot;oPara&quot; is a Paragraph
+ oTextPortEnum = oPara.createEnumeration
+ While oTextPortEnum.hasmoreElements
+ oTextPortion = oTextPortEnum.nextElement()
+ WriteStringToLogFile(oTextPortion.String)
+ Wend
+ Else
+ &apos; &quot;oPara&quot; is a table
+ oCellNames = oPara.CellNames
+ For i = 0 To Ubound(oCellNames())
+ If oCellNames(i) &lt;&gt; &quot;&quot; Then
+ oCell = oPara.getCellByName(oCellNames(i))
+ WriteStringToLogFile(oCell.String)
+ End If
+ Next
+ End If
+ Wend
+End Sub
+
+
+
+Sub GetChartStrings(oSheet as Object, HeaderLine as String)
+Dim i as Integer
+Dim aChartObject as Object
+Dim aChartDiagram as Object
+
+ MakeLogHeadLine(HeaderLine)
+
+ For i = 0 to oSheet.Charts.Count-1
+ aChartObject = oSheet.Charts.GetByIndex(i).EmbeddedObject
+ If aChartObject.HasSubTitle then
+ WriteStringToLogFile(aChartObject.SubTitle.String)
+ End If
+
+ If aChartObject.HasMainTitle then
+ WriteStringToLogFile(aChartObject.Title.String)
+ End If
+
+ aChartDiagram = aChartObject.Diagram
+
+ If aChartDiagram.hasXAxisTitle Then
+ WriteStringToLogFile(aChartDiagram.XAxisTitle)
+ End If
+
+ If aChartDiagram.hasYAxisTitle Then
+ WriteStringToLogFile(aChartDiagram.YAxisTitle)
+ End If
+
+ If aChartDiagram.hasZAxisTitle Then
+ WriteStringToLogFile(aChartDiagram.ZAxisTitle)
+ End If
+ Next i
+End Sub
+
+
+
+Sub GetFrameTexts()
+Dim i as integer
+Dim oTextFrame as object
+Dim oFrameEnum as Object
+Dim oFramePort as Object
+Dim oFrameTextEnum as Object
+Dim oFrameTextPort as Object
+
+ MakeLogHeadLine(&quot;Text Frames&quot;)
+ For i = 0 to oDocument.TextFrames.Count-1
+ oTextFrame = oDocument.TextFrames.GetbyIndex(i)
+ WriteStringToLogFile(oTextFrame.Name)
+
+ &apos; Is the frame bound to the Page
+ If oTextFrame.AnchorType = com.sun.star.text.TextContentAnchorType.AT_PAGE Then
+ GetParagraphTexts(oTextFrame, &quot;Text Frame Contents&quot;)
+ End If
+
+ oFrameEnum = oTextFrame.CreateEnumeration
+ While oFrameEnum.HasMoreElements
+ oFramePort = oFrameEnum.NextElement
+ If oFramePort.supportsService(&quot;com.sun.star.text.Paragraph&quot;) then
+ oFrameTextEnum = oFramePort.createEnumeration
+ While oFrameTextEnum.HasMoreElements
+ oFrameTextPort = oFrameTextEnum.NextElement
+ If oFrameTextPort.SupportsService(&quot;com.sun.star.text.TextFrame&quot;) Then
+ WriteStringtoLogFile(oFrameTextPort.String)
+ End If
+ Wend
+ Else
+ WriteStringtoLogFile(oFramePort.Name)
+ End if
+ Wend
+ Next
+End Sub
+
+
+Sub GetTextFieldStrings()
+Dim aTextField as Object
+Dim i as integer
+Dim CurElement as Object
+ MakeLogHeadLine(&quot;Text Fields&quot;)
+ aTextfield = oDocument.getTextfields.CreateEnumeration
+ While aTextField.hasmoreElements
+ CurElement = aTextField.NextElement
+ If CurElement.PropertySetInfo.hasPropertybyName(&quot;Content&quot;) Then
+ WriteStringtoLogFile(CurElement.Content)
+ ElseIf CurElement.PropertySetInfo.hasPropertybyName(&quot;PlaceHolder&quot;) Then
+ WriteStringtoLogFile(CurElement.PlaceHolder)
+ WriteStringtoLogFile(CurElement.Hint)
+ ElseIf Curelement.TextFieldMaster.PropertySetInfo.HasPropertybyName(&quot;Content&quot;) then
+ WriteStringtoLogFile(CurElement.TextFieldMaster.Content)
+ End If
+ Wend
+End Sub
+
+
+
+Sub GetLinkedFileNames()
+Dim oDocSections as Object
+Dim LinkedFileName as String
+Dim i as Integer
+ If Right(oDocument.URL,3) = &quot;sgl&quot; Then
+ MakeLogHeadLine(&quot;Sub-documents&quot;)
+ oDocSections = oDocument.TextSections
+ For i = 0 to oDocSections.Count - 1
+ LinkedFileName = oDocSections.GetbyIndex(i).FileLink.FileURL
+ If LinkedFileName &lt;&gt; &quot;&quot; Then
+ WriteStringToLogFile(LinkedFileName)
+ End If
+ Next i
+ End If
+End Sub
+
+
+Sub GetSectionNames()
+Dim i as integer
+Dim oDocSections as Object
+ MakeLogHeadLine(&quot;Sections&quot;)
+ oDocSections = oDocument.TextSections
+ For i = 0 to oDocSections.Count-1
+ WriteStringtoLogFile(oDocSections.GetbyIndex(i).Name)
+ Next
+End Sub
+
+
+Sub GetWriterStrings()
+ GetParagraphTexts(oDocument, &quot;Document Body&quot;)
+ GetGraphicNames()
+ GetStyles()
+ GetControlStrings(oDocument.DrawPage, &quot;Controls&quot;)
+ GetTextFieldStrings()
+ GetSectionNames()
+ GetFrameTexts()
+ GetHyperLinks
+ GetLinkedFileNames()
+End Sub
+
+
+&apos; ***********************************************Draw-Documents**************************************************
+
+Sub GetDrawPageTitles(LocObject as Object)
+Dim n as integer
+Dim oPage as Object
+
+ For n = 0 to LocObject.Count - 1
+ oPage = LocObject.GetbyIndex(n)
+ WriteStringtoLogFile(oPage.Name)
+ &apos; Is the Page a DrawPage and not a MasterPage?
+ If oPage.supportsService(&quot;com.sun.star.drawing.DrawPage&quot;)then
+ &apos; Get the Name of the NotesPage (only relevant for Impress-Documents)
+ If oDocument.supportsService(&quot;com.sun.star.presentation.PresentationDocument&quot;) then
+ WriteStringtoLogFile(oPage.NotesPage.Name)
+ End If
+ End If
+ Next
+End Sub
+
+
+Sub GetPageStrings(oPages as Object)
+Dim m, n, s as Integer
+Dim oPage, oPageElement, oShape as Object
+ For n = 0 to oPages.Count-1
+ oPage = oPages.GetbyIndex(n)
+ If oPage.HasElements then
+ For m = 0 to oPage.Count-1
+ oPageElement = oPage.GetByIndex(m)
+ If HasUnoInterfaces(oPageElement,&quot;com.sun.star.container.XIndexAccess&quot;) Then
+ &apos; The Object &quot;oPageElement&quot; a group of Shapes, that can be accessed by their index
+ For s = 0 To oPageElement.Count - 1
+ WriteStringToLogFile(oPageElement.GetByIndex(s).String)
+ Next s
+ ElseIf HasUnoInterfaces(oPageElement, &quot;com.sun.star.text.XText&quot;) Then
+ WriteStringtoLogFile(oPageElement.String)
+ End If
+ Next
+ End If
+ Next
+End Sub
+
+
+Sub GetDrawStrings()
+Dim oDPages, oMPages as Object
+
+ oDPages = oDocument.DrawPages
+ oMPages = oDocument.Masterpages
+
+ MakeLogHeadLine(&quot;Titles&quot;)
+ GetDrawPageTitles(oDPages)
+ GetDrawPageTitles(oMPages)
+
+ MakeLogHeadLine(&quot;Document Body&quot;)
+ GetPageStrings(oDPages)
+ GetPageStrings(oMPages)
+End Sub
+
+
+&apos; ***********************************************Misc**************************************************
+
+Sub GetDocumentProps()
+Dim oDocuProps as Object
+ MakeLogHeadLine(&quot;Document Properties&quot;)
+ oDocuProps = oDocument.DocumentProperties
+ WriteStringToLogFile(oDocuProps.Title)
+ WriteStringToLogFile(oDocuProps.Description)
+ WriteStringToLogFile(oDocuProps.Subject)
+ WriteStringToLogFile(oDocuProps.Author)
+&apos; WriteStringToLogFile(oDocuProps.UserDefinedProperties.ReplyTo)
+&apos; WriteStringToLogFile(oDocuProps.UserDefinedProperties.Recipient)
+&apos; WriteStringToLogFile(oDocuProps.UserDefinedProperties.References)
+&apos; WriteStringToLogFile(oDocuProps.Keywords)
+End Sub
+
+
+Sub GetHyperlinks()
+Dim i as integer
+Dim oCrsr as Object
+Dim oAllHyperLinks as Object
+Dim SrchAttributes(0) as new com.sun.star.beans.PropertyValue
+Dim oSearchDesc as Object
+
+ MakeLogHeadLine(&quot;Hyperlinks&quot;)
+ &apos; create a Search-Descriptor
+ oSearchDesc = oDocument.CreateSearchDescriptor
+ oSearchDesc.Valuesearch = False
+
+ &apos; define the Search-attributes
+ srchattributes(0).Name = &quot;HyperLinkURL&quot;
+ srchattributes(0).Value = &quot;&quot;
+ oSearchDesc.SetSearchAttributes(SrchAttributes())
+
+ oAllHyperLinks = oDocument.findAll(oSearchDesc())
+
+ For i = 0 to oAllHyperLinks.Count - 1
+ oFound = oAllHyperLinks(i)
+ oCrsr = oFound.Text.createTextCursorByRange(oFound)
+ WriteStringToLogFile(oCrs.HyperLinkURL) &apos;Url
+ WriteStringToLogFile(oCrs.HyperLinkTarget) &apos;Name
+ WriteStringToLogFile(oCrs.HyperLinkName) &apos;Frame
+ Next i
+End Sub
+
+
+Sub GetGraphicNames()
+Dim i as integer
+Dim oDocGraphics as Object
+ MakeLogHeadLine(&quot;Graphics&quot;)
+ oDocGraphics = oDocument.GraphicObjects
+ For i = 0 to oDocGraphics.count - 1
+ WriteStringtoLogFile(oDocGraphics.GetbyIndex(i).Name)
+ Next
+End Sub
+
+
+Sub GetStyles()
+Dim m,n as integer
+ MakeLogHeadLine(&quot;User-defined Templates&quot;)
+
+ &apos; Check all StyleFamilies(i.e. PageStyles, ParagraphStyles, CharacterStyles, cellStyles)
+ For n = 0 to oDocument.StyleFamilies.Count - 1
+ For m = 0 to oDocument.StyleFamilies.getbyIndex(n).Count-1
+ If oDocument.StyleFamilies.GetbyIndex(n).getbyIndex(m).IsUserDefined then
+ WriteStringtoLogFile(oDocument.StyleFamilies.GetbyIndex(n).getbyIndex(m).Name)
+ End If
+ Next
+ Next
+End Sub
+
+
+Sub GetControlStrings(oDPage as Object, HeaderLine as String)
+Dim aForm as Object
+Dim m,n as integer
+ MakeLogHeadLine(HeaderLine)
+ &apos;SearchFor all possible Controls
+ For n = 0 to oDPage.Forms.Count - 1
+ aForm = oDPage.Forms(n)
+ For m = 0 to aForm.Count-1
+ GetControlContent(aForm.GetbyIndex(m))
+ Next
+ Next
+End Sub
+
+
+Sub GetControlContent(LocControl as Object)
+Dim i as integer
+
+ If LocControl.PropertySetInfo.HasPropertybyName(&quot;Label&quot;) then
+ WriteStringtoLogFile(LocControl.Label)
+
+ ElseIf LocControl.SupportsService(&quot;com.sun.star.form.component.ListBox&quot;) then
+ For i = 0 to Ubound(LocControl.StringItemList())
+ WriteStringtoLogFile(LocControl.StringItemList(i))
+ Next
+ End If
+ If LocControl.PropertySetInfo.HasPropertybyName(&quot;HelpText&quot;) then
+ WriteStringtoLogFile(LocControl.Helptext)
+ End If
+End Sub
+
+&apos; ***********************************************LogDocument**************************************************
+
+Sub WriteStringtoLogFile( sString as String)
+ If (Not FieldInArray(LogArray(),LogIndex,sString))AND (NOT ISNULL(sString)) Then
+ LogArray(LogIndex) = sString
+ LogIndex = LogIndex + 1
+ oLogText.insertString(oLogCursor,sString,False)
+ oLogText.insertControlCharacter(oLogCursor,com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK,False)
+ End If
+End Sub
+
+
+Sub MakeLogHeadLine(HeadText as String)
+ oLogCursor.CharStyleName = &quot;Log Header&quot;
+ oLogText.insertControlCharacter(oLogCursor,com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK,False)
+ oLogText.insertString(oLogCursor,HeadText,False)
+ oLogText.insertControlCharacter(oLogCursor,com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK,False)
+ oLogCursor.CharStyleName = &quot;Log Body&quot;
+End Sub
+</script:module>
diff --git a/wizards/source/gimmicks/ReadDir.xba b/wizards/source/gimmicks/ReadDir.xba
new file mode 100644
index 000000000000..370f8cbc1915
--- /dev/null
+++ b/wizards/source/gimmicks/ReadDir.xba
@@ -0,0 +1,305 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="ReadDir" script:language="StarBasic">Option Explicit
+Public Const SBPAGEX = 800
+Public Const SBPAGEY = 800
+Public Const SBRELDIST = 1.3
+
+&apos; Names of the second Dimension of the Array iLevelPos
+Public Const SBBASEX = 0
+Public Const SBBASEY = 1
+
+Public Const SBOLDSTARTX = 2
+Public Const SBOLDSTARTY = 3
+
+Public Const SBOLDENDX = 4
+Public Const SBOLDENDY = 5
+
+Public Const SBNEWSTARTX = 6
+Public Const SBNEWSTARTY = 7
+
+Public Const SBNEWENDX = 8
+Public Const SBNEWENDY = 9
+
+Public ConnectLevel As Integer
+Public iLevelPos(1,9) As Long
+Public Source as String
+Public iCurLevel as Integer
+Public nConnectLevel as Integer
+Public nOldWidth, nOldHeight As Long
+Public nOldX, nOldY, nOldLevel As Integer
+Public oOldLeavingLine As Object
+Public oOldArrivingLine As Object
+Public DlgReadDir as Object
+Dim oProgressBar as Object
+Dim oDocument As Object
+Dim oPage As Object
+
+
+Sub Main()
+Dim oStandardTemplate as Object
+ BasicLibraries.LoadLibrary(&quot;Tools&quot;)
+ oDocument = CreateNewDocument(&quot;sdraw&quot;)
+ If Not IsNull(oDocument) Then
+ oPage = oDocument.DrawPages(0)
+ oStandardTemplate = oDocument.StyleFamilies.GetByName(&quot;graphics&quot;).GetByName(&quot;standard&quot;)
+ oStandardTemplate.CharHeight = 10
+ oStandardTemplate.TextLeftDistance = 100
+ oStandardTemplate.TextRightDistance = 100
+ oStandardTemplate.TextUpperDistance = 50
+ oStandardTemplate.TextLowerDistance = 50
+ DlgReadDir = LoadDialog(&quot;Gimmicks&quot;,&quot;ReadFolderDlg&quot;)
+ oProgressBar = DlgReadDir.Model.ProgressBar1
+ DlgReadDir.Model.TextField1.Text = ConvertFromUrl(GetPathSettings(&quot;Work&quot;))
+ DlgReadDir.Model.cmdGoOn.DefaultButton = True
+ DlgReadDir.GetControl(&quot;TextField1&quot;).SetFocus()
+ DlgReadDir.Execute
+ End If
+End Sub
+
+
+Sub TreeInfo()
+Dim oCurTextShape As Object
+Dim i as Integer
+Dim bStartUpRun As Boolean
+Dim CurFilename as String
+Dim BaseLevel as Integer
+Dim oController as Object
+Dim MaxFileIndex as Integer
+Dim FileNames() as String
+ ToggleDialogControls(False)
+ oProgressBar.ProgressValueMin = 0
+ oProgressBar.ProgressValueMax = 100
+ bStartUpRun = True
+ nOldHeight = 200
+ nOldY = SBPAGEY
+ nOldX = SBPAGEX
+ nOldWidth = SBPAGEX
+ oController = oDocument.GetCurrentController
+ Source = ConvertToURL(DlgReadDir.Model.TextField1.Text)
+ BaseLevel = CountCharsInString(Source, &quot;/&quot;, 1)
+ oProgressBar.ProgressValue = 5
+ DlgReadDir.Model.Label3.Enabled = True
+ FileNames() = ReadSourceDirectory(Source)
+ DlgReadDir.Model.Label4.Enabled = True
+ DlgReadDir.Model.Label3.Enabled = False
+ oProgressBar.ProgressValue = 12
+ FileNames() = BubbleSortList(FileNames())
+ DlgReadDir.Model.Label5.Enabled = True
+ DlgReadDir.Model.Label4.Enabled = False
+ oProgressBar.ProgressValue = 20
+ MaxFileIndex = Ubound(FileNames(),1)
+ For i = 0 To MaxFileIndex
+ oProgressBar.ProgressValue = 20 + (i/MaxFileIndex * 80)
+ CurFilename = FileNames(i,1)
+ SetNewLevels(FileNames(i,0), BaseLevel)
+ oCurTextShape = CreateTextShape(oPage, CurFilename)
+ CheckPageWidth(oCurTextShape.Size.Width)
+ iLevelPos(iCurLevel,SBBASEY) = oCurTextShape.Position.Y
+ If i = 0 Then
+ AdjustPageHeight(oCurTextShape.Size.Height, MaxFileIndex + 1)
+ End If
+ &apos; The Current TextShape has To be connected with a TextShape one Level higher
+ &apos; except for a TextShape In Level 0:
+ If Not bStartUpRun Then
+ &apos; A leaving Line Is only drawn when level is not 0
+ If iCurLevel&lt;&gt; 0 Then
+ &apos; Determine the Coordinates of the arriving Line
+ iLevelPos(iCurLevel,SBOLDSTARTX) = iLevelPos(nConnectLevel,SBNEWSTARTX)
+ iLevelPos(iCurLevel,SBOLDSTARTY) = oCurTextShape.Position.Y + 0.5 * oCurTextShape.Size.Height
+
+ iLevelPos(iCurLevel,SBOLDENDX) = iLevelPos(iCurLevel,SBBASEX)
+ iLevelPos(iCurLevel,SBOLDENDY) = oCurTextShape.Position.Y + 0.5 * oCurTextShape.Size.Height
+
+ oOldArrivingLine = DrawLine(iCurLevel, SBOLDSTARTX, SBOLDSTARTY, SBOLDENDX, SBOLDENDY, oPage)
+
+ &apos; Determine the End-Coordinates of the last leaving Line
+ iLevelPos(nConnectLevel,SBNEWENDX) = iLevelPos(nConnectLevel,SBNEWSTARTX)
+ iLevelPos(nConnectLevel,SBNEWENDY) = oCurTextShape.Position.Y + 0.5 * oCurTextShape.Size.Height
+ Else
+ &apos; On Level 0 the last Leaving Line&apos;s Endpoint is the upper edge of the TextShape
+ iLevelPos(nConnectLevel,SBNEWENDY) = oCurTextShape.Position.Y
+ iLevelPos(nConnectLevel,SBNEWENDX) = iLevelPos(nConnectLevel,SBNEWSTARTX)
+ End If
+ &apos; Draw the Connectors To the previous TextShapes
+ oOldLeavingLine = DrawLine(nConnectLevel, SBNEWSTARTX, SBNEWSTARTY, SBNEWENDX, SBNEWENDY, oPage)
+ Else
+ &apos; StartingPoint of the leaving Edge
+ bStartUpRun = FALSE
+ End If
+
+ &apos; Determine the beginning Coordinates of the leaving Line
+ iLevelPos(iCurLevel,SBNEWSTARTX) = iLevelPos(iCurLevel,SBBASEX) + 0.5 * oCurTextShape.Size.Width
+ iLevelPos(iCurLevel,SBNEWSTARTY) = iLevelPos(iCurLevel,SBBASEY) + oCurTextShape.Size.Height
+
+ &apos; Save the values For the Next run
+ nOldHeight = oCurTextShape.Size.Height
+ nOldX = oCurTextShape.Position.X
+ nOldWidth = oCurTextShape.Size.Width
+ nOldLevel = iCurLevel
+ Next i
+ ToggleDialogControls(True)
+ DlgReadDir.Model.cmdGoOn.Enabled = False
+End Sub
+
+
+Function CreateTextShape(oPage as Object, Filename as String)
+Dim oTextShape As Object
+Dim aPoint As New com.sun.star.awt.Point
+
+ aPoint.X = CalculateXPoint()
+ aPoint.Y = nOldY + SBRELDIST * nOldHeight
+ nOldY = aPoint.Y
+
+ oTextShape = oDocument.createInstance(&quot;com.sun.star.drawing.TextShape&quot;)
+ oTextShape.LineStyle = 1
+ oTextShape.Position = aPoint
+
+ oPage.add(oTextShape)
+ oTextShape.TextAutoGrowWidth = TRUE
+ oTextShape.TextAutoGrowHeight = TRUE
+ oTextShape.String = FileName
+
+ &apos; Configure Size And Position of the TextShape according to its Scripting
+ aPoint.X = iLevelPos(iCurLevel,SBBASEX)
+ oTextShape.Position = aPoint
+ CreateTextShape() = oTextShape
+End Function
+
+
+Function CalculateXPoint()
+ &apos; The current level Is lower than the Old one
+ If (iCurLevel&lt; nOldLevel) And (iCurLevel&lt;&gt; 0) Then
+ &apos; ClearArray(iLevelPos(),iCurLevel+1)
+ Elseif iCurLevel= 0 Then
+ iLevelPos(iCurLevel,SBBASEX) = SBPAGEX
+ &apos; The current level Is higher than the old one
+ Elseif iCurLevel&gt; nOldLevel Then
+ iLevelPos(iCurLevel,SBBASEX) = iLevelPos(iCurLevel-1,SBBASEX) + nOldWidth + 100
+ End If
+ CalculateXPoint = iLevelPos(iCurLevel,SBBASEX)
+End Function
+
+
+Function DrawLine(nLevel, nStartX, nStartY, nEndX, nEndY As Integer, oPage as Object)
+Dim oConnect As Object
+Dim aPoint As New com.sun.star.awt.Point
+Dim aSize As New com.sun.star.awt.Size
+ aPoint.X = iLevelPos(nLevel,nStartX)
+ aPoint.Y = iLevelPos(nLevel,nStartY)
+ aSize.Width = iLevelPos(nLevel,nEndX) - iLevelPos(nLevel,nStartX)
+ aSize.Height = iLevelPos(nLevel,nEndY) - iLevelPos(nLevel,nStartY)
+ oConnect = oDocument.createInstance(&quot;com.sun.star.drawing.LineShape&quot;)
+ oConnect.Position = aPoint
+ oConnect.Size = aSize
+ oPage.Add(oConnect)
+ DrawLine() = oConnect
+End Function
+
+
+Sub GetSourceDirectory()
+ GetFolderName(DlgReadDir.Model.TextField1)
+End Sub
+
+
+Function ReadSourceDirectory(ByVal Source As String)
+Dim i as Integer
+Dim m as Integer
+Dim n as Integer
+Dim s as integer
+Dim FileName as string
+Dim FileNameList(100,1) as String
+Dim DirList(0) as String
+Dim oUCBobject as Object
+Dim DirContent() as String
+Dim SystemPath as String
+Dim PathSeparator as String
+Dim MaxFileIndex as Integer
+ PathSeparator = GetPathSeparator()
+ oUcbobject = createUnoService(&quot;com.sun.star.ucb.SimpleFileAccess&quot;)
+ m = 0
+ s = 0
+ DirList(0) = Source
+ FileNameList(n,0) = Source
+ SystemPath = ConvertFromUrl(Source)
+ FileNameList(n,1) = FileNameoutofPath(SystemPath, PathSeparator)
+ n = 1
+ Do
+ Source = DirList(m)
+ m = m + 1
+ DirContent() = oUcbObject.GetFolderContents(Source,True)
+ If Ubound(DirContent()) &lt;&gt; -1 Then
+ MaxFileIndex = Ubound(DirContent())
+ For i = 0 to MaxFileIndex
+ FileName = DirContent(i)
+ FileNameList(n,0) = FileName
+ SystemPath = ConvertFromUrl(FileName)
+ FileNameList(n,1) = FileNameOutofPath(SystemPath, PathSeparator)
+ n = n + 1
+ If n &gt; Ubound(FileNameList(),1) Then
+ ReDim Preserve FileNameList(n + 10,1) as String
+ End If
+ If oUcbObject.IsFolder(FileName) Then
+ s = s + 1
+ ReDim Preserve DirList(s) as String
+ DirList(s) = FileName
+ End If
+ Next i
+ End If
+ Loop Until m &gt; Ubound(DirList()
+ ReDim Preserve FileNameList(n-1,1) as String
+ ReadSourceDirectory() = FileNameList()
+End Function
+
+
+Sub CloseDialog
+ DlgReadDir.EndExecute
+End Sub
+
+
+Sub AdjustPageHeight(lShapeHeight, FileCount)
+Dim lNecHeight as Long
+Dim lBorders as Long
+ oDocument.LockControllers
+ lBorders = oPage.BorderTop + oPage.BorderBottom
+ lNecHeight = SBPAGEY + (FileCount * SBRELDIST * lShapeHeight)
+ If lNecHeight &gt; (oPage.Height - lBorders) Then
+ oPage.Height = lNecHeight + lBorders + 500
+ End If
+ oDocument.UnlockControllers
+End Sub
+
+
+Sub SetNewLevels(FileName as String, BaseLevel as Integer)
+ iCurLevel= CountCharsInString(FileName, &quot;/&quot;, 1) - BaseLevel
+ If iCurLevel &lt;&gt; 0 Then
+ nConnectLevel = iCurLevel- 1
+ Else
+ nConnectLevel = iCurLevel
+ End If
+ If iCurLevel &gt; Ubound(iLevelPos(),1) Then
+ ReDim Preserve iLevelPos(iCurLevel,9) as Long
+ End If
+End Sub
+
+
+Sub CheckPageWidth(TextWidth as Long)
+Dim PageWidth as Long
+Dim BaseX as Long
+ PageWidth = oPage.Width
+ BaseX = iLevelPos(iCurLevel,SBBASEX)
+ If BaseX + TextWidth &gt; PageWidth - 1000 Then
+ oPage.Width = 1000 + BaseX + TextWidth
+ End If
+End Sub
+
+
+Sub ToggleDialogControls(bDoEnable as Boolean)
+ With DlgReadDir.Model
+ .cmdGoOn.Enabled = bDoEnable
+ .cmdGetDir.Enabled = bDoEnable
+ .Label1.Enabled = bDoEnable
+ .Label2.Enabled = bDoEnable
+ .TextField1.Enabled = bDoEnable
+ End With
+End Sub</script:module> \ No newline at end of file
diff --git a/wizards/source/gimmicks/ReadFolderDlg.xdl b/wizards/source/gimmicks/ReadFolderDlg.xdl
new file mode 100644
index 000000000000..e49127db2f13
--- /dev/null
+++ b/wizards/source/gimmicks/ReadFolderDlg.xdl
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
+<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="ReadFolderDlg" dlg:left="161" dlg:top="81" dlg:width="180" dlg:height="136" dlg:closeable="true" dlg:moveable="true" dlg:title="Read and Design Recursively">
+ <dlg:bulletinboard>
+ <dlg:button dlg:id="cmdGetDir" dlg:tab-index="0" dlg:left="161" dlg:top="49" dlg:width="14" dlg:height="14" dlg:value="...">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Gimmicks.ReadDir.GetSourceDirectory?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:textfield dlg:id="TextField1" dlg:tab-index="1" dlg:left="6" dlg:top="50" dlg:width="147" dlg:height="12"/>
+ <dlg:button dlg:id="cmdCancel" dlg:tab-index="2" dlg:left="49" dlg:top="115" dlg:width="35" dlg:height="14" dlg:value="~Cancel">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Gimmicks.ReadDir.CloseDialog?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:button dlg:id="cmdGoOn" dlg:tab-index="3" dlg:left="95" dlg:top="115" dlg:width="35" dlg:height="14" dlg:value="~GoOn">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Gimmicks.ReadDir.TreeInfo?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:text dlg:id="Label1" dlg:tab-index="4" dlg:left="6" dlg:top="38" dlg:width="122" dlg:height="8" dlg:value="Top level path"/>
+ <dlg:text dlg:id="Label2" dlg:tab-index="5" dlg:left="6" dlg:top="4" dlg:width="168" dlg:height="26" dlg:value="This macro will create a drawing document and design a complete tree view of all subdirectories from a given path." dlg:multiline="true"/>
+ <dlg:progressmeter dlg:id="ProgressBar1" dlg:tab-index="6" dlg:left="6" dlg:top="101" dlg:width="170" dlg:height="10"/>
+ <dlg:text dlg:id="Label3" dlg:tab-index="7" dlg:disabled="true" dlg:left="6" dlg:top="69" dlg:width="170" dlg:height="8" dlg:value="Getting the files and subdirectories..."/>
+ <dlg:text dlg:id="Label4" dlg:tab-index="8" dlg:disabled="true" dlg:left="6" dlg:top="80" dlg:width="170" dlg:height="8" dlg:value="Sorting the files and subdirectories..."/>
+ <dlg:text dlg:id="Label5" dlg:tab-index="9" dlg:disabled="true" dlg:left="6" dlg:top="91" dlg:width="170" dlg:height="8" dlg:value="Drawing the filestructure..."/>
+ </dlg:bulletinboard>
+</dlg:window> \ No newline at end of file
diff --git a/wizards/source/gimmicks/UserfieldDlg.xdl b/wizards/source/gimmicks/UserfieldDlg.xdl
new file mode 100644
index 000000000000..408f3c8be305
--- /dev/null
+++ b/wizards/source/gimmicks/UserfieldDlg.xdl
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
+<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="UserfieldDlg" dlg:left="161" dlg:top="57" dlg:width="281" dlg:height="214" dlg:closeable="true" dlg:moveable="true" dlg:title="Modify User Data">
+ <dlg:bulletinboard>
+ <dlg:text dlg:id="Label1" dlg:tab-index="0" dlg:left="6" dlg:top="48" dlg:width="57" dlg:height="8" dlg:value="Label1"/>
+ <dlg:text dlg:id="Label2" dlg:tab-index="1" dlg:left="6" dlg:top="64" dlg:width="57" dlg:height="8" dlg:value="Label2"/>
+ <dlg:text dlg:id="Label3" dlg:tab-index="2" dlg:left="6" dlg:top="80" dlg:width="57" dlg:height="8" dlg:value="Label3"/>
+ <dlg:text dlg:id="Label4" dlg:tab-index="3" dlg:left="6" dlg:top="96" dlg:width="57" dlg:height="8" dlg:value="Label4"/>
+ <dlg:text dlg:id="Label5" dlg:tab-index="4" dlg:left="6" dlg:top="112" dlg:width="57" dlg:height="8" dlg:value="Label5"/>
+ <dlg:text dlg:id="Label6" dlg:tab-index="5" dlg:left="6" dlg:top="128" dlg:width="57" dlg:height="8" dlg:value="Label6"/>
+ <dlg:text dlg:id="Label7" dlg:tab-index="6" dlg:left="6" dlg:top="144" dlg:width="57" dlg:height="8" dlg:value="Label7"/>
+ <dlg:text dlg:id="Label8" dlg:tab-index="7" dlg:left="6" dlg:top="160" dlg:width="57" dlg:height="8" dlg:value="Label8"/>
+ <dlg:text dlg:id="Label9" dlg:tab-index="8" dlg:left="6" dlg:top="176" dlg:width="57" dlg:height="8" dlg:value="Label9"/>
+ <dlg:textfield dlg:id="TextField1" dlg:tab-index="9" dlg:left="65" dlg:top="46" dlg:width="193" dlg:height="12"/>
+ <dlg:textfield dlg:id="TextField2" dlg:tab-index="10" dlg:left="65" dlg:top="62" dlg:width="193" dlg:height="12"/>
+ <dlg:textfield dlg:id="TextField3" dlg:tab-index="11" dlg:left="65" dlg:top="78" dlg:width="193" dlg:height="12"/>
+ <dlg:textfield dlg:id="TextField4" dlg:tab-index="12" dlg:left="65" dlg:top="94" dlg:width="193" dlg:height="12"/>
+ <dlg:textfield dlg:id="TextField5" dlg:tab-index="13" dlg:left="65" dlg:top="110" dlg:width="193" dlg:height="12"/>
+ <dlg:textfield dlg:id="TextField6" dlg:tab-index="14" dlg:left="65" dlg:top="126" dlg:width="193" dlg:height="12"/>
+ <dlg:textfield dlg:id="TextField7" dlg:tab-index="15" dlg:left="65" dlg:top="142" dlg:width="193" dlg:height="12"/>
+ <dlg:textfield dlg:id="TextField8" dlg:tab-index="16" dlg:left="65" dlg:top="158" dlg:width="193" dlg:height="12"/>
+ <dlg:textfield dlg:id="TextField9" dlg:tab-index="17" dlg:left="65" dlg:top="174" dlg:width="193" dlg:height="12"/>
+ <dlg:scrollbar dlg:id="ScrollBar1" dlg:tab-index="18" dlg:left="263" dlg:top="46" dlg:width="12" dlg:height="140" dlg:align="vertical">
+ <script:event script:event-name="on-adjustmentvaluechange" script:macro-name="vnd.sun.star.script:Gimmicks.Userfields.ScrollControls?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:scrollbar>
+ <dlg:button dlg:id="cmdQuit" dlg:tab-index="19" dlg:left="6" dlg:top="193" dlg:width="35" dlg:height="14" dlg:help-text="Exit Macro" dlg:value="Exit">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Gimmicks.Userfields.StopMacro?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:button dlg:id="cmdSave" dlg:tab-index="20" dlg:left="45" dlg:top="193" dlg:width="35" dlg:height="14" dlg:help-text="Save All Data of All Users to File" dlg:value="~Save">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Gimmicks.Userfields.SaveSettings?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:button dlg:id="cmdSelect" dlg:tab-index="21" dlg:left="84" dlg:top="193" dlg:width="35" dlg:height="14" dlg:help-text="Replace the User Data in &lt;PRODUCTNAME&gt; With the User Data Above" dlg:value="Se~lect">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Gimmicks.Userfields.SelectCurrentFields?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:button dlg:id="cmdNextUser" dlg:tab-index="22" dlg:left="162" dlg:top="193" dlg:width="35" dlg:height="14" dlg:tag="1" dlg:help-text="Show Data of Next User" dlg:value="Next &gt;&gt;">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Gimmicks.Userfields.StepToRecord?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:button dlg:id="cmdPrevUser" dlg:tab-index="23" dlg:left="123" dlg:top="193" dlg:width="35" dlg:height="14" dlg:tag="-1" dlg:help-text="Show Data of Previous User" dlg:value="&lt;&lt;Previous">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Gimmicks.Userfields.StepToRecord?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:button dlg:id="CommandButton1" dlg:tab-index="24" dlg:left="201" dlg:top="193" dlg:width="35" dlg:height="14" dlg:help-text="Add Data for New User" dlg:value="~New">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Gimmicks.Userfields.AddRecord?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:text dlg:id="Label10" dlg:tab-index="25" dlg:left="6" dlg:top="6" dlg:width="269" dlg:height="34" dlg:value="This macro lets you easily administrate several user profiles.&#x0a;The user data of several users may be stored in a single file in the directory &lt;ConfigDir&gt;. From there, you can select a particular user whose data is then the current user data in &lt;PRODUCTNAME&gt;." dlg:multiline="true"/>
+ <dlg:button dlg:id="cmdDelete" dlg:tab-index="26" dlg:left="240" dlg:top="193" dlg:width="35" dlg:height="14" dlg:help-text="Delete Data of Current User" dlg:value="Delete">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Gimmicks.Userfields.DeleteCurrentSettings?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ </dlg:bulletinboard>
+</dlg:window> \ No newline at end of file
diff --git a/wizards/source/gimmicks/Userfields.xba b/wizards/source/gimmicks/Userfields.xba
new file mode 100644
index 000000000000..391337c6a357
--- /dev/null
+++ b/wizards/source/gimmicks/Userfields.xba
@@ -0,0 +1,219 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Userfields" script:language="StarBasic">Option Explicit
+&apos;Todo: Controlling Scrollbar via Keyboard
+
+Public Const SBMAXFIELDINDEX = 14
+
+Public DlgUserFields as Object
+Public oDocument as Object
+Public UserFieldDataType(SBMAXFIELDINDEX,1) as String
+Public ScrollBarValue as Integer
+Public UserFieldFamily(0, SBMAXfIELDINDEX) as String
+Public Const SBTBCOUNT = 9
+Public oUserDataAccess as Object
+Public CurFieldIndex as Integer
+Public FilePath as String
+
+Sub StartChangesUserfields
+Dim SystemPath as String
+ BasicLibraries.LoadLibrary(&quot;Tools&quot;)
+ UserFieldDatatype(0,0) = &quot;COMPANY&quot;
+ UserFieldDatatype(0,1) = &quot;o&quot;
+ UserFieldDatatype(1,0) = &quot;FIRSTNAME&quot;
+ UserFieldDatatype(1,1) = &quot;givenname&quot;
+ UserFieldDatatype(2,0) = &quot;LASTNAME&quot;
+ UserFieldDatatype(2,1) = &quot;sn&quot;
+ UserFieldDatatype(3,0) = &quot;INITIALS&quot;
+ UserFieldDatatype(3,1) = &quot;initials&quot;
+ UserFieldDatatype(4,0) = &quot;STREET&quot;
+ UserFieldDatatype(4,1) = &quot;street&quot;
+ UserFieldDatatype(5,0) = &quot;COUNTRY&quot;
+ UserFieldDatatype(5,1) = &quot;c&quot;
+ UserFieldDatatype(6,0) = &quot;ZIP&quot;
+ UserFieldDatatype(6,1) = &quot;postalcode&quot;
+ UserFieldDatatype(7,0) = &quot;CITY&quot;
+ UserFieldDatatype(7,1) = &quot;l&quot;
+ UserFieldDatatype(8,0) = &quot;TITLE&quot;
+ UserFieldDatatype(8,1) = &quot;title&quot;
+ UserFieldDatatype(9,0) = &quot;POSITION&quot;
+ UserFieldDatatype(9,1) = &quot;position&quot;
+ UserFieldDatatype(10,0) = &quot;PHONE_HOME&quot;
+ UserFieldDatatype(10,1) = &quot;homephone&quot;
+ UserFieldDatatype(11,0) = &quot;PHONE_WORK&quot;
+ UserFieldDatatype(11,1) = &quot;telephonenumber&quot;
+ UserFieldDatatype(12,0) = &quot;FAX&quot;
+ UserFieldDatatype(12,1) = &quot;facsimiletelephonenumber&quot;
+ UserFieldDatatype(13,0) = &quot;E-MAIL&quot;
+ UserFieldDatatype(13,1) = &quot;mail&quot;
+ UserFieldDatatype(14,0) = &quot;STATE&quot;
+ UserFieldDatatype(14,1) = &quot;st&quot;
+ FilePath = GetPathSettings(&quot;Config&quot;, False) &amp; &quot;/&quot; &amp; &quot;UserData.dat&quot;
+ DlgUserFields = LoadDialog(&quot;Gimmicks&quot;,&quot;UserfieldDlg&quot;)
+ SystemPath = ConvertFromUrl(FilePath)
+ DlgUserFields.Model.Label10.Label = ReplaceString(DlgUserFields.Model.Label10.Label, &quot;&apos;&quot; &amp; SystemPath &amp; &quot;&apos;&quot;, &quot;&lt;ConfigDir&gt;&quot;)
+ DlgUserFields.Model.Label10.Label = ReplaceString(DlgUserFields.Model.Label10.Label, GetProductName(), &quot;&lt;PRODUCTNAME&gt;&quot;)
+ DlgUserFields.Model.cmdSelect.HelpText = ReplaceString(DlgUserFields.Model.cmdSelect.HelpText, GetProductName(), &quot;&lt;PRODUCTNAME&gt;&quot;)
+ ScrollBarValue = 0
+ oUserDataAccess = GetRegistryKeyContent(&quot;org.openoffice.UserProfile/Data&quot;, True)
+ InitializeUserFamily()
+ FillDialog()
+ DlgUserFields.Execute
+ DlgUserFields.Dispose()
+End Sub
+
+
+Sub FillDialog()
+Dim a as Integer
+ With DlgUserFields
+ For a = 1 To SBTBCount
+ .GetControl(&quot;Label&quot; &amp; a).Model.Label = UserFieldDataType(a-1,0)
+ .GetControl(&quot;TextField&quot; &amp; a).Model.Text = UserFieldFamily(CurFieldIndex, a-1)
+ Next a
+ .Model.ScrollBar1.ScrollValueMax = (SBMAXFIELDINDEX+1) - SBTBCOUNT
+ .Model.ScrollBar1.BlockIncrement = SBTBCOUNT
+ .Model.ScrollBar1.LineIncrement = 1
+ .Model.ScrollBar1.ScrollValue = ScrollBarValue
+ End With
+End Sub
+
+
+Sub ScrollControls()
+ ScrollTextFieldInfo(ScrollBarValue)
+ ScrollBarValue = DlgUserFields.Model.ScrollBar1.ScrollValue
+ If (ScrollBarValue + SBTBCOUNT) &gt;= SBMAXFIELDINDEX + 1 Then
+ ScrollBarValue = (SBMAXFIELDINDEX + 1) - SBTBCOUNT
+ End If
+ FillupTextFields()
+End Sub
+
+
+Sub ScrollTextFieldInfo(ByVal iScrollValue as Integer)
+Dim a as Integer
+Dim CurIndex as Integer
+ For a = 1 To SBTBCOUNT
+ CurIndex = (a-1) + iScrollValue
+ UserFieldFamily(CurFieldIndex,CurIndex) = DlgUserFields.GetControl(&quot;TextField&quot; &amp; a).Model.Text
+ Next a
+End Sub
+
+
+Sub StopMacro()
+ DlgUserFields.EndExecute
+End Sub
+
+
+Sub SaveSettings()
+Dim n as Integer
+Dim m as Integer
+Dim MaxIndex as Integer
+ ScrollTextFieldInfo(DlgUserFields.Model.ScrollBar1.ScrollValue)
+ MaxIndex = Ubound(UserFieldFamily(), 1)
+ Dim FileStrings(MaxIndex) as String
+ For n = 0 To MaxIndex
+ FileStrings(n) = &quot;&quot;
+ For m = 0 To SBMAXFIELDINDEX
+ FileStrings(n) = FileStrings(n) &amp; UserFieldFamily(n,m) &amp; &quot;;&quot;
+ Next m
+ Next n
+ SaveDataToFile(FilePath, FileStrings(), True)
+End Sub
+
+
+Sub ToggleButtons(ByVal Index as Integer)
+Dim i as Integer
+ CurFieldIndex = Index
+ DlgUserFields.Model.cmdNextUser.Enabled = CurFieldIndex &lt;&gt; Ubound(UserFieldFamily(), 1)
+ DlgUserFields.Model.cmdPrevUser.Enabled = CurFieldIndex &lt;&gt; 0
+End Sub
+
+
+Sub InitializeUserFamily()
+Dim FirstIndex as Integer
+Dim UserFieldstrings() as String
+Dim LocStrings() as String
+Dim bFileExists as Boolean
+Dim n as Integer
+Dim m as Integer
+ bFileExists = LoadDataFromFile(GetPathSettings(&quot;Config&quot;, False) &amp; &quot;/&quot; &amp; &quot;UserData.dat&quot;, UserFieldStrings())
+ If bFileExists Then
+ FirstIndex = Ubound(UserFieldStrings())
+ ReDim Preserve UserFieldFamily(FirstIndex, SBMAXFIELDINDEX) as String
+ For n = 0 To FirstIndex
+ LocStrings() = ArrayOutofString(UserFieldStrings(n), &quot;;&quot;)
+ For m = 0 To SBMAXFIELDINDEX
+ UserFieldFamily(n,m) = LocStrings(m)
+ Next m
+ Next n
+ Else
+ ReDim Preserve UserFieldFamily(0,SBMAXFIELDINDEX) as String
+ For m = 0 To SBMAXFIELDINDEX
+ UserFieldFamily(0,m) = oUserDataAccess.GetByName(UserFieldDataType(m,1))
+ Next m
+ End If
+ ToggleButtons(0)
+End Sub
+
+
+Sub AddRecord()
+Dim i as Integer
+Dim MaxIndex as Integer
+ For i = 1 To SBTBCount
+ DlgUserFields.GetControl(&quot;TextField&quot; &amp; i).Model.Text = &quot;&quot;
+ Next i
+ MaxIndex = Ubound(UserFieldFamily(),1)
+ ReDim Preserve UserFieldFamily(MaxIndex + 1, SBMAXFIELDINDEX) as String
+ ToggleButtons(MaxIndex + 1, 1)
+End Sub
+
+
+Sub FillupTextFields()
+Dim a as Integer
+Dim CurIndex as Integer
+ For a = 1 To SBTBCOUNT
+ CurIndex = (a-1) + ScrollBarValue
+ DlgUserFields.GetControl(&quot;Label&quot; &amp; a).Model.Label = UserFieldDataType(CurIndex,0)
+ DlgUserFields.GetControl(&quot;TextField&quot; &amp; a).Model.Text = UserFieldFamily(CurFieldIndex, CurIndex)
+ Next a
+End Sub
+
+
+Sub StepToRecord(aEvent as Object)
+Dim iStep as Integer
+ iStep = CInt(aEvent.Source.Model.Tag)
+ ScrollTextFieldInfo(ScrollBarValue)
+ ToggleButtons(CurFieldIndex + iStep)
+ FillUpTextFields()
+End Sub
+
+
+Sub SelectCurrentFields()
+Dim MaxIndex as Integer
+Dim i as Integer
+ ScrollTextFieldInfo(ScrollBarValue)
+ MaxIndex = Ubound(UserFieldFamily(),2)
+ For i = 0 To MaxIndex
+ oUserDataAccess.ReplaceByName(UserFieldDataType(i,1), UserFieldFamily(CurFieldIndex, i))
+ Next i
+ oUserDataAccess.commitChanges()
+End Sub
+
+
+Sub DeleteCurrentSettings()
+Dim n as Integer
+Dim m as Integer
+Dim MaxIndex as Integer
+ MaxIndex = Ubound(UserFieldFamily(),1)
+ If CurFieldIndex &lt; MaxIndex Then
+ For n = CurFieldIndex To MaxIndex - 1
+ For m = 0 To SBMAXFIELDINDEX
+ UserFieldFamily(n,m) = UserFieldFamily(n + 1,m)
+ Next m
+ Next n
+ Else
+ CurFieldIndex = MaxIndex - 1
+ End If
+ ReDim Preserve UserFieldFamily(MaxIndex-1, SBMAXfIELDINDEX) as String
+ FillupTextFields()
+ ToggleButtons(CurFieldIndex)
+End Sub</script:module> \ No newline at end of file
diff --git a/wizards/source/gimmicks/delzip b/wizards/source/gimmicks/delzip
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/wizards/source/gimmicks/delzip
diff --git a/wizards/source/gimmicks/dialog.xlb b/wizards/source/gimmicks/dialog.xlb
new file mode 100644
index 000000000000..22271dacb14b
--- /dev/null
+++ b/wizards/source/gimmicks/dialog.xlb
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="Gimmicks" library:readonly="false" library:passwordprotected="false">
+ <library:element library:name="UserfieldDlg"/>
+ <library:element library:name="ReadFolderDlg"/>
+</library:library>
diff --git a/wizards/source/gimmicks/makefile.mk b/wizards/source/gimmicks/makefile.mk
new file mode 100644
index 000000000000..de083f52e88d
--- /dev/null
+++ b/wizards/source/gimmicks/makefile.mk
@@ -0,0 +1,46 @@
+#*************************************************************************
+#
+# 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.
+#
+#*************************************************************************
+PRJ=..$/..
+
+PRJNAME=wizards
+TARGET=gimmicks
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+.INCLUDE : $(PRJ)$/util$/target.pmk
+
+# --- Files --------------------------------------------------------
+
+
+ZIP1TARGET = $(GIMMICKS_ALL_TARGET)
+ZIP1LIST = *.xdl *.xba *.xlb
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
+
diff --git a/wizards/source/gimmicks/readdirs.dlg b/wizards/source/gimmicks/readdirs.dlg
new file mode 100644
index 000000000000..20a89426d678
--- /dev/null
+++ b/wizards/source/gimmicks/readdirs.dlg
Binary files differ
diff --git a/wizards/source/gimmicks/script.xlb b/wizards/source/gimmicks/script.xlb
new file mode 100644
index 000000000000..5c820ba43e0c
--- /dev/null
+++ b/wizards/source/gimmicks/script.xlb
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="Gimmicks" library:readonly="false" library:passwordprotected="false">
+ <library:element library:name="GetTexts"/>
+ <library:element library:name="Userfields"/>
+ <library:element library:name="ChangeAllChars"/>
+ <library:element library:name="AutoText"/>
+ <library:element library:name="ReadDir"/>
+</library:library>
diff --git a/wizards/source/imagelists/imagelists.src b/wizards/source/imagelists/imagelists.src
new file mode 100644
index 000000000000..830c365ca4e4
--- /dev/null
+++ b/wizards/source/imagelists/imagelists.src
@@ -0,0 +1,215 @@
+/*************************************************************************
+ *
+ * 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.
+ *
+ ************************************************************************/
+#define REPORTWIZARD_BASE 1000
+#define FORMWIZARD_BASE 1100
+#define WEBWIZARD_BASE 1200
+
+#define IMG_REPORT_ORIENTATION_PORTRAIT REPORTWIZARD_BASE + 0
+Image IMG_REPORT_ORIENTATION_PORTRAIT
+{
+ ImageBitmap = Bitmap { File = "portrait_32.png"; };
+};
+
+#define IMG_REPORT_ORIENTATION_PORTRAIT_HC REPORTWIZARD_BASE + 1
+Image IMG_REPORT_ORIENTATION_PORTRAIT_HC
+{
+ ImageBitmap = Bitmap { File = "portrait_32_h.png"; };
+};
+
+#define IMG_REPORT_ORIENTATION_LANDSCAPE REPORTWIZARD_BASE + 2
+Image IMG_REPORT_ORIENTATION_LANDSCAPE
+{
+ ImageBitmap = Bitmap { File = "landscape_32.png"; };
+};
+
+#define IMG_REPORT_ORIENTATION_LANDSCAPE_HC REPORTWIZARD_BASE + 3
+Image IMG_REPORT_ORIENTATION_LANDSCAPE_HC
+{
+ ImageBitmap = Bitmap { File = "landscape_32_h.png"; };
+};
+
+#define IMG_FORM_ARRANGELISTSIDE FORMWIZARD_BASE + 0
+Image IMG_FORM_ARRANGELISTSIDE
+{
+ ImageBitmap = Bitmap { File = "formarrangelistside_42.png"; };
+};
+
+#define IMG_FORM_ARRANGELISTSIDE_HC FORMWIZARD_BASE + 1
+Image IMG_FORM_ARRANGELISTSIDE_HC
+{
+ ImageBitmap = Bitmap { File = "formarrangelistside_42_h.png"; };
+};
+
+#define IMG_FORM_ARRANGELISTTOP FORMWIZARD_BASE + 2
+Image IMG_FORM_ARRANGELISTTOP
+{
+ ImageBitmap = Bitmap { File = "formarrangelisttop_42.png"; };
+};
+
+#define IMG_FORM_ARRANGELISTTOP_HC FORMWIZARD_BASE + 3
+Image IMG_FORM_ARRANGELISTTOP_HC
+{
+ ImageBitmap = Bitmap { File = "formarrangelisttop_42_h.png"; };
+};
+
+#define IMG_FORM_ARRANGETABLE FORMWIZARD_BASE + 4
+Image IMG_FORM_ARRANGETABLE
+{
+ ImageBitmap = Bitmap { File = "formarrangetable_42.png"; };
+};
+
+#define IMG_FORM_ARRANGETABLE_HC FORMWIZARD_BASE + 5
+Image IMG_FORM_ARRANGETABLE_HC
+{
+ ImageBitmap = Bitmap { File = "formarrangetable_42_h.png"; };
+};
+
+
+#define IMG_FORM_ARRANGEFREE FORMWIZARD_BASE + 6
+Image IMG_FORM_ARRANGEFREE
+{
+ ImageBitmap = Bitmap { File = "formarrangefree_42.png"; };
+};
+
+#define IMG_FORM_ARRANGEFREE_HC FORMWIZARD_BASE + 7
+Image IMG_FORM_ARRANGEFREE_HC
+{
+ ImageBitmap = Bitmap { File = "formarrangefree_42_h.png"; };
+};
+
+
+#define IMG_WEB_LAYOUT_TABLE3 WEBWIZARD_BASE + 0
+Image IMG_WEB_LAYOUT_TABLE3
+{
+ ImageBitmap = Bitmap { File = "table_3.png"; };
+};
+
+#define IMG_WEB_LAYOUT_TABLE3_HC WEBWIZARD_BASE + 1
+Image IMG_WEB_LAYOUT_TABLE3_HC
+{
+ ImageBitmap = Bitmap { File = "table_3_h.png"; };
+};
+
+
+#define IMG_WEB_LAYOUT_TABLE2 WEBWIZARD_BASE + 2
+Image IMG_WEB_LAYOUT_TABLE2
+{
+ ImageBitmap = Bitmap { File = "table_2.png"; };
+};
+
+
+#define IMG_WEB_LAYOUT_TABLE2_HC WEBWIZARD_BASE + 3
+Image IMG_WEB_LAYOUT_TABLE2_HC
+{
+ ImageBitmap = Bitmap { File = "table_2_h.png"; };
+};
+
+
+#define IMG_WEB_LAYOUT_SIMPLE WEBWIZARD_BASE + 4
+Image IMG_WEB_LAYOUT_SIMPLE
+{
+ ImageBitmap = Bitmap { File = "simple.png"; };
+};
+
+#define IMG_WEB_LAYOUT_SIMPLE_HC WEBWIZARD_BASE + 5
+Image IMG_WEB_LAYOUT_SIMPLE_HC
+{
+ ImageBitmap = Bitmap { File = "simple_h.png"; };
+};
+
+#define IMG_WEB_LAYOUT_DIAGONAL WEBWIZARD_BASE + 6
+Image IMG_WEB_LAYOUT_DIAGONAL
+{
+ ImageBitmap = Bitmap { File = "diagonal.png"; };
+};
+
+#define IMG_WEB_LAYOUT_DIAGONAL_HC WEBWIZARD_BASE + 7
+Image IMG_WEB_LAYOUT_DIAGONAL_HC
+{
+ ImageBitmap = Bitmap { File = "diagonal_h.png"; };
+};
+
+#define IMG_WEB_LAYOUT_ZIGZAG WEBWIZARD_BASE + 8
+Image IMG_WEB_LAYOUT_ZIGZAG
+{
+ ImageBitmap = Bitmap { File = "zigzag.png"; };
+};
+
+#define IMG_WEB_LAYOUT_ZIGZAG_HC WEBWIZARD_BASE + 9
+Image IMG_WEB_LAYOUT_ZIGZAG_HC
+{
+ ImageBitmap = Bitmap { File = "zigzag_h.png"; };
+};
+
+#define IMG_WEB_LAYOUT_FRAMELEFT WEBWIZARD_BASE + 10
+Image IMG_WEB_LAYOUT_FRAMELEFT
+{
+ ImageBitmap = Bitmap { File = "frame_left.png"; };
+};
+
+#define IMG_WEB_LAYOUT_FRAMELEFT_HC WEBWIZARD_BASE + 11
+Image IMG_WEB_LAYOUT_FRAMELEFT_HC
+{
+ ImageBitmap = Bitmap { File = "frame_left_h.png"; };
+};
+
+#define IMG_WEB_LAYOUT_FRAMERIGHT WEBWIZARD_BASE + 12
+Image IMG_WEB_LAYOUT_FRAMERIGHT
+{
+ ImageBitmap = Bitmap { File = "frame_right.png"; };
+};
+
+#define IMG_WEB_LAYOUT_FRAMERIGHT_HC WEBWIZARD_BASE + 13
+Image IMG_WEB_LAYOUT_FRAMERIGHT_HC
+{
+ ImageBitmap = Bitmap { File = "frame_right_h.png"; };
+};
+
+#define IMG_WEB_LAYOUT_FRAMETOP WEBWIZARD_BASE + 14
+Image IMG_WEB_LAYOUT_FRAMETOP
+{
+ ImageBitmap = Bitmap { File = "frame_top.png"; };
+};
+
+#define IMG_WEB_LAYOUT_FRAMETOP_HC WEBWIZARD_BASE + 15
+Image IMG_WEB_LAYOUT_FRAMETOP_HC
+{
+ ImageBitmap = Bitmap { File = "frame_top_h.png"; };
+};
+
+#define IMG_WEB_LAYOUT_FRAMEBOTTOM WEBWIZARD_BASE + 16
+Image IMG_WEB_LAYOUT_FRAMEBOTTOM
+{
+ ImageBitmap = Bitmap { File = "frame_bottom.png"; };
+};
+
+#define IMG_WEB_LAYOUT_FRAMEBOTTOM_HC WEBWIZARD_BASE + 17
+Image IMG_WEB_LAYOUT_FRAMEBOTTOM_HC
+{
+ ImageBitmap = Bitmap { File = "frame_bottom_h.png"; };
+};
+
diff --git a/wizards/source/imagelists/makefile.mk b/wizards/source/imagelists/makefile.mk
new file mode 100644
index 000000000000..163377de392b
--- /dev/null
+++ b/wizards/source/imagelists/makefile.mk
@@ -0,0 +1,50 @@
+#*************************************************************************
+#
+# 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.
+#
+#*************************************************************************
+
+PRJ=..$/..
+PRJNAME=wizards
+TARGET=wzimglst
+
+# --- Settings ----------------------------------
+
+.INCLUDE : settings.mk
+# --- Files -------------------------------------
+# ... resource files ............................
+
+SRS1NAME=$(TARGET)
+SRC1FILES=imagelists.src
+
+RESLIB1SRSFILES= $(SRS)$/wzimglst.srs
+RESLIB1NAME=wzi
+RESLIB1IMAGES=$(PRJ)$/res
+
+# ... object files ............................
+# --- Targets ----------------------------------
+
+.INCLUDE : target.mk
+
+
diff --git a/wizards/source/importwizard/API.xba b/wizards/source/importwizard/API.xba
new file mode 100644
index 000000000000..d38ba68d832d
--- /dev/null
+++ b/wizards/source/importwizard/API.xba
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="API" script:language="StarBasic">Declare Function RegOpenKeyEx Lib &quot;advapi32.dll&quot; Alias &quot;RegOpenKeyExA&quot; _
+ (ByVal hKey As Long, _
+ ByVal lpSubKey As String, _
+ ByVal ulOptions As Long, _
+ ByVal samDesired As Long, _
+ phkResult As Long) As Long
+
+Declare Function RegQueryValueExString Lib &quot;advapi32.dll&quot; Alias &quot;RegQueryValueExA&quot; _
+ (ByVal hKey As Long, _
+ ByVal lpValueName As String, _
+ ByVal lpReserved As Long, _
+ lpType As Long, _
+ lpData As String, _
+ lpcbData As Long) As Long
+
+Declare Function RegQueryValueExLong Lib &quot;advapi32.dll&quot; Alias &quot;RegQueryValueExA&quot; _
+ (ByVal hKey As Long, _
+ ByVal lpValueName As String, _
+ ByVal lpReserved As Long, _
+ lpType As Long, _
+ lpData As Long, _
+ lpcbData As Long) As Long
+
+Declare Function RegQueryValueExNULL Lib &quot;advapi32.dll&quot; Alias &quot;RegQueryValueExA&quot; _
+ (ByVal hKey As Long, _
+ ByVal lpValueName As String, _
+ ByVal lpReserved As Long, _
+ lpType As Long, _
+ ByVal lpData As Long, _
+ lpcbData As Long) As Long
+
+Declare Function RegCloseKeyA Lib &quot;advapi32.dll&quot; Alias &quot;RegCloseKey&quot; _
+ (ByVal hKey As Long) As Long
+
+
+Public Const HKEY_CLASSES_ROOT = &amp;H80000000
+Public Const HKEY_CURRENT_USER = &amp;H80000001
+Public Const HKEY_LOCAL_MACHINE = &amp;H80000002
+Public Const HKEY_USERS = &amp;H80000003
+Public Const KEY_ALL_ACCESS = &amp;H3F
+Public Const REG_OPTION_NON_VOLATILE = 0
+Public Const REG_SZ As Long = 1
+Public Const REG_DWORD As Long = 4
+Public Const ERROR_NONE = 0
+Public Const ERROR_BADDB = 1
+Public Const ERROR_BADKEY = 2
+Public Const ERROR_CANTOPEN = 3
+Public Const ERROR_CANTREAD = 4
+Public Const ERROR_CANTWRITE = 5
+Public Const ERROR_OUTOFMEMORY = 6
+Public Const ERROR_INVALID_PARAMETER = 7
+Public Const ERROR_ACCESS_DENIED = 8
+Public Const ERROR_INVALID_PARAMETERS = 87
+Public Const ERROR_NO_MORE_ITEMS = 259
+&apos;Public Const KEY_READ = &amp;H20019
+
+
+Function OpenRegKey(lBaseKey As Long, sKeyName As String) As Variant
+Dim LocKeyValue
+Dim hKey as Long
+Dim lRetValue as Long
+ lRetValue = RegOpenKeyEx(lBaseKey, sKeyName, 0, KEY_ALL_ACCESS, hKey)
+&apos; lRetValue = QueryValue(HKEY_LOCAL_MACHINE, &quot;SOFTWARE\Microsoft\Outlook Express\5.0\Default Settings&quot;, &quot;Revocation Checking&quot;)
+ If hKey &lt;&gt; 0 Then
+ RegCloseKeyA (hKey)
+ End If
+ OpenRegKey() = lRetValue
+End Function
+
+
+Function GetDefaultPath(CurOffice as Integer) As String
+Dim sPath as String
+Dim Index as Integer
+ Select Case Wizardmode
+ Case SBMICROSOFTMODE
+ Index = Applications(CurOffice,SBAPPLKEY)
+ If GetGUIType = 1 Then &apos; Windows
+ sPath = QueryValue(HKEY_LOCAL_MACHINE, sKeyName(Index), sValueName(Index))
+ Else
+ sPath = &quot;&quot;
+ End If
+ If sPath = &quot;&quot; Then
+ sPath = SOWorkPath
+ End If
+ GetDefaultPath = sPath
+ Case SBXMLMODE
+ GetDefaultPath = SOWorkPath
+ End Select
+End Function
+
+
+Function GetTemplateDefaultPath(Index as Integer) As String
+Dim sLocTemplatePath as String
+Dim sLocProgrampath as String
+Dim Progstring as String
+Dim PathList()as String
+Dim Maxindex as Integer
+Dim OldsLocTemplatePath
+Dim sTemplateKeyName as String
+Dim sTemplateValueName as String
+ On Local Error Goto NOVAlIDSYSTEMPATH
+ Select Case WizardMode
+ Case SBMICROSOFTMODE
+ If GetGUIType = 1 Then &apos; Windows
+ &apos; Template directory of Office 97
+ sTemplateKeyName = &quot;Software\Microsoft\Office\8.0\Common\FileNew\LocalTemplates&quot;
+ sTemplateValueName = &quot;&quot;
+ sLocTemplatePath = QueryValue(HKEY_LOCAL_MACHINE, sTemplateKeyName, sTemplateValueName)
+
+ If sLocTemplatePath = &quot;&quot; Then
+ &apos; Retrieve the template directory of Office 2000
+ &apos; Unfortunately there is no existing note about the template directory in
+ &apos; the whole registry.
+
+ &apos; Programdirectory of Office 2000
+ sTemplateKeyName = &quot;Software\Microsoft\Office\9.0\Common\InstallRoot&quot;
+ sTemplateValueName = &quot;Path&quot;
+ sLocProgrampath = QueryValue(HKEY_LOCAL_MACHINE, sTemplateKeyName, sTemplateValueName)
+ If sLocProgrampath &lt;&gt; &quot;&quot; Then
+ If Right(sLocProgrampath, 1) &lt;&gt; &quot;\&quot; Then
+ sLocProgrampath = sLocProgrampath &amp; &quot;\&quot;
+ End If
+ PathList() = ArrayoutofString(sLocProgrampath,&quot;\&quot;,Maxindex)
+ Progstring = &quot;\&quot; &amp; PathList(Maxindex-1) &amp; &quot;\&quot;
+ OldsLocTemplatePath = DeleteStr(sLocProgramPath,Progstring)
+
+ sLocTemplatePath = OldsLocTemplatePath &amp; &quot;\&quot; &amp; &quot;Templates&quot;
+
+ &apos; Does this subdirectory &quot;templates&quot; exist at all
+ If oUcb.Exists(sLocTemplatePath) Then
+ &apos; If Not the main directory of the office is the base
+ sLocTemplatePath = OldsLocTemplatePath
+ End If
+ Else
+ sLocTemplatePath = SOWorkPath
+ End If
+ End If
+ GetTemplateDefaultPath = ConvertToUrl(sLocTemplatePath)
+ Else
+ GetTemplateDefaultPath = SOWorkPath
+ End If
+ Case SBXMLMODE
+ If Index = 3 Then
+ &apos; Helper Application with no templates
+ GetTemplateDefaultPath = SOWorkPath
+ Else
+ GetTemplateDefaultPath = SOTemplatePath
+ End If
+ End Select
+NOVALIDSYSTEMPATH:
+ If Err &lt;&gt; 0 Then
+ GetTemplateDefaultPath() = SOWorkPath
+ Resume ONITGOES
+ ONITGOES:
+ End If
+End Function
+
+
+Function QueryValueEx(ByVal lhKey, ByVal szValueName As String, vValue As String) As Long
+Dim cch As Long
+Dim lrc As Long
+Dim lType As Long
+Dim lValue As Long
+Dim sValue As String
+Dim Empty
+
+ On Error GoTo QueryValueExError
+
+ lrc = RegQueryValueExNULL(lhKey, szValueName, 0&amp;, lType, 0&amp;, cch)
+ If lrc &lt;&gt; ERROR_NONE Then Error 5
+ Select Case lType
+ Case REG_SZ:
+ sValue = String(cch, 0)
+ lrc = RegQueryValueExString(lhKey, szValueName, 0&amp;, lType, sValue, cch)
+ If lrc = ERROR_NONE Then
+ vValue = Left$(sValue, cch)
+ Else
+ vValue = Empty
+ End If
+ Case REG_DWORD:
+ lrc = RegQueryValueExLong(lhKey, szValueName, 0&amp;, lType, lValue, cch)
+ If lrc = ERROR_NONE Then
+ vValue = lValue
+ End If
+ Case Else
+ lrc = -1
+ End Select
+QueryValueExExit:
+ QueryValueEx = lrc
+ Exit Function
+QueryValueExError:
+ Resume QueryValueExExit
+End Function
+
+
+Function QueryValue(BaseKey As Long, sKeyName As String, sValueName As String) As Variant
+Dim lRetVal As Long &apos; Returnvalue API-Call
+Dim hKey As Long &apos; Onen key handle
+Dim vValue As String &apos; Key value
+
+ lRetVal = RegOpenKeyEx(BaseKey, sKeyName, 0, KEY_ALL_ACCESS, hKey)
+ lRetVal = QueryValueEx(hKey, sValueName, vValue)
+ RegCloseKeyA (hKey)
+ QueryValue = vValue
+End Function
+</script:module> \ No newline at end of file
diff --git a/wizards/source/importwizard/DialogModul.xba b/wizards/source/importwizard/DialogModul.xba
new file mode 100644
index 000000000000..d323ba7ed711
--- /dev/null
+++ b/wizards/source/importwizard/DialogModul.xba
@@ -0,0 +1,657 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="DialogModul" script:language="StarBasic">Option Explicit
+
+Public Const bDebugWizard = True
+
+Public Const SBFIRSTAPPLCHECKED = 0
+Public Const SBSECONDAPPLCHECKED = 1
+Public Const SBTHIRDAPPLCHECKED = 2
+Public Const SBFOURTHAPPLCHECKED = 3
+Public bFilterTracingAvailable as Boolean
+Public WizardMode as String
+Public Const SBMICROSOFTMODE = &quot;MS&quot;
+Public Const SBXMLMODE = &quot;SO&quot;
+&apos; The absolute maximal Number of possible Applications
+Public Const Twip = 425
+Public Const SBMAXAPPLCOUNT = 4
+Public MaxApplCount as Integer
+Public CurOffice As Integer
+Public SOBitmapPath As String
+Public SOWorkPath As String
+Public SOTemplatePath as String
+Public bCancelTask As Boolean
+Public bDoKeepApplValues as Boolean
+Public iApplSection as Integer
+Public oUcb as Object
+Public PathSeparator as String
+
+Public ApplCount as Integer
+Public sKeyName(SBMAXAPPLCOUNT-1) as String
+Public sValueName(SBMAXAPPLCOUNT-1) as String
+Public sCRLF as String
+Public MSFilterName(5,4) as String
+Public XMLFilterName(7,3) as String &apos;Number of different formats
+Public FilterTracingLogPath(2) as String
+Public bMSApplFilterTracingAvailable(2) as String
+Public bTakeOverTargetName(2) as Boolean
+Public bTakeOverPathName(2) as Boolean
+
+&apos; e.g.:
+&apos; XMLFilterName(x,0) = &quot;sdw&quot; &apos; in documents we take the extensions; in SO-templates the appropriate Filtername
+&apos; XMLFilterName(x,1) = &quot;swriter: StarWriter 5.0&quot; &apos; the filtername of the target-format
+&apos; XMLFilterName(x,2) = &quot;sxw&quot; &apos; the target extension
+
+Public Applications(SBMAXAPPLCOUNT-1,9)
+
+Public Const SBAPPLCONVERT = 0
+Public Const SBDOCCONVERT = 1
+Public Const SBDOCRECURSIVE = 2
+Public Const SBDOCSOURCE = 3
+Public Const SBDOCTARGET = 4
+Public Const SBTEMPLCONVERT = 5
+Public Const SBTEMPLRECURSIVE = 6
+Public Const SBTEMPLSOURCE = 7
+Public Const SBTEMPLTARGET = 8
+Public Const SBAPPLKEY = 9
+Public XMLTemplateList()
+
+&apos; Application-relating Data are stored in this Array
+&apos; according to the following structure:
+&apos; Applications(X,0) = True/False (Application is to be converted)
+&apos; Applications(X,1) = True/False (Documents are to be converted)
+&apos; Applications(X,2) = True/False (Including Subdirectories)
+&apos; Applications(X,3) = &quot;File:///...&quot; (SourceUrl of the documents)
+&apos; Applications(X,4) = &quot;File///:...&quot; (TargetUrl of the documents)
+&apos; Applications(X,5) = True/False (Templates are to be converted)
+&apos; Applications(X,6) = True/False (Including Subdirectories)
+&apos; Applications(X,7) = &quot;File:///...&quot; (SourceUrl of the templates)
+&apos; Applications(X,8) = &quot;File:///...&quot; (TargetUrl of the templates)
+&apos; Applications(X,9) = 0 (Key to the original Index of the Applications)
+
+Public Const SBMAXEXTENSIONLENGTH = 15
+
+
+Sub FillStep_Welcome()
+Dim i as Integer
+&apos; bDoKeepApplValues = False
+ ImportDialogArea.Title = sTitle
+ With ImportDialog
+ .cmdHelp.Label = sHelpButton
+ .cmdCancel.Label = sCancelButton
+ .cmdBack.Label = sBackButton
+ .cmdGoOn.Label = sNextButton
+ .WelcomeTextLabel.Label = sWelcomeTextLabel1
+ .WelcomeTextLabel2.Label = sWelcomeTextLabel2
+ .WelcomeTextLabel3.Label = sWelcomeTextLabel3
+
+ .optMSDocuments.Label = sContainerName(0)
+ .chkMSApplication1.Label = sMsDocumentCheckbox(0)
+ .chkMSApplication2.Label = sMsDocumentCheckbox(1)
+ .chkMSApplication3.Label = sMsDocumentCheckbox(2)
+
+ .optSODocuments.Label = sContainerName(1)
+ .chkSOApplication1.Label = sSODocumentCheckbox(0)
+ .chkSOApplication2.Label = sSODocumentCheckbox(1)
+ .chkSOApplication3.Label = sSODocumentCheckbox(2)
+ .chkSOApplication4.Label = sSODocumentCheckbox(3)
+ .cmdBack.Enabled = False
+ .Step = 1
+
+ If Not oFactoryKey.hasbyName(&quot;com.sun.star.text.TextDocument&quot;) Then
+ .chkLogfile.State = 0
+ .chkLogfile.Enabled = False
+ End If
+ End With
+ CheckModuleInstallation()
+ ToggleNextButton()
+End Sub
+
+
+Sub FillStep_InputPaths(OfficeIndex as Integer, bStartup as Boolean)
+Dim Index as Integer
+Dim oNullObject as Object
+ If bStartup And Not bDoKeepApplValues Then
+ If ImportDialog.optMSDocuments.State = 1 Then
+ SetupMSConfiguration()
+ Else
+ SetupXMLConfiguration()
+ End If
+ FillUpApplicationList()
+ End If
+ CurOffice = OfficeIndex
+ Index = Applications(CurOffice,SBAPPLKEY)
+ InitializePathsforCurrentApplication(Index)
+ With ImportDialog
+ .chkTemplatePath.Label = sTemplateCheckbox(Index)
+ .chkDocumentPath.State = Abs(Applications(CurOffice,SBDOCCONVERT))
+ .chkDocumentSearchSubDir.State = Abs(Applications(CurOffice,SBDOCRECURSIVE))
+ .txtDocumentImportPath.Text = ConvertFromUrl(Applications(CurOffice,SBDOCSOURCE))
+ .txtDocumentExportPath.Text = ConvertFromUrl(Applications(CurOffice,SBDOCTARGET))
+ .hlnDocuments.Label = sProgressMoreDocs
+ If WizardMode = SBXMLMODE Then
+ ImportDialogArea.Title = sTitle &amp; &quot; - &quot; &amp; sSODocumentCheckBox(Index)
+ Else
+ ImportDialogArea.Title = sTitle &amp; &quot; - &quot; &amp; sMSDocumentCheckBox(Index)
+ End If
+ If WizardMode = SBXMLMODE AND Index = 3 Then
+ &apos; Note: SO-Helper Applications are partly treated like templates although they only have documents
+ .hlnTemplates.Label = sProgressMoreDocs
+ .chkTemplatePath.Label = sSOHelperDocuments(0,0)
+ .chkTemplatePath.Enabled = oFactoryKey.HasByName(sSOHelperDocuments(0,1))
+ .chkDocumentPath.Label = sSOHelperDocuments(1,0)
+ .chkDocumentPath.Enabled = oFactoryKey.HasByName(sSOHelperDocuments(1,1))
+ Else
+ .chkTemplatePath.Enabled = True
+ .chkDocumentPath.Enabled = True
+ .chkTemplatePath.Label = sTemplateCheckbox(Index)
+ .chkDocumentPath.Label = sDocumentCheckbox(Index)
+ .hlnTemplates.Label = sProgressMoreTemplates
+ End If
+ .chkTemplatePath.State = Abs(Applications(CurOffice,SBTEMPLCONVERT))
+ ToggleInputPaths(oNullObject,&quot;Template&quot;)
+ ToggleInputPaths(oNullObject,&quot;Document&quot;)
+ .chkTemplateSearchSubDir.State = Abs(Applications(CurOffice,SBTEMPLRECURSIVE))
+ .txtTemplateImportPath.Text = ConvertFromUrl(Applications(CurOffice,SBTEMPLSOURCE))
+ .txtTemplateExportPath.Text = ConvertFromUrl(Applications(CurOffice,SBTEMPLTARGET))
+ .cmdGoOn.Label = sNextButton
+ .cmdBack.Enabled = True
+ ImportDialog.Step = 2
+ End With
+ ImportDialogArea.GetControl(&quot;chkTemplatePath&quot;).SetFocus()
+ ToggleNextButton()
+End Sub
+
+
+Sub FillUpApplicationList()
+Dim i as Integer
+Dim a as Integer
+Dim BoolValue as Boolean
+ If Not bDoKeepApplValues Then
+ a = 0
+ For i = 1 To ApplCount
+ If ImportDialog.optMSDocuments.State = 1 Then
+ BoolValue = ImportDialogArea.GetControl(&quot;chkMSApplication&quot; &amp; i).Model.State = 1
+ Else
+ BoolValue = ImportDialogArea.GetControl(&quot;chkSOApplication&quot; &amp; i).Model.State = 1
+ End If
+ Applications(a,SBAPPLCONVERT) = BoolValue
+ Applications(a,SBDOCCONVERT) = BoolValue
+ Applications(a,SBDOCRECURSIVE) = BoolValue
+ Applications(a,SBDOCSOURCE) = &quot;&quot; &apos; GetDefaultPath(i)
+ Applications(a,SBDOCTARGET) = &quot;&quot; &apos; SOWorkPath
+ Applications(a,SBTEMPLCONVERT) = BoolValue
+ Applications(a,SBTEMPLRECURSIVE) = BoolValue
+ Applications(a,SBTEMPLSOURCE) = &quot;&quot; &apos; GetTemplateDefaultPath(i)
+ Applications(a,SBTEMPLTARGET) = &quot;&quot; &apos; GetTargetTemplatePath(i)
+ Applications(a,SBAPPLKEY) = i-1
+ If BoolValue Then
+ a = a + 1
+ End If
+ Next i
+ ApplCount = a
+ End If
+End Sub
+
+
+Sub InitializePathsforCurrentApplication(i as Integer)
+ AssignPathToCurrentApplication(SBDOCSOURCE, GetDefaultPath(i))
+ AssignPathToCurrentApplication(SBDOCTARGET, SOWorkPath)
+ AssignPathToCurrentApplication(SBTEMPLSOURCE, GetTemplateDefaultPath(i))
+ AssignPathToCurrentApplication(SBTEMPLTARGET, GetTargetTemplatePath(i))
+End Sub
+
+
+Sub AssignPathToCurrentApplication(Index as Integer, NewPath as String)
+ If Applications(CurOffice,Index) = &quot;&quot; Then
+ If CurOffice &gt; 0 Then
+ Applications(CurOffice,Index) = Applications(CurOffice-1,Index)
+ Else
+ Applications(CurOffice,Index) = NewPath
+ End If
+ End If
+End Sub
+
+
+Sub SaveStep_InputPath()
+ Applications(CurOffice,SBDOCCONVERT) = ImportDialog.chkDocumentPath.State = 1
+ Applications(CurOffice,SBDOCRECURSIVE) = ImportDialog.chkDocumentSearchSubDir.State = 1
+ Applications(CurOffice,SBDOCSOURCE) = ConvertToURL(ImportDialog.txtDocumentImportPath.Text)
+ Applications(CurOffice,SBDOCTARGET) = ConvertToUrl(ImportDialog.txtDocumentExportPath.Text)
+ Applications(CurOffice,SBTEMPLCONVERT) = ImportDialog.chkTemplatePath.State = 1
+ Applications(CurOffice,SBTEMPLRECURSIVE) = ImportDialog.chkTemplateSearchSubDir.State = 1
+ Applications(CurOffice,SBTEMPLSOURCE) = ConvertToURL(ImportDialog.txtTemplateImportPath.Text)
+ Applications(CurOffice,SBTEMPLTARGET) = ConvertToURL(ImportDialog.txtTemplateExportPath.Text)
+End Sub
+
+
+Sub ToggleInputPaths(aEvent as Object, Optional sDocType)
+Dim bDoEnable as Boolean
+Dim sLocDocType as String
+Dim oCheckBox as Object
+ If Not IsNull(aEvent) Then
+ sLocDocType = aEvent.Source.Model.Tag
+ Else
+ sLocDocType = sDocType
+ End If
+ With ImportDialogArea
+ oCheckBox = .GetControl(&quot;chk&quot; &amp; sLocDocType &amp; &quot;Path&quot;).Model
+ bDoEnable = oCheckBox.State = 1 And oCheckBox.Enabled
+ .GetControl(&quot;lbl&quot; &amp; sLocDocType &amp; &quot;Import&quot;).Model.Enabled = bDoEnable
+ .GetControl(&quot;lbl&quot; &amp; sLocDocType &amp; &quot;Export&quot;).Model.Enabled = bDoEnable
+ .GetControl(&quot;txt&quot; &amp; sLocDocType &amp; &quot;ImportPath&quot;).Model.Enabled = bDoEnable
+ .GetControl(&quot;txt&quot; &amp; sLocDocType &amp; &quot;ExportPath&quot;).Model.Enabled = bDoEnable
+ .GetControl(&quot;chk&quot; &amp; sLocDocType &amp; &quot;SearchSubDir&quot;).Model.Enabled = bDoEnable
+ .GetControl(&quot;cmd&quot; &amp; sLocDocType &amp; &quot;Import&quot;).Model.Enabled = bDoEnable
+ .GetControl(&quot;cmd&quot; &amp; sLocDocType &amp; &quot;Export&quot;).Model.Enabled = bDoEnable
+ End With
+ ToggleNextButton()
+End Sub
+
+
+Function MakeSummaryString()
+Dim sTmpText As String
+Dim i as Integer
+Dim Index as Integer
+Dim sAddText as String
+ For i = 0 To ApplCount -1
+ Index = Applications(i,SBAPPLKEY)
+ GetFilterTracingLogPath(i, Index)
+ If Applications(i,SBTEMPLCONVERT) Then
+ &apos; Templates are to be converted
+ sAddText = &quot;&quot;
+ If WizardMode = SBMICROSOFTMODE Then
+ sAddText = sSumMSTemplates(Index) &amp; sCRLF
+ Else
+ sAddText = sSumSOTemplates(Index) &amp; sCRLF
+ End If
+ sTmpText = sTmpText &amp; sAddText &amp; ConvertFromUrl(Applications(i,SBTEMPLSOURCE)) &amp; sCRLF
+ If Applications(i,SBTEMPLRECURSIVE) Then
+ &apos; Including Subdirectories
+ sTmpText = sTmpText &amp; sSumInclusiveSubDir &amp; sCRLF
+ End If
+ sTmpText = sTmpText &amp; sSumSaveDocuments &amp; sCRLF
+ sTmpText = sTmpText &amp; ConvertFromUrl(Applications(i,SBTEMPLTARGET)) &amp; sCRLF
+ sTmpText = sTmpText &amp; sCRLF
+ End If
+
+ If Applications(i,SBDOCCONVERT) Then
+ &apos; Documents are to be converted
+ If WizardMode = SBMICROSOFTMODE Then
+ sAddText = sSumMSDocuments(Index) &amp; sCRLF
+ Else
+ sAddText = sSumSODocuments(Index) &amp; sCRLF
+ End If
+ sTmpText = sTmpText &amp; sAddText &amp; ConvertFromUrl(Applications(i,SBDOCSOURCE)) &amp; sCRLF
+
+ If Applications(i,SBDOCRECURSIVE) Then
+ &apos; Including Subdirectories
+ sTmpText = sTmpText &amp; sSumInclusiveSubDir &amp; sCRLF
+ End If
+
+ sTmpText = sTmpText &amp; sSumSaveDocuments &amp; sCRLF
+ sTmpText = sTmpText &amp; ConvertFromUrl(Applications(i,SBDOCTARGET)) &amp; sCRLF
+ sTmpText = sTmpText &amp; sCRLF
+ End If
+ Next i
+ MakeSummaryString = sTmpText
+End Function
+
+
+Sub FillStep_Summary()
+ ImportDialogArea.Title = sTitle
+ With ImportDialog
+ .SummaryTextbox.Text = MakeSummaryString()
+ .cmdGoOn.Enabled = .SummaryTextbox.Text &lt;&gt; &quot;&quot;
+ .cmdGoOn.Label = sBeginButton
+ .SummaryHeaderLabel.Label = sSummaryHeader
+ .Step = 3
+ End With
+ ImportDialogArea.GetControl(&quot;SummaryHeaderLabel&quot;).SetFocus()
+End Sub
+
+
+Sub FillStep_Progress()
+ With ImportDialog
+ .cmdBack.Enabled = False
+ .cmdGoOn.Enabled = False
+ .hlnProgress.Label = sProgressPage_1
+ .LabelRetrieval.FontWeight = com.sun.star.awt.FontWeight.BOLD
+ .LabelRetrieval.Label = sProgressPage_2
+ .LabelCurProgress.Label = sProgressPage_3
+ .LabelCurDocumentRetrieval.Label = &quot;&quot;
+ .LabelCurTemplateRetrieval.Label = &quot;&quot;
+ .LabelCurDocument.Label = &quot;&quot;
+ .Step = 4
+ End With
+ ImportDialogArea.GetControl(&quot;LabelRetrieval&quot;).SetFocus()
+ If ImportDialog.chkLogfile.State = 1 Then
+ ImportDialog.cmdShowLogFile.DefaultButton = True
+ End If
+End Sub
+
+
+Sub GetFilterTracingLogPath(i as Integer, Index as Integer)
+Dim aNodePath(0) as new com.sun.star.beans.PropertyValue
+Dim oMasterKey
+Dim oImportKey
+Dim oWordKey
+Dim oExcelkey
+Dim oPowerpointKey
+Dim oFilterService
+ aNodePath(0).Name = &quot;nodepath&quot;
+ aNodePath(0).Value = &quot;org.openoffice.Office.Tracing&quot;
+ oFilterService = createUnoService(&quot;com.sun.star.util.FilterTracer&quot;)
+ bFilterTracingAvailable = Not IsNull(oFilterService)
+ If bFilterTracingAvailable Then
+ oMasterkey = GetRegistryKeyContent(&quot;org.openoffice.Office.Tracing/&quot;)
+ If oMasterKey.hasbyName(&quot;Import&quot;) Then
+ oImportKey = GetRegistryKeyContent(&quot;org.openoffice.Office.Tracing/Import&quot;)
+ bMSApplFilterTracingAvailable(i) = CheckMSImportAvailability(oImportkey, MSFiltername(Index, 4), FilterTracingLogPath(i), bTakeOverTargetName(i), bTakeOverPathName(i))
+ End If
+ End If
+End Sub
+
+
+Function CheckMSImportAvailability(oImportkey, MSApplName as String, MSLogPath as String, bTakeOverTargetname as String, bTakeOverpathName as String) as Boolean
+Dim bApplIsAvailable as Boolean
+Dim oApplKey
+Dim LocApplName as String
+Dim LocApplPath as String
+ bApplIsAvailable = oImportKey.hasbyName(MSApplName)
+ If bApplIsAvailable Then
+ oApplKey = oImportKey.getByName(MSApplName)
+ bApplIsAvailable = oApplKey.On
+ LocApplName = oApplKey.Name
+ LocApplPath = oApplKey.Path
+ bTakeOverTargetName = (LocApplName = &quot;&quot;)
+ bTakeOverPathName = (LocApplPath = &quot;&quot;)
+ MSLogPath = LocApplPath &amp; &quot;/&quot; &amp; LocApplName &amp; &quot;.log&quot;
+ End If
+ CheckMSImportAvailability() = bApplIsAvailable
+End Function
+
+
+
+Sub SetupMSConfiguration()
+ iApplSection = 0
+ Wizardmode = SBMICROSOFTMODE
+ MaxApplCount = 3
+ ApplCount = 3
+ &apos; chkTemplatePath-Captions
+ GetApplResourceArray(1009 + iApplSection, ApplCount, sTemplateCheckBox())
+ &apos; DocumentCheckbox- Captions
+ GetApplResourceArray(1009 + iApplSection + ApplCount, ApplCount, sDocumentCheckBox())
+
+ sKeyName(0) = &quot;Software\Microsoft\Office\8.0\Word\Options&quot;
+ sKeyName(1) = &quot;Software\Microsoft\Office\8.0\Excel\Microsoft Excel&quot;
+ sKeyName(2) = &quot;Software\Microsoft\Office\8.0\PowerPoint\Recent Folder List\Default&quot;
+
+ sValueName(0) = &quot;DOC-PATH&quot;
+ sValueName(1) = &quot;DefaultPath&quot;
+ sValueName(2) = &quot;&quot;
+
+&apos; See definition of Filtername-Array about meaning of fields
+ MSFilterName(0,0) = &quot;doc&quot;
+ MSFilterName(0,1) = &quot;writer8&quot;
+ MSFilterName(0,2) = &quot;odt&quot;
+ MSFilterName(0,3) = sMSDocumentCheckBox(0)
+ MSFilterName(0,4) = &quot;Word&quot;
+
+
+ MSFilterName(1,0) = &quot;xls&quot;
+ MSFilterName(1,1) = &quot;calc8&quot;
+ MSFilterName(1,2) = &quot;ods&quot;
+ MSFilterName(1,3) = sMSDocumentCheckBox(1)
+ MSFilterName(1,4) = &quot;Excel&quot;
+
+ MSFilterName(2,0) = &quot;ppt|pps&quot;
+ MSFilterName(2,1) = &quot;impress8|impress8&quot;
+ MSFilterName(2,2) = &quot;odp|odp&quot;
+ MSFilterName(2,3) = sMSDocumentCheckBox(2)
+ MSFilterName(2,4) = &quot;PowerPoint&quot;
+
+ MSFilterName(3,0) = &quot;dot&quot;
+ MSFilterName(3,1) = &quot;writer8_template&quot;
+ MSFilterName(3,2) = &quot;ott&quot;
+ MSFilterName(3,3) = sMSTemplateCheckBox(0)
+ MSFilterName(3,4) = &quot;Word&quot;
+
+ MSFilterName(4,0) = &quot;xlt&quot;
+ MSFilterName(4,1) = &quot;calc8_template&quot;
+ MSFilterName(4,2) = &quot;ots&quot;
+ MSFilterName(4,3) = sMSTemplateCheckBox(1)
+ MSFilterName(4,4) = &quot;Excel&quot;
+
+ MSFilterName(5,0) = &quot;pot&quot;
+ MSFilterName(5,1) = &quot;impress8_template&quot;
+ MSFilterName(5,2) = &quot;otp&quot;
+ MSFilterName(5,3) = sMSTemplateCheckBox(2)
+ MSFilterName(5,4) = &quot;PowerPoint&quot;
+End Sub
+
+
+
+&apos; This is an extract from &quot;http://util.openoffice.org/source/browse/util/sot/source/base/exchange.cxx?rev=1.25&amp;content-type=text/x-cvsweb-markup&quot;
+&apos; about the listed defined mimetypes that are required to define binary StarOffice templates that have for all applications the same extension &quot;.vor&quot;
+
+&apos; 26 SOT_FORMATSTR_ID_STARWRITER_30*/ { &quot;application/x-openoffice-starwriter-30;windows_formatname=\&quot;StarWriter 3.0\&quot;&quot;, &quot;StarWriter 3.0&quot;, &amp;::getCppuType( (const Sequence&lt; sal_Int8 &gt;*) 0 ) },
+&apos; 27 SOT_FORMATSTR_ID_STARWRITER_40*/ { &quot;application/x-openoffice-starwriter-40;windows_formatname=\&quot;StarWriter 4.0\&quot;&quot;, &quot;StarWriter 4.0&quot;, &amp;::getCppuType( (const Sequence&lt; sal_Int8 &gt;*) 0 ) },
+&apos; 28 SOT_FORMATSTR_ID_STARWRITER_50*/ { &quot;application/x-openoffice-starwriter-50;windows_formatname=\&quot;StarWriter 5.0\&quot;&quot;, &quot;StarWriter 5.0&quot;, &amp;::getCppuType( (const Sequence&lt; sal_Int8 &gt;*) 0 ) },
+
+&apos; 29 SOT_FORMATSTR_ID_STARWRITERWEB_40*/ { &quot;application/x-openoffice-starwriterweb-40;windows_formatname=\&quot;StarWriter/Web 4.0\&quot;&quot;, &quot;StarWriter/Web 4.0&quot;, &amp;::getCppuType( (const Sequence&lt; sal_Int8 &gt;*) 0 ) },
+&apos; 30 SOT_FORMATSTR_ID_STARWRITERWEB_50*/ { &quot;application/x-openoffice-starwriterweb-50;windows_formatname=\&quot;StarWriter/Web 5.0\&quot;&quot;, &quot;StarWriter/Web 5.0&quot;, &amp;::getCppuType( (const Sequence&lt; sal_Int8 &gt;*) 0 ) },
+
+&apos; 31 SOT_FORMATSTR_ID_STARWRITERGLOB_40*/ { &quot;application/x-openoffice-starwriterglob-40;windows_formatname=\&quot;StarWriter/Global 4.0\&quot;&quot;, &quot;StarWriter/Global 4.0&quot;, &amp;::getCppuType( (const Sequence&lt; sal_Int8 &gt;*) 0 ) },
+&apos; 32 SOT_FORMATSTR_ID_STARWRITERGLOB_50*/ { &quot;application/x-openoffice-starwriterglob-50;windows_formatname=\&quot;StarWriter/Global 5.0\&quot;&quot;, &quot;StarWriter/Global 5.0&quot;, &amp;::getCppuType( (const Sequence&lt; sal_Int8 &gt;*) 0 ) },
+
+&apos; 33 SOT_FORMATSTR_ID_STARDRAW*/ { &quot;application/x-openoffice-stardraw;windows_formatname=\&quot;StarDrawDocument\&quot;&quot;, &quot;StarDrawDocument&quot;, &amp;::getCppuType( (const Sequence&lt; sal_Int8 &gt;*) 0 ) },
+&apos; 34 SOT_FORMATSTR_ID_STARDRAW_40*/ { &quot;application/x-openoffice-stardraw-40;windows_formatname=\&quot;StarDrawDocument 4.0\&quot;&quot;, &quot;StarDrawDocument 4.0&quot;, &amp;::getCppuType( (const Sequence&lt; sal_Int8 &gt;*) 0 ) },
+&apos; 36 SOT_FORMATSTR_ID_STARDRAW_50*/ { &quot;application/x-openoffice-stardraw-50;windows_formatname=\&quot;StarDraw 5.0\&quot;&quot;, &quot;StarDraw 5.0&quot;, &amp;::getCppuType( (const Sequence&lt; sal_Int8 &gt;*) 0 ) },
+
+&apos; 35 SOT_FORMATSTR_ID_STARIMPRESS_50*/ { &quot;application/x-openoffice-starimpress-50;windows_formatname=\&quot;StarImpress 5.0\&quot;&quot;, &quot;StarImpress 5.0&quot;, &amp;::getCppuType( (const Sequence&lt; sal_Int8 &gt;*) 0 ) },
+
+&apos; 37 SOT_FORMATSTR_ID_STARCALC*/ { &quot;application/x-openoffice-starcalc;windows_formatname=\&quot;StarCalcDocument\&quot;&quot;, &quot;StarCalcDocument&quot;, &amp;::getCppuType( (const Sequence&lt; sal_Int8 &gt;*) 0 ) },
+&apos; 38 SOT_FORMATSTR_ID_STARCALC_40*/ { &quot;application/x-openoffice-starcalc-40;windows_formatname=\&quot;StarCalc 4.0\&quot;&quot;, &quot;StarCalc 4.0&quot;, &amp;::getCppuType( (const Sequence&lt; sal_Int8 &gt;*) 0 ) },
+&apos; 39 SOT_FORMATSTR_ID_STARCALC_50*/ { &quot;application/x-openoffice-starcalc-50;windows_formatname=\&quot;StarCalc 5.0\&quot;&quot;, &quot;StarCalc 5.0&quot;, &amp;::getCppuType( (const Sequence&lt; sal_Int8 &gt;*) 0 ) },
+
+&apos; 40 SOT_FORMATSTR_ID_STARCHART*/ { &quot;application/x-openoffice-starchart;windows_formatname=\&quot;StarChartDocument\&quot;&quot;, &quot;StarChartDocument&quot;, &amp;::getCppuType( (const Sequence&lt; sal_Int8 &gt;*) 0 ) },
+&apos; 41 SOT_FORMATSTR_ID_STARCHART_40*/ { &quot;application/x-openoffice-starchart-40;windows_formatname=\&quot;StarChartDocument 4.0\&quot;&quot;, &quot;StarChartDocument 4.0&quot;, &amp;::getCppuType( (const Sequence&lt; sal_Int8 &gt;*) 0 ) },
+&apos; 42 SOT_FORMATSTR_ID_STARCHART_50*/ { &quot;application/x-openoffice-starchart-50;windows_formatname=\&quot;StarChart 5.0\&quot;&quot;, &quot;StarChart 5.0&quot;, &amp;::getCppuType( (const Sequence&lt; sal_Int8 &gt;*) 0 ) },
+
+&apos; 46 SOT_FORMATSTR_ID_STARMATH*/ { &quot;application/x-openoffice-starmath;windows_formatname=\&quot;StarMath\&quot;&quot;, &quot;StarMath&quot;, &amp;::getCppuType( (const Sequence&lt; sal_Int8 &gt;*) 0 ) },
+&apos; 47 SOT_FORMATSTR_ID_STARMATH_40*/ { &quot;application/x-openoffice-starmath-40;windows_formatname=\&quot;StarMathDocument 4.0\&quot;&quot;, &quot;StarMathDocument 4.0&quot;, &amp;::getCppuType( (const Sequence&lt; sal_Int8 &gt;*) 0 ) },
+&apos; 48 SOT_FORMATSTR_ID_STARMATH_50*/ { &quot;application/x-openoffice-starmath-50;windows_formatname=\&quot;StarMath 5.0\&quot;&quot;, &quot;StarMath 5.0&quot;, &amp;::getCppuType( (const Sequence&lt; sal_Int8 &gt;*) 0 ) },
+
+
+Sub SetupXMLConfiguration()
+ iApplSection = 1000
+ Wizardmode = SBXMLMODE
+ ApplCount = 4
+ MaxApplCount = 4
+ XMLTemplateList = Array(&quot;vor&quot;, &quot;sti&quot;, &quot;stw&quot; , &quot;stc&quot; , &quot;std&quot;)
+ &apos; chkTemplatePath-Captions
+ GetApplResourceArray(1009 + iApplSection, ApplCount, sTemplateCheckBox())
+ &apos; DocumentCheckbox- Captions
+ GetApplResourceArray(1009 + iApplSection + ApplCount, ApplCount, sDocumentCheckBox())
+
+ XMLFilterName(0,0) = &quot;sdw|sxw&quot;
+ XMLFilterName(0,1) = &quot;writer8|writer8&quot;
+ XMLFilterName(0,2) = &quot;odt|odt&quot;
+ XMLFilterName(0,3) = sDocumentCheckBox(0)
+
+ XMLFilterName(1,0) = &quot;sdc|sxc&quot;
+ XMLFilterName(1,1) = &quot;calc8|calc8&quot;
+ XMLFilterName(1,2) = &quot;ods|ods&quot;
+ XMLFilterName(1,3) = sDocumentCheckBox(1)
+
+ If oFactoryKey.HasByName(&quot;com.sun.star.drawing.DrawingDocument&quot;) and oFactoryKey.HasByName(&quot;com.sun.star.presentation.PresentationDocument&quot;) Then
+ XMLFilterName(2,0) = &quot;sdd|sda|sxi|sxd&quot;
+ XMLFilterName(2,1) = &quot;impress8|draw8|impress8|draw8&quot;
+ XMLFilterName(2,2) = &quot;odp|odg|odp|odg&quot;
+ Elseif oFactoryKey.HasByName(&quot;com.sun.star.drawing.DrawingDocument&quot;) Then
+ XMLFilterName(2,0) = &quot;sda|sxd&quot;
+ XMLFilterName(2,1) = &quot;draw8|draw8&quot;
+ XMLFilterName(2,2) = &quot;odg|odg&quot;
+ Elseif oFactoryKey.HasByName(&quot;com.sun.star.presentation.PresentationDocument&quot;) Then
+ XMLFilterName(2,0) = &quot;sdd|sxi&quot;
+ XMLFilterName(2,1) = &quot;impress8|impress8&quot;
+ XMLFilterName(2,2) = &quot;odp|odp&quot;
+ End If
+ XMLFilterName(2,3) = sDocumentCheckBox(2)
+
+
+ XMLFilterName(3,0) = &quot;smf|sxm&quot;
+ XMLFilterName(3,1) = &quot;math8|math8&quot;
+ XMLFilterName(3,2) = &quot;odf|odf&quot;
+ XMLFilterName(3,3) = sDocumentCheckBox(3)
+
+ XMLFilterName(4,0) = &quot;application/x-openoffice-starwriter|application/vnd.stardivision.writer/web|application/vnd.sun.xml.writer|application/vnd.sun.xml.writerweb&quot;
+ XMLFilterName(4,1) = &quot;writer8_template|writerweb8_writer_template|writer8_template|writerweb8_writer_template&quot;
+ XMLFilterName(4,2) = &quot;ott|oth|ott|oth&quot;
+ XMLFilterName(4,3) = sTemplateCheckBox(0)
+
+
+ XMLFilterName(5,0) = &quot;application/x-openoffice-starcalc|application/vnd.sun.xml.calc&quot;
+ XMLFilterName(5,1) = &quot;calc8_template|calc8_template&quot;
+ XMLFilterName(5,2) = &quot;ots|ots&quot;
+ XMLFilterName(5,3) = sTemplateCheckBox(1)
+
+ &apos; due to bug #108942# impress templates of the version 4.0 have to be handled in a special way because their mimetype
+ &apos; falsely points to the draw application.
+ If oFactoryKey.HasByName(&quot;com.sun.star.drawing.DrawingDocument&quot;) and oFactoryKey.HasByName(&quot;com.sun.star.presentation.PresentationDocument&quot;) Then
+ XMLFilterName(6,0) = &quot;application/x-openoffice-starimpress|application/x-openoffice-stardraw-40|application/x-openoffice-stardraw|application/vnd.sun.xml.impress|application/vnd.sun.xml.draw&quot;
+ XMLFilterName(6,1) = &quot;impress8_template|impress8_template|draw8_template|impress8_template|draw8_template&quot;
+ XMLFilterName(6,2) = &quot;otp|otp|otg|otp|otg&quot;
+ Elseif oFactoryKey.HasByName(&quot;com.sun.star.drawing.DrawingDocument&quot;) Then
+ XMLFilterName(6,0) = &quot;application/x-openoffice-stardraw|application/vnd.sun.xml.draw&quot;
+ XMLFilterName(6,1) = &quot;draw8_template|draw8_template&quot;
+ XMLFilterName(6,2) = &quot;otg|otg&quot;
+ Elseif oFactoryKey.HasByName(&quot;com.sun.star.presentation.PresentationDocument&quot;) Then
+ XMLFilterName(6,0) = &quot;application/x-openoffice-starimpress|application/x-openoffice-stardraw-40|application/vnd.sun.xml.impress&quot;
+ XMLFilterName(6,1) = &quot;impress8_template|impress8_template|impress8_template&quot;
+ XMLFilterName(6,2) = &quot;otp|otp|otp&quot;
+ End If
+ XMLFilterName(6,3) = sTemplateCheckBox(2)
+
+ If oFactoryKey.HasByName(&quot;com.sun.star.text.GlobalDocument&quot;) Then
+ XMLFilterName(7,0) = &quot;sgl|sxg&quot;
+ XMLFilterName(7,1) = &quot;writerglobal8|writerglobal8&quot;
+ XMLFilterName(7,2) = &quot;odm|odm&quot;
+ XMLFilterName(7,3) = sTemplateCheckBox(3)
+ End If
+End Sub
+
+
+Function CheckControlPath(oCheckbox as Object, oTextBox as Object, ByVal bDoEnable as Boolean)
+Dim sPath as String
+ If Not bDoEnable Then
+ CheckControlPath = False
+ ElseIf oCheckbox.State = 0 Then
+ CheckControlPath = True
+ Else
+ sPath = ConvertToUrl(Trim(oTextBox.Text)
+ CheckControlPath = oUcb.Exists(sPath)
+ End If
+End Function
+
+
+Function CheckInputPaths() as Boolean
+Dim bChangePage as Boolean
+ bChangePage = CheckTextBoxPath(ImportDialog.txtTemplateImportPath, True, False, sTitle, False)
+ bChangePage = CheckTextBoxPath(ImportDialog.txtTemplateExportPath, bChangePage, True, sTitle, False)
+ bChangePage = CheckTextBoxPath(ImportDialog.txtDocumentImportPath, bChangePage, False, sTitle, False)
+ bChangePage = CheckTextBoxPath(ImportDialog.txtDocumentExportPath, bChangePage, True, sTitle, False)
+ CheckInputPaths = bChangePage
+End Function
+
+
+Function CheckTextBoxPath(oTextBox as Object, ByVal bCheck as Boolean, bCreateNew as Boolean, sTitle as String, bgetResources as Boolean) as Boolean
+Dim iCreate as Integer
+Dim sQueryMessage as String
+Dim sUrlPath as String
+Dim sMessageNoDir as String
+Dim sShowPath as String
+Dim oLocUcb as Object
+ oLocUcb = createUnoService(&quot;com.sun.star.ucb.SimpleFileAccess&quot;)
+ If bGetResources Then
+ If InitResources(&quot;ImportWizard&quot;,&quot;imp&quot;) then
+ sNoDirCreation = GetResText(1050)
+ sMsgDirNotThere = GetResText(1051)
+ sQueryForNewCreation = GetResText(1052)
+ Else
+ CheckTextBoxPath() = False
+ Exit Function
+ End If
+ End If
+ If oTextBox.Enabled Then
+ If bCheck Then
+ sShowPath = oTextBox.Text
+ sUrlPath = ConvertToUrl(sShowPath)
+ If Not oLocUcb.Exists(sUrlPath) Then
+ If Not bCreateNew Then
+ &apos; Sourcedirectories must be existing, Targetdirectories may be created new
+ sQueryMessage = ReplaceString(sMsgDirNotThere, sShowPath,&quot;%1&quot;)
+ Msgbox(sQueryMessage,16,sTitle)
+ CheckTextBoxPath() = False
+ Exit Function
+ Else
+ sQueryMessage = ReplaceString(sMsgDirNotThere, sShowPath,&quot;%1&quot;)
+ sQueryMessage = sQueryMessage &amp; Chr(13) &amp; sQueryForNewCreation
+ iCreate = Msgbox (sQueryMessage, 36, sTitle)
+ If iCreate = 6 Then
+ On Local Error Goto NOVALIDPATH
+ CreateFolder(sUrlPath)
+ If Not oLocUcb.Exists(sUrlPath) Then
+ Goto NOVALIDPATH
+ End If
+ Else
+ CheckTextBoxPath() = False
+ Exit Function
+ End If
+ End If
+ End If
+ CheckTextBoxPath() = True
+ Else
+ CheckTextBoxPath() = False
+ End If
+ Else
+ CheckTextBoxPath() = True
+ End If
+ Exit Function
+NOVALIDPATH:
+ sMessageNoDir = ReplaceString(sNoDirCreation, sShowPath, &quot;%1&quot;)
+ Msgbox(sMessageNoDir, 16, sTitle)
+ CheckTextBoxPath() = False
+End Function
+
+
+Sub InitializeProgressPage(oDialog as Object)
+ oDialog.LabelRetrieval.FontWeight = com.sun.star.awt.FontWeight.NORMAL
+ oDialog.LabelCurProgress.FontWeight = com.sun.star.awt.FontWeight.BOLD
+End Sub
+
+
+Sub SetProgressDisplay(AbsFound as Integer)
+ ImportDialog.LabelRetrieval.Label = sProgressPage_2 &amp; &quot; &quot; &amp; ReplaceString(sProgressPage_5, Str(AbsFound) &amp; &quot; &quot;, &quot;%1&quot;)
+ ImportDialog.LabelCurDocumentRetrieval.Label = sProgressFound &amp; &quot; &quot; &amp; CStr(AbsDocuFound) &amp; &quot; &quot; &amp; sProgressMoreDocs
+ ImportDialog.LabelCurTemplateRetrieval.Label = sProgressFound &amp; &quot; &quot; &amp; CStr(AbsTemplateFound) &amp; &quot; &quot; &amp; sProgressMoreTemplates
+End Sub
+
+Sub TakoverFolderName(aEvent as Object)
+Dim RefControlName as String
+Dim oRefControl
+ RefControlName = aEvent.Source.Model.Tag
+ oRefControl = ImportDialogArea.GetControl(RefControlName)
+ GetFolderName(oRefControl.Model)
+ ToggleNextButton()
+End Sub
+
+
+Sub FinalizeDialogButtons()
+ ImportDialog.cmdShowLogFile.Enabled = ((Isnull(oLogDocument) = False) And (ImportDialog.chkLogfile.State = 1))
+ ImportDialog.cmdCancel.Enabled = False
+ ImportDialog.cmdGoOn.Label = sCloseButton
+ ImportDialog.cmdGoOn.Enabled = True
+End Sub
+</script:module> \ No newline at end of file
diff --git a/wizards/source/importwizard/FilesModul.xba b/wizards/source/importwizard/FilesModul.xba
new file mode 100644
index 000000000000..cb999252b24c
--- /dev/null
+++ b/wizards/source/importwizard/FilesModul.xba
@@ -0,0 +1,824 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="FilesModul" script:language="StarBasic">Option Explicit
+
+Public AbsTemplateFound as Integer
+Public AbsDocuFound as Integer
+Public oLogDocument as Object
+Public oLogTable as Object
+Public bLogExists as Boolean
+Public sComment as String
+Public MaxCollectIndex as Integer
+Public bInsertRow as Boolean
+Public sLogUrl as String
+Public sCurPassWord as String
+Public FileCount as Integer
+Public XMLTemplateCount as Integer
+Public PathCollection(7,3) as String
+Public bIsFirstLogTable as Boolean
+Public bFilterTracerIsinsideTable as Boolean
+
+
+Function ReadCollectionPaths(FilesList() as String, sFilterName() as String)
+Dim FilterIndex as Integer
+Dim bRecursive as Boolean
+Dim SearchDir as String
+Dim i as Integer
+Dim n as Integer
+Dim a as Integer
+Dim s as Integer
+Dim t as Integer
+Dim sFileContent() as String
+Dim NewList(0,1) as String
+Dim Index as Integer
+Dim CurFileName as String
+Dim CurExtension as String
+Dim CurFileContent as String
+Dim XMLTemplateContentList() as String
+Dim bIsTemplatePath as Boolean
+Dim MaxIndex as Integer
+Dim NewContentList() as String
+Dim XMLTemplateContentString as String
+Dim ApplIndex as Integer
+Dim bAssignFileName as Boolean
+ bInterruptSearch = False
+ For i = 0 To MaxCollectIndex
+ SearchDir = PathCollection(i,0)
+ bRecursive = PathCollection(i,1)
+ sFileContent() = ArrayoutofString(PathCollection(i,2), &quot;|&quot;)
+ NewList() = ReadDirectories(SearchDir, bRecursive, False, False, sFileContent(), &quot;&quot;)
+ If InterruptProcess Then
+ ReadCollectionPaths() = False
+ Exit Function
+ End If
+ If Ubound(NewList()) &gt; -1 Then
+ bIsTemplatePath = FieldInList(&quot;vor&quot;, sFileContent)
+ If bIsTemplatePath Then
+ XMLTemplateContentString = PathCollection(i,3)
+ XMLTemplateContentList() = ArrayoutofString(XMLTemplateContentString, &quot;|&quot;)
+ If Ubound(XMLTemplateContentList()) &gt; -1 Then
+ MaxIndex = Ubound(NewList())
+ ReDim Preserve NewList(MaxIndex, 1) as String
+ ReDim Preserve NewContentList(MaxIndex) as String
+ a = -1
+ For n = 0 To MaxIndex
+ bAssignFileName = True
+ If InterruptProcess() Then
+ ReadCollectionPaths() = False
+ Exit Function
+ End If
+ CurFileContent = &quot;&quot;
+ CurFileName = NewList(n,0)
+ If (FieldInList(NewList(n,1), XMLTemplateList())) Then
+ CurFileContent = GetRealFileContent(CurFileName)
+ t = SearchArrayforPartString(CurFileContent, XMLTemplateContentList())
+ bAssignFileName = (t &gt; -1)
+ If bAssignFileName Then
+ CurFileContent = XMLTemplateContentList(t)
+ End If
+ NewList(n,1) = CurFileContent
+ End If
+ CurExtension = NewList(n,1)
+ If bAssignFileName Then
+ If a &lt; n Then
+ a = a + 1
+ NewList(a,0) = CurFileName
+ NewList(a,1) = CurExtension
+ If CurFileContent = &quot;&quot; Then
+ CurFileContent = CurExtension
+ End If
+ ApplIndex = GetApplicationIndex(CurFileContent, sFiltername())
+ NewContentList(a) = ApplIndex
+ End If
+ End If
+ Next n
+ If a &lt; MaxIndex And a &gt; -1 Then
+ ReDim Preserve NewList(a, 1) as String
+ End If
+ If a &gt; -1 Then
+ AddListtoFilesList(FilesList(), NewList(), NewContentList())
+ End If
+ End If
+ Else
+ MaxIndex = Ubound(NewList())
+ ReDim Preserve NewContentList(MaxIndex) as String
+ For s = 0 To MaxIndex
+ CurExtension = NewList(s,1)
+ NewContentList(s) = GetApplicationIndex(CurExtension, sFiltername())
+ Next s
+ AddListtoFilesList(FilesList(), NewList(), NewContentList())
+ End If
+ End If
+ Next i
+ ReadCollectionPaths() = Ubound(FilesList()) &gt; -1
+End Function
+
+
+Function GetApplicationIndex(CurFileContent as String, sFilterName() as String) as Integer
+Dim Index as Integer
+Dim i as Integer
+ Index = GetIndexForPartStringinMultiArray(sFilterName(), CurFileContent, 0)
+ If Index &gt;= MaxApplCount Then
+ Index = Index - MaxApplCount
+ End If
+ For i = 0 To MaxApplCount - 1
+ If Applications(i, SBAPPLKEY) = Index Then
+ GetApplicationIndex() = i
+ Exit Function
+ End If
+ Next i
+ GetApplicationIndex() = - 1
+End Function
+
+
+Function InterruptProcess() as Boolean
+ If bCancelTask Or RetValue = 0 Then
+ bConversionIsRunning = False
+ InterruptProcess() = True
+ Exit Function
+ End if
+ InterruptProcess() = False
+End Function
+
+
+Sub AddCollectionPath(ApplIndex as Integer, DocIndex as Integer, RecursiveIndex as Integer, sFiltername() as String, DistIndex as Integer)
+ MaxCollectIndex = MaxCollectIndex + 1
+ PathCollection(MaxCollectIndex, 0) = Applications(ApplIndex, DocIndex)
+ PathCollection(MaxCollectIndex, 1) = Applications(ApplIndex, RecursiveIndex)
+ AddFilterNameToPathItem(ApplIndex, MaxCollectIndex, sFiltername(), DistIndex)
+End Sub
+
+
+Function SetExtension(LocExtension) as String
+ if (Instr(LocExtension, &quot;vnd.sun.xml.impress&quot;)) &gt; 0 then
+ SetExtension() = &quot;vor|sti|std&quot;
+ elseif (Instr(LocExtension, &quot;vnd.sun.xml.writer&quot;)) &gt; 0 then
+ SetExtension() = &quot;vor|stw&quot;
+ elseif (Instr(LocExtension, &quot;vnd.sun.xml.calc&quot;)) &gt; 0 then
+ SetExtension() = &quot;vor|stc&quot;
+ elseif (Instr(LocExtension, &quot;vnd.sun.xml.draw&quot;)) &gt; 0 then
+ SetExtension() = &quot;vor|std|sti&quot;
+ endif
+End Function
+
+Sub AddFilterNameToPathItem(ApplIndex as Integer, CollectIndex as Integer, sFiltername() as String, DistIndex as Integer)
+Dim iKey as Integer
+Dim CurListString as String
+Dim LocExtension as String
+Dim LocContentString as String
+Dim LocXMLTemplateContent as String
+ iKey = Applications(ApplIndex, SBAPPLKEY)
+ CurListString = PathCollection(CollectIndex, 2)
+ LocExtension = sFilterName(iKey +DistIndex, 0)
+ If Len(LocExtension) &gt; SBMAXEXTENSIONLENGTH Then &apos; 7 == Length of two extensions like &apos;sda|sdd
+ LocExtension = SetExtension(LocExtension)
+ LocContentString = sFilterName(iKey +DistIndex, 0)
+ LocContentString = ReplaceString(LocContentString, &quot;|&quot;, &quot;;&quot;)
+ LocXMLTemplateContent = PathCollection(CollectIndex, 3)
+ If LocXMLTemplateContent = &quot;&quot; Then
+ LocXMLTemplateContent = LocContentString
+ Else
+ LocXMLTemplateContent = LocXMLTemplateContent &amp; &quot;|&quot; &amp; LocContentString
+ End If
+ PathCollection(CollectIndex, 3) = LocXMLTemplateContent
+ End If
+ If CurListString = &quot;&quot; Then
+ PathCollection(CollectIndex, 2) = LocExtension
+ Else
+ If Instr(CurListString, LocExtension) = 0 Then
+ PathCollection(CollectIndex, 2) = CurListString &amp; &quot;|&quot; &amp; LocExtension
+ End If
+ End If
+End Sub
+
+
+Sub CheckIfToAddPathToCollection(ApplIndex as Integer, bDoConvertIndex as Integer, DocIndex as Integer, RecursiveIndex as Integer, sFiltername() as String, DistIndex as Integer)
+Dim CollectIndex as Integer
+Dim bCheckDocuType as Boolean
+ bCheckDocuType = Applications(ApplIndex, bDoConvertIndex)
+ If bCheckDocuType Then
+ CollectIndex = GetIndexInMultiArray(PathCollection(), Applications(ApplIndex,DocIndex), 0)
+ If (CollectIndex &gt;-1) Then
+ If Applications(ApplIndex, RecursiveIndex) &lt;&gt; PathCollection(CollectIndex, 1) Then
+ AddCollectionPath(ApplIndex, DocIndex, RecursiveIndex, sFilterName(), DistIndex)
+ Else
+ AddFilterNameToPathItem(ApplIndex, CollectIndex, sFilterName(), DistIndex)
+ End If
+ Else
+ AddCollectionPath(ApplIndex, DocIndex, RecursiveIndex, sFilterName(), DistIndex)
+ End If
+ End If
+End Sub
+
+
+Sub CollectPaths(sFiltername() as String)
+Dim i as Integer
+Dim XMLTemplateContentString as String
+ MaxCollectIndex = -1
+ For i = 0 To ApplCount-1
+ CheckIfToAddPathToCollection(i, SBDOCCONVERT, SBDOCSOURCE, SBDOCRECURSIVE, sFilterName(), 0)
+ Next i
+ XMLTemplateCount = 0
+ XMLTemplateContentString = &quot;&quot;
+ For i = 0 To ApplCount-1
+ If WizardMode = SBXMLMODE Then
+ XMLTemplateCount = XMLTemplateCount + 1
+ End If
+ CheckIfToAddPathToCollection(i, SBTEMPLCONVERT, SBTEMPLSOURCE, SBTEMPLRECURSIVE, sFilterName(), MaxApplCount)
+ Next i
+End Sub
+
+
+Sub ConvertAllDocuments(sFilterName() as String)
+Dim FileProperties(1) as new com.sun.star.beans.PropertyValue
+Dim PWFileProperties(2) as New com.sun.star.beans.PropertyValue
+Dim WriterWebProperties(0) as new com.sun.star.beans.PropertyValue
+Dim OpenProperties(4) as new com.sun.star.beans.PropertyValue
+Dim oInteractionHandler as Object
+Dim InteractionTypes(0) as Long
+Dim FilesList(0,2) as String
+Dim sViewPath as String
+Dim i as Integer
+Dim FilterIndex as Integer
+Dim sSourceUrl as String
+Dim CurFilename as String
+Dim oDocument as Object
+Dim sExtension as String
+Dim OldExtension as String
+Dim CurFound as Integer
+Dim TotFound as Integer
+Dim TargetStemDir as String
+Dim SourceStemDir as String
+Dim TargetDir as String
+Dim sTargetUrl as String
+Dim CurFilterName as String
+Dim ApplIndex as Integer
+Dim Index as Integer
+Dim bIsDocument as Boolean
+Dim bDoSave as Boolean
+Dim sCurFileExists as String
+Dim MaxFileIndex as Integer
+Dim bContainsBasicMacro as Boolean
+Dim bIsPassWordProtected as Boolean
+Dim iOverwrite as Integer
+Dim sMimeTypeorExtension as String
+Dim sPrevMimeTypeorExtension as String
+ bConversionisrunning = True
+ InteractionTypes(0) = com.sun.star.task.PasswordRequestMode.PASSWORD_REENTER
+ oInteractionHandler = createUnoService(&quot;com.sun.star.task.InteractionHandler&quot;)
+ oInteractionHandler.initialize(InteractionTypes())
+ iGeneralOverwrite = SBOVERWRITEUNDEFINED
+ bConversionIsRunning = True
+ bLogExists = false
+ AbsTemplateFound = 0
+ AbsDocuFound = 0
+ CollectPaths(sFiltername())
+ If Not ReadCollectionPaths(FilesList(), sFilterName()) Then
+ TotFound = 0
+ SetProgressDisplay(0)
+ bConversionisrunning = false
+ FinalizeDialogButtons()
+ Exit Sub
+ End If
+ TotFound = Ubound(FilesList()) + 1
+ If FilesList(0,0) = &quot;&quot; Then &apos; Querying the number of fields in a multidimensionl Array is unsecure
+ TotFound = 0 &apos; because it will return the value 0 (and not -1) even when the Array is empty
+ SetProgressDisplay(0)
+ End If
+ BubbleSortList(FilesList(), true)
+ If TotFound &gt; 0 Then
+ CreateLogDocument(OpenProperties())
+ InitializeProgressPage(ImportDialog)
+ OpenProperties(0).Name = &quot;Hidden&quot;
+ OpenProperties(0).Value = True
+ OpenProperties(1).Name = &quot;AsTemplate&quot;
+ OpenProperties(1).Value = False
+ OpenProperties(2).Name = &quot;MacroExecutionMode&quot;
+ OpenProperties(2).Value = com.sun.star.document.MacroExecMode.NEVER_EXECUTE
+ OpenProperties(3).Name = &quot;UpdateDocMode&quot;
+ OpenProperties(3).Value = com.sun.star.document.UpdateDocMode.NO_UPDATE
+ OpenProperties(4).Name = &quot;InteractionHandler&quot;
+ OpenProperties(4).Value = oInteractionHandler
+ MaxFileIndex = Ubound(FilesList(),1)
+ FileCount = 0
+ For i = 0 To MaxFileIndex
+ sComment = &quot;&quot;
+ If InterruptProcess() Then
+ Exit For
+ End If
+ bDoSave = True
+ sSourceUrl = FilesList(i,0)
+ sPrevMimeTypeorExtension = sMimeTypeorExtension
+ sMimeTypeorExtension = FilesList(i,1)
+ CurFiltername = GetFilterName(sMimeTypeorExtension, sFilterName(), sExtension, FilterIndex)
+ ApplIndex = FilesList(i,2)
+ If sMimeTypeorExtension &lt;&gt; sPrevMimeTypeorExtension Then
+ CreateLogTable(ApplIndex, sMimeTypeOrExtension, sFiltername()
+ End If
+ If ApplIndex &gt; Ubound(Applications) or (ApplIndex &lt; 0) Then
+ Msgbox &quot;Applicationindex out of bounds:&quot; &amp; sSourcUrl
+ End If
+ sViewPath = ConvertFromUrl(sSourceUrl) &apos; CutPathView(sSourceUrl, 70)
+ ImportDialog.LabelCurDocument.Label = Str(i+1) &amp; &quot;/&quot; &amp; MaxFileIndex + 1 &amp; &quot; (&quot; &amp; sViewPath &amp; &quot;)&quot;
+ Select Case lcase(sExtension)
+ Case &quot;odt&quot;, &quot;ods&quot;, &quot;odp&quot;, &quot;odg&quot;, &quot;odm&quot;, &quot;odf&quot;
+ SourceStemDir = RTrimStr(Applications(ApplIndex,SBDOCSOURCE), &quot;/&quot;)
+ TargetStemDir = RTrimStr(Applications(ApplIndex,SBDOCTARGET), &quot;/&quot;)
+ Case Else &apos; Templates and Helper-Applications remain
+ SourceStemDir = RTrimStr(Applications(ApplIndex,SBTEMPLSOURCE), &quot;/&quot;)
+ TargetStemDir = RTrimStr(Applications(ApplIndex,SBTEMPLTARGET), &quot;/&quot;)
+ End Select
+ sTargetUrl = ReplaceString(sSourceUrl, TargetStemDir, SourceStemDir)
+ CurFilename = GetFileNameWithoutExtension(sTargetUrl, &quot;/&quot;)
+ OldExtension = GetFileNameExtension(sTargetUrl)
+ sTargetUrl = RTrimStr(sTargetUrl, OldExtension)
+ sTargetUrl = sTargetUrl &amp; sExtension
+ TargetDir = RTrimStr(sTargetUrl, CurFilename &amp; &quot;.&quot; &amp; sExtension)
+ If (oUcb.Exists(sTargetUrl)) Then
+ If (iGeneralOverwrite &lt;&gt; SBOVERWRITEALWAYS) Then
+ If (iGeneralOverwrite = SBOVERWRITEUNDEFINED) Then
+ ShowOverwriteAllDialog(sTargetUrl, sTitle)
+ bDoSave = (iGeneralOverwrite = SBOVERWRITEQUERY) Or (iGeneralOverwrite = SBOVERWRITEALWAYS)
+ Elseif iGeneralOverwrite = SBOVERWRITENEVER Then
+ bDoSave = False
+ ElseIf ((iGeneralOverWrite = SBOVERWRITEQUERY) OR (iGeneralOverwrite = SBOVERWRITECANCEL)) Then
+ &apos; Todo: According to AS there might come a new feature that storeasUrl could possibly rise a UI dialog.
+ &apos; In this case my own UI becomes obsolete
+ sCurFileExists = ReplaceString(sFileExists, ConvertFromUrl(sTargetUrl), &quot;&lt;1&gt;&quot;)
+ sCurFileExists = ReplaceString(sCurFileExists, chr(13), &quot;&lt;CR&gt;&quot;)
+ iOverWrite = Msgbox (sCurFileExists, 32 + 3, sTitle)
+ Select Case iOverWrite
+ Case 1 &apos; OK
+ &apos; In the FileProperty-Bean this is already default
+ bDoSave = True
+ Case 2 &apos; Abort
+ CancelTask(False)
+ bDoSave = False
+ Case 7 &apos; No
+ bDoSave = False
+ End Select
+ End If
+ End If
+ End If
+ If bDoSave Then
+ If Not oUcb.Exists(TargetDir) Then
+ bDoSave = CreateFolder(TargetDir)
+ End If
+ If bDoSave Then
+ oDocument = StarDesktop.LoadComponentFromURL(sSourceUrl, &quot;_default&quot;, 0, OpenProperties())
+ If Not IsNull(oDocument) Then
+ InsertSourceUrlToLogDocument(sSourceUrl, &quot;&quot;)
+ bIsPassWordProtected = CheckPassWordProtection(oDocument)
+ CheckIfMacroExists(oDocument.BasicLibraries, sComment)
+ On Local Error Goto NOSAVING
+ If bIsPassWordProtected Then
+ PWFileProperties(0).Name = &quot;FilterName&quot;
+ PWFileProperties(0).Value = CurFilterName
+ PWFileProperties(1).Name = &quot;Overwrite&quot;
+ PWFileProperties(1).Value = True
+ PWFileProperties(2).Name = &quot;Password&quot;
+ PWFileProperties(2).Value = sCurPassWord
+ oDocument.StoreAsUrl(sTargetUrl, PWFileProperties())
+ Else
+ FileProperties(0).Name = &quot;FilterName&quot;
+ FileProperties(0).Value = CurFilterName
+ FileProperties(1).Name = &quot;Overwrite&quot;
+ FileProperties(1).Value = True
+ oDocument.StoreAsUrl(sTargetUrl,FileProperties())
+ End If
+ &apos; Todo: Make sure that an errorbox pops up when saving fails
+ NOSAVING:
+ If Err &lt;&gt; 0 Then
+ sCurcouldnotsaveDocument = ReplaceString(scouldnotsaveDocument, ConvertFromUrl(sTargetUrl), &quot;&lt;1&gt;&quot;)
+ sComment = ConcatComment(sComment, sCurCouldnotsaveDocument)
+ Resume LETSGO
+ LETSGO:
+ Else
+ FileCount = FileCount + 1
+ End If
+ oDocument.Dispose()
+ InsertTargetUrlToLogDocument(sTargetUrl, sComment, ApplIndex)
+ Else
+ sCurcouldnotopenDocument = ReplaceString(scouldnotopenDocument, ConvertFromUrl(sSourceUrl), &quot;&lt;1&gt;&quot;)
+ sComment = ConcatComment(sComment, sCurCouldnotopenDocument)
+ InsertSourceUrlToLogDocument(sSourceUrl, sComment)
+ End If
+ End If
+ End If
+ Next i
+ End If
+ AddLogStatistics()
+ FinalizeDialogButtons()
+ bConversionIsRunning = False
+ Exit Sub
+RTError:
+ Msgbox sRTErrorDesc, 16, sRTErrorHeader
+End Sub
+
+
+
+Sub AddListtoFilesList(FirstList(), SecList(), NewContentList() as String)
+Dim sLocExtension as String
+Dim FirstStart as Integer
+Dim FirstEnd as Integer
+Dim i as Integer
+Dim s as Integer
+ If FirstList(0,0) = &quot;&quot; Then
+ FirstStart = Ubound(FirstList(),1)
+ Else
+ FirstStart = Ubound(FirstList(),1) + 1
+ End If
+ FirstEnd = FirstStart + Ubound(SecList(),1)
+ ReDim Preserve FirstList(FirstEnd,2)
+ s = 0
+ For i = FirstStart To FirstEnd
+ FirstList(i,0) = SecList(s,0)
+ FirstList(i,1) = SecList(s,1)
+ sLocExtension = lcase(FirstList(i,1))
+ Select Case sLocExtension
+ Case &quot;sdw&quot;, &quot;sdc&quot;, &quot;sda&quot;, &quot;sdd&quot;, &quot;smf&quot;, &quot;sgl&quot;, &quot;doc&quot;, &quot;xls&quot;, &quot;ppt&quot;, &quot;sxi&quot; , &quot;sxw&quot; , &quot;sxd&quot; , &quot;sxg&quot; , &quot;sxm&quot; , &quot;sxc&quot; , &quot;pps&quot;
+ AbsDocuFound = AbsDocuFound + 1
+ Case else
+ AbsTemplateFound = AbsTemplateFound + 1
+ End Select
+ FirstList(i,2) = CStr(NewContentList(s))
+ s = s + 1
+ Next i
+ SetProgressDisplay(Ubound(FirstList()) + 1)
+End Sub
+
+
+
+Function GetTargetTemplatePath(Index as Integer)
+ Select Case WizardMode
+ Case SBMICROSOFTMODE
+ GetTargetTemplatePath() = SOTemplatePath &amp; &quot;/&quot; &amp; sTemplateGroupName
+ Case SBXMLMODE
+ If Index = 3 Then
+ &apos; Helper Application
+ GetTargetTemplatePath = SOWorkPath
+ Else
+ GetTargetTemplatePath = SOTemplatePath
+ End If
+ End Select
+End Function
+
+
+&apos; Retrieves the second value for a next to &apos;SearchString&apos; in
+&apos; a two-dimensional string-Array
+Function GetFilterName(sMimetypeorExtension as String, sFilterName(), sExtension as string, FilterIndex as Integer) as String
+Dim i as Integer
+Dim MaxIndex as Integer
+Dim sLocFilterlist() as String
+ For i = 0 To Ubound(sFiltername(),1)
+ If Instr(1,sFilterName(i,0),sMimeTypeOrExtension) &lt;&gt; 0 Then
+ sLocFilterList() = ArrayoutofString(sFiltername(i,0),&quot;|&quot;, MaxIndex)
+ If MaxIndex = 0 Then
+ sExtension = sFiltername(i,2)
+ GetFilterName = sFilterName(i,1)
+ Else
+ Dim b as Integer
+ Dim sLocExtensionList() as String
+ b = SearchArrayForPartString(sMimetypeOrExtension, sLocFilterList())
+ sLocFilterList() = ArrayoutofString(sFiltername(i,1),&quot;|&quot;, MaxIndex)
+ GetFilterName = sLocFilterList(b)
+ sLocExtensionList() = ArrayoutofString(sFilterName(i,2), &quot;|&quot;, MaxIndex)
+ sExtension = sLocExtensionList(b)
+ End If
+ Exit For
+ End If
+ Next
+ FilterIndex = i
+End Function
+
+
+Function SearchArrayforPartString(SearchString as String, LocList()) as Integer
+Dim i as Integer
+Dim a as Integer
+Dim StringList() as String
+ For i = Lbound(LocList(),1) to Ubound(LocList(),1)
+ StringList() = ArrayoutofString(LocList(i), &quot;|&quot;)
+ For a = 0 To Ubound(StringList())
+ If (Instr(1, SearchString, StringList(a)) &lt;&gt; 0) Then
+ SearchArrayForPartString() = i
+ Exit Function
+ End If
+ Next a
+ Next i
+ SearchArrayForPartString() = -1
+End Function
+
+
+Sub CreateLogTable(ApplIndex as Integer, CurFileContent as String, sFilterName() as String)
+Dim oLogCursor as Object
+Dim oLogRows as Object
+Dim FilterIndex as Integer
+Dim sDocumentType as String
+Dim oTextCursor
+Dim oCell
+ If Not bLogExists Then
+ Exit Sub
+ End If
+ bFilterTracerIsinsideTable = False
+ FilterIndex = GetIndexForPartStringinMultiArray(sFilterName(), CurFileContent, 0)
+ sDocumentType = sFiltername(FilterIndex,3)
+ oLogCursor = oLogDocument.Text.createTextCursor()
+ oLogCursor.GotoEnd(False)
+ If Not bIsFirstLogTable Then
+ oLogDocument.Text.insertControlCharacter(oLogCursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, False)
+ Else
+ bisFirstLogTable = False
+ End If
+ oLogCursor.HyperLinkURL = &quot;&quot;
+ oLogCursor.HyperLinkName = &quot;&quot;
+ oLogCursor.HyperLinkTarget = &quot;&quot;
+ oLogCursor.ParaStyleName = &quot;Heading 1&quot;
+ oLogCursor.setString(sDocumentType)
+ If WizardMode = SBMICROSOFTMODE Then
+ If bFilterTracingAvailable Then
+ If bMSApplFilterTracingAvailable(ApplIndex) Then
+ Dim CurFilterTracingPath as String
+ CurFilterTracingPath = FilterTracingLogPath(ApplIndex)
+ bFilterTracerIsinsideTable = (bTakeOverTargetName(ApplIndex) Or bTakeOverPathName(ApplIndex))
+ If Not bFilterTracerIsinsideTable Then
+ oLogCursor.CollapseToEnd()
+ oLogDocument.Text.insertControlCharacter(oLogCursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, False)
+ InsertCommandButtonatViewCursor(oLogDocument, oLogCursor, CurFilterTracingPath)
+ End If
+ End If
+ End If
+ End If
+ oLogCursor.CollapsetoEnd()
+ oLogDocument.Text.insertControlCharacter(oLogCursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, False)
+ oLogTable = oLogDocument.CreateInstance(&quot;com.sun.star.text.TextTable&quot;)
+ oLogTable.RepeatHeadline = true
+ If bFilterTracerIsinsideTable Then
+ oLogTable.initialize(2,3)
+ End If
+ oLogCursor.Text.InsertTextContent(oLogCursor, oLogTable, True)
+ oTextCursor = oLogTable.GetCellbyPosition(0,0).createTextCursor()
+ oTextCursor.SetString(sSourceDocuments)
+ oTextCursor = oLogTable.GetCellbyPosition(1,0).createTextCursor()
+ oTextCursor.SetString(sTargetDocuments)
+ If bFilterTracerIsinsideTable Then
+ oTextCursor = oLogTable.GetCellbyPosition(2,0).createTextCursor()
+ oTextCursor.SetString(&quot;FilterTracer&quot;)
+ End If
+ bInsertRow = False
+End Sub
+
+
+Function GetSize(iWidth, iHeight) As New com.sun.star.awt.Size
+Dim aSize As New com.sun.star.awt.Size
+ aSize.Width = iWidth
+ aSize.Height = iHeight
+ GetSize() = aSize
+End Function
+
+
+Sub InsertCommandButtonatViewCursor(oLocDocument, oLocCursor, TargetUrl as String, Optional aSize)
+Dim oDocument
+Dim oController
+Dim oCommandButton
+Dim oShape
+Dim oDrawPage
+Dim oCommandControl
+Dim oEvent
+Dim oCell
+ oCommandButton = oLocDocument.createInstance(&quot;com.sun.star.form.component.CommandButton&quot;)
+ oShape = oLocDocument.CreateInstance (&quot;com.sun.star.drawing.ControlShape&quot;)
+ If IsMissing(aSize) Then
+ oShape.Size = GetSize(4000, 600)
+ End If
+ oCommandButton.Label = FileNameoutofPath(Targeturl)
+ oCommandButton.TargetFrame = &quot;_default&quot;
+ oCommandButton.ButtonType = com.sun.star.form.FormButtonType.URL
+ oCommandbutton.DispatchUrlInternal = True
+ oCommandButton.TargetURL = ConverttoUrl(TargetUrl)
+ oShape.Control = oCommandbutton
+ oLocCursor.Text.InsertTextContent(oLocCursor, oShape, True)
+End Sub
+
+
+
+Sub CreateLogDocument(HiddenProperties())
+Dim OpenProperties(0) as new com.sun.star.beans.PropertyValue
+Dim NoArgs()
+Dim i as Integer
+Dim bLogIsThere as Boolean
+ If ImportDialog.chkLogfile.State = 1 Then
+ i = 2
+ OpenProperties(0).Name = &quot;Hidden&quot;
+ OpenProperties(0).Value = True
+ oLogDocument = StarDesktop.LoadComponentFromURL(&quot;private:factory/swriter&quot;, &quot;_default&quot;, 4, OpenProperties())
+ SOWorkPath = RTrimStr(SOWorkPath,&quot;/&quot;)
+ sLogUrl = SOWorkPath &amp; &quot;/Logfile.odt&quot;
+ Do
+ bLogIsThere = oUcb.Exists(sLogUrl)
+ If bLogIsThere Then
+ If i = 2 Then
+ sLogUrl = ReplaceString(sLogUrl, &quot;/Logfile_2.odt&quot;, &quot;/Logfile.odt&quot;)
+ Else
+ sLogUrl = ReplaceString(sLogUrl, &quot;/Logfile_&quot; &amp; cStr(i) &amp; &quot;.odt&quot;, &quot;/Logfile_&quot; &amp; cStr(i-1) &amp; &quot;.odt&quot;)
+ End If
+ i = i + 1
+ End If
+ Loop Until Not bLogIsThere
+ bLogExists = True
+ oLogDocument.StoreAsUrl(sLogUrl, NoArgs())
+ End If
+End Sub
+
+
+Function GetFilterTracingLogPath(sTargetUrl as String, ApplIndex) as String
+Dim TargetFileName as String
+Dim sTargetFolder as String
+Dim CurFilterTracingPath as String
+Dim CurFilterTracingname as String
+Dim CurFilterFolder as String
+ CurFilterTracingPath = FilterTracingLogPath(ApplIndex)
+ If bTakeOverTargetName(ApplIndex) Then
+ TargetFilename = GetFileNameWithoutextension(sTargetUrl, &quot;/&quot;)
+ CurFilterFolder = DirectoryNameoutofPath(FilterTracingLogPath(ApplIndex), &quot;/&quot;)
+ CurFilterTracingpath = CurFilterFolder &amp; &quot;/&quot; &amp; TargetFilename &amp; &quot;.log&quot;
+ End If
+ If bTakeOverPathName(ApplIndex) Then &apos;Replace the Folder in the FilterTracerpath by the Folder of the targetUrl
+ sTargetFolder = DirectoryNameoutofPath(sTargetUrl,&quot;/&quot;)
+ CurFilterTracingPath = sTargetFolder &amp; &quot;/&quot; &amp; FileNameoutofPath(CurFilterTracingPath, &quot;/&quot;)
+ End If
+ GetFilterTracingLogPath() = CurFilterTracingPath
+End Function
+
+
+Sub InsertTargetUrlToLogDocument(sTargetUrl as String, sComment as String, ApplIndex as Integer)
+Dim oCell
+Dim oTextCursor
+Dim CurFilterTracingpath as String
+ If (bLogExists) And (sTargetUrl &lt;&gt; &quot;&quot;) Then
+ If sTargetUrl &lt;&gt; &quot;&quot; Then
+ oCell = oLogTable.GetCellbyPosition(1,oLogTable.Rows.Count-1)
+ InsertCommentToLogCell(sComment, oCell)
+ InsertHyperLinkToLogCell(sTargetUrl, oCell)
+ If bFilterTracerIsinsideTable Then
+ oCell = oLogTable.getCellByPosition(2, oLogTable.Rows.Count-1)
+ oTextCursor = oCell.Text.CreateTextCursor()
+ CurFilterTracingpath = GetFilterTracingLogPath(sTargetUrl, ApplIndex)
+ InsertCommandButtonatViewCursor(oLogDocument, oTextCursor, CurFilterTracingPath)
+ End If
+ oLogDocument.Store()
+ End If
+ End If
+End Sub
+
+
+Sub InsertSourceUrlToLogDocument(SourceUrl as String, sComment) &apos;
+Dim oCell as Object
+ If bLogExists Then
+ If bInsertRow Then
+ oLogTable.Rows.InsertByIndex(oLogTable.Rows.Count,1)
+ Else
+ bInsertRow = True
+ End If
+ oCell = oLogTable.GetCellbyPosition(0,oLogTable.Rows.Count-1)
+ InsertCommentToLogCell(sComment, oCell)
+ InsertHyperLinkToLogCell(SourceUrl, oCell)
+ oLogDocument.Store()
+ End If
+End Sub
+
+
+Sub InsertHyperLinkToLogCell(sUrl as String, oCell as Object)
+Dim oLogCursor as Object
+Dim LocFileName as String
+ oLogCursor = oCell.createTextCursor()
+ oLogCursor.CollapseToStart()
+ oLogCursor.HyperLinkURL = sUrl
+ oLogCursor.HyperLinkName = sUrl
+ oLogCursor.HyperLinkTarget = sUrl
+ LocFileName = FileNameOutOfPath(sUrl)
+ oCell.InsertString(oLogCursor, LocFileName,False)
+End Sub
+
+
+Sub InsertCommentToLogCell(sComment as string, oCell as Object)
+Dim oCommentCursor as Object
+ If sComment &lt;&gt; &quot;&quot; Then
+ oCommentCursor = oCell.createTextCursor()
+ oCell.insertControlCharacter(oCommentCursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, False)
+ oCell.insertString(oCommentCursor, sComment, false)
+ End If
+End Sub
+
+
+Sub AddLogStatistics()
+Dim oCell as Object
+Dim oLogCursor as Object
+Dim MaxRowIndex as Integer
+ If bLogExists Then
+ MaxRowIndex = oLogTable.Rows.Count
+ sLogSummary = ReplaceString(sLogSummary, FileCount, &quot;&lt;COUNT&gt;&quot;)
+&apos; oLogTable.Rows.InsertByIndex(MaxRowIndex, 1)
+&apos; oCell = oLogTable.GetCellbyPosition(0, MaxRowIndex)
+&apos; oLogCursor = oCell.createTextCursor()
+&apos; oCell.InsertString(oLogCursor, sLogSummary,False)
+&apos; MergeRange(oLogTable, oCell, 1)
+
+ oLogCursor = oLogDocument.Text.CreateTextCursor
+ oLogCursor.gotoEnd(False)
+ oLogCursor.HyperLinkURL = &quot;&quot;
+ oLogCursor.HyperLinkName = &quot;&quot;
+ oLogCursor.HyperLinkTarget = &quot;&quot;
+ oLogCursor.SetString(sLogSummary)
+ oLogDocument.Store()
+ oLogDocument.Dispose()
+ bLogExists = False
+ End If
+End Sub
+
+
+
+Function CheckIfMacroExists(oBasicLibraries as Object, sComment as String) as Boolean
+Dim ModuleNames() as String
+Dim ModuleName as String
+Dim MaxLibIndex as Integer
+Dim MaxModuleIndex as Integer
+Dim bMacroExists as Boolean
+Dim n as Integer
+Dim m as Integer
+Dim LibName as String
+Dim sBasicCode as String
+Dim oLibrary as Object
+ bMacroExists = False
+ bMacroExists = oBasicLibraries.hasElements
+ If bMacroExists Then
+ MaxLibIndex = Ubound(oBasicLibraries.ElementNames())
+ For n = 0 To MaxLibIndex
+ LibName = oBasicLibraries.ElementNames(n)
+ If oBasicLibraries.isLibraryLoaded(LibName) Then
+ oLibrary = oBasicLibraries.getbyName(LibName)
+ If oLibrary.hasElements() Then
+ MaxModuleIndex = Ubound(oLibrary.ElementNames())
+ For m = 0 To MaxModuleIndex
+ ModuleName = oLibrary.ElementNames(m)
+ sBasicCode = oLibrary.getbyName(ModuleName)
+ If sBasicCode &lt;&gt; &quot;&quot; Then
+ ConcatComment(sComment, sReeditMacro)
+ CheckIfMacroExists() = True
+ Exit Function
+ End If
+ Next m
+ End If
+ End If
+ Next n
+ End If
+ CheckIfMacroExists() = False
+End Function
+
+
+
+Function CheckPassWordProtection(oDocument as Object)
+Dim bIsPassWordProtected as Boolean
+Dim i as Integer
+Dim oArgs()
+Dim MaxIndex as Integer
+Dim sblabla as String
+ bIsPassWordProtected = false
+ oArgs() = oDocument.getArgs()
+ MaxIndex = Ubound(oArgs())
+ For i = 0 To MaxIndex
+ sblabla = oArgs(i).Name
+ If oArgs(i).Name = &quot;Password&quot; Then
+ bIsPassWordProtected = True
+ sCurPassWord = oArgs(i).Value
+ Exit For
+ End If
+ Next i
+ CheckPassWordProtection() = bIsPassWordProtected
+End Function
+
+
+Sub OpenLogDocument()
+
+ bShowLogFile = True
+ ImportDialogArea.endexecute()
+
+End Sub
+
+
+Sub MergeRange(oTable as Object, oCell as Object, MergeCount as Integer)
+Dim oTableCursor as Object
+ oTableCursor = oTable.createCursorByCellName(oCell.CellName)
+ oTableCursor.goRight(MergeCount, True)
+ oTableCursor.mergeRange()
+End Sub
+
+
+Function ConcatComment(sComment as String, AdditionalComment as String)
+ If sComment = &quot;&quot; Then
+ sComment = AdditionalComment
+ Else
+ sComment = sComment &amp; chr(13) + AdditionalComment
+ End If
+ ConcatComment = sComment
+End Function
+</script:module>
diff --git a/wizards/source/importwizard/ImportDialog.xdl b/wizards/source/importwizard/ImportDialog.xdl
new file mode 100644
index 000000000000..082c06bc8970
--- /dev/null
+++ b/wizards/source/importwizard/ImportDialog.xdl
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
+<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="ImportDialog" dlg:left="96" dlg:top="28" dlg:width="270" dlg:height="210" dlg:page="4" dlg:help-url="HID:34570" dlg:closeable="true" dlg:moveable="true" dlg:title="ImportDialog">
+ <dlg:bulletinboard>
+ <dlg:text dlg:id="lblTemplateExport" dlg:tab-index="0" dlg:left="12" dlg:top="94" dlg:width="60" dlg:height="8" dlg:page="2" dlg:value="lblTemplateExport"/>
+ <dlg:textfield dlg:id="txtTemplateImportPath" dlg:tab-index="1" dlg:left="73" dlg:top="76" dlg:width="170" dlg:height="12" dlg:page="2" dlg:help-url="HID:34583">
+ <script:event script:event-name="on-textchange" script:macro-name="vnd.sun.star.script:ImportWizard.Main.ToggleNextButton?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:textfield>
+ <dlg:textfield dlg:id="txtTemplateExportPath" dlg:tab-index="2" dlg:left="73" dlg:top="92" dlg:width="170" dlg:height="12" dlg:page="2" dlg:help-url="HID:34584"/>
+ <dlg:checkbox dlg:id="chkDocumentPath" dlg:tab-index="3" dlg:left="12" dlg:top="121" dlg:width="240" dlg:height="10" dlg:page="2" dlg:tag="Document" dlg:help-url="HID:34586" dlg:value="chkDocumentPath" dlg:checked="true">
+ <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:ImportWizard.DialogModul.ToggleInputPaths?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:checkbox>
+ <dlg:checkbox dlg:id="chkDocumentSearchSubDir" dlg:tab-index="4" dlg:left="12" dlg:top="134" dlg:width="240" dlg:height="10" dlg:page="2" dlg:help-url="HID:34587" dlg:value="chkDocumentSearchSubDir" dlg:checked="false"/>
+ <dlg:text dlg:id="lblDocumentImport" dlg:tab-index="5" dlg:left="10" dlg:top="151" dlg:width="60" dlg:height="8" dlg:page="2" dlg:value="lblDocumentImport"/>
+ <dlg:text dlg:id="lblDocumentExport" dlg:tab-index="6" dlg:left="10" dlg:top="167" dlg:width="60" dlg:height="8" dlg:page="2" dlg:value="lblDocumentExport"/>
+ <dlg:textfield dlg:id="txtDocumentImportPath" dlg:tab-index="7" dlg:left="73" dlg:top="149" dlg:width="170" dlg:height="12" dlg:page="2" dlg:help-url="HID:34588">
+ <script:event script:event-name="on-textchange" script:macro-name="vnd.sun.star.script:ImportWizard.Main.ToggleNextButton?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:textfield>
+ <dlg:textfield dlg:id="txtDocumentExportPath" dlg:tab-index="8" dlg:left="73" dlg:top="165" dlg:width="170" dlg:height="12" dlg:page="2" dlg:help-url="HID:34589"/>
+ <dlg:text dlg:id="SummaryHeaderLabel" dlg:tab-index="9" dlg:left="6" dlg:top="37" dlg:width="258" dlg:height="8" dlg:page="3" dlg:value="SummaryHeaderLabel"/>
+ <dlg:textfield dlg:id="SummaryTextbox" dlg:tab-index="10" dlg:left="5" dlg:top="48" dlg:width="259" dlg:height="125" dlg:page="3" dlg:help-url="HID:34595" dlg:vscroll="true" dlg:multiline="true" dlg:readonly="true"/>
+ <dlg:text dlg:id="LabelRetrieval" dlg:tab-index="11" dlg:left="10" dlg:top="67" dlg:width="255" dlg:height="8" dlg:page="4" dlg:value="LabelRetrieval"/>
+ <dlg:text dlg:id="LabelCurTemplateRetrieval" dlg:tab-index="12" dlg:left="15" dlg:top="79" dlg:width="249" dlg:height="8" dlg:page="4" dlg:value="LabelCurTemplateRetrieval"/>
+ <dlg:text dlg:id="LabelCurDocumentRetrieval" dlg:tab-index="13" dlg:left="15" dlg:top="91" dlg:width="249" dlg:height="8" dlg:page="4" dlg:value="LabelCurDocumentRetrieval"/>
+ <dlg:text dlg:id="LabelCurProgress" dlg:tab-index="14" dlg:left="10" dlg:top="106" dlg:width="255" dlg:height="8" dlg:page="4" dlg:value="LabelCurProgress"/>
+ <dlg:text dlg:id="LabelCurDocument" dlg:tab-index="15" dlg:left="15" dlg:top="118" dlg:width="249" dlg:height="20" dlg:page="4" dlg:value="LabelCurDocument" dlg:multiline="true"/>
+ <dlg:img dlg:id="ImportPreview" dlg:tab-index="16" dlg:left="5" dlg:top="6" dlg:width="258" dlg:height="26" dlg:scale-image="false"/>
+ <dlg:button dlg:id="cmdBack" dlg:tab-index="17" dlg:left="155" dlg:top="190" dlg:width="50" dlg:height="14" dlg:help-url="HID:34573" dlg:value="cmdBack">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:ImportWizard.Main.PrevStep?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:button dlg:id="cmdCancel" dlg:tab-index="18" dlg:left="6" dlg:top="190" dlg:width="50" dlg:height="14" dlg:help-url="HID:34572" dlg:value="cmdCancel">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:ImportWizard.Main.CancelTask?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:button dlg:id="cmdHelp" dlg:tab-index="19" dlg:left="65" dlg:top="190" dlg:width="50" dlg:height="14" dlg:value="cmdHelp" dlg:button-type="help"/>
+ <dlg:button dlg:id="cmdGoOn" dlg:tab-index="20" dlg:left="214" dlg:top="190" dlg:width="50" dlg:height="14" dlg:help-url="HID:34574" dlg:value="cmdGoOn">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:ImportWizard.Main.NextStep?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:text dlg:id="WelcomeTextLabel" dlg:tab-index="21" dlg:left="6" dlg:top="38" dlg:width="258" dlg:height="20" dlg:page="1" dlg:value="WelcomeTextLabel" dlg:multiline="true"/>
+ <dlg:text dlg:id="WelcomeTextLabel3" dlg:tab-index="22" dlg:left="6" dlg:top="58" dlg:width="258" dlg:height="12" dlg:page="1" dlg:value="WelcomeTextLabel3"/>
+ <dlg:button dlg:id="cmdTemplateImport" dlg:tab-index="23" dlg:left="248" dlg:top="75" dlg:width="14" dlg:height="14" dlg:page="2" dlg:tag="txtTemplateImportPath" dlg:help-url="HID:34585" dlg:value="...">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:ImportWizard.DialogModul.TakoverFolderName?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:button dlg:id="cmdTemplateExport" dlg:tab-index="24" dlg:left="248" dlg:top="91" dlg:width="14" dlg:height="14" dlg:page="2" dlg:tag="txtTemplateExportPath" dlg:help-url="HID:34600" dlg:value="...">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:ImportWizard.DialogModul.TakoverFolderName?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:button dlg:id="cmdDocumentImport" dlg:tab-index="25" dlg:left="248" dlg:top="148" dlg:width="14" dlg:height="14" dlg:page="2" dlg:tag="txtDocumentImportPath" dlg:help-url="HID:34590" dlg:value="...">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:ImportWizard.DialogModul.TakoverFolderName?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:button dlg:id="cmdDocumentExport" dlg:tab-index="26" dlg:left="248" dlg:top="164" dlg:width="14" dlg:height="14" dlg:page="2" dlg:tag="txtDocumentExportPath" dlg:help-url="HID:34601" dlg:value="...">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:ImportWizard.DialogModul.TakoverFolderName?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:radiogroup>
+ <dlg:radio dlg:id="optSODocuments" dlg:tab-index="27" dlg:left="6" dlg:top="72" dlg:width="258" dlg:height="9" dlg:page="1" dlg:tag="SO" dlg:help-url="HID:34575" dlg:value="optSODocuments" dlg:checked="true">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:ImportWizard.Main.ToggleCheckboxes?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:radio>
+ <dlg:radio dlg:id="optMSDocuments" dlg:tab-index="28" dlg:left="6" dlg:top="113" dlg:width="258" dlg:height="9" dlg:page="1" dlg:tag="MS" dlg:help-url="HID:34576" dlg:value="optMSDocuments">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:ImportWizard.Main.ToggleCheckboxes?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:radio>
+ </dlg:radiogroup>
+ <dlg:checkbox dlg:id="chkSOApplication1" dlg:tab-index="29" dlg:left="12" dlg:top="85" dlg:width="141" dlg:height="9" dlg:page="1" dlg:help-url="HID:34596" dlg:value="chkSOApplication1" dlg:checked="false">
+ <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:ImportWizard.Main.ToggleNextButton?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:checkbox>
+ <dlg:checkbox dlg:id="chkSOApplication2" dlg:tab-index="30" dlg:left="155" dlg:top="85" dlg:width="109" dlg:height="9" dlg:page="1" dlg:help-url="HID:34597" dlg:value="chkSOApplication2" dlg:checked="false">
+ <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:ImportWizard.Main.ToggleNextButton?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:checkbox>
+ <dlg:checkbox dlg:id="chkSOApplication3" dlg:tab-index="31" dlg:left="12" dlg:top="98" dlg:width="141" dlg:height="9" dlg:page="1" dlg:help-url="HID:34598" dlg:value="chkSOApplication3" dlg:checked="false">
+ <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:ImportWizard.Main.ToggleNextButton?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:checkbox>
+ <dlg:checkbox dlg:id="chkSOApplication4" dlg:tab-index="32" dlg:left="155" dlg:top="98" dlg:width="109" dlg:height="9" dlg:page="1" dlg:help-url="HID:34599" dlg:value="chkSOApplication4" dlg:checked="false">
+ <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:ImportWizard.Main.ToggleNextButton?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:checkbox>
+ <dlg:checkbox dlg:id="chkMSApplication1" dlg:tab-index="33" dlg:disabled="true" dlg:left="12" dlg:top="126" dlg:width="141" dlg:height="9" dlg:page="1" dlg:help-url="HID:34578" dlg:value="chkMSApplication1" dlg:checked="false">
+ <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:ImportWizard.Main.ToggleNextButton?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:checkbox>
+ <dlg:checkbox dlg:id="chkMSApplication2" dlg:tab-index="34" dlg:disabled="true" dlg:left="155" dlg:top="126" dlg:width="109" dlg:height="9" dlg:page="1" dlg:help-url="HID:34579" dlg:value="chkMSApplication2" dlg:checked="false">
+ <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:ImportWizard.Main.ToggleNextButton?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:checkbox>
+ <dlg:checkbox dlg:id="chkMSApplication3" dlg:tab-index="35" dlg:disabled="true" dlg:left="12" dlg:top="139" dlg:width="141" dlg:height="9" dlg:page="1" dlg:help-url="HID:34580" dlg:value="chkMSApplication3" dlg:checked="false">
+ <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:ImportWizard.Main.ToggleNextButton?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:checkbox>
+ <dlg:text dlg:id="WelcomeTextLabel2" dlg:tab-index="36" dlg:disabled="true" dlg:left="6" dlg:top="152" dlg:width="258" dlg:height="18" dlg:page="1" dlg:value="WelcomeTextLabel2" dlg:multiline="true"/>
+ <dlg:checkbox dlg:id="chkTemplatePath" dlg:tab-index="37" dlg:left="12" dlg:top="48" dlg:width="240" dlg:height="10" dlg:page="2" dlg:tag="Template" dlg:help-url="HID:34581" dlg:value="chkTemplatePath" dlg:checked="true">
+ <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:ImportWizard.DialogModul.ToggleInputPaths?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:checkbox>
+ <dlg:checkbox dlg:id="chkTemplateSearchSubDir" dlg:tab-index="38" dlg:left="12" dlg:top="61" dlg:width="240" dlg:height="10" dlg:page="2" dlg:help-url="HID:34582" dlg:value="chkTemplateSearchSubDir" dlg:checked="false"/>
+ <dlg:text dlg:id="lblTemplateImport" dlg:tab-index="39" dlg:left="12" dlg:top="78" dlg:width="60" dlg:height="8" dlg:page="2" dlg:value="lblTemplateImport"/>
+ <dlg:checkbox dlg:id="chkLogfile" dlg:tab-index="40" dlg:left="6" dlg:top="171" dlg:width="136" dlg:height="9" dlg:page="1" dlg:help-url="HID:34577" dlg:value="chkLogfile" dlg:checked="true"/>
+ <dlg:fixedline dlg:id="hlnTemplates" dlg:tab-index="41" dlg:left="6" dlg:top="37" dlg:width="258" dlg:height="8" dlg:page="2" dlg:value="hlnTemplates"/>
+ <dlg:fixedline dlg:id="hlnDocuments" dlg:tab-index="42" dlg:left="6" dlg:top="110" dlg:width="258" dlg:height="8" dlg:page="2" dlg:value="hlnDocuments"/>
+ <dlg:fixedline dlg:id="FixedLine1" dlg:tab-index="43" dlg:left="6" dlg:top="181" dlg:width="258" dlg:height="6"/>
+ <dlg:fixedline dlg:id="hlnProgress" dlg:tab-index="44" dlg:left="6" dlg:top="55" dlg:width="258" dlg:height="8" dlg:page="4" dlg:value="hlnProgress"/>
+ <dlg:button dlg:id="cmdShowLogFile" dlg:tab-index="45" dlg:disabled="true" dlg:left="75" dlg:top="142" dlg:width="120" dlg:height="14" dlg:page="4" dlg:value="cmdShowLogFile">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:ImportWizard.FilesModul.OpenLogDocument?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ </dlg:bulletinboard>
+</dlg:window> \ No newline at end of file
diff --git a/wizards/source/importwizard/Language.xba b/wizards/source/importwizard/Language.xba
new file mode 100644
index 000000000000..32efcc242e8a
--- /dev/null
+++ b/wizards/source/importwizard/Language.xba
@@ -0,0 +1,157 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Language" script:language="StarBasic">Option Explicit
+
+Public sMSTemplateCheckbox(2) As String
+Public sMSDocumentCheckbox(2) As String
+Public sSODocumentCheckbox(4) As String
+Public sSOHelperdocuments(1,1) As String
+Public sTemplateCheckbox(SBMAXAPPLCOUNT-1) As String
+Public sDocumentCheckbox(SBMAXAPPLCOUNT-1) As String
+Public sTemplateGroupName As String
+Public sSearchInSubDir as String
+Public sPathErrorTemplates(SBMAXAPPLCOUNT-1) As String
+Public sPathErrorDocument(SBMAXAPPLCOUNT-1) As String
+Public sPathErrorStarDoc(SBMAXAPPLCOUNT-1) As String
+Public sStarDocLabel(SBMAXAPPLCOUNT-1) As String
+Public sImportLabel As String, sExportLabel As String
+Public SOApplicationName(5) As String
+Public sHelpButton As String, sCancelButton As String, sBackButton As String, sNextButton As String
+Public sSumInclusiveSubDir As String, sSumSaveDocuments As String
+Public sSummaryHeader As String
+Public sWelcometextLabel1 As String, sWelcometextLabel2 As String, sWelcometextLabel3 As String
+Public sBeginButton As String, sMsgDirNotThere As String
+Public sQueryForNewCreation As String, sPathError3 As String
+Public sNoDirCreation As String
+Public sProgressMoreDocs As String, sProgressMoreTemplates as String
+Public sFileExists As String, sMorePathsError3 As String
+Public sConvertError1 As String, sConvertError2 As String, sPathDialogMessage As String
+Public sRTErrorDesc As String, sRTErrorHeader As String
+Public sProgressPage_1 As String, sProgressPage_2 As String, sProgressPage_3 as String
+Public sProgressFound as String, sProgresspage_5 as String
+Public sContainerName(1) as String
+Public sReady as String, sTitle as String
+Public sCloseButton as String
+Public sSourceDocuments as String
+Public sTargetDocuments as String
+Public sSumSODocuments(4) as String
+Public sSumSOTemplates(4) as String
+Public sSumMSDocuments(3) as String
+Public sSumMSTemplates(3) as String
+Public ModuleList(3) as String
+Public sLogSummary as String
+Public sReeditMacro as String
+Public sOverwriteallFiles as String
+Public scouldnotopenDocument as String
+Public sCurcouldnotopenDocument as String
+Public scouldnotsaveDocument as String
+Public sCurcouldnotsaveDocument as String
+
+
+Sub LoadLanguage()
+ If InitResources(&quot;ImportWizard&quot;,&quot;imp&quot;) then
+ sHelpButton = GetResText(1000)
+ sCancelButton = GetResText(1001)
+ sBackButton = GetResText(1002)
+ sNextButton = GetResText(1003)
+ sBeginButton = GetResText(1004)
+ sCloseButton = GetResText(1005)
+
+ sWelcometextLabel1 = ReplaceString(GetResText(1006), GetProductName(),&quot;%PRODUCTNAME&quot;)
+ sWelcometextLabel2 = GetResText(1007)
+ sWelcometextLabel3 = GetResText(1008)
+
+ &apos; Microsoft Documents
+ GetApplResourceArray(1009, 3, sMSTemplateCheckBox())
+
+ &apos; DocumentCheckbox- Captions
+ GetApplResourceArray(1012, 3, sMSDocumentCheckBox())
+
+ &apos; DocumentCheckbox- Captions
+ GetApplResourceArray(2013, 5, sSODocumentCheckBox())
+
+ &apos;StarOffice Applicationnames
+
+ sSOHelperDocuments(0,0) = GetResText(2017)
+ sSOHelperDocuments(0,1) = &quot;com.sun.star.text.GlobalDocument&quot;
+ sSOHelperDocuments(1,0) = GetResText(2018)
+ sSOHelperDocuments(1,1) = &quot;com.sun.star.formula.FormulaProperties&quot;
+
+ GetApplResourceArray(2017,2, sSOHelperDocuments())
+
+ sContainerName(0) = GetResText(1030)
+ &apos; Note: for the version 5.2 there was no Productname &quot;StarSuite&quot;
+ sContainerName(1) = &quot;StarOffice&quot;
+
+ sSummaryHeader = GetResText(1031)
+
+ sTemplateGroupName = GetResText(1036)
+
+ sProgressMoreDocs = GetResText(1041)
+ sProgressMoreTemplates = GetResText(1042)
+ sNoDirCreation = GetResText(1050)
+ sMsgDirNotThere = GetResText(1051)
+ sQueryForNewCreation = GetResText(1052)
+ sFileExists = GetResText(1053)
+ sMorePathsError3 = GetResText(1054)
+ sConvertError1 = GetResText(1055)
+ sConvertError2 = GetResText(1056)
+ sRTErrorDesc = GetResText(1057)
+ sRTErrorHeader = GetResText(1058)
+ sOverwriteallFiles = GetResText(1070)
+ sReeditMacro = GetResText(1071)
+ scouldnotsaveDocument = GetResText(1072)
+ scouldnotopenDocument = GetResText(1073)
+ sPathDialogMessage = GetResText(1080)
+ sTitle = GetResText(1081)
+
+ sProgressPage_1 = GetResText(1090)
+ sProgressPage_2 = GetResText(1091)
+ sProgressPage_3 = GetResText(1092)
+ sProgressFound = GetResText(1093)
+ sProgressPage_5 = GetResText(1094)
+ sReady = GetResText(1100)
+ sSourceDocuments = GetResText(2030)
+ sTargetDocuments = GetResText(2031)
+ sLogSummary = GetResText(2034)
+ sSumInclusiveSubDir = GetResText(3000)
+ sSumSaveDocuments = GetResText(3001)
+ &apos;StarOffice Applicationnames
+ GetApplResourceArray(3100, 4, sSumSODocuments())
+ GetApplResourceArray(3110, 4, sSumSOTemplates())
+ GetApplResourceArray(3200, 3, sSumMSDocuments())
+ GetApplResourceArray(3210, 3, sSumMSTemplates())
+ With ImportDialog
+ sImportLabel = GetResText(1033)
+ sExportLabel = GetResText(1034)
+ sSearchInSubDir = GetResText(1022)
+ .chkTemplateSearchSubDir.Label = sSearchInSubDir
+ .lblDocumentImport.Label = sImportLabel
+ .lblDocumentExport.Label = sExportLabel
+ .chkDocumentSearchSubDir.Label = sSearchInSubDir
+ .lblTemplateImport.Label = sImportLabel
+ .lblTemplateExport.Label = sExportLabel
+ .chkLogfile.Label = GetResText(2032)
+ .chkLogfile.Helptext = GetResText(2033)
+ Dim Blabla as String
+ blabla = GetResText(1072)
+ .cmdShowLogFile.Label = GetResText(2035)
+ End With
+ ModuleList(0) = &quot;com.sun.star.text.TextDocument&quot;
+ ModuleList(1) = &quot;com.sun.star.sheet.SpreadsheetDocument&quot;
+ ModuleList(2) = &quot;com.sun.star.drawing.DrawingDocument/com.sun.star.presentation.PresentationDocument&quot;
+ ModuleList(3) = &quot;com.sun.star.formula.FormulaProperties/com.sun.star.text.GlobalDocument&quot;
+ End If
+End Sub
+
+
+Sub GetApplResourceArray(StartResIndex as Integer, Count as Integer, BigArray())
+Dim i as Integer
+Dim a as Integer
+ a = 0
+ For i = StartResIndex To StartResIndex + Count-1
+ BigArray(a) = GetResText(i)
+ a = a + 1
+ Next
+End Sub
+</script:module> \ No newline at end of file
diff --git a/wizards/source/importwizard/Main.xba b/wizards/source/importwizard/Main.xba
new file mode 100644
index 000000000000..2c25c6abebd0
--- /dev/null
+++ b/wizards/source/importwizard/Main.xba
@@ -0,0 +1,290 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Main" script:language="StarBasic">Option Explicit
+
+&apos; ***** BASIC *****
+Public HeaderPreviews(4) as Object
+Public ImportDialog as Object
+Public ImportDialogArea as Object
+Public oFactoryKey as Object
+Public bShowLogFile as Boolean
+
+&apos; If the ProgressPage ist already on Top The Dialog will be immediately closed when this flag is
+&apos; set to False
+Public bConversionIsRunning as Boolean
+Public RetValue as Integer
+
+Sub Main()
+ Dim NoArgs() as New com.sun.star.beans.PropertyValue
+ bShowLogFile=FALSE
+ If Not bDebugWizard Then
+ On Local Error Goto RTError
+ End If
+ BasicLibraries.LoadLibrary(&quot;Tools&quot;)
+ RetValue = 10
+ bIsFirstLogTable = True
+ bConversionIsRunning = False
+ sCRLF = CHR(13) &amp; CHR(10)
+ oUcb = createUnoService(&quot;com.sun.star.ucb.SimpleFileAccess&quot;)
+ oFactoryKey = GetRegistryKeyContent(&quot;org.openoffice.Setup/Office/Factories&quot;)
+ If GetImportWizardPaths() = False Then
+ Exit Sub
+ End If
+ bCancelTask = False
+ bDoKeepApplValues = False
+ CurOffice = 0
+ ImportDialogArea = LoadDialog(&quot;ImportWizard&quot;,&quot;ImportDialog&quot;)
+ ImportDialog = ImportDialogArea.Model
+ LoadLanguage()
+ WizardMode = SBXMLMODE
+ MaxApplCount = 4
+ FillStep_Welcome()
+ RepaintHeaderPreview()
+ ImportDialog.ImportPreview.BackGroundColor = RGB(0,60,126)
+ ImportDialog.cmdGoOn.DefaultButton = True
+ ImportDialogArea.GetControl(&quot;optSODocuments&quot;).SetFocus()
+ ToggleCheckboxesWithBoolean(False)
+ RetValue = ImportDialogArea.Execute()
+ If bShowLogFile=TRUE Then
+ OpenDocument(sLogUrl, NoArgs())
+ End if
+ If RetValue = 0 Then
+ CancelTask()
+ End If
+ ImportDialogArea.Dispose()
+ End
+ Exit Sub
+RTError:
+ Msgbox sRTErrorDesc, 16, sRTErrorHeader
+End Sub
+
+
+
+Sub NextStep()
+Dim iCurStep as Integer
+ If Not bDebugWizard Then
+ On Error Goto RTError
+ End If
+ bConversionIsRunning = False
+ iCurStep = ImportDialog.Step
+ Select Case iCurStep
+ Case 1
+ FillStep_InputPaths(0, True)
+ Case 2
+ If CheckInputPaths Then
+ SaveStep_InputPath
+ If CurOffice &lt; ApplCount - 1 Then
+ CurOffice = CurOffice + 1
+ TakeOverPathSettings()
+ FillStep_InputPaths(CurOffice, False)
+ Else
+ FillStep_Summary()
+ End If
+ End If
+ Case 3
+ FillStep_Progress()
+ Select Case WizardMode
+ Case SBMICROSOFTMODE
+ Call ConvertAllDocuments(MSFilterName())
+ CASE SBXMLMODE
+ Call ConvertAllDocuments(XMLFilterName())
+ End Select
+ Case 4
+ CancelTask(True)
+ End Select
+
+ If ((ImportDialog.chkLogfile.State &lt;&gt; 1) OR (iCurStep &lt;&gt; 3)) Then
+ ImportDialog.cmdGoOn.DefaultButton = True
+ End If
+
+ RepaintHeaderPreview()
+ Exit Sub
+RTError:
+ Msgbox sRTErrorDesc, 16, sRTErrorHeader
+End Sub
+
+
+
+Sub PrevStep()
+Dim iCurStep as Integer
+ If Not bDebugWizard Then
+ On Error Goto RTError
+ End If
+ bConversionIsRunning = False
+ iCurStep = ImportDialog.Step
+ Select Case iCurStep
+ Case 4
+ ImportDialog.cmdCancel.Label = sCancelButton
+ FillStep_Summary()
+ Case 3
+ FillStep_InputPaths(Applcount-1, False)
+ Case 2
+ SaveStep_InputPath
+ If CurOffice &gt; 0 Then
+ CurOffice = CurOffice - 1
+ FillStep_InputPaths(CurOffice, False)
+ Else
+ FillStep_Welcome()
+ bDoKeepApplValues = True
+ End If
+ End Select
+ ImportDialog.cmdGoOn.DefaultButton = True
+ RepaintHeaderPreview()
+ Exit Sub
+RTError:
+ Msgbox sRTErrorDesc, 16, sRTErrorHeader
+End Sub
+
+
+
+Sub CancelTask()
+ If bConversionIsRunning Then
+ If Msgbox(sConvertError1, 36, sConvertError2) = 6 Then
+ bCancelTask = True
+ bInterruptSearch = True
+ Else
+ bCancelTask = False
+ ImportDialog.cmdCancel.Enabled = True
+ End If
+ Else
+ ImportDialogArea.EndExecute()
+ End If
+End Sub
+
+
+Sub TemplateDirSearchDialog()
+ CallDirSearchDialog(ImportDialog.TemplateImportPath)
+End Sub
+
+
+Sub RepaintHeaderPreview()
+Dim Bitmap As Object
+Dim CurStep as Integer
+Dim sBitmapPath as String
+Dim LocPrefix as String
+ CurStep = ImportDialog.Step
+ LocPrefix = WizardMode
+ LocPrefix = ReplaceString(LocPrefix,&quot;XML&quot;, &quot;SO&quot;)
+ If CurStep = 2 Then
+ sBitmapPath = SOBitmapPath &amp; LocPrefix &amp; &quot;-Import_&quot; &amp; CurStep &amp; &quot;-&quot; &amp; Applications(CurOffice,SBAPPLKEY) + 1 &amp; &quot;.bmp&quot;
+ Else
+ sBitmapPath = SOBitmapPath &amp; &quot;Import_&quot; &amp; CurStep &amp; &quot;.bmp&quot;
+ End If
+ ImportDialog.ImportPreview.ImageURL = sBitmapPath
+End Sub
+
+
+Sub CheckModuleInstallation()
+Dim i as Integer
+ For i = 1 To MaxApplCount
+ ImportDialogArea.GetControl(&quot;chk&quot; &amp; WizardMode &amp; &quot;Application&quot; &amp; i).Model.Enabled = Abs(CheckInstalledModule(i-1))
+ Next i
+End Sub
+
+
+Function CheckInstalledModule(Index as Integer) as Boolean
+Dim ModuleName as String
+Dim NameList() as String
+Dim MaxIndex as Integer
+Dim i as Integer
+ ModuleName = ModuleList(Index)
+ If Instr(1,ModuleName,&quot;/&quot;) &lt;&gt; 0 Then
+ CheckInstalledModule() = False
+ NameList() = ArrayoutOfString(ModuleName,&quot;/&quot;, MaxIndex)
+ For i = 0 To MaxIndex
+ If oFactoryKey.HasByName(NameList(i)) Then
+ CheckInstalledModule() = True
+ End If
+ Next i
+ Else
+ CheckInstalledModule() = oFactoryKey.HasByName(ModuleName)
+ End If
+End Function
+
+
+Sub ToggleCheckboxes(oEvent as Object)
+Dim bMSEnable as Boolean
+ WizardMode = oEvent.Source.Model.Tag
+ bMSEnable = WizardMode = &quot;MS&quot;
+ ToggleCheckBoxesWithBoolean(bMSEnable)
+End Sub
+
+
+Sub ToggleCheckboxesWithBoolean(bMSEnable as Boolean)
+ If bMSEnable = True Then
+ WizardMode = SBMICROSOFTMODE
+ MaxApplCount = 3
+ Else
+ WizardMode = SBXMLMODE
+ MaxApplCount = 4
+ End If
+ With ImportDialogArea
+ .GetControl(&quot;chkSOApplication1&quot;).Model.Enabled = Not bMSEnable
+ .GetControl(&quot;chkSOApplication2&quot;).Model.Enabled = Not bMSEnable
+ .GetControl(&quot;chkSOApplication3&quot;).Model.Enabled = Not bMSEnable
+ .GetControl(&quot;chkSOApplication4&quot;).Model.Enabled = Not bMSEnable
+ .GetControl(&quot;chkMSApplication1&quot;).Model.Enabled = bMSEnable
+ .GetControl(&quot;chkMSApplication2&quot;).Model.Enabled = bMSEnable
+ .GetControl(&quot;chkMSApplication3&quot;).Model.Enabled = bMSEnable
+ End With
+ CheckModuleInstallation()
+ ImportDialog.WelcomeTextLabel2.Enabled = bMSEnable
+ bDoKeepApplValues = False
+ ToggleNextButton()
+End Sub
+
+
+Sub ToggleNextButton()
+Dim iCurStep as Integer
+Dim bDoEnable as Boolean
+Dim i as Integer
+ iCurStep = ImportDialog.Step
+ Select Case iCurStep
+ Case 1
+ With ImportDialog
+ If .optMSDocuments.State = 1 Then
+ bDoEnable = .chkMSApplication1.State = 1 Or .chkMSApplication2.State = 1 Or .chkMSApplication3.State = 1
+ Else
+ bDoEnable = .chkSOApplication1.State = 1 Or .chkSOApplication2.State = 1 Or .chkSOApplication3.State = 1 Or .chkSOApplication4.State = 1
+ End If
+ End With
+ bDoKeepApplValues = False
+ Case 2
+ bDoEnable = CheckControlPath(ImportDialog.chkTemplatePath, ImportDialog.txtTemplateImportPath, True)
+ bDoEnable = CheckControlPath(ImportDialog.chkDocumentPath, ImportDialog.txtDocumentImportPath, bDoEnable)
+ End Select
+ ImportDialog.cmdGoOn.Enabled = bDoEnable
+End Sub
+
+
+Sub TakeOverPathSettings()
+&apos;Takes over the Pathsettings from the first selected application to the next applications
+ If Applications(CurOffice,SBDOCSOURCE) = &quot;&quot; Then
+ Applications(CurOffice,SBDOCSOURCE) = Applications(0,SBDOCSOURCE)
+ Applications(CurOffice,SBDOCTARGET) = Applications(0,SBDOCTARGET)
+ If WizardMode = SBXMLMODE AND Applications(CurOffice,SBAPPLKEY) = 3 Then
+ Applications(CurOffice,SBTEMPLSOURCE) = Applications(CurOffice,SBDOCSOURCE)
+ Applications(CurOffice,SBTEMPLTARGET) = Applications(CurOffice,SBDOCTARGET)
+ Else
+ Applications(CurOffice,SBTEMPLSOURCE) = Applications(0,SBTEMPLSOURCE)
+ Applications(CurOffice,SBTEMPLTARGET) = Applications(0,SBTEMPLTARGET)
+ End If
+ End If
+End Sub
+
+
+Function GetImportWizardPaths() as Boolean
+ SOBitmapPath = GetOfficeSubPath(&quot;Template&quot;, &quot;wizard/bitmap&quot;)
+ If SOBitmapPath &lt;&gt; &quot;&quot; Then
+ SOWorkPath = GetPathSettings(&quot;Work&quot;, False)
+ If SOWorkPath &lt;&gt; &quot;&quot; Then
+ SOTemplatePath = GetPathSettings(&quot;Template_writable&quot;,False,0)
+ If SOTemplatePath &lt;&gt; &quot;&quot; Then
+ GetImportWizardPaths() = True
+ Exit Function
+ End If
+ End If
+ End If
+ GetImportWizardPaths() = False
+End Function
+</script:module> \ No newline at end of file
diff --git a/wizards/source/importwizard/delzip b/wizards/source/importwizard/delzip
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/wizards/source/importwizard/delzip
diff --git a/wizards/source/importwizard/dialog.xlb b/wizards/source/importwizard/dialog.xlb
new file mode 100644
index 000000000000..f5cc021d521d
--- /dev/null
+++ b/wizards/source/importwizard/dialog.xlb
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="ImportWizard" library:readonly="true" library:passwordprotected="false">
+ <library:element library:name="ImportDialog"/>
+</library:library>
diff --git a/wizards/source/importwizard/importwi.src b/wizards/source/importwizard/importwi.src
new file mode 100644
index 000000000000..daddcc284642
--- /dev/null
+++ b/wizards/source/importwizard/importwi.src
@@ -0,0 +1,674 @@
+/*************************************************************************
+ *
+ * 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.
+ *
+ ************************************************************************/#define sHelpButton 1000
+#define sCancelButton 1001
+#define sBackButton 1002
+#define sNextButton 1003
+#define sBeginButton 1004
+#define sCloseButton 1005
+#define sWelcometextLabel1 1006
+#define sWelcometextLabel2 1007
+#define sWelcometextLabel3 1008
+#define sMSTemplateCheckbox_1_ 1009
+#define sMSTemplateCheckbox_2_ 1010
+#define sMSTemplateCheckbox_3_ 1011
+#define sMSDocumentCheckbox_1_ 1012
+#define sMSDocumentCheckbox_2_ 1013
+#define sMSDocumentCheckbox_3_ 1014
+#define sSearchInSubDir 1022
+#define sMSContainerName 1030
+#define sSummaryHeader 1031
+#define sSummaryFrame 1032
+#define sTextImportLabel 1033
+#define sTextExportLabel 1034
+#define sGroupnameDefault 1036
+#define sProgressDesc1 1039
+#define sProgressOneDoc 1040
+#define sProgressMoreDocs 1041
+#define sProgressMoreTemplates 1042
+#define sNoDirCreation 1050
+#define sMsgDirNotThere 1051
+#define sQueryfornewCreation 1052
+#define sFileExists 1053
+#define sMorePathsError3 1054
+#define sConvertError1 1055
+#define sConvertError2 1056
+#define sRTErrorDesc 1057
+#define sRTErrorHeader 1058
+#define sPathErrorTemplates_1_ 1059
+#define sPathErrorTemplates_2_ 1060
+#define sPathErrorTemplates_3_ 1061
+#define sPathErrorDocument_1_ 1062
+#define sPathErrorDocument_2_ 1063
+#define sPathErrorDocument_3_ 1064
+#define sPathErrorStarDoc_1_ 1065
+#define sPathErrorStarDoc_2_ 1066
+#define sPathErrorStarDoc_3_ 1067
+#define sOverwriteallFiles 1070
+#define sreeditMacro 1071
+#define scouldNotsaveDocument 1072
+#define scouldNotopenDocument 1073
+#define sPathDialogMessage 1080
+#define sDialogTitle 1081
+#define sProgressPage1 1090
+#define sProgressPage2 1091
+#define sProgressPage3 1092
+#define sProgressFound 1093
+#define sProgressPage5 1094
+#define sReady 1100
+#define sXMLTemplateCheckbox_1_ 2009
+#define sXMLTemplateCheckbox_2_ 2010
+#define sXMLTemplateCheckbox_3_ 2011
+#define sXMLTemplateCheckbox_4_ 2012
+#define sXMLDocumentCheckbox_1_ 2013
+#define sXMLDocumentCheckbox_2_ 2014
+#define sXMLDocumentCheckbox_3_ 2015
+#define sXMLDocumentCheckbox_4_ 2016
+#define sXMLHelperApplications_1 2017
+#define sXMLHelperApplications_2 2018
+
+#define sSourceDocuments 2030
+#define sTargetDocuments 2031
+#define sCreateLogfile 2032
+#define sLogfileHelpText 2033
+#define sLogfileSummary 2034
+#define sshowLogfile 2035
+
+#define sSumInclusiveSubDir 3000
+#define sSumSaveDokumente 3001
+
+#define sSumSOTextDocuments 3100
+#define sSumSOTableDocuments 3101
+#define sSumSODrawDocuments 3102
+#define sSumSOMathDocuments 3103
+
+#define sSumSOTextTemplates 3110
+#define sSumSOTableTemplates 3111
+#define sSumSODrawTemplates 3112
+#define sSumSOGlobalDocuments 3113
+
+#define sSumMSTextDocuments 3200
+#define sSumMSTableDocuments 3201
+#define sSumMSDrawDocuments 3202
+
+#define sSumMSTextTemplates 3210
+#define sSumMSTableTemplates 3211
+#define sSumMSDrawTemplates 3212
+
+
+// --------------------------------------------------------------------
+String sHelpButton
+{
+ Text [ en-US ] = "~Help";
+};
+
+String sCancelButton
+{
+ Text [ en-US ] = "~Cancel";
+};
+
+String sBackButton
+{
+ Text [ en-US ] = "<< ~Back";
+};
+
+String sNextButton
+{
+ Text [ en-US ] = "Ne~xt >>";
+};
+
+String sBeginButton
+{
+ Text [ en-US ] = "~Convert";
+};
+
+String sCloseButton
+{
+ Text [ en-US ] = "~Close";
+};
+
+String sWelcometextLabel1
+{
+ Text [ en-US ] = "This wizard converts documents in %PRODUCTNAME format and Microsoft Office documents to the new OpenDocument format.";
+};
+
+String sWelcometextLabel2
+{
+ Text [ en-US ] = "Please note that when converting Microsoft documents any attached VBA macros lose their functionality.";
+};
+
+String sWelcometextLabel3
+{
+ Text [ en-US ] = "Select the document type for conversion:";
+};
+
+
+
+String sMSTemplateCheckbox_1_
+{
+ Text [ en-US ] = "Word templates";
+};
+
+String sMSTemplateCheckbox_2_
+{
+ Text [ en-US ] = "Excel templates";
+};
+
+String sMSTemplateCheckbox_3_
+{
+ Text [ en-US ] = "PowerPoint templates";
+};
+
+String sMSDocumentCheckbox_1_
+{
+ Text [ en-US ] = "Word documents";
+};
+
+String sMSDocumentCheckbox_2_
+{
+ Text [ en-US ] = "Excel documents";
+};
+
+String sMSDocumentCheckbox_3_
+{
+ Text [ en-US ] = "PowerPoint documents";
+};
+
+
+String sSearchInSubDir
+{
+ Text [ en-US ] = "Including subdirectories";
+};
+
+
+
+String sMSContainerName
+{
+ Text [ en-US ] = "Microsoft Office";
+};
+
+
+
+String sSummaryHeader
+{
+ Text [ en-US ] = "Summary:";
+};
+
+String sTextImportLabel
+{
+ Text [ en-US ] = "Import from:";
+};
+
+
+String sTextExportLabel
+{
+ Text [ en-US ] = "Save to:";
+};
+
+
+String sGroupnameDefault
+{
+ Text [ en-US ] = "Imported_Templates";
+};
+
+
+String sProgressDesc1
+{
+ Text [ en-US ] = "Progress: ";
+};
+
+String sProgressOneDoc
+{
+ Text [ en-US ] = "Document";
+};
+
+String sProgressMoreDocs
+{
+ Text [ en-US ] = "Documents";
+};
+
+
+String sProgressMoreTemplates
+{
+ Text [ en-US ] = "Templates";
+};
+
+
+String sNoDirCreation
+{
+ Text [ en-US ] = "The '%1' directory cannot be created: ";
+};
+
+
+String sMsgDirNotThere
+{
+ Text [ en-US ] = "The '%1' directory does not exist.";
+};
+
+
+String sQueryfornewCreation
+{
+ Text [ en-US ] = "Do you want to create it now?";
+};
+
+
+String sFileExists
+{
+ Text [ en-US ] = "The '<1>' file already exists.<CR>Do you want to overwrite it?";
+};
+
+String sMorePathsError3
+{
+ Text [ en-US ] = "Directories do not exist";
+};
+
+
+String sOverwriteallFiles
+{
+ Text [ en-US ] = "Do you want to overwrite documents without being asked?";
+};
+
+
+String sreeditMacro
+{
+ Text [ en-US ] = "Document macro has to be revised.";
+};
+
+String scouldNotsaveDocument
+{
+ Text [ en-US ] = "Document '<1>' could not be saved.";
+};
+
+
+String scouldNotopenDocument
+{
+ Text [ en-US ] = "Document '<1>' could not be opened.";
+};
+
+
+
+String sConvertError1
+{
+ Text [ en-US ] = "Do you really want to terminate conversion at this point?";
+};
+
+String sConvertError2
+{
+ Text [ en-US ] = "Cancel Wizard";
+};
+
+String sRTErrorDesc
+{
+ Text [ en-US ] = "An unexpected error has occurred in the wizard.";
+};
+
+String sRTErrorHeader
+{
+ Text [ en-US ] = "Error";
+};
+
+
+String sPathDialogMessage
+{
+ Text [ en-US ] = "Select a directory";
+};
+
+String sDialogTitle
+{
+ Text [ en-US ] = "Document Converter";
+};
+
+String sProgressPage1
+{
+ Text [ en-US ] = "Progress";
+};
+
+String sProgressPage2
+{
+ Text [ en-US ] = "Retrieving the relevant documents:";
+};
+
+String sProgressPage3
+{
+ Text [ en-US ] = "Converting the documents";
+};
+
+
+String sProgressFound
+{
+ Text [ en-US ] = "Found:";
+};
+
+
+String sProgressPage5
+{
+ Text [ en-US ] = "%1 found";
+};
+
+String sReady
+{
+ Text [ en-US ] = "Finished";
+};
+
+
+String sXMLTemplateCheckbox_1_
+{
+ Text [ en-US ] = "Text templates";
+};
+
+String sXMLTemplateCheckbox_2_
+{
+ Text [ en-US ] = "Spreadsheet templates";
+};
+
+String sXMLTemplateCheckbox_3_
+{
+ Text [ en-US ] = "Drawing/presentation templates";
+};
+
+String sXMLTemplateCheckbox_4_
+{
+ Text [ en-US ] = "Master documents";
+};
+
+
+String sXMLDocumentCheckbox_1_
+{
+ Text [ en-US ] = "Text documents";
+};
+
+String sXMLDocumentCheckbox_2_
+{
+ Text [ en-US ] = "Spreadsheets";
+};
+
+String sXMLDocumentCheckbox_3_
+{
+ Text [ en-US ] = "Drawing/presentation documents";
+};
+
+
+String sXMLDocumentCheckbox_4_
+{
+ Text [ en-US ] = "Master documents/formulas";
+};
+
+String sXMLHelperApplications_1
+{
+ Text [ en-US ] = "Master documents";
+};
+
+String sXMLHelperApplications_2
+{
+ Text [ en-US ] = "Formulas";
+};
+
+
+String sSourceDocuments
+{
+ Text [ en-US ] = "Source documents";
+};
+
+
+String sTargetDocuments
+{
+ Text [ en-US ] = "Target documents";
+};
+
+String sCreateLogfile
+{
+ Text [ en-US ] = "Create log file";
+};
+
+
+String sLogfileSummary
+{
+ Text [ en-US ] = "<COUNT> documents converted";
+};
+
+
+
+String sLogfileHelpText
+{
+ Text [ en-US ] = "A log file will be created in your work directory";
+};
+
+
+String sshowLogfile
+{
+ Text [ en-US ] = "Show log file";
+};
+
+
+String sSumInclusiveSubDir
+{
+ Text [ en-US ] = "All subdirectories will be taken into account";
+};
+
+String sSumSaveDokumente
+{
+ Text [ en-US ] = "These will be exported to the following directory:";
+};
+
+
+String sSumSOTextDocuments
+{
+ Text [ en-US ] = "All %PRODUCTNAME text documents contained in the following directory will be imported:";
+};
+
+
+String sSumSOTableDocuments
+{
+ Text [ en-US ] = "All %PRODUCTNAME spreadsheets contained in the following directory will be imported:";
+};
+
+
+String sSumSODrawDocuments
+{
+ Text [ en-US ] = "All %PRODUCTNAME drawing and presentation documents contained in the following directory will be imported:";
+};
+
+
+String sSumSOMathDocuments
+{
+ Text [ en-US ] = "All %PRODUCTNAME formula documents contained in the following directory will be imported:";
+};
+
+
+String sSumSOTextTemplates
+{
+ Text [ en-US ] = "All %PRODUCTNAME text templates contained in the following directory will be imported:";
+};
+
+
+String sSumSOTableTemplates
+{
+ Text [ en-US ] = "All %PRODUCTNAME table templates contained in the following directory will be imported:";
+};
+
+
+String sSumSODrawTemplates
+{
+ Text [ en-US ] = "All %PRODUCTNAME drawing and presentation templates contained in the following directory will be imported:";
+};
+
+String sSumSOGlobalDocuments
+{
+ Text [ en-US ] = "All %PRODUCTNAME master documents contained in the following directory will be imported:";
+};
+
+
+String sSumMSTextDocuments
+{
+ Text [ en-US ] = "All Word documents contained in the following directory will be imported:";
+};
+
+
+String sSumMSTableDocuments
+{
+ Text [ en-US ] = "All Excel documents contained in the following directory will be imported:";
+};
+
+
+String sSumMSDrawDocuments
+{
+ Text [ en-US ] = "All PowerPoint documents contained in the following directory will be imported:";
+};
+
+
+String sSumMSTextTemplates
+{
+ Text [ en-US ] = "All Word templates contained in the following directory will be imported:";
+};
+
+
+String sSumMSTableTemplates
+{
+ Text [ en-US ] = "All Excel templates contained in the following directory will be imported:";
+};
+
+
+String sSumMSDrawTemplates
+{
+ Text [ en-US ] = "All PowerPoint templates contained in the following directory will be imported:";
+};
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wizards/source/importwizard/makefile.mk b/wizards/source/importwizard/makefile.mk
new file mode 100644
index 000000000000..5c7ef4ce916a
--- /dev/null
+++ b/wizards/source/importwizard/makefile.mk
@@ -0,0 +1,53 @@
+#*************************************************************************
+#
+# 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.
+#
+#*************************************************************************
+PRJ=..$/..
+
+PRJNAME=wizards
+TARGET=importwizardall
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+.INCLUDE : $(PRJ)$/util$/target.pmk
+
+# --- Files --------------------------------------------------------
+
+#
+# testresource.
+#
+SRS2NAME = importwi
+SRC2FILES= importwi.src
+RESLIB2SRSFILES= $(SRS)$/importwi.srs
+RESLIB2NAME= imp
+
+ZIP1TARGET = $(IMPORTWIZARD_ALL_TARGET)
+ZIP1LIST = *.xdl *.xba *.xlb
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
+
diff --git a/wizards/source/importwizard/script.xlb b/wizards/source/importwizard/script.xlb
new file mode 100644
index 000000000000..2d10f65cba30
--- /dev/null
+++ b/wizards/source/importwizard/script.xlb
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="ImportWizard" library:readonly="true" library:passwordprotected="false">
+ <library:element library:name="Main"/>
+ <library:element library:name="DialogModul"/>
+ <library:element library:name="Language"/>
+ <library:element library:name="FilesModul"/>
+ <library:element library:name="API"/>
+</library:library>
diff --git a/wizards/source/launcher/DicOOo.xba b/wizards/source/launcher/DicOOo.xba
new file mode 100644
index 000000000000..474494e718c9
--- /dev/null
+++ b/wizards/source/launcher/DicOOo.xba
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="DicOOo" script:language="StarBasic">Option Explicit
+
+Sub StartDicOOo
+
+Dim ThePath as string
+Dim DefPath as string
+Dim aService as object
+Dim MyDicOOo as string
+dim TheDoc as object
+dim args(1) as new com.sun.star.beans.PropertyValue
+
+on error resume next
+
+&apos; Find path
+aService = CreateUnoService(&quot;com.sun.star.util.PathSubstitution&quot;)
+ThePath =ConvertToURL(aService.substituteVariables(&quot;$(user)&quot;, true))
+ThePath=ThePath &amp; &quot;/wordbook&quot;
+DefPath =ConvertToURL(aService.substituteVariables(&quot;$(prog)&quot;, true))
+DefPath=DefPath &amp; &quot;/../share/dict/ooo&quot;
+
+MyDicOOo=&quot;&quot;
+
+if fileExists(ThePath &amp; &quot;/DicOOo.lst&quot;) then
+ &apos;read DicOOo.lst file in user directory
+ Open ThePath &amp; &quot;/DicOOo.lst&quot; for input as #1
+ line input #1, MyDicOOo
+ close #1
+else
+ if fileExists(DefPath &amp; &quot;/DicOOo.lst&quot;) then
+ &apos;read DicOOo.lst file in share directory
+ Open DefPath &amp; &quot;/DicOOo.lst&quot; for input as #1
+ line input #1, MyDicOOo
+ close #1
+ else
+ &apos;creates default file in user directory
+ Open ThePath &amp; &quot;/DicOOo.lst&quot; for output as #1
+ print #1,convertFromURL(DefPath &amp; &quot;/DicOOo.sxw&quot;)
+ close #1
+ endif
+endif
+
+&apos;security
+if Not fileExists(MyDicOOo) then
+ MyDicOOo= DefPath &amp; &quot;/DicOOo.sxw&quot;
+endif
+
+MyDicOOo=ConvertToURL(MyDicOOo)
+
+&apos;Opens DicOOo main file
+args(0).name=&quot;InteractionHandler&quot;
+args(0).value=&quot;&quot;
+args(1).name=&quot;MacroExecutionMode&quot;
+args(1).value=com.sun.star.document.MacroExecMode.ALWAYS_EXECUTE_NO_WARN &apos;4
+TheDoc=StarDesktop.loadComponentFromURL(MyDicOOo,&quot;_blank&quot;,0,args())
+
+End Sub
+</script:module>
diff --git a/wizards/source/launcher/delzip b/wizards/source/launcher/delzip
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/wizards/source/launcher/delzip
diff --git a/wizards/source/launcher/dialog.xlb b/wizards/source/launcher/dialog.xlb
new file mode 100644
index 000000000000..a4c6d756ca75
--- /dev/null
+++ b/wizards/source/launcher/dialog.xlb
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="Launcher" library:readonly="true" library:passwordprotected="false"/>
diff --git a/wizards/source/launcher/makefile.mk b/wizards/source/launcher/makefile.mk
new file mode 100644
index 000000000000..4bd474242f4b
--- /dev/null
+++ b/wizards/source/launcher/makefile.mk
@@ -0,0 +1,46 @@
+#*************************************************************************
+#
+# 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.
+#
+#*************************************************************************
+PRJ=..$/..
+
+PRJNAME=wizards
+TARGET=launcher
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+.INCLUDE : $(PRJ)$/util$/target.pmk
+
+# --- Files --------------------------------------------------------
+
+ZIP1TARGET = $(LAUNCHER_ALL_TARGET)
+XBAFILES = DicOOo.xba
+ZIP1LIST = *.xdl $(XBAFILES) *.xlb
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
+
diff --git a/wizards/source/launcher/script.xlb b/wizards/source/launcher/script.xlb
new file mode 100644
index 000000000000..55310d9fb286
--- /dev/null
+++ b/wizards/source/launcher/script.xlb
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="Launcher" library:readonly="true" library:passwordprotected="false">
+ <library:element library:name="DicOOo"/>
+</library:library>
diff --git a/wizards/source/schedule/BankHoliday.xba b/wizards/source/schedule/BankHoliday.xba
new file mode 100644
index 000000000000..e9af180aa32e
--- /dev/null
+++ b/wizards/source/schedule/BankHoliday.xba
@@ -0,0 +1,177 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="BankHoliday" script:language="StarBasic">Option Explicit
+
+Sub Main()
+ Call CalAutopilotTable()
+End Sub
+
+
+Function CalEasterTable&amp;(byval Year%)
+Dim B%,C%,D%,E%,F%,G%,H%,I%,K%,L%,M%,N%,O%, nMonth%, nDay%
+ N = Year% mod 19
+ B = int(Year% / 100)
+ C = Year% mod 100
+ D = int(B / 4)
+ E = B mod 4
+ F = int((B + 8) / 25)
+ G = int((B - F + 1) / 3)
+ H =(19 * N + B - D - G + 15) mod 30
+ I = int(C / 4)
+ K = C mod 4
+ L =(32 + 2 * E + 2 * I - H - K) mod 7
+ M = int((N + 11 * H + 22 * L) / 451)
+ O = H + L - 7 * M + 114
+ nDay = O mod 31 + 1
+ nMonth = int(O / 31)
+ CalEasterTable&amp; = DateSerial(Year, nMonth,nDay)
+End Function
+
+
+&apos; Note: the following algorithm is valid only till the Year 2100.
+&apos; but I have no Idea from which date in the paste it is valid
+Function CalOrthodoxEasterTable(ByVal iYear as Integer) as Long
+Dim R1%, R2%, R3%, RA%, R4%, RB%, R5%, RC%
+Dim lDate as Long
+ R1 = iYear mod 19
+ R2 = iYear mod 4
+ R3 = iYear mod 7
+ RA =19 * R1 + 16
+ R4 = RA mod 30
+ RB = 2 * R2 + 4 * R3 + 6 * R4
+ R5 = RB mod 7
+ RC = R4 + R5
+ lDate = DateSerial(iYear, 4,4)
+ CalOrthodoxEasterTable() = lDate + RC
+End Function
+
+
+Sub CalInitGlobalVariablesDate()
+Dim i as Integer
+ For i = 1 To 374
+ CalBankholidayName$(i) = &quot;&quot;
+ CalTypeOfBankHoliday%(i) = cHolidayType_None
+ Next
+End Sub
+
+
+Sub CalInsertBankholiday(byval CurDate as Long, byval EventName as String, ByVal iLevel as Integer)
+Dim iDay
+ iDay =(Month(CurDate)-1)*31 +Day(CurDate)
+
+ If 0 &lt;&gt; CalTypeOfBankHoliday(iDay) Then
+ If iLevel &lt; CalTypeOfBankHoliday(iDay) Then
+ CalTypeOfBankHoliday(iDay) = iLevel
+ End If
+ Else
+ CalTypeOfBankHoliday(iDay) = iLevel
+ End If
+
+ If CalBankHolidayName(iDay) = &quot;&quot; Then
+ CalBankHolidayName(iDay) = EventName
+ Else
+ CalBankHolidayName(iDay) = CalBankHolidayName(iDay) &amp; &quot; / &quot; &amp; EventName
+ End If
+End Sub
+
+Function CalMaxDayInMonth(ByVal iYear as Integer, ByVal iMonth as Integer) as Integer
+&apos; delivers the maximum Day of a month in a certain year
+ Dim TmpDate as Long
+ Dim MaxDay as Long
+
+ MaxDay = 28
+ TmpDate = DateSerial(iYear, iMonth, MaxDay)
+
+ While Month(TmpDate) = iMonth
+ MaxDay = MaxDay + 1
+ TmpDate = TmpDate + 1
+ Wend
+ Maxday = MaxDay - 1
+ CalMaxDayInMonth() = MaxDay
+End Function
+
+
+Function CalGetIntOfShortMonthName(ByVal MonthName as String) as Integer
+Dim i as Integer
+Dim nMonth as Integer
+
+ nMonth = Val(MonthName)
+
+ If (1 &lt;= nMonth And 12 &gt;= nMonth) Then
+ CalGetIntOfShortMonthName = nMonth
+ Exit Function
+ End If
+
+ MonthName = UCase(Trim(Left(MonthName, 3)))
+
+ For i = 0 To 11
+ If (UCase(cCalShortMonthNames(i)) = MonthName) Then
+ CalGetIntOfShortMonthName = i+1
+ Exit Function
+ End If
+ Next
+
+ &apos; Not Found
+ CalGetIntOfShortMonthName = 0
+End Function
+
+
+Sub CalInsertOwnDataInTables(ByVal iSelYear as Integer)
+ &apos; inserts the individual data from the table into the previously unsorted list
+Dim CurEventName as String
+Dim CurEvMonth as Integer
+Dim CurEvDay as Integer
+Dim LastIndex as Integer
+Dim i as Integer
+Dim DateStr as String
+ LastIndex = Ubound(DlgCalModel.lstOwnData.StringItemList())
+ For i = 0 To LastIndex
+ If GetSelectedDateUnits(CurEvDay, CurEvMonth, i) &lt;&gt; SBDATEUNDEFINED Then
+ CurEventName = CalGetNameOfEvent(i)
+ CalInsertBankholiday(DateSerial(iSelYear, CurEvMonth, CurEvDay), CurEventName, cHolidayType_Own)
+ End If
+ Next
+End Sub
+
+
+&apos; Finds eg the first,second Monday in a month
+&apos; Note: in This Function the week starts with the Sunday
+Function GetMonthDate(YearInt as Integer, iMonth as Integer, iWeekDay as Integer, iOffset as Integer)
+Dim bFound as Boolean
+Dim lDate as Long
+ &apos; 1st Tue in Nov : Election Day, Half
+ bFound = False
+ lDate = DateSerial(YearInt, iMonth, 1)
+ Do
+ If iWeekDay = WeekDay(lDate) Then
+ bFound = True
+ Else
+ lDate = lDate + 1
+ End If
+ Loop Until bFound
+ GetMonthDate = lDate + iOffset
+End Function
+
+
+&apos; Finds the next weekday after a fixed date
+&apos; e.g. Midsummerfeast in Sweden: next Saturday after 20th June
+Function GetNextWeekDay(iYear as Integer, iMonth as Integer, iDay as Integer, iWeekDay as Integer)
+Dim lDate as Long
+Dim iCurWeekDay as Integer
+ lDate = DateSerial(iYear, iMonth, iDay)
+ iCurWeekDay = WeekDay(lDate)
+ While iCurWeekDay &lt;&gt; iWeekDay
+ lDate = lDate + 1
+ iCurWeekDay = WeekDay(lDate)
+ Wend
+ GetNextWeekDay() = lDate
+End Function
+
+
+Sub AddFollowUpHolidays(ByVal lStartDate as Long, iCount as Integer, HolidayName as String, iType as Integer)
+Dim lDate as Long
+ For lDate = lStartDate + 1 To lStartDate + 4
+ CalInsertBankholiday(lDate, HolidayName, iType)
+ Next lDate
+End Sub
+</script:module> \ No newline at end of file
diff --git a/wizards/source/schedule/CalendarMain.xba b/wizards/source/schedule/CalendarMain.xba
new file mode 100644
index 000000000000..bfe49121dbd3
--- /dev/null
+++ b/wizards/source/schedule/CalendarMain.xba
@@ -0,0 +1,302 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="CalendarMain" script:language="StarBasic">Option Explicit
+
+Const _DEBUG = 0
+
+&apos; CalenderMain
+Public sCurLangLocale as String
+Public sCurCountryLocale as String
+&apos; This flag serves as a query if the individual Data should be saved
+Public bCalOwnDataChanged as Boolean
+
+&apos;BankHoliday Functions
+Public CalBankholidayName$ (1 To 374)
+Public CalTypeOfBankHoliday% (1 To 374)
+
+Public Const cHolidayType_None = 0
+Public Const cHolidayType_Full = 1
+Public Const cHolidayType_Half = 2
+Public Const cHolidayType_Own = 4
+
+Public cCalSubcmdDeleteSelect_DeleteSelEntry$
+Public cCalSubcmdDeleteSelect_DeleteSelEntryTitle$
+Public cCalSubcmdSwitchOwnDataOrGeneral_Back$
+Public cCalSubcmdSwitchOwnDataOrGeneral_OwnData$
+
+&apos;Language
+Public cCalLongMonthNames(11) as String
+Public cCalShortMonthNames(11) as String
+
+Public sBitmapFilename$
+Public sCalendarTitle$, sMonthTitle$, sWizardTitle$, sError$
+Public cCalStyleWorkday$, cCalStyleWeekend$
+
+Public CalChoosenLand as Integer
+
+Public oDocument as Object
+Public oSheets as Object
+Public oSheet as Object
+Public oStatusLine as Object
+Public bCancelTask as Boolean
+Public oNumberFormatter as Object
+
+&apos; BL* means &quot;BundesLand&quot; (for german states only)
+Public CONST CalBLBayern = 1
+Public CONST CalBLBadenWuert = 2
+Public CONST CalBLBerlin = 3
+Public CONST CalBLBremen = 4
+Public CONST CalBLBrandenburg = 5
+Public CONST CalBLHamburg = 6
+Public CONST CalBLHessen = 7
+Public CONST CalBLMeckPomm = 8
+Public CONST CalBLNiedersachsen = 9
+Public CONST CalBLNordrheinWest = 10
+Public CONST CalBLRheinlandPfalz = 11
+Public CONST CalBLSaarland = 12
+Public CONST CalBLSachsen = 13
+Public CONST CalBLSachsenAnhalt = 14
+Public CONST CalBLSchlHolstein = 15
+Public CONST CalBLThueringen = 16
+
+Public DlgCalendar as Object
+Public DlgCalModel as Object
+Public lDateFormat as Long
+Public lDateStandardFormat as Long
+
+
+
+Sub CalAutopilotTable()
+Dim BitmapDir as String
+Dim iThisMonth as Integer
+
+&apos;On Error Goto ErrorHandler
+ BasicLibraries.LoadLibrary(&quot;Tools&quot;)
+ bSelectByMouseMove = True
+ oDocument = ThisComponent
+ oStatusline = oDocument.GetCurrentController.GetFrame.CreateStatusIndicator
+ ToggleWindow(False)
+ sCurLangLocale = oDocument.CharLocale.Language
+ sCurCountryLocale = oDocument.CharLocale.Country
+ DlgCalendar = LoadDialog(&quot;Schedule&quot;, &quot;DlgCalendar&quot;)
+ DlgCalModel = DlgCalendar.Model
+ LoadLanguage(sCurLangLocale)
+ CalInitGlobalVariablesDate()
+ BitmapDir = GetOfficeSubPath(&quot;Template&quot;,&quot;wizard/bitmap&quot;)
+ DlgCalModel.imgCountry.ImageURL = BitmapDir &amp; sBitmapFilename
+ CalChoosenLand = -2
+ CalLoadOwnData()
+
+ With DlgCalModel
+ .cmdDelete.Enabled = False
+ .lstMonth.StringItemList() = cCalShortMonthNames()
+ Select Case sCurLangLocale
+ Case cLANGUAGE_JAPANESE
+ .lstOwnData.FontName = &quot;HG MinochoL&quot;
+ .txtEvent.FontName = &quot;HG MinchoL&quot;
+ Case cLANGUAGE_CHINESE
+ If oDocument.CharLocale.Country = &quot;CN&quot; Then
+ .lstOwnData.FontName = &quot;FZ Song Ti&quot;
+ .txtEvent.FontName = &quot;FZ Song Ti&quot;
+ Else
+ .lstOwnData.FontName = &quot;FZ Ming Ti&quot;
+ .txtEvent.FontName = &quot;FZ Ming Ti&quot;
+ End If
+ Case &quot;ko&quot;
+ .lstOwnData.FontName = &quot;Sun Gulim&quot;
+ .txtEvent.FontName = &quot;Sun Gulim&quot;
+ End Select
+ .lstOwnEventMonth.StringItemList() = cCalShortMonthNames()
+ .optYear.State = 1
+ .txtYear.Value = Year(Now())
+ .txtYear.Tag = .txtYear.Value
+ .Step = 1
+ End With
+ SetupNumberFormatter(sCurLangLocale, sCurCountryLocale)
+ CalChooseCalendar() &apos; month
+ iThisMonth = Month(Now)
+ DlgCalendar.GetControl(&quot;lstMonth&quot;).SelectItemPos(iThisMonth-1, True)
+ DlgCalendar.GetControl(&quot;lstHolidays&quot;).SelectItemPos(0,True)
+ DlgCalModel.cmdGoOn.DefaultButton = True
+ ToggleWindow(True)
+ DlgCalendar.GetControl(&quot;lblHolidays&quot;).Visible = sCurLangLocale = cLANGUAGE_GERMAN
+ DlgCalendar.GetControl(&quot;lstHolidays&quot;).Visible = sCurLangLocale = cLANGUAGE_GERMAN
+ fHeightCorrFactor = DlgCalendar.GetControl(&quot;imgCountry&quot;).Size.Height/198
+ fWidthCorrFactor = DlgCalendar.GetControl(&quot;imgCountry&quot;).Size.Width/166
+ DlgCalendar.Execute()
+ DlgCalendar.Dispose()
+ Exit Sub
+ErrorHandler:
+ MsgBox(sError$, 16, sWizardTitle$)
+End Sub
+
+
+Sub SetupNumberFormatter(sCurLangLocale as String, sCurCountryLocale as String)
+Dim oFormats as Object
+Dim DateFormatString as String
+ oFormats = oDocument.getNumberFormats()
+ Select Case sCurLangLocale
+ Case cLANGUAGE_GERMAN
+ DateFormatString = &quot;TT.MMM&quot;
+ Case cLANGUAGE_ENGLISH
+ DateFormatString = &quot;MMM DD&quot;
+ Case cLANGUAGE_FRENCH
+ DateFormatString = &quot;JJ/MMM&quot;
+ Case cLANGUAGE_ITALIAN
+ DateFormatString = &quot;GG/MMM&quot;
+ Case cLANGUAGE_SPANISH
+ DateFormatString = &quot;DD/MMM&quot;
+ Case cLANGUAGE_PORTUGUESE
+ If sCurCountryLocale = &quot;BR&quot; Then
+ DateFormatString = &quot;DD/MMM&quot;
+ Else
+ DateFormatString = &quot;DD-MMM&quot;
+ End If
+ Case cLANGUAGE_DUTCH
+ DateFormatString = &quot;DD/MMM&quot;
+ Case cLANGUAGE_SWEDISH
+ DateFormatString = &quot;MMM DD&quot;
+ Case cLANGUAGE_DANISH
+ DateFormatString = &quot;DD-MMM&quot;
+ Case cLANGUAGE_POLISH
+ DateFormatString = &quot;MMM DD&quot;
+ Case cLANGUAGE_RUSSIAN
+ DateFormatString = &quot;MMM DD&quot;
+ Case cLANGUAGE_JAPANESE
+ DateFormatString = &quot;M月D日&quot;
+ Case cLANGUAGE_CHINESE
+ If sCurCountryLocale = &quot;TW&quot; Then
+ DateFormatString = &quot;MMMMD&quot; &amp;&quot;&quot;&quot;&quot; &amp; &quot;日&quot; &amp; &quot;&quot;&quot;&quot;
+ Else
+ DateFormatString = &quot;M&quot; &amp; &quot;&quot;&quot;&quot; &amp; &quot;月&quot; &amp; &quot;&quot;&quot;&quot; &amp; &quot;D&quot; &amp;&quot;&quot;&quot;&quot; &amp; &quot;日&quot; &amp; &quot;&quot;&quot;&quot;
+ End If
+ Case cLANGUAGE_GREEK
+ DateFormatString = &quot;DD/MMM&quot;
+ Case cLANGUAGE_TURKISH
+ DateFormatString = &quot;DD/MMM&quot;
+ Case cLANGUAGE_POLISH
+ DateFormatString = &quot;MMM DD&quot;
+ Case cLANGUAGE_FINNISH
+ DateFormatString = &quot;PP.KKK&quot;
+ End Select
+
+ lDateFormat = AddNumberFormat(oFormats, DateFormatString, oDocument.CharLocale)
+ lDateStandardFormat = oFormats.getStandardFormat(com.sun.star.util.NumberFormat.DATE, oDocument.CharLocale)
+
+&apos; lDateStandardFormat = AddNumberFormat(oFormats, StandardDateFormatString, oDocument.CharLocale)
+ oNumberFormatter = createUNOService(&quot;com.sun.star.util.NumberFormatter&quot;)
+ oNumberFormatter.attachNumberFormatsSupplier(oDocument)
+End Sub
+
+
+Function AddNumberFormat(oNumberFormats as Object, FormatString as String, oLocale as Object) as Long
+Dim lLocDateFormat as Long
+ lLocDateFormat = oNumberFormats.QueryKey(FormatString, oLocale, True)
+ If lLocDateFormat = -1 Then
+ lLocDateFormat = oNumberFormats.addNew(FormatString, oLocale)
+ End If
+ AddNumberFormat() = lLocDateFormat
+End Function
+
+
+Sub CalChooseCalendar()
+ With DlgCalModel
+ .lstMonth.Enabled = .optMonth.State = 1
+ .lblMonth.Enabled = .optMonth.State = 1
+ End With
+End Sub
+
+
+Sub CalcmdCancel()
+ Call CalSaveOwnData()
+ DlgCalendar.EndExecute
+End Sub
+
+
+Sub CalcmdOk()
+ &apos; cmdOk is called when the Button &apos;Read&apos; is clicked on
+ &apos; It is either given out a month or a year
+Dim i, iSelYear as Integer
+Dim SelYear as String
+&apos; DlgCalendar.Visible = False
+
+ oSheets = oDocument.sheets
+ Call CalSaveOwnData()
+ UnprotectSheets(oSheets)
+ oSheets.RemovebyName(oSheets.GetbyIndex(0).Name)
+ iSelYear = DlgCalModel.txtYear.Value
+ Select Case sCurLangLocale
+ Case cLANGUAGE_GERMAN
+ If Ubound(DlgCalModel.lstHolidays.SelectedItems()) &gt; -1 Then
+ CalChoosenLand = DlgCalModel.lstHolidays.SelectedItems(0)
+ Else
+ CalChoosenLand = 0
+ End If
+ Call CalFindWholeYearHolidays_GERMANY(iSelYear, CalChoosenLand)
+ Case cLANGUAGE_ENGLISH
+ Call FindWholeYearHolidays_US(iSelYear)
+ Case cLANGUAGE_FRENCH
+ Call FindWholeYearHolidays_FRANCE(iSelYear)
+ Case cLANGUAGE_ITALIAN
+ Call FindWholeYearHolidays_ITA(iSelYear)
+ Case cLANGUAGE_SPANISH
+ Call FindWholeYearHolidays_SPAIN(iSelYear)
+ Case cLANGUAGE_PORTUGUESE
+ Call FindWholeYearHolidays_PORT(iSelYear)
+ Case cLANGUAGE_DUTCH
+ Call FindWholeYearHolidays_NL(iSelYear)
+ Case cLANGUAGE_SWEDISH
+ Call FindWholeYearHolidays_SWED(iSelYear)
+ Case cLANGUAGE_DANISH
+ Call FindWholeYearHolidays_DK(iSelYear)
+ Case cLANGUAGE_POLISH
+ Call FindWholeYearHolidays_PL(iSelYear)
+ Case cLANGUAGE_RUSSIAN
+ Call FindWholeYearHolidays_RU(iSelYear)
+ Case cLANGUAGE_JAPANESE
+ Call FindWholeYearHolidays_JP(iSelYear)
+ Case cLANGUAGE_CHINESE
+ If sCurCountryLocale = &quot;TW&quot; Then
+ Call FindWholeYearHolidays_TW(iSelYear)
+ Else
+ Call FindWholeYearHolidays_CN(iSelYear)
+ End If
+ Case cLANGUAGE_GREEK
+ Call FindWholeYearHolidays_GREEK(iSelYear)
+ Case cLANGUAGE_TURKISH
+ Call FindWholeYearHolidays_TRK(iSelYear)
+ Case cLANGUAGE_POLISH
+ Call FindWholeYearHolidays_PL(iSelYear)
+ Case cLANGUAGE_FINNISH
+ Call FindWholeYearHolidays_FI(iSelYear)
+ End Select
+
+ Call CalInsertOwnDataInTables(iSelYear)
+
+ If DlgCalModel.optYear.State = 1 Then
+ oSheets.RemovebyName(oSheets.GetbyIndex(0).Name)
+ oSheet = oSheets.GetbyIndex(0)
+ oSheet.Name = sCalendarTitle$ + &quot; &quot; + iSelYear
+ oDocument.AddActionLock
+ Call CalCreateYearTable(iSelYear)
+ ElseIf DlgCalModel.optMonth.State = 1 Then
+ Dim iMonth
+ iMonth = DlgCalModel.lstMonth.SelectedItems(0) + 1
+ oSheets.RemovebyName(oSheets.GetbyIndex(1).Name)
+ oSheet = oSheets.GetbyIndex(0)
+ If sMonthTitle = &quot;&quot; Then
+ oSheet.Name = cCalLongMonthNames(iMonth-1)
+ Else
+ oSheet.Name = sMonthTitle + &quot; &quot; + cCalLongMonthNames(iMonth-1)
+ End If
+ oDocument.AddActionLock
+ Call CalCreateMonthTable(iSelYear, iMonth)
+ End If
+
+ oDocument.RemoveActionLock
+ oSheet.protect(&quot;&quot;)
+ oStatusLine.End
+ DlgCalendar.EndExecute()
+ bCancelTask = True
+End Sub
+</script:module> \ No newline at end of file
diff --git a/wizards/source/schedule/CreateTable.xba b/wizards/source/schedule/CreateTable.xba
new file mode 100644
index 000000000000..6d472a84bca4
--- /dev/null
+++ b/wizards/source/schedule/CreateTable.xba
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="CreateTable" script:language="StarBasic">Option Explicit
+
+Public Const FirstDayRow = 5 &apos; Row on month sheet for first day of month
+Public Const DateColumn% = 3 &apos; Column on month sheet with days
+Public Const NewYearRow = 4 &apos; Row on year sheet for January 1st
+Public Const NewYearColumn = 2 &apos; Column on year sheet for January 1st
+
+
+Sub CalCreateYearTable(ByVal iSelYear as Integer)
+&apos; Completes the overview for whole year
+
+&apos; Needed by StarOffice Calc and StarOffice Schedule
+Dim CalDay as Integer
+Dim CalMonth as Integer
+Dim i as Integer
+Dim s as Integer
+Dim oYearCell as object
+Dim iDate
+Dim ColPos, RowPos as Integer
+Dim oNameCell, oDateCell as Object
+Dim iCellValue as Long
+Dim oRangeFebCell, oCellAddress, oFebcell as Object
+Dim oRangeBlank as Object
+Dim sBlankStyle as String
+&apos; On Error Goto ErrorHandling
+ oStatusLine.Start(&quot;&quot;,140) &apos;GetResText(sProgress)
+ iDate = DateSerial(iSelYear,1,1)
+ oYearCell = oSheet.GetCellRangeByName(&quot;Year&quot;)
+ oYearCell.Value = iSelYear
+
+ CalMonth = 1
+ CalDay = 0
+ s = 10
+ oStatusLine.SetValue(s)
+ For i = 1 To 374
+ CalDay = CalDay+1
+ If CalDay = 32 Then
+ CalDay = 1
+ CalMonth = CalMonth+1
+ s = s + 10
+ oStatusLine.SetValue(s)
+ End If
+ ColPos = NewYearColumn+(2*CalMonth)
+ RowPos = NewYearRow + CalDay
+ FormatCalCells(ColPos,RowPos,i)
+ Next
+ If NOT CalIsLeapYear(iSelYear) Then
+ &apos; Delete 29th February if necessary
+ oRangeFebCell = oSheet.GetCellRangeByName(&quot;Feb29&quot;)
+ oCellAddress = oRangeFebCell.RangeAddress
+ oFebCell = oSheet.GetCellByPosition(oCellAddress.StartColumn,oCellAddress.StartRow)
+ oFebCell.String = &quot;&quot;
+ &apos; Change the CellStyle according to the Range &quot;Blank&quot;
+ oRangeBlank = oSheet.GetCellRangebyName(&quot;Blank&quot;)
+ sBlankStyle = oRangeBlank.CellStyle
+ oRangeFebCell.CellStyle = sBlankStyle
+ End If
+ oStatusLine.SetValue(150)
+ ErrorHandling:
+ If Err &lt;&gt; 0 Then
+ MsgBox sError$, 16, sWizardTitle$
+ End If
+End Sub
+
+
+
+Sub CalCreateMonthTable(ByVal iSelYear as Integer, iSelMonth as Integer)
+Dim oMonthCell, oDateCell as Object
+Dim iDate as Date
+Dim oAddress
+Dim i, s as Integer
+Dim iStartDay as Integer
+
+&apos; Completes the monthly calendar
+&apos;On Error Goto ErrorHandling
+ oStatusLine.Start(&quot;&quot;,40) &apos;GetResText(sProgess)
+ &apos; Set month
+ oMonthCell = oSheet.GetCellRangeByName(&quot;Month&quot;)
+
+ iDate = DateSerial(iSelYear,iSelMonth,1)
+ oMonthCell.Value = iDate
+ &apos; Inserting holidays
+ iStartDay = (iSelMonth - 1) * 31 + 1
+ s = 5
+ For i = iStartDay To iStartDay + 30
+ oStatusLine.SetValue(s)
+ s = s + 1
+ FormatCalCells(DateColumn+1,FirstDayRow + i - iStartDay,i)
+ Next
+ oDateCell = oSheet.GetCellbyPosition(DateColumn,FirstDayRow+i-iStartDay - 1)
+ oAddress = oDateCell.RangeAddress
+
+ Select Case iSelMonth
+ Case 2,4,6,9,11
+ oSheet.RemoveRange(oAddress, com.sun.star.sheet.CellDeleteMode.ROWS)
+ If iSelMonth = 2 Then
+ oAddress.StartRow = oAddress.StartRow - 1
+ oAddress.EndRow = oAddress.StartRow
+ oSheet.RemoveRange(oAddress, com.sun.star.sheet.CellDeleteMode.ROWS)
+ If Not CalIsLeapYear(iSelYear) Then
+ oAddress.StartRow = oAddress.StartRow - 1
+ oAddress.EndRow = oAddress.StartRow
+ oSheet.RemoveRange(oAddress, com.sun.star.sheet.CellDeleteMode.ROWS)
+ End If
+ End If
+ End Select
+ oStatusLine.SetValue(45)
+ErrorHandling:
+ If Err &lt;&gt; 0 Then
+ MsgBox sError$, 16, sWizardTitle$
+ End If
+End Sub
+
+
+
+Sub FormatCalCells(ColPos,RowPos,i as Integer)
+Dim oNameCell, oDateCell as Object
+Dim iCellValue as Long
+ oDateCell = oSheet.GetCellbyPosition(ColPos-1,RowPos)
+ If oDateCell.Value &lt;&gt; 0 Then
+ iCellValue = oDateCell.Value
+ oDateCell.Value = iCellValue
+ If CalBankHolidayName$(i) &lt;&gt; &quot;&quot; Then
+ oNameCell = oSheet.GetCellbyPosition(ColPos,RowPos)
+ oNameCell.String = CalBankHolidayName$(i)
+ If CalTypeOfBankHoliday%(i) = cHolidayType_Full Then
+ oDateCell.CellStyle = cCalStyleWeekend$
+ End If
+ End If
+ End If
+End Sub</script:module> \ No newline at end of file
diff --git a/wizards/source/schedule/DlgCalendar.xdl b/wizards/source/schedule/DlgCalendar.xdl
new file mode 100644
index 000000000000..7f1b68d895e7
--- /dev/null
+++ b/wizards/source/schedule/DlgCalendar.xdl
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
+<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="Dialog1" dlg:left="160" dlg:top="81" dlg:width="208" dlg:height="156" dlg:page="1" dlg:help-url="HID:34700" dlg:closeable="true" dlg:moveable="true">
+ <dlg:styles>
+ <dlg:style dlg:style-id="0" dlg:border="none"/>
+ <dlg:style dlg:style-id="1" dlg:font-name="Cumberland" dlg:font-stylename="Standard" dlg:font-family="modern" dlg:font-charset="ansi"/>
+ <dlg:style dlg:style-id="2" dlg:font-name="Cumberland" dlg:font-stylename="Standard" dlg:font-family="modern" dlg:font-charset="ansi"/>
+ </dlg:styles>
+ <dlg:bulletinboard>
+ <dlg:menulist dlg:id="lstHolidays" dlg:tab-index="0" dlg:left="6" dlg:top="17" dlg:width="95" dlg:height="12" dlg:page="1" dlg:help-url="HID:34708" dlg:spin="true"/>
+ <dlg:fixedline dlg:id="hlnCalendar" dlg:tab-index="1" dlg:left="6" dlg:top="36" dlg:width="95" dlg:height="8" dlg:page="1" dlg:value="hlnCalendar"/>
+ <dlg:radiogroup>
+ <dlg:radio dlg:id="optYear" dlg:tab-index="2" dlg:left="12" dlg:top="47" dlg:width="81" dlg:height="10" dlg:page="1" dlg:help-url="HID:34702" dlg:value="optYear">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Schedule.CalendarMain.CalChooseCalendar?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:radio>
+ <dlg:radio dlg:id="optMonth" dlg:tab-index="3" dlg:left="12" dlg:top="61" dlg:width="81" dlg:height="10" dlg:page="1" dlg:help-url="HID:34703" dlg:value="optMonth">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Schedule.CalendarMain.CalChooseCalendar?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:radio>
+ </dlg:radiogroup>
+ <dlg:text dlg:id="lblHolidays" dlg:tab-index="4" dlg:left="6" dlg:top="6" dlg:width="96" dlg:height="8" dlg:page="1" dlg:value="lblHolidays"/>
+ <dlg:img dlg:style-id="0" dlg:id="imgCountry" dlg:tab-index="5" dlg:left="106" dlg:top="6" dlg:width="95" dlg:height="113" dlg:page="1" dlg:help-url="HID:34701">
+ <script:event script:event-name="on-mousedown" script:macro-name="vnd.sun.star.script:Schedule.DlgControl.SelectState?language=Basic&amp;location=application" script:language="Script"/>
+ <script:event script:event-name="on-mouseout" script:macro-name="vnd.sun.star.script:Schedule.DlgControl.MouseLeavesImage?language=Basic&amp;location=application" script:language="Script"/>
+ <script:event script:event-name="on-mousemove" script:macro-name="vnd.sun.star.script:Schedule.DlgControl.CalMouseMoved?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:img>
+ <dlg:fixedline dlg:id="hlnTime" dlg:tab-index="6" dlg:left="5" dlg:top="78" dlg:width="95" dlg:height="8" dlg:page="1" dlg:value="hlnTime"/>
+ <dlg:menulist dlg:id="lstMonth" dlg:tab-index="7" dlg:left="62" dlg:top="106" dlg:width="38" dlg:height="12" dlg:page="1" dlg:help-url="HID:34705" dlg:spin="true"/>
+ <dlg:text dlg:id="lblYear" dlg:tab-index="8" dlg:left="12" dlg:top="91" dlg:width="46" dlg:height="8" dlg:page="1" dlg:value="lblYear"/>
+ <dlg:text dlg:id="lblMonth" dlg:tab-index="9" dlg:left="12" dlg:top="108" dlg:width="46" dlg:height="8" dlg:page="1" dlg:value="lblMonth"/>
+ <dlg:fixedline dlg:id="FixedLine1" dlg:tab-index="10" dlg:left="6" dlg:top="125" dlg:width="196" dlg:height="4"/>
+ <dlg:button dlg:id="cmdCancel" dlg:tab-index="11" dlg:left="6" dlg:top="136" dlg:width="50" dlg:height="14" dlg:help-url="HID:34721" dlg:value="cmdCancel">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Schedule.CalendarMain.CalcmdCancel?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:button dlg:id="cmdOwnData" dlg:tab-index="12" dlg:left="99" dlg:top="136" dlg:width="50" dlg:height="14" dlg:help-url="HID:34720" dlg:value="cmdOwnData">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Schedule.DlgControl.CalmdSwitchOwnDataOrGeneral?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:button dlg:id="cmdGoOn" dlg:tab-index="13" dlg:left="152" dlg:top="136" dlg:width="50" dlg:height="14" dlg:help-url="HID:34722" dlg:value="cmdGoOn">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Schedule.CalendarMain.CalcmdOk?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:text dlg:id="lblEvent" dlg:tab-index="14" dlg:left="12" dlg:top="17" dlg:width="67" dlg:height="8" dlg:page="2" dlg:value="lblEvent"/>
+ <dlg:fixedline dlg:id="hlnNewEvent" dlg:tab-index="15" dlg:left="6" dlg:top="6" dlg:width="196" dlg:height="8" dlg:page="2" dlg:value="hlnNewEvent"/>
+ <dlg:textfield dlg:style-id="1" dlg:id="txtEvent" dlg:tab-index="16" dlg:left="12" dlg:top="28" dlg:width="107" dlg:height="12" dlg:page="2" dlg:help-url="HID:34712">
+ <script:event script:event-name="on-textchange" script:macro-name="vnd.sun.star.script:Schedule.OwnEvents.CheckInsertedDates?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:textfield>
+ <dlg:numericfield dlg:id="txtOwnEventDay" dlg:tab-index="17" dlg:left="13" dlg:top="55" dlg:width="30" dlg:height="12" dlg:page="2" dlg:help-url="HID:34714" dlg:decimal-accuracy="0" dlg:value-min="1" dlg:spin="true">
+ <script:event script:event-name="on-textchange" script:macro-name="vnd.sun.star.script:Schedule.OwnEvents.CheckInsertedDates?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:numericfield>
+ <dlg:menulist dlg:id="lstOwnEventMonth" dlg:tab-index="18" dlg:left="60" dlg:top="55" dlg:width="30" dlg:height="12" dlg:page="2" dlg:help-url="HID:34716" dlg:spin="true">
+ <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:Schedule.OwnEvents.GetOwnMonth?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:menulist>
+ <dlg:button dlg:id="cmdInsert" dlg:tab-index="19" dlg:left="99" dlg:top="70" dlg:width="50" dlg:height="14" dlg:page="2" dlg:help-url="HID:34710" dlg:value="cmdInsert">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Schedule.OwnEvents.CalcmdInsertData?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:button dlg:id="cmdDelete" dlg:tab-index="20" dlg:left="152" dlg:top="70" dlg:width="50" dlg:height="14" dlg:page="2" dlg:help-url="HID:34711" dlg:value="cmdDelete">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Schedule.DlgControl.CalcmdDeleteSelect?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:menulist dlg:style-id="2" dlg:id="lstOwnData" dlg:tab-index="21" dlg:left="12" dlg:top="86" dlg:width="190" dlg:height="34" dlg:page="2" dlg:help-url="HID:34709">
+ <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:Schedule.DlgControl.CalUpdateNewEventFrame?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:menulist>
+ <dlg:text dlg:id="lblEventDay" dlg:tab-index="22" dlg:left="12" dlg:top="44" dlg:width="44" dlg:height="8" dlg:page="2" dlg:value="lblEventDay"/>
+ <dlg:text dlg:id="lblEventMonth" dlg:tab-index="23" dlg:left="60" dlg:top="44" dlg:width="44" dlg:height="8" dlg:page="2" dlg:value="lblEventMonth"/>
+ <dlg:numericfield dlg:id="txtYear" dlg:tab-index="24" dlg:left="62" dlg:top="89" dlg:width="38" dlg:height="12" dlg:page="1" dlg:help-url="HID:34704" dlg:decimal-accuracy="0" dlg:value-min="1582" dlg:value-max="9957" dlg:spin="true"/>
+ </dlg:bulletinboard>
+</dlg:window> \ No newline at end of file
diff --git a/wizards/source/schedule/DlgControl.xba b/wizards/source/schedule/DlgControl.xba
new file mode 100644
index 000000000000..b7a7c4c957ae
--- /dev/null
+++ b/wizards/source/schedule/DlgControl.xba
@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="DlgControl" script:language="StarBasic">Option Explicit
+
+Dim CalBitmap As Object
+Public bSelectByMouseMove as Boolean
+Public fHeightCorrFactor as Double
+Public fWidthCorrFactor as Double
+
+
+
+Sub Main()
+ Call CalAutopilotTable()
+End Sub
+
+
+Sub CalcmdDeleteSelect()
+Dim MsgBoxResult as Integer
+Dim bDoEnable as Boolean
+Dim iSel as Integer
+Dim MaxIndex as Integer
+ If Ubound(DlgCalModel.lstOwnData.SelectedItems()) &gt; -1 Then
+ MsgBoxResult = MsgBox(cCalSubcmdDeleteSelect_DeleteSelEntry$, 4+32, cCalSubcmdDeleteSelect_DeleteSelEntryTitle$)
+ If MsgBoxResult = 6 Then
+ iSel = DlgCalModel.lstOwnData.SelectedItems(0)
+ DlgCalModel.lstOwnData.StringItemList() = RemoveSelected(DlgCalModel.lstOwnData)
+ &apos; Flag to store the new data
+ bCalOwnDataChanged = True
+ bDoEnable = Ubound(DlgCalModel.lstOwnData.StringItemList()) &gt; -1
+ DlgCalModel.cmdDelete.Enabled = bDoEnable
+ If bDoEnable Then
+ MaxIndex = Ubound(DlgCalModel.lstOwnData.StringItemList())
+ If iSel &gt; MaxIndex Then
+ iSel = MaxIndex
+ End If
+ DlgCalendar.GetControl(&quot;lstOwnData&quot;).SelectItemPos(iSel, True)
+ CalUpdateNewEventFrame()
+ Else
+ Call CalClearInputMask()
+ End If
+ End If
+ End If
+End Sub
+
+
+Sub CalSaveOwnEventControls()
+ With DlgCalModel
+ .txtOwnEventDay.Tag = .txtOwnEventDay.Value
+ .txtOwnEventMonth.Tag = .txtOwnEventMonth.Text
+ End With
+End Sub
+
+
+Sub CalMouseMoved(aEvent as object)
+Dim ListIndex as Integer
+ Select Case sCurLangLocale
+ Case cLANGUAGE_GERMAN
+ If bSelectByMouseMove Then
+&apos; oStatusLine.SetText(&quot;Position: &quot; &amp; aEvent.X &amp; &quot; ; &quot; &amp; aEvent.Y)
+ ListIndex = CalGetGermanLandAtMousePos(CInt(aEvent.X/fWidthCorrFactor), CInt(aEvent.Y/fHeightCorrFactor))
+ DlgCalendar.GetControl(&quot;lstHolidays&quot;).SelectItemPos(ListIndex, True)
+ End If
+ End Select
+End Sub
+
+
+Sub SelectState(aEvent as Object)
+Dim ListIndex as Integer
+ Select Case sCurLangLocale
+ Case cLANGUAGE_GERMAN
+ If aEvent.ClickCount &gt;= 1 Then
+ ListIndex = CalGetGermanLandAtMousePos(CInt(aEvent.X/fWidthCorrFactor), CInt(aEvent.Y/fHeightCorrFactor))
+ DlgCalendar.GetControl(&quot;lstHolidays&quot;).SelectItemPos(ListIndex, True)
+ bSelectByMouseMove = False
+ End If
+ End Select
+End Sub
+
+
+Sub MouseLeavesImage
+ bSelectbyMouseMove = True
+End Sub
+
+
+Sub CalClearInputMask()
+Dim NullList() as String
+ With DlgCalModel
+ .txtEvent.Text = &quot;&quot;
+ .txtOwnEventDay.SetPropertyToDefault(&quot;Value&quot;)
+ .cmdInsert.Enabled = False
+ End With
+ If Ubound(DlgCalModel.lstOwnData.StringItemList()) &gt; -1 Then
+ If Ubound(DlgCalModel.lstOwnData.SelectedItems()) = -1 Then
+ DlgCalendar.GetControl(&quot;lstOwnData&quot;).SelectItemPos(0,True)
+ CalUpdateNewEventFrame()
+ End If
+ End If
+End Sub
+
+
+Sub CalmdSwitchOwnDataOrGeneral()
+ If DlgCalModel.Step = 1 Then
+ DlgCalModel.Step = 2
+ DlgCalModel.cmdOwnData.Label = cCalSubcmdSwitchOwnDataOrGeneral_Back$
+ DlgCalModel.cmdInsert.Enabled = DlgCalModel.txtEvent.Text &lt;&gt; &quot;&quot;
+&apos; ToggleYearBox()
+ Else
+ dim bla as boolean
+ DlgCalModel.Step = 1
+ DlgCalendar.GetControl(&quot;lblHolidays&quot;).Visible = sCurLangLocale = cLANGUAGE_GERMAN
+ DlgCalendar.GetControl(&quot;lstHolidays&quot;).Visible = sCurLangLocale = cLANGUAGE_GERMAN
+ DlgCalModel.cmdOwnData.Label = cCalSubcmdSwitchOwnDataOrGeneral_OwnData$
+ End If
+End Sub
+
+
+Sub ToggleInsertButton()
+ DlgCalModel.cmdInsert.Enabled = LTrim(DlgCalModel.txtEvent.Text) &lt;&gt; &quot;&quot;
+End Sub
+
+
+Sub CalUpdateNewEventFrame()
+Dim bDoEnable as Boolean
+Dim sSelectedItem
+Dim ListIndex as Integer
+Dim MaxSelIndex as Integer
+Dim CurEvMonth as Integer
+Dim CurEvDay as Integer
+Dim DateStr as String
+ bDoEnable = False
+ With DlgCalModel
+ MaxSelIndex = Ubound(DlgCalModel.lstOwnData.SelectedItems())
+ If MaxSelIndex &gt; -1 Then
+ ListIndex = .lstOwnData.SelectedItems(MaxSelIndex)
+ .txtEvent.Text = CalGetNameofEvent(ListIndex)
+ If GetSelectedDateUnits(CurEvDay, CurEvMonth, ListIndex) &lt;&gt; SBDATEUNDEFINED Then
+ .txtOwnEventDay.Value = CurEvDay
+ DlgCalendar.GetControl(&quot;lstOwnEventMonth&quot;).SelectItemPos(CurEvMonth-1, True)
+ .cmdDelete.Enabled = True
+ .cmdInsert.Enabled = True
+ Else
+ Call CalClearInputMask()
+ .cmdDelete.Enabled = True
+ End If
+ End If
+ End With
+End Sub
+</script:module> \ No newline at end of file
diff --git a/wizards/source/schedule/GermanHolidays.xba b/wizards/source/schedule/GermanHolidays.xba
new file mode 100644
index 000000000000..7ce4357e9699
--- /dev/null
+++ b/wizards/source/schedule/GermanHolidays.xba
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="GermanHolidays" script:language="StarBasic">Option Explicit
+
+Sub Main()
+ Call CalAutopilotTable()
+End Sub
+
+Function CalGetGermanLandAtMousePos(byval X as single, byval Y as single) as Integer
+ CalChoosenLand = 0
+ If (X&gt;73)And(X&lt;130)And(Y&gt;=117)And(Y&lt;181) Then
+ CalChoosenLand = CalBLBayern
+
+ ElseIf (X&gt;41)And(X&lt;89)And(Y&gt;=136)And(Y&lt;183) Then
+ CalChoosenLand = CalBLBadenWuert
+
+ ElseIf (X&gt;18)And(X&lt;35)And(Y&gt;136)And(Y&lt;147) Then
+ CalChoosenLand = CalBLSaarland
+
+ ElseIf (X&gt;13)And(X&lt;42)And(Y&gt;111)And(Y&lt;146) Then
+ CalChoosenLand = CalBLRheinlandPfalz
+
+ ElseIf (X&gt;15)And(X&lt;=60)And(Y&gt;=69)And(Y&lt;112) Then
+ CalChoosenLand = CalBLNordrheinWest
+
+ ElseIf (X&gt;=42)And(X&lt;78)And(Y&gt;=95)And(Y&lt;136) Then
+ CalChoosenLand = CalBLHessen
+
+ ElseIf (X&gt;=78)And(X&lt;112)And(Y&gt;=95)And(Y&lt;117) Then
+ CalChoosenLand = CalBLThueringen
+
+ ElseIf (X&gt;=112)And(X&lt;158)And(Y&gt;=88)And(Y&lt;114) Then
+ CalChoosenLand = CalBLSachsen
+
+ ElseIf (X&gt;77)And(X&lt;84)And(Y&gt;35)And(Y&lt;42) Then
+ CalChoosenLand = CalBLHamburg
+
+ ElseIf (X&gt;56)And(X&lt;60)And(Y&gt;36)And(Y&lt;41) Then
+ CalChoosenLand = CalBLBremen
+
+ ElseIf (X&gt;58)And(X&lt;63)And(Y&gt;44)And(Y&lt;52) Then
+ CalChoosenLand = CalBLBremen
+
+ ElseIf (X&gt;52)And(X&lt;95)And(Y&gt;8)And(Y&lt;40) Then
+ CalChoosenLand = CalBLSchlHolstein
+
+ ElseIf (X&gt;90)And(X&lt;149)And(Y&gt;23)And(Y&lt;48) Then
+ CalChoosenLand = CalBLMeckPomm
+
+ ElseIf (X&gt;28)And(X&lt;90)And(Y&gt;35)And(Y&lt;69) Then
+ CalChoosenLand = CalBLNiedersachsen
+
+ ElseIf (X&gt;60)And(X&lt;90)And(Y&gt;=69)And(Y&lt;95) Then
+ CalChoosenLand = CalBLNiedersachsen
+
+ ElseIf (X&gt;=90)And(X&lt;=115)And(Y&gt;47)And(Y&lt;95) Then
+ CalChoosenLand = CalBLSachsenAnhalt
+
+ ElseIf (X&gt;129)And(X&lt;139)And(Y&gt;60)And(Y&lt;66) Then
+ CalChoosenLand = CalBLBerlin
+
+ ElseIf (X&gt;115)And(X&lt;151)And(Y&gt;=48)And(Y&lt;88) Then
+ CalChoosenLand = CalBLBrandenburg
+ End If
+ CalGetGermanLandAtMousePos = CalChoosenLand
+End Function
+
+
+
+Sub CalFindWholeYearHolidays_GERMANY(ByVal iSelYear as Integer, ByVal iCountry as Integer)
+ Dim So as Integer
+ Dim OsternDate&amp;, VierterAdvent&amp;
+
+ If (iCountry &lt; 1) Or (iCountry &gt; 16) Then
+ iCountry = CalBLHamburg
+ End If
+ OsternDate&amp; = CalEasterTable&amp;(iSelYear)
+ So = 1
+
+ CalInsertBankholiday(DateSerial(iSelYear, 1, 1), &quot;Neujahr&quot;, cHolidayType_Full)
+
+ If (iCountry = CalBLBayern) Or (iCountry = CalBLBadenWuert) Or (iCountry = CalBLSachsenAnhalt) Then
+ CalInsertBankholiday(DateSerial(iSelYear, 1, 6), &quot;Hl. 3 Könige&quot;, cHolidayType_Full)
+ End If
+
+ CalInsertBankholiday(OsternDate&amp;-2, &quot;Karfreitag&quot;, cHolidayType_Full)
+ CalInsertBankholiday(OsternDate&amp;, &quot;Ostersonntag&quot;, cHolidayType_Full)
+ CalInsertBankholiday(OsternDate&amp;+1, &quot;Ostermontag&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(iSelYear, 5, 1), &quot;Maifeiertag&quot;, cHolidayType_Full)
+ CalInsertBankholiday(OsternDate&amp;+39, &quot;Christi Himmelfahrt&quot;, cHolidayType_Full)
+ CalInsertBankholiday(OsternDate&amp;+49, &quot;Pfingstsonntag&quot;, cHolidayType_Full)
+ CalInsertBankholiday(OsternDate&amp;+50, &quot;Pfingstmontag&quot;, cHolidayType_Full)
+
+ If (iCountry = CalBLBadenWuert) Or (iCountry = CalBLBayern) Or (iCountry = CalBLHessen) Or (iCountry = CalBLNordRheinWest) Or (iCountry = CalBLRheinlandPfalz) Or (iCountry = CalBLSaarland) Or (iCountry = CalBLSachsen) Or (iCountry = CalBLThueringen) Then
+ CalInsertBankholiday(OsternDate&amp;+60, &quot;Fronleichnam&quot;, cHolidayType_Full)
+ End If
+
+ If (iCountry = CalBLBayern) Or (iCountry = CalBLSaarland) Then
+ CalInsertBankholiday(DateSerial(iSelYear, 8, 15), &quot;Mariä Himmelfahrt&quot;, cHolidayType_Full)
+ End If
+
+ CalInsertBankholiday(DateSerial(iSelYear, 10, 3), &quot;Tag der dt. Einheit&quot;, cHolidayType_Full)
+
+ If (iCountry=CalBLBrandenburg) Or (iCountry=CalBLMeckPomm) Or (iCountry=CalBLSachsenAnhalt) Or (iCountry=CalBLSachsen) Or (iCountry=CalBLThueringen) Then
+ CalInsertBankholiday(DateSerial(iSelYear, 10, 31), &quot;Reformationstag&quot;, cHolidayType_Full)
+ End If
+
+ If (iCountry = CalBLBadenWuert) Or (iCountry = CalBLBayern) Or (iCountry = CalBLNordRheinWest) Or (iCountry = CalBLRheinlandPfalz) Or (iCountry = CalBLSaarland) Or (iCountry = CalBLSachsen) Or (iCountry = CalBLThueringen) Then
+ CalInsertBankholiday(DateSerial(iSelYear, 11, 1), &quot;Allerheiligen&quot;, cHolidayType_Full)
+ End If
+
+ vierterAdvent = DateSerial(iSelYear, 12, 24)
+ While WeekDay(vierterAdvent) &lt;&gt; So
+ vierterAdvent = vierterAdvent - 1
+ Wend
+
+ If iCountry = CalBLSachsen Then
+ CalInsertBankholiday(vierterAdvent-32, &quot;Buß- und Bettag&quot;, cHolidayType_Full)
+ Else
+ CalInsertBankholiday(vierterAdvent-32, &quot;Buß- und Bettag&quot;, cHolidayType_Half)
+ End If
+ CalInsertBankholiday(vierterAdvent-21, &quot;1. Advent&quot;, cHolidayType_Full)
+ CalInsertBankholiday(vierterAdvent-14, &quot;2. Advent&quot;, cHolidayType_Full)
+ CalInsertBankholiday(vierterAdvent-7, &quot;3. Advent&quot;, cHolidayType_Full)
+ CalInsertBankholiday(vierterAdvent, &quot;4. Advent&quot;, cHolidayType_Full)
+
+ CalInsertBankholiday(Dateserial(iSelYear, 12, 24), &quot;Heiligabend&quot;, cHolidayType_Half)
+ CalInsertBankholiday(Dateserial(iSelYear, 12, 25), &quot;1. Weihnachtstag&quot;, cHolidayType_Full)
+ CalInsertBankholiday(Dateserial(iSelYear, 12, 26), &quot;2. Weihnachtstag&quot;, cHolidayType_Full)
+ CalInsertBankholiday(Dateserial(iSelYear, 12, 31), &quot;Sylvester&quot;, cHolidayType_Half)
+End Sub
+</script:module> \ No newline at end of file
diff --git a/wizards/source/schedule/Language.xba b/wizards/source/schedule/Language.xba
new file mode 100644
index 000000000000..9fbf0942e94f
--- /dev/null
+++ b/wizards/source/schedule/Language.xba
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Language" script:language="StarBasic">Option Explicit
+
+
+Public Const cLANGUAGE_SYSTEM = &quot;&quot;, cLANGUAGE_CHINESE = &quot;zh&quot;, cLANGUAGE_DANISH = &quot;da&quot;
+Public Const cLANGUAGE_DUTCH = &quot;nl&quot;, cLANGUAGE_ENGLISH = &quot;en&quot;, cLANGUAGE_FINNISH = &quot;fi&quot;
+Public Const cLANGUAGE_FRENCH = &quot;fr&quot;, cLANGUAGE_GERMAN = &quot;de&quot;, cLANGUAGE_GREEK = &quot;el&quot;
+Public Const cLANGUAGE_ITALIAN = &quot;it&quot;, cLANGUAGE_JAPANESE = &quot;ja&quot;, cLANGUAGE_NORWEGIAN = &quot;no&quot;
+Public Const cLANGUAGE_POLISH = &quot;pl&quot;, cLANGUAGE_PORTUGUESE = &quot;pt&quot;, cLANGUAGE_RUSSIAN = &quot;ru&quot;
+Public Const cLANGUAGE_SPANISH = &quot;es&quot;, cLANGUAGE_SWEDISH = &quot;sv&quot;, cLANGUAGE_TURKISH = &quot;tr&quot;
+
+Public BLNameList(0 To 16) as String
+
+
+&apos; R e s o u r c e s t r i n g c o n s t a n t s
+&apos; -------------------------------------------------
+&apos; Dialog labels start at 1000
+
+Sub LoadLanguage%(ByVal LangLocale)
+Dim Dummy$
+Dim i as Integer
+Const dlgMonth = 1200
+&apos; Abreviated months start 1225
+Const dlgShortMonth = 1225
+ If InitResources(&quot;schedule&quot;, &quot;cal&quot;) Then
+ If LangLocale = cLANGUAGE_GERMAN Then
+
+ &apos; Load all states
+ BLNameList(0) = GetResText(1100)
+ BLNameList(1) = &quot;Bayern&quot;
+ BLNameList(2) = &quot;Baden-Württemberg&quot;
+ BLNameList(3) = &quot;Berlin&quot;
+ BLNameList(4) = &quot;Bremen&quot;
+ BLNameList(5) = &quot;Brandenburg&quot;
+ BLNameList(6) = &quot;Hamburg&quot;
+ BLNameList(7) = &quot;Hessen&quot;
+ BLNameList(8) = &quot;Mecklenburg-Vorpommern&quot;
+ BLNameList(9) = &quot;Niedersachsen&quot;
+ BLNameList(10) = &quot;Nordrhein-Westfalen&quot;
+ BLNameList(11) = &quot;Rheinland-Pfalz&quot;
+ BLNameList(12) = &quot;Saarland&quot;
+ BLNameList(13) = &quot;Sachsen&quot;
+ BLNameList(14) = &quot;Sachsen-Anhalt&quot;
+ BLNameList(15) = &quot;Schleswig Holstein&quot;
+ BLNameList(16) = &quot;Thüringen&quot;
+
+ DlgCalModel.lstHolidays.StringItemList() = BLNameList()
+ End If
+ sWizardTitle$ = GetResText(1300)
+ sError = GetResText(1301)
+ cCalSubcmdDeleteSelect_DeleteSelEntryTitle$ = GetResText(1302)
+ cCalSubcmdDeleteSelect_DeleteSelEntry$ = GetResText(1303)
+ DlgCalendar.Title = GetResText(1000)
+
+ With DlgCalModel
+ cCalSubcmdSwitchOwnDataOrGeneral_OwnData$ = GetResText(1002)
+ cCalSubcmdSwitchOwnDataOrGeneral_Back$ = GetResText(1001)
+ .hlnTime.Label = GetResText(1011)
+ .lblYear.Label = GetResText(1012)
+ .cmdCancel.Label = GetResText(1005)
+ .cmdGoOn.Label = GetResText(1004)
+ .lblHolidays.Label = GetResText(1014)
+ sBitmapFilename = GetResText(1099)
+ sBitmapFilename = ReplaceString(sBitmapFileName, &quot;.gif&quot;, &quot;.bmp&quot;)
+ DlgCalModel.hlnCalendar.Label = GetResText(1006)
+ .optYear.Label = GetResText(1007)
+ .optMonth.Label = GetResText(1008)
+ .lblMonth.Label = GetResText(1013)
+ .cmdOwnData.Label = GetResText(1015)
+ .hlnNewEvent.Label = GetResText(1019)
+ .lblEvent.Label = GetResText(1019)
+ .lblEventDay.Label = GetResText(1021)
+ .lblEventMonth.Label = GetResText(1022)
+&apos; .lblEventYear.Label = GetResText(1023)
+&apos; .chkEventOnce.Label = GetResText(1020)
+ .cmdInsert.Label = GetResText(1016)
+ .cmdDelete.Label = GetResText(1017)
+ &apos; Load long month names
+ For i = 0 To 11
+ cCalLongMonthNames(i) = GetResText(dlgMonth+i)
+ cCalShortMonthNames(i)= cCalLongMonthNames(i)
+ &apos;cCalShortMonthNames(i)= Left$(cCalLongMonthNames(i), 3)
+ cCalShortMonthNames(i)= RTrim(cCalShortMonthNames(i))
+ Next
+ &apos; Load sheet names
+ sCalendarTitle = GetResText(1410)
+ sMonthTitle = GetResText(1411)
+ &apos; Load names of styles
+ cCalStyleWorkday$ = GetResText(1400)
+ cCalStyleWeekend$ = GetResText(1401)
+ End With
+ End If
+End Sub
+</script:module> \ No newline at end of file
diff --git a/wizards/source/schedule/LocalHolidays.xba b/wizards/source/schedule/LocalHolidays.xba
new file mode 100644
index 000000000000..0b347c03f031
--- /dev/null
+++ b/wizards/source/schedule/LocalHolidays.xba
@@ -0,0 +1,642 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="LocalHolidays" script:language="StarBasic">Option Explicit
+
+Sub Main
+ Call CalAutopilotTable()
+End Sub
+
+
+Sub FindWholeYearHolidays_FRANCE(ByVal YearInt as Integer)
+Dim lEasterDate&amp;
+Dim lDate&amp;
+ CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;Jour de l&apos;an&quot;, cHolidayType_Full)
+ lEasterDate = CalEasterTable(YearInt)
+ CalInsertBankholiday(lEasterDate, &quot;Pâques&quot;, cHolidayType_Full)
+ CalInsertBankholiday(lEasterDate + 1, &quot;Lundi de Pâques&quot;, cHolidayType_Full)
+ CalInsertBankholiday(lEasterDate + 39, &quot;Ascension&quot;, cHolidayType_Full)
+ CalInsertBankholiday(lEasterDate + 49, &quot;Pentecôte&quot;, cHolidayType_Full)
+ CalInsertBankholiday(lEasterDate + 50, &quot;Lundi de Pentecôte&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 5, 1), &quot;Fête du travail&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 5, 8), &quot;Victoire 1945&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 7, 14), &quot;Fête Nationale&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 8, 15), &quot;Assomption&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 11, 1), &quot;Toussaint&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 11, 11), &quot;Armistice ou Victoire 1918&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 12, 25), &quot;Noël&quot;, cHolidayType_Full)
+End Sub
+
+
+Sub FindWholeYearHolidays_SWED(ByVal YearInt as Integer)
+Dim lDate&amp;
+ CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;Nyårsdagen&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 1, 6), &quot;Trettondagen&quot;, cHolidayType_Full)
+ lDate = CalEasterTable(YearInt)
+ CalInsertBankholiday(lDate - 2, &quot;Långfredagen&quot;, cHolidayType_Full)
+ CalInsertBankholiday(lDate, &quot;Påskdagen&quot;, cHolidayType_Full)
+ CalInsertBankholiday(lDate + 1, &quot;Annandag påsk&quot;, cHolidayType_Full)
+ CalInsertBankholiday(lDate + 39, &quot;Kristi himmelfärds dag&quot;, cHolidayType_Full)
+ CalInsertBankholiday(lDate + 49, &quot;Pingstdagen&quot;, cHolidayType_Full)
+ CalInsertBankholiday(lDate + 50, &quot;Annandag pingst&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 5, 1), &quot;1:a maj&quot;, cHolidayType_Full)
+ &apos; MidSummerfeast (next Sunday after 20th June)
+ CalInsertBankholiday(GetNextWeekday(YearInt, 6, 20, 7), &quot;Midsommardagen&quot;, cHolidayType_Full)
+ CalInsertBankholiday(GetNextWeekDay(YearInt, 10, 31, 7), &quot;Alla helgons dag&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 12, 25), &quot;Juldagen&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 12, 26), &quot;Annandag jul&quot;, cHolidayType_Full)
+End Sub
+
+
+
+Sub FindWholeYearHolidays_FI(ByVal YearInt as Integer)
+ Dim OsternDate&amp;
+ &apos; New Year
+ CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;Uudenvuodenpäivä&quot;, cHolidayType_Full)
+ &apos; &quot;the three Magi&quot;
+ CalInsertBankholiday(DateSerial(YearInt, 1, 6), &quot;Loppiainen&quot;, cHolidayType_Half)
+ OsternDate = CalEasterTable(YearInt)
+ CalInsertBankholiday(OsternDate-2, &quot;Pitkäperjantai&quot;, cHolidayType_Full)
+ CalInsertBankholiday(OsternDate, &quot;Pääsiäispäivä&quot;, cHolidayType_Full)
+ CalInsertBankholiday(OsternDate+1, &quot;2. pääsiäispäivä&quot;, cHolidayType_Full)
+ &apos; Ascension Day
+ CalInsertBankholiday(OsternDate+39, &quot;Helatorstai&quot;, cHolidayType_Full)
+ &apos; First of May
+ CalInsertBankholiday(DateSerial(YearInt, 5, 1), &quot;Vappu, suomalaisen työn päivä&quot;, cHolidayType_Full)
+ &apos; Mothers Day : 2nd Sunday in May, Full
+ CalInsertBankholiday(GetMonthDate(YearInt, 5,1,7), &quot;Äitienpäivä&quot;, cHolidayType_Full)
+ &apos; MidSummerfeast (next Sunday after 20th June)
+ CalInsertBankholiday(GetNextWeekday(YearInt, 6, 20, 7), &quot;Juhannus, Suomen lipun päivä&quot;, cHolidayType_Full)
+ &apos; Independance day
+ CalInsertBankholiday(DateSerial(YearInt, 12, 6), &quot;Itsenäisyyspäivä&quot;, cHolidayType_Full)
+ &apos; Christmas
+ CalInsertBankholiday(DateSerial(YearInt, 12, 25), &quot;Joulupäivä&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 12, 26), &quot;Tapaninpäivä&quot;, cHolidayType_Full)
+End Sub
+
+
+
+Sub FindWholeYearHolidays_DK (ByVal YearInt as Integer)
+Dim lDate&amp;, VierterAdvent&amp;
+
+ &apos;New Year
+ CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;Nytårsdag&quot;, cHolidayType_Full)
+ lDate = CalEasterTable (YearInt)
+ &apos; carnival
+ CalInsertBankholiday(lDate-49, &quot;Fastelavn&quot;, cHolidayType_Half)
+ &apos;&quot;Maundy Tuesday
+ CalInsertBankholiday(lDate-3, &quot;Skærtorsdag&quot;, cHolidayType_Full)
+ &apos;&quot;Good Friday &quot;
+ CalInsertBankholiday(lDate-2, &quot;Langfredag&quot;, cHolidayType_Full)
+ &apos; Easter Sunday
+ CalInsertBankholiday(lDate, &quot;Påskesøndag&quot;, cHolidayType_Full)
+ &apos; Easter Monday
+ CalInsertBankholiday(lDate+1, &quot;2. påskedag&quot;, cHolidayType_Full)
+ &apos; 4th Friday after Easter
+ CalInsertBankholiday(lDate+26, &quot;Store bededag&quot;, cHolidayType_Full)
+ &apos; &quot;Ascension Day
+ CalInsertBankholiday(lDate+39, &quot;Kristi himmelfahrt&quot;, cHolidayType_Full)
+ &apos; &quot;Whitsunday&quot;
+ CalInsertBankholiday(lDate+49, &quot;Pinsesøndag&quot;, cHolidayType_Full)
+ &apos; &quot;Whitmonday&quot;
+ CalInsertBankholiday(lDate+50, &quot;2. pinsedag&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 6, 5), &quot;Grundlovsdag&quot;, cHolidayType_Full)
+ &apos;Christmas Days
+ CalInsertBankholiday(DateSerial(YearInt, 12, 25), &quot;1. juledag&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 12, 26), &quot;2. juledag&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 1, 6), &quot;Hellig 3 konger&quot;, cHolidayType_Half)
+ CalInsertBankholiday(DateSerial(YearInt, 3, 28), &quot;Dr. Ingrid&quot;, cHolidayType_Half)
+ CalInsertBankholiday(DateSerial(YearInt, 4, 16), &quot;Dr. Margrete&quot;, cHolidayType_Half)
+ CalInsertBankholiday(DateSerial(YearInt, 4, 16), &quot;Palmesøndag&quot;, cHolidayType_Half)
+ &apos; &quot;Liberation day&quot;
+ CalInsertBankholiday(DateSerial(YearInt, 5, 5), &quot;Befrielsesdag&quot;, cHolidayType_Half)
+ CalInsertBankholiday(DateSerial(YearInt, 5, 26), &quot;Krpr. Frederik&quot;, cHolidayType_Half)
+ CalInsertBankholiday(DateSerial(YearInt, 6, 7), &quot;Pr. Joachim&quot;, cHolidayType_Half)
+ CalInsertBankholiday(DateSerial(YearInt, 6, 11), &quot;Pr. Henrik&quot;, cHolidayType_Half)
+ CalInsertBankholiday(DateSerial(YearInt, 6, 15), &quot;Valdemarsdag&quot;, cHolidayType_Half)
+ CalInsertBankholiday(DateSerial(YearInt, 6, 24), &quot;Skt. Hans&quot;, cHolidayType_Half)
+ CalInsertBankholiday(DateSerial(YearInt, 6, 30), &quot;Prinsesse Alexandra&quot;, cHolidayType_Half)
+ CalInsertBankholiday(DateSerial(YearInt, 8, 28), &quot;Pr. Nikolai&quot;, cHolidayType_Half)
+ CalInsertBankholiday(DateSerial(YearInt, 10, 24), &quot;FN-dag&quot;, cHolidayType_Half)
+ CalInsertBankholiday(DateSerial(YearInt, 11, 11), &quot;Morten Bisp&quot;, cHolidayType_Half)
+ &apos; all half (Memorial Days)
+ &apos;&quot;adventdays
+ VierterAdvent = DateSerial(YearInt, 12, 24)
+ While (Weekday(VierterAdvent) &lt;&gt; 1)
+ vierterAdvent = vierterAdvent - 1
+ Wend
+ CalInsertBankholiday(vierterAdvent-21, &quot;1. søndag i advent&quot;, cHolidayType_Half)
+ CalInsertBankholiday(vierterAdvent-14, &quot;2. søndag i advent&quot;, cHolidayType_Half)
+ CalInsertBankholiday(vierterAdvent-7, &quot;3. søndag i advent&quot;, cHolidayType_Half)
+ CalInsertBankholiday(vierterAdvent, &quot;4. søndag i advent&quot;, cHolidayType_Half)
+ &apos;Christmas eve
+ CalInsertBankholiday(DateSerial(YearInt, 12, 24), &quot;Juleaften&quot;, cHolidayType_Half)
+ &apos;&quot;New Year&apos;s eve&quot;
+ CalInsertBankholiday(DateSerial(YearInt, 12, 31), &quot;Nytårsaften&quot;, cHolidayType_Half)
+End Sub
+
+
+Sub FindWholeYearHolidays_ITA(ByVal YearInt as Integer)
+Dim lDate&amp;
+ CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;Capodanno&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 1, 6), &quot;Epifania&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 4, 25), &quot;Festa della liberazione&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 8, 15), &quot;Ferragusto&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 11, 1), &quot;Tutti i Santi&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 12, 8), &quot;Immacolata concezione&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 12, 25), &quot;Natale&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 12, 26), &quot;Santo Stefano&quot;, cHolidayType_Full)
+ lDate = CalEasterTable(YearInt)
+ CalInsertBankholiday(lDate, &quot;Pasqua&quot;, cHolidayType_Full)
+ CalInsertBankholiday(lDate+1, &quot;Lunedì dell&apos;Angelo&quot;, cHolidayType_Full)
+End Sub
+
+
+
+Sub FindWholeYearHolidays_TRK(ByVal YearInt as Integer)
+Dim lDate as Long
+ &apos; New Years&apos; Day
+ CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;Yılbaşı&quot;, cHolidayType_Full)
+ &apos; National Sovereignty and Children&apos;s Day
+ CalInsertBankholiday(DateSerial(YearInt, 4, 23), &quot;Ulusal Egemenlik ve Çocuk Bayramı&quot;, cHolidayType_Full)
+ &apos; Ataturk Commemoration and Youth &amp; Sports Day
+ CalInsertBankholiday(DateSerial(YearInt, 5, 19), &quot;Atatürk&apos;ü Anma, Gençlik ve Spor Bayramı&quot;, cHolidayType_Full)
+ &apos; Mothers Day : 2nd Sunday in May, Full
+ CalInsertBankholiday(GetMonthDate(YearInt, 5,1,7), &quot;Anneler günü&quot;, cHolidayType_Full)
+ &apos; Fathers Day: 3rd Sunday in May, Full
+ CalInsertBankholiday(GetMonthDate(YearInt, 6,1,14), &quot;Babalar Günü&quot;, cHolidayType_Full)
+ &apos; Victory Day
+ CalInsertBankholiday(DateSerial(YearInt, 8, 30), &quot;Zafer Bayramı&quot;, cHolidayType_Full)
+ &apos; Republic Day
+ CalInsertBankholiday(DateSerial(YearInt, 10, 28), &quot;Cumhuriyet Bayramı&quot;, cHolidayType_Full)
+ &apos; Republic Day
+ CalInsertBankholiday(DateSerial(YearInt, 10, 29), &quot;Cumhuriyet Bayramı&quot;, cHolidayType_Full)
+ &apos; Commemoration Of Ataturk-Anniversary of Ataturk&apos;s Death
+ CalInsertBankholiday(DateSerial(YearInt, 11, 10), &quot;Atatürk&apos;ün Ölüm Günü&quot;, cHolidayType_Full)
+ CalculateturkishReligousHolidays(YearInt)
+End Sub
+
+
+Sub CalculateturkishReligousHolidays(iSelYear as Integer)
+Dim lKurbanBayRamStartDate as Long
+Dim lRamazanBayRamStartDate as Long
+
+ Select Case iSelYear
+ Case 2002
+ lKurbanBayRamStartDate = DateSerial(iSelYear, 2, 21)
+ lRamazanBayRamStartDate = DateSerial(iSelYear, 12, 4)
+ Case 2003
+ lKurbanBayRamStartDate = DateSerial(iSelYear, 2, 10)
+ lRamazanBayRamStartDate = DateSerial(iSelYear, 11, 24)
+ Case 2004
+ lKurbanBayRamStartDate = DateSerial(iSelYear, 1, 31)
+ lRamazanBayRamStartDate = DateSerial(iSelYear, 11, 13)
+ Case 2005
+ lKurbanBayRamStartDate = DateSerial(iSelYear, 1, 19)
+ lRamazanBayRamStartDate = DateSerial(iSelYear, 11, 2)
+ Case 2006
+ lKurbanBayRamStartDate = DateSerial(iSelYear, 12, 30)
+ CalInsertBankholiday(lKurbanBayRamStartDate, &quot;Kurban Bayramı Arefesi&quot;, cHolidayType_Half)
+ CalInsertBankholiday(DateSerial(iSelYear, 12, 31), &quot;Kurban Bayram&quot;, cHolidayType_Full)
+
+ lKurbanBayRamStartDate = DateSerial(iSelYear, 1, 9)
+ lRamazanBayRamStartDate = DateSerial(iSelYear, 10, 22)
+ Case 2007
+ lKurbanBayRamStartDate = DateSerial(iSelYear, 1, 1)
+ &apos; Note: The first day has already been in 2006!!!
+ AddFollowUpHolidays(lKurbanBayRamStartDate-1, 3, &quot;Kurban Bayram&quot;, cHolidayType_Full)
+ lKurbanBayRamStartDate = DateSerial(iSelYear, 12, 19)
+
+ lRamazanBayRamStartDate = DateSerial(iSelYear, 10, 11)
+ Case 2008
+ lKurbanBayRamStartDate = DateSerial(iSelYear, 12, 7)
+ lRamazanBayRamStartDate = DateSerial(iSelYear, 9, 29)
+ Case Else
+ Exit Sub
+ End Select
+ &apos;Feast Of the Sacrifice Eve
+ CalInsertBankholiday(lKurbanBayRamStartDate, &quot;Kurban Bayramı Arefesi&quot;, cHolidayType_Half)
+ &apos;Feast Of the Sacrifice
+ AddFollowUpHolidays(lKurbanBayRamStartDate, 4, &quot;Kurban Bayram&quot;, cHolidayType_Full)
+ &apos; End of Ramadan Eve
+ CalInsertBankholiday(lRamazanBayRamStartDate, &quot;Ramazan (Şeker) Bayramı Arefesi&quot;, cHolidayType_Half)
+ &apos; End of Ramadan
+ AddFollowUpHolidays(lRamazanBayRamStartDate, 3, &quot;Ramazan (Şeker) Bayramı&quot;, cHolidayType_Full)
+End Sub
+
+
+Sub FindWholeYearHolidays_GREEK(ByVal YearInt as Integer)
+Dim lDate as Long
+ &apos; New Year
+ CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;Πρωτοχρονιά&quot;, cHolidayType_Full)
+ &apos;Schol Holiday
+ CalInsertBankholiday(DateSerial(YearInt, 12, 30), &quot;Τριών Ιεραρχών&quot;, cHolidayType_Full)
+ &apos; This is both a National Holiday and a religious holiday
+ CalInsertBankholiday(DateSerial(YearInt, 3, 25), &quot;Εθνική Εορτή Ευαγγελισμός Θεοτόκου&quot;, cHolidayType_Full)
+ &apos; Labor Day
+ CalInsertBankholiday(DateSerial(YearInt, 5, 1), &quot;Πρωτομαγιά&quot;, cHolidayType_Full)
+ &apos; Assumption Day
+ CalInsertBankholiday(DateSerial(YearInt, 8, 15), &quot;Κοίμηση της Θεοτόκου&quot;, cHolidayType_Full)
+ &apos; National Resistance Day
+ CalInsertBankholiday(DateSerial(YearInt, 10, 28), &quot;Εθνική Εορτή&quot;, cHolidayType_Full)
+ &apos; School Holiday
+ CalInsertBankholiday(DateSerial(YearInt, 11, 17), &quot;Επέτειος του Πολυτεχνείου&quot;, cHolidayType_Full)
+ &apos; Christmas Eve
+ CalInsertBankholiday(DateSerial(YearInt, 12, 24), &quot;Παραμονή Χριστουγέννων&quot;, cHolidayType_Full)
+ &apos; Christmas Day
+ CalInsertBankholiday(DateSerial(YearInt, 12, 25), &quot;Χριστούγεννα&quot;, cHolidayType_Full)
+ &apos; Boxing Day
+ CalInsertBankholiday(DateSerial(YearInt, 12, 26), &quot;Δεύτερη μέρα Χριστουγέννων&quot;, cHolidayType_Full)
+ lDate = CalOrthodoxEasterTable(YearInt)
+ &apos; Triodon
+ CalInsertBankholiday(lDate-70, &quot;Αρχή Τριωδίου&quot;, cHolidayType_Full)
+ &apos; Meat Fare
+ CalInsertBankholiday(lDate-56, &quot;Τσικνοπέμπτη&quot;, cHolidayType_Full)
+ &apos; First Day of Lent
+ CalInsertBankholiday(lDate-48, &quot;Καθαρή Δευτέρα&quot;, cHolidayType_Full)
+ &apos; Saturday of Lazarus
+ CalInsertBankholiday(lDate-8, &quot;Σάββατο του Λαζάρου&quot;, cHolidayType_Full)
+ &apos; Palm Sunday
+ CalInsertBankholiday(lDate-7, &quot;Κυριακή των Βαΐων&quot;, cHolidayType_Full)
+ &apos; Monday before Easter
+ CalInsertBankholiday(lDate-6, &quot;Μεγάλη Δευτέρα&quot;, cHolidayType_Full)
+ &apos; Tuesday before Easter
+ CalInsertBankholiday(lDate-5, &quot;Μεγάλη Τρίτη&quot;, cHolidayType_Full)
+ &apos; Wednesday before Easter
+ CalInsertBankholiday(lDate-4, &quot;Μεγάλη Τετάρτη&quot;, cHolidayType_Full)
+ &apos; Thursday before Easter
+ CalInsertBankholiday(lDate-3, &quot;Μεγάλη Πέμπτη&quot;, cHolidayType_Full)
+ &apos; Good Friday
+ CalInsertBankholiday(lDate-2, &quot;Μεγάλη Παρασκευή&quot;, cHolidayType_Full)
+ &apos; Saturday before Easter
+ CalInsertBankholiday(lDate-1, &quot;Μεγάλο Σάββατο&quot;, cHolidayType_Full)
+ &apos; Easter Monday
+ CalInsertBankholiday(lDate+1, &quot;Δευτέρα του Πάσχα&quot;, cHolidayType_Full)
+ &apos; Pentecost
+ CalInsertBankholiday(lDate+49, &quot;Κυριακή της Πεντηκοστής&quot;, cHolidayType_Full)
+ &apos; Ascension Day
+ CalInsertBankholiday(lDate+39, &quot;Του Αγίου Πνεύματος&quot;, cHolidayType_Full)
+ &apos; All Saints Day
+ CalInsertBankholiday(lDate+56, &quot;Των Αγίων Πάντων&quot;, cHolidayType_Full)
+End Sub
+
+
+
+Sub FindWholeYearHolidays_SPAIN(ByVal YearInt as Integer)
+Dim lDate&amp;
+ CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;Año Nuevo&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 1, 6), &quot;Reyes&quot;, cHolidayType_Full)
+ lDate = CalEasterTable(YearInt)
+ CalInsertBankholiday(lDate-2, &quot;Viernes Santo&quot;, cHolidayType_Full)
+ CalInsertBankholiday(lDate+1, &quot;Lunes de Pascua Florida&quot;, cHolidayType_Full)
+ CalInsertBankholiday(lDate+39, &quot;Día de la Ascensión&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 5, 1), &quot;Fiesta del Trabajo&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 8, 15), &quot;Día de la Asunción&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 10, 12), &quot;Fiesta de la Hispanidad&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 11, 1), &quot;Todos los Santos&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 12, 6), &quot;Día de la Constitución&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 12, 8), &quot;La Inmaculada&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 12, 25), &quot;Navidad&quot;, cHolidayType_Full)
+End Sub
+
+
+Sub FindWholeYearHolidays_PORT(ByVal YearInt as Integer)
+Dim lDate&amp;
+ CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;Ano Novo&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 1, 6), &quot;Reis Magos&quot;, cHolidayType_Half)
+ lDate = CalEasterTable(YearInt)
+ CalInsertBankholiday(lDate-47, &quot;Carnaval&quot;, cHolidayType_Full)
+ CalInsertBankholiday(lDate-7, &quot;Domingo de Ramos&quot;, cHolidayType_Half)
+ CalInsertBankholiday(lDate-2, &quot;Sexta-feira Santa&quot;, cHolidayType_Full)
+ CalInsertBankholiday(lDate, &quot;Páscoa&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 4, 25), &quot;25 de Abril&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 5, 1), &quot;Dia do Trabalhador&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 5, 29), &quot;Corpo de Deus&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 6, 10), &quot;Dia de Camões e das Comunidades Portuguesas&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 6, 24), &quot;S. João&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 6, 29), &quot;S. Pedro&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 8, 15), &quot;Assunção de Nossa Senhora&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 10, 5), &quot;Implantação da República&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 11, 1), &quot;Dia de Todos os Santos&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 12, 8), &quot;Imaculada Conceição&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 12, 25), &quot;Natal&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 12, 1), &quot;Restauração da Independência&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 12, 31), &quot;Passagem de Ano&quot;, cHolidayType_Half)
+End Sub
+
+
+Sub FindWholeYearHolidays_NL(ByVal YearInt as Integer)
+Dim lDate&amp;
+ CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;Nieuwjaarsdag&quot;, cHolidayType_Full)
+ lDate = CalEasterTable(YearInt)
+ CalInsertBankholiday(lDate, &quot;1e Paasdag&quot;, cHolidayType_Full)
+ CalInsertBankholiday(lDate + 1, &quot;2e Paasdag&quot;, cHolidayType_Full)
+ CalInsertBankholiday(lDate + 39, &quot;Hemelvaartsdag&quot;, cHolidayType_Full)
+ CalInsertBankholiday(lDate + 49, &quot;1e Pinksterdag&quot;, cHolidayType_Full)
+ CalInsertBankholiday(lDate + 50, &quot;2e Pinksterdag&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 4, 30), &quot;Koninginnedag&quot;, cHolidayType_Full)
+ &apos; Bevrijdingsdag is celebrated every 5th year
+ If YearInt Mod 5 = 0 then
+ CalInsertBankholiday(DateSerial(YearInt, 5, 5), &quot;Bevrijdingsdag&quot;, cHolidayType_Full)
+ End if
+ CalInsertBankholiday(DateSerial(YearInt, 12, 6), &quot;Sinterklaas&quot;, cHolidayType_Half)
+ CalInsertBankholiday(DateSerial(YearInt, 12, 25), &quot;1e Kerstdag&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 12, 26), &quot;2e Kerstdag&quot;, cHolidayType_Full)
+End Sub
+
+
+Sub FindWholeYearHolidays_PL (ByVal YearInt as Integer)
+ Dim lDate&amp;, OsternDate&amp;
+ &apos; New Year
+ CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;Nowy Rok&quot;, cHolidayType_Full)
+ &apos; &quot;the three Magi&quot;
+ CalInsertBankholiday(DateSerial(YearInt, 1, 6), &quot;Trzech Króli&quot;, cHolidayType_Half)
+ &apos; &quot;Womens&apos; Day&quot;
+ CalInsertBankholiday(DateSerial(YearInt, 3, 8), &quot;Dzień Kobiet&quot;, cHolidayType_Half)
+ OsternDate = CalEasterTable(YearInt)
+ CalInsertBankholiday(OsternDate-2, &quot;Wielki Piątek&quot;, cHolidayType_Full)
+ CalInsertBankholiday(OsternDate, &quot;Wielka Niedziela&quot;, cHolidayType_Full)
+ CalInsertBankholiday(OsternDate+1, &quot;Lany Poniedziałek&quot;, cHolidayType_Full)
+ &apos; Ascension Day
+ CalInsertBankholiday(OsternDate+39, &quot;Wniebowstąpienie&quot;, cHolidayType_Full)
+ &apos; Pentecost
+ CalInsertBankholiday(OsternDate+49, &quot;Zielone Świątki&quot;, cHolidayType_Full)
+ &apos; Feast of Corpus Christi
+ CalInsertBankholiday(OsternDate+60, &quot;Boże Ciało&quot;, cHolidayType_Full)
+ &apos; First of May
+ CalInsertBankholiday(DateSerial(YearInt, 5, 1), &quot;Święto pracy&quot;, cHolidayType_Full)
+ &apos; Memorial day of constitution
+ CalInsertBankholiday(DateSerial(YearInt, 5, 3), &quot;Dzień konstytucji 3-go maja&quot;, cHolidayType_Full)
+ &apos; &quot;Childrens&apos; day&quot;
+ CalInsertBankholiday(DateSerial(YearInt, 6, 1), &quot;Dzień Dziecka&quot;, cHolidayType_Half)
+ &apos; &quot;Ascension Day&quot;
+ CalInsertBankholiday(DateSerial(YearInt, 8, 15), &quot;Matki Boskiej Zielnej&quot;, cHolidayType_Half)
+ &apos; &quot;All Saints&apos; Day &quot;
+ CalInsertBankholiday(DateSerial(YearInt, 11, 1), &quot;Wszystkich Świętych&quot;, cHolidayType_Full)
+ &apos; National day&quot;
+ CalInsertBankholiday(DateSerial(YearInt, 11, 11), &quot;Dzień Niepodległości&quot;, cHolidayType_Full)
+ &apos; Christmas Eve
+ CalInsertBankholiday(DateSerial(YearInt, 12, 24), &quot;Wigilia&quot;, cHolidayType_Half)
+ &apos; Christmas
+ CalInsertBankholiday(DateSerial(YearInt, 12, 25), &quot;Boże Narodzenie&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 12, 26), &quot;Boże Narodzenie&quot;, cHolidayType_Full)
+ &apos; &quot;New Year&apos;s eve&quot;
+ CalInsertBankholiday(DateSerial(YearInt, 12, 31), &quot;Sylwester&quot;, cHolidayType_Half)
+End Sub
+
+
+Sub FindWholeYearHolidays_RU (ByVal YearInt as Integer)
+Dim lDate&amp;
+ &apos; New Year
+ CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;Новый Год&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 1, 2), &quot;Новый Год&quot;, cHolidayType_Full)
+ &apos; Russian Christmas&quot;
+ CalInsertBankholiday(DateSerial(YearInt, 1, 7), &quot;Рождество&quot;, cHolidayType_Full)
+ &apos;Day of Defender of Motherland
+ CalInsertBankholiday(DateSerial(YearInt, 2, 23), &quot;День Защитника Отечества&quot;, cHolidayType_Full)
+ &apos; Woman Day
+ CalInsertBankholiday(DateSerial(YearInt, 3, 8), &quot;Международный Женский День&quot;, cHolidayType_Full)
+ &apos; Spring and labor holiday
+ CalInsertBankholiday(DateSerial(YearInt, 5, 1), &quot;Праздник Весны и Труда&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 5, 2), &quot;Праздник Весны и Труда&quot;, cHolidayType_Full)
+ &apos; Victory of the second World War
+ CalInsertBankholiday(DateSerial(YearInt, 5, 9), &quot;День Победы&quot;, cHolidayType_Full)
+ &apos; Independence Day
+ CalInsertBankholiday(DateSerial(YearInt, 6, 12), &quot;День Независимости&quot;, cHolidayType_Full)
+ &apos; Day of Accord and Conciliation
+ CalInsertBankholiday(DateSerial(YearInt, 11, 7), &quot;День Согласия и Примирения&quot;, cHolidayType_Full)
+ &apos; Constitution Day
+ CalInsertBankholiday(DateSerial(YearInt, 12, 12), &quot;День Конституции&quot;, cHolidayType_Full)
+End Sub
+
+
+Sub FindWholeYearHolidays_US(ByVal YearInt as Integer)
+Dim lDate as Long
+Dim lFirstNov as Long
+Dim lElectDate as Long
+ CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;New Year&apos;s Day&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 2, 2), &quot;Groundhog Day&quot;, cHolidayType_Half)
+ CalInsertBankholiday(DateSerial(YearInt, 2, 14), &quot;Valentine&apos;s Day&quot;, cHolidayType_Half)
+ CalInsertBankholiday(DateSerial(YearInt, 3, 17), &quot;St Patrick&apos;s Day&quot;, cHolidayType_Half)
+ CalInsertBankholiday(DateSerial(YearInt, 4, 1), &quot;April Fools&apos; Day&quot;, cHolidayType_Half)
+ CalInsertBankholiday(DateSerial(YearInt, 4, 22), &quot;Earth Day&quot;, cHolidayType_Half)
+ CalInsertBankholiday(DateSerial(YearInt, 5, 6), &quot;Nurses&apos; Day&quot;, cHolidayType_Half)
+ CalInsertBankholiday(DateSerial(YearInt, 6, 14), &quot;Flag Day&quot;, cHolidayType_Half)
+ CalInsertBankholiday(DateSerial(YearInt, 6, 14), &quot;Army Day&quot;, cHolidayType_Half)
+ CalInsertBankholiday(DateSerial(YearInt, 6, 19), &quot;Juneteenth(Liberation of Slaves)&quot;, cHolidayType_Half)
+
+ CalInsertBankholiday(DateSerial(YearInt, 7, 4), &quot;Independence Day&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 8, 1), &quot;Air Force Day&quot;, cHolidayType_Half)
+ CalInsertBankholiday(DateSerial(YearInt, 8, 4), &quot;Coast Guard Day&quot;, cHolidayType_Half)
+ CalInsertBankholiday(DateSerial(YearInt, 9, 17), &quot;Citizenship Day or Constitution Day&quot;, cHolidayType_Half)
+ CalInsertBankholiday(DateSerial(YearInt, 10, 16), &quot;Bosses&apos; Day&quot;, cHolidayType_Half)
+ CalInsertBankholiday(DateSerial(YearInt, 10, 26 ), &quot;Mother-in-Law&apos;s Day&quot;, cHolidayType_Half)
+ CalInsertBankholiday(DateSerial(YearInt, 10, 27), &quot;Navy Day&quot;, cHolidayType_Half)
+ CalInsertBankholiday(DateSerial(YearInt, 10, 31), &quot;Halloween&quot;, cHolidayType_Half)
+ CalInsertBankholiday(DateSerial(YearInt, 11, 10), &quot;Marine Corps Day&quot;, cHolidayType_Half)
+ CalInsertBankholiday(DateSerial(YearInt, 11, 11), &quot;Veteran&apos;s Day&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 12, 7), &quot;Pearl Harbor Remembrance Day&quot;, cHolidayType_Half)
+ CalInsertBankholiday(DateSerial(YearInt, 12, 24), &quot;Christmas Eve&quot;, cHolidayType_Half)
+ CalInsertBankholiday(DateSerial(YearInt, 12, 25), &quot;Christmas Day&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 12, 31), &quot;New Year&apos;s Eve&quot;, cHolidayType_Half)
+
+ CalInsertBankholiday(CalEasterTable(YearInt), &quot;Easter Sunday&quot;, cHolidayType_Half)
+
+ &apos; Inauguration Day occurs every 4 years (1997, 2001) in the year following the presidential election
+ &apos; always on the 20th of January unless this is a Sunday in which case on Monday 21st January
+ If YearInt Mod 4 = 1 Then
+ lDate = DateSerial(YearInt, 1, 20)
+ If WeekDay(lDate) = 1 Then
+ CalInsertBankholiday(lDate + 1, &quot;Inauguration Day&quot;, cHolidayType_Half)
+ Else
+ CalInsertBankholiday(lDate, &quot;Inauguration Day&quot;, cHolidayType_Half)
+ End If
+ End If
+ &apos; First Tuesday in November, but only after the 1st of November and only on evenly numbered years
+ If YearInt Mod 2 = 0 Then
+ lFirstNov = DateSerial(YearInt, 11, 1)
+ lElectDate = GetMonthDate(YearInt, 11, 3, 0)
+ If lElectDate &gt; lFirstNov Then
+ CalInsertBankholiday(lElectDate, &quot;Election Day&quot;, cHolidayType_Half)
+ Else
+ CalInsertBankholiday(lElectDate + 7, &quot;Election Day&quot;, cHolidayType_Half)
+ End If
+ End If
+ CalInsertBankholiday(GetMonthDate(YearInt, 1, 2, 14), &quot;Martin Luther King Jr Day&quot;, cHolidayType_Full)
+ CalInsertBankholiday(GetMonthDate(YearInt, 2, 2, 14), &quot;President&apos;s Day&quot;, cHolidayType_Full)
+ &apos; Mothers Day : 2nd Sunday in May, Full
+ CalInsertBankholiday(GetMonthDate(YearInt, 5,1,7), &quot;Mother&apos;s Day&quot;, cHolidayType_Full)
+
+ &apos; Wednesday of the last full week of April Administrative Professionals&apos; Day (formerly Secretaries&apos; Day)
+ CalInsertBankholiday(GetMonthDate(YearInt, 5, 7, -7)-3, &quot;Administrative Professionals&apos; Day&quot;, cHolidayType_Half)
+
+ CalInsertBankholiday(GetMonthDate(YearInt, 5, 5, 0), &quot;National Day of Prayer&quot;, cHolidayType_Half)
+ CalInsertBankholiday(GetMonthDate(YearInt, 5, 7, 14), &quot;Armed Forces Day&quot;, cHolidayType_Half)
+ &apos; Fathers Day : 3rd Sunday in June
+ CalInsertBankholiday(GetMonthDate(YearInt, 6,1,14), &quot;Father&apos;s Day&quot;, cHolidayType_Half)
+
+ &apos; Last Monday in May: Menorial Day, Full
+ CalInsertBankholiday(GetMonthDate(YearInt, 6, 2, 0)-7, &quot;Memorial Day&quot;, cHolidayType_Full)
+ CalInsertBankholiday(GetMonthDate(YearInt, 7, 1, 21), &quot;Parents&apos; Day&quot;, cHolidayType_Half)
+ CalInsertBankholiday(GetMonthDate(YearInt, 8, 1, 0), &quot;Friendship Day&quot;, cHolidayType_Half)
+
+ &apos; 1st Monday in Sep : Labor Day, Full
+ CalInsertBankholiday(GetMonthDate(YearInt, 9, 2, 0), &quot;Labor Day&quot;, cHolidayType_Full)
+ &apos; Sunday after Labor Day Grandparents&apos; Day
+ CalInsertBankholiday(GetMonthDate(YearInt, 9, 2, 0)+6, &quot;Grandparents&apos; Day&quot;, cHolidayType_Half)
+
+ CalInsertBankholiday(GetMonthDate(YearInt, 10, 1, 0), &quot;National Children&apos;s Day&quot;, cHolidayType_Half)
+ CalInsertBankholiday(GetMonthDate(YearInt, 10, 2, 7), &quot;Columbus Day&quot;, cHolidayType_Full)
+ &apos; Sweetest Day: Third Saturday in October
+ CalInsertBankholiday(GetMonthDate(YearInt, 10, 7, 14), &quot;Sweetest Day&quot;, cHolidayType_Half)
+ &apos; 4th Thu in Nov : Thanksgiving, Full
+ CalInsertBankholiday(GetMonthDate(YearInt, 11, 5, 21), &quot;Thanksgiving&quot;, cHolidayType_Full)
+End Sub
+
+
+Sub FindWholeYearHolidays_JP(ByVal YearInt as Integer)
+Dim lDate&amp;
+ CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;元日&quot;, cHolidayType_Full)
+ &apos; 2nd Monday in January
+ CalInsertBankholiday(GetMonthDate(YearInt, 1, 2, 7), &quot;成人の日&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 2, 11), &quot;建国記念の日&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 3, 20), &quot;春分の日&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 4, 29), &quot;みどりの日&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 5, 3), &quot;憲法記念日&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 5, 4), &quot;国民の休日&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 5, 5), &quot;こどもの日&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 9, 23), &quot;秋分の日&quot;, cHolidayType_Full)
+ CalInsertBankholiday(GetMonthDate(YearInt, 10, 2, 7), &quot;体育の日&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 11, 3), &quot;文化の日&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 11, 23), &quot;勤労感謝の日&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 12, 23), &quot;天皇誕生日&quot;, cHolidayType_Full)
+ If YearInt &gt; 2002 Then
+ CalInsertBankholiday(GetMonthDate(YearInt, 7, 2, 14), &quot;海の日&quot;, cHolidayType_Full)
+ CalInsertBankholiday(GetMonthDate(YearInt, 9, 2, 14), &quot;敬老の日&quot;, cHolidayType_Full)
+ Else
+ CalInsertBankholiday(DateSerial(YearInt, 7, 20), &quot;海の日&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 9, 15), &quot;敬老の日&quot;, cHolidayType_Full)
+ End If
+End Sub
+
+
+Sub FindWholeYearHolidays_TW(YearInt as Integer)
+ CalculateChineseNewYear(YearInt)
+ CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;元旦&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 2, 28), &quot;和平紀念日&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 3, 8), &quot;婦女節&quot;, cHolidayType_Half)
+ CalInsertBankholiday(DateSerial(YearInt, 3, 29), &quot;革命先烈紀念日(青年節)&quot;, cHolidayType_Half)
+ CalInsertBankholiday(DateSerial(YearInt, 4, 4), &quot;兒童節&quot;, cHolidayType_Half)
+ CalInsertBankholiday(DateSerial(YearInt, 4, 5), &quot;民族掃墓節&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 5, 1), &quot;勞動節&quot;, cHolidayType_Full)
+ CalInsertBankholiday(GetNextWeekDay(YearInt, 5, 19, 2), &quot;佛陀誕辰紀念日&quot;, cHolidayType_Full) &apos; Just like Columbus Day
+ CalInsertBankholiday(DateSerial(YearInt, 6, 15), &quot;端午節&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 9, 3), &quot;軍人節&quot;, cHolidayType_Half)
+ CalInsertBankholiday(DateSerial(YearInt, 9, 21), &quot;中秋節&quot;, cHolidayType_Full)
+ CalInsertBankholiday(GetNextWeekDay(YearInt, 9, 28, 2), &quot;孔子誕辰紀念日(教師節)&quot;, cHolidayType_Full) &apos; Just like Columnbusday
+ CalInsertBankholiday(DateSerial(YearInt, 10, 10), &quot;國慶日&quot;, cHolidayType_Full)
+ CalInsertBankholiday(DateSerial(YearInt, 10, 25), &quot;臺灣光復節&quot;, cHolidayType_Half)
+ CalInsertBankholiday(DateSerial(YearInt, 10, 31), &quot;先總統 蔣公誕辰紀念日&quot;, cHolidayType_Half)
+ CalInsertBankholiday(DateSerial(YearInt, 12, 11), &quot;國父誕辰紀念日(中華文化復興節)&quot;, cHolidayType_Half)
+ CalInsertBankholiday(DateSerial(YearInt, 12, 25), &quot;行憲紀念日&quot;, cHolidayType_Half)
+End Sub
+
+
+Sub FindWholeYearHolidays_CN(YearInt as Integer)
+ CalculateChineseNewYear(YearInt)
+ CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;元旦&quot;, cHolidayType_Full) &apos; New Year
+ CalInsertBankholiday(DateSerial(YearInt, 3, 8), &quot;妇女节&quot;, cHolidayType_Half) &apos; Women&apos;s Day
+ CalInsertBankholiday(DateSerial(YearInt, 4, 5), &quot;清明节&quot;, cHolidayType_Half) &apos; Day of the deads
+ CalInsertBankholiday(DateSerial(YearInt, 5, 1), &quot;劳动节&quot;, cHolidayType_Full) &apos; International Labour Day
+ CalInsertBankholiday(DateSerial(YearInt, 6, 1), &quot;儿童节&quot;, cHolidayType_Half) &apos; Children&apos;s Day
+ CalInsertBankholiday(DateSerial(YearInt, 8, 1), &quot;建军节&quot;, cHolidayType_Half) &apos; Foundation of military
+ CalInsertBankholiday(DateSerial(YearInt, 10, 1), &quot;国庆节&quot;, cHolidayType_Full) &apos; National festival day
+End Sub
+
+
+&apos; Unfortunately I could not find a Routine to convert a &apos;Moon Date&apos; into a gregorian date
+Sub CalculateChineseNewYear(iSelYear as Integer)
+Dim lDate as Long
+ Select Case iSelYear
+ Case 1995
+ lDate = DateSerial(iSelYear, 1, 31)
+ Case 1996
+ lDate = DateSerial(iSelYear, 2, 19)
+ Case 1997
+ lDate = DateSerial(iSelYear, 2, 7)
+ Case 1998
+ lDate = DateSerial(iSelYear, 1, 28)
+ Case 1999
+ lDate = DateSerial(iSelYear,2, 16)
+ Case 2000
+ lDate = DateSerial(iSelYear,2, 5)
+ Case 2001
+ lDate = DateSerial(iSelYear, 1, 24)
+ Case 2002
+ lDate = DateSerial(iSelYear,2, 12)
+ Case 2003
+ lDate = DateSerial(iSelYear,2, 1)
+ Case 2004
+ lDate = DateSerial(iSelYear, 1, 22)
+ Case 2005
+ lDate = DateSerial(iSelYear,2, 9)
+ Case 2006
+ lDate = DateSerial(iSelYear, 1, 29)
+ Case 2007
+ lDate = DateSerial(iSelYear,2, 18)
+ Case 2008
+ lDate = DateSerial(iSelYear,2, 7)
+ Case 2009
+ lDate = DateSerial(iSelYear, 1, 26)
+ Case 2010
+ lDate = DateSerial(iSelYear,2, 10)
+ Case 2011
+ lDate = DateSerial(iSelYear,2, 3)
+ Case 2012
+ lDate = DateSerial(iSelYear, 1, 23)
+ Case 2013
+ lDate = DateSerial(iSelYear,2, 10)
+ Case 2014
+ lDate = DateSerial(iSelYear, 1, 31)
+ Case 2015
+ lDate = DateSerial(iSelYear,2, 19)
+ Case 2016
+ lDate = DateSerial(iSelYear,2, 9)
+ Case 2017
+ lDate = DateSerial(iSelYear, 1, 28)
+ Case 2018
+ lDate = DateSerial(iSelYear,2, 16)
+ Case 2019
+ lDate = DateSerial(iSelYear,2, 5)
+ Case 2020
+ lDate = DateSerial(iSelYear, 1, 25)
+ Case Else
+ Exit Sub
+ End Select
+ Select Case sCurCountryLocale
+ Case &quot;CN&quot;
+ CalInsertBankholiday(lDate-1, &quot;农历除夕&quot;, cHolidayType_Full)
+ CalInsertBankholiday(lDate, &quot;春节初一&quot;, cHolidayType_Full)
+ CalInsertBankholiday(lDate+1, &quot;春节初二&quot;, cHolidayType_Full)
+ CalInsertBankholiday(lDate+2, &quot;春节初三&quot;, cHolidayType_Full)
+
+ Case Else
+ CalInsertBankholiday(lDate-1, &quot;農曆除夕&quot;, cHolidayType_Full)
+ CalInsertBankholiday(lDate, &quot;春節初一&quot;, cHolidayType_Full)
+ CalInsertBankholiday(lDate+1, &quot;春節初二&quot;, cHolidayType_Full)
+ CalInsertBankholiday(lDate+2, &quot;春節初三&quot;, cHolidayType_Full)
+ End Select
+End Sub
+
+
+Function CalculateJapaneseSpringDay(iSelYear as Integer)
+ If (iSelYear &gt; 1979) And (iSelYear &lt; 2100) Then
+ CalculateJapaneseSpringDay() = Int(20.8431 + 0.242194)* (iSelYear-1980) - (Int((iSelYear-1980)/4))
+ End If
+End Function
+
+
+Function CalculateJapaneseAutumnDay(iSelYear as Integer)
+ If (iSelYear &gt; 1979) And (iSelYear &lt; 2100) Then
+ CalculateJapaneseAutumnDay() = Int(23.8431 + 0.242194)* (iSelYear-1980) - (Int((iSelYear-1980)/4))
+ End If
+End Function</script:module> \ No newline at end of file
diff --git a/wizards/source/schedule/OwnEvents.xba b/wizards/source/schedule/OwnEvents.xba
new file mode 100644
index 000000000000..f141c2ab0efe
--- /dev/null
+++ b/wizards/source/schedule/OwnEvents.xba
@@ -0,0 +1,217 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="OwnEvents" script:language="StarBasic">Option Explicit
+
+Public Const SBDATEUNDEFINED as Double = -98765432.1
+
+Sub Main
+ Call CalAutopilotTable()
+End Sub
+
+
+Sub CalSaveOwnData()
+Dim FileName as String
+Dim FileChannel as Integer
+Dim i as Integer
+ If bCalOwnDataChanged Then
+ FileName = GetPathSettings(&quot;UserConfig&quot;, False) &amp; &quot;/&quot; &amp; &quot;DATE.DAT&quot;
+ SaveDataToFile(FileName, DlgCalModel.lstOwnData.StringItemList())
+ End If
+End Sub
+
+
+Sub CalLoadOwnData()
+Dim FileName as String
+Dim LocList() as String
+ FileName = GetPathSettings(&quot;UserConfig&quot;, False) &amp; &quot;/DATE.DAT&quot;
+ If LoadDataFromFile(FileName, LocList()) Then
+ DlgCalModel.lstOwnData.StringItemList() = LocList()
+ End If
+End Sub
+
+
+Function CalCreateDateStrOfInput() as String
+Dim DateStr as String
+Dim CurOwnMonth as Integer
+Dim CurOwnDay as Integer
+Dim FormatDateStr as String
+Dim dblDate as Double
+Dim iLen as Integer
+Dim iDiff as Integer
+Dim i as Integer
+ CurOwnDay = DlgCalModel.txtOwnEventDay.Value
+ CurOwnMonth = DlgCalendar.GetControl(&quot;lstOwnEventMonth&quot;).getselectedItemPos() + 1
+ DateStr = DateSerial(0, CurOwnMonth, CurOwnDay)
+ dblDate = CDbl(DateValue(DateStr))
+ FormatDateStr = oNumberFormatter.convertNumberToString(lDateFormat, dblDate)
+ iLen = Len(FormatDateStr)
+ iDiff = 16 - iLen
+ If iDiff &gt; 0 Then
+ For i = 0 To iDiff
+ FormatDateStr = FormatDateStr + &quot; &quot;
+ Next i
+ Else
+ MsgBox(&quot;Invalid DateFormat: &apos;FormatDateStr&apos;&quot;, 16, sWizardTitle)
+ CalCreateDateStrOfInput = &quot;&quot;
+ Exit Function
+ End If
+ DateStr = FormatDateStr &amp; Trim(DlgCalModel.txtEvent.Text)
+ CalCreateDateStrOfInput = DateStr
+End Function
+
+
+
+Sub CalcmdInsertData()
+Dim MaxIndex as Integer
+Dim UIDateStr as String
+Dim DateStr as String
+Dim NewDate as Double
+Dim bInserted as Boolean
+Dim i as Integer
+Dim CurOwnDay as Integer
+Dim CurOwnMonth as Integer
+Dim CurOwnYear as Integer
+ CurOwnDay = DlgCalModel.txtOwnEventDay.Value
+ CurOwnMonth = DlgCalendar.GetControl(&quot;lstOwnEventMonth&quot;).getSelectedItemPos() + 1
+ UIDateStr = CalCreateDateStrOfInput()
+ NewDate = GetDateUnits(CurOwnDay, CurOwnMonth, UIDateStr)
+ If UIDateStr = &quot;&quot; Then Exit Sub
+ MaxIndex = Ubound(DlgCalModel.lstOwnData.StringItemList())
+ If MaxIndex = -1 Then
+ DlgCalendar.GetControl(&quot;lstOwnData&quot;).AddItem(UIDateStr, 0 + 1)
+ bInserted = True
+ Else
+ Dim CurEvMonth(MaxIndex) as Integer
+ Dim CurEvDay(MaxIndex) as Integer
+ Dim CurDate(MaxIndex) as Double
+ &apos; same Years(&quot;no years&quot; are treated like same years) -&gt; delete old entry and insert new one
+ i = 0
+ Do
+ CurDate(i) = GetSelectedDateUnits(CurEvDay(i), CurEvMonth(i), i)
+ If CurDate(i) = NewDate Then
+ DlgCalendar.GetControl(&quot;lstOwnData&quot;).RemoveItems(i,1)
+ DlgCalendar.GetControl(&quot;lstOwnData&quot;).AddItem(UIDateStr, i)
+ bInserted = True
+ End If
+ i = i + 1
+ Loop Until bInserted Or i &gt; MaxIndex
+
+ &apos; There exists already a date
+ If Not bInserted Then
+ i = 0
+ Do
+ If (CurEvMonth(i) = CurOwnMonth) And (CurEvDay(i) = CurOwnDay) Then
+ bInserted = True
+ DlgCalendar.GetControl(&quot;lstOwnData&quot;).RemoveItems(i,1)
+ DlgCalendar.GetControl(&quot;lstOwnData&quot;).AddItem(UIDateStr, i)
+ End If
+ i = i + 1
+ Loop Until bInserted Or i &gt; MaxIndex
+ End If
+
+ &apos; The date is not yet existing and will will be sorted in accordingly
+ If Not bInserted Then
+ i = 0
+ Do
+ bInserted = NewDate &lt; CurDate(i)
+ If bInserted Then
+ DlgCalendar.GetControl(&quot;lstOwnData&quot;).AddItem(UIDateStr, i)
+ End If
+ i = i + 1
+ Loop Until bInserted Or i &gt; MaxIndex
+ If Not bInserted Then
+ DlgCalendar.GetControl(&quot;lstOwnData&quot;).AddItem(UIDateStr, MaxIndex+1)
+ End If
+ End If
+ End If
+ bCalOwnDataChanged = True
+ Call CalClearInputMask()
+End Sub
+
+
+Function GetSelectedDateUnits(CurEvDay as Integer, CurEvMonth as Integer, i as Integer) as Double
+Dim dblDate as Double
+Dim DateStr as String
+ dblDate = SBDATEUNDEFINED
+ DateStr = DlgCalModel.lstOwnData.StringItemList(i)
+ If DateStr &lt;&gt; &quot;&quot; Then
+ dblDate = GetDateUnits(CurEvDay, CurEvMonth, DateStr)
+ End If
+ GetSelectedDateUnits() = dblDate
+End Function
+
+
+Function GetDateUnits(CurEvDay as Integer, CurEvMonth as Integer, DateStr) as Double
+Dim bEventOnce as String
+Dim LocDateStr as String
+Dim dblDate as Double
+Dim lDate as Long
+ LocDateStr = Mid(DateStr, 1, 15)
+ LocDateStr = Trim(LocDateStr)
+
+ bEventOnce = True
+ On Local Error Goto NODATEFORMAT
+ dblDate = oNumberFormatter.convertStringToNumber(lDateFormat, LocDateStr)
+ lDate = Clng(dblDate)
+ CurEvMonth = Month(lDate)
+ CurEvDay = Day(lDate)
+ GetDateUnits() = dblDate
+ Exit Function
+ GetDateUnits() =SBDATEUNDEFINED
+NODATEFORMAT:
+ If Err &lt;&gt; 0 Then
+ MsgBox(&quot;Error: Date : &apos; &quot; &amp; LocDateStr &amp; &quot;&apos; is not a valid Format&quot;, 16, sWizardTitle)
+ Resume GETRETURNVALUE
+GETRETURNVALUE:
+ GetDateUnits() = SBDATEUNDEFINED
+ End If
+End Function
+
+
+Function CalGetNameOfEvent(ByVal ListIndex as Integer) as String
+Dim NameStr as String
+ NameStr = DlgCalModel.lstOwnData.StringItemList(ListIndex)
+ NameStr = Trim (Mid(NameStr, 16))
+ CalGetNameOfEvent = NameStr
+End Function
+
+
+
+Sub CheckInsertedDates(Optional ControlEnvironment, Optional CurOwnMonth as Integer)
+Dim EvYear as Long
+Dim EvDay as Long
+Dim sEvMonth as String
+Dim bDoEnable as Boolean
+Dim ListboxName as String
+Dim MaxValue as Integer
+ If Not IsMissing(ControlEnvironment) Then
+ CurOwnMonth = DlgCalendar.GetControl(&quot;lstOwnEventMonth&quot;).getSelectedItemPos()+1
+ End If
+ EvYear = Year(Now())
+ bDoEnable = CurOwnMonth &lt;&gt; 0
+ If bDoEnable Then
+ MaxValue = CalMaxDayInMonth(EvYear, CurOwnMonth)
+ DlgCalModel.txtOwnEventDay.ValueMax = MaxValue
+ If DlgCalModel.txtOwnEventDay.Value &gt; MaxValue Then
+ DlgCalModel.txtOwnEventDay.Value = MaxValue
+ End If
+ bDoEnable = DlgCalModel.txtOwnEventDay.Value &lt;&gt; 0
+ If bDoEnable Then
+ bDoEnable = Ubound(DlgCalModel.lstOwnEventMonth.SelectedItems()) &gt; -1
+ If bDoEnable Then
+ bDoEnable = LTrim(DlgCalModel.txtEvent.Text) &lt;&gt; &quot;&quot;
+ End If
+ End If
+ End If
+ DlgCalModel.cmdInsert.Enabled = bDoEnable
+End Sub
+
+
+Sub GetOwnMonth()
+Dim EvYear as Integer
+Dim CurOwnMonth as Integer
+ EvYear = year(now())
+ CurOwnMonth = DlgCalModel.lstOwnEventMonth.SelectedItems(0) + 1
+ DlgCalModel.txtOwnEventDay.ValueMax = CalMaxDayInMonth(EvYear, CurOwnMonth)
+ CheckInsertedDates(,CurOwnMonth)
+End Sub</script:module> \ No newline at end of file
diff --git a/wizards/source/schedule/delzip b/wizards/source/schedule/delzip
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/wizards/source/schedule/delzip
diff --git a/wizards/source/schedule/dialog.xlb b/wizards/source/schedule/dialog.xlb
new file mode 100644
index 000000000000..b1afde681e7e
--- /dev/null
+++ b/wizards/source/schedule/dialog.xlb
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="Schedule" library:readonly="true" library:passwordprotected="false">
+ <library:element library:name="DlgCalendar"/>
+</library:library>
diff --git a/wizards/source/schedule/makefile.mk b/wizards/source/schedule/makefile.mk
new file mode 100644
index 000000000000..f5c549b878ce
--- /dev/null
+++ b/wizards/source/schedule/makefile.mk
@@ -0,0 +1,53 @@
+#*************************************************************************
+#
+# 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.
+#
+#*************************************************************************
+PRJ=..$/..
+
+PRJNAME=wizards
+TARGET=scheduleall
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+.INCLUDE : $(PRJ)$/util$/target.pmk
+
+# --- Files --------------------------------------------------------
+
+#
+# testresource.
+#
+SRS2NAME = schedule
+SRC2FILES= schedule.src
+RESLIB2SRSFILES= $(SRS)$/schedule.srs
+RESLIB2NAME= cal
+
+ZIP1TARGET = $(SCHEDULE_ALL_TARGET)
+ZIP1LIST = *.xdl *.xba *.xlb
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
+
diff --git a/wizards/source/schedule/schedule.src b/wizards/source/schedule/schedule.src
new file mode 100644
index 000000000000..beabe83cf2a4
--- /dev/null
+++ b/wizards/source/schedule/schedule.src
@@ -0,0 +1,357 @@
+/*************************************************************************
+ *
+ * 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.
+ *
+ ************************************************************************/// Dialog labels start at 1000
+#define dlgCalTitle 1000
+#define dlgCalTitleBack 1001
+#define dlgCalTitleOwnData 1002
+#define dlgSchdlTitle 1003
+#define dlgOK 1004
+#define dlgCancel 1005
+#define dlgCalFrameOption 1006
+#define dlgCalOptionYear 1007
+#define dlgCalOptionMonth 1008
+#define dlgSchdlDescription 1009
+#define dlgSchdlCountry 1010
+#define dlgTime 1011
+#define dlgYear 1012
+#define dlgCalMonth 1013
+#define dlgSpecificBankholidays 1014
+#define dlgCalOwnData 1015
+#define dlgCalInsert 1016
+#define dlgCalDelete 1017
+#define dlgCalNewEvent 1018
+#define dlgCalEvent 1019
+#define dlgCalEventOnce 1020
+#define dlgCalEventDay 1021
+#define dlgCalEventMonth 1022
+#define dlgCalEventYear 1023
+
+// Bitmap file is 1099
+#define dlgBitmapFile 1099
+
+// Names of states start at 1100
+#define dlgState 1100
+
+// Months start at 1200
+#define dlgMonth 1200
+
+// Messages start at 1300
+#define msgCalErrorTitle 1300
+#define msgCalError 1301
+#define msgCalRemoveTitle 1302
+#define msgCalRemove 1303
+
+// Styles start at 1400
+#define stlWorkday 1400
+#define stlWeekend 1401
+
+// Sheet names start at 1410
+#define nameCalYear 1410
+#define nameCalMonth 1411
+
+#define sProgress 1500
+
+// --------------------------------------------------------------------
+
+String dlgCalTitle
+{
+Text [ en-US ] = "%PRODUCTNAME Calendar";
+};
+
+String dlgCalTitleBack
+{
+Text [ en-US ] = "Back";
+};
+
+String dlgCalTitleOwnData
+{
+Text [ en-US ] = "Personal Data";
+};
+
+String dlgSchdlTitle
+{
+Text [ en-US ] = "Add Holidays to Calendar";
+};
+
+String dlgOK
+{
+Text [ en-US ] = "Create";
+};
+
+String dlgCancel
+{
+Text [ en-US ] = "Cancel";
+};
+
+String dlgCalFrameOption
+{
+Text [ en-US ] = "Calendar";
+};
+
+String dlgCalOptionYear
+{
+Text [ en-US ] = "~Year Overview";
+};
+
+String dlgCalOptionMonth
+{
+Text [ en-US ] = "~Month";
+};
+
+String dlgSchdlDescription
+{
+Text [ en-US ] = "Add holidays for";
+};
+
+String dlgSchdlCountry
+{
+Text [ en-US ] = "USA";
+};
+
+String dlgTime
+{
+Text [ en-US ] = "Time Frame";
+};
+
+String dlgYear
+{
+Text [ en-US ] = "Year";
+};
+
+String dlgCalMonth
+{
+Text [ en-US ] = "Month";
+};
+
+String dlgSpecificBankholidays
+{
+Text [ en-US ] = "-";
+};
+
+String dlgCalOwnData
+{
+Text [ en-US ] = "Personal Data";
+};
+
+String dlgCalInsert
+{
+Text [ en-US ] = "~Insert";
+};
+
+String dlgCalDelete
+{
+Text [ en-US ] = "~Delete";
+};
+
+String dlgCalNewEvent
+{
+Text [ en-US ] = "New Event";
+};
+
+String dlgCalEvent
+{
+Text [ en-US ] = "Event";
+};
+
+String dlgCalEventOnce
+{
+Text [ en-US ] = "One-Time";
+};
+
+String dlgCalEventDay
+{
+Text [ en-US ] = "Day";
+};
+
+String dlgCalEventMonth
+{
+Text [ en-US ] = "Month";
+};
+
+String dlgCalEventYear
+{
+Text [ en-US ] = "Year";
+};
+
+// --------------------------------------------------------------------
+
+String dlgBitmapFile
+{
+Text [ en-US ] = "usa.bmp";
+
+};
+
+// --------------------------------------------------------------------
+
+String dlgState
+{
+Text [ en-US ] = "Public holidays";
+};
+
+
+// --------------------------------------------------------------------
+
+String dlgMonth
+{
+Text [ en-US ] = "January";
+};
+
+String dlgMonth+1
+{
+Text [ en-US ] = "February";
+};
+
+String dlgMonth+2
+{
+Text [ en-US ] = "March";
+};
+
+String dlgMonth+3
+{
+Text [ en-US ] = "April";
+};
+
+String dlgMonth+4
+{
+Text [ en-US ] = "May";
+};
+
+String dlgMonth+5
+{
+Text [ en-US ] = "June";
+};
+
+String dlgMonth+6
+{
+Text [ en-US ] = "July";
+};
+
+String dlgMonth+7
+{
+Text [ en-US ] = "August";
+};
+
+String dlgMonth+8
+{
+Text [ en-US ] = "September";
+};
+
+String dlgMonth+9
+{
+Text [ en-US ] = "October";
+};
+
+String dlgMonth+10
+{
+Text [ en-US ] = "November";
+};
+
+String dlgMonth+11
+{
+Text [ en-US ] = "December";
+};
+
+// --------------------------------------------------------------------
+
+String msgCalErrorTitle
+{
+Text [ en-US ] = "Yearly / Monthly Calendar";
+};
+
+String msgCalError
+{
+Text [ en-US ] = "An error occurred while creating the calendar.";
+};
+
+String msgCalRemoveTitle
+{
+Text [ en-US ] = "Delete event entries";
+};
+
+String msgCalRemove
+{
+Text [ en-US ] = "Delete the selected entries?";
+};
+
+// --------------------------------------------------------------------
+
+String stlWorkday
+{
+Text [ en-US ] = "Workweek";
+};
+
+String stlWeekend
+{
+Text [ en-US ] = "Weekend";
+};
+
+// --------------------------------------------------------------------
+
+String nameCalYear
+{
+Text [ en-US ] = "Calendar";
+};
+
+String nameCalMonth
+{
+Text [ en-US ] = "Month";
+};
+
+
+
+String sProgress
+{
+Text [ en-US ] = "Progress:";
+};
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wizards/source/schedule/script.xlb b/wizards/source/schedule/script.xlb
new file mode 100644
index 000000000000..96dd8da57fc1
--- /dev/null
+++ b/wizards/source/schedule/script.xlb
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="Schedule" library:readonly="true" library:passwordprotected="false">
+ <library:element library:name="OwnEvents"/>
+ <library:element library:name="CalendarMain"/>
+ <library:element library:name="BankHoliday"/>
+ <library:element library:name="DlgControl"/>
+ <library:element library:name="Language"/>
+ <library:element library:name="CreateTable"/>
+ <library:element library:name="GermanHolidays"/>
+ <library:element library:name="LocalHolidays"/>
+</library:library>
diff --git a/wizards/source/standard/Module1.xba b/wizards/source/standard/Module1.xba
new file mode 100644
index 000000000000..d7e2398cc642
--- /dev/null
+++ b/wizards/source/standard/Module1.xba
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Module1" script:language="StarBasic">REM ***** BASIC *****
+
+Sub Main
+
+End Sub</script:module> \ No newline at end of file
diff --git a/wizards/source/standard/delzip b/wizards/source/standard/delzip
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/wizards/source/standard/delzip
diff --git a/wizards/source/standard/dialog.xlb b/wizards/source/standard/dialog.xlb
new file mode 100644
index 000000000000..669529dbce6f
--- /dev/null
+++ b/wizards/source/standard/dialog.xlb
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="Standard" library:readonly="false" library:passwordprotected="false"/>
diff --git a/wizards/source/standard/makefile.mk b/wizards/source/standard/makefile.mk
new file mode 100644
index 000000000000..7ffef2e63789
--- /dev/null
+++ b/wizards/source/standard/makefile.mk
@@ -0,0 +1,45 @@
+#*************************************************************************
+#
+# 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.
+#
+#*************************************************************************
+PRJ=..$/..
+
+PRJNAME=wizards
+TARGET=standard
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+.INCLUDE : $(PRJ)$/util$/target.pmk
+
+# --- Files --------------------------------------------------------
+
+ZIP1TARGET = $(STANDARD_ALL_TARGET)
+ZIP1LIST = *.xdl *.xba *.xlb
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
+
diff --git a/wizards/source/standard/script.xlb b/wizards/source/standard/script.xlb
new file mode 100644
index 000000000000..67c9503b785c
--- /dev/null
+++ b/wizards/source/standard/script.xlb
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="Standard" library:readonly="false" library:passwordprotected="false">
+ <library:element library:name="Module1"/>
+</library:library>
diff --git a/wizards/source/template/Autotext.xba b/wizards/source/template/Autotext.xba
new file mode 100644
index 000000000000..27a7bca1290e
--- /dev/null
+++ b/wizards/source/template/Autotext.xba
@@ -0,0 +1,173 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Autotext" script:language="StarBasic">Option Explicit
+
+Public UserfieldDataType(14) as String
+Public oDocAuto as Object
+Public BulletList(7) as Integer
+Public sTextFieldNotDefined as String
+Public sGeneralError as String
+
+
+Sub Main()
+ Dim oCursor as Object
+ Dim oStyles as Object
+ Dim oSearchDesc as Object
+ Dim oFoundall as Object
+ Dim oFound as Object
+ Dim i as Integer
+ Dim sFoundString as String
+ Dim sFoundContent as String
+ Dim FieldStringThere as String
+ Dim ULStringThere as String
+ Dim PHStringThere as String
+ On Local Error Goto GENERALERROR
+ &apos; Initialization...
+ BasicLibraries.LoadLibrary(&quot;Tools&quot;)
+ If InitResources(&quot;&apos;Template&apos;&quot;, &quot;tpl&quot;) Then
+ sGeneralError = GetResText(1302)
+ sTextFieldNotDefined = GetResText(1400)
+ End If
+
+ UserfieldDatatype(0) = &quot;COMPANY&quot;
+ UserfieldDatatype(1) = &quot;FIRSTNAME&quot;
+ UserfieldDatatype(2) = &quot;NAME&quot;
+ UserfieldDatatype(3) = &quot;SHORTCUT&quot;
+ UserfieldDatatype(4) = &quot;STREET&quot;
+ UserfieldDatatype(5) = &quot;COUNTRY&quot;
+ UserfieldDatatype(6) = &quot;ZIP&quot;
+ UserfieldDatatype(7) = &quot;CITY&quot;
+ UserfieldDatatype(8) = &quot;TITLE&quot;
+ UserfieldDatatype(9) = &quot;POSITION&quot;
+ UserfieldDatatype(10) = &quot;PHONE_PRIVATE&quot;
+ UserfieldDatatype(11) = &quot;PHONE_COMPANY&quot;
+ UserfieldDatatype(12) = &quot;FAX&quot;
+ UserfieldDatatype(13) = &quot;EMAIL&quot;
+ UserfieldDatatype(14) = &quot;STATE&quot;
+ BulletList(0) = 149
+ BulletList(1) = 34
+ BulletList(2) = 65
+ BulletList(3) = 61
+ BulletList(4) = 49
+ BulletList(5) = 47
+ BulletList(6) = 79
+ BulletList(7) = 58
+
+ oDocAuto = ThisComponent
+ oStyles = oDocAuto.Stylefamilies.GetByName(&quot;NumberingStyles&quot;)
+
+ &apos; Prepare the Search-Descriptor
+ oSearchDesc = oDocAuto.createsearchDescriptor()
+ oSearchDesc.SearchRegularExpression = True
+ oSearchDesc.SearchWords = True
+ oSearchDesc.SearchString = &quot;&lt;[^&gt;]+&gt;&quot;
+ oFoundall = oDocAuto.FindAll(oSearchDesc)
+
+ &apos;Loop over the foundings
+ For i = 0 To oFoundAll.Count - 1
+ oFound = oFoundAll.GetByIndex(i)
+ sFoundString = oFound.String
+ &apos;Extract the string inside the brackets
+ sFoundContent = FindPartString(sFoundString,&quot;&lt;&quot;,&quot;&gt;&quot;,1)
+ sFoundContent = LTrim(sFoundContent)
+
+ &apos; Define the Cursor and place it on the founding
+ oCursor = oFound.Text.CreateTextCursorbyRange(oFound)
+
+ &apos; Find out, which object is to be created...
+ FieldStringThere = Instr(1,sFoundContent,&quot;Field&quot;)
+ ULStringThere = Instr(1,sFoundContent,&quot;UL&quot;)
+ PHStringThere = Instr(1,sFoundContent,&quot;Placeholder&quot;)
+ If FieldStringThere = 1 Then
+ CreateUserDatafield(oCursor, sFoundContent)
+ ElseIf ULStringThere = 1 Then
+ CreateBullet(oCursor, oStyles)
+ ElseIf PHStringThere = 1 Then
+ CreatePlaceholder(oCursor, sFoundContent)
+ End If
+ Next i
+
+ GENERALERROR:
+ If Err &lt;&gt; 0 Then
+ Msgbox(sGeneralError,16, GetProductName())
+ Resume LETSGO
+ End If
+ LETSGO:
+End Sub
+
+
+&apos; creates a User - datafield out of a string with the following structure
+&apos; &quot;&lt;field:Company&gt;&quot;
+Sub CreateUserDatafield(oCursor, sFoundContent as String)
+ Dim MaxIndex as Integer
+ Dim sFoundList(3)
+ Dim oUserfield as Object
+ Dim UserInfo as String
+ Dim UserIndex as Integer
+
+ oUserfield = oDocAuto.CreateInstance(&quot;com.sun.star.text.TextField.ExtendedUser&quot;)
+ sFoundList() = ArrayoutofString(sFoundContent,&quot;:&quot;,MaxIndex)
+ UserInfo = UCase(LTrim(sFoundList(1)))
+ UserIndex = IndexinArray(UserInfo, UserfieldDatatype())
+ If UserIndex &lt;&gt; -1 Then
+ oUserField.UserDatatype = UserIndex
+ oCursor.Text.InsertTextContent(oCursor,oUserField,True)
+ oUserField.IsFixed = True
+ Else
+ Msgbox(UserInfo &amp;&quot;: &quot; &amp; sTextFieldNotDefined,16, GetProductName())
+ End If
+End Sub
+
+
+&apos; Creates a Bullet by setting a soft Formatation on the first unsorted List-Templates with a defined
+&apos; Bullet Id
+Sub CreateBullet(oCursor, oStyles as Object)
+ Dim n, m, s as Integer
+ Dim StyleSet as Boolean
+ Dim ostyle as Object
+ Dim StyleName as String
+ Dim alevel()
+ StyleSet = False
+ For s = 0 To Ubound(BulletList())
+ For n = 0 To oStyles.Count - 1
+ ostyle = oStyles.getbyindex(n)
+ StyleName = oStyle.Name
+ alevel() = ostyle.NumberingRules.getbyindex(0)
+ &apos; The properties of the style are stored in a Name-Value-Array()
+ For m = 0 to Ubound(alevel())
+ &apos; Set the first Numbering template without a bulletID
+ If (aLevel(m).Name = &quot;BulletId&quot;) Then
+ If alevel(m).Value = BulletList(s) Then
+ oCursor.NumberingStyle = StyleName
+ oCursor.SetString(&quot;&quot;)
+ exit Sub
+ End if
+ End If
+ Next m
+ Next n
+ Next s
+ If Not StyleSet Then
+ &apos; The Template with the demanded BulletID is not available, so take the first style in the sequence
+ &apos; that has a defined Bullet ID
+ oCursor.NumberingStyleName = oStyles.GetByIndex(5).Name
+ oCursor.SetString(&quot;&quot;)
+ End If
+End Sub
+
+
+&apos; Creates a placeholder out of a string with the following structure:
+&apos;&lt;placeholder:Showtext:Helptext&gt;
+Sub CreatePlaceholder(oCursor as Object, sFoundContent as String)
+ Dim oPlaceholder as Object
+ Dim MaxIndex as Integer
+ Dim sFoundList(3)
+ oPlaceholder = oDocAuto.CreateInstance(&quot;com.sun.star.text.TextField.JumpEdit&quot;)
+ sFoundList() = ArrayoutofString(sFoundContent, &quot;:&quot; &amp; chr(34),MaxIndex)
+ &apos; Delete The Double-quotes
+ oPlaceholder.Hint = DeleteStr(sFoundList(2),chr(34))
+ oPlaceholder.placeholder = DeleteStr(sFoundList(1),chr(34))
+ oCursor.Text.InsertTextContent(oCursor,oPlaceholder,True)
+End Sub
+
+
+</script:module> \ No newline at end of file
diff --git a/wizards/source/template/Correspondence.xba b/wizards/source/template/Correspondence.xba
new file mode 100644
index 000000000000..03c7ef77fbe8
--- /dev/null
+++ b/wizards/source/template/Correspondence.xba
@@ -0,0 +1,286 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Correspondence" script:language="StarBasic">Option Explicit
+
+Public msgNoTextmark$, msgError$
+Public sAddressbook$
+Public Table
+Public sCompany$, sFirstName$, sLastName$, sStreet$, sPostalCode$, sCity$, sState$, sInitials$, sPosition$
+Public DialogExited
+Public oDocument, oText, oBookMarks, oBookMark, oBookMarkCursor, oBookText as Object
+Public bTemplate, bDBFields as Boolean
+
+Sub Main
+ bTemplate = true
+ BasicLibraries.LoadLibrary(&quot;Tools&quot;)
+ TemplateDialog = LoadDialog(&quot;Template&quot;, &quot;TemplateDialog&quot;)
+ DialogModel = TemplateDialog.Model
+ DialogModel.Step = 2
+ DialogModel.Optmerge.State = True
+ LoadLanguageCorrespondence()
+ TemplateDialog.Execute
+ TemplateDialog.Dispose()
+End Sub
+
+
+Sub Placeholder
+ bTemplate = false
+ BasicLibraries.LoadLibrary(&quot;Tools&quot;)
+ LoadLanguageCorrespondence()
+ bDBFields = false
+ OK()
+End Sub
+
+
+Sub Database
+ bTemplate = false
+ BasicLibraries.LoadLibrary(&quot;Tools&quot;)
+ LoadLanguageCorrespondence()
+ bDBFields = true
+ OK()
+End Sub
+
+
+Function LoadLanguageCorrespondence() as Boolean
+ If InitResources(&quot;&apos;Template&apos;&quot;, &quot;tpl&quot;) Then
+ msgNoTextmark$ = GetResText(1303) &amp; Chr(13) &amp; Chr(10) &amp; GetResText(1301)
+ msgError$ = GetResText(1302)
+ If bTemplate Then
+ DialogModel.Title = GetResText(1303+3)
+ DialogModel.CmdCancel.Label = GetResText(1102)
+ DialogModel.CmdCorrGoOn.Label = GetResText(1103)
+ DialogModel.OptSingle.Label = GetResText(1303 + 1)
+ DialogModel.Optmerge.Label = GetResText(1303 + 2)
+ DialogModel.FrmLetter.Label = GetResText(1303)
+ End If
+ LoadLanguageCorrespondence() = True
+ Else
+ msgbox(&quot;Warning: Resource could not be loaded!&quot;)
+ End If
+End Function
+
+
+Function GetFieldName(oFieldKnot as Object, GeneralFieldName as String)
+ If oFieldKnot.HasByName(GeneralFieldName) Then
+ GetFieldName = oFieldKnot.GetByName(GeneralFieldName).AssignedFieldName
+ Else
+ GetFieldName = &quot;&quot;
+ End If
+End Function
+
+
+Sub OK
+Dim ParaBreak
+Dim sDocLang as String
+Dim oSearchDesc as Object
+Dim oFoundAll as Object
+Dim oFound as Object
+Dim sFoundContent as String
+Dim sFoundString as String
+Dim sDBField as String
+Dim i as Integer
+Dim oDBAccess as Object
+Dim oAddressDialog as Object
+Dim oAddressPilot as Object
+Dim oFields as Object
+Dim oDocSettings as Object
+Dim oContext as Object
+Dim bDBvalid as Boolean
+ &apos;On Local Error Goto GENERALERROR
+
+ If bTemplate Then
+ bDBFields = DialogModel.Optmerge.State &apos;database or placeholder
+ TemplateDialog.EndExecute()
+ DialogExited = TRUE
+ End If
+
+ If bDBFields Then
+ oDBAccess = GetRegistryKeyContent(&quot;org.openoffice.Office.DataAccess/AddressBook/&quot;)
+ sAddressbook = oDBAccess.DataSourceName
+
+ bDBvalid = false
+ oContext = createUnoService( &quot;com.sun.star.sdb.DatabaseContext&quot; )
+
+ If (not isNull(oContext)) Then
+ &apos;Is the previously assigned address data source still valid?
+ bDBvalid = oContext.hasByName(sAddressbook)
+ end if
+
+ If (bDBvalid = false) Then
+ oAddressPilot = createUnoService(&quot;com.sun.star.ui.dialogs.AddressBookSourcePilot&quot;)
+ oAddressPilot.execute
+
+ oDBAccess = GetRegistryKeyContent(&quot;org.openoffice.Office.DataAccess/AddressBook/&quot;)
+ sAddressbook = oDBAccess.DataSourceName
+ If sAddressbook = &quot;&quot; Then
+ MsgBox(GetResText(1301))
+ Exit Sub
+ End If
+ End If
+ oFields = oDBAccess.GetByName(&quot;Fields&quot;)
+ Table = oDBAccess.GetByName(&quot;Command&quot;)
+ End If
+
+ ParaBreak = com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK
+ oDocument = ThisComponent
+ If bDBFields Then
+ &apos;set the address db as current db at the document
+ oDocSettings = oDocument.createInstance(&quot;com.sun.star.document.Settings&quot;)
+ oDocSettings.CurrentDatabaseDataSource = sAddressbook
+ oDocSettings.CurrentDatabaseCommand = Table
+ oDocSettings.CurrentDatabaseCommandType = 0
+ End If
+ oBookmarks = oDocument.Bookmarks
+ oText = oDocument.Text
+
+ oSearchDesc = oDocument.createsearchDescriptor()
+ oSearchDesc.SearchRegularExpression = True
+ oSearchDesc.SearchWords = True
+ oSearchDesc.SearchString = &quot;&lt;[^&gt;]+&gt;&quot;
+ oFoundall = oDocument.FindAll(oSearchDesc)
+
+ &apos;Loop over the foundings
+ For i = oFoundAll.Count -1 To 0 Step -1
+ oFound = oFoundAll.GetByIndex(i)
+ sFoundString = oFound.String
+ &apos;Extract the string inside the brackets
+ sFoundContent = FindPartString(sFoundString,&quot;&lt;&quot;,&quot;&gt;&quot;,1)
+ sFoundContent = LTrim(sFoundContent)
+ &apos; Define the Cursor and place it on the founding
+ oBookmarkCursor = oFound.Text.CreateTextCursorbyRange(oFound)
+ oBookText = oFound.Text
+ If bDBFields Then
+ sDBField = GetFieldname(oFields, sFoundContent)
+ If sDBField &lt;&gt; &quot;&quot; Then
+ InsertDBField(sAddressbook, Table, sDBField)
+ Else
+ InsertPlaceholder(sFoundContent)
+ End If
+ Else
+ InsertPlaceholder(sFoundContent)
+ End If
+ Next i
+ If bDBFields Then
+ &apos;Open the DB beamer with the right DB
+ Dim oDisp as Object
+ Dim oTransformer
+ Dim aURL as new com.sun.star.util.URL
+ aURL.complete = &quot;.component:DB/DataSourceBrowser&quot;
+ oTransformer = createUnoService(&quot;com.sun.star.util.URLTransformer&quot;)
+ oTransformer.parseStrict(aURL)
+ oDisp = oDocument.getCurrentController.getFrame.queryDispatch(aURL, &quot;_beamer&quot;, com.sun.star.frame.FrameSearchFlag.CHILDREN + com.sun.star.frame.FrameSearchFlag.CREATE)
+ Dim aArgs(3) as new com.sun.star.beans.PropertyValue
+ aArgs(1).Name = &quot;DataSourceName&quot;
+ aArgs(1).Value = sAddressbook
+ aArgs(2).Name = &quot;CommandType&quot;
+ aArgs(2).Value = com.sun.star.sdb.CommandType.TABLE
+ aArgs(3).Name = &quot;Command&quot;
+ aArgs(3).Value = Table
+ oDisp.dispatch(aURL, aArgs())
+ End If
+
+ GENERALERROR:
+ If Err &lt;&gt; 0 Then
+ Msgbox(msgError$,16, GetProductName())
+ Resume LETSGO
+ End If
+ LETSGO:
+
+End Sub
+
+
+Sub InsertDBField(sDBName as String, sTableName as String, sColName as String)
+Dim oFieldMaster, oField as Object
+ If sColname &lt;&gt; &quot;&quot; Then
+ oFieldMaster = oDocument.createInstance(&quot;com.sun.star.text.FieldMaster.Database&quot;)
+ oField = oDocument.createInstance(&quot;com.sun.star.text.TextField.Database&quot;)
+ oFieldMaster.DataBaseName = sDBName
+ oFieldMaster.DataBaseName = sDBName
+ oFieldMaster.DataTableName = sTableName
+ oFieldMaster.DataColumnName = sColName
+ oField.AttachTextfieldmaster (oFieldMaster)
+ oBookText.InsertTextContent(oBookMarkCursor, oField, True)
+ oField.Content = &quot;&lt;&quot; &amp; sColName &amp; &quot;&gt;&quot;
+ End If
+End Sub
+
+
+Sub InsertPlaceholder(sColName as String)
+Dim oFieldMaster as Object
+Dim bCorrectField as Boolean
+ If sColname &lt;&gt; &quot;&quot; Then
+ bCorrectField = True
+ oFieldMaster = oDocument.createInstance(&quot;com.sun.star.text.TextField.JumpEdit&quot;)
+ Select Case sColName
+ Case &quot;Company&quot;
+ oFieldMaster.PlaceHolder = getResText(1350+1)
+ Case &quot;Department&quot;
+ oFieldMaster.PlaceHolder = getResText(1350+2)
+ Case &quot;FirstName&quot;
+ oFieldMaster.PlaceHolder = getResText(1350+3)
+ Case &quot;LastName&quot;
+ oFieldMaster.PlaceHolder = getResText(1350+4)
+ Case &quot;Street&quot;
+ oFieldMaster.PlaceHolder = getResText(1350+5)
+ Case &quot;Country&quot;
+ oFieldMaster.PlaceHolder = getResText(1350+6)
+ Case &quot;Zip&quot;
+ oFieldMaster.PlaceHolder = getResText(1350+7)
+ Case &quot;City&quot;
+ oFieldMaster.PlaceHolder = getResText(1350+8)
+ Case &quot;Title&quot;
+ oFieldMaster.PlaceHolder = getResText(1350+9)
+ Case &quot;Position&quot;
+ oFieldMaster.PlaceHolder = getResText(1350+10)
+ Case &quot;AddrForm&quot;
+ oFieldMaster.PlaceHolder = getResText(1350+11)
+ Case &quot;Code&quot;
+ oFieldMaster.PlaceHolder = getResText(1350+12)
+ Case &quot;AddrFormMail&quot;
+ oFieldMaster.PlaceHolder = getResText(1350+13)
+ Case &quot;PhonePriv&quot;
+ oFieldMaster.PlaceHolder = getResText(1350+14)
+ Case &quot;PhoneComp&quot;
+ oFieldMaster.PlaceHolder = getResText(1350+15)
+ Case &quot;Fax&quot;
+ oFieldMaster.PlaceHolder = getResText(1350+16)
+ Case &quot;EMail&quot;
+ oFieldMaster.PlaceHolder = getResText(1350+17)
+ Case &quot;URL&quot;
+ oFieldMaster.PlaceHolder = getResText(1350+18)
+ Case &quot;Note&quot;
+ oFieldMaster.PlaceHolder = getResText(1350+19)
+ Case &quot;Altfield1&quot;
+ oFieldMaster.PlaceHolder = getResText(1350+20)
+ Case &quot;Altfield2&quot;
+ oFieldMaster.PlaceHolder = getResText(1350+21)
+ Case &quot;Altfield3&quot;
+ oFieldMaster.PlaceHolder = getResText(1350+22)
+ Case &quot;Altfield4&quot;
+ oFieldMaster.PlaceHolder = getResText(1350+23)
+ Case &quot;Id&quot;
+ oFieldMaster.PlaceHolder = getResText(1350+24)
+ Case &quot;State&quot;
+ oFieldMaster.PlaceHolder = getResText(1350+25)
+ Case &quot;PhoneOffice&quot;
+ oFieldMaster.PlaceHolder = getResText(1350+26)
+ Case &quot;Pager&quot;
+ oFieldMaster.PlaceHolder = getResText(1350+27)
+ Case &quot;PhoneCell&quot;
+ oFieldMaster.PlaceHolder = getResText(1350+28)
+ Case &quot;PhoneOther&quot;
+ oFieldMaster.PlaceHolder = getResText(1350+29)
+ Case &quot;CalendarURL&quot;
+ oFieldMaster.PlaceHolder = getResText(1350+30)
+ Case &quot;InviteParticipant&quot;
+ oFieldMaster.PlaceHolder = getResText(1350+31)
+ Case Else
+ bCorrectField = False
+ End Select
+ If bCorrectField Then
+ oFieldMaster.Hint = getResText(1350)
+ oBookText.InsertTextContent(oBookMarkCursor, oFieldMaster, True)
+ End If
+ End If
+End Sub
+</script:module> \ No newline at end of file
diff --git a/wizards/source/template/DialogStyles.xdl b/wizards/source/template/DialogStyles.xdl
new file mode 100644
index 000000000000..a28beb14cd27
--- /dev/null
+++ b/wizards/source/template/DialogStyles.xdl
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
+<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="DialogStyles" dlg:left="170" dlg:top="93" dlg:width="120" dlg:height="169" dlg:help-url="HID:34650" dlg:closeable="true" dlg:moveable="true">
+ <dlg:bulletinboard>
+ <dlg:button dlg:id="cmdCancel" dlg:tab-index="0" dlg:left="5" dlg:top="150" dlg:width="50" dlg:height="13" dlg:help-url="HID:34652" dlg:value="cmdCancel">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Template.Samples.RestoreCurrentStyles?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:button dlg:id="cmdOk" dlg:tab-index="1" dlg:left="65" dlg:top="150" dlg:width="50" dlg:height="12" dlg:help-url="HID:34653" dlg:value="cmdOk">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Template.Samples.CloseStyleDialog?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:menulist dlg:id="lbStyles" dlg:tab-index="2" dlg:left="5" dlg:top="5" dlg:width="110" dlg:height="133" dlg:help-url="HID:34651">
+ <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:Template.Samples.SelectStyle?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:menulist>
+ </dlg:bulletinboard>
+</dlg:window> \ No newline at end of file
diff --git a/wizards/source/template/ModuleAgenda.xba b/wizards/source/template/ModuleAgenda.xba
new file mode 100644
index 000000000000..73b0c6cfd8dc
--- /dev/null
+++ b/wizards/source/template/ModuleAgenda.xba
@@ -0,0 +1,203 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="ModuleAgenda" script:language="StarBasic">&apos; All variables must be declared before use
+Option Explicit
+
+&apos; Used for &quot;disabling&quot; the cancel button of the dialog
+Public DialogExited As Boolean
+Dim DlgAgenda_gMyName as String
+Public TemplateDialog as Object
+Public DialogModel as Object
+Public sTrueContent as String
+Public Bookmarkname as String
+
+
+
+Sub Initialize()
+&apos; User sets the type of minutes
+ BasicLibraries.LoadLibrary( &quot;Tools&quot; )
+ TemplateDialog = LoadDialog(&quot;Template&quot;, &quot;TemplateDialog&quot;)
+ DialogModel = TemplateDialog.Model
+ DialogModel.Step = 1
+ LoadLanguageAgenda()
+ DialogModel.OptAgenda2.State = TRUE
+ GetOptionValues()
+ DialogExited = FALSE
+ TemplateDialog.Execute
+End Sub
+
+
+Sub LoadLanguageAgenda()
+ If InitResources(&quot;&apos;Template&apos;&quot;, &quot;tpl&quot;) Then
+ DlgAgenda_gMyName = GetResText(1200)
+ DialogModel.CmdCancel.Label = GetResText(1102)
+ DialogModel.CmdAgdGoon.Label = GetResText(1103)
+&apos; DlgAgenda_gMsgNoCancel$ = GetResText(1201)
+ DialogModel.FrmAgenda.Label = GetResText(1202)
+ DialogModel.OptAgenda1.Label = GetResText(1203)
+ DialogModel.OptAgenda2.Label = GetResText(1204)
+&apos; DialogModel.OptAgenda1.State = 1
+ End If
+End Sub
+
+
+Sub ModifyTemplate()
+Dim oDocument, oBookmarks, oBookmark, oBookmarkCursor, oTextField as Object
+Dim i as Integer
+
+ oDocument = ThisComponent
+ oBookMarks = oDocument.Bookmarks
+
+ On Local Error Goto NOBOOKMARK
+ TemplateDialog.EndExecute
+ DialogExited = TRUE
+ oBookmarkCursor = CreateBookmarkCursor(oDocument, BookmarkName)
+ oBookmarkCursor.Text.insertString(oBookmarkCursor,&quot;&quot;,True)
+ &apos; Delete all the Bookmarks except for the one named &quot;NextTopic&quot;
+ For i = oBookmarks.Count-1 To 0 Step -1
+ oBookMark = oBookMarks.GetByIndex(i)
+ If oBookMark.Name &lt;&gt; &quot;NextTopic&quot; Then
+ oBookMark.Dispose()
+ End If
+ Next i
+ oBookMarkCursor = CreateBookmarkCursor(oDocument, &quot;NextTopic&quot;)
+ If Not IsNull(oBookMarkCursor) Then
+ oTextField = oBookMarkCursor.TextField
+&apos; oTextField.TrueContent = sTrueContent
+ oTextField.Content = sTrueContent
+ End If
+
+ NOBOOKMARK:
+ If Err &lt;&gt; 0 Then
+ RESUME NEXT
+ End If
+End Sub
+
+
+Sub NewTopic
+&apos; Add a new topic to the agenda
+Dim oDocument, oBookmarks, oBookmark, oBookmarkCursor, oTextField as Object
+Dim oBaustein, oAutoText, oAutoGroup as Object
+Dim i as Integer
+
+ oDocument = ThisComponent
+ oBookMarkCursor = CreateBookMarkCursor(oDocument, &quot;NextTopic&quot;)
+ oTextField = oBookMarkCursor.TextField
+ oAutoText = CreateUnoService(&quot;com.sun.star.text.AutoTextContainer&quot;)
+ If oAutoText.HasbyName(&quot;template&quot;) Then
+ oAutoGroup = oAutoText.GetbyName(&quot;template&quot;)
+ If oAutoGroup.HasbyName(oTextField.Content) Then
+ oBaustein = oAutoGroup.GetbyName(oTextField.Content)
+ oBaustein.ApplyTo(oBookMarkCursor)
+ Else
+ Msgbox(&quot;AutoText &apos;&quot; &amp; oTextField.Content &amp; &quot;&apos; is not existing. Cannot insert additional topic!&quot;)
+ End If
+ Else
+ Msgbox(&quot;AutoGroupField template is not existing. Cannot insert additional topic!&quot;, 16, DlgAgenda_gMyName )
+ End If
+End Sub
+
+
+
+&apos; Add initials, date and time at bottom of agenda, disable and hide command buttons
+Sub FinishAgenda
+Dim BtnAddAgendaTopic As Object
+Dim BtnFinishAgenda As Object
+Dim oUserField, oDateTimeField as Object
+Dim oBookmarkCursor as Object
+Dim oFormats, oLocale as Object
+Dim iDateTimeKey as Integer
+
+ BasicLibraries.LoadLibrary( &quot;Tools&quot; )
+ oDocument = ThisComponent
+
+ oUserField = oDocument.CreateInstance(&quot;com.sun.star.text.TextField.ExtendedUser&quot;)
+ oUserField.UserDatatype = com.sun.star.text.UserDataPart.SHORTCUT
+
+ oDateTimeField = oDocument.CreateInstance(&quot;com.sun.star.text.TextField.DateTime&quot;)
+
+ &apos; Assign Standardformat to Datetime-Textfield
+ oFormats = oDocument.Numberformats
+ oLocale = oDocument.CharLocale
+ iDateTimeKey = oFormats.GetStandardFormat(com.sun.star.util.NumberFormat.DATETIME,oLocale)
+ oDateTimeField.NumberFormat = iDateTimeKey
+
+ oBookmarkCursor = CreateBookmarkCursor(oDocument, &quot;NextTopic&quot;)
+ oBookmarkCursor.Text.InsertTextContent(oBookmarkCursor,oUserField,False)
+ oBookmarkCursor.Text.InsertString(oBookmarkCursor,&quot; &quot;,False)
+ oBookmarkCursor.Text.InsertTextContent(oBookmarkCursor,oDateTimeField,False)
+ BtnAddAgendaTopic = getControlModel(oDocument, &quot;BtnAddAgendaTopic&quot;)
+ BtnFinishAgenda = getControlModel(oDocument, &quot;BtnFinishAgenda&quot;)
+ If Not IsNull(BtnAddAgendaTopic) Then BtnAddAgendaTopic.Enabled = FALSE
+ If Not IsNull(BtnFinishAgenda) Then BtnFinishAgenda.Enabled = FALSE
+End Sub
+
+
+Function CreateBookMarkCursor(oDocument as Object,sBookmarkName as String)
+ oBookMarks = oDocument.Bookmarks
+ If oBookmarks.HasbyName(sBookmarkName) Then
+ oBookMark = oBookMarks.GetbyName(sBookmarkName)
+ CreateBookMarkCursor = oBookMark.Anchor.Text.CreateTextCursorByRange(oBookMark.Anchor)
+ Else
+ Msgbox &quot;Bookmark &quot; &amp; sBookmarkName &amp; &quot; is not defined!&quot;
+ End If
+End Function
+
+
+
+Sub DeleteButtons
+Dim AgendaFinished As Boolean
+Dim BtnAddAgendaTopic As Object
+Dim BtnFinishAgenda As Object
+
+ oDocument = ThisComponent
+
+ BtnAddAgendaTopic = getControlModel(oDocument, &quot;BtnAddAgendaTopic&quot;)
+ BtnFinishAgenda = getControlModel(oDocument, &quot;BtnFinishAgenda&quot;)
+
+ &apos; If buttons could be accessed: If at least one button is disabled, then agenda is finished
+ AgendaFinished = FALSE
+ If Not IsNull(BtnAddAgendaTopic) Then
+ AgendaFinished = (AgendaFinished Or (BtnAddAgendaTopic.Enabled = FALSE))
+ End If
+
+ If Not IsNull(BtnFinishAgenda) Then
+ AgendaFinished = (AgendaFinished Or (BtnFinishAgenda.Enabled = FALSE))
+ End If
+
+ &apos; Delete Buttons, empty rows at end of document &amp; macro bindings if agenda is finished
+ If AgendaFinished Then
+ DisposeControl(oDocument, &quot;BtnAddAgendaTopic&quot;)
+ DisposeControl(oDocument, &quot;BtnFinishAgenda&quot;)
+
+ oBookmarkCursor = CreateBookMarkCursor(oDocument,&quot;NextTopic&quot;)
+ oBookMarkCursor.GotoEnd(True)
+ oBookmarkCursor.Text.insertString(oBookmarkCursor,&quot;&quot;,True)
+
+ AttachBasicMacroToEvent(oDocument,&quot;OnNew&quot;, &quot;&quot;)
+ AttachBasicMacroToEvent(oDocument,&quot;OnSave&quot;, &quot;&quot;)
+ AttachBasicMacroToEvent(oDocument,&quot;OnSaveAs&quot;, &quot;&quot;)
+ AttachBasicMacroToEvent(oDocument,&quot;OnPrint&quot;, &quot;&quot;)
+ End If
+End Sub
+
+
+
+Sub GetOptionValues(Optional aEvent as Object)
+Dim CurTag as String
+Dim Taglist() as String
+ If Not IsMissing(aEvent) Then
+ CurTag = aEvent.Source.Model.Tag
+ Else
+ If DialogModel.OptAgenda1.State = TRUE Then
+ CurTag = DialogModel.OptAgenda1.Tag
+ Else
+ CurTag = DialogModel.OptAgenda2.Tag
+ End If
+ End If
+ Taglist() = ArrayoutOfString(CurTag, &quot;;&quot;)
+ Bookmarkname = TagList(0)
+ sTrueContent = TagList(1)
+End Sub
+
+</script:module> \ No newline at end of file
diff --git a/wizards/source/template/Samples.xba b/wizards/source/template/Samples.xba
new file mode 100644
index 000000000000..b64ddc12db17
--- /dev/null
+++ b/wizards/source/template/Samples.xba
@@ -0,0 +1,185 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Samples" script:language="StarBasic">Option Explicit
+
+Const SAMPLES = 1000
+Const STYLES = 1100
+Const aTempFileName = &quot;Berend_Ilko_Tom_Stella_Volker.stc&quot;
+Public Const Twip = 425
+Dim oUcbObject as Object
+Public StylesDir as String
+Public StylesDialog as Object
+Public PathSeparator as String
+Public oFamilies as Object
+Public aOptions(0) as New com.sun.star.beans.PropertyValue
+Public sQueryPath as String
+Public NoArgs()as New com.sun.star.beans.PropertyValue
+Public aTempURL as String
+
+Public Files(100) as String
+
+
+&apos;--------------------------------------------------------------------------------------
+&apos;Miscellaneous Section starts here
+
+Function PrepareForEditing(Optional ByVal oDocument)
+&apos;This sub is called when sample documents are loaded (load event).
+&apos;It checks whether the documents is read-only, in which case it
+&apos;offers the user to create a new (writable) document using the original
+&apos;as a template.
+Dim DocPath as String
+Dim MMessage as String
+Dim MTitle as String
+Dim RValue as Integer
+Dim oNewDocument as Object
+Dim mFileProperties(1) as New com.sun.star.beans.PropertyValue
+ PrepareForEditing = NULL
+ BasicLibraries.LoadLibrary( &quot;Tools&quot; )
+ If InitResources(&quot;&apos;Template&apos;&quot;, &quot;tpl&quot;) then
+ If IsMissing(oDocument) Then
+ oDocument = ThisComponent
+ End If
+ If oDocument.IsReadOnly then
+ MMessage = GetResText(SAMPLES)
+ MTitle = GetResText(SAMPLES + 1)
+ RValue = Msgbox(MMessage, (128+48+1), MTitle)
+ If RValue = 1 Then
+ DocPath = oDocument.URL
+ mFileProperties(0).Name = &quot;AsTemplate&quot;
+ mFileProperties(0).Value = True
+ mFileProperties(1).Name = &quot;MacroExecutionMode&quot;
+ mFileProperties(1).Value = com.sun.star.document.MacroExecMode.USE_CONFIG
+
+ oNewDocument = StarDesktop.LoadComponentFromURL(DocPath,&quot;_default&quot;,0, mFileProperties())
+ PrepareForEditing() = oNewDocument
+ DisposeDocument(oDocument)
+ Else
+ PrepareForEditing() = NULL
+ End If
+ Else
+ PrepareForEditing() = oDocument
+ End If
+ End If
+End Function
+
+
+
+&apos;--------------------------------------------------------------------------------------
+&apos;Calc Style Section starts here
+
+Sub ShowStyles
+&apos;This sub displays the style selection dialog if the current document is a calc document.
+Dim TemplateDir, ActFileTitle, DisplayDummy as String
+Dim sFilterName(0) as String
+Dim StyleNames() as String
+Dim t as Integer
+Dim MaxIndex as Integer
+ BasicLibraries.LoadLibrary(&quot;Tools&quot;)
+ If InitResources(&quot;&apos;Template&apos;&quot;, &quot;tpl&quot;) then
+ oDocument = ThisComponent
+ If oDocument.SupportsService(&quot;com.sun.star.sheet.SpreadsheetDocument&quot;) Then
+ ToggleWindow(False)
+ oUcbObject = createUnoService(&quot;com.sun.star.ucb.SimpleFileAccess&quot;)
+ oFamilies = oDocument.StyleFamilies
+ SaveCurrentStyles(oDocument)
+ StylesDialog = LoadDialog(&quot;Template&quot;, &quot;DialogStyles&quot;)
+ DialogModel = StylesDialog.Model
+ TemplateDir = GetPathSettings(&quot;Template&quot;, False, 0)
+ StylesDir = GetOfficeSubPath(&quot;Template&quot;, &quot;wizard/styles/&quot;)
+ sQueryPath = GetOfficeSubPath(&quot;Template&quot;, &quot;wizard/bitmap/&quot;)
+ DialogModel.Title = GetResText(STYLES)
+ DialogModel.cmdCancel.Label = GetResText(STYLES+2)
+ DialogModel.cmdOk.Label = GetResText(STYLES+3)
+ Stylenames() = ReadDirectories(StylesDir, False, False, True,)
+ MaxIndex = Ubound(Stylenames())
+ BubbleSortList(Stylenames(),True)
+ Dim cStyles(MaxIndex)
+ For t = 0 to MaxIndex
+ Files(t) = StyleNames(t,0)
+ cStyles(t) = StyleNames(t,1)
+ Next t
+ On Local Error Resume Next
+ DialogModel.lbStyles.StringItemList() = cStyles()
+ ToggleWindow(True)
+ StylesDialog.Execute
+ End If
+ End If
+End Sub
+
+
+Sub SelectStyle
+&apos;This sub loads the specific styles from a style document and loads them into the
+&apos;current document.
+Dim StylePath as String
+Dim NewStyle as String
+Dim Position as Integer
+ Position = DialogModel.lbStyles.SelectedItems(0)
+ If Position &gt; -1 Then
+ ToggleWindow(False)
+ StylePath = Files(Position)
+ aOptions(0).Name = &quot;OverwriteStyles&quot;
+ aOptions(0).Value = true
+ oFamilies.loadStylesFromURL(StylePath, aOptions())
+ ToggleWindow(True)
+ End If
+End Sub
+
+
+Sub SaveCurrentStyles(oDocument as Object)
+&apos;This sub stores the current document in the user work directory
+ On Error Goto ErrorOcurred
+ aTempURL = GetPathSettings(&quot;Work&quot;, False)
+ Dim aRightMost as String
+ aRightMost = Right(aTempURL, 1)
+ if aRightMost = &quot;/&quot; Then
+ aTempURL = aTempURL &amp; aTempFileName
+ Else
+ aTempURL = aTempURL &amp; &quot;/&quot; &amp; aTempFileName
+ End If
+
+ While FileExists(aTempURL)
+ aTempURL=Left(aTempURL,(Len(aTempURL)-4)) &amp; &quot;_1.stc&quot;
+ Wend
+ oDocument.storeToURL(aTempURL, NoArgs())
+ Exit Sub
+
+ErrorOcurred:
+ MsgBox(GetResText( STYLES+1 ), 16, GetResText( STYLES ))
+ On Local Error Goto 0
+End Sub
+
+
+Sub RestoreCurrentStyles
+&apos;This sub retrieves the styles from the temporarily save document
+ ToggleWindow(False)
+ On Local Error Goto NoFile
+ If FileExists(aTempURL) Then
+ aOptions(0).Name = &quot;OverwriteStyles&quot;
+ aOptions(0).Value = true
+ oFamilies.LoadStylesFromURL(aTempURL, aOptions())
+ KillTempFile()
+ End If
+ StylesDialog.EndExecute
+ ToggleWindow(True)
+NOFILE:
+ If Err &lt;&gt; 0 Then
+ Msgbox(&quot;Cannot load Document from &quot; &amp; aTempUrl, 64, GetProductname())
+ End If
+ On Local Error Goto 0
+End Sub
+
+
+Sub CloseStyleDialog
+ KillTempFile()
+ DialogExited = True
+ StylesDialog.Endexecute
+End Sub
+
+
+Sub KillTempFile()
+ If oUcbObject.Exists(aTempUrl) Then
+ oUcbObject.Kill(aTempUrl)
+ End If
+End Sub
+
+</script:module> \ No newline at end of file
diff --git a/wizards/source/template/TemplateDialog.xdl b/wizards/source/template/TemplateDialog.xdl
new file mode 100644
index 000000000000..eb4cc696987a
--- /dev/null
+++ b/wizards/source/template/TemplateDialog.xdl
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
+<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="TemplateDialog" dlg:left="170" dlg:top="93" dlg:width="220" dlg:height="60" dlg:page="1" dlg:help-url="HID:34630" dlg:closeable="true" dlg:moveable="true">
+ <dlg:bulletinboard>
+ <dlg:radiogroup>
+ <dlg:radio dlg:id="OptAgenda1" dlg:tab-index="0" dlg:left="12" dlg:top="20" dlg:width="144" dlg:height="10" dlg:page="1" dlg:tag="TOP2;PT1" dlg:help-url="HID:34632" dlg:value="OptAgenda1">
+ <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:Template.ModuleAgenda.GetOptionValues?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:radio>
+ <dlg:radio dlg:id="OptAgenda2" dlg:tab-index="1" dlg:left="12" dlg:top="34" dlg:width="144" dlg:height="10" dlg:page="1" dlg:tag="TOP1;PT2" dlg:help-url="HID:34633" dlg:value="OptAgenda2">
+ <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:Template.ModuleAgenda.GetOptionValues?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:radio>
+ </dlg:radiogroup>
+ <dlg:button dlg:id="CmdCorrGoOn" dlg:tab-index="2" dlg:left="164" dlg:top="11" dlg:width="50" dlg:height="14" dlg:page="2" dlg:help-url="HID:34637" dlg:value="CmdCorrGoOn">
+ <script:event script:event-name="on-performaction" script:macro-name="Template.Correspondence.OK" script:language="StarBasic"/>
+ </dlg:button>
+ <dlg:radiogroup>
+ <dlg:radio dlg:id="OptSingle" dlg:tab-index="3" dlg:left="12" dlg:top="20" dlg:width="144" dlg:height="10" dlg:page="2" dlg:help-url="HID:34635" dlg:value="OptSingle"/>
+ <dlg:radio dlg:id="Optmerge" dlg:tab-index="4" dlg:left="12" dlg:top="34" dlg:width="144" dlg:height="10" dlg:page="2" dlg:help-url="HID:34636" dlg:value="Optmerge"/>
+ </dlg:radiogroup>
+ <dlg:button dlg:id="CmdAgdGoon" dlg:tab-index="5" dlg:left="164" dlg:top="11" dlg:width="50" dlg:height="14" dlg:page="1" dlg:help-url="HID:34634" dlg:value="CmdAgdGoOn">
+ <script:event script:event-name="on-performaction" script:macro-name="Template.ModuleAgenda.ModifyTemplate" script:language="StarBasic"/>
+ </dlg:button>
+ <dlg:button dlg:id="CmdCancel" dlg:tab-index="6" dlg:left="164" dlg:top="28" dlg:width="50" dlg:height="14" dlg:help-url="HID:34631" dlg:value="CmdCancel" dlg:button-type="cancel">
+ <script:event script:event-name="on-performaction" script:macro-name="Template.ModuleAgenda.DisposeDocument" script:language="StarBasic"/>
+ </dlg:button>
+ <dlg:fixedline dlg:id="FrmLetter" dlg:tab-index="7" dlg:left="6" dlg:top="6" dlg:width="150" dlg:height="10" dlg:page="2" dlg:value="FrmLetter"/>
+ <dlg:fixedline dlg:id="FrmAgenda" dlg:tab-index="8" dlg:left="6" dlg:top="6" dlg:width="150" dlg:height="10" dlg:page="1" dlg:value="FrmAgenda"/>
+ </dlg:bulletinboard>
+</dlg:window> \ No newline at end of file
diff --git a/wizards/source/template/delzip b/wizards/source/template/delzip
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/wizards/source/template/delzip
diff --git a/wizards/source/template/dialog.xlb b/wizards/source/template/dialog.xlb
new file mode 100644
index 000000000000..c5eed37a26f2
--- /dev/null
+++ b/wizards/source/template/dialog.xlb
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="Template" library:readonly="true" library:passwordprotected="false">
+ <library:element library:name="DialogStyles"/>
+ <library:element library:name="DlgGreeting"/>
+ <library:element library:name="TemplateDialog"/>
+</library:library>
diff --git a/wizards/source/template/makefile.mk b/wizards/source/template/makefile.mk
new file mode 100644
index 000000000000..82a30d0d25a8
--- /dev/null
+++ b/wizards/source/template/makefile.mk
@@ -0,0 +1,54 @@
+#*************************************************************************
+#
+# 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.
+#
+#*************************************************************************
+
+PRJ=..$/..
+
+PRJNAME=wizards
+TARGET=template
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+.INCLUDE : $(PRJ)$/util$/target.pmk
+
+# --- Files --------------------------------------------------------
+
+#
+# testresource.
+#
+SRS2NAME = template
+SRC2FILES= template.src
+RESLIB2SRSFILES= $(SRS)$/template.srs
+RESLIB2NAME= tpl
+
+ZIP1TARGET = $(TEMPLATE_ALL_TARGET)
+ZIP1LIST = *.xdl *.xba *.xlb
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
+
diff --git a/wizards/source/template/script.xlb b/wizards/source/template/script.xlb
new file mode 100644
index 000000000000..c89cc3788875
--- /dev/null
+++ b/wizards/source/template/script.xlb
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+ <library:library xmlns:library="http://openoffice.org/2000/library" library:name="Template" library:readonly="true" library:passwordprotected="false">
+ <library:element library:name="ModuleAgenda"/>
+ <library:element library:name="Correspondence"/>
+ <library:element library:name="Samples"/>
+ <library:element library:name="Autotext"/>
+ </library:library>
diff --git a/wizards/source/template/template.src b/wizards/source/template/template.src
new file mode 100644
index 000000000000..61e57f5cc053
--- /dev/null
+++ b/wizards/source/template/template.src
@@ -0,0 +1,358 @@
+/*************************************************************************
+ *
+ * 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.
+ *
+ ************************************************************************/#define SAMPLES 1000
+#define STYLES 1100
+#define AgendaDlgName 1200
+#define AgendaDlgNoCancel 1201
+#define AgendaDlgFrame 1202
+#define AgendaDlgButton1 1203
+#define AgendaDlgButton2 1204
+#define CorrespondenceNoTextmark 1300
+#define CorrespondenceMsgError 1302
+#define CorrespondenceDialog 1303
+#define CorrespondenceFields 1350
+#define TextField 1400
+#define Newsletter 1450
+
+// --------------------------------------------------------------------
+String SAMPLES
+{
+ Text [ en-US ] = "In order to use the full functionality of this sample, create a document that is based on this template.";
+};
+
+String SAMPLES + 1
+{
+ Text [ en-US ] = "Remarks";
+};
+
+// --------------------------------------------------------------------
+String STYLES
+{
+ Text [ en-US ] = "Theme Selection";
+};
+
+String STYLES + 1
+{
+ Text [ en-US ] = "Error while saving the document to the clipboard! The following action cannot be undone.";
+};
+
+String STYLES + 2
+{
+ Text [ en-US ] = "~Cancel";
+};
+
+String STYLES + 3
+{
+ Text [ en-US ] = "~OK";
+};
+
+// --------------------------------------------------------------------
+String AgendaDlgName
+{
+ Text [ en-US ] = "Minutes Template";
+};
+
+String AgendaDlgNoCancel
+{
+ Text [ en-US ] = "An option must be confirmed.";
+};
+
+String AgendaDlgFrame
+{
+ Text [ en-US ] = "Minutes Type";
+};
+
+String AgendaDlgButton1
+{
+ Text [ en-US ] = "Results Minutes";
+};
+
+String AgendaDlgButton2
+{
+ Text [ en-US ] = "Evaluation Minutes";
+};
+
+// --------------------------------------------------------------------
+String CorrespondenceNoTextmark
+{
+ Text [ en-US ] = "The bookmark 'Recipient' is missing.";
+};
+
+String CorrespondenceNoTextmark+1
+{
+ Text [ en-US ] = "Form letter fields can not be included.";
+};
+
+String CorrespondenceMsgError
+{
+ Text [ en-US ] = "An error has occurred.";
+};
+
+String CorrespondenceDialog
+{
+ Text [ en-US ] = "Addressee";
+};
+
+String CorrespondenceDialog+1
+{
+ Text [ en-US ] = "One recipient";
+};
+
+String CorrespondenceDialog+2
+{
+ Text [ en-US ] = "Several recipients (address database)";
+};
+
+String CorrespondenceDialog+3
+{
+ Text [ en-US ] = "Use of This Template";
+};
+
+
+String CorrespondenceFields
+{
+ Text [ en-US ] = "Click placeholder and overwrite";
+};
+
+String CorrespondenceFields+1
+{
+ Text [ en-US ] = "Company";
+};
+
+String CorrespondenceFields+2
+{
+ Text [ en-US ] = "Department";
+};
+
+String CorrespondenceFields+3
+{
+ Text [ en-US ] = "First Name";
+};
+
+String CorrespondenceFields+4
+{
+ Text [ en-US ] = "Last Name";
+};
+
+String CorrespondenceFields+5
+{
+ Text [ en-US ] = "Street";
+};
+
+String CorrespondenceFields+6
+{
+ Text [ en-US ] = "Country";
+};
+
+
+String CorrespondenceFields+7
+{
+ Text [ en-US ] = "ZIP/Postal Code";
+};
+
+String CorrespondenceFields+8
+{
+ Text [ en-US ] = "City";
+};
+
+String CorrespondenceFields+9
+{
+ Text [ en-US ] = "Title";
+};
+
+
+String CorrespondenceFields+10
+{
+ Text [ en-US ] = "Position";
+};
+
+
+String CorrespondenceFields+11
+{
+ Text [ en-US ] = "Form of Address";
+};
+
+
+String CorrespondenceFields+12
+{
+ Text [ en-US ] = "Initials";
+};
+
+
+String CorrespondenceFields+13
+{
+ Text [ en-US ] = "Salutation";
+};
+
+
+String CorrespondenceFields+14
+{
+ Text [ en-US ] = "Home Phone";
+};
+
+
+String CorrespondenceFields+15
+{
+ Text [ en-US ] = "Work Phone";
+};
+
+
+String CorrespondenceFields+16
+{
+ Text [ en-US ] = "Fax";
+};
+
+
+String CorrespondenceFields+17
+{
+ Text [ en-US ] = "E-Mail";
+};
+
+
+String CorrespondenceFields+18
+{
+ Text [ en-US ] = "URL";
+};
+
+
+String CorrespondenceFields+19
+{
+ Text [ en-US ] = "Notes";
+};
+
+
+String CorrespondenceFields+20
+{
+ Text [ en-US ] = "Alt. Field 1";
+};
+
+
+String CorrespondenceFields+21
+{
+ Text [ en-US ] = "Alt. Field 2";
+};
+
+
+String CorrespondenceFields+22
+{
+ Text [ en-US ] = "Alt. Field 3";
+};
+
+
+String CorrespondenceFields+23
+{
+ Text [ en-US ] = "Alt. Field 4";
+};
+
+
+String CorrespondenceFields+24
+{
+ Text [ en-US ] = "ID";
+};
+
+
+String CorrespondenceFields+25
+{
+ Text [ en-US ] = "State";
+};
+
+
+String CorrespondenceFields+26
+{
+ Text [ en-US ] = "Office Phone";
+};
+
+
+String CorrespondenceFields+27
+{
+ Text [ en-US ] = "Pager";
+};
+
+
+String CorrespondenceFields+28
+{
+ Text [ en-US ] = "Mobile Phone";
+};
+
+
+String CorrespondenceFields+29
+{
+ Text [ en-US ] = "Other Phone";
+};
+
+String CorrespondenceFields+30
+{
+ Text [ en-US ] = "Calendar URL";
+};
+
+String CorrespondenceFields+31
+{
+ Text [ en-US ] = "Invite";
+};
+
+
+String TextField
+{
+ Text [ en-US ] = "User data field is not defined!";
+
+};
+
+String Newsletter
+{
+ Text [ en-US ] = "General layout";
+};
+
+
+String Newsletter + 1
+{
+ Text [ en-US ] = "Default layout";
+};
+
+String Newsletter + 2
+{
+ Text [ en-US ] = "Commemorative publication layout";
+};
+
+String Newsletter + 3
+{
+ Text [ en-US ] = "Brochure layout";
+};
+
+String Newsletter + 10
+{
+ Text [ en-US ] = "Format";
+};
+
+String Newsletter + 11
+{
+ Text [ en-US ] = "Single-sided";
+};
+
+String Newsletter + 12
+{
+ Text [ en-US ] = "Double-sided";
+};
+
diff --git a/wizards/source/tools/Debug.xba b/wizards/source/tools/Debug.xba
new file mode 100644
index 000000000000..4ba60ffb8d95
--- /dev/null
+++ b/wizards/source/tools/Debug.xba
@@ -0,0 +1,236 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Debug" script:language="StarBasic">REM ***** BASIC *****
+
+Sub ActivateReadOnlyFlag()
+ SetBasicReadOnlyFlag(True)
+End Sub
+
+
+Sub DeactivateReadOnlyFlag()
+ SetBasicReadOnlyFlag(False)
+End Sub
+
+
+Sub SetBasicReadOnlyFlag(bReadOnly as Boolean)
+Dim i as Integer
+Dim LibName as String
+Dim BasicLibNames() as String
+ BasicLibNames() = BasicLibraries.ElementNames()
+ For i = 0 To Ubound(BasicLibNames())
+ LibName = BasicLibNames(i)
+ If LibName &lt;&gt; &quot;Standard&quot; Then
+ BasicLibraries.SetLibraryReadOnly(LibName, bReadOnly)
+ End If
+ Next i
+End Sub
+
+
+Sub WritedbgInfo(LocObject as Object)
+Dim locUrl as String
+Dim oLocDocument as Object
+Dim oLocText as Object
+Dim oLocCursor as Object
+Dim NoArgs()
+Dim sObjectStrings(2) as String
+Dim sProperties() as String
+Dim n as Integer
+Dim m as Integer
+Dim MaxIndex as Integer
+ sObjectStrings(0) = LocObject.dbg_Properties
+ sObjectStrings(1) = LocObject.dbg_Methods
+ sObjectStrings(2) = LocObject.dbg_SupportedInterfaces
+ LocUrl = &quot;private:factory/swriter&quot;
+ oLocDocument = StarDesktop.LoadComponentFromURL(LocUrl,&quot;_default&quot;,0,NoArgs)
+ oLocText = oLocDocument.text
+ oLocCursor = oLocText.createTextCursor()
+ oLocCursor.gotoStart(False)
+ If Vartype(LocObject) = 9 then &apos; an Object Variable
+ For n = 0 To 2
+ sProperties() = ArrayoutofString(sObjectStrings(n),&quot;;&quot;, MaxIndex)
+ For m = 0 To MaxIndex
+ oLocText.insertString(oLocCursor,sProperties(m),False)
+ oLocText.insertControlCharacter(oLocCursor,com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK,False)
+ Next m
+ Next n
+ Elseif Vartype(LocObject) = 8 Then &apos; a String Variable
+ oLocText.insertString(oLocCursor,LocObject,False)
+ ElseIf Vartype(LocObject) = 1 Then
+ Msgbox(&quot;Variable is Null!&quot;, 16, GetProductName())
+ End If
+End Sub
+
+
+Sub WriteDbgString(LocString as string)
+Dim oLocDesktop as object
+Dim LocUrl as String
+Dim oLocDocument as Object
+Dim oLocCursor as Object
+Dim oLocText as Object
+
+ LocUrl = &quot;private:factory/swriter&quot;
+ oLocDocument = StarDesktop.LoadComponentFromURL(LocUrl,&quot;_default&quot;,0,NoArgs)
+ oLocText = oLocDocument.text
+ oLocCursor = oLocText.createTextCursor()
+ oLocCursor.gotoStart(False)
+ oLocText.insertString(oLocCursor,LocString,False)
+End Sub
+
+
+Sub printdbgInfo(LocObject)
+ If Vartype(LocObject) = 9 then
+ Msgbox LocObject.dbg_properties
+ Msgbox LocObject.dbg_methods
+ Msgbox LocObject.dbg_supportedinterfaces
+ Elseif Vartype(LocObject) = 8 Then &apos; a String Variable
+ Msgbox LocObject
+ ElseIf Vartype(LocObject) = 0 Then
+ Msgbox(&quot;Variable is Null!&quot;, 16, GetProductName())
+ Else
+ Msgbox(&quot;Type of Variable: &quot; &amp; Typename(LocObject), 48, GetProductName())
+ End If
+End Sub
+
+
+Sub ShowArray(LocArray())
+Dim i as integer
+Dim msgstring
+ msgstring = &quot;&quot;
+ For i = Lbound(LocArray()) to Ubound(LocArray())
+ msgstring = msgstring + LocArray(i) + chr(13)
+ Next
+ Msgbox msgstring
+End Sub
+
+
+Sub ShowPropertyValues(oLocObject as Object)
+Dim PropName as String
+Dim sValues as String
+ On Local Error Goto NOPROPERTYSETINFO:
+ sValues = &quot;&quot;
+ For i = 0 To Ubound(oLocObject.PropertySetInfo.Properties)
+ Propname = oLocObject.PropertySetInfo.Properties(i).Name
+ sValues = sValues &amp; PropName &amp; chr(13) &amp; &quot; = &quot; &amp; oLocObject.GetPropertyValue(PropName) &amp; chr(13)
+ Next i
+ Msgbox(sValues , 64, GetProductName())
+ Exit Sub
+
+NOPROPERTYSETINFO:
+ Msgbox(&quot;Sorry, No PropertySetInfo attached to the object&quot;, 16, GetProductName())
+ Resume LEAVEPROC
+ LEAVEPROC:
+End Sub
+
+
+Sub ShowNameValuePair(Pair())
+Dim i as Integer
+Dim ShowString as String
+ ShowString = &quot;&quot;
+ On Local Error Resume Next
+ For i = 0 To Ubound(Pair())
+ ShowString = ShowString &amp; Pair(i).Name &amp; &quot; = &quot;
+ ShowString = ShowString &amp; Pair(i).Value &amp; chr(13)
+ Next i
+ Msgbox ShowString
+End Sub
+
+
+&apos; Retrieves all the Elements of aSequence of an object, with the
+&apos; possibility to define a filter(sfilter &lt;&gt; &quot;&quot;)
+Sub ShowElementNames(oLocElements() as Object, Optional sFiltername as String)
+Dim i as Integer
+Dim NameString as String
+ NameString = &quot;&quot;
+ For i = 0 To Ubound(oLocElements())
+ If Not IsMissIng(sFilterName) Then
+ If Instr(1, oLocElements(i), sFilterName) Then
+ NameString = NameString &amp; oLocElements(i) &amp; chr(13)
+ End If
+ Else
+ NameString = NameString &amp; oLocElements(i) &amp; chr(13)
+ End If
+ Next i
+ Msgbox(NameString, 64, GetProductName())
+End Sub
+
+
+&apos; Retrieves all the supported servicenames of an object, with the
+&apos; possibility to define a filter(sfilter &lt;&gt; &quot;&quot;)
+Sub ShowSupportedServiceNames(oLocObject as Object, Optional sFilterName as String)
+ On Local Error Goto NOSERVICENAMES
+ If IsMissing(sFilterName) Then
+ ShowElementNames(oLocobject.SupportedServiceNames())
+ Else
+ ShowElementNames(oLocobject.SupportedServiceNames(), sFilterName)
+ End If
+ Exit Sub
+
+ NOSERVICENAMES:
+ Msgbox(&quot;Sorry, No &apos;SupportedServiceNames&apos; - Property attached to the object&quot;, 16, GetProductName())
+ Resume LEAVEPROC
+ LEAVEPROC:
+End Sub
+
+
+&apos; Retrieves all the available Servicenames of an object, with the
+&apos; possibility to define a filter(sfilter &lt;&gt; &quot;&quot;)
+Sub ShowAvailableServiceNames(oLocObject as Object, Optional sFilterName as String)
+ On Local Error Goto NOSERVICENAMES
+ If IsMissing(sFilterName) Then
+ ShowElementNames(oLocobject.AvailableServiceNames)
+ Else
+ ShowElementNames(oLocobject.AvailableServiceNames, sFilterName)
+ End If
+ Exit Sub
+
+ NOSERVICENAMES:
+ Msgbox(&quot;Sorry, No &apos;AvailableServiceNames&apos; - Property attached to the object&quot;, 16, GetProductName())
+ Resume LEAVEPROC
+ LEAVEPROC:
+End Sub
+
+
+Sub ShowCommands(oLocObject as Object)
+ On Local Error Goto NOCOMMANDS
+ ShowElementNames(oLocObject.QueryCommands)
+ Exit Sub
+ NOCOMMANDS:
+ Msgbox(&quot;Sorry, No &apos;QueryCommands&apos; - Property attached to the object&quot;, 16, GetProductName())
+ Resume LEAVEPROC
+ LEAVEPROC:
+End Sub
+
+
+Sub ProtectCurrentSheets()
+Dim oDocument as Object
+Dim sDocType as String
+Dim iResult as Integer
+Dim oSheets as Object
+Dim i as Integer
+Dim bDoProtect as Boolean
+ oDocument = StarDesktop.ActiveFrame.Controller.Model
+ sDocType = GetDocumentType(oDocument)
+ If sDocType = &quot;scalc&quot; Then
+ oSheets = oDocument.Sheets
+ bDoProtect = False
+ For i = 0 To oSheets.Count-1
+ If Not oSheets(i).IsProtected Then
+ bDoProtect = True
+ End If
+ Next i
+ If bDoProtect Then
+ iResult = Msgbox( &quot;Do you want to protect all sheets of this document?&quot;,35, GetProductName())
+ If iResult = 6 Then
+ ProtectSheets(oDocument.Sheets)
+ End If
+ End If
+ End If
+End Sub
+
+
+Sub FillDocument()
+ oMyReport = createUNOService(&quot;com.sun.star.wizards.report.CallReportWizard&quot;)
+ oMyReport.trigger(&quot;fill&quot;)
+End Sub
+
+</script:module> \ No newline at end of file
diff --git a/wizards/source/tools/DlgOverwriteAll.xdl b/wizards/source/tools/DlgOverwriteAll.xdl
new file mode 100644
index 000000000000..5208ead799d6
--- /dev/null
+++ b/wizards/source/tools/DlgOverwriteAll.xdl
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
+<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="DlgOverwriteAll" dlg:left="138" dlg:top="75" dlg:width="230" dlg:height="64" dlg:closeable="true" dlg:moveable="true">
+ <dlg:bulletinboard>
+ <dlg:text dlg:id="lblQueryforSave" dlg:tab-index="0" dlg:left="6" dlg:top="6" dlg:width="218" dlg:height="36" dlg:value="lblQueryforSave" dlg:multiline="true"/>
+ <dlg:button dlg:id="cmdYes" dlg:tab-index="1" dlg:left="6" dlg:top="43" dlg:width="50" dlg:height="14" dlg:value="cmdYes">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Tools.ModuleControls.SetOVERWRITEToQuery?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:button dlg:id="cmdYesToAll" dlg:tab-index="2" dlg:left="62" dlg:top="43" dlg:width="50" dlg:height="14" dlg:value="cmdYesToAll">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Tools.ModuleControls.SetOVERWRITEToAlways?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:button dlg:id="cmdNo" dlg:tab-index="3" dlg:left="118" dlg:top="43" dlg:width="50" dlg:height="14" dlg:default="true" dlg:value="cmdNo">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Tools.ModuleControls.SetOVERWRITEToNever?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:button dlg:id="cmdCancel" dlg:tab-index="4" dlg:left="174" dlg:top="43" dlg:width="50" dlg:height="14" dlg:value="cmdCancel" dlg:button-type="cancel"/>
+ </dlg:bulletinboard>
+</dlg:window>
diff --git a/wizards/source/tools/Listbox.xba b/wizards/source/tools/Listbox.xba
new file mode 100644
index 000000000000..01e62e7d6715
--- /dev/null
+++ b/wizards/source/tools/Listbox.xba
@@ -0,0 +1,353 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Listbox" script:language="StarBasic">Option Explicit
+Dim OriginalList()
+Dim oDialogModel as Object
+
+
+Sub MergeList(SourceListBox() as Object, SecondList() as String)
+Dim i as Integer
+Dim MaxIndex as Integer
+ MaxIndex = Ubound(SecondList())
+ OriginalList() = AddListToList(OriginalList(), SecondList())
+ For i = 0 To MaxIndex
+ SourceListbox = AddSingleItemToListbox(SourceListbox, SecondList(i))
+ Next i
+ Call FormSetMoveRights()
+End Sub
+
+
+Sub RemoveListItems(SourceListbox as Object, TargetListbox as Object, RemoveList() as String)
+Dim i as Integer
+Dim s as Integer
+Dim MaxIndex as Integer
+Dim CopyList()
+ MaxIndex = Ubound(RemoveList())
+ For i = 0 To MaxIndex
+ RemoveListboxItemByName(SourceListbox, RemoveList(i))
+ RemoveListboxItemByName(TargetListbox, RemoveList(i))
+ Next i
+ CopyList() = OriginalList()
+ s = 0
+ MaxIndex = Ubound(CopyList())
+ For i = 0 To MaxIndex
+ If IndexInArray(CopyList(i),RemoveList())= -1 Then
+ OriginalList(s) = CopyList(i)
+ s = s + 1
+ End If
+ Next i
+ ReDim Preserve OriginalList(s-1)
+ Call FormSetMoveRights()
+End Sub
+
+
+&apos; Note Boolean Parameter
+Sub InitializeListboxProcedures(oModel as Object, SourceListbox as Object, TargetListbox as Object)
+Dim EmptyList()
+ Set oDialogModel = oModel
+ OriginalList()= SourceListbox.StringItemList()
+ TargetListbox.StringItemList() = EmptyList()
+End Sub
+
+
+Sub CopyListboxItems(SourceListbox as Object, TargetListbox As Object)
+Dim NullArray()
+ TargetListbox.StringItemList() = OriginalList()
+ SourceListbox.StringItemList() = NullArray()
+End Sub
+
+
+Sub FormMoveSelected()
+ Call MoveSelectedListBox(oDialogModel.lstFields, oDialogModel.lstSelFields)
+ Call FormSetMoveRights()
+ oDialogModel.lstSelFields.Tag = True
+End Sub
+
+
+Sub FormMoveAll()
+ Call CopyListboxItems(oDialogModel.lstFields, oDialogModel.lstSelFields)
+ Call FormSetMoveRights()
+ oDialogModel.lstSelFields.Tag = True
+End Sub
+
+
+Sub FormRemoveSelected()
+ Call MoveOrderedSelectedListbox(oDialogModel.lstFields, oDialogModel.lstSelFields, False)
+ Call FormSetMoveRights()
+ oDialogModel.lstSelFields.Tag = True
+End Sub
+
+
+Sub FormRemoveAll()
+ Call MoveOrderedSelectedListbox(oDialogModel.lstFields, oDialogModel.lstSelFields, True)
+ Call FormSetMoveRights()
+ oDialogModel.lstSelFields.Tag = 1
+End Sub
+
+
+Sub MoveSelectedListBox(SourceListbox as Object, TargetListbox as Object)
+Dim MaxCurTarget as Integer
+Dim MaxSourceSelected as Integer
+Dim n as Integer
+Dim m as Integer
+Dim CurIndex
+Dim iOldTargetSelect as Integer
+Dim iOldSourceSelect as Integer
+ MaxCurTarget = Ubound(TargetListbox.StringItemList())
+ MaxSourceSelected = Ubound(SourceListbox.SelectedItems())
+ Dim TargetList(MaxCurTarget+MaxSourceSelected+1)
+ If MaxSourceSelected &gt; -1 Then
+ iOldSourceSelect = SourceListbox.SelectedItems(0)
+ If Ubound(TargetListbox.SelectedItems()) &gt; -1 Then
+ iOldTargetSelect = TargetListbox.SelectedItems(0)
+ Else
+ iOldTargetSelect = -1
+ End If
+ For n = 0 To MaxCurTarget
+ TargetList(n) = TargetListbox.StringItemList(n)
+ Next n
+ For m = 0 To MaxSourceSelected
+ CurIndex = SourceListbox.SelectedItems(m)
+ TargetList(n) = SourceListbox.StringItemList(CurIndex)
+ n = n + 1
+ Next m
+ TargetListBox.StringItemList() = TargetList()
+ SourceListbox.StringItemList() = RemoveSelected (SourceListbox)
+ SetNewSelection(SourceListbox, iOldSourceSelect)
+ SetNewSelection(TargetListbox, iOldTargetSelect)
+ End If
+End Sub
+
+
+
+Sub MoveOrderedSelectedListbox(lstSource as Object, lstTarget as Object, bMoveAll as Boolean)
+Dim NullArray()
+Dim MaxSelected as Integer
+Dim MaxSourceIndex as Integer
+Dim MaxOriginalIndex as Integer
+Dim MaxNewIndex as Integer
+Dim n as Integer
+Dim m as Integer
+Dim CurIndex as Integer
+Dim SearchString as String
+Dim SourceList() as String
+Dim iOldTargetSelect as Integer
+Dim iOldSourceSelect as Integer
+ If bMoveAll Then
+ lstSource.StringItemList() = OriginalList()
+ lstTarget.StringItemList() = NullArray()
+ Else
+ MaxOriginalIndex = Ubound(OriginalList())
+ MaxSelected = Ubound(lstTarget.SelectedItems())
+ iOldTargetSelect = lstTarget.SelectedItems(0)
+ If Ubound(lstSource.SelectedItems()) &gt; -1 Then
+ iOldSourceSelect = lstSource.SelectedItems(0)
+ End If
+ Dim SelList(MaxSelected)
+ For n = 0 To MaxSelected
+ CurIndex = lstTarget.SelectedItems(n)
+ SelList(n) = lstTarget.StringItemList(CurIndex)
+ Next n
+ SourceList() = lstSource.StringItemList()
+ MaxSourceIndex = Ubound(lstSource.StringItemList())
+ MaxNewIndex = MaxSelected + MaxSourceIndex + 1
+ Dim NewSourceList(MaxNewIndex)
+ m = 0
+ For n = 0 To MaxOriginalIndex
+ SearchString = OriginalList(n)
+ If IndexinArray(SearchString, SelList()) &lt;&gt; -1 Then
+ NewSourceList(m) = SearchString
+ m = m + 1
+ ElseIf IndexinArray(SearchString, SourceList()) &lt;&gt; -1 Then
+ NewSourceList(m) = SearchString
+ m = m + 1
+ End If
+ Next n
+ lstSource.StringItemList() = NewSourceList()
+ lstTarget.StringItemList() = RemoveSelected(lstTarget)
+ End If
+ SetNewSelection(lstSource, iOldSourceSelect)
+ SetNewSelection(lstTarget, iOldTargetSelect)
+
+End Sub
+
+
+Function RemoveSelected(oListbox as Object)
+Dim MaxIndex as Integer
+Dim MaxSelected as Integer
+Dim n as Integer
+Dim m as Integer
+Dim CurIndex as Integer
+Dim CurItem as String
+Dim ResultArray()
+ MaxIndex = Ubound(oListbox.StringItemList())
+ MaxSelected = Ubound(oListbox.SelectedItems())
+ Dim LocItemList(MaxIndex)
+ LocItemList() = oListbox.StringItemList()
+ If MaxSelected &gt; -1 Then
+ For n = 0 To MaxSelected
+ CurIndex = oListbox.SelectedItems(n)
+ LocItemList(CurIndex) = &quot;&quot;
+ Next n
+ If MaxIndex &gt; 0 Then
+ ReDim ResultArray(MaxIndex - MaxSelected - 1)
+ m = 0
+ For n = 0 To MaxIndex
+ CurItem = LocItemList(n)
+ If CurItem &lt;&gt; &quot;&quot; Then
+ ResultArray(m) = CurItem
+ m = m + 1
+ End If
+ Next n
+ End If
+ RemoveSelected = ResultArray()
+ Else
+ RemoveSelected = oListbox.StringItemList()
+ End If
+End Function
+
+
+Sub SetNewSelection(oListBox as Object, iLastSelection as Integer)
+Dim MaxIndex as Integer
+Dim SelIndex as Integer
+Dim SelList(0) as Integer
+ MaxIndex = Ubound(oListBox.StringItemList())
+ If MaxIndex &gt; -1 AND iLastSelection &gt; -1 Then
+ If iLastSelection &gt; MaxIndex Then
+ Selindex = MaxIndex
+ Else
+ SelIndex = iLastSelection
+ End If
+ Sellist(0) = SelIndex
+ oListBox.SelectedItems() = SelList()
+ End If
+End Sub
+
+
+Sub ToggleListboxControls(oDialogModel as Object, bDoEnable as Boolean)
+ With oDialogModel
+ .lblFields.Enabled = bDoEnable
+ .lblSelFields.Enabled = bDoEnable
+&apos; .lstTables.Enabled = bDoEnable
+ .lstFields.Enabled = bDoEnable
+ .lstSelFields.Enabled = bDoEnable
+ .cmdRemoveAll.Enabled = bDoEnable
+ .cmdRemoveSelected.Enabled = bDoEnable
+ .cmdMoveAll.Enabled = bDoEnable
+ .cmdMoveSelected.Enabled = bDoEnable
+ End With
+ If bDoEnable Then
+ FormSetMoveRights()
+ End If
+End Sub
+
+
+&apos; Enable or disable the buttons used for moving the available
+&apos; fields between the two list boxes.
+Sub FormSetMoveRights()
+Dim bIsFieldSelected as Boolean
+Dim bSelectSelected as Boolean
+Dim FieldCount as Integer
+Dim SelectCount as Integer
+ bIsFieldSelected = Ubound(oDialogModel.lstFields.SelectedItems()) &lt;&gt; -1
+ FieldCount = Ubound(oDialogModel.lstFields.StringItemList()) + 1
+ bSelectSelected = Ubound(oDialogModel.lstSelFields.SelectedItems()) &gt; -1
+ SelectCount = Ubound(oDialogModel.lstSelFields.StringItemList()) + 1
+ oDialogModel.cmdRemoveAll.Enabled = SelectCount&gt;=1
+ oDialogModel.cmdRemoveSelected.Enabled = bSelectSelected
+ oDialogModel.cmdMoveAll.Enabled = FieldCount &gt;=1
+ oDialogModel.cmdMoveSelected.Enabled = bIsFieldSelected
+ oDialogModel.cmdGoOn.Enabled = SelectCount&gt;=1
+ &apos; This flag is set to &apos;1&apos; when the lstSelFields has been modified
+End Sub
+
+
+Function AddSingleItemToListbox(ByVal oListbox as Object, ListItem as String, Optional iSelIndex) as Object
+Dim MaxIndex as Integer
+Dim i as Integer
+
+ MaxIndex = Ubound(oListbox.StringItemList())
+Dim LocList(MaxIndex + 1)
+&apos; Todo: This goes faster with the Redim LocList(MaxIndex + 1) Preserve function
+ For i = 0 To MaxIndex
+ LocList(i) = oListbox.StringItemList(i)
+ Next i
+ LocList(MaxIndex + 1) = ListItem
+ oListbox.StringItemList() = LocList()
+ If Not IsMissing(iSelIndex) Then
+ SelectListboxItem(oListbox, iSelIndex)
+ End If
+ AddSingleItemToListbox() = oListbox
+End Function
+
+
+Sub EmptyListbox(oListbox as Object)
+Dim NullList() as String
+ oListbox.StringItemList() = NullList()
+End Sub
+
+
+Sub SelectListboxItem(oListbox as Object, iSelIndex as Integer)
+Dim LocSelList(0) as Integer
+ If iSelIndex &lt;&gt; -1 Then
+ LocSelList(0) = iSelIndex
+ oListbox.SelectedItems() = LocSelList()
+ End If
+End Sub
+
+
+Function GetSelectedListboxItems(oListbox as Object)
+Dim SelList(Ubound(oListBox.SelectedItems())) as String
+Dim i as Integer
+Dim CurIndex as Integer
+ For i = 0 To Ubound(oListbox.SelectedItems())
+ CurIndex = oListbox.SelectedItems(i)
+ SelList(i) = oListbox.StringItemList(CurIndex)
+ Next i
+ GetSelectedListboxItems() = SelList()
+End Function
+
+
+&apos; Note: When using this Sub it must be ensured that the
+&apos; &apos;RemoveItem&apos; appears only only once in the Listbox
+Sub RemoveListboxItemByName(oListbox as Object, RemoveItem as String)
+Dim OldList() as String
+Dim NullList() as String
+Dim i as Integer
+Dim a as Integer
+Dim MaxIndex as Integer
+ OldList = oListbox.StringItemList()
+ MaxIndex = Ubound(OldList())
+ If IndexInArray(RemoveItem, OldList()) &lt;&gt; -1 Then
+ If MaxIndex &gt; 0 Then
+ a = 0
+ Dim NewList(MaxIndex -1)
+ For i = 0 To MaxIndex
+ If RemoveItem &lt;&gt; OldList(i) Then
+ NewList(a) = OldList(i)
+ a = a + 1
+ End If
+ Next i
+ oListbox.StringItemList() = NewList()
+ Else
+ oListBox.StringItemList() = NullList()
+ End If
+ End If
+End Sub
+
+
+Function GetItemPos(oListBox as Object, sItem as String)
+Dim ItemList()
+Dim MaxIndex as Integer
+Dim i as Integer
+ ItemList() = oListBox.StringItemList()
+ MaxIndex = Ubound(ItemList())
+ For i = 0 To MaxIndex
+ If sItem = ItemList(i) Then
+ GetItemPos() = i
+ Exit Function
+ End If
+ Next i
+ GetItemPos() = -1
+End Function
+</script:module> \ No newline at end of file
diff --git a/wizards/source/tools/Misc.xba b/wizards/source/tools/Misc.xba
new file mode 100644
index 000000000000..7eca46671f12
--- /dev/null
+++ b/wizards/source/tools/Misc.xba
@@ -0,0 +1,817 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Misc" script:language="StarBasic">REM ***** BASIC *****
+
+Const SBSHARE = 0
+Const SBUSER = 1
+Dim Taskindex as Integer
+Dim oResSrv as Object
+
+Sub Main()
+Dim PropList(3,1)&apos; as String
+ PropList(0,0) = &quot;URL&quot;
+ PropList(0,1) = &quot;sdbc:odbc:Erica_Test_Unicode&quot;
+ PropList(1,0) = &quot;User&quot;
+ PropList(1,1) = &quot;extra&quot;
+ PropList(2,0) = &quot;Password&quot;
+ PropList(2,1) = &quot;extra&quot;
+ PropList(3,0) = &quot;IsPasswordRequired&quot;
+ PropList(3,1) = True
+End Sub
+
+
+Function RegisterNewDataSource(DSName as String, PropertyList(), Optional DriverProperties() as New com.sun.star.beans.PropertyValue)
+Dim oDataSource as Object
+Dim oDBContext as Object
+Dim oPropInfo as Object
+Dim i as Integer
+ oDBContext = createUnoService(&quot;com.sun.star.sdb.DatabaseContext&quot;)
+ oDataSource = createUnoService(&quot;com.sun.star.sdb.DataSource&quot;)
+ For i = 0 To Ubound(PropertyList(), 1)
+ sPropName = PropertyList(i,0)
+ sPropValue = PropertyList(i,1)
+ oDataSource.SetPropertyValue(sPropName,sPropValue)
+ Next i
+ If Not IsMissing(DriverProperties()) Then
+ oDataSource.Info() = DriverProperties()
+ End If
+ oDBContext.RegisterObject(DSName, oDataSource)
+ RegisterNewDataSource () = oDataSource
+End Function
+
+
+&apos; Connects to a registered Database
+Function ConnecttoDatabase(DSName as String, UserID as String, Password as String, Optional Propertylist(), Optional DriverProperties() as New com.sun.star.beans.PropertyValue)
+Dim oDBContext as Object
+Dim oDBSource as Object
+&apos; On Local Error Goto NOCONNECTION
+ oDBContext = CreateUnoService(&quot;com.sun.star.sdb.DatabaseContext&quot;)
+ If oDBContext.HasbyName(DSName) Then
+ oDBSource = oDBContext.GetByName(DSName)
+ ConnectToDatabase = oDBSource.GetConnection(UserID, Password)
+ Else
+ If Not IsMissing(Namelist()) Then
+ If Not IsMissing(DriverProperties()) Then
+ RegisterNewDataSource(DSName, PropertyList(), DriverProperties())
+ Else
+ RegisterNewDataSource(DSName, PropertyList())
+ End If
+ oDBSource = oDBContext.GetByName(DSName)
+ ConnectToDatabase = oDBSource.GetConnection(UserID, Password)
+ Else
+ Msgbox(&quot;DataSource &quot; &amp; DSName &amp; &quot; is not registered&quot; , 16, GetProductname())
+ ConnectToDatabase() = NULL
+ End If
+ End If
+NOCONNECTION:
+ If Err &lt;&gt; 0 Then
+ Msgbox(Error$, 16, GetProductName())
+ Resume LEAVESUB
+ LEAVESUB:
+ End If
+End Function
+
+
+Function GetStarOfficeLocale() as New com.sun.star.lang.Locale
+Dim aLocLocale As New com.sun.star.lang.Locale
+Dim sLocale as String
+Dim sLocaleList(1)
+Dim oMasterKey
+ oMasterKey = GetRegistryKeyContent(&quot;org.openoffice.Setup/L10N/&quot;)
+ sLocale = oMasterKey.getByName(&quot;ooLocale&quot;)
+ sLocaleList() = ArrayoutofString(sLocale, &quot;-&quot;)
+ aLocLocale.Language = sLocaleList(0)
+ If Ubound(sLocaleList()) &gt; 0 Then
+ aLocLocale.Country = sLocaleList(1)
+ End If
+ GetStarOfficeLocale() = aLocLocale
+End Function
+
+
+Function GetRegistryKeyContent(sKeyName as string, Optional bforUpdate as Boolean)
+Dim oConfigProvider as Object
+Dim aNodePath(0) as new com.sun.star.beans.PropertyValue
+ oConfigProvider = createUnoService(&quot;com.sun.star.configuration.ConfigurationProvider&quot;)
+ aNodePath(0).Name = &quot;nodepath&quot;
+ aNodePath(0).Value = sKeyName
+ If IsMissing(bForUpdate) Then
+ GetRegistryKeyContent() = oConfigProvider.createInstanceWithArguments(&quot;com.sun.star.configuration.ConfigurationAccess&quot;, aNodePath())
+ Else
+ If bForUpdate Then
+ GetRegistryKeyContent() = oConfigProvider.createInstanceWithArguments(&quot;com.sun.star.configuration.ConfigurationUpdateAccess&quot;, aNodePath())
+ Else
+ GetRegistryKeyContent() = oConfigProvider.createInstanceWithArguments(&quot;com.sun.star.configuration.ConfigurationAccess&quot;, aNodePath())
+ End If
+ End If
+End Function
+
+
+Function GetProductname() as String
+Dim oProdNameAccess as Object
+Dim sVersion as String
+Dim sProdName as String
+ oProdNameAccess = GetRegistryKeyContent(&quot;org.openoffice.Setup/Product&quot;)
+ sProdName = oProdNameAccess.getByName(&quot;ooName&quot;)
+ sVersion = oProdNameAccess.getByName(&quot;ooSetupVersion&quot;)
+ GetProductName = sProdName &amp; sVersion
+End Function
+
+
+&apos; Opens a Document, checks beforehand, wether it has to be loaded
+&apos; or wether it is already on the desktop.
+&apos; If the parameter bDisposable is set to False then then returned document
+&apos; should not be disposed afterwards, because it is already opened.
+Function OpenDocument(DocPath as String, Args(), Optional bDisposable as Boolean)
+Dim oComponents as Object
+Dim oComponent as Object
+ &apos; Search if one of the active Components ist the one that you search for
+ oComponents = StarDesktop.Components.CreateEnumeration
+ While oComponents.HasmoreElements
+ oComponent = oComponents.NextElement
+ If hasUnoInterfaces(oComponent,&quot;com.sun.star.frame.XModel&quot;) then
+ If UCase(oComponent.URL) = UCase(DocPath) then
+ OpenDocument() = oComponent
+ If Not IsMissing(bDisposable) Then
+ bDisposable = False
+ End If
+ Exit Function
+ End If
+ End If
+ Wend
+ If Not IsMissing(bDisposable) Then
+ bDisposable = True
+ End If
+ OpenDocument() = StarDesktop.LoadComponentFromURL(DocPath,&quot;_default&quot;,0,Args())
+End Function
+
+
+Function TaskonDesktop(DocPath as String) as Boolean
+Dim oComponents as Object
+Dim oComponent as Object
+ &apos; Search if one of the active Components ist the one that you search for
+ oComponents = StarDesktop.Components.CreateEnumeration
+ While oComponents.HasmoreElements
+ oComponent = oComponents.NextElement
+ If hasUnoInterfaces(oComponent,&quot;com.sun.star.frame.XModel&quot;) then
+ If UCase(oComponent.URL) = UCase(DocPath) then
+ TaskonDesktop = True
+ Exit Function
+ End If
+ End If
+ Wend
+ TaskonDesktop = False
+End Function
+
+
+&apos; Retrieves a FileName out of a StarOffice-Document
+Function RetrieveFileName(LocDoc as Object)
+Dim LocURL as String
+Dim LocURLArray() as String
+Dim MaxArrIndex as integer
+
+ LocURL = LocDoc.Url
+ LocURLArray() = ArrayoutofString(LocURL,&quot;/&quot;,MaxArrIndex)
+ RetrieveFileName = LocURLArray(MaxArrIndex)
+End Function
+
+
+&apos; Gets a special configured PathSetting
+Function GetPathSettings(sPathType as String, Optional bshowall as Boolean, Optional ListIndex as integer) as String
+Dim oSettings, oPathSettings as Object
+Dim sPath as String
+Dim PathList() as String
+Dim MaxIndex as Integer
+Dim oPS as Object
+
+ oPS = createUnoService(&quot;com.sun.star.util.PathSettings&quot;)
+
+ If Not IsMissing(bShowall) Then
+ If bShowAll Then
+ ShowPropertyValues(oPS)
+ Exit Function
+ End If
+ End If
+ sPath = oPS.getPropertyValue(sPathType)
+ If Not IsMissing(ListIndex) Then
+ &apos; Share and User-Directory
+ If Instr(1,sPath,&quot;;&quot;) &lt;&gt; 0 Then
+ PathList = ArrayoutofString(sPath,&quot;;&quot;, MaxIndex)
+ If ListIndex &lt;= MaxIndex Then
+ sPath = PathList(ListIndex)
+ Else
+ Msgbox(&quot;String Cannot be analyzed!&quot; &amp; sPath , 16, GetProductName())
+ End If
+ End If
+ End If
+ If Instr(1, sPath, &quot;;&quot;) = 0 Then
+ GetPathSettings = ConvertToUrl(sPath)
+ Else
+ GetPathSettings = sPath
+ End If
+
+End Function
+
+
+
+&apos; Gets the fully qualified path to a subdirectory of the
+&apos; Template Directory, e. g. with the parameter &quot;wizard/bitmap&quot;
+&apos; The parameter must be passed over in Url-scription
+&apos; The return-Value is in Urlscription
+Function GetOfficeSubPath(sOfficePath as String, ByVal sSubDir as String)
+Dim sOfficeString as String
+Dim sOfficeList() as String
+Dim sOfficeDir as String
+Dim sBigDir as String
+Dim i as Integer
+Dim MaxIndex as Integer
+Dim oUcb as Object
+ oUcb = createUnoService(&quot;com.sun.star.ucb.SimpleFileAccess&quot;)
+ sOfficeString = GetPathSettings(sOfficePath)
+ If Right(sSubDir,1) &lt;&gt; &quot;/&quot; Then
+ sSubDir = sSubDir &amp; &quot;/&quot;
+ End If
+ sOfficeList() = ArrayoutofString(sOfficeString,&quot;;&quot;, MaxIndex)
+ For i = 0 To MaxIndex
+ sOfficeDir = ConvertToUrl(sOfficeList(i))
+ If Right(sOfficeDir,1) &lt;&gt; &quot;/&quot; Then
+ sOfficeDir = sOfficeDir &amp; &quot;/&quot;
+ End If
+ sBigDir = sOfficeDir &amp; sSubDir
+ If oUcb.Exists(sBigDir) Then
+ GetOfficeSubPath() = sBigDir
+ Exit Function
+ End If
+ Next i
+ ShowNoOfficePathError()
+ GetOfficeSubPath = &quot;&quot;
+End Function
+
+
+Sub ShowNoOfficePathError()
+Dim ProductName as String
+Dim sError as String
+Dim bResObjectexists as Boolean
+Dim oLocResSrv as Object
+ bResObjectexists = not IsNull(oResSrv)
+ If bResObjectexists Then
+ oLocResSrv = oResSrv
+ End If
+ If InitResources(&quot;Tools&quot;, &quot;com&quot;) Then
+ ProductName = GetProductName()
+ sError = GetResText(1006)
+ sError = ReplaceString(sError, ProductName, &quot;%PRODUCTNAME&quot;)
+ sError = ReplaceString(sError, chr(13), &quot;&lt;BR&gt;&quot;)
+ MsgBox(sError, 16, ProductName)
+ End If
+ If bResObjectexists Then
+ oResSrv = oLocResSrv
+ End If
+
+End Sub
+
+
+Function InitResources(Description, ShortDescription as String) as boolean
+ On Error Goto ErrorOcurred
+ oResSrv = createUnoService( &quot;com.sun.star.resource.VclStringResourceLoader&quot; )
+ If (IsNull(oResSrv)) then
+ InitResources = FALSE
+ MsgBox( Description &amp; &quot;: No resource loader found&quot;, 16, GetProductName())
+ Else
+ InitResources = TRUE
+ oResSrv.FileName = ShortDescription
+ End If
+ Exit Function
+ErrorOcurred:
+ Dim nSolarVer
+ InitResources = FALSE
+ nSolarVer = GetSolarVersion()
+ MsgBox(&quot;Resource file missing (&quot; &amp; ShortDescription &amp; trim(str(nSolarVer)) + &quot;*.res)&quot;, 16, GetProductName())
+ Resume CLERROR
+ CLERROR:
+End Function
+
+
+Function GetResText( nID as integer ) As string
+ On Error Goto ErrorOcurred
+ If Not IsNull(oResSrv) Then
+ GetResText = oResSrv.getString( nID )
+ Else
+ GetResText = &quot;&quot;
+ End If
+ Exit Function
+ErrorOcurred:
+ GetResText = &quot;&quot;
+ MsgBox(&quot;Resource with ID =&quot; + str( nID ) + &quot; not found!&quot;, 16, GetProductName())
+ Resume CLERROR
+ CLERROR:
+End Function
+
+
+Function CutPathView(sDocUrl as String, Optional PathLen as Integer)
+Dim sViewPath as String
+Dim FileName as String
+Dim iFileLen as Integer
+ sViewPath = ConvertfromURL(sDocURL)
+ iViewPathLen = Len(sViewPath)
+ If iViewPathLen &gt; 60 Then
+ FileName = FileNameoutofPath(sViewPath, &quot;/&quot;)
+ iFileLen = Len(FileName)
+ If iFileLen &lt; 44 Then
+ sViewPath = Left(sViewPath,57-iFileLen-10) &amp; &quot;...&quot; &amp; Right(sViewPath,iFileLen + 10)
+ Else
+ sViewPath = Left(sViewPath,27) &amp; &quot; ... &quot; &amp; Right(sViewPath,28)
+ End If
+ End If
+ CutPathView = sViewPath
+End Function
+
+
+&apos; Deletes the content of all cells that are softformatted according
+&apos; to the &apos;InputStyleName&apos;
+Sub DeleteInputCells(oSheet as Object, InputStyleName as String)
+Dim oRanges as Object
+Dim oRange as Object
+ oRanges = oSheet.CellFormatRanges.createEnumeration
+ While oRanges.hasMoreElements
+ oRange = oRanges.NextElement
+ If Instr(1,oRange.CellStyle, InputStyleName) &lt;&gt; 0 Then
+ Call ReplaceRangeValues(oRange, &quot;&quot;)
+ End If
+ Wend
+End Sub
+
+
+&apos; Inserts a certain String to all cells of a Range that ist passed over
+&apos; either as an object or as the RangeName
+Sub ChangeValueofRange(oSheet as Object, Range, ReplaceValue, Optional StyleName as String)
+Dim oCellRange as Object
+ If Vartype(Range) = 8 Then
+ &apos; Get the Range out of the Rangename
+ oCellRange = oSheet.GetCellRangeByName(Range)
+ Else
+ &apos; The range is passed over as an object
+ Set oCellRange = Range
+ End If
+ If IsMissing(StyleName) Then
+ ReplaceRangeValues(oCellRange, ReplaceValue)
+ Else
+ If Instr(1,oCellRange.CellStyle,StyleName) Then
+ ReplaceRangeValues(oCellRange, ReplaceValue)
+ End If
+ End If
+End Sub
+
+
+Sub ReplaceRangeValues(oRange as Object, ReplaceValue)
+Dim oRangeAddress as Object
+Dim ColCount as Integer
+Dim RowCount as Integer
+Dim i as Integer
+ oRangeAddress = oRange.RangeAddress
+ ColCount = oRangeAddress.EndColumn - oRangeAddress.StartColumn
+ RowCount = oRangeAddress.EndRow - oRangeAddress.StartRow
+ Dim FillArray(RowCount) as Variant
+ Dim sLine(ColCount) as Variant
+ For i = 0 To ColCount
+ sLine(i) = ReplaceValue
+ Next i
+ For i = 0 To RowCount
+ FillArray(i) = sLine()
+ Next i
+ oRange.DataArray = FillArray()
+End Sub
+
+
+&apos; Returns the Value of the first cell of a Range
+Function GetValueofCellbyName(oSheet as Object, sCellName as String)
+Dim oCell as Object
+ oCell = GetCellByName(oSheet, sCellName)
+ GetValueofCellbyName = oCell.Value
+End Function
+
+
+Function DuplicateRow(oSheet as Object, RangeName as String)
+Dim oRange as Object
+Dim oCell as Object
+Dim oCellAddress as New com.sun.star.table.CellAddress
+Dim oRangeAddress as New com.sun.star.table.CellRangeAddress
+ oRange = oSheet.GetCellRangeByName(RangeName)
+ oRangeAddress = oRange.RangeAddress
+ oCell = oSheet.GetCellByPosition(oRangeAddress.StartColumn,oRangeAddress.StartRow)
+ oCellAddress = oCell.CellAddress
+ oSheet.Rows.InsertByIndex(oCellAddress.Row,1)
+ oRangeAddress = oRange.RangeAddress
+ oSheet.CopyRange(oCellAddress, oRangeAddress)
+ DuplicateRow = oRangeAddress.StartRow-1
+End Function
+
+
+&apos; Returns the String of the first cell of a Range
+Function GetStringofCellbyName(oSheet as Object, sCellName as String)
+Dim oCell as Object
+ oCell = GetCellByName(oSheet, sCellName)
+ GetStringofCellbyName = oCell.String
+End Function
+
+
+&apos; Returns a named Cell
+Function GetCellByName(oSheet as Object, sCellName as String) as Object
+Dim oCellRange as Object
+Dim oCellAddress as Object
+ oCellRange = oSheet.GetCellRangeByName(sCellName)
+ oCellAddress = oCellRange.RangeAddress
+ GetCellByName = oSheet.GetCellByPosition(oCellAddress.StartColumn,oCellAddress.StartRow)
+End Function
+
+
+&apos; Changes the numeric Value of a cell by transmitting the String of the numeric Value
+Sub ChangeCellValue(oCell as Object, ValueString as String)
+Dim CellValue
+ oCell.Formula = &quot;=Value(&quot; &amp; &quot;&quot;&quot;&quot; &amp; ValueString &amp; &quot;&quot;&quot;&quot; &amp; &quot;)&quot;
+ CellValue = oCell.Value
+ oCell.Formula = &quot;&quot;
+ oCell.Value = CellValue
+End Sub
+
+
+Function GetDocumentType(oDocument)
+ On Local Error GoTo NODOCUMENTTYPE
+&apos; ShowSupportedServiceNames(oDocument)
+ If oDocument.SupportsService(&quot;com.sun.star.sheet.SpreadsheetDocument&quot;) Then
+ GetDocumentType() = &quot;scalc&quot;
+ ElseIf oDocument.SupportsService(&quot;com.sun.star.text.TextDocument&quot;) Then
+ GetDocumentType() = &quot;swriter&quot;
+ ElseIf oDocument.SupportsService(&quot;com.sun.star.drawing.DrawingDocument&quot;) Then
+ GetDocumentType() = &quot;sdraw&quot;
+ ElseIf oDocument.SupportsService(&quot;com.sun.star.presentation.PresentationDocument&quot;) Then
+ GetDocumentType() = &quot;simpress&quot;
+ ElseIf oDocument.SupportsService(&quot;com.sun.star.formula.FormulaProperties&quot;) Then
+ GetDocumentType() = &quot;smath&quot;
+ End If
+ NODOCUMENTTYPE:
+ If Err &lt;&gt; 0 Then
+ GetDocumentType = &quot;&quot;
+ Resume GOON
+ GOON:
+ End If
+End Function
+
+
+Function GetNumberFormatType(oDocFormats, oFormatObject as Object) as Integer
+Dim ThisFormatKey as Long
+Dim oObjectFormat as Object
+ On Local Error Goto NOFORMAT
+ ThisFormatKey = oFormatObject.NumberFormat
+ oObjectFormat = oDocFormats.GetByKey(ThisFormatKey)
+ GetNumberFormatType = oObjectFormat.Type
+ NOFORMAT:
+ If Err &lt;&gt; 0 Then
+ Msgbox(&quot;Numberformat of Object is not available!&quot;, 16, GetProductName())
+ GetNumberFormatType = 0
+ GOTO NOERROR
+ End If
+ NOERROR:
+ On Local Error Goto 0
+End Function
+
+
+Sub ProtectSheets(Optional oSheets as Object)
+Dim i as Integer
+Dim oDocSheets as Object
+ If IsMissing(oSheets) Then
+ oDocSheets = StarDesktop.CurrentFrame.Controller.Model.Sheets
+ Else
+ Set oDocSheets = oSheets
+ End If
+
+ For i = 0 To oDocSheets.Count-1
+ oDocSheets(i).Protect(&quot;&quot;)
+ Next i
+End Sub
+
+
+Sub UnprotectSheets(Optional oSheets as Object)
+Dim i as Integer
+Dim oDocSheets as Object
+ If IsMissing(oSheets) Then
+ oDocSheets = StarDesktop.CurrentFrame.Controller.Model.Sheets
+ Else
+ Set oDocSheets = oSheets
+ End If
+
+ For i = 0 To oDocSheets.Count-1
+ oDocSheets(i).Unprotect(&quot;&quot;)
+ Next i
+End Sub
+
+
+Function GetRowIndex(oSheet as Object, RowName as String)
+Dim oRange as Object
+ oRange = oSheet.GetCellRangeByName(RowName)
+ GetRowIndex = oRange.RangeAddress.StartRow
+End Function
+
+
+Function GetColumnIndex(oSheet as Object, ColName as String)
+Dim oRange as Object
+ oRange = oSheet.GetCellRangeByName(ColName)
+ GetColumnIndex = oRange.RangeAddress.StartColumn
+End Function
+
+
+Function CopySheetbyName(oSheets as Object, OldName as String, NewName as String, DestPos as Integer) as Object
+Dim oSheet as Object
+Dim Count as Integer
+Dim BasicSheetName as String
+
+ BasicSheetName = NewName
+ &apos; Copy the last table. Assumption: The last table is the template
+ On Local Error Goto RENAMESHEET
+ oSheets.CopybyName(OldName, NewName, DestPos)
+
+RENAMESHEET:
+ oSheet = oSheets(DestPos)
+ If Err &lt;&gt; 0 Then
+ &apos; Test if renaming failed
+ Count = 2
+ Do While oSheet.Name &lt;&gt; NewName
+ NewName = BasicSheetName &amp; &quot;_&quot; &amp; Count
+ oSheet.Name = NewName
+ Count = Count + 1
+ Loop
+ Resume CL_ERROR
+CL_ERROR:
+ End If
+ CopySheetbyName = oSheet
+End Function
+
+
+&apos; Dis-or enables a Window and adjusts the mousepointer accordingly
+Sub ToggleWindow(bDoEnable as Boolean)
+Dim oWindow as Object
+ oWindow = StarDesktop.CurrentFrame.ComponentWindow
+ oWindow.Enable = bDoEnable
+End Sub
+
+
+Function CheckNewSheetname(oSheets as Object, Sheetname as String, Optional oLocale) as String
+Dim nStartFlags as Long
+Dim nContFlags as Long
+Dim oCharService as Object
+Dim iSheetNameLength as Integer
+Dim iResultPos as Integer
+Dim WrongChar as String
+Dim oResult as Object
+ nStartFlags = com.sun.star.i18n.KParseTokens.ANY_LETTER_OR_NUMBER + com.sun.star.i18n.KParseTokens.ASC_UNDERSCORE
+ nContFlags = nStartFlags
+ oCharService = CreateUnoService(&quot;com.sun.star.i18n.CharacterClassification&quot;)
+ iSheetNameLength = Len(SheetName)
+ If IsMissing(oLocale) Then
+ oLocale = ThisComponent.CharLocale
+ End If
+ Do
+ oResult =oCharService.parsePredefinedToken(com.sun.star.i18n.KParseType.IDENTNAME, SheetName, 0, oLocale, nStartFlags, &quot;&quot;, nContFlags, &quot; &quot;)
+ iResultPos = oResult.EndPos
+ If iResultPos &lt; iSheetNameLength Then
+ WrongChar = Mid(SheetName, iResultPos+1,1)
+ SheetName = ReplaceString(SheetName,&quot;_&quot;, WrongChar)
+ End If
+ Loop Until iResultPos = iSheetNameLength
+ CheckNewSheetname = SheetName
+End Function
+
+
+Sub AddNewSheetName(oSheets as Object, ByVal SheetName as String)
+Dim Count as Integer
+Dim bSheetIsThere as Boolean
+Dim iSheetNameLength as Integer
+ iSheetNameLength = Len(SheetName)
+ Count = 2
+ Do
+ bSheetIsThere = oSheets.HasByName(SheetName)
+ If bSheetIsThere Then
+ SheetName = Right(SheetName,iSheetNameLength) &amp; &quot;_&quot; &amp; Count
+ Count = Count + 1
+ End If
+ Loop Until Not bSheetIsThere
+ AddNewSheetname = SheetName
+End Sub
+
+
+Function GetSheetIndex(oSheets, sName) as Integer
+Dim i as Integer
+ For i = 0 To oSheets.Count-1
+ If oSheets(i).Name = sName Then
+ GetSheetIndex = i
+ exit Function
+ End If
+ Next i
+ GetSheetIndex = -1
+End Function
+
+
+Function GetLastUsedRow(oSheet as Object) as Integer
+Dim oCell As Object
+Dim oCursor As Object
+Dim aAddress As Variant
+ oCell = oSheet.GetCellbyPosition(0, 0)
+ oCursor = oSheet.createCursorByRange(oCell)
+ oCursor.GotoEndOfUsedArea(True)
+ aAddress = oCursor.RangeAddress
+ GetLastUsedRow = aAddress.EndRow
+End Function
+
+
+&apos; Note To set a one lined frame you have to set the inner width to 0
+&apos; In the API all Units that refer to pt-Heights are &quot;1/100mm&quot;
+&apos; The convert factor from 1pt to 1/100 mm is approximately 35
+Function ModifyBorderLineWidth(ByVal oStyleBorder, iInnerLineWidth as Integer, iOuterLineWidth as Integer)
+Dim aBorder as New com.sun.star.table.BorderLine
+ aBorder = oStyleBorder
+ aBorder.InnerLineWidth = iInnerLineWidth
+ aBorder.OuterLineWidth = iOuterLineWidth
+ ModifyBorderLineWidth = aBorder
+End Function
+
+
+Sub AttachBasicMacroToEvent(oDocument as Object, EventName as String, SubPath as String)
+Dim PropValue(1) as new com.sun.star.beans.PropertyValue
+ PropValue(0).Name = &quot;EventType&quot;
+ PropValue(0).Value = &quot;StarBasic&quot;
+ PropValue(1).Name = &quot;Script&quot;
+ PropValue(1).Value = &quot;macro:///&quot; &amp; SubPath
+ oDocument.Events.ReplaceByName(EventName, PropValue())
+End Sub
+
+
+
+Function ModifyPropertyValue(oContent() as New com.sun.star.beans.PropertyValue, TargetProperties() as New com.sun.star.beans.PropertyValue)
+Dim MaxIndex as Integer
+Dim i as Integer
+Dim a as Integer
+ MaxIndex = Ubound(oContent())
+ bDoReplace = False
+ For i = 0 To MaxIndex
+ a = GetPropertyValueIndex(oContent(i).Name, TargetProperties())
+ If a &lt;&gt; -1 Then
+ If Vartype(TargetProperties(a).Value) &lt;&gt; 9 Then
+ If TargetProperties(a).Value &lt;&gt; oContent(i).Value Then
+ oContent(i).Value = TargetProperties(a).Value
+ bDoReplace = True
+ End If
+ Else
+ If Not EqualUnoObjects(TargetProperties(a).Value, oContent(i).Value) Then
+ oContent(i).Value = TargetProperties(a).Value
+ bDoReplace = True
+ End If
+ End If
+ End If
+ Next i
+ ModifyPropertyValue() = bDoReplace
+End Function
+
+
+Function GetPropertyValueIndex(SearchName as String, TargetProperties() as New com.sun.star.beans.PropertyValue ) as Integer
+Dim i as Integer
+ For i = 0 To Ubound(TargetProperties())
+ If Searchname = TargetProperties(i).Name Then
+ GetPropertyValueIndex = i
+ Exit Function
+ End If
+ Next i
+ GetPropertyValueIndex() = -1
+End Function
+
+
+Sub DispatchSlot(SlotID as Integer)
+Dim oArg() as new com.sun.star.beans.PropertyValue
+Dim oUrl as new com.sun.star.util.URL
+Dim oTrans as Object
+Dim oDisp as Object
+ oTrans = createUNOService(&quot;com.sun.star.util.URLTransformer&quot;)
+ oUrl.Complete = &quot;slot:&quot; &amp; CStr(SlotID)
+ oTrans.parsestrict(oUrl)
+ oDisp = StarDesktop.ActiveFrame.queryDispatch(oUrl, &quot;_self&quot;, 0)
+ oDisp.dispatch(oUrl, oArg())
+End Sub
+
+
+&apos;returns the type of the office application
+&apos;FatOffice = 0, WebTop = 1
+&apos;This routine has to be changed if the Product Name is being changed!
+Function IsFatOffice() As Boolean
+ If sProductname = &quot;&quot; Then
+ sProductname = GetProductname()
+ End If
+ IsFatOffice = TRUE
+ &apos;The following line has to include the current productname
+ If Instr(1,sProductname,&quot;WebTop&quot;,1) &lt;&gt; 0 Then
+ IsFatOffice = FALSE
+ End If
+End Function
+
+
+Function GetLocale(sLanguage as String, sCountry as String)
+Dim oLocale as New com.sun.star.lang.Locale
+ oLocale.Language = sLanguage
+ oLocale.Country = sCountry
+ GetLocale = oLocale
+End Function
+
+
+Sub ToggleDesignMode(oDocument as Object)
+Dim aSwitchMode as new com.sun.star.util.URL
+ aSwitchMode.Complete = &quot;.uno:SwitchControlDesignMode&quot;
+ aTransformer = createUnoService(&quot;com.sun.star.util.URLTransformer&quot;)
+ aTransformer.parseStrict(aSwitchMode)
+ oFrame = oDocument.currentController.Frame
+ oDispatch = oFrame.queryDispatch(aSwitchMode, oFrame.Name, 63)
+ Dim aEmptyArgs() as New com.sun.star.bean.PropertyValue
+ oDispatch.dispatch(aSwitchMode, aEmptyArgs())
+ Erase aSwitchMode
+End Sub
+
+
+Function isHighContrast(oPeer as Object)
+ Dim UIColor as Long
+ Dim myRed as Integer
+ Dim myGreen as Integer
+ Dim myBlue as Integer
+ Dim myLuminance as Double
+
+ UIColor = oPeer.getProperty( &quot;DisplayBackgroundColor&quot; )
+ myRed = Red (UIColor)
+ myGreen = Green (UIColor)
+ myBlue = Blue (UIColor)
+ myLuminance = (( myBlue*28 + myGreen*151 + myRed*77 ) / 256 )
+ isHighContrast = false
+ If myLuminance &lt;= 25 Then isHighContrast = true
+End Function
+
+
+Function CreateNewDocument(sType as String, Optional sAddMsg as String) as Object
+Dim NoArgs() as new com.sun.star.beans.PropertyValue
+Dim oDocument as Object
+Dim sUrl as String
+Dim ErrMsg as String
+ On Local Error Goto NOMODULEINSTALLED
+ sUrl = &quot;private:factory/&quot; &amp; sType
+ oDocument = StarDesktop.LoadComponentFromURL(sUrl,&quot;_default&quot;,0, NoArgs())
+NOMODULEINSTALLED:
+ If (Err &lt;&gt; 0) OR IsNull(oDocument) Then
+ If InitResources(&quot;&quot;, &quot;com&quot;) Then
+ Select Case sType
+ Case &quot;swriter&quot;
+ ErrMsg = GetResText(1001)
+ Case &quot;scalc&quot;
+ ErrMsg = GetResText(1002)
+ Case &quot;simpress&quot;
+ ErrMsg = GetResText(1003)
+ Case &quot;sdraw&quot;
+ ErrMsg = GetResText(1004)
+ Case &quot;smath&quot;
+ ErrMsg = GetResText(1005)
+ Case Else
+ ErrMsg = &quot;Invalid Document Type!&quot;
+ End Select
+ ErrMsg = ReplaceString(ErrMsg, chr(13), &quot;&lt;BR&gt;&quot;)
+ If Not IsMissing(sAddMsg) Then
+ ErrMsg = ErrMsg &amp; chr(13) &amp; sAddMsg
+ End If
+ Msgbox(ErrMsg, 48, GetProductName())
+ End If
+ If Err &lt;&gt; 0 Then
+ Resume GOON
+ End If
+ End If
+GOON:
+ CreateNewDocument = oDocument
+End Function
+
+
+&apos; This Sub has been used in order to ensure that after disposing a document
+&apos; from the backing window it is returned to the backing window, so the
+&apos; office won&apos;t be closed
+Sub DisposeDocument(oDocument as Object)
+Dim dispatcher as Object
+Dim parser as Object
+Dim disp as Object
+Dim url as new com.sun.star.util.URL
+Dim NoArgs() as New com.sun.star.beans.PropertyValue
+Dim oFrame as Object
+ If Not IsNull(oDocument) Then
+ oDocument.setModified(false)
+ parser = createUnoService(&quot;com.sun.star.util.URLTransformer&quot;)
+ url.Complete = &quot;.uno:CloseDoc&quot;
+ parser.parseStrict(url)
+ oFrame = oDocument.CurrentController.Frame
+ disp = oFrame.queryDispatch(url,&quot;_self&quot;, com.sun.star.util.SearchFlags.NORM_WORD_ONLY)
+ disp.dispatch(url, NoArgs())
+ End If
+End Sub
+
+&apos;Function to calculate if the year is a leap year
+Function CalIsLeapYear(ByVal iYear as Integer) as Boolean
+ CalIsLeapYear = ((iYear Mod 4 = 0) And ((iYear Mod 100 &lt;&gt; 0) Or (iYear Mod 400 = 0)))
+End Function
+</script:module> \ No newline at end of file
diff --git a/wizards/source/tools/ModuleControls.xba b/wizards/source/tools/ModuleControls.xba
new file mode 100644
index 000000000000..dc5ef02a5b7f
--- /dev/null
+++ b/wizards/source/tools/ModuleControls.xba
@@ -0,0 +1,370 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="ModuleControls" script:language="StarBasic">Option Explicit
+
+Public DlgOverwrite as Object
+Public Const SBOVERWRITEUNDEFINED as Integer = 0
+Public Const SBOVERWRITECANCEL as Integer = 2
+Public Const SBOVERWRITEQUERY as Integer = 7
+Public Const SBOVERWRITEALWAYS as Integer = 6
+Public Const SBOVERWRITENEVER as Integer = 8
+Public iGeneralOverwrite as Integer
+
+
+
+&apos; Accepts the name of a control and returns the respective control model as object
+&apos; The Container can either be a whole document or a specific sheet of a Calc-Document
+&apos; &apos;CName&apos; is the name of the Control
+Function getControlModel(oContainer as Object, CName as String)
+Dim aForm, oForms as Object
+Dim i as Integer
+ oForms = oContainer.Drawpage.GetForms
+ For i = 0 To oForms.Count-1
+ aForm = oForms.GetbyIndex(i)
+ If aForm.HasByName(CName) Then
+ GetControlModel = aForm.GetbyName(CName)
+ Exit Function
+ End If
+ Next i
+ Msgbox(&quot;No Control with the name &apos;&quot; &amp; CName &amp; &quot;&apos; found&quot; , 16, GetProductName())
+End Function
+
+
+
+&apos; Gets the Shape of a Control( e. g. to reset the size or Position of the control
+&apos; Parameters:
+&apos; The &apos;oContainer&apos; is the Document or a specific sheet of a Calc - Document
+&apos; &apos;CName&apos; is the Name of the Control
+Function GetControlShape(oContainer as Object,CName as String)
+Dim i as integer
+Dim aShape as Object
+ For i = 0 to oContainer.DrawPage.Count-1
+ aShape = oContainer.DrawPage(i)
+ If HasUnoInterfaces(aShape, &quot;com.sun.star.drawing.XControlShape&quot;) then
+ If ashape.Control.Name = CName then
+ GetControlShape = aShape
+ exit Function
+ End If
+ End If
+ Next
+End Function
+
+
+&apos; Returns the View of a Control
+&apos; Parameters:
+&apos; The &apos;oContainer&apos; is the Document or a specific sheet of a Calc - Document
+&apos; The &apos;oController&apos; is always directly attached to the Document
+&apos; &apos;CName&apos; is the Name of the Control
+Function getControlView(oContainer , oController as Object, CName as String) as Object
+Dim aForm, oForms, oControlModel as Object
+Dim i as Integer
+ oForms = oContainer.DrawPage.Forms
+ For i = 0 To oForms.Count-1
+ aForm = oforms.GetbyIndex(i)
+ If aForm.HasByName(CName) Then
+ oControlModel = aForm.GetbyName(CName)
+ GetControlView = oController.GetControl(oControlModel)
+ Exit Function
+ End If
+ Next i
+ Msgbox(&quot;No Control with the name &apos;&quot; &amp; CName &amp; &quot;&apos; found&quot; , 16, GetProductName())
+End Function
+
+
+
+&apos; Parameters:
+&apos; The &apos;oContainer&apos; is the Document or a specific sheet of a Calc - Document
+&apos; &apos;CName&apos; is the Name of the Control
+Function DisposeControl(oContainer as Object, CName as String) as Boolean
+Dim aControl as Object
+
+ aControl = GetControlModel(oContainer,CName)
+ If not IsNull(aControl) Then
+ aControl.Dispose()
+ DisposeControl = True
+ Else
+ DisposeControl = False
+ End If
+End Function
+
+
+&apos; Returns a sequence of a group of controls like option buttons or checkboxes
+&apos; The &apos;oContainer&apos; is the Document or a specific sheet of a Calc - Document
+&apos; &apos;sGroupName&apos; is the Name of the Controlgroup
+Function GetControlGroupModel(oContainer as Object, sGroupName as String )
+Dim aForm, oForms As Object
+Dim aControlModel() As Object
+Dim i as integer
+
+ oForms = oContainer.DrawPage.Forms
+ For i = 0 To oForms.Count-1
+ aForm = oForms(i)
+ If aForm.HasbyName(sGroupName) Then
+ aForm.GetGroupbyName(sGroupName,aControlModel)
+ GetControlGroupModel = aControlModel
+ Exit Function
+ End If
+ Next i
+ Msgbox(&quot;No Controlgroup with the name &apos;&quot; &amp; sGroupName &amp; &quot;&apos; found&quot; , 16, GetProductName())
+End Function
+
+
+&apos; Returns the Referencevalue of a group of e.g. option buttons or check boxes
+&apos; &apos;oControlGroup&apos; is a sequence of the Control objects
+Function GetRefValue(oControlGroup() as Object)
+Dim i as Integer
+ For i = 0 To Ubound(oControlGroup())
+&apos; oControlGroup(i).DefaultState = oControlGroup(i).State
+ If oControlGroup(i).State Then
+ GetRefValue = oControlGroup(i).RefValue
+ exit Function
+ End If
+ Next
+ GetRefValue() = -1
+End Function
+
+
+Function GetRefValueOfControlGroup(oContainer as Object, GroupName as String)
+Dim oOptGroup() as Object
+Dim iRef as Integer
+ oOptGroup() = GetControlGroupModel(oContainer, GroupName)
+ iRef = GetRefValue(oOptGroup())
+ GetRefValueofControlGroup = iRef
+End Function
+
+
+Function GetOptionGroupValue(oContainer as Object, OptGroupName as String) as Boolean
+Dim oRulesOptions() as Object
+ oRulesOptions() = GetControlGroupModel(oContainer, OptGroupName)
+ GetOptionGroupValue = oRulesOptions(0).State
+End Function
+
+
+
+Function WriteOptValueToCell(oSheet as Object, OptGroupName as String, iCol as Integer, iRow as Integer) as Boolean
+Dim bOptValue as Boolean
+Dim oCell as Object
+ bOptValue = GetOptionGroupValue(oSheet, OptGroupName)
+ oCell = oSheet.GetCellByPosition(iCol, iRow)
+ oCell.SetValue(ABS(CInt(bOptValue)))
+ WriteOptValueToCell() = bOptValue
+End Function
+
+
+Function LoadDialog(Libname as String, DialogName as String, Optional oLibContainer)
+Dim oLib as Object
+Dim oLibDialog as Object
+Dim oRuntimeDialog as Object
+ If IsMissing(oLibContainer ) then
+ oLibContainer = DialogLibraries
+ End If
+ oLibContainer.LoadLibrary(LibName)
+ oLib = oLibContainer.GetByName(Libname)
+ oLibDialog = oLib.GetByName(DialogName)
+ oRuntimeDialog = CreateUnoDialog(oLibDialog)
+ LoadDialog() = oRuntimeDialog
+End Function
+
+
+Sub GetFolderName(oRefModel as Object)
+Dim oFolderDialog as Object
+Dim iAccept as Integer
+Dim sPath as String
+Dim InitPath as String
+Dim RefControlName as String
+Dim oUcb as object
+ &apos;Note: The following services have to be called in the following order
+ &apos; because otherwise Basic does not remove the FileDialog Service
+ oFolderDialog = CreateUnoService(&quot;com.sun.star.ui.dialogs.FolderPicker&quot;)
+ oUcb = createUnoService(&quot;com.sun.star.ucb.SimpleFileAccess&quot;)
+ InitPath = ConvertToUrl(oRefModel.Text)
+ If InitPath = &quot;&quot; Then
+ InitPath = GetPathSettings(&quot;Work&quot;)
+ End If
+ If oUcb.Exists(InitPath) Then
+ oFolderDialog.SetDisplayDirectory(InitPath)
+ End If
+ iAccept = oFolderDialog.Execute()
+ If iAccept = 1 Then
+ sPath = oFolderDialog.GetDirectory()
+ If oUcb.Exists(sPath) Then
+ oRefModel.Text = ConvertFromUrl(sPath)
+ End If
+ End If
+End Sub
+
+
+Sub GetFileName(oRefModel as Object, Filternames())
+Dim oFileDialog as Object
+Dim iAccept as Integer
+Dim sPath as String
+Dim InitPath as String
+Dim RefControlName as String
+Dim oUcb as object
+&apos;Dim ListAny(0)
+ &apos;Note: The following services have to be called in the following order
+ &apos; because otherwise Basic does not remove the FileDialog Service
+ oFileDialog = CreateUnoService(&quot;com.sun.star.ui.dialogs.FilePicker&quot;)
+ oUcb = createUnoService(&quot;com.sun.star.ucb.SimpleFileAccess&quot;)
+ &apos;ListAny(0) = com.sun.star.ui.dialogs.TemplateDescription.FILEOPEN_SIMPLE
+ &apos;oFileDialog.initialize(ListAny())
+ AddFiltersToDialog(FilterNames(), oFileDialog)
+ InitPath = ConvertToUrl(oRefModel.Text)
+ If InitPath = &quot;&quot; Then
+ InitPath = GetPathSettings(&quot;Work&quot;)
+ End If
+ If oUcb.Exists(InitPath) Then
+ oFileDialog.SetDisplayDirectory(InitPath)
+ End If
+ iAccept = oFileDialog.Execute()
+ If iAccept = 1 Then
+ sPath = oFileDialog.Files(0)
+ If oUcb.Exists(sPath) Then
+ oRefModel.Text = ConvertFromUrl(sPath)
+ End If
+ End If
+ oFileDialog.Dispose()
+End Sub
+
+
+Function StoreDocument(oDocument as Object, FilterNames() as String, DefaultName as String, DisplayDirectory as String, Optional iAddProcedure as Integer) as String
+Dim NoArgs() as New com.sun.star.beans.PropertyValue
+Dim oStoreProperties(0) as New com.sun.star.beans.PropertyValue
+Dim oStoreDialog as Object
+Dim iAccept as Integer
+Dim sPath as String
+Dim ListAny(0) as Long
+Dim UIFilterName as String
+Dim FilterName as String
+Dim FilterIndex as Integer
+ ListAny(0) = com.sun.star.ui.dialogs.TemplateDescription.FILESAVE_AUTOEXTENSION_PASSWORD
+ oStoreDialog = CreateUnoService(&quot;com.sun.star.ui.dialogs.FilePicker&quot;)
+ oStoreDialog.Initialize(ListAny())
+ AddFiltersToDialog(FilterNames(), oStoreDialog)
+ oStoreDialog.SetDisplayDirectory(DisplayDirectory)
+ oStoreDialog.SetDefaultName(DefaultName)
+ oStoreDialog.setValue(com.sun.star.ui.dialogs.ExtendedFilePickerElementIds.CHECKBOX_AUTOEXTENSION,0, true)
+
+ iAccept = oStoreDialog.Execute()
+ If iAccept = 1 Then
+ sPath = oStoreDialog.Files(0)
+ UIFilterName = oStoreDialog.GetCurrentFilter()
+ FilterIndex = IndexInArray(UIFilterName, FilterNames())
+ FilterName = FilterNames(FilterIndex,2)
+ If Not IsMissing(iAddProcedure) Then
+ Select Case iAddProcedure
+ Case 1
+ CommitLastDocumentChanges(sPath)
+ End Select
+ End If
+ On Local Error Goto NOSAVING
+ If FilterName = &quot;&quot; Then
+ &apos; Todo: Catch the case that a document that has to be overwritten is writeportected (e.g. it is open)
+ oDocument.StoreAsUrl(sPath, NoArgs())
+ Else
+ oStoreProperties(0).Name = &quot;FilterName&quot;
+ oStoreProperties(0).Value = FilterName
+ oDocument.StoreAsUrl(sPath, oStoreProperties())
+ End If
+ End If
+ oStoreDialog.dispose()
+ StoreDocument() = sPath
+ Exit Function
+NOSAVING:
+ If Err &lt;&gt; 0 Then
+&apos; Msgbox(&quot;Document cannot be saved under &apos;&quot; &amp; ConvertFromUrl(sPath) &amp; &quot;&apos;&quot;, 48, GetProductName())
+ sPath = &quot;&quot;
+ oStoreDialog.dispose()
+ Resume NOERROR
+ NOERROR:
+ End If
+End Function
+
+
+Sub AddFiltersToDialog(FilterNames() as String, oDialog as Object)
+Dim i as Integer
+Dim MaxIndex as Integer
+Dim ViewFiltername as String
+Dim oProdNameAccess as Object
+Dim sProdName as String
+ oProdNameAccess = GetRegistryKeyContent(&quot;org.openoffice.Setup/Product&quot;)
+ sProdName = oProdNameAccess.getByName(&quot;ooName&quot;)
+ MaxIndex = Ubound(FilterNames(), 1)
+ For i = 0 To MaxIndex
+ Filternames(i,0) = ReplaceString(Filternames(i,0), sProdName,&quot;%productname%&quot;)
+ oDialog.AppendFilter(FilterNames(i,0), FilterNames(i,1))
+ Next i
+ oDialog.SetCurrentFilter(FilterNames(0,0)
+End Sub
+
+
+Sub SwitchMousePointer(oWindowPeer as Object, bDoEnable as Boolean)
+Dim oWindowPointer as Object
+ oWindowPointer = CreateUnoService(&quot;com.sun.star.awt.Pointer&quot;)
+ If bDoEnable Then
+ oWindowPointer.SetType(com.sun.star.awt.SystemPointer.ARROW)
+ Else
+ oWindowPointer.SetType(com.sun.star.awt.SystemPointer.WAIT)
+ End If
+ oWindowPeer.SetPointer(oWindowPointer)
+End Sub
+
+
+Sub ShowOverwriteAllDialog(FilePath as String, sTitle as String)
+Dim QueryString as String
+Dim LocRetValue as Integer
+Dim lblYes as String
+Dim lblNo as String
+Dim lblYesToAll as String
+Dim lblCancel as String
+Dim OverwriteModel as Object
+ If InitResources(GetProductName(), &quot;dbw&quot;) Then
+ QueryString = GetResText(507)
+ QueryString = ReplaceString(QueryString, ConvertFromUrl(FilePath), &quot;&lt;PATH&gt;&quot;)
+ If Len(QueryString) &gt; 190 Then
+ QueryString = DeleteStr(QueryString, &quot;.&lt;BR&gt;&quot;)
+ End If
+ QueryString = ReplaceString(QueryString, chr(13), &quot;&lt;BR&gt;&quot;)
+ lblYes = GetResText(508)
+ lblYesToAll = GetResText(509)
+ lblNo = GetResText(510)
+ lblCancel = GetResText(511)
+ DlgOverwrite = LoadDialog(&quot;Tools&quot;, &quot;DlgOverwriteAll&quot;)
+ DlgOverwrite.Title = sTitle
+ OverwriteModel = DlgOverwrite.Model
+ OverwriteModel.cmdYes.Label = lblYes
+ OverwriteModel.cmdYesToAll.Label = lblYesToAll
+ OverwriteModel.cmdNo.Label = lblNo
+ OverwriteModel.cmdCancel.Label = lblCancel
+ OverwriteModel.lblQueryforSave.Label = QueryString
+ OverwriteModel.cmdNo.DefaultButton = True
+ DlgOverwrite.GetControl(&quot;cmdNo&quot;).SetFocus()
+ iGeneralOverwrite = 999
+ LocRetValue = DlgOverwrite.execute()
+ If iGeneralOverwrite = 999 Then
+ iGeneralOverwrite = SBOVERWRITECANCEL
+ End If
+ DlgOverwrite.dispose()
+ Else
+ iGeneralOverwrite = SBOVERWRITECANCEL
+ End If
+End Sub
+
+
+Sub SetOVERWRITEToQuery()
+ iGeneralOverwrite = SBOVERWRITEQUERY
+ DlgOverwrite.EndExecute()
+End Sub
+
+
+Sub SetOVERWRITEToAlways()
+ iGeneralOverwrite = SBOVERWRITEALWAYS
+ DlgOverwrite.EndExecute()
+End Sub
+
+
+Sub SetOVERWRITEToNever()
+ iGeneralOverwrite = SBOVERWRITENEVER
+ DlgOverwrite.EndExecute()
+End Sub
+</script:module> \ No newline at end of file
diff --git a/wizards/source/tools/Strings.xba b/wizards/source/tools/Strings.xba
new file mode 100644
index 000000000000..a2a8907e02f2
--- /dev/null
+++ b/wizards/source/tools/Strings.xba
@@ -0,0 +1,452 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Strings" script:language="StarBasic">Option Explicit
+Public sProductname as String
+
+
+&apos; Deletes out of a String &apos;BigString&apos; all possible PartStrings, that are summed up
+&apos; in the Array &apos;ElimArray&apos;
+Function ElimChar(ByVal BigString as String, ElimArray() as String)
+Dim i% ,n%
+ For i = 0 to Ubound(ElimArray)
+ BigString = DeleteStr(BigString,ElimArray(i)
+ Next
+ ElimChar = BigString
+End Function
+
+
+&apos; Deletes out of a String &apos;BigString&apos; a possible Partstring &apos;CompString&apos;
+Function DeleteStr(ByVal BigString,CompString as String) as String
+Dim i%, CompLen%, BigLen%
+ CompLen = Len(CompString)
+ i = 1
+ While i &lt;&gt; 0
+ i = Instr(i, BigString,CompString)
+ If i &lt;&gt; 0 then
+ BigLen = Len(BigString)
+ BigString = Mid(BigString,1,i-1) + Mid(BigString,i+CompLen,BigLen-i+1-CompLen)
+ End If
+ Wend
+ DeleteStr = BigString
+End Function
+
+
+&apos; Finds a PartString, that is framed by the Strings &apos;Prestring&apos; and &apos;PostString&apos;
+Function FindPartString(BigString, PreString, PostString as String, SearchPos as Integer) as String
+Dim StartPos%, EndPos%
+Dim BigLen%, PreLen%, PostLen%
+ StartPos = Instr(SearchPos,BigString,PreString)
+ If StartPos &lt;&gt; 0 Then
+ PreLen = Len(PreString)
+ EndPos = Instr(StartPos + PreLen,BigString,PostString)
+ If EndPos &lt;&gt; 0 Then
+ BigLen = Len(BigString)
+ PostLen = Len(PostString)
+ FindPartString = Mid(BigString,StartPos + PreLen, EndPos - (StartPos + PreLen))
+ SearchPos = EndPos + PostLen
+ Else
+ Msgbox(&quot;No final tag for &apos;&quot; &amp; PreString &amp; &quot;&apos; existing&quot;, 16, GetProductName())
+ FindPartString = &quot;&quot;
+ End If
+ Else
+ FindPartString = &quot;&quot;
+ End If
+End Function
+
+
+&apos; Note iCompare = 0 (Binary comparison)
+&apos; iCompare = 1 (Text comparison)
+Function PartStringInArray(BigArray(), SearchString as String, iCompare as Integer) as Integer
+Dim MaxIndex as Integer
+Dim i as Integer
+ MaxIndex = Ubound(BigArray())
+ For i = 0 To MaxIndex
+ If Instr(1, BigArray(i), SearchString, iCompare) &lt;&gt; 0 Then
+ PartStringInArray() = i
+ Exit Function
+ End If
+ Next i
+ PartStringInArray() = -1
+End Function
+
+
+&apos; Deletes the String &apos;SmallString&apos; out of the String &apos;BigString&apos;
+&apos; in case SmallString&apos;s Position in BigString is right at the end
+Function RTrimStr(ByVal BigString, SmallString as String) as String
+Dim SmallLen as Integer
+Dim BigLen as Integer
+ SmallLen = Len(SmallString)
+ BigLen = Len(BigString)
+ If Instr(1,BigString, SmallString) &lt;&gt; 0 Then
+ If Mid(BigString,BigLen + 1 - SmallLen, SmallLen) = SmallString Then
+ RTrimStr = Mid(BigString,1,BigLen - SmallLen)
+ Else
+ RTrimStr = BigString
+ End If
+ Else
+ RTrimStr = BigString
+ End If
+End Function
+
+
+&apos; Deletes the Char &apos;CompChar&apos; out of the String &apos;BigString&apos;
+&apos; in case CompChar&apos;s Position in BigString is right at the beginning
+Function LTRimChar(ByVal BigString as String,CompChar as String) as String
+Dim BigLen as integer
+ BigLen = Len(BigString)
+ If BigLen &gt; 1 Then
+ If Left(BigString,1) = CompChar then
+ BigString = Mid(BigString,2,BigLen-1)
+ End If
+ ElseIf BigLen = 1 Then
+ BigString = &quot;&quot;
+ End If
+ LTrimChar = BigString
+End Function
+
+
+&apos; Retrieves an Array out of a String.
+&apos; The fields of the Array are separated by the parameter &apos;Separator&apos;, that is contained
+&apos; in the Array
+&apos; The Array MaxIndex delivers the highest Index of this Array
+Function ArrayOutOfString(BigString, Separator as String, Optional MaxIndex as Integer)
+Dim LocList() as String
+ LocList=Split(BigString,Separator)
+
+ If not isMissing(MaxIndex) then maxIndex=ubound(LocList())
+
+ ArrayOutOfString=LocList
+End Function
+
+
+&apos; Deletes all fieldvalues in one-dimensional Array
+Sub ClearArray(BigArray)
+Dim i as integer
+ For i = Lbound(BigArray()) to Ubound(BigArray())
+ BigArray(i) = &quot;&quot;
+ Next
+End Sub
+
+
+&apos; Deletes all fieldvalues in a multidimensional Array
+Sub ClearMultiDimArray(BigArray,DimCount as integer)
+Dim n%, m%
+ For n = Lbound(BigArray(),1) to Ubound(BigArray(),1)
+ For m = 0 to Dimcount - 1
+ BigArray(n,m) = &quot;&quot;
+ Next m
+ Next n
+End Sub
+
+
+&apos; Checks if a Field (LocField) is already defined in an Array
+&apos; Returns &apos;True&apos; or &apos;False&apos;
+Function FieldinArray(LocArray(), MaxIndex as integer, LocField as String) As Boolean
+Dim i as integer
+ For i = Lbound(LocArray()) to MaxIndex
+ If Ucase(LocArray(i)) = Ucase(LocField) Then
+ FieldInArray = True
+ Exit Function
+ End if
+ Next
+ FieldInArray = False
+End Function
+
+
+&apos; Checks if a Field (LocField) is already defined in an Array
+&apos; Returns &apos;True&apos; or &apos;False&apos;
+Function FieldinList(LocField, BigList()) As Boolean
+Dim i as integer
+ For i = Lbound(BigList()) to Ubound(BigList())
+ If LocField = BigList(i) Then
+ FieldInList = True
+ Exit Function
+ End if
+ Next
+ FieldInList = False
+End Function
+
+
+&apos; Retrieves the Index of the delivered String &apos;SearchString&apos; in
+&apos; the Array LocList()&apos;
+Function IndexinArray(SearchString as String, LocList()) as Integer
+Dim i as integer
+ For i = Lbound(LocList(),1) to Ubound(LocList(),1)
+ If Ucase(LocList(i,0)) = Ucase(SearchString) Then
+ IndexinArray = i
+ Exit Function
+ End if
+ Next
+ IndexinArray = -1
+End Function
+
+
+Sub MultiArrayInListbox(oDialog as Object, ListboxName as String, ValList(), iDim as Integer)
+Dim oListbox as Object
+Dim i as integer
+Dim a as Integer
+ a = 0
+ oListbox = oDialog.GetControl(ListboxName)
+ oListbox.RemoveItems(0, oListbox.GetItemCount)
+ For i = 0 to Ubound(ValList(), 1)
+ If ValList(i) &lt;&gt; &quot;&quot; Then
+ oListbox.AddItem(ValList(i, iDim-1), a)
+ a = a + 1
+ End If
+ Next
+End Sub
+
+
+&apos; Searches for a String in a two-dimensional Array by querying all Searchindexex of the second dimension
+&apos; and delivers the specific String of the ReturnIndex in the second dimension of the Searchlist()
+Function StringInMultiArray(SearchList(), SearchString as String, SearchIndex as Integer, ReturnIndex as Integer, Optional MaxIndex as Integer) as String
+Dim i as integer
+Dim CurFieldString as String
+ If IsMissing(MaxIndex) Then
+ MaxIndex = Ubound(SearchList(),1)
+ End If
+ For i = Lbound(SearchList()) to MaxIndex
+ CurFieldString = SearchList(i,SearchIndex)
+ If Ucase(CurFieldString) = Ucase(SearchString) Then
+ StringInMultiArray() = SearchList(i,ReturnIndex)
+ Exit Function
+ End if
+ Next
+ StringInMultiArray() = &quot;&quot;
+End Function
+
+
+&apos; Searches for a Value in multidimensial Array by querying all Searchindices of the passed dimension
+&apos; and delivers the Index where it is found.
+Function GetIndexInMultiArray(SearchList(), SearchValue, SearchIndex as Integer) as Integer
+Dim i as integer
+Dim MaxIndex as Integer
+Dim CurFieldValue
+ MaxIndex = Ubound(SearchList(),1)
+ For i = Lbound(SearchList()) to MaxIndex
+ CurFieldValue = SearchList(i,SearchIndex)
+ If CurFieldValue = SearchValue Then
+ GetIndexInMultiArray() = i
+ Exit Function
+ End if
+ Next
+ GetIndexInMultiArray() = -1
+End Function
+
+
+&apos; Searches for a Value in multidimensial Array by querying all Searchindices of the passed dimension
+&apos; and delivers the Index where the Searchvalue is found as a part string
+Function GetIndexForPartStringinMultiArray(SearchList(), SearchValue, SearchIndex as Integer) as Integer
+Dim i as integer
+Dim MaxIndex as Integer
+Dim CurFieldValue
+ MaxIndex = Ubound(SearchList(),1)
+ For i = Lbound(SearchList()) to MaxIndex
+ CurFieldValue = SearchList(i,SearchIndex)
+ If Instr(CurFieldValue, SearchValue) &gt; 0 Then
+ GetIndexForPartStringinMultiArray() = i
+ Exit Function
+ End if
+ Next
+ GetIndexForPartStringinMultiArray = -1
+End Function
+
+
+Function ArrayfromMultiArray(MultiArray as String, iDim as Integer)
+Dim MaxIndex as Integer
+Dim i as Integer
+ MaxIndex = Ubound(MultiArray())
+ Dim ResultArray(MaxIndex) as String
+ For i = 0 To MaxIndex
+ ResultArray(i) = MultiArray(i,iDim)
+ Next i
+ ArrayfromMultiArray() = ResultArray()
+End Function
+
+
+&apos; Replaces the string &quot;OldReplace&quot; through the String &quot;NewReplace&quot; in the String
+&apos; &apos;BigString&apos;
+Function ReplaceString(ByVal Bigstring, NewReplace, OldReplace as String) as String
+ ReplaceString=join(split(BigString,OldReplace),NewReplace)
+End Function
+
+
+&apos; Retrieves the second value for a next to &apos;SearchString&apos; in
+&apos; a two-dimensional string-Array
+Function FindSecondValue(SearchString as String, TwoDimList() as String ) as String
+Dim i as Integer
+ For i = 0 To Ubound(TwoDimList,1)
+ If Ucase(SearchString) = Ucase(TwoDimList(i,0)) Then
+ FindSecondValue = TwoDimList(i,1)
+ Exit For
+ End If
+ Next
+End Function
+
+
+&apos; raises a base to a certain power
+Function Power(Basis as Double, Exponent as Double) as Double
+ Power = Exp(Exponent*Log(Basis))
+End Function
+
+
+&apos; rounds a Real to a given Number of Decimals
+Function Round(BaseValue as Double, Decimals as Integer) as Double
+Dim Multiplicator as Long
+Dim DblValue#, RoundValue#
+ Multiplicator = Power(10,Decimals)
+ RoundValue = Int(BaseValue * Multiplicator)
+ Round = RoundValue/Multiplicator
+End Function
+
+
+&apos;Retrieves the mere filename out of a whole path
+Function FileNameoutofPath(ByVal Path as String, Optional Separator as String) as String
+Dim i as Integer
+Dim SepList() as String
+ If IsMissing(Separator) Then
+ Path = ConvertFromUrl(Path)
+ Separator = GetPathSeparator()
+ End If
+ SepList() = ArrayoutofString(Path, Separator,i)
+ FileNameoutofPath = SepList(i)
+End Function
+
+
+Function GetFileNameExtension(ByVal FileName as String)
+Dim MaxIndex as Integer
+Dim SepList() as String
+ SepList() = ArrayoutofString(FileName,&quot;.&quot;, MaxIndex)
+ GetFileNameExtension = SepList(MaxIndex)
+End Function
+
+
+Function GetFileNameWithoutExtension(ByVal FileName as String, Optional Separator as String)
+Dim MaxIndex as Integer
+Dim SepList() as String
+ If not IsMissing(Separator) Then
+ FileName = FileNameoutofPath(FileName, Separator)
+ End If
+ SepList() = ArrayoutofString(FileName,&quot;.&quot;, MaxIndex)
+ GetFileNameWithoutExtension = RTrimStr(FileName, &quot;.&quot; &amp; SepList(MaxIndex)
+End Function
+
+
+Function DirectoryNameoutofPath(sPath as String, Separator as String) as String
+Dim LocFileName as String
+ LocFileName = FileNameoutofPath(sPath, Separator)
+ DirectoryNameoutofPath = RTrimStr(sPath, Separator &amp; LocFileName)
+End Function
+
+
+Function CountCharsinString(BigString, LocChar as String, ByVal StartPos as Integer) as Integer
+Dim LocCount%, LocPos%
+ LocCount = 0
+ Do
+ LocPos = Instr(StartPos,BigString,LocChar)
+ If LocPos &lt;&gt; 0 Then
+ LocCount = LocCount + 1
+ StartPos = LocPos+1
+ End If
+ Loop until LocPos = 0
+ CountCharsInString = LocCount
+End Function
+
+
+Function BubbleSortList(ByVal SortList(),optional sort2ndValue as Boolean)
+&apos;This function bubble sorts an array of maximum 2 dimensions.
+&apos;The default sorting order is the first dimension
+&apos;Only if sort2ndValue is True the second dimension is the relevant for the sorting order
+ Dim s as Integer
+ Dim t as Integer
+ Dim i as Integer
+ Dim k as Integer
+ Dim dimensions as Integer
+ Dim sortvalue as Integer
+ Dim DisplayDummy
+ dimensions = 2
+
+On Local Error Goto No2ndDim
+ k = Ubound(SortList(),2)
+ No2ndDim:
+ If Err &lt;&gt; 0 Then dimensions = 1
+
+ i = Ubound(SortList(),1)
+ If ismissing(sort2ndValue) then
+ sortvalue = 0
+ else
+ sortvalue = 1
+ end if
+
+ For s = 1 to i - 1
+ For t = 0 to i-s
+ Select Case dimensions
+ Case 1
+ If SortList(t) &gt; SortList(t+1) Then
+ DisplayDummy = SortList(t)
+ SortList(t) = SortList(t+1)
+ SortList(t+1) = DisplayDummy
+ End If
+ Case 2
+ If SortList(t,sortvalue) &gt; SortList(t+1,sortvalue) Then
+ For k = 0 to UBound(SortList(),2)
+ DisplayDummy = SortList(t,k)
+ SortList(t,k) = SortList(t+1,k)
+ SortList(t+1,k) = DisplayDummy
+ Next k
+ End If
+ End Select
+ Next t
+ Next s
+ BubbleSortList = SortList()
+End Function
+
+
+Function GetValueoutofList(SearchValue, BigList(), iDim as Integer, Optional ValueIndex)
+Dim i as Integer
+Dim MaxIndex as Integer
+ MaxIndex = Ubound(BigList(),1)
+ For i = 0 To MaxIndex
+ If BigList(i,0) = SearchValue Then
+ If Not IsMissing(ValueIndex) Then
+ ValueIndex = i
+ End If
+ GetValueOutOfList() = BigList(i,iDim)
+ End If
+ Next i
+End Function
+
+
+Function AddListtoList(ByVal FirstArray(), ByVal SecondArray(), Optional StartIndex)
+Dim n as Integer
+Dim m as Integer
+Dim MaxIndex as Integer
+ MaxIndex = Ubound(FirstArray()) + Ubound(SecondArray()) + 1
+ If MaxIndex &gt; -1 Then
+ Dim ResultArray(MaxIndex)
+ For m = 0 To Ubound(FirstArray())
+ ResultArray(m) = FirstArray(m)
+ Next m
+ For n = 0 To Ubound(SecondArray())
+ ResultArray(m) = SecondArray(n)
+ m = m + 1
+ Next n
+ AddListToList() = ResultArray()
+ Else
+ Dim NullArray()
+ AddListToList() = NullArray()
+ End If
+End Function
+
+
+Function CheckDouble(DoubleString as String)
+On Local Error Goto WRONGDATATYPE
+ CheckDouble() = CDbl(DoubleString)
+WRONGDATATYPE:
+ If Err &lt;&gt; 0 Then
+ CheckDouble() = 0
+ Resume NoErr:
+ End If
+NOERR:
+End Function
+</script:module> \ No newline at end of file
diff --git a/wizards/source/tools/UCB.xba b/wizards/source/tools/UCB.xba
new file mode 100644
index 000000000000..524afe60c4d9
--- /dev/null
+++ b/wizards/source/tools/UCB.xba
@@ -0,0 +1,294 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="UCB" script:language="StarBasic">&apos;Option explicit
+Public oDocument
+Public oDocInfo as object
+Const SBMAXDIRCOUNT = 10
+Dim CurDirMaxCount as Integer
+Dim sDirArray(SBMAXDIRCOUNT-1) as String
+Dim DirIndex As Integer
+Dim iDirCount as Integer
+Public bInterruptSearch as Boolean
+Public NoArgs()as New com.sun.star.beans.PropertyValue
+
+Sub Main()
+Dim LocsfileContent(0) as String
+ LocsfileContent(0) = &quot;*&quot;
+ ReadDirectories(&quot;file:///space&quot;, LocsfileContent(), True, False, false)
+End Sub
+
+&apos; ReadDirectories( sSourceDir, bRecursive, bCheckRealType, False, sFileContent(), sLocExtension)
+
+Function ReadDirectories(ByVal AnchorDir As String, bRecursive as Boolean, bcheckFileType as Boolean, bGetByTitle as Boolean, Optional sFileContent(), Optional sExtension as String)
+Dim i as integer
+Dim Status as Object
+Dim FileCountinDir as Integer
+Dim RealFileContent as String
+Dim FileName as string
+Dim oUcbObject as Object
+Dim DirContent()
+Dim CurIndex as Integer
+Dim MaxIndex as Integer
+Dim StartUbound as Integer
+Dim FileExtension as String
+ StartUbound = 5
+ MaxIndex = StartUBound
+ CurDirMaxCount = SBMAXDIRCOUNT
+Dim sFileArray(StartUbound,1) as String
+ On Local Error Goto FILESYSTEMPROBLEM:
+ CurIndex = -1
+ &apos; Todo: Is the last separator valid?
+ DirIndex = 0
+ sDirArray(iDirIndex) = AnchorDir
+ iDirCount = 1
+ oDocInfo = CreateUnoService(&quot;com.sun.star.document.DocumentProperties&quot;)
+ oUcbObject = createUnoService(&quot;com.sun.star.ucb.SimpleFileAccess&quot;)
+ If oUcbObject.Exists(AnchorDir) Then
+ Do
+ AnchorDir = sDirArray(DirIndex)
+ On Local Error Resume Next
+ DirContent() = oUcbObject.GetFolderContents(AnchorDir,True)
+ DirIndex = DirIndex + 1
+ On Local Error Goto 0
+ On Local Error Goto FILESYSTEMPROBLEM:
+ If Ubound(DirContent()) &lt;&gt; -1 Then
+ FileCountinDir = Ubound(DirContent())+ 1
+ For i = 0 to FilecountinDir -1
+ If bInterruptSearch = True Then
+ Exit Do
+ End If
+
+ Filename = DirContent(i)
+ If oUcbObject.IsFolder(FileName) Then
+ If brecursive Then
+ AddFoldertoList(FileName, DirIndex)
+ End If
+ Else
+ If bcheckFileType Then
+ RealFileContent = GetRealFileContent(FileName)
+ Else
+ RealFileContent = GetFileNameExtension(FileName)
+ End If
+ If RealFileContent &lt;&gt; &quot;&quot; Then
+ &apos; Retrieve the Index in the Array, where a Filename is positioned
+ If Not IsMissing(sFileContent()) Then
+ If (FieldinArray(sFileContent(), Ubound(sFileContent), RealFileContent)) Then
+ &apos; The extension of the current file passes the filter and is therefor admitted to the
+ &apos; fileList
+ If Not IsMissing(sExtension) Then
+ If sExtension &lt;&gt; &quot;&quot; Then
+ &apos; Consider that some Formats like old StarOffice Templates with the extension &quot;.vor&quot; can only be
+ &apos; precisely identified by their mimetype and their extension
+ FileExtension = GetFileNameExtension(FileName)
+ If FileExtension = sExtension Then
+ AddFileNameToList(sFileArray(), FileName, RealFileContent, bGetByTitle, CurIndex)
+ End If
+ Else
+ AddFileNameToList(sFileArray(), FileName, RealFileContent, bGetByTitle, CurIndex)
+ End If
+ Else
+ AddFileNameToList(sFileArray(), FileName, RealFileContent, bGetByTitle, CurIndex)
+ End If
+ End If
+ Else
+ AddFileNameToList(sFileArray(), FileName, RealFileContent, bGetByTitle, CurIndex)
+ End If
+ If CurIndex = MaxIndex Then
+ MaxIndex = MaxIndex + StartUbound
+ ReDim Preserve sFileArray(MaxIndex,1) as String
+ End If
+ End If
+ End If
+ Next i
+ End If
+ Loop Until DirIndex &gt;= iDirCount
+ If CurIndex &gt; -1 Then
+ ReDim Preserve sFileArray(CurIndex,1) as String
+ Else
+ ReDim sFileArray() as String
+ End If
+ Else
+ Msgbox(&quot;Directory &apos;&quot; &amp; ConvertFromUrl(AnchorDir) &amp; &quot;&apos; does not exist!&quot;, 16, GetProductName())
+ End If
+ ReadDirectories() = sFileArray()
+ Exit Function
+
+ FILESYSTEMPROBLEM:
+ Msgbox(&quot;Sorry, Filesystem Problem&quot;)
+ ReadDirectories() = sFileArray()
+ Resume LEAVEPROC
+ LEAVEPROC:
+End Function
+
+
+Sub AddFoldertoList(sDirURL as String, iDirIndex)
+ iDirCount = iDirCount + 1
+ If iDirCount = CurDirMaxCount Then
+ CurDirMaxCount = CurDirMaxCount + SBMAXDIRCOUNT
+ ReDim Preserve sDirArray(CurDirMaxCount) as String
+ End If
+ sDirArray(iDirCount-1) = sDirURL
+End Sub
+
+
+Sub AddFileNameToList(sFileArray(), FileName as String, FileContent as String, bGetByTitle as Boolean, CurIndex)
+Dim FileCount As Integer
+ CurIndex = CurIndex + 1
+ sFileArray(CurIndex,0) = FileName
+ If bGetByTitle Then
+ sFileArray(CurIndex,1) = RetrieveDocTitle(oDocInfo, FileName)
+ &apos; Add the documenttitles to the Filearray
+ Else
+ sFileArray(CurIndex,1) = FileContent
+ End If
+End Sub
+
+
+Function RetrieveDocTitle(oDocProps as Object, sFileName as String) As String
+Dim sDocTitle as String
+ On Local Error Goto NOFILE
+ oDocProps.loadFromMedium(sFileName, NoArgs())
+ sDocTitle = oDocProps.Title
+ NOFILE:
+ If Err &lt;&gt; 0 Then
+ RetrieveDocTitle = &quot;&quot;
+ RESUME CLR_ERROR
+ End If
+ CLR_ERROR:
+ If sDocTitle = &quot;&quot; Then
+ sDocTitle = GetFileNameWithoutExtension(sFilename, &quot;/&quot;)
+ End If
+ RetrieveDocTitle = sDocTitle
+End Function
+
+
+&apos; Retrieves The Filecontent of a Document by extracting the content
+&apos; from the Header of the document
+Function GetRealFileContent(FileName as String) As String
+ On Local Error Goto NOFILE
+ oTypeDetect = createUnoService(&quot;com.sun.star.document.TypeDetection&quot;)
+ GetRealFileContent = oTypeDetect.queryTypeByURL(FileName)
+ NOFILE:
+ If Err &lt;&gt; 0 Then
+ GetRealFileContent = &quot;&quot;
+ resume CLR_ERROR
+ End If
+ CLR_ERROR:
+End Function
+
+
+Function CopyRecursively(SourceFilePath as String, SourceStemDir as String, TargetStemDir as String)
+Dim TargetDir as String
+Dim TargetFile as String
+
+ TargetFile= ReplaceString(SourceFilePath, TargetStemDir, SourceStemDir)
+ TargetFileName = FileNameoutofPath(TargetFile,&quot;/&quot;)
+ TargetDir = DeleteStr(TargetFile, TargetFileName)
+ CreateFolder(TargetDir)
+ CopyRecursively() = TargetFile
+End Function
+
+
+&apos; Opens a help url referenced by a Help ID that is retrieved from the calling button tag
+Sub ShowHelperDialog(aEvent)
+Dim oSystemNode as Object
+Dim sSystem as String
+Dim oLanguageNode as Object
+Dim sLocale as String
+Dim sLocaleList() as String
+Dim sLanguage as String
+Dim sHelpUrl as String
+Dim sDocType as String
+ HelpID = aEvent.Source.Model.Tag
+ oLocDocument = StarDesktop.ActiveFrame.Controller.Model
+ sDocType = GetDocumentType(oLocDocument)
+ oSystemNode = GetRegistryKeyContent(&quot;org.openoffice.Office.Common/Help&quot;)
+ sSystem = oSystemNode.GetByName(&quot;System&quot;)
+ oLanguageNode = GetRegistryKeyContent(&quot;org.openoffice.Setup/L10N/&quot;)
+ sLocale = oLanguageNode.getByName(&quot;ooLocale&quot;)
+ sLocaleList() = ArrayoutofString(sLocale, &quot;-&quot;)
+ sLanguage = sLocaleList(0)
+ sHelpUrl = &quot;vnd.sun.star.help://&quot; &amp; sDocType &amp; &quot;/&quot; &amp; HelpID &amp; &quot;?Language=&quot; &amp; sLanguage &amp; &quot;&amp;System=&quot; &amp; sSystem
+ StarDesktop.LoadComponentfromUrl(sHelpUrl, &quot;OFFICE_HELP&quot;, 63, NoArgs())
+End Sub
+
+
+Sub SaveDataToFile(FilePath as String, DataList())
+Dim FileChannel as Integer
+Dim i as Integer
+Dim oFile as Object
+Dim oOutputStream as Object
+Dim oStreamString as Object
+Dim oUcb as Object
+Dim sCRLF as String
+
+ sCRLF = CHR(13) &amp; CHR(10)
+ oUcb = createUnoService(&quot;com.sun.star.ucb.SimpleFileAccess&quot;)
+ oOutputStream = createUnoService(&quot;com.sun.star.io.TextOutputStream&quot;)
+ If oUcb.Exists(FilePath) Then
+ oUcb.Kill(FilePath)
+ End If
+ oFile = oUcb.OpenFileReadWrite(FilePath)
+ oOutputStream.SetOutputStream(oFile.GetOutputStream)
+ For i = 0 To Ubound(DataList())
+ oOutputStream.WriteString(DataList(i) &amp; sCRLF)
+ Next i
+ oOutputStream.CloseOutput()
+End Sub
+
+
+Function LoadDataFromFile(FilePath as String, DataList()) as Boolean
+Dim oInputStream as Object
+Dim i as Integer
+Dim oUcb as Object
+Dim oFile as Object
+Dim MaxIndex as Integer
+ oUcb = createUnoService(&quot;com.sun.star.ucb.SimpleFileAccess&quot;)
+ If oUcb.Exists(FilePath) Then
+ MaxIndex = 10
+ oInputStream = createUnoService(&quot;com.sun.star.io.TextInputStream&quot;)
+ oFile = oUcb.OpenFileReadWrite(FilePath)
+ oInputStream.SetInputStream(oFile.GetInputStream)
+ i = -1
+ Redim Preserve DataList(MaxIndex)
+ While Not oInputStream.IsEOF
+ i = i + 1
+ If i &gt; MaxIndex Then
+ MaxIndex = MaxIndex + 10
+ Redim Preserve DataList(MaxIndex)
+ End If
+ DataList(i) = oInputStream.ReadLine
+ Wend
+ If i &gt; -1 And i &lt;&gt; MaxIndex Then
+ Redim Preserve DataList(i)
+ End If
+ LoadDataFromFile() = True
+ oInputStream.CloseInput()
+ Else
+ LoadDataFromFile() = False
+ End If
+End Function
+
+
+Function CreateFolder(sNewFolder) as Boolean
+Dim oUcb as Object
+ oUcb = createUnoService(&quot;com.sun.star.ucb.SimpleFileAccess&quot;)
+ On Local Error Goto NOSPACEONDRIVE
+ If Not oUcb.Exists(sNewFolder) Then
+ oUcb.CreateFolder(sNewFolder)
+ End If
+ CreateFolder = True
+NOSPACEONDRIVE:
+ If Err &lt;&gt; 0 Then
+ If InitResources(&quot;&quot;, &quot;dbw&quot;) Then
+ ErrMsg = GetResText(500)
+ ErrMsg = ReplaceString(ErrMsg, chr(13), &quot;&lt;BR&gt;&quot;)
+ ErrMsg = ReplaceString(ErrMsg, sNewFolder, &quot;%1&quot;)
+ Msgbox(ErrMsg, 48, GetProductName())
+ End If
+ CreateFolder = False
+ Resume GOON
+ End If
+GOON:
+End Function
+</script:module>
diff --git a/wizards/source/tools/delzip b/wizards/source/tools/delzip
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/wizards/source/tools/delzip
diff --git a/wizards/source/tools/dialog.xlb b/wizards/source/tools/dialog.xlb
new file mode 100644
index 000000000000..dc8dfbda2701
--- /dev/null
+++ b/wizards/source/tools/dialog.xlb
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="Tools" library:readonly="true" library:passwordprotected="false">
+ <library:element library:name="DlgOverwriteAll"/>
+</library:library>
diff --git a/wizards/source/tools/makefile.mk b/wizards/source/tools/makefile.mk
new file mode 100644
index 000000000000..801db34b4c3f
--- /dev/null
+++ b/wizards/source/tools/makefile.mk
@@ -0,0 +1,45 @@
+#*************************************************************************
+#
+# 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.
+#
+#*************************************************************************
+PRJ=..$/..
+
+PRJNAME=wizards
+TARGET=tools
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+.INCLUDE : $(PRJ)$/util$/target.pmk
+
+# --- Files --------------------------------------------------------
+
+ZIP1TARGET = $(TOOLS_ALL_TARGET)
+ZIP1LIST = *.xdl *.xba *.xlb
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
+
diff --git a/wizards/source/tools/script.xlb b/wizards/source/tools/script.xlb
new file mode 100644
index 000000000000..fe4d74d60332
--- /dev/null
+++ b/wizards/source/tools/script.xlb
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="Tools" library:readonly="true" library:passwordprotected="false">
+ <library:element library:name="ModuleControls"/>
+ <library:element library:name="Strings"/>
+ <library:element library:name="Misc"/>
+ <library:element library:name="UCB"/>
+ <library:element library:name="Listbox"/>
+ <library:element library:name="Debug"/>
+</library:library> \ No newline at end of file
diff --git a/wizards/source/tutorials/Functions.xba b/wizards/source/tutorials/Functions.xba
new file mode 100644
index 000000000000..6524ec19338c
--- /dev/null
+++ b/wizards/source/tutorials/Functions.xba
@@ -0,0 +1,368 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Functions" script:language="StarBasic">REM ***** BASIC *****
+Dim DialogVisible As Boolean
+Dim TutorStep As Integer
+Dim TutorLastStep As Integer
+Dim myDialog As Object
+Dim myTutorial As Object
+Public TutorText() As String
+Dim documentTitle As String
+Dim exampleUse As Object
+Dim properties() As Object
+Dim docTYP As String
+&apos;public myWidth As Long
+Dim myHeight As Long
+Dim oTextField As Object
+Dim stepTitle As String
+Dim oOpenDialogFlag
+Dim imageStatus As String
+
+Sub LoadTutorialDialog(exampleToUse, documentTYP)
+ Init()
+ exampleUse = exampleToUse
+ TutorText() = exampleUse.LoadText()
+ properties() = exampleUse.GetProperties()
+ If properties(3).Value = &quot;True&quot; Then
+ Dim localisation(0) As new com.sun.star.beans.NamedValue
+ localisation(0).Name = &quot;Localisation&quot;
+ localisation(0).Value = properties()
+ myTutorial.execute(localisation())
+ Else
+ TutorStep = 0
+ TutorLastStep = 0
+ docTYP = documentTYP
+ InitAction()
+ ShowInfoMain()
+ DialogVisible = True
+ myDialog = LoadDialog(&quot;Tutorials&quot;,&quot;TutorialsDialog&quot;)
+
+ SetTutorialDocumentPosSize()
+
+ documentProps = ThisComponent.getDocumentProperties()
+ myDialog.Title = &quot;Tutorials - &quot; &amp; documentProps.Title
+ oTextField = myDialog.GetControl(&quot;myTextField&quot;)
+ oTextField.setVisible(False)
+
+ imageStatus = &quot;MIN&quot;
+ setMaxMinImage(imageStatus)
+
+ &apos;myWidth = myDialog.Size.Width
+ myHeight = myDialog.Size.Height
+
+ CheckForStepShowButtonStatus()
+ CheckForStepNextButtonStatus()
+ InitRoadMap()
+ SetVisibleTrue()
+ myDialog.model.myTextField.Label = stepTitle
+ myDialog.model.myText.Label = GetStepText()&apos;TutorText(TutorStep)
+
+
+ Do
+ wait 1000
+ Loop Until DialogVisible = False
+ If( oOpenDialogFlag = True) Then
+ Destroy()
+ TutorialOpen.TutorialOpenMain()
+ Else
+ Destroy()
+ End If
+ End If
+End Sub
+
+Sub setMaxMinImage(param As String)
+ On Local Error Goto NOIMAGE
+ oCommandButton = myDialog.GetControl(&quot;CommandButton&quot;)
+ templatePath = GetPathSettings(&quot;Template&quot;,false, 0)
+ Dim bitmapPath As String
+ iPos = InStr(templatePath,&quot;/&quot;)
+ If(iPos &gt; 0) Then
+ If(param = &quot;MAX&quot;) Then
+ bitmapPath = templatePath &amp; &quot;/wizard/bitmap/maximize.bmp&quot;
+ ElseIf(param = &quot;MIN&quot;) Then
+ bitmapPath = templatePath &amp; &quot;/wizard/bitmap/minimize.bmp&quot;
+ End If
+ Else
+ If(param = &quot;MAX&quot;) Then
+ bitmapPath = templatePath &amp; &quot;\wizard\bitmap\maximize.bmp&quot;
+ ElseIf(param = &quot;MIN&quot;) Then
+ bitmapPath = templatePath &amp; &quot;\wizard\bitmap\minimize.bmp&quot;
+ End If
+ End If
+ &apos;printdbgInfo oCommandButton.Model
+ oCommandButton.Model.ImageUrl = bitmapPath
+ Exit Sub
+ NOIMAGE:
+End Sub
+
+Sub SetTutorialDocumentPosSize()
+ activDesktopWindow = StarDesktop.activeFrame.ContainerWindow
+ If(activDesktopWindow.posSize.Height &lt; 550) Then
+ activDesktopWindow.setPosSize(0,0,0,550,8)
+ End If
+ If (activDesktopWindow.posSize.Width &lt; 750 ) Then
+ activDesktopWindow.setPosSize(0,0,750,0,4)
+ EndIf
+End Sub
+
+Sub InitRoadMap()
+ RoadMapMain(Functions, myDialog)
+ SetControlModelPosSize(0, 0, 85, 176)
+ SetControlModelText(&quot;Steps&quot;)
+
+ StepSize = Ubound(TutorText())
+ Dim ItemsArray(StepSize) as String
+ For i = 0 To StepSize
+ stepcontent = TutorText(i)
+ iPos = InStr(stepcontent,CHR(13))
+ ItemName = Left(stepcontent, iPos)
+ ItemsArray(i) = ItemName
+ Next i
+ InsertItemsLabels( ItemsArray())
+
+ For i = 1 To StepSize
+ SetItemEnabled( i, False)
+ Next i
+ SetItemEnabled( 0, True)
+End Sub
+
+Sub Destroy()
+ &apos;myDialog.dispose
+ wait 1000
+ ShowInfoDialog.DisposeIDialog()
+
+ &apos; HIER WIRD DAS DOCUMENT GESCHLOSSEN!!!!!!!! GPF
+ thisComponent.CurrentController.Frame.close(True)
+
+End Sub
+
+Sub Init
+ GlobalScope.BasicLibraries.LoadLibrary(&quot;Tools&quot;)
+ myTutorial = createUNOService(&quot;com.sun.star.wizards.tutorial.executer.CallTutorialFramework&quot;)
+ documentTitle = ThisComponent.getCurrentController.getFrame.Title
+End Sub
+
+Sub InitStep
+ udProps = ThisComponent.DocumentProperties.UserDefinedProperties
+ If udProps.PropertySetInfo.hasPropertyByName(&quot;CurrentStep&quot;) Then
+ TutorStep = udProps.CurrentStep
+ Else
+ udProps.addProperty(&quot;CurrentStep&quot;, 0, TutorStep)
+ End If
+End Sub
+
+Sub setStep
+ ThisComponent.DocumentProperties.UserDefinedProperties.CurrentStep = TutorStep
+End Sub
+
+Sub InitAction()
+ SetStepTitle()
+
+ Dim property(6) As new com.sun.star.beans.PropertyValue
+ property(0).Name = &quot;DocumentTYP&quot;
+ property(0).Value = docTYP
+ property(1).Name = &quot;MethodName&quot;
+ property(1).Value = &quot;setDelay&quot;
+ property(2).Name = &quot;Param&quot;
+ property(2).Value = 0 &apos;key insert speed (Millis)
+ property(3).Name = &quot;Param&quot;
+ property(3).Value = 4 &apos;mouse animate speed (Millis)
+ property(4).Name = &quot;Param&quot;
+ property(4).Value = 2000 &apos;after mouse animate sleep (Millis)
+ property(5).Name = &quot;Param&quot;
+ property(5).Value = 10 &apos;mouse scroll speed (Millis)
+ property(6).Name = &quot;Param&quot;
+ property(6).Value = -1 &apos;mouse speed (step)
+ myTutorial.setPropertyValues(property())
+End Sub
+
+Sub EndDialog
+ oOpenDialogFlag = False
+ If (myDialog.model.done.Label = &quot;Close&quot;) Then
+ TutorialCloseMain()
+ Else
+ DialogVisible = False
+ End If
+End Sub
+
+Sub NextStep
+ GotoStep(TutorStep + 1)
+End Sub
+
+Sub GotoStep(StepIndex)
+ If(StepIndex &lt;= Ubound(TutorText())) Then
+ TutorStep = StepIndex
+ If TutorStep &gt; TutorLastStep Then
+ TutorLastStep = TutorStep
+ End If
+ If(TutorStep = Ubound(TutorText())) Then
+ myDialog.model.next.enabled = False
+ myDialog.model.done.Label = &quot;Done&quot;
+ myDialog.model.show.Label = &quot;Tutorials&quot;
+ Else
+ myDialog.model.next.enabled = True
+ End If
+ SetStepTitle()
+ myDialog.model.myText.Label = GetStepText()
+ CheckForStepShowButtonStatus()
+ SetItemEnabled( TutorStep, True)
+ &apos;setStep()
+ End If
+End Sub
+
+Function GetStepText()
+ Dim tempText As String
+ tempText = TutorText(TutorStep)
+ iPos = InStr(tempText,CHR(13))
+ ResultString = Right(tempText, Len(tempText) - iPos - 1)
+ GetStepText() = ResultString
+End Function
+
+Sub ItemChange(CurrentItemID, SelectitemID)
+ GotoStep(SelectitemID)
+End Sub
+
+Sub SetDisableShowMeButton()
+ myDialog.model.show.enabled = False
+ TutorLastStep = TutorLastStep + 1
+End Sub
+
+Sub Minimize(aEvent)
+ ActionItemsTextField = myDialog.GetControl(&quot;ActionItemsLabel&quot;)
+ FixedLineVertikal = myDialog.GetControl(&quot;FixedLineVertikal&quot;)
+
+ If myDialog.Size.Height = 35 Then
+ myDialog.setPosSize(0,0,0,myHeight,8)
+ oTextField.setVisible(False)
+ ActionItemsTextField.setVisible(True)
+ FixedLineVertikal.setVisible(True)
+ RoadMap.SetVisibleRoadMap(True)
+ Else
+ myDialog.setPosSize(0,0,0,35,8)
+ rmSelectedIndex = RoadMap.GetSelectedIndex() + 1
+ gsTitle = GetStepTitle()
+ oTextField.setText(rmSelectedIndex &amp; &quot;. &quot; &amp; gsTitle)
+ oTextField.setVisible(True)
+ ActionItemsTextField.setVisible(False)
+ FixedLineVertikal.setVisible(False)
+ RoadMap.SetVisibleRoadMap(False)
+ End If
+ If(imageStatus = &quot;MAX&quot;) Then
+ imageStatus = &quot;MIN&quot;
+ ElseIf(imageStatus = &quot;MIN&quot;) Then
+ imageStatus = &quot;MAX&quot;
+ End If
+ setMaxMinImage(imageStatus)
+
+End Sub
+
+Sub SetStepTitle()
+ stepcontent = TutorText(TutorStep)
+ iPos = InStr(stepcontent,CHR(13))
+ stepTitle = Left(stepcontent, iPos)
+ SetStepTitle() = stepTitle
+End Sub
+
+Function GetStepTitle()
+ GetStepTitle() = stepTitle
+End Function
+
+Sub CheckForStepShowButtonStatus()
+ If ((exampleUse.ContainsStepAction() = True And TutorStep = TutorLastStep) Or myDialog.model.show.Label = &quot;Tutorials&quot;) Then
+ myDialog.model.show.enabled = True
+ Else
+ myDialog.model.show.enabled = False
+ End If
+End Sub
+
+Sub CheckForStepNextButtonStatus()
+ If(TutorStep = Ubound(TutorText())) Then
+ myDialog.model.next.enabled = False
+ myDialog.model.done.Label = &quot;Done&quot;
+ End If
+End Sub
+
+Sub Show(aEvent)
+ &apos;ShowInfoMain()
+ If( myDialog.model.show.Label = &quot;Tutorials&quot;) Then
+ oOpenDialogFlag = True
+ DialogVisible = False
+ Else
+ SetMousePosition(aEvent)
+ exampleUse.Action()
+ End If
+End Sub
+
+Sub SetMousePosition(aEvent)
+ MyPoints() = MousePoints(aEvent)
+
+ Dim mousePosition(3) as new com.sun.star.beans.PropertyValue
+ mousePosition(0).Name = &quot;DocumentTYP&quot;
+ mousePosition(0).Value = docTYP
+ mousePosition(1).Name = &quot;MethodName&quot;
+ mousePosition(1).Value = &quot;setMousePosition&quot;
+ mousePosition(2).Name = &quot;Param&quot;
+ mousePosition(2).Value = MyPoints(0)
+ mousePosition(3).Name = &quot;Param&quot;
+ mousePosition(3).Value = MyPoints(1)
+
+ myTutorial.setPropertyValues(mousePosition())
+End Sub
+
+Function MousePoints(aEvent)
+ Dim position(1) As Integer
+ position(0) = myDialog.getControl(&quot;show&quot;).AccessibleContext.LocationOnScreen.X + aEvent.Source.Model.PositionX
+ position(1) = myDialog.getControl(&quot;show&quot;).AccessibleContext.LocationOnScreen.Y + aEvent.Source.Model.PositionY
+ MousePoints = position()
+End Function
+
+Function CheckPath(path() As String)
+ &apos;documentTitle = ThisComponent.getCurrentController.getFrame.Title
+ sTitle = path(0)
+ ResultString = Right(sTitle, 3)
+ iPos = InStr(ResultString,&quot;#&quot;)
+ ResultString = Right(ResultString, Len(ResultString) - iPos)
+ ResultFrameString = InStr (sTitle, &quot;{D}FRAME#&quot;)
+ If ResultFrameString &lt;&gt; 0 Then
+ If Not (sTitle = (&quot;{D}FRAME#&quot; &amp; documentTitle &amp; &quot;#&quot; &amp; ResultString)) Then
+ &apos;path(0) = &quot;{D}FRAME#&quot; &amp; documentTitle &amp; &quot;#&quot; &amp; ResultString
+ path(0) = &quot;FRAME#&quot; &amp; documentTitle &amp; &quot;#&quot; &amp; ResultString
+ sTitle = path(1)
+ ResultString = Right(sTitle, 3)
+ iPos = InStr(ResultString,&quot;#&quot;)
+ ResultString = Right(ResultString, Len(ResultString) - iPos)
+ path(1) = &quot;ROOT_PANE#&quot; &amp; documentTitle &amp; &quot;#&quot; &amp; ResultString
+ Else
+ &apos;path(0) = &quot;{D}FRAME#&quot; &amp; documentTitle &amp; &quot;#&quot; &amp; ResultString
+ path(0) = &quot;FRAME#&quot; &amp; documentTitle &amp; &quot;#&quot; &amp; ResultString
+ End If
+ End If
+End Function
+
+Sub SetVisibleTutorialsDialog(param)
+ myDialog.setVisible(param)
+End Sub
+
+Sub SetVisibleTrue()
+ myDialog.setVisible(True)
+End Sub
+
+Sub SetVisibleFalse()
+ myDialog.setVisible(False)
+End Sub
+
+Sub ExitTutorial()
+ Dim aUrl As new com.sun.star.util.URL
+ oDoc = ThisComponent
+ urlTransformer = createUNOService(&quot;com.sun.star.util.URLTransformer&quot;)
+ aUrl.Complete = &quot;slot:5621&quot;
+ urlTransformer.parseStrict(aUrl)
+ xController = oDoc.getCurrentController()
+ xDispatcher = xController.queryDispatch(aUrl, &quot;&quot;, 0)
+ if NOT isNull(xDispatcher) then
+ xDispatcher.dispatch(aUrl, DimArray())
+ else
+ msgBox &quot;Error! Cannot close document.&quot;
+ End If
+End Sub
+</script:module>
diff --git a/wizards/source/tutorials/RoadMap.xba b/wizards/source/tutorials/RoadMap.xba
new file mode 100644
index 000000000000..fa992cb13b8c
--- /dev/null
+++ b/wizards/source/tutorials/RoadMap.xba
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="RoadMap" script:language="StarBasic">REM ***** BASIC *****
+Dim oControlModel
+Dim oDialogModel
+Dim CurrentItem
+Dim bLongString
+Dim oControl
+Dim oEvent
+Dim oUseDialog As Object
+Dim oModulName As Object
+
+Sub RoadMapMain(ModulNameforItemChange, dialogtoUse)
+ GlobalScope.BasicLibraries.LoadLibrary(&quot;Tools&quot;)
+ oUseDialog = dialogtoUse
+ oModulName = ModulNameforItemChange
+ oDialogModel = oUseDialog.Model
+ oControlModel = oUseDialog.Model.CreateInstance(&quot;com.sun.star.awt.UnoControlRoadmapModel&quot;)
+
+ oDialogModel.insertByName(&quot;RoadMap&quot;, oControlModel)
+ oControl = oUseDialog.getControl(&quot;RoadMap&quot;)
+ oEvent = createUnoListener( &quot;CallBack_&quot;, &quot;com.sun.star.awt.XItemListener&quot; )
+ oControl.addItemListener(oEvent)
+ oControlModel.CurrentItemID = 0
+ oControlModel.Complete = True
+ oControlModel.Activated = True
+End Sub
+
+Sub SetVisibleRoadMap(param)
+ oControl.SetVisible(param)
+End Sub
+
+Sub SetDialogModelSize(Width, Height)
+ oDialogModel.Width = Width
+ oDialogModel.Height = Height
+End Sub
+
+Sub SetControlModelPosSize(X, Y, Width, Height)
+ oControlModel.PositionX = X
+ oControlModel.PositionY = Y
+ oControlModel.Width = Width
+ oControlModel.Height = Height
+End Sub
+
+Sub SetControlModelText( ModelText As String)
+ oControlModel.Text = ModelText
+End Sub
+
+Sub InsertItemsLabels( ItemLabelsArray() As String)
+ For i = 0 To Ubound(ItemLabelsArray())
+ oRoadmapItem = oControlModel.createInstance()
+ oRoadmapItem.Label = ItemLabelsArray(i)
+ oRoadmapItem.ID = i
+ oControlModel.insertbyIndex(i, oRoadmapItem)
+ Next i
+End Sub
+
+Sub SetItemEnabled( ItemIndex, param)
+ oControlModel.getByIndex(ItemIndex).Enabled = param
+ oControlModel.CurrentItemID = ItemIndex
+End Sub
+
+Sub AddImagetoControlModel( Url As String)
+ oControlModel.ImageUrl = ConvertToUrl(Url)
+End Sub
+
+Function GetSelectedIndex()
+ GetSelectedIndex() = oControlModel.CurrentItemID
+End Function
+
+Function GetControlModel()
+ GetControlModel = oControlModel
+End Function
+
+Function GetDialogModel()
+ GetDialogModel = oDialogModel
+End Function
+
+Sub Callback_itemStateChanged(aEvent)
+ oModulName.ItemChange(oControlModel.CurrentItemID, aEvent.itemID)
+End Sub
+
+Sub SetComplete(param)
+ oControlModel.Complete = param
+End Sub
+
+Sub SetActivated(param)
+ oControlModel.Activated = param
+End Sub
+
+Sub RemoveItem(ItemIndex)
+ If ItemIndex &gt; -1 Then
+ oControlModel.removeByIndex(ItemIndex)
+ End If
+End Sub
+
+Sub InsertItem(ItemLabel As String)
+ oRoadmapItem = oControlModel.createInstance()
+ oRoadmapItem.Label = ItemLabel
+ oControlModel.insertbyIndex(oControlModel.CurrentItemID, oRoadmapItem)
+End Sub
+
+Sub ReplaceItem(ItemLabel As String)
+ oRoadmapItem = oControlModel.createInstance()
+ oRoadmapItem.Label = ItemLabel
+ oControlModel.replacebyIndex(oControlModel.CurrentItemID, oRoadmapItem)
+End Sub
+
+Sub Callback_disposing(aEvent)
+End Sub
+
+Sub Property_propertyChange(aEvent)
+End Sub
+
+Sub Property_disposing(aEvent)
+End Sub
+</script:module> \ No newline at end of file
diff --git a/wizards/source/tutorials/ShowInfoDialog.xba b/wizards/source/tutorials/ShowInfoDialog.xba
new file mode 100644
index 000000000000..4bb0f608d9b6
--- /dev/null
+++ b/wizards/source/tutorials/ShowInfoDialog.xba
@@ -0,0 +1,305 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="ShowInfoDialog" script:language="StarBasic">REM ***** BASIC *****
+Dim oWnd As Object
+Dim oWnd2 As Object
+Dim oWnd3 As Object
+Dim oDoc as Object
+
+Sub ShowInfoMain
+ prop() = GetShowInfoPropeties()
+ Init(prop(0).Value, prop(1).Value, prop(2).Value, prop(3).Value, prop(4).Value, prop(5).Value, prop(6).Value, prop(7).Value, prop(8).Value)
+End Sub
+
+Sub Init(tFieldText As String, windowX, windowY, windowWidth, windowHeight, tFieldX, tFieldY, tFieldWidth, tFieldHeight)
+ toolkit = createUnoService(&quot;com.sun.star.awt.Toolkit&quot;)
+ Dim oWndDescr As new com.sun.star.awt.WindowDescriptor
+ Dim oBounds As new com.sun.star.awt.Rectangle
+ oWndDescr.Type = com.sun.star.awt.WindowClass.TOP
+ oWndDescr.WindowServiceName = &quot;&quot;
+ oWndDescr.ParentIndex = 0
+
+ &apos;officeX = StarDesktop.ActiveFrame.getContainerWindow().AccessibleContext.LocationOnScreen.X
+ &apos;officeY = StarDesktop.ActiveFrame.getContainerWindow().AccessibleContext.LocationOnScreen.Y
+ &apos;officeWidth = StarDesktop.ActiveFrame.getContainerWindow().getPosSize().Width
+ &apos;officeHeight = StarDesktop.ActiveFrame.getContainerWindow().getPosSize().Height
+ officeWidth = thisComponent.CurrentController.Frame.getContainerWindow().getPosSize().Width
+ officeHeight = thisComponent.CurrentController.Frame.getContainerWindow().getPosSize().Height
+
+ &apos;dialogWidth = myTutoShowDialog.getPosSize().Width
+ &apos;dialogHeight = myTutoShowDialog.getPosSize().Height
+ X = officeWidth - windowWidth - windowX
+ Y = officeHeight - windowHeight - windowY
+
+ oBounds.X = X : oBounds.Y = Y
+ oBounds.Width = windowWidth : oBounds.Height = windowHeight
+ oWndDescr.Bounds = oBounds
+ oWndDescr.Parent = thisComponent.CurrentController.Frame.ContainerWindow
+ with com.sun.star.awt.WindowAttribute
+ oWndDescr.WindowAttributes = .CLOSEABLE AND .MOVEABLE AND .SIZEABLE AND .BORDER AND .SHOW
+ end with
+
+ oWnd = toolkit.createWindow(oWndDescr)
+
+ Dim oWndDescr3 As new com.sun.star.awt.WindowDescriptor
+ Dim oBounds3 As new com.sun.star.awt.Rectangle
+ oWndDescr3.Type = com.sun.star.awt.WindowClass.TOP
+ oWndDescr3.WindowServiceName = &quot;fixedimage&quot; &apos;&quot;fixedtext&quot;
+ oWndDescr3.ParentIndex = 0
+ oBounds3.X = 0 : oBounds3.Y = 0
+ oBounds3.Width = tFieldWidth : oBounds3.Height = tFieldHeight
+ oWndDescr3.Bounds = oBounds3
+ oWndDescr3.Parent = oWnd
+ with com.sun.star.awt.WindowAttribute
+ oWndDescr3.WindowAttributes = .CLOSEABLE AND .MOVEABLE AND .SIZEABLE AND .BORDER AND .SHOW
+ end with
+
+ oWnd3= toolkit.createWindow(oWndDescr3)
+ &apos;oWnd2.Text = tFieldText
+ &apos;printdbgInfo(oWnd3)
+ setImage(oWnd3)
+ &apos;oWnd3.Background = 16777215
+&apos; oWnd2.SetBackGround(16776960)
+ oWnd.SetBackGround(16776960)
+&apos; oWnd.FontDescriptors(0).Name = &quot;Albany&quot;
+&apos; oWnd.FontDescriptors(0).StyleName = &quot;BOLD&quot;
+
+ Dim oWndDescr2 As new com.sun.star.awt.WindowDescriptor
+ Dim oBounds2 As new com.sun.star.awt.Rectangle
+ oWndDescr2.Type = com.sun.star.awt.WindowClass.TOP
+ oWndDescr2.WindowServiceName = &quot;fixedtext&quot;
+ oWndDescr2.ParentIndex = 0
+ oBounds2.X = tFieldX : oBounds2.Y = tFieldY
+ oBounds2.Width = tFieldWidth : oBounds2.Height = tFieldHeight
+ oWndDescr2.Bounds = oBounds2
+ oWndDescr2.Parent = oWnd3
+ with com.sun.star.awt.WindowAttribute
+ oWndDescr2.WindowAttributes = .CLOSEABLE AND .MOVEABLE AND .SIZEABLE AND .BORDER AND .SHOW
+ end with
+
+ oWnd2= toolkit.createWindow(oWndDescr2)
+ oWnd2.Text = tFieldText
+ oWnd2.Background = 268435455
+ &apos;printdbgInfo(oWnd2)
+
+ &apos;printdbgInfo oWnd.getPosSize()
+
+End Sub
+
+Function GetShowInfoPropeties()
+ stepText = GetStepTitle()
+ Dim Properties(8) As new com.sun.star.beans.NamedValue
+ Properties(0).Name = &quot;ShowInfoDialogText&quot;
+ Properties(0).Value = stepText &amp; &quot;Press [Esc] to abort.&quot;
+ Properties(1).Name = &quot;WindowX&quot;
+ Properties(1).Value = 20
+ Properties(2).Name = &quot;WindowY&quot;
+ Properties(2).Value = 40
+ Properties(3).Name = &quot;WindowWidth&quot;
+ Properties(3).Value = 190
+ Properties(4).Name = &quot;WindowHeight&quot;
+ Properties(4).Value = 50
+ Properties(5).Name = &quot;TFieldX&quot;
+ Properties(5).Value = 7
+ Properties(6).Name = &quot;TFieldY&quot;
+ Properties(6).Value = 8
+ Properties(7).Name = &quot;TFieldWidth&quot;
+ Properties(7).Value = 190
+ Properties(8).Name = &quot;TFieldHeight&quot;
+ Properties(8).Value = 50
+ GetShowInfoPropeties = Properties()
+End Function
+
+Sub setShowInfoText()
+ stepText = GetStepTitle()
+ oWnd2.Text = stepText &amp; &quot;Press [Esc] to abort.&quot;
+End Sub
+
+Sub ShowON()
+ setShowInfoText()
+ oWnd.setVisible(True)
+ oWnd3.setVisible(True)
+ oWnd2.setVisible(True)
+End Sub
+
+Sub ShowOFF()
+ &apos;On Local Error Goto NOPROPERTYSETINFO:
+ oWnd.setVisible(False)
+ oWnd2.setVisible(False)
+ oWnd3.setVisible(False)
+ &apos;oDoc.dispose()
+ Exit Sub
+ &apos;NOPROPERTYSETINFO:
+End Sub
+
+Sub DisposeIDialog()
+ &apos;On Local Error Goto NOPROPERTYSETINFO:
+ oWnd3.dispose
+ oWnd2.dispose
+ oWnd.dispose
+ oDoc.dispose()
+ Exit Sub
+ &apos;NOPROPERTYSETINFO:
+End Sub
+
+sub setImage(whatever as Object)
+
+ templatePath = GetPathSettings(&quot;Template&quot;,false, 0)
+ Dim bitmapPath As String
+ iPos = InStr(templatePath,&quot;/&quot;)
+ if(iPos &gt; 0) Then
+ bitmapPath = templatePath &amp; &quot;/wizard/bitmap/tutorial_background.gif&quot;
+ Else
+ bitmapPath = templatePath &amp; &quot;\wizard\bitmap\tutorial_background.gif&quot;
+ End If
+
+ dim props(0) as new com.sun.star.beans.PropertyValue
+ props(0).Name = &quot;Hidden&quot;
+ props(0).Value = true
+ oDoc = StarDesktop.loadComponentFromUrl(&quot;private:factory/swriter&quot;,&quot;_blank&quot;,0,props())
+ oShape = addControlToDefaultForm(&quot;ImageButton&quot;, 1000, 1000, 2000, 1000)
+ imgControl = oShape.getControl()
+ &apos;imgControl.ImageUrl=&quot;file:///D:/Program%20Files/src680_m11_qwizards1_49_TEST/share/gallery/tutoItem.gif&quot;
+ imgControl.ImageUrl = bitmapPath
+ imgControl.addConsumer(whatever)
+ imgControl.startProduction()
+end sub
+
+Function createControlShape(cKind As String) As Object
+
+ Dim oControlShape As Object
+ Dim oControl As Object
+
+
+ oControlShape = oDoc.createInstance(&quot;com.sun.star.drawing.ControlShape&quot;)
+ oControl = oDoc.createInstance(&quot;com.sun.star.form.component.&quot; &amp; cKind)
+ oControl.setPropertyValue(&quot;DefaultControl&quot;, &quot;com.sun.star.form.control.&quot; &amp; cKind)
+ oControlShape.setControl(oControl)
+
+
+ createControlShape() = oControlShape
+
+End Function
+
+Function createControlShapeWithDefaultControl(cKind As String) As Object
+
+ Dim oControlShape As Object
+ Dim oControl As Object
+
+
+ oControlShape = oDoc.createInstance(&quot;com.sun.star.drawing.ControlShape&quot;)
+ oControl = oDoc.createInstance(&quot;com.sun.star.form.component.&quot; &amp; cKind)
+ oControlShape.setControl(oControl)
+
+
+ createControlShapeWithDefaultControl() = oControlShape
+
+End Function
+
+Function createUNOControlShape(cKind As String, defControl As String) As Object
+
+ Dim oControlShape As Object
+ Dim oControl As Object
+
+
+ oControlShape = oDoc.createInstance(&quot;com.sun.star.drawing.ControlShape&quot;)
+ oControl = oDoc.createInstance(&quot;com.sun.star.form.component.&quot; &amp; cKind)
+ oControl.setPropertyValue(&quot;DefaultControl&quot;, &quot;com.sun.star.awt.&quot; &amp; defControl)
+ oControlShape.setControl(oControl)
+
+
+ createUNOControlShape() = oControlShape
+
+End Function
+
+Function addShape(oShape As Object) As Boolean
+
+ Dim vSize As New com.sun.star.awt.Size
+ Dim oDrawPage As Object
+ Dim oForms As Object
+ Dim oForm As Object
+
+ oDrawPage = oDoc.getDrawPage()
+ oForms = oDrawPage.getForms()
+
+ if oForms.Count = 0 then
+ oForm = oDoc.createInstance(&quot;com.sun.star.form.component.Form&quot;)
+ oForms.insertByIndex(0, oForm)
+ end if
+
+ vSize.Height = 2000 : vSize.Width = 2000
+ oShape.Size = vSize
+ oDrawPage.add(oShape)
+
+ addShape() = true
+
+End Function
+
+sub addControl(cKind as String)
+
+ Dim oDrawPage As Object
+ Dim oForm As Object, oForms As Object
+ Dim oControl As Object, oControlShape As Object
+ Dim aSz As Variant
+ Dim oText As Object
+
+ oDrawPage = oDoc.DrawPage
+ oControlShape = oDoc.createInstance(&quot;com.sun.star.drawing.ControlShape&quot;)
+ oControl = oDoc.createInstance(&quot;com.sun.star.form.component.&quot; + cKind)
+ oForm = oDoc.createInstance(&quot;com.sun.star.form.component.Form&quot;)
+ oforms = oDrawPage.Forms
+ if oforms.count = 0 then
+ oforms.insertbyindex(0,oForm)
+ end if
+ oControlShape.Control = oControl
+ oDrawPage.add(oControlShape)
+
+End sub
+
+Function addControlToDefaultForm(cKind as String, x As Integer, y As Integer, width As Integer, height As Integer) As Object
+
+ Dim oDrawPage As Object
+ Dim oControl As Object, oControlShape As Object
+ Dim pos As New com.sun.star.awt.Point
+ Dim size As New com.sun.star.awt.Size
+
+ pos.X = x
+ pos.Y = y
+ size.Width = width
+ size.Height = height
+
+ oDrawPage = oDoc.DrawPage
+ oControlShape = oDoc.createInstance(&quot;com.sun.star.drawing.ControlShape&quot;)
+ oControl = oDoc.createInstance(&quot;com.sun.star.form.component.&quot; + cKind)
+ oControlShape.Control = oControl
+ oControlShape.Position = pos
+ oControlShape.Size = size
+ oDrawPage.add(oControlShape)
+
+ addControlToDefaultForm() = oControlShape
+
+End Function
+
+Function addShapeToDrawDoc(oPage as Object, nPosX, nPosY as Integer, oType As String) As Object
+ Dim aPoint As New com.sun.star.awt.Point
+ Dim aSize As New com.sun.star.awt.Size
+ Dim oShape As Object
+ Dim servNames As Variant
+
+ aPoint.x = nPosX
+ aPoint.y = nPosY
+ aSize.Width = 2000
+ aSize.Height = 1000
+ oShape = oDoc.createInstance(&quot;com.sun.star.drawing.&quot;+oType+&quot;Shape&quot;)
+ oShape.Size = aSize
+ oShape.Position = aPoint
+
+ if oShape.getPropertySetInfo().hasPropertyByName(&quot;FillColor&quot;) then
+ oShape.FillColor = RGB(128, 255, 0)
+ End If
+
+ oPage.add(oShape)
+
+ addShapeToDrawDoc() = oShape
+End Function
+</script:module> \ No newline at end of file
diff --git a/wizards/source/tutorials/TutorialClose.xba b/wizards/source/tutorials/TutorialClose.xba
new file mode 100644
index 000000000000..2438243b82ff
--- /dev/null
+++ b/wizards/source/tutorials/TutorialClose.xba
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="TutorialClose" script:language="StarBasic">REM ***** BASIC *****
+Dim myCloseDialog As Object
+
+Sub TutorialCloseMain
+ myCloseDialog = LoadDialog(&quot;Tutorials&quot;,&quot;TutorialCloseDialog&quot;)
+ myCloseDialog.Execute()
+End Sub
+
+Sub CloseYes(aEvent)
+ myCloseDialog.EndExecute()
+ DialogVisible = False
+End Sub
+</script:module> \ No newline at end of file
diff --git a/wizards/source/tutorials/TutorialCloseDialog.xdl b/wizards/source/tutorials/TutorialCloseDialog.xdl
new file mode 100644
index 000000000000..edc1dae7e699
--- /dev/null
+++ b/wizards/source/tutorials/TutorialCloseDialog.xdl
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
+<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="TutorialCloseDialog" dlg:left="173" dlg:top="82" dlg:width="132" dlg:height="38" dlg:closeable="true" dlg:moveable="true">
+ <dlg:styles>
+ <dlg:style dlg:style-id="0" dlg:font-weight="150"/>
+ </dlg:styles>
+ <dlg:bulletinboard>
+ <dlg:button dlg:id="yesButton" dlg:tab-index="1" dlg:left="24" dlg:top="20" dlg:width="50" dlg:height="14" dlg:value="Yes">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Tutorials.TutorialClose.CloseYes?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:button dlg:id="noButton" dlg:tab-index="0" dlg:left="76" dlg:top="20" dlg:width="50" dlg:height="14" dlg:value="No" dlg:button-type="cancel"/>
+ <dlg:text dlg:style-id="0" dlg:id="Label1" dlg:tab-index="2" dlg:left="6" dlg:top="6" dlg:width="120" dlg:height="8" dlg:value="Do you want to close this Tutorial?." dlg:align="center"/>
+ </dlg:bulletinboard>
+</dlg:window> \ No newline at end of file
diff --git a/wizards/source/tutorials/TutorialCreator.xba b/wizards/source/tutorials/TutorialCreator.xba
new file mode 100644
index 000000000000..7169b4e2e467
--- /dev/null
+++ b/wizards/source/tutorials/TutorialCreator.xba
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="TutorialCreator" script:language="StarBasic">REM ***** BASIC *****
+Sub TutorialCreatorMain
+ GlobalScope.BasicLibraries.LoadLibrary(&quot;Tools&quot;)
+ myTutorial = createUNOService(&quot;com.sun.star.wizards.tutorial.executer.CallTutorialFramework&quot;)
+ myTutorial.trigger(&quot;StartTutorialCreator&quot;)
+End Sub
+
+</script:module> \ No newline at end of file
diff --git a/wizards/source/tutorials/TutorialOpen.xba b/wizards/source/tutorials/TutorialOpen.xba
new file mode 100644
index 000000000000..a64a72507ba1
--- /dev/null
+++ b/wizards/source/tutorials/TutorialOpen.xba
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="TutorialOpen" script:language="StarBasic">REM ***** BASIC *****
+Dim myOpenDialog As Object
+Dim oListBox As Object
+Dim files As Object
+Dim oUcb As Object
+Dim oListener As Object
+
+Sub TutorialOpenMain
+ GlobalScope.BasicLibraries.LoadLibrary(&quot;Tools&quot;)
+ myOpenDialog = LoadDialog(&quot;Tutorials&quot;,&quot;TutorialOpenDialog&quot;)
+ init()
+ myOpenDialog.Execute()
+End Sub
+
+Sub Init
+ On Local Error Goto NOFILE
+ myOpenDialog.Title = &quot;Tutorials&quot;
+ oListBox = myOpenDialog.GetControl(&quot;ListBox&quot;)
+ templatePath = GetPathSettings(&quot;Template&quot;,false, 0)
+ Dim tutorialPath As String
+ iPos = InStr(templatePath,&quot;/&quot;)
+ if(iPos &gt; 0) Then
+ tutorialPath = templatePath &amp; &quot;/tutorials&quot;
+ Else
+ tutorialPath = templatePath &amp; &quot;\tutorials&quot;
+ End If
+ oUcb = createUnoService(&quot;com.sun.star.ucb.SimpleFileAccess&quot;)
+ files = oUcb.getFolderContents(tutorialPath,true)
+ size = Ubound( files() )
+ Dim tempFiles(size) As String
+ tempCount = 0
+ For iCount = 0 To size
+ completPath = files(iCount)
+ oDocInfo = CreateUnoService(&quot;com.sun.star.document.DocumentProperties&quot;)
+ oDocInfo.Read(completPath)
+ sDocTitle = oDocInfo.Title
+ if(not isNull(sDocTitle) And len(sDocTitle) &gt; 0) Then
+ oListbox.additem(sDocTitle,0)
+ tempFiles(tempCount) = completPath
+ tempCount = tempCount + 1
+ End If
+ Next iCount
+ &apos;printdbgInfo oListbox
+ size = oListbox.ItemCount - 1
+ Dim tempFiles2(size) As String
+ For iCount = 0 To size
+ tempFiles2(iCount) = tempFiles(iCount)
+ Next iCount
+ files() = tempFiles2()
+ Exit Sub
+ NOFILE:
+ If Err &lt;&gt; 0 Then
+ Msgbox &quot;No file found error!&quot; &amp; CHR(13) &amp; &quot;Path: ...\share\template\...\tutorials\&quot;
+ myOpenDialog.model.Open.enabled = False
+ End If
+End Sub
+
+Sub ItemSelected(oEvent)
+ On Local Error Goto NOFILE
+ completPath = files(Ubound(files()) - oEvent.Selected)
+ oTextField = myOpenDialog.GetControl(&quot;Label&quot;) &apos;TextField
+ oTextField.setText(&quot;&quot;)
+ Dim NoArgs() as new com.sun.star.beans.PropertyValue
+ oDocInfo = CreateUnoService(&quot;com.sun.star.document.DocumentProperties&quot;)
+ oDocInfo.Read(completPath)
+ sDocDescription = oDocInfo.Description
+ if(not isNull(sDocTitle) And len(sDocDescription) &gt; 0) Then
+ oTextField.setText(sDocDescription)
+ Else
+ oTextField.setText(&quot;Not Description!!!.&quot;)
+ End If
+ Exit Sub
+ NOFILE:
+ If Err &lt;&gt; 0 Then
+ Msgbox &quot;Open file error!&quot;
+ End If
+End Sub
+
+Sub OpenTutorial(aEvent)
+ completPath = files(Ubound(files()) - oListBox.getSelectedItemPos())
+ Dim Args(2) as new com.sun.star.beans.PropertyValue
+ Args(1).Name = &quot;MacroExecutionMode&quot;
+ Args(1).Value = com.sun.star.document.MacroExecMode.ALWAYS_EXECUTE
+ Args(2).Name = &quot;AsTemplate&quot;
+ Args(2).Value = true
+
+ StarDesktop.LoadComponentFromURL(completPath,&quot;_default&quot;,0, Args())
+ myOpenDialog.endExecute()
+End Sub
+
+Sub Cancel(aEvent)
+ myOpenDialog.endExecute()
+End Sub
+</script:module> \ No newline at end of file
diff --git a/wizards/source/tutorials/TutorialOpenDialog.xdl b/wizards/source/tutorials/TutorialOpenDialog.xdl
new file mode 100644
index 000000000000..6c9893306c6e
--- /dev/null
+++ b/wizards/source/tutorials/TutorialOpenDialog.xdl
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
+<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="TutorialOpenDialog" dlg:left="158" dlg:top="58" dlg:width="250" dlg:height="200" dlg:closeable="true" dlg:moveable="true">
+ <dlg:bulletinboard>
+ <dlg:button dlg:id="Open" dlg:tab-index="1" dlg:left="141" dlg:top="180" dlg:width="50" dlg:height="14" dlg:value="Open">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Tutorials.TutorialOpen.OpenTutorial?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:button dlg:id="Cancel" dlg:tab-index="2" dlg:left="194" dlg:top="180" dlg:width="50" dlg:height="14" dlg:value="Cancel">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Tutorials.TutorialOpen.Cancel?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:menulist dlg:id="ListBox" dlg:tab-index="0" dlg:left="8" dlg:top="17" dlg:width="98" dlg:height="155">
+ <script:event script:event-name="on-performaction" script:location="application" script:macro-name="Tutorials.TutorialOpen.OpenTutorial" script:language="StarBasic"/>
+ <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="Tutorials.TutorialOpen.ItemSelected" script:language="StarBasic"/>
+ </dlg:menulist>
+ <dlg:fixedline dlg:id="FixedLine" dlg:tab-index="3" dlg:left="6" dlg:top="6" dlg:width="100" dlg:height="8" dlg:value="Tutorials"/>
+ <dlg:fixedline dlg:id="FixedLine1" dlg:tab-index="4" dlg:left="6" dlg:top="176" dlg:width="238" dlg:height="1"/>
+ <dlg:fixedline dlg:id="FixedLine2" dlg:tab-index="5" dlg:left="110" dlg:top="6" dlg:width="134" dlg:height="8" dlg:value="Description"/>
+ <dlg:fixedline dlg:id="FixedLine3" dlg:tab-index="6" dlg:left="267" dlg:top="44" dlg:width="0" dlg:height="2"/>
+ <dlg:text dlg:id="Label" dlg:tab-index="7" dlg:left="112" dlg:top="17" dlg:width="132" dlg:height="155" dlg:multiline="true"/>
+ </dlg:bulletinboard>
+</dlg:window> \ No newline at end of file
diff --git a/wizards/source/tutorials/TutorialsDialog.xdl b/wizards/source/tutorials/TutorialsDialog.xdl
new file mode 100644
index 000000000000..3a211f9f649a
--- /dev/null
+++ b/wizards/source/tutorials/TutorialsDialog.xdl
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
+<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="TutorialsDialog" dlg:left="149" dlg:top="54" dlg:width="250" dlg:height="200" dlg:closeable="true" dlg:moveable="true">
+ <dlg:styles>
+ <dlg:style dlg:style-id="0" dlg:font-weight="150"/>
+ </dlg:styles>
+ <dlg:bulletinboard>
+ <dlg:button dlg:id="CommandButton" dlg:tab-index="3" dlg:left="232" dlg:top="4" dlg:width="13" dlg:height="13" dlg:value="C">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Tutorials.Functions.Minimize?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:text dlg:id="myText" dlg:tab-index="4" dlg:left="91" dlg:top="26" dlg:width="153" dlg:height="145" dlg:value="This text explains all the action items that the user can do to follow the current step highlighted in the road map at the left side of the tutorial window.&#x0a;&#x0a;1. Open the Format menu&#x0a;2. Choose the Paragraph command&#x0a;3. Click the Numbering tab&#x0a;&#x0a;The first step will always explain what the current tutorial is about.&#x0a;&#x0a;The last step - it is higjlighted currently in the road map - will summarize what the user now has seen or learned." dlg:multiline="true"/>
+ <dlg:button dlg:id="show" dlg:tab-index="1" dlg:left="142" dlg:top="180" dlg:width="50" dlg:height="14" dlg:value="Show me">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Tutorials.Functions.Show?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:button dlg:id="next" dlg:tab-index="0" dlg:left="89" dlg:top="180" dlg:width="50" dlg:height="14" dlg:value="Next &gt;&gt;">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Tutorials.Functions.NextStep?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:text dlg:style-id="0" dlg:id="myTextField" dlg:tab-index="5" dlg:left="6" dlg:top="6" dlg:width="192" dlg:height="8" dlg:value="Current Step (in Road Map)"/>
+ <dlg:button dlg:id="done" dlg:tab-index="2" dlg:left="195" dlg:top="180" dlg:width="50" dlg:height="14" dlg:value="Close">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Tutorials.Functions.EndDialog?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:text dlg:style-id="0" dlg:id="ActionItemsLabel" dlg:tab-index="8" dlg:left="91" dlg:top="8" dlg:width="45" dlg:height="8" dlg:value="Action Items"/>
+ <dlg:fixedline dlg:id="FixedLineHorizontal" dlg:tab-index="7" dlg:left="0" dlg:top="176" dlg:width="250" dlg:height="1"/>
+ <dlg:fixedline dlg:id="FixedLineVertikal" dlg:tab-index="6" dlg:left="85" dlg:top="0" dlg:width="1" dlg:height="176" dlg:align="vertical"/>
+ </dlg:bulletinboard>
+</dlg:window> \ No newline at end of file
diff --git a/wizards/source/tutorials/delzip b/wizards/source/tutorials/delzip
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/wizards/source/tutorials/delzip
diff --git a/wizards/source/tutorials/dialog.xlb b/wizards/source/tutorials/dialog.xlb
new file mode 100644
index 000000000000..e02b20688a72
--- /dev/null
+++ b/wizards/source/tutorials/dialog.xlb
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="Tutorials" library:readonly="false" library:passwordprotected="false">
+ <library:element library:name="TutorialsDialog"/>
+ <library:element library:name="TutorialOpenDialog"/>
+ <library:element library:name="TutorialCloseDialog"/>
+</library:library> \ No newline at end of file
diff --git a/wizards/source/tutorials/makefile.mk b/wizards/source/tutorials/makefile.mk
new file mode 100644
index 000000000000..a5f673b1d3f0
--- /dev/null
+++ b/wizards/source/tutorials/makefile.mk
@@ -0,0 +1,45 @@
+#*************************************************************************
+#
+# 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.
+#
+#*************************************************************************
+PRJ=..$/..
+
+PRJNAME=wizards
+TARGET=tutorials
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+.INCLUDE : $(PRJ)$/util$/target.pmk
+
+# --- Files --------------------------------------------------------
+
+ZIP1TARGET = $(TUTORIALS_ALL_TARGET)
+ZIP1LIST = *.xdl *.xba *.xlb
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
+
diff --git a/wizards/source/tutorials/script.xlb b/wizards/source/tutorials/script.xlb
new file mode 100644
index 000000000000..30280c6b1feb
--- /dev/null
+++ b/wizards/source/tutorials/script.xlb
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="Tutorials" library:readonly="false" library:passwordprotected="false">
+ <library:element library:name="Functions"/>
+ <library:element library:name="TutorialCreator"/>
+ <library:element library:name="TutorialOpen"/>
+ <library:element library:name="RoadMap"/>
+ <library:element library:name="ShowInfoDialog"/>
+ <library:element library:name="TutorialClose"/>
+</library:library> \ No newline at end of file
diff --git a/wizards/source/webwizard/Bullets.xba b/wizards/source/webwizard/Bullets.xba
new file mode 100644
index 000000000000..78b8fa0b0d52
--- /dev/null
+++ b/wizards/source/webwizard/Bullets.xba
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Bullets" script:language="StarBasic">REM ***** BASIC *****
+Option Explicit
+
+
+Sub SetBulletGraphics(sBulletUrl as String)
+Dim i as Integer
+Dim oBookMarkCursor as Object
+ oBookmarks = oBaseDocument.BookMarks
+ For i = 0 To oBookmarks.Count - 1
+ oBookMark = oBookmarks.GetbyIndex(i)
+ oBookMarkCursor = oBookMark.Anchor.Text.CreateTextCursorByRange(oBookMark.Anchor)
+ If oBookMarkCursor.PropertySetInfo.HasPropertybyName(&quot;NumberingRules&quot;) Then
+ ChangeBulletURL(sBulletUrl, oBookMarkCursor)
+ End If
+ Next i
+End Sub
+
+
+Sub ChangeBulletURL(sBulletUrl as String, oBookMarkCursor as Object)
+Dim n, m as Integer
+Dim oLevel()
+Dim oRules
+Dim bDoReplace as Boolean
+Dim oSize as New com.sun.star.awt.Size
+Dim oNumberingBuffer(0) as New com.sun.star.beans.PropertyValue
+Dim oNewBuffer(0) as New com.sun.star.beans.PropertyValue
+ oRules = oBookMarkCursor.NumberingRules
+ If Vartype(oRules()) = 9 Then
+ oNumberingBuffer(0).Name = &quot;NumberingType&quot;
+ oNumberingBuffer(0).Value = com.sun.star.style.NumberingType.BITMAP
+ For n = 0 To oRules.Count - 1
+ oLevel() = oRules.GetByIndex(n)
+ bDoReplace = ModifyPropertyValue(oLevel(), oNumberingBuffer())
+ If bDoReplace Then
+ oRules.ReplaceByIndex(n, oNumberingBuffer())
+ End If
+ Next n
+ oBookmarkCursor.NumberingRules = oRules
+ oNewBuffer(0).Name = &quot;GraphicURL&quot;
+ oNewBuffer(0).Value = sBulletUrl
+ For n = 0 To oRules.Count - 1
+ oLevel() = oRules.GetByIndex(0)
+ bDoReplace = ModifyPropertyValue(oLevel(), oNewBuffer())
+ If bDoReplace Then
+ oRules.ReplaceByIndex(n, oNewBuffer())
+ End If
+ Next n
+ oBookmarkCursor.NumberingRules = oRules
+ End If
+End Sub
+
+
+Sub BulletUrlsToSavePath(SavePath as String)
+Dim n as Integer
+Dim m as Integer
+Dim i as Integer
+Dim sNewBulletUrl as String
+Dim oLevel()
+Dim oRules
+Dim bIsFirstRun as Boolean
+Dim oNewBuffer()&apos; as New com.sun.star.beans.PropertyValue
+Dim bDoReplace as Boolean
+Dim oBookmarkCursor as Object
+ bIsFirstRun = True
+ oBookmarks = oBaseDocument.BookMarks
+ For i = 0 To oBookmarks.Count - 1
+ oBookMark = oBookmarks.GetbyIndex(i)
+ oBookMarkCursor = oBookMark.Anchor.Text.CreateTextCursorByRange(oBookMark.Anchor)
+ If oBookMarkCursor.PropertySetInfo.HasPropertybyName(&quot;NumberingRules&quot;) Then
+ oRules = oBookMarkCursor.NumberingRules
+ If Vartype(oRules()) = 9 Then
+ For n = 0 To oRules.Count - 1
+ oLevel() = oRules.GetByIndex(n)
+ oNewBuffer() = ChangeBulletUrlToSavePath(SavePath, oLevel(), bIsFirstRun, bDoReplace)
+ If bDoReplace Then
+ bIsFirstRun = False
+ oRules.ReplaceByIndex(n, oNewBuffer())
+ End If
+ Next n
+ oBookmarkCursor.NumberingRules = oRules
+ End If
+ End If
+ Next i
+End Sub
+
+
+Function ChangeBulletUrlToSavePath(SavePath as String, oLevel(), bIsFirstRun as Boolean, bDoReplace as Boolean)
+Dim MaxIndex as Integer
+Dim i as Integer
+Dim BulletName as String
+Dim oSize as New com.sun.star.awt.Size
+ MaxIndex = Ubound(oLevel())
+ Dim oNewBuffer(MaxIndex) as New com.sun.star.beans.PropertyValue
+ For i = 0 To MaxIndex
+ oNewBuffer(i).Name = oLevel(i).Name
+ If oLevel(i).Name = &quot;GraphicURL&quot; Then
+ bDoReplace = True
+ BulletName = FileNameoutofPath(oLevel(i).Value)
+ If bIsFirstRun Then
+ If oUcb.exists(SavePath &amp; Bulletname) Then
+ FileCopy(oLevel(i).Value, SavePath &amp; BulletName)
+ End If
+ End If
+ oNewBuffer(i).Value = BulletName
+&apos; ElseIf oLevel(i).Name = &quot;GraphicSize&quot; Then
+&apos;&apos; Todo: Get the original Size of the Bullet (see Bug #86196)
+&apos; oSize.Height = 300
+&apos; oSize.Width = 300
+&apos; oNewBuffer(i).Value = oSize
+ Else
+ oNewBuffer(i).Value = oLevel(i).Value
+ End If
+ Next i
+ ChangeBulletUrlToSavePath() = oNewBuffer()
+End Function</script:module> \ No newline at end of file
diff --git a/wizards/source/webwizard/Common.xba b/wizards/source/webwizard/Common.xba
new file mode 100644
index 000000000000..806c49423b67
--- /dev/null
+++ b/wizards/source/webwizard/Common.xba
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Common" script:language="StarBasic">REM ***** BASIC *****
+Option Explicit
+
+
+Function LoadNewStyles(oDocument as Object, oDialogModel as Object, CurIndex as Integer, SourceFile as String, Styles() as String, TextureDir as String) as Boolean
+Dim BackGroundURL as String
+Dim oBackGraph as Object
+Dim i, BackColor as Long
+Dim bLocWithBackGraphic as Boolean
+Dim oFamilies as Object, oFamily as Object&apos;, oStyle as Object
+Dim StylesOptions(0) as New com.sun.star.beans.PropertyValue
+
+ If SourceFile &lt;&gt; &quot;&quot; Then
+ StylesOptions(0).Name = &quot;OverwriteStyles&quot;
+ StylesOptions(0).Value = True
+ oDocument.StyleFamilies.LoadStylesFromURL(SourceFile, StylesOptions())
+ End If
+
+ &apos; Read array fields for background, bullet &amp; graphics
+ BackgroundURL = Styles(CurIndex, 7)
+ If Left(BackgroundURL, 1) &lt;&gt; &quot;#&quot; Then
+ BackgroundURL = TextureDir + BackgroundURL
+ bLocWithBackGraphic = True
+ Else
+ BackColor = clng(&quot;&amp;H&quot; &amp; Right(BackgroundURL, Len(BackgroundURL)-1))
+ bLocWithBackGraphic = False
+ End If
+ oFamilies = oDocument.StyleFamilies
+ oFamily = oFamilies.GetbyName(&quot;PageStyles&quot;)
+ For i = 0 To oFamily.Count - 1
+ If oFamily.GetByIndex(i).IsInUse Then
+ oStyle = oFamily.GetbyIndex(i)
+ If oStyle.PropertySetInfo.HasPropertybyName(&quot;BackGraphicURL&quot;) Then
+ If Left(BackgroundURL, 1) = &quot;#&quot; Then
+ oStyle.BackGraphicURL = &quot;&quot;
+ oStyle.BackColor = BackColor
+ oStyle.BackTransparent = False
+ Else
+ oStyle.BackGraphicUrl = BackGroundURL
+ SetTileBackgroundorNot(oDialogModel, oStyle)
+ End If
+ Exit For
+ End If
+ End If
+ Next i
+ LoadNewStyles() = bLocWithBackGraphic
+ErrorOcurred:
+ If Err &lt;&gt; 0 Then
+ MsgBox (WebWiz_gErrWhileLoadStyles$, 16, WebWiz_gWizardName$)
+ RESUME EXITSUB
+EXITSUB:
+ End If
+End Function
+
+
+
+Sub ChangeBackGraphicUrl(SavePath as String)
+Dim oPageFamily as Object
+Dim i as Integer
+ oPageFamily = oBaseDocument.StyleFamilies.GetbyName(&quot;PageStyles&quot;)
+ For i = 0 To oPageFamily.Count - 1
+ If oPageFamily.GetByIndex(i).IsInUse Then
+ oStyle = oPageFamily.GetbyIndex(i)
+ If oStyle.PropertySetInfo.HasPropertybyName(&quot;BackGraphicURL&quot;) Then
+ If oStyle.BackGraphicUrl &lt;&gt; &quot;&quot; Then
+ oStyle.BackGraphicUrl = CopyFile(oStyle.BackGraphicUrl, SavePath)
+ Exit Sub
+ End If
+ End If
+ End If
+ Next i
+End Sub
+
+
+Sub SetBackGraphicStyle(oEvent as Object)
+Dim oFamilies as Object
+Dim oFamily as Object
+Dim i as Integer
+Dim oOptModel as Object
+Dim iBackgroundValue as Integer
+Dim oLocDocument as Object
+ ooptModel = oEvent.Source.Model
+ iBackgroundValue = Val(ooptModel.Tag)
+ oLocDocument = StarDesktop.ActiveFrame.Controller.Model
+ oLocDocument.LockControllers
+ oFamilies = oLocDocument.StyleFamilies
+ oFamily = oFamilies.GetbyName(&quot;PageStyles&quot;)
+ For i = 0 To oFamily.Count - 1
+ If oFamily.GetByIndex(i).IsInUse Then
+ oStyle = oFamily.GetbyIndex(i)
+ If oStyle.PropertySetInfo.HasPropertybyName(&quot;BackGraphicURL&quot;) Then
+ oStyle.BackGraphicLocation = iBackgroundValue
+ End If
+ End If
+ Next i
+ oLocDocument.UnlockControllers
+End Sub
+
+
+Sub SetTileBackgroundorNot(DialogModel as Object, oStyle as Object)
+ If Not IsNull(DialogModel) Then
+ If DialogModel.optTiled.State = 1 Then
+ oStyle.BackGraphicLocation = com.sun.star.style.GraphicLocation.TILED
+ Else
+ oStyle.BackGraphicLocation = com.sun.star.style.GraphicLocation.AREA
+ End If
+ End If
+End Sub
+
+
+Sub ToggleOptionButtons(DialogModel as Object, bDoEnable as Integer)
+ If Not IsNull(DialogModel) Then
+ DialogModel.optTiled.Enabled = bDoEnable
+ DialogModel.optArea.Enabled = bDoEnable
+ DialogModel.hlnBackground.Enabled = bDoEnable
+ End If
+End Sub
+
+
+Function GetCurIndex(oListbox as Object, sList() as String, FileIndex as Integer)
+Dim i as Integer
+Dim n as Integer
+Dim SelValue as String
+Dim MaxIndex as Integer
+ If IsNull(oListBox) Then
+ &apos; Startup for WebWizard
+ SelValue = sList(0,1)
+ Else
+ n = oListbox.SelectedItems(0)
+ SelValue = oListbox.StringItemList(n)
+ End If
+ &apos; Find field index for chosen list entry
+ MaxIndex = Ubound(sList)
+ For i = 0 To MaxIndex
+ If sList(i,1) = SelValue Then
+ FileStr = sList(i, FileIndex)
+ Exit For
+ End If
+ Next
+ GetCurIndex = i
+End Function
+
+</script:module> \ No newline at end of file
diff --git a/wizards/source/webwizard/HtmlAutoPilotBasic.xba b/wizards/source/webwizard/HtmlAutoPilotBasic.xba
new file mode 100644
index 000000000000..00675bbf0c74
--- /dev/null
+++ b/wizards/source/webwizard/HtmlAutoPilotBasic.xba
@@ -0,0 +1,436 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="HtmlAutoPilotBasic" script:language="StarBasic">&apos; Variables must be declared
+Option Explicit
+
+Public CurDocIndex as Integer
+Public CurWebPageIndex as Integer
+
+
+Public bWithBackGraphic as Boolean
+Public oStyle as Object
+&apos; Maximum number of content templates, style templates and bullets
+Const MaxLayouts = 50
+Const MaxStyles = 100
+Const MaxBullets = 10
+
+&apos;Public NumberOfLayouts%, NumberOfStyles%
+
+&apos; Filled with title, previous, next, home, top, bullet, background, file name
+Public Style(MaxStyles, 8) as String
+
+Public Layout$(MaxLayouts, 2)
+
+Public TextureDir$, BulletDir$, GraphicsDir$, GalleryDir$, PhotosDir$
+Public SOBitmapPath as String
+Public CurrentBullet$, CurrentPrev$, CurrentNext$, CurrentHome$, CurrentTop$
+Public FileStr as String
+
+Public WebWiz_gWizardName$, WebWiz_gErrContentNotFound$, WebWiz_gErrStyleNotFound$
+Public WebWiz_gErrMainTemplateError$, WebWiz_gErrWhileReloading$
+Public WebWiz_gErrWhileLoadStyles$, WebWiz_gErrMsg$, WebWiz_gErrMainDocumentError$
+
+Public ProgressBar as Object
+Public ProgressValue As Long
+Public oBaseDocument as Object
+Public oViewCursor as Object
+Public oViewSettings as Object
+Public NoArgs() as New com.sun.star.beans.PropertyValue
+
+Public oCursor as Object
+Public oBookmarks as Object
+Public oBookMark as Object
+
+Public oUcb as Object
+Public MainDialog as Object
+Public DialogModel as Object
+
+
+Sub Main
+Dim RetValue
+On Local Error Goto GlobalErrorHandler
+ BasicLibraries.LoadLibrary(&quot;Tools&quot;)
+ oUcb = createUnoService(&quot;com.sun.star.ucb.SimpleFileAccess&quot;)
+ oBaseDocument = StarDesktop.LoadComponentFromURL(&quot;private:factory/swriter/web&quot;, &quot;_default&quot;, 0, NoArgs())
+ oViewSettings = oBaseDocument.CurrentController.ViewSettings
+ oViewCursor = oBaseDocument.GetCurrentController.ViewCursor
+ CurWebPageIndex = -1
+ ProgressBar = oBaseDocument.GetCurrentController.GetFrame.CreateStatusIndicator
+ ProgressBar.Start(&quot;&quot;, 100)
+ SetProgressValue(2)
+ oBaseDocument.LockControllers
+ oViewSettings.ShowTableBoundaries = False
+ If Not GetWebWizardPaths() Then
+ Exit Sub
+ End If
+ LoadLanguage
+ SetProgressValue(10)
+ Layout() = getListBoxArrays(oUcb, &quot;/cnt&quot;)
+ GetCurIndex(DialogModel, Layout(),2)
+ SetProgressValue(30)
+ oCursor = oBasedocument.Text.CreateTextCursor
+ oCursor.InsertDocumentfromURL(FileStr, NoArgs())
+ SetProgressValue(50)
+ Style() = getListBoxArrays(oUcb, &quot;/stl&quot;)
+ SetProgressValue(70)
+ LoadWebPageStyles(oBaseDocument)
+ SetProgressValue(90)
+ oBaseDocument.UnlockControllers
+ OpenWebDialog()
+ SetProgressValue(98)
+ SetProgressValue(0)
+ MainDialog.Model.ImagePreview.BackGroundColor = RGB(0, 60,126)
+ RetValue = MainDialog.Execute
+ Select Case RetValue
+ Case 0
+ MainDialog.Dispose()
+ DisposeDocument(oBaseDocument)
+ Case 1
+ EndDialog()
+ MainDialog.Dispose()
+ End Select
+GLOBALERRORHANDLER:
+ If Err &lt;&gt; 0 Then
+ MsgBox (WebWiz_gErrMsg$, 16, WebWiz_gWizardName$)
+ DisposeDocument(oBaseDocument)
+ RESUME EXITWIZARD
+EXITWIZARD:
+ End If
+End Sub
+
+
+Function SetProgressValue(iValue as Integer)
+ If iValue = 0 Then
+ ProgressBar.End
+ End If
+ ProgressValue = iValue
+ ProgressBar.Value = iValue
+End Function
+
+
+Sub ReloadCurrentDocument()
+Dim OldDocIndex as Integer
+On Local Error Goto ErrorOcurred
+ OldDocIndex = CurDocIndex
+ CurDocIndex = GetCurIndex(DialogModel.lbTemplate, Layout(), 2)
+ If OldDocIndex &lt;&gt; CurDocIndex Then
+ oBaseDocument.LockControllers
+ ToggleDialogControls(False)
+ oCursor = oBaseDocument.Text.CreateTextCursor()
+ oCursor.GotoStart(False)
+ oCursor.GotoEnd(True)
+ oCursor.SetAllPropertiesToDefault()
+ oCursor.InsertDocumentfromURL(FileStr, NoArgs())
+ SetBulletAndGraphics
+ CheckControls(oBaseDocument.DrawPage)
+ ErrorOcurred:
+ If Err &lt;&gt; 0 Then
+ MsgBox(WebWiz_gErrWhileReloading$, 16, WebWiz_gWizardName$)
+ End If
+ oBaseDocument.UnlockControllers
+ oViewCursor.GotoStart(False)
+ ToggleDialogControls(True, &quot;lbTemplate&quot;)
+ End If
+End Sub
+
+
+
+
+Sub LoadWebPageStyles(aEvent as Object, Optional bStartUp as Boolean)
+Dim OldWebPageIndex as Integer
+ OldWebPageIndex = CurWebPageIndex
+ If IsNull(DialogModel) Then
+ CurWebPageIndex = GetCurIndex(DialogModel, Style(), 8)
+ Else
+ CurWebPageIndex = GetCurIndex(DialogModel.lbStyles, Style(), 8)
+ End If
+ If OldWebPageIndex &lt;&gt; CurWebPageIndex Then
+ ToggleDialogControls(False)
+ oBaseDocument.LockControllers
+ bWithBackGraphic = LoadNewStyles(oBaseDocument, DialogModel, CurWebPageIndex, FileStr, Style(), TextureDir)
+ CurrentBullet$ = BulletDir + Style(CurWebPageIndex, 6)
+ CurrentPrev$ = GraphicsDir + Style(CurWebPageIndex, 2)
+ CurrentNext$ = GraphicsDir + Style(CurWebPageIndex, 3)
+ CurrentHome$ = GraphicsDir + Style(CurWebPageIndex, 4)
+ CurrentTop$ = GraphicsDir + Style(CurWebPageIndex, 5)
+ With oBaseDocument.DocumentProperties.UserDefinedProperties
+ .AutoPilotName1 = ExtractGraphicNames(CurWebPageIndex,2)
+ .AutoPilotName2 = ExtractGraphicNames(CurWebPageIndex, 4)
+ .AutoPilotBullet = Style(CurWebPageIndex, 6)
+ .AutoPilotBackground = Style(CurWebPageIndex, 7)
+ End With
+ SetBulletAndGraphics()
+ CheckControls(oBaseDocument.DrawPage)
+ oViewCursor.GotoStart(False)
+ oBaseDocument.UnlockControllers
+ ToggleDialogControls(True, &quot;lbStyles&quot;)
+ End If
+End Sub
+
+
+Function ExtractGraphicNames(CurIndex as Integer, i as Integer) as String
+Dim FieldValue as String
+ FieldValue = GetFileNameWithoutExtension(Style(CurIndex, i))
+ FieldValue = FieldValue &amp; &quot; &quot; &amp; GetFileNameWithoutExtension(Style(CurIndex, i+1))
+ ExtractGraphicNames = FieldValue
+End Function
+
+
+Sub SetBulletAndGraphics
+ SetGraphic(&quot;Prev&quot;, CurrentPrev)
+ SetGraphic(&quot;Next&quot;, CurrentNext)
+ SetGraphic(&quot;Home&quot;, CurrentHome)
+ SetGraphic(&quot;Top&quot;, CurrentTop)
+ SetBulletGraphics(CurrentBullet)
+ SetGraphicsToOriginalSize()
+End Sub
+
+
+Sub SetGraphicsToOriginalSize()
+Dim oGraphics as Object
+Dim oGraphic as Object
+Dim i as Integer
+Dim aActSize as New com.sun.star.awt.Size
+ oGraphics = oBaseDocument.GraphicObjects
+ For i = 0 To oGraphics.Count-1
+ oGraphic = oGraphics.GetByIndex(i)
+ aActSize = oGraphic.ActualSize
+ If aActSize.Height &gt; 0 And aActSize.Width &gt; 0 Then
+ oGraphic.SetSize(aActSize)
+ End If
+ Next i
+End Sub
+
+
+Sub EndDialog()
+ If DialogModel.chkSaveasTemplate.State = 1 Then
+ &apos; Generating template? Set events later!
+ AttachBasicMacroToEvent(oBaseDocument,&quot;OnNew&quot;, &quot;WebWizard.HtmlAutoPilotBasic.SetEvent()&quot;)
+ &apos; Call the Store template dialog
+ DispatchSlot(5538)
+ AttachBasicMacroToEvent(oBaseDocument,&quot;OnNew&quot;, &quot;&quot;)
+ End If
+ SetEvent()
+End Sub
+
+
+Sub SetEvent()
+Dim oDocument as Object
+&apos; This sub links the events OnSaveDone and OnSaveAsDone to the procedure
+&apos; CopyGraphics. It is invoked when a document is created, either directly
+&apos; from the AutoPilot or from a template. It is not possible to set these
+&apos; links for the template created by the AutoPilot because then it is not
+&apos; possible to modify the template.
+ BasicLibraries.LoadLibrary(&quot;Tools&quot;)
+ oDocument = ThisComponent
+ AttachBasicMacroToEvent(oDocument,&quot;OnSaveDone&quot;, &quot;WebWizard.HtmlAutoPilotBasic.CopyGraphics()&quot;)
+ AttachBasicMacroToEvent(oDocument,&quot;OnSaveAsDone&quot;, &quot;WebWizard.HtmlAutoPilotBasic.CopyGraphics()&quot;)
+End Sub
+
+
+
+Sub CopyGraphics
+&apos; This sub copies all the graphics used in the document to the same directory the
+&apos; document has been copied into and changes the graphics links in the document.
+Dim oGraphicObjects as Object
+Dim oGraphic as Object
+Dim i as Integer
+Dim udProps as Object
+Dim SavePath as String
+ BasicLibraries.LoadLibrary(&quot;Tools&quot;)
+ oUcb = createUnoService(&quot;com.sun.star.ucb.SimpleFileAccess&quot;)
+ GetWebWizardPaths()
+ oBaseDocument = ThisComponent
+&apos; oBaseDocument.LockControllers()
+
+ &apos; Note: The sub DirectoryNameoutofPath should be change, so that the last character is a slash
+ SavePath = DirectoryNameoutofPath(oBaseDocument.Url, &quot;/&quot;) &amp; &quot;/&quot;
+
+ oGraphicObjects = oBaseDocument.GraphicObjects
+ For i = 0 to oGraphicObjects.Count-1
+ oGraphic = oGraphicObjects.GetbyIndex(i)
+ oGraphic.GraphicUrl = CopyFile(oGraphic.GraphicURL, SavePath)
+ Next i
+
+ ChangeBackGraphicUrl(SavePath)
+
+ BulletUrlsToSavePath(SavePath)
+
+ udProps = oBaseDocument.DocumentProperties.UserDefinedProperties
+ udProps.addProperty(&quot;AutoPilotName1&quot;, 0, &quot;&quot;)
+ udProps.addProperty(&quot;AutoPilotName2&quot;, 0, &quot;&quot;)
+ udProps.addProperty(&quot;AutoPilotBullet&quot;, 0, &quot;&quot;)
+ udProps.addProperty(&quot;AutoPilotBackground&quot;, 0, &quot;&quot;)
+
+ AttachBasicMacroToEvent(oBaseDocument,&quot;OnSaveDone&quot;, &quot;&quot;)
+ AttachBasicMacroToEvent(oBaseDocument,&quot;OnSaveAsDone&quot;, &quot;&quot;)
+ AttachBasicMacroToEvent(oBaseDocument,&quot;OnNew&quot;, &quot;&quot;)
+ oBaseDocument.Store
+&apos; oBaseDocument.UnlockControllers()
+End Sub
+
+
+Function CopyFile(ByVal SourceUrl as String, TargetDir as String)
+Dim sFileName as String
+Dim sNewFileUrl as String
+ If oUcb.Exists(TargetDir) Then
+ If Len(TargetDir) &gt; 2 Then
+ sFileName = FileNameoutofPath(SourceUrl)
+ sNewFileUrl = TargetDir &amp; sFileName
+ oUcb.Copy(SourceUrl, sNewFileUrl)
+ CopyFile() = sNewFileUrl
+ End If
+ End If
+End Function
+
+
+Function getListBoxArrays(oUcb as Object, sFileFilter as String)
+Dim oDocProps as Object
+Dim oListboxControl as Object
+Dim Description as String
+Dim sField as String
+Dim sFieldList() as String
+Dim bItemFound as Boolean
+Dim MaxIndex as Integer
+Dim DirContent() as String
+Dim FileName as String
+Dim TemplatePath as String
+Dim FilterLen as Integer
+Dim i as Integer
+Dim m as Integer
+Dim n as Integer
+Dim s as Integer
+Dim a as Integer
+Dim LocMaxIndex as Integer
+Dim Properties()
+Dim DimCount as Integer
+Dim sExtension as String
+ oDocProps = CreateUnoService(&quot;com.sun.star.document.DocumentProperties&quot;)
+ FilterLen = Len(sFileFilter)
+ bItemFound = False
+ &apos; It has to be made sure that the TemplatePath &lt;&gt; &quot;&quot;
+ TemplatePath = GetOfficeSubPath(&quot;Template&quot;, &quot;wizard/web/&quot;)
+ If TemplatePath = &quot;&quot; Then
+ Dim NullList()
+ getListBoxArrays() = NullList()
+ Exit Function
+ End If
+ DirContent() = oUcb.GetFolderContents(TemplatePath,True)
+ If sFileFilter = &quot;/cnt&quot; Then
+ DimCount = 2
+ Else
+ DimCount = 8
+ End If
+ LocMaxIndex = Ubound(DirContent())
+ Dim List(LocMaxIndex, DimCount) as String
+ Dim SortList(LocMaxIndex,1)
+ For i = 0 to LocMaxIndex
+ SortList(i,0) = DirContent(i)
+ SortList(i,1) = RetrieveDocTitle(oDocProps, DirContent(i))
+ Next i
+ SortList() = BubbleSortList(SortList(),True)
+ For i = 0 to LocMaxIndex
+ DirContent(i) = SortList(i,0)
+ Next i
+ a = 0
+ For i = 0 To LocMaxIndex
+ FileName = DirContent(i)
+ sExtension = Ucase(GetFileNameExtension(FileName))
+ If Instr(1,Filename, sFileFilter) And sExtension = &quot;STW&quot; Then
+ bItemFound = True
+ Description = RetrieveDocTitle(oDocProps, FileName)
+ Properties = oDocProps.UserDefinedProperties.PropertyValues
+ List(a,1) = Description
+ If sFileFilter = &quot;/cnt&quot; Then
+ List(a,2) = Filename
+ Else
+ m = 2
+ For n = 0 To 3
+ sField = Properties(n).Value
+ sFieldList() = ArrayoutofString(sField, &quot; &quot;, MaxIndex)
+ For s = 0 To MaxIndex
+ If m &lt; 6 Then
+ List(a,m) = sFieldList(s) &amp; &quot;.gif&quot;
+ Else
+ List(a,m) = sFieldList(s)
+ End If
+ m = m + 1
+ Next s
+ Next n
+ List(a,8) = FileName
+ End If
+ a = a + 1
+ End If
+ Next i
+ If sFileFilter = &quot;/cnt&quot; Then
+ ReDim Preserve List(a-1,2) as String
+ Else
+ ReDim Preserve List(a-1,8) as String
+ End If
+ If Not bItemfound Then
+ MsgBox(WebWiz_gErrContentNotFound$, 16, WebWiz_gWizardName$)
+ DisposeDocument(oBaseDocument)
+ Stop
+ End If
+ getListBoxArrays = List()
+End Function
+
+
+Sub SetGraphic(sWhich, sGraphicText as String)
+Dim oLocCursor as Object
+Dim oGraphic as Object
+Dim bGetGraphic as Boolean
+ oBookmarks = oBaseDocument.BookMarks
+ If oBookmarks.HasbyName(sWhich)Then
+ oBookMark = oBookmarks.GetbyName(sWhich)
+ oLocCursor = oBookMark.Anchor.Text.CreateTextCursorByRange(oBookMark.Anchor)
+ oGraphic = oBaseDocument.CreateInstance(&quot;com.sun.star.text.GraphicObject&quot;)
+ oLocCursor.GoRight(3,True)
+ oGraphic.AnchorType = 1
+ oGraphic.GraphicURL = ConverttoURL(sGraphicText)
+ oLocCursor.Text.InsertTextContent(oLocCursor, oGraphic, True)
+ oGraphic.Name = sWhich
+ ElseIf oBaseDocument.GraphicObjects.HasbyName(sWhich) Then
+ oGraphic = oBaseDocument.GraphicObjects.GetByName(sWhich)
+ oGraphic.GraphicUrl = sGraphicText
+ End If
+End Sub
+
+
+Sub CheckControls(oDrawPage as Object)
+Dim aForm as Object
+Dim m,n as integer
+Dim lColor as Long
+Dim oControl as Object
+ lColor = oBaseDocument.StyleFamilies.GetbyName(&quot;ParagraphStyles&quot;).GetByName(&quot;Standard&quot;).CharColor
+ &apos;SearchFor all possible Controls
+ For n = 0 to oDrawPage.Forms.Count - 1
+ aForm = oDrawPage.Forms(n)
+ For m = 0 to aForm.Count-1
+ oControl = aForm.GetbyIndex(m)
+ oControl.TextColor = lColor
+ Next
+ Next
+End Sub
+
+
+Sub RepaintHeaderPreview()
+Dim Bitmap As Object
+Dim sBitmapPath as String
+ sBitmapPath = SOBitmapPath &amp; &quot;webwizard.bmp&quot;
+ WebWzrd.ImagePreview.ImageURL = sBitmapPath
+End Sub
+
+
+Sub ToggleDialogControls(ByVal bDoEnable as Boolean, Optional FocusControlName as String)
+ If Not IsNull(DialogModel) Then
+ DialogModel.Enabled = bDoEnable
+ If bDoEnable Then
+ &apos; Enable Controls referring to Background graphic only when this Property is set
+ bDoEnable = bWithBackGraphic
+ ToggleOptionButtons(DialogModel, bDoEnable)
+ MainDialog.GetControl(FocusControlName).SetFocus()
+ End If
+ End If
+End Sub
+</script:module>
diff --git a/wizards/source/webwizard/Language.xba b/wizards/source/webwizard/Language.xba
new file mode 100644
index 000000000000..1aa26fac30cb
--- /dev/null
+++ b/wizards/source/webwizard/Language.xba
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Language" script:language="StarBasic">Option Explicit
+
+
+
+
+Sub LoadLanguage()
+ If InitResources(&quot;WebWizard&quot;,&quot;wwz&quot;) Then
+ WebWiz_gErrContentNotFound = GetResText(1101)
+ WebWiz_gErrStyleNotFound = GetResText(1102)
+ WebWiz_gErrMainTemplateError = GetResText(1103)
+ WebWiz_gErrWhileReloading = GetResText(1104)
+ WebWiz_gErrWhileLoadStyles = GetResText(1105)
+ WebWiz_gErrMainDocumentError = GetResText(1106)
+ WebWiz_gErrMsg = GetResText(1107)
+ End If
+End Sub
+
+
+Function GetWebWizardPaths() as Boolean
+Dim TemplatePath as String
+ TextureDir = GetOfficeSubPath(&quot;Gallery&quot;,&quot;www-back&quot;)
+ If TextureDir &lt;&gt; &quot;&quot; Then
+ GraphicsDir = GetOfficeSubPath(&quot;Gallery&quot;,&quot;www-graf/&quot;)
+ If GraphicsDir &lt;&gt; &quot;&quot; Then
+ BulletDir = GetOfficeSubPath(&quot;Gallery&quot;, &quot;bullets/&quot;)
+ If BulletDir &lt;&gt; &quot;&quot; Then
+ PhotosDir = GetPathSettings(&quot;Gallery&quot;, False, 1)
+ If PhotosDir &lt;&gt; &quot;&quot; Then
+ TemplatePath = GetOfficeSubPath(&quot;Template&quot;, &quot;wizard/web/&quot;)
+ If TemplatePath &lt;&gt; &quot;&quot; Then
+ SOBitmapPath = GetOfficeSubPath(&quot;Template&quot;, &quot;wizard/bitmap&quot;)
+ If SOBitmapPath &lt;&gt; &quot;&quot; Then
+ GetWebwizardPaths() = True
+ Exit Function
+ End If
+ End If
+ End If
+ End If
+ End If
+ End If
+ DisposeDocument(oBaseDocument)
+ GetWebWizardPaths() = False
+End Function
+
+
+
+Sub OpenWebDialog()
+ Dim sBitmapPath as String
+ Dim BufferNames() as String
+ Dim SelList(0) as Integer
+ SelList(0) = 0
+ MainDialog = LoadDialog(&quot;WebWizard&quot;,&quot;WebWzrd&quot;)
+ DialogModel = MainDialog.Model
+ With DialogModel
+ .cbHelp.Label = GetResText(1000)
+ .Title = GetResText(1001)
+ .cbCancel.Label = GetResText(1002)
+ .cbGoOn.Label = GetResText(1003)
+ .lblTemplate.Label = GetResText(1004)
+ .lblStyle.Label = GetResText(1005)
+ .hlnBackground.Label = GetResText(1006)
+ .optTiled.Label = GetRestext(1007)
+ .optArea.Label = GetResText(1008)
+ .chkSaveasTemplate.Label = GetResText(1010)
+ End With
+
+ BufferNames() = ArrayfromMultiArray(Layout, 1)
+ DialogModel.lbTemplate.StringItemList() = BufferNames()
+ DialogModel.lbTemplate.SelectedItems() = SelList()
+
+
+ BufferNames() = ArrayfromMultiArray(Style, 1)
+ DialogModel.lbStyles.StringItemList() = BufferNames()
+ DialogModel.lbStyles.SelectedItems() = SelList()
+ sBitmapPath = SOBitmapPath &amp; &quot;webwizard.bmp&quot;
+
+ DialogModel.ImagePreview.ImageURL = sBitmapPath
+ ToggleOptionButtons(DialogModel, bWithBackGraphic)
+ MainDialog.GetControl(&quot;lbTemplate&quot;).SetFocus()
+ DialogModel.cbGoOn.DefaultButton = True
+ DialogModel.ImagePreview.BackGroundColor = RGB(0,60,126)
+End Sub</script:module> \ No newline at end of file
diff --git a/wizards/source/webwizard/WebWzrd.xdl b/wizards/source/webwizard/WebWzrd.xdl
new file mode 100644
index 000000000000..be1bec77eb40
--- /dev/null
+++ b/wizards/source/webwizard/WebWzrd.xdl
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
+<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="WebWzrd" dlg:left="96" dlg:top="28" dlg:width="270" dlg:height="210" dlg:help-url="HID:34200" dlg:closeable="true" dlg:moveable="true">
+ <dlg:bulletinboard>
+ <dlg:button dlg:id="cbCancel" dlg:tab-index="0" dlg:left="6" dlg:top="190" dlg:width="50" dlg:height="14" dlg:help-url="HID:34206" dlg:value="Cancel" dlg:button-type="cancel"/>
+ <dlg:button dlg:id="cbHelp" dlg:tab-index="1" dlg:left="66" dlg:top="190" dlg:width="50" dlg:height="14" dlg:tag="HID:34200" dlg:value="cbHelp" dlg:button-type="help"/>
+ <dlg:button dlg:id="cbGoOn" dlg:tab-index="2" dlg:left="214" dlg:top="190" dlg:width="50" dlg:height="14" dlg:help-url="HID:34205" dlg:default="true" dlg:value="cbGoOn" dlg:button-type="ok"/>
+ <dlg:img dlg:id="ImagePreview" dlg:tab-index="3" dlg:left="6" dlg:top="6" dlg:width="258" dlg:height="26" dlg:scale-image="false"/>
+ <dlg:menulist dlg:id="lbTemplate" dlg:tab-index="4" dlg:left="6" dlg:top="53" dlg:width="110" dlg:height="94" dlg:help-url="HID:34201">
+ <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:WebWizard.HtmlAutoPilotBasic.ReloadCurrentDocument?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:menulist>
+ <dlg:menulist dlg:id="lbStyles" dlg:tab-index="5" dlg:left="154" dlg:top="53" dlg:width="110" dlg:height="94" dlg:help-url="HID:34202">
+ <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:WebWizard.HtmlAutoPilotBasic.LoadWebPageStyles?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:menulist>
+ <dlg:text dlg:id="lblTemplate" dlg:tab-index="6" dlg:left="6" dlg:top="42" dlg:width="110" dlg:height="10"/>
+ <dlg:text dlg:id="lblStyle" dlg:tab-index="7" dlg:left="154" dlg:top="42" dlg:width="110" dlg:height="10" dlg:value="lblStyle"/>
+ <dlg:checkbox dlg:id="chkSaveasTemplate" dlg:tab-index="8" dlg:left="6" dlg:top="164" dlg:width="110" dlg:height="12" dlg:help-url="HID:34207" dlg:value="chkSaveasTemplate" dlg:checked="false"/>
+ <dlg:radiogroup>
+ <dlg:radio dlg:id="optTiled" dlg:tab-index="9" dlg:left="161" dlg:top="164" dlg:width="96" dlg:height="10" dlg:tag="11" dlg:help-url="HID:34208" dlg:value="optTiled" dlg:checked="true">
+ <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:WebWizard.Common.SetBackGraphicStyle?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:radio>
+ <dlg:radio dlg:id="optArea" dlg:tab-index="10" dlg:left="161" dlg:top="177" dlg:width="96" dlg:height="10" dlg:tag="10" dlg:help-url="HID:34209" dlg:value="optArea">
+ <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="WebWizard.HtmlAutoPilotBasic.SetBackGraphicStyle" script:language="StarBasic"/>
+ </dlg:radio>
+ </dlg:radiogroup>
+ <dlg:fixedline dlg:id="hlnBackground" dlg:tab-index="11" dlg:left="154" dlg:top="152" dlg:width="110" dlg:height="9" dlg:value="hlnBackground"/>
+ </dlg:bulletinboard>
+</dlg:window> \ No newline at end of file
diff --git a/wizards/source/webwizard/delzip b/wizards/source/webwizard/delzip
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/wizards/source/webwizard/delzip
diff --git a/wizards/source/webwizard/dialog.xlb b/wizards/source/webwizard/dialog.xlb
new file mode 100644
index 000000000000..d1b9cb066f0c
--- /dev/null
+++ b/wizards/source/webwizard/dialog.xlb
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="WebWizard" library:readonly="true" library:passwordprotected="false">
+ <library:element library:name="WebWzrd"/>
+</library:library>
diff --git a/wizards/source/webwizard/makefile.mk b/wizards/source/webwizard/makefile.mk
new file mode 100644
index 000000000000..415e08bf9475
--- /dev/null
+++ b/wizards/source/webwizard/makefile.mk
@@ -0,0 +1,53 @@
+#*************************************************************************
+#
+# 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.
+#
+#*************************************************************************
+PRJ=..$/..
+
+PRJNAME=wizards
+TARGET=webwizardall
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+.INCLUDE : $(PRJ)$/util$/target.pmk
+
+# --- Files --------------------------------------------------------
+
+#
+# testresource.
+#
+SRS2NAME = webwizar
+SRC2FILES= webwizar.src
+RESLIB2SRSFILES= $(SRS)$/webwizar.srs
+RESLIB2NAME= wwz
+
+ZIP1TARGET = $(WEBWIZARD_ALL_TARGET)
+ZIP1LIST = *.xdl *.xba *.xlb
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
+
diff --git a/wizards/source/webwizard/script.xlb b/wizards/source/webwizard/script.xlb
new file mode 100644
index 000000000000..1045820b7002
--- /dev/null
+++ b/wizards/source/webwizard/script.xlb
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="WebWizard" library:readonly="true" library:passwordprotected="false">
+ <library:element library:name="HtmlAutoPilotBasic"/>
+ <library:element library:name="Language"/>
+ <library:element library:name="Bullets"/>
+ <library:element library:name="Common"/>
+</library:library>
diff --git a/wizards/source/webwizard/webwizar.src b/wizards/source/webwizard/webwizar.src
new file mode 100644
index 000000000000..19d77d89f4a9
--- /dev/null
+++ b/wizards/source/webwizard/webwizar.src
@@ -0,0 +1,167 @@
+/*************************************************************************
+ *
+ * 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.
+ *
+ ************************************************************************/#define WEBDIALOG 1000
+/*
+#define WEBERROR 1100
+// --------------------------------------------------------------------
+
+String WEBDIALOG
+{
+ Text [ en-US ] = "~Help";
+};
+
+
+String WEBDIALOG + 1
+{
+ Text [ en-US ] = "AutoPilot Web Page";
+};
+
+
+
+
+String WEBDIALOG + 2
+{
+ Text [ en-US ] = "~Cancel";
+};
+
+String WEBDIALOG + 3
+{
+ Text [ en-US ] = "C~reate";
+};
+
+
+String WEBDIALOG + 4
+{
+ Text [ en-US ] = "Which template should be used?";
+};
+
+String WEBDIALOG + 5
+{
+ Text [ en-US ] = "Which layout should be used?";
+};
+
+
+String WEBDIALOG + 6
+{
+ Text [ en-US ] = "Background Image";
+};
+
+
+
+String WEBDIALOG + 7
+{
+ Text [ en-US ] = "~Tiled";
+};
+
+
+String WEBDIALOG + 8
+{
+ Text [ en-US ] = "~Scaled";
+};
+
+
+String WEBDIALOG + 9
+{
+ Text [ en-US ] = "Edit document";
+};
+
+String WEBDIALOG + 10
+{
+ Text [ en-US ] = "Create template";
+};
+
+
+String WEBERROR + 1
+{
+ Text [ en-US ] = "A template for the page setup could not be found.";
+};
+
+String WEBERROR + 2
+{
+ Text [ en-US ] = "A Style for the Page Style could not be found.";
+};
+
+String WEBERROR + 3
+{
+ Text [ en-US ] = "An error occurred as the templates were being interpreted.";
+};
+
+String WEBERROR + 4
+{
+ Text [ en-US ] = "An error occurred as the template was being refreshed.";
+};
+
+String WEBERROR + 5
+{
+ Text [ en-US ] = "An error occurred while applying the Styles.";
+};
+
+String WEBERROR + 6
+{
+ Text [ en-US ] = "An error occurred while evaluating the documents.";
+};
+
+String WEBERROR + 7
+{
+ Text [ en-US ] = "An error occurred while running the AutoPilot.";
+};
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+*/