sc/source/core/tool/scmatrix.cxx | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-)
New commits: commit 769406ccf677fd05c2df30f9a11dce2f5e90ff0a Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Mar 29 11:32:54 2021 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Mar 29 15:34:39 2021 +0200 expand COp to its only use Change-Id: Ic353adf44c7aa60cedc2c61e3814d3135e0d55ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113310 Tested-by: Caolán McNamara <caol...@redhat.com> Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx index 1306add318a7..6dad97eee6a0 100644 --- a/sc/source/core/tool/scmatrix.cxx +++ b/sc/source/core/tool/scmatrix.cxx @@ -3297,35 +3297,6 @@ namespace matop { namespace { -/** - * COp struct is used in MatOp class to provide (through template specialization) - * different actions for empty entries in a matrix. - */ -template <typename T, typename S> -struct COp {}; - -} - -template <typename T> -struct COp<T, svl::SharedString> -{ - const svl::SharedString& operator()(T /*aOp*/, double /*a*/, double /*b*/, const svl::SharedString& rString) const - { - return rString; - } -}; - -template <typename T> -struct COp<T, double> -{ - double operator()(T aOp, double a, double b, const svl::SharedString& /*rString*/) const - { - return aOp( a, b); - } -}; - -namespace { - /** A template for operations where operands are supposed to be numeric. A non-numeric (string) operand leads to the configured conversion to number method being called if in interpreter context and a FormulaError::NoValue DoubleError @@ -3341,7 +3312,6 @@ private: ScInterpreter* mpErrorInterpreter; svl::SharedString maString; double mfVal; - COp<TOp, double> maCOp; public: typedef double number_value_type; @@ -3376,9 +3346,10 @@ public: return maOp( convertStringToValue( mpErrorInterpreter, rStr.getString()), mfVal); } + /// the action for empty entries in a matrix double operator()(char) const { - return maCOp(maOp, 0, mfVal, maString); + return maOp(0, mfVal); } static bool useFunctionForEmpty() _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits