summaryrefslogtreecommitdiff
path: root/wizards/source
diff options
context:
space:
mode:
authorBehrend Cornelius <bc@openoffice.org>2001-09-13 13:28:36 +0000
committerBehrend Cornelius <bc@openoffice.org>2001-09-13 13:28:36 +0000
commit956df411b96d914ee4a5c9c9c45282c4b8b20f3e (patch)
treeae2a495cffa1e98b23377d1d85b24543b8232b0e /wizards/source
parent83ef3d38f7668ec31981a87c95b43997d812ef54 (diff)
#91805# 'CreateBookmark' routine improved; HelpIDs fixed
Diffstat (limited to 'wizards/source')
-rw-r--r--wizards/source/formwizard/DBMeta.xba4
-rw-r--r--wizards/source/formwizard/DlgFormDB.xdl6
-rw-r--r--wizards/source/formwizard/FormWizard.xba17
3 files changed, 21 insertions, 6 deletions
diff --git a/wizards/source/formwizard/DBMeta.xba b/wizards/source/formwizard/DBMeta.xba
index bb0fcabbc5fa..44ed39704d3e 100644
--- a/wizards/source/formwizard/DBMeta.xba
+++ b/wizards/source/formwizard/DBMeta.xba
@@ -229,7 +229,7 @@ Dim a as Integer
Dim LocCommandTypes(MaxTableIndex + MaxQueryIndex + 1) as Integer
For i = 0 To MaxTableIndex
LocCommandTypes(i) = com.sun.star.sdb.CommandType.TABLE
- Next i
+ Next i
a = i
For i = 0 To MaxQueryIndex
LocCommandTypes(a) = com.sun.star.sdb.CommandType.QUERY
@@ -244,5 +244,5 @@ Sub GetCurrentMetaValues(Index as Integer)
CurControlType = FieldMetaValues(Index,2)
CurControlName = FieldMetaValues(Index,3)
CurFieldName = FieldNames(Index)
-End Sub
+End Sub
</script:module> \ No newline at end of file
diff --git a/wizards/source/formwizard/DlgFormDB.xdl b/wizards/source/formwizard/DlgFormDB.xdl
index d30ad3bc2c4e..3b539fae7e1d 100644
--- a/wizards/source/formwizard/DlgFormDB.xdl
+++ b/wizards/source/formwizard/DlgFormDB.xdl
@@ -1,6 +1,6 @@
<?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: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="2" dlg:help-url="HID:34400">
<dlg:bulletinboard>
<dlg:text dlg:id="lblSelFields" dlg:tab-index="0" dlg:left="154" dlg:top="70" dlg:width="110" dlg:height="8" dlg:page="1" dlg:value="lblSelFields"/>
<dlg:menulist dlg:id="lstDatabases" dlg:tab-index="1" dlg:left="6" dlg:top="51" dlg:width="110" dlg:height="12" dlg:page="1" dlg:help-url="HID:34410" dlg:spin="true">
@@ -16,7 +16,7 @@
<dlg:button dlg:id="cmdHelp" dlg:tab-index="5" dlg:left="63" dlg:top="190" dlg:width="53" dlg:height="14" dlg:tag="34400" dlg:help-url="HiD:34400" dlg:value="cmdHelp">
<script:event script:event-name="on-performaction" script:location="application" script:macro-name="Tools.Recursive.ShowHelperDialog" script:language="StarBasic"/>
</dlg:button>
- <dlg:button dlg:id="cmdBack" dlg:tab-index="6" dlg:left="155" dlg:top="190" dlg:width="53" dlg:height="14" dlg:help-url="HID:34401" dlg:value="cmdBack">
+ <dlg:button dlg:id="cmdBack" dlg:tab-index="6" 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:location="application" script:macro-name="FormWizard.FormWizard.PreviousStep" script:language="StarBasic"/>
</dlg:button>
<dlg:button dlg:id="cmdGoOn" dlg:tab-index="7" dlg:left="211" dlg:top="190" dlg:width="53" dlg:height="14" dlg:help-url="HID:34403" dlg:value="cmdGoOn">
@@ -86,7 +86,7 @@
<dlg:radio dlg:id="optTiled" dlg:tab-index="30" 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">
<script:event script:event-name="on-mouseup" script:location="application" script:macro-name="WebWizard.Common.SetBackGraphicStyle" script:language="StarBasic"/>
</dlg:radio>
- <dlg:radio dlg:id="optArea" dlg:tab-index="31" dlg:left="156" dlg:top="168" dlg:width="81" dlg:height="10" dlg:page="2" dlg:tag="10" dlg:help-url="HID:34443" dlg:value="optArea">
+ <dlg:radio dlg:id="optArea" dlg:tab-index="31" 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:location="application" script:macro-name="WebWizard.Common.SetBackGraphicStyle" script:language="StarBasic"/>
</dlg:radio>
</dlg:radiogroup>
diff --git a/wizards/source/formwizard/FormWizard.xba b/wizards/source/formwizard/FormWizard.xba
index 7372ddd0032a..1524ec8156d0 100644
--- a/wizards/source/formwizard/FormWizard.xba
+++ b/wizards/source/formwizard/FormWizard.xba
@@ -276,6 +276,10 @@ Dim oMasterKey as Object
Dim oFilters() as Object
Dim sTargetPath as String
Dim sBookmarkName as String
+Dim oDBBookmarks as Object
+Dim bLinkExists as Boolean
+Dim i as Integer
+Dim sBaseBookmarkName as String
oMasterKey = GetRegistryKeyContent(&quot;org.openoffice.Office.TypeDetection/&quot;)
oFilters() = oMasterKey.Types
FilterNames(0,0) = oFilters.GetByName(&quot;writer_StarOffice_XML_Writer&quot;).UIName
@@ -287,7 +291,18 @@ Dim sBookmarkName as String
sTargetPath = StoreDocument(oDocument, FilterNames(), &quot;Form_&quot; &amp; sDBName &amp; &quot;.&quot; &amp; TableName, WorkPath)
If sTargetPath &lt;&gt; &quot;&quot; Then
sBookmarkName = GetFileNamewithoutExtension(FileNameoutofPath(sTargetPath))
- oDatasource.getBookmarks().insertByName(sBookmarkName, 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
DlgFormDB.EndExecute()
End If