Kaydet (Commit) 723b3278 authored tarafından Jean-Pierre Ledure's avatar Jean-Pierre Ledure

Access2Base - NewLine distinction Windows - Linux+

Change-Id: I09be5a10ae301b42daf446852e6cf8ba3ed2e51e
üst d00ca13f
......@@ -2423,7 +2423,7 @@ Private Function _SendWithoutAttachment(ByVal pvTo As Variant _
Dim sMailTo As String, sTo As String, sCc As String, sBcc As String, sSubject As String, sBody As String, oDispatch As Object
Const cstComma = ","
Const cstSpace = "%20"
Const cstCR = "%0A"
Const cstLF = "%0A"
If _ErrorHandler() Then On Local Error Goto Error_Function
......@@ -2432,7 +2432,7 @@ Const cstCR = "%0A"
If UBound(pvBcc) >= 0 Then sBcc = Trim(Join(pvBcc, cstComma)) Else sBcc = ""
If psSubject <> "" Then sSubject = Join(Split(psSubject, " "), cstSpace) Else sSubject = ""
If psBody <> "" Then
sBody = Join(Split(psBody, Chr(13)), cstCR)
sBody = Join(Split(Join(Split(psBody, Chr(13)), ""), Chr(10), cstLF)
sBody = Join(Split(sBody, " "), cstSpace)
End If
......
......@@ -677,7 +677,7 @@ Const cstMaxLength = 64000
Line Input #iFile, sBuffer
lFileLength = lFileLength + Len(sBuffer) + 1
If lFileLength > cstMaxLength Then Exit Do
sMemo = sMemo & sBuffer & Chr(10)
sMemo = sMemo & sBuffer & vbNewLine
Loop
If lFileLength = 0 Or lFileLength > cstMaxLength Then
Close #iFile
......
......@@ -32,7 +32,7 @@ Public Sub TraceConsole()
If _ErrorHandler() Then On Local Error Goto Error_Sub
Dim sLineBreak As String, oDialogLib As Object, oTraceDialog As Object
sLineBreak = Chr(10)
sLineBreak = vbNewLine
Set oDialogLib = DialogLibraries
If oDialogLib.hasByName("Access2BaseDev") Then
......@@ -85,7 +85,7 @@ Dim i As Integer, sText As String, iOKCancel As Integer
Loop While i <> _A2B_.TraceLogLast
oDump.Enabled = 1 ' Enable DumpToFile only if there is something to dump
End If
If Len(sText) > 0 Then sText = Left(sText, Len(sText) - 1) ' Skip last linefeed
If Len(sText) > 0 Then sText = Left(sText, Len(sText) - Len(sLineBreak)) ' Skip last linefeed
oTraceLog.Text = sText
Else
oTraceLog.Text = _GetLabel("DLGTRACE_TXTTRACELOG_TEXT")
......
......@@ -8,7 +8,7 @@ REM ============================================================================
Option Explicit
REM Access2Base -----------------------------------------------------
Global Const Access2Base_Version = "1.3.0"
Global Const Access2Base_Version = "1.4.0"
REM AcCloseSave
REM -----------------------------------------------------------------
......@@ -368,4 +368,11 @@ Global Const msoBarTypeFloater = 12 ' Floating window
Global Const msoControlButton = 1 ' Command button
Global Const msoControlPopup = 10 ' Popup, submenu
REM New Line
REM -----------------------------------------------------------------
Public Function vbNewLine() As String
Const cstWindows = 1
If GetGuiType() = cstWindows Then vbNewLine = Chr(13) & Chr(10) Else vbNewLine = Chr(10)
End Function ' vbNewLine V1.4.0
</script:module>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment