[Libreoffice-commits] core.git: wizards/source

Jean-Pierre Ledure jp at ledure.be
Sun Nov 22 02:47:54 PST 2015


 wizards/source/access2base/Database.xba |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

New commits:
commit 960fdcbabe48cd426b78c9dcac66afa21d655883
Author: Jean-Pierre Ledure <jp at ledure.be>
Date:   Sun Nov 22 11:44:50 2015 +0100

    Access2Base - OutputStringToHTML review
    
    Addition of "<a id= ...>" tag pattern
    Typos
    
    Change-Id: Id03e6224dc91249a9e6246ff94a80427ae76a86e

diff --git a/wizards/source/access2base/Database.xba b/wizards/source/access2base/Database.xba
index 4d605d0..ddca57f 100644
--- a/wizards/source/access2base/Database.xba
+++ b/wizards/source/access2base/Database.xba
@@ -1109,7 +1109,7 @@ Const cstMaxRows = 200
 								vTdClass() = _AddArray(vTdClass, "char")
 								Print #piFile, "     <td" & _OutputClassToHTML(vTdClass) & ">" & _OutputStringToHTML(vDataCell) & "</td>"
 							Case Else
-								Print #piFile, "     <td" & _OutputClassToHTML(vTdClass) & ">" & _CStr(vDataCell) & "</td"
+								Print #piFile, "     <td" & _OutputClassToHTML(vTdClass) & ">" & _CStr(vDataCell) & "</td>"
 						End Select
 					End If
 				Next i
@@ -1131,7 +1131,8 @@ Error_Function:
 	TraceError(TRACEWARNING, Err, "_OutputDataToHTML", Erl)
 	_OutputDataToHTML = False
 	Resume Exit_Function
-End Function
+End Function	'	_OutputDataToHTML
+
 REM -----------------------------------------------------------------------------------------------------------------------
 Private Function _OutputDateToHTML(ByVal psDate As Date) As String
 '	Converts input date to HTML compatible string
@@ -1184,7 +1185,7 @@ Dim i As Integer, l As Long
 	vPatterns = Array( _
 					"&quot;", "&amp;", "&apos;", "&lt;", "&gt;", "&nbsp;" _
 					, "<pre>", "</pre>", "<br>" _
-					, "<a href=""", "</a>", "<img src=""" _
+					, "<a href=""", "<a id=""", "</a>", "<img src=""" _
 					, "<b>", "</b>", "<u>", "</u>", "<i>", "</i>" _
 					)
 
@@ -1210,14 +1211,14 @@ Dim i As Integer, l As Long
 		'	Process hyperlink patterns and keep others
 		If Len(sPattern) > 0 Then
 			Select Case LCase(sPattern)
-				Case "<a href=""", "<img src="""
+				Case "<a href=""", "<a id=""", "<img src="""
 					'	Up to next quote, url-encode
 					lNextQuote = 0
 					lUrl = lPattern + Len(sPattern)
 					lNextQuote = InStr(lUrl, psString, """", 1)
 					If lNextQuote = 0 Then lNextQuote = Len(psString)			'	Should not happen but, if quoted string not closed ...
 					sUrl = Mid(psString, lUrl, lNextQuote - lUrl)
-					sOutput = sOutput & sPattern & ConvertToUrl(sUrl) & """"
+					sOutput = sOutput & sPattern & Iif(sPattern = "<a id=""", sUrl, ConvertToUrl(sUrl)) & """"
 					lCurrentChar = lNextQuote + 1
 					bQuote = False
 					bTagEnd = False


More information about the Libreoffice-commits mailing list