summaryrefslogtreecommitdiff
path: root/wizards/source/template
diff options
context:
space:
mode:
Diffstat (limited to 'wizards/source/template')
-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
11 files changed, 1318 insertions, 0 deletions
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";
+};
+