diff options
author | Winfried Donkers <winfrieddonkers@libreoffice.org> | 2016-06-14 11:57:49 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-06-14 16:08:51 +0000 |
commit | 641dfede9749dcc054b185bd72b227c0a1c093df (patch) | |
tree | 91d1695dc062a0d8d494bce4fb2e348d9959aa5f | |
parent | 91eb9901be5d61d6fcd930a898f2ddc372667aab (diff) |
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@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
(cherry picked from commit d81fa4eb3a8960c1a1280fdd07bafa29de8290d2)
Reviewed-on: https://gerrit.libreoffice.org/26270
-rw-r--r-- | sc/source/core/tool/interpr2.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx index 2a35f833a23e..bd255fc83290 100644 --- a/sc/source/core/tool/interpr2.cxx +++ b/sc/source/core/tool/interpr2.cxx @@ -324,8 +324,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 |