summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2004-05-19 12:23:48 +0000
committerKurt Zenker <kz@openoffice.org>2004-05-19 12:23:48 +0000
commit1fd1c0dc0eeb764808b493432600a09713bf5066 (patch)
treef3f389d849b2b5c011b6c618f31ff80d337f6b24 /wizards
parent0a4c4818f5e5441322c330afd732e9dd0288d95f (diff)
INTEGRATION: CWS qwizards1 (1.19.58); FILE MERGED
2004/03/09 15:14:25 tv 1.19.58.1: compatible with new Letter Wizard
Diffstat (limited to 'wizards')
-rw-r--r--wizards/source/template/Correspondence.xba47
1 files changed, 35 insertions, 12 deletions
diff --git a/wizards/source/template/Correspondence.xba b/wizards/source/template/Correspondence.xba
index a6b42434b79e..03c7ef77fbe8 100644
--- a/wizards/source/template/Correspondence.xba
+++ b/wizards/source/template/Correspondence.xba
@@ -8,29 +8,51 @@ 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()
+ 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)
- 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)
+ 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;)
@@ -50,7 +72,6 @@ End Function
Sub OK
Dim ParaBreak
Dim sDocLang as String
-Dim bDBFields as Boolean
Dim oSearchDesc as Object
Dim oFoundAll as Object
Dim oFound as Object
@@ -66,11 +87,13 @@ Dim oDocSettings as Object
Dim oContext as Object
Dim bDBvalid as Boolean
&apos;On Local Error Goto GENERALERROR
- bDBFields = DialogModel.Optmerge.State &apos;database or placeholder
- TemplateDialog.EndExecute()
- DialogExited = TRUE
-
+ 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