[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - 4 commits - configure.ac include/svl include/svtools sc/source svl/source

Andras Timar andras.timar at collabora.com
Sat Apr 8 19:33:52 UTC 2017


 configure.ac                         |    2 +-
 include/svl/zformat.hxx              |    3 ++-
 include/svtools/insdlg.hxx           |    2 +-
 sc/source/filter/excel/xlformula.cxx |    5 +++++
 sc/source/filter/oox/formulabase.cxx |    4 ++--
 svl/source/numbers/zformat.cxx       |   29 +++++++++++------------------
 6 files changed, 22 insertions(+), 23 deletions(-)

New commits:
commit cdf8819e60c8c5c0302a73a9a9dbe586a8446123
Author: Andras Timar <andras.timar at collabora.com>
Date:   Sat Apr 8 18:11:19 2017 +0200

    Bump version to 5.3-5
    
    Change-Id: I9355f7cd94de3371e8b461e881ce9847c50cc7a6

diff --git a/configure.ac b/configure.ac
index 15563f711ca6..03ba74de3278 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no idea.
 
-AC_INIT([Collabora Office],[5.3.10.4],[],[],[https://collaboraoffice.com/])
+AC_INIT([Collabora Office],[5.3.10.5],[],[],[https://collaboraoffice.com/])
 
 AC_PREREQ([2.59])
 
commit 41df401c698498a9fd300af127343cc252e9d030
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Apr 7 16:18:22 2017 +0100

    Resolves: tdf#106732 the intent was surely to return a const ref
    
    Change-Id: Iaaa1f76a689645adaebf4fe5b87003ad238f71f2
    (cherry picked from commit a7d008a8dfdc0a8b42061329b5e756b1b034abaf)
    Reviewed-on: https://gerrit.libreoffice.org/36276
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    (cherry picked from commit d9736ca79ed3205bb091787e09ebb736ffd808a3)

diff --git a/include/svtools/insdlg.hxx b/include/svtools/insdlg.hxx
index 5e18693663b3..58bada8fadd2 100644
--- a/include/svtools/insdlg.hxx
+++ b/include/svtools/insdlg.hxx
@@ -60,7 +60,7 @@ public:
                                 return aObjectServerList.size();
                             }
 
-    const SvObjectServer    operator[]( size_t n ) const
+    const SvObjectServer&   operator[]( size_t n ) const
                             {
                                 return aObjectServerList[ n ];
                             }
commit 5314bc77e0b6c596170ee142a514c0c390d8c2e7
Author: Laurent Balland-Poirier <laurent.balland-poirier at laposte.net>
Date:   Thu Mar 16 23:45:13 2017 +0100

    tdf#106190 Fix (again) left alignment of denominator
    
    Instead of moving spaces from left to right, like it was done
    previously, this patch insert spaces directly on right
    when in denominator
    This avoid complex calculation when user enter such (stupid)
    format:
     # ?/ ???
    or
     # ?/" hello world "???
    
    In SvNumberformat::ImpNumberFill, for NF_SYMBOLTYPE_FRAC_FDIV
    you need at least to move in sBuf, to insert text at the
    expected place for (stupid) format like
     # ?/ 100
    or
     # ?/" hello world "100
    
    All these formats works, but are stored in ODF with text
    after fraction
    
    Change-Id: I296e60643e93242b8006848a643135219ad4ad0c
    Reviewed-on: https://gerrit.libreoffice.org/35320
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Eike Rathke <erack at redhat.com>
    (cherry picked from commit 2fd110a78d03510d031c4c6cf6ad380d82899df8)
    Reviewed-on: https://gerrit.libreoffice.org/36232
    (cherry picked from commit 693c929c1a475e6b4bd737e50d09d6f390700812)

diff --git a/include/svl/zformat.hxx b/include/svl/zformat.hxx
index ce632ae04920..ceba6a4993ca 100644
--- a/include/svl/zformat.hxx
+++ b/include/svl/zformat.hxx
@@ -553,7 +553,8 @@ private:
                     sal_Int32& k,
                     sal_uInt16& j,
                     sal_uInt16 nIx,
-                    short eSymbolType );
+                    short eSymbolType,
+                    bool bInsertRightBlank = false );
 
     // Helper function to fill in the integer part and the group (AKA thousand) separators
     SVL_DLLPRIVATE bool ImpNumberFillWithThousands( OUStringBuffer& sStr,
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index ac622bf4cc45..2c018f662784 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -2212,7 +2212,8 @@ OUString lcl_GetDenominatorString(const ImpSvNumberformatInfo &rInfo, sal_uInt16
     {
         if( rInfo.nTypeArray[i] == NF_SYMBOLTYPE_FRAC )
         {
-            while ( ( ++i < nAnz ) && rInfo.nTypeArray[i] == NF_SYMBOLTYPE_STRING );
+            while ( ( ++i < nAnz ) && rInfo.nTypeArray[i] != NF_SYMBOLTYPE_FRAC_FDIV
+                                   && rInfo.nTypeArray[i] != NF_SYMBOLTYPE_DIGIT );
             for( ; i < nAnz; i++ )
             {
                 if( rInfo.nTypeArray[i] == NF_SYMBOLTYPE_FRAC_FDIV || rInfo.nTypeArray[i] == NF_SYMBOLTYPE_DIGIT )
@@ -2815,21 +2816,7 @@ bool SvNumberformat::ImpGetFractionOutput(double fNumber,
     sal_uInt16 j = nAnz-1; // Last symbol -> backwards
     sal_Int32 k;           // Denominator
 
-    bRes |= ImpNumberFill(sDiv, fNumber, k, j, nIx, NF_SYMBOLTYPE_FRAC);
-    if ( !bHideFraction &&  sDenominatorFormat.getLength() > 0 )
-    {
-        // Guard against a (theoretical?) endless loop of blanks only.
-        sal_Int32 n = sDiv.getLength();
-        sal_Int32 nDenominatorLen = sDenominatorFormat.getLength();
-        while ( n-- > 0 && sDiv[0] == ' ' ) // left align denominator
-        {
-            if (sDiv.getLength() <= nDenominatorLen)
-                sDiv.append(" ");
-            else
-                sDiv.insert( nDenominatorLen, " " );
-            sDiv.remove( 0, 1 );
-        }
-    }
+    bRes |= ImpNumberFill(sDiv, fNumber, k, j, nIx, NF_SYMBOLTYPE_FRAC, true);
 
     bool bCont = true;
     if (rInfo.nTypeArray[j] == NF_SYMBOLTYPE_FRAC)
@@ -4484,7 +4471,8 @@ bool SvNumberformat::ImpNumberFill( OUStringBuffer& sBuff, // number string
                                     sal_Int32& k,          // position within string
                                     sal_uInt16& j,         // symbol index within format code
                                     sal_uInt16 nIx,        // subformat index
-                                    short eSymbolType )    // type of stop condition
+                                    short eSymbolType,     // type of stop condition
+                                    bool bInsertRightBlank)// insert blank on right for denominator (default = false)
 {
     bool bRes = false;
     bool bStop = false;
@@ -4536,6 +4524,7 @@ bool SvNumberformat::ImpNumberFill( OUStringBuffer& sBuff, // number string
         case NF_SYMBOLTYPE_DIGIT:
         {
             bFoundNumber = true;
+            sal_uInt16 nPosInsertBlank = bInsertRightBlank ? k : 0; // left alignment of denominator
             const OUString& rStr = rInfo.sStrArray[j];
             const sal_Unicode* p1 = rStr.getStr();
             const sal_Unicode* p = p1 + rStr.getLength();
@@ -4553,7 +4542,7 @@ bool SvNumberformat::ImpNumberFill( OUStringBuffer& sBuff, // number string
                         sBuff.insert(0, '0');
                         break;
                     case '?':
-                        sBuff.insert(0, ' ');
+                        sBuff.insert(nPosInsertBlank, ' ');
                         break;
                     }
                 }
@@ -4573,6 +4562,10 @@ bool SvNumberformat::ImpNumberFill( OUStringBuffer& sBuff, // number string
         }
         break;
         case NF_SYMBOLTYPE_FRAC_FDIV: // Do Nothing
+            if (k > 0)
+            {
+                k--;
+            }
             break;
 
         default:
commit 8cea1db917b44ffe731af84b90c3470553d91adc
Author: Eike Rathke <erack at redhat.com>
Date:   Thu Apr 6 21:15:27 2017 +0200

    Resolves: tdf#100011 (re-)add ocCeil and ocFloor .xls(x) export mappings
    
     This is a combination of 2 commits.
    
    Resolves: tdf#100011 (re-)add ocCeil and ocFloor .xls(x) export mappings
    
    ... for CEILING and FLOOR that were lost when introducing CEILING.MATH
    and FLOOR.MATH which are semantically identical, but the export needs a
    distinct known mapping otherwise the function is stored as a macro call,
    which Excel dislikes.
    
    (cherry picked from commit ea01a08763e56a7de66f0c24655a627669c8a7f7)
    
    these FUNCFLAG_EXPORTONLY need also FUNCFLAG_MACROCALL_NEW, tdf#100011 related
    
    Maybe one day we'll actually use these tables also for export
    capabilities ...
    
    (cherry picked from commit 4dd95cadcd330aee49b3c84d3e336b808217af46)
    
    f3d55ec008e321d95b21e0d284c7d58d13a2399b
    
    Change-Id: Id371c1732984a8e5567f74fd265b9aee88fb1898
    Reviewed-on: https://gerrit.libreoffice.org/36233
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Bartosz Kosiorek <gang65 at poczta.onet.pl>
    (cherry picked from commit 84c3729eb210ff255761c4613ba03c4fb5e949f8)

diff --git a/sc/source/filter/excel/xlformula.cxx b/sc/source/filter/excel/xlformula.cxx
index f22a259693a9..7f83306dc659 100644
--- a/sc/source/filter/excel/xlformula.cxx
+++ b/sc/source/filter/excel/xlformula.cxx
@@ -408,6 +408,9 @@ static const XclFunctionInfo saFuncTable_Oox[] =
 #define EXC_FUNCENTRY_V_VR_IMPORT( opcode, minparam, maxparam, flags, asciiname ) \
     { opcode, NOID, minparam,     maxparam,     V, { VR },       EXC_FUNCFLAG_IMPORTONLY|(flags), EXC_FUNCNAME( asciiname ) }
 
+#define EXC_FUNCENTRY_V_RO_EXPORT( opcode, minparam, maxparam, flags, asciiname ) \
+    { opcode,  255, (minparam)+1, (maxparam)+1, V, { RO_E, RO }, EXC_FUNCFLAG_EXPORTONLY|(flags), EXC_FUNCNAME( asciiname ) }
+
 #define EXC_FUNCENTRY_A_VR( opcode, minparam, maxparam, flags, asciiname ) \
     { opcode, NOID, minparam,     maxparam,     A, { VR },       EXC_FUNCFLAG_IMPORTONLY|(flags), EXC_FUNCNAME( asciiname ) }, \
     { opcode,  255, (minparam)+1, (maxparam)+1, A, { RO_E, RO }, EXC_FUNCFLAG_EXPORTONLY|(flags), EXC_FUNCNAME( asciiname ) }
@@ -524,6 +527,7 @@ static const XclFunctionInfo saFuncTable_2013[] =
     EXC_FUNCENTRY_V_VR(         ocBitRshift,     2,  2,  0,  "BITRSHIFT" ),
     EXC_FUNCENTRY_V_VR(         ocBitXor,        2,  2,  0,  "BITXOR" ),
     EXC_FUNCENTRY_V_VR(         ocCeil_Math,     1,  3,  0,  "CEILING.MATH" ),
+    EXC_FUNCENTRY_V_RO_EXPORT(  ocCeil,          1,  3,  0,  "CEILING.MATH" ),
     EXC_FUNCENTRY_V_VR(         ocCombinA,       2,  2,  0,  "COMBINA" ),
     EXC_FUNCENTRY_V_VR_IMPORT(  ocCot,           1,  1,  0,  "COT" ),
     EXC_FUNCENTRY_V_VR_IMPORT(  ocCotHyp,        1,  1,  0,  "COTH" ),
@@ -538,6 +542,7 @@ static const XclFunctionInfo saFuncTable_2013[] =
     EXC_FUNCENTRY_V_VR(         ocNoName,        3,  3,  0,  "FINV" ),
     EXC_FUNCENTRY_V_VR(         ocFilterXML,     2,  2,  0,  "FILTERXML" ),
     EXC_FUNCENTRY_V_VR(         ocFloor_Math,    1,  3,  0,  "FLOOR.MATH" ),
+    EXC_FUNCENTRY_V_RO_EXPORT(  ocFloor,         1,  3,  0,  "FLOOR.MATH" ),
     EXC_FUNCENTRY_V_RO(         ocFormula,       1,  1,  0,  "FORMULATEXT" ),
     EXC_FUNCENTRY_V_VR(         ocGamma,         1,  1,  0,  "GAMMA" ),
     EXC_FUNCENTRY_V_VR(         ocGauss,         1,  1,  0,  "GAUSS" ),
diff --git a/sc/source/filter/oox/formulabase.cxx b/sc/source/filter/oox/formulabase.cxx
index 6247aaf3b89c..c7fba5d04508 100644
--- a/sc/source/filter/oox/formulabase.cxx
+++ b/sc/source/filter/oox/formulabase.cxx
@@ -785,7 +785,7 @@ static const FunctionData saFuncTable2013[] =
     { "BITRSHIFT",              "BITRSHIFT",            NOID,   NOID,   2,  2,  V, { VR }, FUNCFLAG_MACROCALL_NEW },
     { "BITXOR",                 "BITXOR",               NOID,   NOID,   2,  2,  V, { VR }, FUNCFLAG_MACROCALL_NEW },
     { "COM.MICROSOFT.CEILING.MATH", "CEILING.MATH",     NOID,   NOID,   1,  3,  V, { VR }, FUNCFLAG_MACROCALL_NEW },
-    { "CEILING",                "CEILING.MATH",         NOID,   NOID,   1,  3,  V, { VR }, FUNCFLAG_EXPORTONLY },
+    { "CEILING",                "CEILING.MATH",         NOID,   NOID,   1,  3,  V, { VR }, FUNCFLAG_EXPORTONLY | FUNCFLAG_MACROCALL_NEW },
     { "COMBINA",                "COMBINA",              NOID,   NOID,   2,  2,  V, { VR }, FUNCFLAG_MACROCALL_NEW },
     { "COT",                    "COT",                  NOID,   NOID,   1,  1,  V, { VR }, FUNCFLAG_MACROCALL_NEW },
     { "COTH",                   "COTH",                 NOID,   NOID,   1,  1,  V, { VR }, FUNCFLAG_MACROCALL_NEW },
@@ -796,7 +796,7 @@ static const FunctionData saFuncTable2013[] =
     { "COM.MICROSOFT.ENCODEURL","ENCODEURL",            NOID,   NOID,   1,  1,  V, { VR }, FUNCFLAG_MACROCALL_NEW },
     { "COM.MICROSOFT.FILTERXML","FILTERXML",            NOID,   NOID,   2,  2,  V, { VR }, FUNCFLAG_MACROCALL_NEW },
     { "COM.MICROSOFT.FLOOR.MATH", "FLOOR.MATH",         NOID,   NOID,   1,  3,  V, { VR }, FUNCFLAG_MACROCALL_NEW },
-    { "FLOOR",                  "FLOOR.MATH",           NOID,   NOID,   1,  3,  V, { VR }, FUNCFLAG_EXPORTONLY },
+    { "FLOOR",                  "FLOOR.MATH",           NOID,   NOID,   1,  3,  V, { VR }, FUNCFLAG_EXPORTONLY | FUNCFLAG_MACROCALL_NEW },
     // NOTE: this FDIST is not our LEGACY.FDIST
     { nullptr/*"FDIST"*/,             "FDIST",                NOID,   NOID,   3,  4,  V, { VR }, FUNCFLAG_MACROCALL_NEW },
     // NOTE: this FINV is not our LEGACY.FINV


More information about the Libreoffice-commits mailing list