Bugzilla – Attachment 116290 Details for
Bug 91828
BASIC - CurrentValues are empty after opening a form which triggers a macro - incorrect event execution sequence onLoad should not occur after onRecordChange
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
macro for LO 4.0.6
snippet.txt (text/plain), 2.04 KB, created by
christian_kuhn
on 2015-06-04 18:52:09 UTC
(
hide
)
Description:
macro for LO 4.0.6
Filename:
MIME Type:
Creator:
christian_kuhn
Created:
2015-06-04 18:52:09 UTC
Size:
2.04 KB
patch
obsolete
>Sub Check_rl_term_context > Dim Sql As String > Dim Statement As Object > Dim Result As Object > Dim Found As Boolean > Found = False > tblTerms = """Table_1""" > tblTerms1 = tblTerms + " AS " + """RL > Intern > Begriffe > Elementarbegriffe1""" > tblTerms2 = tblTerms + " AS " + """RL > Intern > Begriffe > Elementarbegriffe2""" > tblContexts = """Table_2""" > colTerms1ID = """RL > Intern > Begriffe > Elementarbegriffe1""" + "." + """Nr.""" > colTerms1Name = """RL > Intern > Begriffe > Elementarbegriffe1""" + "." + """Name""" > colTerms2ID = """RL > Intern > Begriffe > Elementarbegriffe2""" + "." + """Nr.""" > colTerms2Name = """RL > Intern > Begriffe > Elementarbegriffe2""" + "." + """Name""" > colContextsID = tblContexts + "." + """Nr.""" > colContextsTermID = tblContexts + "." + """Begriff: Nr.""" > colContextsCntxtID = tblContexts + "." + """Kontext: Nr.""" > MainForm = ThisComponent.DrawPage.Forms.GetByName("frm_tbl2") > ID = MainForm.GetByName("Nr-Feld") > Term = MainForm.GetByName("Begriff-Feld") > Context = MainForm.GetByName("Kontext-Feld") > IDString = ID.CurrentValue > TermString = Term.CurrentValue > CtxtString = Context.CurrentValue > >' MsgBox("Test") > > Sql = "SELECT " + colContextsID + " FROM " + tblContexts + ", " + tblTerms1 + ", " + tblTerms2 + " WHERE " + _ > colContextsTermID + " = " + colTerms1ID + " AND " + colTerms1Name + " = '" + TermString + "' AND " + _ > colContextsCntxtID + " = " + colTerms2ID + " AND " + colTerms2Name + " = '" + CtxtString + "' " > Statement = MainForm.activeConnection.CreateStatement() > Result = Statement.ExecuteQuery(Sql) > While (Not Found AND Result.Next) > If (StrComp(Result.GetString(1), IDString) <> 0) Then > MsgBox("Der Begriff wurde in diesen Kontext schon eingetragen.") > Term.Reset() > Context.Reset() > Found = True > End If > Wend >End Sub
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 91828
:
116256
| 116290 |
116451
|
171272