[Libreoffice-commits] core.git: wizards/source
Jean-Pierre Ledure
jp at ledure.be
Sat Aug 29 09:33:47 PDT 2015
wizards/source/access2base/DoCmd.xba | 4 ++--
wizards/source/access2base/Field.xba | 2 +-
wizards/source/access2base/Trace.xba | 4 ++--
wizards/source/access2base/acConstants.xba | 9 ++++++++-
4 files changed, 13 insertions(+), 6 deletions(-)
New commits:
commit 723b32783f8c411d410242639d9dbd0cadc61c43
Author: Jean-Pierre Ledure <jp at ledure.be>
Date: Sat Aug 29 18:30:30 2015 +0200
Access2Base - NewLine distinction Windows - Linux+
Change-Id: I09be5a10ae301b42daf446852e6cf8ba3ed2e51e
diff --git a/wizards/source/access2base/DoCmd.xba b/wizards/source/access2base/DoCmd.xba
index 261aa26..ce20dac 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 = ","
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
diff --git a/wizards/source/access2base/Field.xba b/wizards/source/access2base/Field.xba
index 053245e..7daa9a9 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 > cstMaxLength Then Exit Do
- sMemo = sMemo & sBuffer & Chr(10)
+ sMemo = sMemo & sBuffer & vbNewLine
Loop
If lFileLength = 0 Or lFileLength > cstMaxLength Then
Close #iFile
diff --git a/wizards/source/access2base/Trace.xba b/wizards/source/access2base/Trace.xba
index 3c2943a..3b3f4df 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("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")
diff --git a/wizards/source/access2base/acConstants.xba b/wizards/source/access2base/acConstants.xba
index 919f473..b89e279 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 = "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
More information about the Libreoffice-commits
mailing list