summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-03-07 16:38:20 +0300
committerEike Rathke <erack@redhat.com>2019-03-17 00:08:12 +0100
commit0a23bfacc46cb7c66ceb1bbec972cdcfa9afa50b (patch)
treebe0659922c0422a83103aeae55781cecfb528ee7 /sc/source
parent2358c867563731f56cefbf2a17818e69b15c2e66 (diff)
tdf#123923: make COUNTIF propagate errors in its first parameter
In a specific case, Err:504 was emitted by COUNTIF when its 1st parameter was #REF!. This value was written into pivot cache definition when exporting to XLSX. Clearly Excel only expected propagated #REF! there, emitted error to user, and dropped the pivot table. This problem made XLSX pivot table cache generated by Calc unusable by Excel, despite ECMA-376 Part 1, 18.10.1.27 tells that the error value is application-dependent. The change makes COUNTIF to propagate errors received in its 1st parameter, instead of owerwriting them with own Err:504. This will likely need to be extended to other functions, if similar problems would arise. Change-Id: I459fa163a0e3e5f2c658631d66e096f4d46b1ace Reviewed-on: https://gerrit.libreoffice.org/68868 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 1f970c20a25deed282dbaf08a4be5af25e4951db) Reviewed-on: https://gerrit.libreoffice.org/69273 Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/tool/interpr1.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index d7279c1188a7..c9c3624bb019 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -5743,6 +5743,7 @@ void ScInterpreter::ScCountIf()
}
break;
default:
+ PopError(); // Propagate it further
PushIllegalParameter();
return ;
}