summaryrefslogtreecommitdiffstats
path: root/wizards
diff options
context:
space:
mode:
authorJean-Pierre Ledure <jp@ledure.be>2015-08-29 18:30:30 +0200
committerJean-Pierre Ledure <jp@ledure.be>2015-08-29 18:30:30 +0200
commit723b32783f8c411d410242639d9dbd0cadc61c43 (patch)
treecea55d8c38ac6cc1390f66a5bf93b43a62d1c043 /wizards
parentXOutBitmap::GraphicToBase64 can return bool (diff)
downloadcore-723b32783f8c411d410242639d9dbd0cadc61c43.tar.gz
core-723b32783f8c411d410242639d9dbd0cadc61c43.zip
Access2Base - NewLine distinction Windows - Linux+
Change-Id: I09be5a10ae301b42daf446852e6cf8ba3ed2e51e
Diffstat (limited to 'wizards')
-rw-r--r--wizards/source/access2base/DoCmd.xba4
-rw-r--r--wizards/source/access2base/Field.xba2
-rw-r--r--wizards/source/access2base/Trace.xba4
-rw-r--r--wizards/source/access2base/acConstants.xba9
4 files changed, 13 insertions, 6 deletions
diff --git a/wizards/source/access2base/DoCmd.xba b/wizards/source/access2base/DoCmd.xba
index 261aa26b5ce8..ce20dac48ce3 100644
--- a/wizards/source/access2base/DoCmd.xba
+++ b/wizards/source/access2base/DoCmd.xba
@@ -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 = &quot;,&quot;
Const cstSpace = &quot;%20&quot;
-Const cstCR = &quot;%0A&quot;
+Const cstLF = &quot;%0A&quot;
If _ErrorHandler() Then On Local Error Goto Error_Function
@@ -2432,7 +2432,7 @@ Const cstCR = &quot;%0A&quot;
If UBound(pvBcc) &gt;= 0 Then sBcc = Trim(Join(pvBcc, cstComma)) Else sBcc = &quot;&quot;
If psSubject &lt;&gt; &quot;&quot; Then sSubject = Join(Split(psSubject, &quot; &quot;), cstSpace) Else sSubject = &quot;&quot;
If psBody &lt;&gt; &quot;&quot; Then
- sBody = Join(Split(psBody, Chr(13)), cstCR)
+ sBody = Join(Split(Join(Split(psBody, Chr(13)), &quot;&quot;), Chr(10), cstLF)
sBody = Join(Split(sBody, &quot; &quot;), cstSpace)
End If
diff --git a/wizards/source/access2base/Field.xba b/wizards/source/access2base/Field.xba
index 053245eaa103..7daa9a9d9bb2 100644
--- a/wizards/source/access2base/Field.xba
+++ b/wizards/source/access2base/Field.xba
@@ -677,7 +677,7 @@ Const cstMaxLength = 64000
Line Input #iFile, sBuffer
lFileLength = lFileLength + Len(sBuffer) + 1
If lFileLength &gt; cstMaxLength Then Exit Do
- sMemo = sMemo &amp; sBuffer &amp; Chr(10)
+ sMemo = sMemo &amp; sBuffer &amp; vbNewLine
Loop
If lFileLength = 0 Or lFileLength &gt; cstMaxLength Then
Close #iFile
diff --git a/wizards/source/access2base/Trace.xba b/wizards/source/access2base/Trace.xba
index 3c2943a7be96..3b3f4dff85c5 100644
--- a/wizards/source/access2base/Trace.xba
+++ b/wizards/source/access2base/Trace.xba
@@ -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(&quot;Access2BaseDev&quot;) Then
@@ -85,7 +85,7 @@ Dim i As Integer, sText As String, iOKCancel As Integer
Loop While i &lt;&gt; _A2B_.TraceLogLast
oDump.Enabled = 1 &apos; Enable DumpToFile only if there is something to dump
End If
- If Len(sText) &gt; 0 Then sText = Left(sText, Len(sText) - 1) &apos; Skip last linefeed
+ If Len(sText) &gt; 0 Then sText = Left(sText, Len(sText) - Len(sLineBreak)) &apos; Skip last linefeed
oTraceLog.Text = sText
Else
oTraceLog.Text = _GetLabel(&quot;DLGTRACE_TXTTRACELOG_TEXT&quot;)
diff --git a/wizards/source/access2base/acConstants.xba b/wizards/source/access2base/acConstants.xba
index 919f4736f2e3..b89e279d2089 100644
--- a/wizards/source/access2base/acConstants.xba
+++ b/wizards/source/access2base/acConstants.xba
@@ -8,7 +8,7 @@ REM ============================================================================
Option Explicit
REM Access2Base -----------------------------------------------------
-Global Const Access2Base_Version = &quot;1.3.0&quot;
+Global Const Access2Base_Version = &quot;1.4.0&quot;
REM AcCloseSave
REM -----------------------------------------------------------------
@@ -368,4 +368,11 @@ Global Const msoBarTypeFloater = 12 &apos; Floating window
Global Const msoControlButton = 1 &apos; Command button
Global Const msoControlPopup = 10 &apos; Popup, submenu
+REM New Line
+REM -----------------------------------------------------------------
+Public Function vbNewLine() As String
+Const cstWindows = 1
+ If GetGuiType() = cstWindows Then vbNewLine = Chr(13) &amp; Chr(10) Else vbNewLine = Chr(10)
+End Function &apos; vbNewLine V1.4.0
+
</script:module> \ No newline at end of file