tdf#142180 Swapped comparison operators for static strings

It seems that, for some reason, the comparison operators for
strings in basic were swapped in the code that evaluates
string comparisons at compile-time. This is what caused
bug #142180. This commit simply swaps the operators and
should fix the bug.

Change-Id: I14f90db8598f2f7f8b709e26902986e1f64af576
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115983
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
diff --git a/basic/qa/basic_coverage/test_string_literal_comparison.vb b/basic/qa/basic_coverage/test_string_literal_comparison.vb
new file mode 100644
index 0000000..af63ede5
--- /dev/null
+++ b/basic/qa/basic_coverage/test_string_literal_comparison.vb
@@ -0,0 +1,19 @@
' This file is part of the LibreOffice project.
'
' This Source Code Form is subject to the terms of the Mozilla Public
' License, v. 2.0. If a copy of the MPL was not distributed with this
' file, You can obtain one at http://mozilla.org/MPL/2.0/.
'

Function doUnitTest as Integer
    ' tdf#142180 - Invalid text comparison result in Basic

    doUnitTest = 0
    If ( "Z" < "A" ) Then Exit Function
    If ( "A" > "Z" ) Then Exit Function
    If ( "A" < "A" ) Then Exit Function
    If ( "A" > "A" ) Then Exit Function
    If ( "Z" <= "A" ) Then Exit Function
    If ( "A" >= "Z" ) Then Exit Function
    doUnitTest = 1
End Function
diff --git a/basic/source/comp/exprnode.cxx b/basic/source/comp/exprnode.cxx
index 1771da0..4192ceb 100644
--- a/basic/source/comp/exprnode.cxx
+++ b/basic/source/comp/exprnode.cxx
@@ -274,16 +274,16 @@ void SbiExprNode::FoldConstantsBinaryNode(SbiParser* pParser)
                nVal = ( eRes != 0 ) ? SbxTRUE : SbxFALSE;
                break;
            case LT:
                nVal = ( eRes < 0 ) ? SbxTRUE : SbxFALSE;
                break;
            case GT:
                nVal = ( eRes > 0 ) ? SbxTRUE : SbxFALSE;
                break;
            case GT:
                nVal = ( eRes < 0 ) ? SbxTRUE : SbxFALSE;
                break;
            case LE:
                nVal = ( eRes <= 0 ) ? SbxTRUE : SbxFALSE;
                nVal = ( eRes >= 0 ) ? SbxTRUE : SbxFALSE;
                break;
            case GE:
                nVal = ( eRes >= 0 ) ? SbxTRUE : SbxFALSE;
                nVal = ( eRes <= 0 ) ? SbxTRUE : SbxFALSE;
                break;
            default:
                pParser->Error( ERRCODE_BASIC_CONVERSION );