#87217# Correct knot when asking for the actual DB field name
This commit is contained in:
parent
4560b1825e
commit
a7d419ed71
1 changed files with 8 additions and 8 deletions
|
@ -37,9 +37,9 @@ Function LoadLanguageCorrespondence() as Boolean
|
|||
End Function
|
||||
|
||||
|
||||
Function GetFieldName(oFieldKnot as Object, GeneralFieldName as String)
|
||||
Function GetFieldName(oFieldKnot as Object, GeneralFieldName as String)
|
||||
If oFieldKnot.HasByName(GeneralFieldName) Then
|
||||
GetFieldName = oFieldKnot.GetByName(GeneralFieldName).FieldName
|
||||
GetFieldName = oFieldKnot.GetByName(GeneralFieldName).DatabaseFieldName
|
||||
Else
|
||||
GetFieldName = ""
|
||||
End If
|
||||
|
@ -63,7 +63,7 @@ Dim oFields as Object
|
|||
Dim oDocSettings as Object
|
||||
|
||||
bDBFields = DialogModel.Optmerge.State 'db oder PLatzhalter
|
||||
|
||||
|
||||
If bDBFields Then
|
||||
oDBAccess = GetRegistryKeyContent("org.openoffice.Office.DataAccess/AddressBook/")
|
||||
sAddressbook = oDBAccess.DataSourceName
|
||||
|
@ -83,7 +83,7 @@ Dim oDocSettings as Object
|
|||
|
||||
TemplateDialog.EndExecute()
|
||||
DialogExited = TRUE
|
||||
|
||||
|
||||
ParaBreak = com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK
|
||||
oDocument = StarDesktop.ActiveFrame.Controller.Model
|
||||
If bDBFields Then
|
||||
|
@ -91,11 +91,11 @@ Dim oDocSettings as Object
|
|||
oDocSettings = oDocument.createInstance("com.sun.star.document.DocumentSettings")
|
||||
oDocSettings.CurrentDatabaseDataSource = sAddressbook
|
||||
oDocSettings.CurrentDatabaseCommand = Table
|
||||
oDocSettings.CurrentDatabaseCommandType = 0
|
||||
oDocSettings.CurrentDatabaseCommandType = 0
|
||||
End If
|
||||
oBookmarks = oDocument.Bookmarks
|
||||
oText = oDocument.Text
|
||||
|
||||
|
||||
oSearchDesc = oDocument.createsearchDescriptor()
|
||||
oSearchDesc.SearchRegularExpression = True
|
||||
oSearchDesc.SearchWords = True
|
||||
|
@ -128,7 +128,7 @@ Dim oDocSettings as Object
|
|||
Dim aURL as new com.sun.star.util.URL
|
||||
aURL.complete = ".component:DB/DataSourceBrowser"
|
||||
oTransformer = createUnoService("com.sun.star.util.URLTransformer")
|
||||
oTransformer.parseStrict(aURL)
|
||||
oTransformer.parseStrict(aURL)
|
||||
oDisp = oDocument.getCurrentController.getFrame.queryDispatch(aURL, "_beamer", 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 = "DataSourceName"
|
||||
|
@ -139,7 +139,7 @@ Dim oDocSettings as Object
|
|||
aArgs(3).Value = Table
|
||||
oDisp.dispatch(aURL, aArgs())
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue