sc/source/core/tool/interpr2.cxx | 5 +++-- sc/source/ui/src/scfuncs.src | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-)
New commits: commit 68098cf1551d0b27cb723c927b5fd3bc2ba9b3ac Author: Eike Rathke <[email protected]> Date: Mon Jan 4 15:45:23 2016 +0100 correct ISOWEEKNUM resource ExtraData parameter flags, tdf#50950 follow-up ... which now has exactly 1 parameter; removed the now non-matching required flag of a not existing second parameter. Luckily the resource manager treats this as a separate record block and this 0 didn't harm the subsequent 0, accidentally.. Change-Id: I0994ed75643245c1bdebc9a92ade77abdd1c61d8 diff --git a/sc/source/ui/src/scfuncs.src b/sc/source/ui/src/scfuncs.src index f1d2325..122815f 100644 --- a/sc/source/ui/src/scfuncs.src +++ b/sc/source/ui/src/scfuncs.src @@ -1200,7 +1200,7 @@ Resource RID_SC_FUNCTION_DESCRIPTIONS1 0; ID_FUNCTION_GRP_DATETIME; U2S( HID_FUNC_ISOWEEKNUM ); - 1; 0; 0; + 1; 0; 0; }; String 2 // Name of Parameter 1 commit 1c5eb11d42ccdacdaf29e0b8f26c4f674069f227 Author: Eike Rathke <[email protected]> Date: Mon Jan 4 15:41:32 2016 +0100 WEEKNUM second parameter is optional defaulting to 1, tdf#50950 follow-up Change-Id: I64b22f91bf56497b9f705e4773e24c5ba88a14ae diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx index b7c503b..dbed2a7 100644 --- a/sc/source/core/tool/interpr2.cxx +++ b/sc/source/core/tool/interpr2.cxx @@ -207,9 +207,10 @@ void ScInterpreter::ScGetDayOfWeek() void ScInterpreter::ScGetWeekOfYear() { - if ( MustHaveParamCount( GetByte(), 2 ) ) + sal_uInt8 nParamCount = GetByte(); + if ( MustHaveParamCount( nParamCount, 1, 2 ) ) { - short nFlag = (short) ::rtl::math::approxFloor(GetDouble()); + short nFlag = (nParamCount == 1) ? 1 : (short) ::rtl::math::approxFloor(GetDouble()); Date aDate = *(pFormatter->GetNullDate()); aDate += (long)::rtl::math::approxFloor(GetDouble()); diff --git a/sc/source/ui/src/scfuncs.src b/sc/source/ui/src/scfuncs.src index e8f67e4..f1d2325 100644 --- a/sc/source/ui/src/scfuncs.src +++ b/sc/source/ui/src/scfuncs.src @@ -1168,7 +1168,7 @@ Resource RID_SC_FUNCTION_DESCRIPTIONS1 0; ID_FUNCTION_GRP_DATETIME; U2S( HID_FUNC_KALENDERWOCHE ); - 2; 0; 0; + 2; 0; 1; 0; }; String 2 // Name of Parameter 1 _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
