[Libreoffice-commits] core.git: sc/source

Winfried Donkers winfrieddonkers at libreoffice.org
Tue Jun 14 14:36:48 UTC 2016


 sc/source/core/tool/interpr2.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit d81fa4eb3a8960c1a1280fdd07bafa29de8290d2
Author: Winfried Donkers <winfrieddonkers at libreoffice.org>
Date:   Tue Jun 14 11:57:49 2016 +0200

    tdf#100342 fix order of weekdays in NETWORKDAYS
    
    For the definition of working/weekend days, ODFF1.2 uses 0..6
    for Sunday..Saturday. NETWORKDAYS used ISO ordering (Monday..Sunday),
    but now complies with ODFF1.2.
    
    Change-Id: I169433adfac5d66af979181c328658040d7ab77f
    Reviewed-on: https://gerrit.libreoffice.org/26246
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>

diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index 86c1720..ed467e3 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -330,8 +330,9 @@ sal_uInt16 ScInterpreter::GetWeekendAndHolidayMasks(
             if ( nWeekendDays.size() != 7 )
                 return  errIllegalArgument;
 
+            // Weekend days defined by string, Sunday...Saturday
             for ( int i = 0; i < 7; i++ )
-                bWeekendMask[ i ] = ( bool ) nWeekendDays[ i ];
+                bWeekendMask[ i ] = ( bool ) nWeekendDays[ ( i == 6 ? 0 : i + 1 ) ];
         }
     }
     else


More information about the Libreoffice-commits mailing list