summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWinfried Donkers <winfrieddonkers@libreoffice.org>2016-06-14 11:57:49 +0200
committerEike Rathke <erack@redhat.com>2016-06-14 16:08:39 +0000
commit2c9f14bd4bb764d61ca672bd1d64af2f28fb5dd6 (patch)
tree3115948f4b83e23c0dae5f0841f7c74c468d27ad
parentb54102be568b306b8de8d09e538a9ad332f1c602 (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/26269
-rw-r--r--sc/source/core/tool/interpr2.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index 4e57826ee6ab..b0d8f6d13190 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -329,8 +329,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