summaryrefslogtreecommitdiff
path: root/sc/source/ui/StatisticsDialogs/RegressionDialog.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/StatisticsDialogs/RegressionDialog.cxx')
-rw-r--r--sc/source/ui/StatisticsDialogs/RegressionDialog.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/sc/source/ui/StatisticsDialogs/RegressionDialog.cxx b/sc/source/ui/StatisticsDialogs/RegressionDialog.cxx
index ef5cd8f28a76..401ddf41201d 100644
--- a/sc/source/ui/StatisticsDialogs/RegressionDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/RegressionDialog.cxx
@@ -8,6 +8,10 @@
*
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <document.hxx>
#include <reffact.hxx>
#include <TableFillingAndNavigationTools.hxx>
@@ -362,7 +366,7 @@ void ScRegressionDialog::WriteRawRegressionResults(AddressWalkerWriter& rOutput,
rTemplate.setTemplate(constTemplateLINEST[nRegressionIndex].
replaceFirst("%CALC_INTERCEPT%",
- mbCalcIntercept ? OUStringLiteral(u"TRUE") : OUStringLiteral(u"FALSE")));
+ mbCalcIntercept ? std::u16string_view(u"TRUE") : std::u16string_view(u"FALSE")));
rOutput.writeMatrixFormula(rTemplate.getTemplate(), 1 + mnNumIndependentVars, 5);
// Add LINEST result components to template
// 1. Add ranges for coefficients and standard errors for indep. vars and the intercept.
@@ -407,8 +411,9 @@ void ScRegressionDialog::WriteRegressionStatistics(AddressWalkerWriter& rOutput,
"=%SERRORY_ADDR%",
"=" + OUString::number(mnNumIndependentVars),
"=" + OUString::number(mnNumObservations),
- "=1 - (1 - %RSQUARED_ADDR%)*(%NUMOBS_ADDR% - 1)/(%NUMOBS_ADDR% - %NUMXVARS_ADDR%" +
- (mbCalcIntercept ? OUStringLiteral(u" - 1)") : OUStringLiteral(u")"))
+ OUString::Concat(
+ "=1 - (1 - %RSQUARED_ADDR%)*(%NUMOBS_ADDR% - 1)/(%NUMOBS_ADDR% - %NUMXVARS_ADDR%") +
+ (mbCalcIntercept ? std::u16string_view(u" - 1)") : std::u16string_view(u")"))
};
rTemplate.autoReplaceAddress("%NUMXVARS_ADDR%", rOutput.current(1, 2));