tdf#159930 Treat special case with no integer digit

Number format with no integer digit, such as "+.##;-.##"
was placing string with the decimal separator.
This change insert string at the begining of the number string as
expected.
This format code is saved as "+#.##;-#.##" in ODF, but display is the
same; so no change is made on this side.

Add unit test for this format

Change-Id: I74fbe0e9a5303672ac7927d37922c06a762feba6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168577
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
(cherry picked from commit bd2ffb6f33e549483b41f6235ba64fa735205d38)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168797
diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx
index 389195e..3a8f5f5 100644
--- a/svl/qa/unit/svl.cxx
+++ b/svl/qa/unit/svl.cxx
@@ -1823,6 +1823,11 @@ void Test::testUserDefinedNumberFormats()
        sExpected = "Value= 12,345.00";
        checkPreviewString(aFormatter, sCode, 12345, LANGUAGE_ENGLISH_US, sExpected);
    }
    {   // tdf#159930 no digit in integer part
        sCode = "+.000;-.000";
        sExpected = "+3.142"; // without the patch is would display "3+.142"
        checkPreviewString(aFormatter, sCode, M_PI, LANGUAGE_ENGLISH_US, sExpected);
    }
}

void Test::testNfEnglishKeywordsIntegrity()
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 855acc1..4975738 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -4682,6 +4682,12 @@ bool SvNumberformat::ImpNumberFillWithThousands( const NativeNumberWrapper& rNat
            aGrouping.reset();
            [[fallthrough]];
        case NF_SYMBOLTYPE_STRING:
            if ( rInfo.nTypeArray[j] == NF_SYMBOLTYPE_STRING && nDigCnt == 0 )
            {
                // tdf#159930 no integer in format ".###"
                k = 0; // insert string at the beginning
            }
            [[fallthrough]];
        case NF_SYMBOLTYPE_CURRENCY:
        case NF_SYMBOLTYPE_PERCENT:
            if ( rInfo.nTypeArray[j] != NF_SYMBOLTYPE_DECSEP || bAddDecSep )