summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-05-30 10:06:22 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-05-30 17:21:38 +0200
commitbe568bf78939942153294727556a466e235e04d3 (patch)
treed34ec4a6ef2607f2a4ef01aa0df5f53dbf8a00df
parentebbb0674b4d98b1807c2fa94afaa3003111a9dc8 (diff)
loplugin:ostr in sc/../StatisticsDialogs
Change-Id: I739610e0b3b089fbb009cfca445b60d165694661 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168248 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx56
-rw-r--r--sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx10
-rw-r--r--sc/source/ui/StatisticsDialogs/CorrelationDialog.cxx4
-rw-r--r--sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx4
-rw-r--r--sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx4
-rw-r--r--sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx6
-rw-r--r--sc/source/ui/StatisticsDialogs/FTestDialog.cxx26
-rw-r--r--sc/source/ui/StatisticsDialogs/FourierAnalysisDialog.cxx18
-rw-r--r--sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx10
-rw-r--r--sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx34
-rw-r--r--sc/source/ui/StatisticsDialogs/RegressionDialog.cxx130
-rw-r--r--sc/source/ui/StatisticsDialogs/SamplingDialog.cxx30
-rw-r--r--sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx20
-rw-r--r--sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx26
-rw-r--r--sc/source/ui/StatisticsDialogs/TTestDialog.cxx18
-rw-r--r--sc/source/ui/StatisticsDialogs/ZTestDialog.cxx26
16 files changed, 211 insertions, 211 deletions
diff --git a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
index 6f1fccd9cb0d..acfab698b601 100644
--- a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
@@ -90,13 +90,13 @@ ScAnalysisOfVarianceDialog::ScAnalysisOfVarianceDialog(
weld::Window* pParent, ScViewData& rViewData )
: ScStatisticsInputOutputDialog(
pSfxBindings, pChildWindow, pParent, rViewData,
- "modules/scalc/ui/analysisofvariancedialog.ui",
- "AnalysisOfVarianceDialog")
+ u"modules/scalc/ui/analysisofvariancedialog.ui"_ustr,
+ u"AnalysisOfVarianceDialog"_ustr)
, meFactor(SINGLE_FACTOR)
- , mxAlphaField(m_xBuilder->weld_spin_button("alpha-spin"))
- , mxSingleFactorRadio(m_xBuilder->weld_radio_button("radio-single-factor"))
- , mxTwoFactorRadio(m_xBuilder->weld_radio_button("radio-two-factor"))
- , mxRowsPerSampleField(m_xBuilder->weld_spin_button("rows-per-sample-spin"))
+ , mxAlphaField(m_xBuilder->weld_spin_button(u"alpha-spin"_ustr))
+ , mxSingleFactorRadio(m_xBuilder->weld_radio_button(u"radio-single-factor"_ustr))
+ , mxTwoFactorRadio(m_xBuilder->weld_radio_button(u"radio-two-factor"_ustr))
+ , mxRowsPerSampleField(m_xBuilder->weld_spin_button(u"rows-per-sample-spin"_ustr))
{
mxSingleFactorRadio->connect_toggled( LINK( this, ScAnalysisOfVarianceDialog, FactorChanged ) );
mxTwoFactorRadio->connect_toggled( LINK( this, ScAnalysisOfVarianceDialog, FactorChanged ) );
@@ -188,7 +188,7 @@ void ScAnalysisOfVarianceDialog::AnovaSingleFactor(AddressWalkerWriter& output,
output.writeString(ScResId(STR_LABEL_ALPHA));
output.nextColumn();
output.writeValue(aAlphaValue);
- aTemplate.autoReplaceAddress("%ALPHA%", output.current());
+ aTemplate.autoReplaceAddress(u"%ALPHA%"_ustr, output.current());
output.newLine();
output.newLine();
@@ -232,7 +232,7 @@ void ScAnalysisOfVarianceDialog::AnovaSingleFactor(AddressWalkerWriter& output,
}
output.nextRow();
- aTemplate.autoReplaceRange("%FIRST_COLUMN%", aRangeList[0]);
+ aTemplate.autoReplaceRange(u"%FIRST_COLUMN%"_ustr, aRangeList[0]);
// Between Groups
{
@@ -243,26 +243,26 @@ void ScAnalysisOfVarianceDialog::AnovaSingleFactor(AddressWalkerWriter& output,
// Sum of Squares
aTemplate.setTemplate("=SUMPRODUCT(%SUM_RANGE%;%MEAN_RANGE%)-SUM(%SUM_RANGE%)^2/SUM(%COUNT_RANGE%)");
- aTemplate.autoReplaceAddress("%BETWEEN_SS%", output.current());
+ aTemplate.autoReplaceAddress(u"%BETWEEN_SS%"_ustr, output.current());
output.writeFormula(aTemplate.getTemplate());
output.nextColumn();
// Degree of freedom
aTemplate.setTemplate("=COUNT(%SUM_RANGE%)-1");
- aTemplate.autoReplaceAddress("%BETWEEN_DF%", output.current());
+ aTemplate.autoReplaceAddress(u"%BETWEEN_DF%"_ustr, output.current());
output.writeFormula(aTemplate.getTemplate());
output.nextColumn();
// MS
aTemplate.setTemplate("=%BETWEEN_SS% / %BETWEEN_DF%");
- aTemplate.autoReplaceAddress("%BETWEEN_MS%", output.current());
+ aTemplate.autoReplaceAddress(u"%BETWEEN_MS%"_ustr, output.current());
output.writeFormula(aTemplate.getTemplate());
output.nextColumn();
// F
aTemplate.setTemplate("=%BETWEEN_MS% / %WITHIN_MS%");
aTemplate.applyAddress(u"%WITHIN_MS%", output.current(-1, 1));
- aTemplate.autoReplaceAddress("%F_VAL%", output.current());
+ aTemplate.autoReplaceAddress(u"%F_VAL%"_ustr, output.current());
output.writeFormula(aTemplate.getTemplate());
output.nextColumn();
@@ -287,16 +287,16 @@ void ScAnalysisOfVarianceDialog::AnovaSingleFactor(AddressWalkerWriter& output,
output.nextColumn();
// Sum of Squares
- OUString aSSPart = lclCreateMultiParameterFormula(aRangeList, "DEVSQ(%RANGE%)", strWildcardRange, mDocument, mAddressDetails);
+ OUString aSSPart = lclCreateMultiParameterFormula(aRangeList, u"DEVSQ(%RANGE%)"_ustr, strWildcardRange, mDocument, mAddressDetails);
aTemplate.setTemplate("=SUM(%RANGE%)");
aTemplate.applyString(strWildcardRange, aSSPart);
- aTemplate.autoReplaceAddress("%WITHIN_SS%", output.current());
+ aTemplate.autoReplaceAddress(u"%WITHIN_SS%"_ustr, output.current());
output.writeFormula(aTemplate.getTemplate());
output.nextColumn();
// Degree of freedom
aTemplate.setTemplate("=SUM(%COUNT_RANGE%)-COUNT(%COUNT_RANGE%)");
- aTemplate.autoReplaceAddress("%WITHIN_DF%", output.current());
+ aTemplate.autoReplaceAddress(u"%WITHIN_DF%"_ustr, output.current());
output.writeFormula(aTemplate.getTemplate());
output.nextColumn();
@@ -335,7 +335,7 @@ void ScAnalysisOfVarianceDialog::AnovaTwoFactor(AddressWalkerWriter& output, For
output.writeString("Alpha");
output.nextColumn();
output.writeValue(aAlphaValue);
- aTemplate.autoReplaceAddress("%ALPHA%", output.current());
+ aTemplate.autoReplaceAddress(u"%ALPHA%"_ustr, output.current());
output.newLine();
output.newLine();
@@ -398,8 +398,8 @@ void ScAnalysisOfVarianceDialog::AnovaTwoFactor(AddressWalkerWriter& output, For
// Setup auto-replace strings
aTemplate.autoReplaceRange(strWildcardRange, mInputRange);
- aTemplate.autoReplaceRange("%FIRST_COLUMN%", aColumnRangeList[0]);
- aTemplate.autoReplaceRange("%FIRST_ROW%", aRowRangeList[0]);
+ aTemplate.autoReplaceRange(u"%FIRST_COLUMN%"_ustr, aColumnRangeList[0]);
+ aTemplate.autoReplaceRange(u"%FIRST_ROW%"_ustr, aRowRangeList[0]);
// Rows
{
@@ -410,26 +410,26 @@ void ScAnalysisOfVarianceDialog::AnovaTwoFactor(AddressWalkerWriter& output, For
// Sum of Squares
aTemplate.setTemplate("=SUMPRODUCT(%SUM_RANGE_ROW%;%MEAN_RANGE_ROW%) - SUM(%RANGE%)^2 / COUNT(%RANGE%)");
- aTemplate.autoReplaceAddress("%ROW_SS%", output.current());
+ aTemplate.autoReplaceAddress(u"%ROW_SS%"_ustr, output.current());
output.writeFormula(aTemplate.getTemplate());
output.nextColumn();
// Degree of freedom
aTemplate.setTemplate("=MAX(%COUNT_RANGE_COLUMN%) - 1");
- aTemplate.autoReplaceAddress("%ROW_DF%", output.current());
+ aTemplate.autoReplaceAddress(u"%ROW_DF%"_ustr, output.current());
output.writeFormula(aTemplate.getTemplate());
output.nextColumn();
// MS
aTemplate.setTemplate("=%ROW_SS% / %ROW_DF%");
- aTemplate.autoReplaceAddress("%MS_ROW%", output.current());
+ aTemplate.autoReplaceAddress(u"%MS_ROW%"_ustr, output.current());
output.writeFormula(aTemplate.getTemplate());
output.nextColumn();
// F
aTemplate.setTemplate("=%MS_ROW% / %MS_ERROR%");
aTemplate.applyAddress(u"%MS_ERROR%", output.current(-1, 2));
- aTemplate.autoReplaceAddress("%F_ROW%", output.current());
+ aTemplate.autoReplaceAddress(u"%F_ROW%"_ustr, output.current());
output.writeFormula(aTemplate.getTemplate());
output.nextColumn();
@@ -456,26 +456,26 @@ void ScAnalysisOfVarianceDialog::AnovaTwoFactor(AddressWalkerWriter& output, For
// Sum of Squares
aTemplate.setTemplate("=SUMPRODUCT(%SUM_RANGE_COLUMN%;%MEAN_RANGE_COLUMN%) - SUM(%RANGE%)^2 / COUNT(%RANGE%)");
- aTemplate.autoReplaceAddress("%COLUMN_SS%", output.current());
+ aTemplate.autoReplaceAddress(u"%COLUMN_SS%"_ustr, output.current());
output.writeFormula(aTemplate.getTemplate());
output.nextColumn();
// Degree of freedom
aTemplate.setTemplate("=MAX(%COUNT_RANGE_ROW%) - 1");
- aTemplate.autoReplaceAddress("%COLUMN_DF%", output.current());
+ aTemplate.autoReplaceAddress(u"%COLUMN_DF%"_ustr, output.current());
output.writeFormula(aTemplate.getTemplate());
output.nextColumn();
// MS
aTemplate.setTemplate("=%COLUMN_SS% / %COLUMN_DF%");
- aTemplate.autoReplaceAddress("%MS_COLUMN%", output.current());
+ aTemplate.autoReplaceAddress(u"%MS_COLUMN%"_ustr, output.current());
output.writeFormula(aTemplate.getTemplate());
output.nextColumn();
// F
aTemplate.setTemplate("=%MS_COLUMN% / %MS_ERROR%");
aTemplate.applyAddress(u"%MS_ERROR%", output.current(-1, 1));
- aTemplate.autoReplaceAddress("%F_COLUMN%", output.current());
+ aTemplate.autoReplaceAddress(u"%F_COLUMN%"_ustr, output.current());
output.writeFormula(aTemplate.getTemplate());
output.nextColumn();
@@ -502,14 +502,14 @@ void ScAnalysisOfVarianceDialog::AnovaTwoFactor(AddressWalkerWriter& output, For
// Sum of Squares
aTemplate.setTemplate("=SUMSQ(%RANGE%)+SUM(%RANGE%)^2/COUNT(%RANGE%) - (SUMPRODUCT(%SUM_RANGE_ROW%;%MEAN_RANGE_ROW%) + SUMPRODUCT(%SUM_RANGE_COLUMN%;%MEAN_RANGE_COLUMN%))");
- aTemplate.autoReplaceAddress("%ERROR_SS%", output.current());
+ aTemplate.autoReplaceAddress(u"%ERROR_SS%"_ustr, output.current());
output.writeFormula(aTemplate.getTemplate());
output.nextColumn();
// Degree of freedom
aTemplate.setTemplate("=%TOTAL_DF% - %ROW_DF% - %COLUMN_DF%");
aTemplate.applyAddress(u"%TOTAL_DF%", output.current(0,1));
- aTemplate.autoReplaceAddress("%ERROR_DF%", output.current());
+ aTemplate.autoReplaceAddress(u"%ERROR_DF%"_ustr, output.current());
output.writeFormula(aTemplate.getTemplate());
output.nextColumn();
diff --git a/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx b/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx
index cfcf53699df9..5c1ada025aa8 100644
--- a/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx
@@ -19,7 +19,7 @@ ScChiSquareTestDialog::ScChiSquareTestDialog(
weld::Window* pParent, ScViewData& rViewData ) :
ScStatisticsInputOutputDialog(
pSfxBindings, pChildWindow, pParent, rViewData,
- "modules/scalc/ui/chisquaretestdialog.ui", "ChiSquareTestDialog")
+ u"modules/scalc/ui/chisquaretestdialog.ui"_ustr, u"ChiSquareTestDialog"_ustr)
{
m_xDialog->set_title(ScResId(STR_CHI_SQUARE_TEST));
}
@@ -43,7 +43,7 @@ ScRange ScChiSquareTestDialog::ApplyOutput(ScDocShell* pDocShell)
formula::FormulaGrammar::mergeToGrammar( formula::FormulaGrammar::GRAM_ENGLISH, mAddressDetails.eConv));
FormulaTemplate aTemplate(&mDocument);
- aTemplate.autoReplaceRange("%RANGE%", mInputRange);
+ aTemplate.autoReplaceRange(u"%RANGE%"_ustr, mInputRange);
aOutput.writeBoldString(ScResId(STR_CHI_SQUARE_TEST));
aOutput.newLine();
@@ -52,14 +52,14 @@ ScRange ScChiSquareTestDialog::ApplyOutput(ScDocShell* pDocShell)
aOutput.writeString(ScResId(STR_LABEL_ALPHA));
aOutput.nextColumn();
aOutput.writeValue(0.05);
- aTemplate.autoReplaceAddress("%ALPHA%", aOutput.current());
+ aTemplate.autoReplaceAddress(u"%ALPHA%"_ustr, aOutput.current());
aOutput.newLine();
// DF
aOutput.writeString(ScResId(STR_DEGREES_OF_FREEDOM_LABEL));
aOutput.nextColumn();
aTemplate.setTemplate("=(COLUMNS(%RANGE%) - 1) * (ROWS(%RANGE%) - 1)");
- aTemplate.autoReplaceAddress("%DEGREES_OF_FREEDOM%", aOutput.current());
+ aTemplate.autoReplaceAddress(u"%DEGREES_OF_FREEDOM%"_ustr, aOutput.current());
aOutput.writeFormula(aTemplate.getTemplate());
aOutput.newLine();
@@ -67,7 +67,7 @@ ScRange ScChiSquareTestDialog::ApplyOutput(ScDocShell* pDocShell)
aOutput.writeString(ScResId(STR_P_VALUE_LABEL));
aOutput.nextColumn();
aTemplate.setTemplate("=CHITEST(%RANGE%; MMULT(MMULT(%RANGE%;TRANSPOSE(IF(COLUMN(%RANGE%))));MMULT(TRANSPOSE(IF(ROW(%RANGE%)));%RANGE%)) / SUM(%RANGE%))");
- aTemplate.autoReplaceAddress("%P_VALUE%", aOutput.current());
+ aTemplate.autoReplaceAddress(u"%P_VALUE%"_ustr, aOutput.current());
aOutput.writeFormula(aTemplate.getTemplate());
aOutput.newLine();
diff --git a/sc/source/ui/StatisticsDialogs/CorrelationDialog.cxx b/sc/source/ui/StatisticsDialogs/CorrelationDialog.cxx
index 7e9a23372635..80a70f994107 100644
--- a/sc/source/ui/StatisticsDialogs/CorrelationDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/CorrelationDialog.cxx
@@ -18,7 +18,7 @@ ScCorrelationDialog::ScCorrelationDialog(
weld::Window* pParent, ScViewData& rViewData ) :
ScMatrixComparisonGenerator(
pSfxBindings, pChildWindow, pParent, rViewData,
- "modules/scalc/ui/correlationdialog.ui", "CorrelationDialog")
+ u"modules/scalc/ui/correlationdialog.ui"_ustr, u"CorrelationDialog"_ustr)
{}
void ScCorrelationDialog::Close()
@@ -33,7 +33,7 @@ OUString ScCorrelationDialog::getLabel()
OUString ScCorrelationDialog::getTemplate()
{
- return "=CORREL(%VAR1%; %VAR2%)";
+ return u"=CORREL(%VAR1%; %VAR2%)"_ustr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx b/sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx
index b2849d316c37..9d3a9d07d172 100644
--- a/sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx
@@ -18,7 +18,7 @@ ScCovarianceDialog::ScCovarianceDialog(
weld::Window* pParent, ScViewData& rViewData ) :
ScMatrixComparisonGenerator(
pSfxBindings, pChildWindow, pParent, rViewData,
- "modules/scalc/ui/covariancedialog.ui", "CovarianceDialog")
+ u"modules/scalc/ui/covariancedialog.ui"_ustr, u"CovarianceDialog"_ustr)
{}
TranslateId ScCovarianceDialog::GetUndoNameId()
@@ -38,7 +38,7 @@ OUString ScCovarianceDialog::getLabel()
OUString ScCovarianceDialog::getTemplate()
{
- return "=COVAR(%VAR1%; %VAR2%)";
+ return u"=COVAR(%VAR1%; %VAR2%)"_ustr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
index 0924278c50d9..d82d7fa0e957 100644
--- a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
@@ -51,8 +51,8 @@ ScDescriptiveStatisticsDialog::ScDescriptiveStatisticsDialog(
weld::Window* pParent, ScViewData& rViewData ) :
ScStatisticsInputOutputDialog(
pSfxBindings, pChildWindow, pParent, rViewData,
- "modules/scalc/ui/descriptivestatisticsdialog.ui",
- "DescriptiveStatisticsDialog")
+ u"modules/scalc/ui/descriptivestatisticsdialog.ui"_ustr,
+ u"DescriptiveStatisticsDialog"_ustr)
{}
ScDescriptiveStatisticsDialog::~ScDescriptiveStatisticsDialog()
diff --git a/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx b/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx
index 1a87f5beb3cd..d7fe7c872167 100644
--- a/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx
@@ -21,9 +21,9 @@ ScExponentialSmoothingDialog::ScExponentialSmoothingDialog(
weld::Window* pParent, ScViewData& rViewData )
: ScStatisticsInputOutputDialog(
pSfxBindings, pChildWindow, pParent, rViewData,
- "modules/scalc/ui/exponentialsmoothingdialog.ui",
- "ExponentialSmoothingDialog")
- , mxSmoothingFactor(m_xBuilder->weld_spin_button("smoothing-factor-spin"))
+ u"modules/scalc/ui/exponentialsmoothingdialog.ui"_ustr,
+ u"ExponentialSmoothingDialog"_ustr)
+ , mxSmoothingFactor(m_xBuilder->weld_spin_button(u"smoothing-factor-spin"_ustr))
{
}
diff --git a/sc/source/ui/StatisticsDialogs/FTestDialog.cxx b/sc/source/ui/StatisticsDialogs/FTestDialog.cxx
index 76b2bade62db..68834bea55db 100644
--- a/sc/source/ui/StatisticsDialogs/FTestDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/FTestDialog.cxx
@@ -21,7 +21,7 @@ ScFTestDialog::ScFTestDialog(
weld::Window* pParent, ScViewData& rViewData ) :
ScStatisticsTwoVariableDialog(
pSfxBindings, pChildWindow, pParent, rViewData,
- "modules/scalc/ui/ttestdialog.ui", "TTestDialog" )
+ u"modules/scalc/ui/ttestdialog.ui"_ustr, u"TTestDialog"_ustr )
{
m_xDialog->set_title(ScResId(STR_FTEST));
}
@@ -57,8 +57,8 @@ ScRange ScFTestDialog::ApplyOutput(ScDocShell* pDocShell)
else
pVariable2Iterator.reset(new DataRangeByRowIterator(mVariable2Range));
- aTemplate.autoReplaceRange("%VARIABLE1_RANGE%", pVariable1Iterator->get());
- aTemplate.autoReplaceRange("%VARIABLE2_RANGE%", pVariable2Iterator->get());
+ aTemplate.autoReplaceRange(u"%VARIABLE1_RANGE%"_ustr, pVariable1Iterator->get());
+ aTemplate.autoReplaceRange(u"%VARIABLE2_RANGE%"_ustr, pVariable2Iterator->get());
aOutput.writeBoldString(ScResId(STR_FTEST_UNDO_NAME));
aOutput.newLine();
@@ -67,7 +67,7 @@ ScRange ScFTestDialog::ApplyOutput(ScDocShell* pDocShell)
aOutput.writeString(ScResId(STR_LABEL_ALPHA));
aOutput.nextColumn();
aOutput.writeValue(0.05);
- aTemplate.autoReplaceAddress("%ALPHA%", aOutput.current());
+ aTemplate.autoReplaceAddress(u"%ALPHA%"_ustr, aOutput.current());
aOutput.newLine();
aOutput.nextColumn();
@@ -89,47 +89,47 @@ ScRange ScFTestDialog::ApplyOutput(ScDocShell* pDocShell)
aOutput.nextColumn();
aTemplate.setTemplate("=VAR(%VARIABLE1_RANGE%)");
aOutput.writeFormula(aTemplate.getTemplate());
- aTemplate.autoReplaceAddress("%VARIABLE1_VARIANCE%", aOutput.current());
+ aTemplate.autoReplaceAddress(u"%VARIABLE1_VARIANCE%"_ustr, aOutput.current());
aOutput.nextColumn();
aTemplate.setTemplate("=VAR(%VARIABLE2_RANGE%)");
aOutput.writeFormula(aTemplate.getTemplate());
- aTemplate.autoReplaceAddress("%VARIABLE2_VARIANCE%", aOutput.current());
+ aTemplate.autoReplaceAddress(u"%VARIABLE2_VARIANCE%"_ustr, aOutput.current());
aOutput.newLine();
aOutput.writeString(ScResId(STR_OBSERVATIONS_LABEL));
aOutput.nextColumn();
aTemplate.setTemplate("=COUNT(%VARIABLE1_RANGE%)");
aOutput.writeFormula(aTemplate.getTemplate());
- aTemplate.autoReplaceAddress("%VARIABLE1_OBSERVATIONS%", aOutput.current());
+ aTemplate.autoReplaceAddress(u"%VARIABLE1_OBSERVATIONS%"_ustr, aOutput.current());
aOutput.nextColumn();
aTemplate.setTemplate("=COUNT(%VARIABLE2_RANGE%)");
aOutput.writeFormula(aTemplate.getTemplate());
- aTemplate.autoReplaceAddress("%VARIABLE2_OBSERVATIONS%", aOutput.current());
+ aTemplate.autoReplaceAddress(u"%VARIABLE2_OBSERVATIONS%"_ustr, aOutput.current());
aOutput.newLine();
aOutput.writeString(ScResId(STR_ANOVA_LABEL_DF));
aOutput.nextColumn();
aTemplate.setTemplate("=%VARIABLE1_OBSERVATIONS% - 1");
aOutput.writeFormula(aTemplate.getTemplate());
- aTemplate.autoReplaceAddress("%VARIABLE1_DEGREE_OF_FREEDOM%", aOutput.current());
+ aTemplate.autoReplaceAddress(u"%VARIABLE1_DEGREE_OF_FREEDOM%"_ustr, aOutput.current());
aOutput.nextColumn();
aTemplate.setTemplate("=%VARIABLE2_OBSERVATIONS% - 1");
aOutput.writeFormula(aTemplate.getTemplate());
- aTemplate.autoReplaceAddress("%VARIABLE2_DEGREE_OF_FREEDOM%", aOutput.current());
+ aTemplate.autoReplaceAddress(u"%VARIABLE2_DEGREE_OF_FREEDOM%"_ustr, aOutput.current());
aOutput.newLine();
aOutput.writeString(ScResId(STR_ANOVA_LABEL_F));
aOutput.nextColumn();
aTemplate.setTemplate("=%VARIABLE1_VARIANCE% / %VARIABLE2_VARIANCE%");
aOutput.writeFormula(aTemplate.getTemplate());
- aTemplate.autoReplaceAddress("%F_VALUE%", aOutput.current());
+ aTemplate.autoReplaceAddress(u"%F_VALUE%"_ustr, aOutput.current());
aOutput.newLine();
aOutput.writeString(ScResId(STR_FTEST_P_RIGHT_TAIL));
aOutput.nextColumn();
aTemplate.setTemplate("=FDIST(%F_VALUE%; %VARIABLE1_DEGREE_OF_FREEDOM%; %VARIABLE2_DEGREE_OF_FREEDOM%)");
aOutput.writeFormula(aTemplate.getTemplate());
- aTemplate.autoReplaceAddress("%P_RIGHT_TAIL_VALUE%", aOutput.current());
+ aTemplate.autoReplaceAddress(u"%P_RIGHT_TAIL_VALUE%"_ustr, aOutput.current());
aOutput.newLine();
aOutput.writeString(ScResId(STR_FTEST_F_CRITICAL_RIGHT_TAIL));
@@ -142,7 +142,7 @@ ScRange ScFTestDialog::ApplyOutput(ScDocShell* pDocShell)
aOutput.nextColumn();
aTemplate.setTemplate("=1 - %P_RIGHT_TAIL_VALUE%");
aOutput.writeFormula(aTemplate.getTemplate());
- aTemplate.autoReplaceAddress("%P_LEFT_TAIL_VALUE%", aOutput.current());
+ aTemplate.autoReplaceAddress(u"%P_LEFT_TAIL_VALUE%"_ustr, aOutput.current());
aOutput.newLine();
aOutput.writeString(ScResId(STR_FTEST_F_CRITICAL_LEFT_TAIL));
diff --git a/sc/source/ui/StatisticsDialogs/FourierAnalysisDialog.cxx b/sc/source/ui/StatisticsDialogs/FourierAnalysisDialog.cxx
index 5a1e192ef3de..94564358b9f0 100644
--- a/sc/source/ui/StatisticsDialogs/FourierAnalysisDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/FourierAnalysisDialog.cxx
@@ -20,8 +20,8 @@ ScFourierAnalysisDialog::ScFourierAnalysisDialog(SfxBindings* pSfxBindings,
SfxChildWindow* pChildWindow,
weld::Window* pParent, ScViewData& rViewData)
: ScStatisticsInputOutputDialog(pSfxBindings, pChildWindow, pParent, rViewData,
- "modules/scalc/ui/fourieranalysisdialog.ui",
- "FourierAnalysisDialog")
+ u"modules/scalc/ui/fourieranalysisdialog.ui"_ustr,
+ u"FourierAnalysisDialog"_ustr)
, maLabelAddr(ScAddress::INITIALIZE_INVALID)
, maActualInputRange(ScAddress::INITIALIZE_INVALID)
, mnLen(0)
@@ -31,11 +31,11 @@ ScFourierAnalysisDialog::ScFourierAnalysisDialog(SfxBindings* pSfxBindings,
, mbWithLabels(false)
, mbInverse(false)
, mbPolar(false)
- , mxWithLabelsCheckBox(m_xBuilder->weld_check_button("withlabels-check"))
- , mxInverseCheckBox(m_xBuilder->weld_check_button("inverse-check"))
- , mxPolarCheckBox(m_xBuilder->weld_check_button("polar-check"))
- , mxMinMagnitudeField(m_xBuilder->weld_spin_button("minmagnitude-spin"))
- , mxErrorMessage(m_xBuilder->weld_label("error-message"))
+ , mxWithLabelsCheckBox(m_xBuilder->weld_check_button(u"withlabels-check"_ustr))
+ , mxInverseCheckBox(m_xBuilder->weld_check_button(u"inverse-check"_ustr))
+ , mxPolarCheckBox(m_xBuilder->weld_check_button(u"polar-check"_ustr))
+ , mxMinMagnitudeField(m_xBuilder->weld_spin_button(u"minmagnitude-spin"_ustr))
+ , mxErrorMessage(m_xBuilder->weld_label(u"error-message"_ustr))
{
m_xDialog->set_title(ScResId(STR_FOURIER_ANALYSIS));
@@ -86,7 +86,7 @@ ScRange ScFourierAnalysisDialog::ApplyOutput(ScDocShell* pDocShell)
}
aOutput.newLine();
- aTemplate.autoReplaceRange("%INPUTRANGE%", maActualInputRange);
+ aTemplate.autoReplaceRange(u"%INPUTRANGE%"_ustr, maActualInputRange);
OUString aFormula;
genFormula(aFormula);
@@ -171,7 +171,7 @@ bool ScFourierAnalysisDialog::InputRangesValid()
}
maActualInputRange = ScRange(aActualStart, mInputRange.aEnd);
- mxErrorMessage->set_label("");
+ mxErrorMessage->set_label(u""_ustr);
return true;
}
diff --git a/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx b/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx
index 9d990ed5a406..4cbe9343e200 100644
--- a/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx
@@ -21,10 +21,10 @@ ScMovingAverageDialog::ScMovingAverageDialog(
weld::Window* pParent, ScViewData& rViewData )
: ScStatisticsInputOutputDialog(
pSfxBindings, pChildWindow, pParent, rViewData,
- "modules/scalc/ui/movingaveragedialog.ui",
- "MovingAverageDialog")
- , mxTrimRangeCheck(m_xBuilder->weld_check_button("trimrange-check"))
- , mxIntervalSpin(m_xBuilder->weld_spin_button("interval-spin"))
+ u"modules/scalc/ui/movingaveragedialog.ui"_ustr,
+ u"MovingAverageDialog"_ustr)
+ , mxTrimRangeCheck(m_xBuilder->weld_check_button(u"trimrange-check"_ustr))
+ , mxIntervalSpin(m_xBuilder->weld_spin_button(u"interval-spin"_ustr))
{
}
@@ -103,7 +103,7 @@ ScRange ScMovingAverageDialog::ApplyOutput(ScDocShell* pDocShell)
}
else
{
- aFormulas.push_back("=#N/A");
+ aFormulas.push_back(u"=#N/A"_ustr);
}
}
diff --git a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
index 38894160eff1..2c68f18255b7 100644
--- a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
@@ -47,26 +47,26 @@ ScRandomNumberGeneratorDialog::ScRandomNumberGeneratorDialog(
SfxBindings* pSfxBindings, SfxChildWindow* pChildWindow,
weld::Window* pParent, ScViewData& rViewData)
: ScAnyRefDlgController(pSfxBindings, pChildWindow, pParent,
- "modules/scalc/ui/randomnumbergenerator.ui",
- "RandomNumberGeneratorDialog")
+ u"modules/scalc/ui/randomnumbergenerator.ui"_ustr,
+ u"RandomNumberGeneratorDialog"_ustr)
, mrViewData(rViewData)
, mrDoc(rViewData.GetDocument())
, mbDialogLostFocus(false)
- , mxInputRangeText(m_xBuilder->weld_label("cell-range-label"))
- , mxInputRangeEdit(new formula::RefEdit(m_xBuilder->weld_entry("cell-range-edit")))
- , mxInputRangeButton(new formula::RefButton(m_xBuilder->weld_button("cell-range-button")))
- , mxDistributionCombo(m_xBuilder->weld_combo_box("distribution-combo"))
- , mxParameter1Text(m_xBuilder->weld_label("parameter1-label"))
- , mxParameter1Value(m_xBuilder->weld_spin_button("parameter1-spin"))
- , mxParameter2Text(m_xBuilder->weld_label("parameter2-label"))
- , mxParameter2Value(m_xBuilder->weld_spin_button("parameter2-spin"))
- , mxSeed(m_xBuilder->weld_spin_button("seed-spin"))
- , mxEnableSeed(m_xBuilder->weld_check_button("enable-seed-check"))
- , mxDecimalPlaces(m_xBuilder->weld_spin_button("decimal-places-spin"))
- , mxEnableRounding(m_xBuilder->weld_check_button("enable-rounding-check"))
- , mxButtonApply(m_xBuilder->weld_button("apply"))
- , mxButtonOk(m_xBuilder->weld_button("ok"))
- , mxButtonClose(m_xBuilder->weld_button("close"))
+ , mxInputRangeText(m_xBuilder->weld_label(u"cell-range-label"_ustr))
+ , mxInputRangeEdit(new formula::RefEdit(m_xBuilder->weld_entry(u"cell-range-edit"_ustr)))
+ , mxInputRangeButton(new formula::RefButton(m_xBuilder->weld_button(u"cell-range-button"_ustr)))
+ , mxDistributionCombo(m_xBuilder->weld_combo_box(u"distribution-combo"_ustr))
+ , mxParameter1Text(m_xBuilder->weld_label(u"parameter1-label"_ustr))
+ , mxParameter1Value(m_xBuilder->weld_spin_button(u"parameter1-spin"_ustr))
+ , mxParameter2Text(m_xBuilder->weld_label(u"parameter2-label"_ustr))
+ , mxParameter2Value(m_xBuilder->weld_spin_button(u"parameter2-spin"_ustr))
+ , mxSeed(m_xBuilder->weld_spin_button(u"seed-spin"_ustr))
+ , mxEnableSeed(m_xBuilder->weld_check_button(u"enable-seed-check"_ustr))
+ , mxDecimalPlaces(m_xBuilder->weld_spin_button(u"decimal-places-spin"_ustr))
+ , mxEnableRounding(m_xBuilder->weld_check_button(u"enable-rounding-check"_ustr))
+ , mxButtonApply(m_xBuilder->weld_button(u"apply"_ustr))
+ , mxButtonOk(m_xBuilder->weld_button(u"ok"_ustr))
+ , mxButtonClose(m_xBuilder->weld_button(u"close"_ustr))
{
mxInputRangeEdit->SetReferences(this, mxInputRangeText.get());
mxInputRangeButton->SetReferences(this, mxInputRangeEdit.get());
diff --git a/sc/source/ui/StatisticsDialogs/RegressionDialog.cxx b/sc/source/ui/StatisticsDialogs/RegressionDialog.cxx
index 2031bae10ff5..b75412947d96 100644
--- a/sc/source/ui/StatisticsDialogs/RegressionDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/RegressionDialog.cxx
@@ -112,16 +112,16 @@ namespace
OUString constTemplateLINEST[] =
{
- "=LINEST(%VARIABLE2_RANGE% ; %VARIABLE1_RANGE% ; %CALC_INTERCEPT% ; TRUE)",
- "=LINEST(%VARIABLE2_RANGE% ; LN(%VARIABLE1_RANGE%) ; %CALC_INTERCEPT% ; TRUE)",
- "=LINEST(LN(%VARIABLE2_RANGE%) ; LN(%VARIABLE1_RANGE%) ; %CALC_INTERCEPT% ; TRUE)"
+ u"=LINEST(%VARIABLE2_RANGE% ; %VARIABLE1_RANGE% ; %CALC_INTERCEPT% ; TRUE)"_ustr,
+ u"=LINEST(%VARIABLE2_RANGE% ; LN(%VARIABLE1_RANGE%) ; %CALC_INTERCEPT% ; TRUE)"_ustr,
+ u"=LINEST(LN(%VARIABLE2_RANGE%) ; LN(%VARIABLE1_RANGE%) ; %CALC_INTERCEPT% ; TRUE)"_ustr
};
OUString constRegressionFormula[] =
{
- "=MMULT(%XDATAMATRIX_RANGE% ; %SLOPES_RANGE%) + %INTERCEPT_ADDR%",
- "=MMULT(LN(%XDATAMATRIX_RANGE%) ; %SLOPES_RANGE%) + %INTERCEPT_ADDR%",
- "=EXP(MMULT(LN(%XDATAMATRIX_RANGE%) ; %SLOPES_RANGE%) + %INTERCEPT_ADDR%)"
+ u"=MMULT(%XDATAMATRIX_RANGE% ; %SLOPES_RANGE%) + %INTERCEPT_ADDR%"_ustr,
+ u"=MMULT(LN(%XDATAMATRIX_RANGE%) ; %SLOPES_RANGE%) + %INTERCEPT_ADDR%"_ustr,
+ u"=EXP(MMULT(LN(%XDATAMATRIX_RANGE%) ; %SLOPES_RANGE%) + %INTERCEPT_ADDR%)"_ustr
};
} // end anonymous namespace
@@ -139,19 +139,19 @@ ScRegressionDialog::ScRegressionDialog(
weld::Window* pParent, ScViewData& rViewData )
: ScStatisticsTwoVariableDialog(
pSfxBindings, pChildWindow, pParent, rViewData,
- "modules/scalc/ui/regressiondialog.ui", "RegressionDialog")
+ u"modules/scalc/ui/regressiondialog.ui"_ustr, u"RegressionDialog"_ustr)
, mbUnivariate(true)
, mnNumIndependentVars(1)
, mnNumObservations(0)
, mbUse3DAddresses(false)
, mbCalcIntercept(true)
- , mxWithLabelsCheckBox(m_xBuilder->weld_check_button("withlabels-check"))
- , mxLinearRadioButton(m_xBuilder->weld_radio_button("linear-radio"))
- , mxLogarithmicRadioButton(m_xBuilder->weld_radio_button("logarithmic-radio"))
- , mxErrorMessage(m_xBuilder->weld_label("error-message"))
- , mxConfidenceLevelField(m_xBuilder->weld_spin_button("confidencelevel-spin"))
- , mxCalcResidualsCheckBox(m_xBuilder->weld_check_button("calcresiduals-check"))
- , mxNoInterceptCheckBox(m_xBuilder->weld_check_button("nointercept-check"))
+ , mxWithLabelsCheckBox(m_xBuilder->weld_check_button(u"withlabels-check"_ustr))
+ , mxLinearRadioButton(m_xBuilder->weld_radio_button(u"linear-radio"_ustr))
+ , mxLogarithmicRadioButton(m_xBuilder->weld_radio_button(u"logarithmic-radio"_ustr))
+ , mxErrorMessage(m_xBuilder->weld_label(u"error-message"_ustr))
+ , mxConfidenceLevelField(m_xBuilder->weld_spin_button(u"confidencelevel-spin"_ustr))
+ , mxCalcResidualsCheckBox(m_xBuilder->weld_check_button(u"calcresiduals-check"_ustr))
+ , mxNoInterceptCheckBox(m_xBuilder->weld_check_button(u"nointercept-check"_ustr))
{
mxWithLabelsCheckBox->connect_toggled(LINK(this, ScRegressionDialog, CheckBoxHdl));
mxConfidenceLevelField->connect_value_changed(LINK(this, ScRegressionDialog, NumericFieldHdl));
@@ -190,8 +190,8 @@ ScRange ScRegressionDialog::ApplyOutput(ScDocShell* pDocShell)
ScRange aXDataRange(GetDataRange(mVariable1Range));
ScRange aYDataRange(GetDataRange(mVariable2Range));
- aTemplate.autoReplaceRange("%VARIABLE1_RANGE%", aXDataRange);
- aTemplate.autoReplaceRange("%VARIABLE2_RANGE%", aYDataRange);
+ aTemplate.autoReplaceRange(u"%VARIABLE1_RANGE%"_ustr, aXDataRange);
+ aTemplate.autoReplaceRange(u"%VARIABLE2_RANGE%"_ustr, aYDataRange);
size_t nRegressionIndex = GetRegressionTypeIndex();
ScRegType eRegType = static_cast<ScRegType>(nRegressionIndex);
bool bTakeLogX = eRegType == ScRegType::LOGARITHMIC || eRegType == ScRegType::POWER;
@@ -278,7 +278,7 @@ bool ScRegressionDialog::InputRangesValid()
mbUse3DAddresses = mVariable1Range.aStart.Tab() != mOutputAddress.Tab() ||
mVariable2Range.aStart.Tab() != mOutputAddress.Tab();
- mxErrorMessage->set_label("");
+ mxErrorMessage->set_label(u""_ustr);
return true;
}
@@ -370,20 +370,20 @@ void ScRegressionDialog::WriteRawRegressionResults(AddressWalkerWriter& rOutput,
// Add LINEST result components to template
// 1. Add ranges for coefficients and standard errors for independent vars and the intercept.
// Note that these two are in the reverse order(m_n, m_n-1, ..., m_1, b) w.r.t what we expect.
- rTemplate.autoReplaceRange("%COEFFICIENTS_REV_RANGE%", ScRange(rOutput.current(), rOutput.current(mnNumIndependentVars)));
- rTemplate.autoReplaceRange("%SERRORSX_REV_RANGE%", ScRange(rOutput.current(0, 1), rOutput.current(mnNumIndependentVars, 1)));
+ rTemplate.autoReplaceRange(u"%COEFFICIENTS_REV_RANGE%"_ustr, ScRange(rOutput.current(), rOutput.current(mnNumIndependentVars)));
+ rTemplate.autoReplaceRange(u"%SERRORSX_REV_RANGE%"_ustr, ScRange(rOutput.current(0, 1), rOutput.current(mnNumIndependentVars, 1)));
// 2. Add R-squared and standard error for y estimate.
- rTemplate.autoReplaceAddress("%RSQUARED_ADDR%", rOutput.current(0, 2));
- rTemplate.autoReplaceAddress("%SERRORY_ADDR%", rOutput.current(1, 2));
+ rTemplate.autoReplaceAddress(u"%RSQUARED_ADDR%"_ustr, rOutput.current(0, 2));
+ rTemplate.autoReplaceAddress(u"%SERRORY_ADDR%"_ustr, rOutput.current(1, 2));
// 3. Add F statistic and degrees of freedom
- rTemplate.autoReplaceAddress("%FSTATISTIC_ADDR%", rOutput.current(0, 3));
- rTemplate.autoReplaceAddress("%DoFRESID_ADDR%", rOutput.current(1, 3));
+ rTemplate.autoReplaceAddress(u"%FSTATISTIC_ADDR%"_ustr, rOutput.current(0, 3));
+ rTemplate.autoReplaceAddress(u"%DoFRESID_ADDR%"_ustr, rOutput.current(1, 3));
// 4. Add regression sum of squares and residual sum of squares
- rTemplate.autoReplaceAddress("%SSREG_ADDR%", rOutput.current(0, 4));
- rTemplate.autoReplaceAddress("%SSRESID_ADDR%", rOutput.current(1, 4));
+ rTemplate.autoReplaceAddress(u"%SSREG_ADDR%"_ustr, rOutput.current(0, 4));
+ rTemplate.autoReplaceAddress(u"%SSRESID_ADDR%"_ustr, rOutput.current(1, 4));
rOutput.push(0, 4);
rOutput.newLine();
@@ -406,8 +406,8 @@ void ScRegressionDialog::WriteRegressionStatistics(AddressWalkerWriter& rOutput,
OUString aMeasureFormulas[] =
{
- "=%RSQUARED_ADDR%",
- "=%SERRORY_ADDR%",
+ u"=%RSQUARED_ADDR%"_ustr,
+ u"=%SERRORY_ADDR%"_ustr,
"=" + OUString::number(mnNumIndependentVars),
"=" + OUString::number(mnNumObservations),
OUString::Concat(
@@ -415,8 +415,8 @@ void ScRegressionDialog::WriteRegressionStatistics(AddressWalkerWriter& rOutput,
(mbCalcIntercept ? std::u16string_view(u" - 1)") : std::u16string_view(u")"))
};
- rTemplate.autoReplaceAddress("%NUMXVARS_ADDR%", rOutput.current(1, 2));
- rTemplate.autoReplaceAddress("%NUMOBS_ADDR%", rOutput.current(1, 3));
+ rTemplate.autoReplaceAddress(u"%NUMXVARS_ADDR%"_ustr, rOutput.current(1, 2));
+ rTemplate.autoReplaceAddress(u"%NUMOBS_ADDR%"_ustr, rOutput.current(1, 3));
for (size_t nIdx = 0; nIdx < SAL_N_ELEMENTS(aMeasureNames); ++nIdx)
{
@@ -439,7 +439,7 @@ void ScRegressionDialog::WriteRegressionANOVAResults(AddressWalkerWriter& rOutpu
OUString aTable[nRowsInTable][nColsInTable] =
{
{
- "",
+ u""_ustr,
ScResId(STR_ANOVA_LABEL_DF),
ScResId(STR_ANOVA_LABEL_SS),
ScResId(STR_ANOVA_LABEL_MS),
@@ -448,31 +448,31 @@ void ScRegressionDialog::WriteRegressionANOVAResults(AddressWalkerWriter& rOutpu
},
{
ScResId(STR_REGRESSION),
- "=%NUMXVARS_ADDR%",
- "=%SSREG_ADDR%",
- "=%SSREG_ADDR% / %DoFREG_ADDR%",
- "=%FSTATISTIC_ADDR%",
- "=FDIST(%FSTATISTIC_ADDR% ; %DoFREG_ADDR% ; %DoFRESID_ADDR%)"
+ u"=%NUMXVARS_ADDR%"_ustr,
+ u"=%SSREG_ADDR%"_ustr,
+ u"=%SSREG_ADDR% / %DoFREG_ADDR%"_ustr,
+ u"=%FSTATISTIC_ADDR%"_ustr,
+ u"=FDIST(%FSTATISTIC_ADDR% ; %DoFREG_ADDR% ; %DoFRESID_ADDR%)"_ustr
},
{
ScResId(STR_LABEL_RESIDUAL),
- "=%DoFRESID_ADDR%",
- "=%SSRESID_ADDR%",
- "=%SSRESID_ADDR% / %DoFRESID_ADDR%",
- "",
- ""
+ u"=%DoFRESID_ADDR%"_ustr,
+ u"=%SSRESID_ADDR%"_ustr,
+ u"=%SSRESID_ADDR% / %DoFRESID_ADDR%"_ustr,
+ u""_ustr,
+ u""_ustr
},
{
ScResId(STR_ANOVA_LABEL_TOTAL),
- "=%DoFREG_ADDR% + %DoFRESID_ADDR%",
- "=%SSREG_ADDR% + %SSRESID_ADDR%",
- "",
- "",
- ""
+ u"=%DoFREG_ADDR% + %DoFRESID_ADDR%"_ustr,
+ u"=%SSREG_ADDR% + %SSRESID_ADDR%"_ustr,
+ u""_ustr,
+ u""_ustr,
+ u""_ustr
}
};
- rTemplate.autoReplaceAddress("%DoFREG_ADDR%", rOutput.current(1, 1));
+ rTemplate.autoReplaceAddress(u"%DoFREG_ADDR%"_ustr, rOutput.current(1, 1));
// Cell getter lambda
std::function<CellValueGetter> aCellGetterFunc = [&aTable](size_t nRowIdx, size_t nColIdx) -> const OUString&
@@ -503,7 +503,7 @@ void ScRegressionDialog::WriteRegressionANOVAResults(AddressWalkerWriter& rOutpu
rOutput.writeString(ScResId(STR_LABEL_CONFIDENCE_LEVEL));
rOutput.nextColumn();
rOutput.writeValue(mxConfidenceLevelField->get_value() / 100.0);
- rTemplate.autoReplaceAddress("%CONFIDENCE_LEVEL_ADDR%", rOutput.current());
+ rTemplate.autoReplaceAddress(u"%CONFIDENCE_LEVEL_ADDR%"_ustr, rOutput.current());
rOutput.newLine();
}
@@ -520,18 +520,18 @@ void ScRegressionDialog::WriteRegressionEstimatesWithCI(AddressWalkerWriter& rOu
const OUString aStErrAddr( aEnd.Format( eAddrFlag, &mDocument, mDocument.GetAddressConvention()));
// Coefficients & Std.Errors ranges (column vectors) in this table (yet to populate).
- rTemplate.autoReplaceRange("%COEFFICIENTS_RANGE%",
+ rTemplate.autoReplaceRange(u"%COEFFICIENTS_RANGE%"_ustr,
ScRange(rOutput.current(1, 1),
rOutput.current(1, 1 + mnNumIndependentVars)));
- rTemplate.autoReplaceRange("%SLOPES_RANGE%", // Excludes the intercept
+ rTemplate.autoReplaceRange(u"%SLOPES_RANGE%"_ustr, // Excludes the intercept
ScRange(rOutput.current(1, 2),
rOutput.current(1, 1 + mnNumIndependentVars)));
- rTemplate.autoReplaceAddress("%INTERCEPT_ADDR%", rOutput.current(1, 1));
- rTemplate.autoReplaceRange("%SERRORSX_RANGE%",
+ rTemplate.autoReplaceAddress(u"%INTERCEPT_ADDR%"_ustr, rOutput.current(1, 1));
+ rTemplate.autoReplaceRange(u"%SERRORSX_RANGE%"_ustr,
ScRange(rOutput.current(2, 1),
rOutput.current(2, 1 + mnNumIndependentVars)));
// t-Statistics range in this table (yet to populate)
- rTemplate.autoReplaceRange("%TSTAT_RANGE%",
+ rTemplate.autoReplaceRange(u"%TSTAT_RANGE%"_ustr,
ScRange(rOutput.current(3, 1),
rOutput.current(3, 1 + mnNumIndependentVars)));
@@ -540,7 +540,7 @@ void ScRegressionDialog::WriteRegressionEstimatesWithCI(AddressWalkerWriter& rOu
OUString aTable[nRowsInTable][nColsInTable] =
{
{
- "",
+ u""_ustr,
ScResId(STR_LABEL_COEFFICIENTS),
ScResId(STRID_CALC_STD_ERROR),
ScResId(STR_LABEL_TSTATISTIC),
@@ -555,21 +555,21 @@ void ScRegressionDialog::WriteRegressionEstimatesWithCI(AddressWalkerWriter& rOu
// Following are matrix formulas of size numcols = 1, numrows = (mnNumIndependentVars + 1)
{
- "",
+ u""_ustr,
// This puts the coefficients in the reverse order compared to that in LINEST output.
"=INDEX(%COEFFICIENTS_REV_RANGE%; 1 ; ROW(" + aCoeffAddr + ")+1 - ROW())",
// This puts the standard errors in the reverse order compared to that in LINEST output.
"=INDEX(%SERRORSX_REV_RANGE%; 1 ; ROW(" + aStErrAddr + ")+1 - ROW())",
// t-Statistic
- "=%COEFFICIENTS_RANGE% / %SERRORSX_RANGE%",
+ u"=%COEFFICIENTS_RANGE% / %SERRORSX_RANGE%"_ustr,
// p-Value
- "=TDIST(ABS(%TSTAT_RANGE%) ; %DoFRESID_ADDR% ; 2 )",
+ u"=TDIST(ABS(%TSTAT_RANGE%) ; %DoFRESID_ADDR% ; 2 )"_ustr,
// Lower limit of confidence interval
- "=%COEFFICIENTS_RANGE% - %SERRORSX_RANGE% * "
- "TINV(1 - %CONFIDENCE_LEVEL_ADDR% ; %DoFRESID_ADDR%)",
+ u"=%COEFFICIENTS_RANGE% - %SERRORSX_RANGE% * "
+ "TINV(1 - %CONFIDENCE_LEVEL_ADDR% ; %DoFRESID_ADDR%)"_ustr,
// Upper limit of confidence interval
- "=%COEFFICIENTS_RANGE% + %SERRORSX_RANGE% * "
- "TINV(1 - %CONFIDENCE_LEVEL_ADDR% ; %DoFRESID_ADDR%)"
+ u"=%COEFFICIENTS_RANGE% + %SERRORSX_RANGE% * "
+ "TINV(1 - %CONFIDENCE_LEVEL_ADDR% ; %DoFRESID_ADDR%)"_ustr
}
};
@@ -623,7 +623,7 @@ void ScRegressionDialog::WritePredictionsWithResiduals(AddressWalkerWriter& rOut
// Range of X variables with rows as observations and columns as variables.
ScRange aDataMatrixRange(rOutput.current(0, 1), rOutput.current(mnNumIndependentVars - 1, mnNumObservations));
- rTemplate.autoReplaceRange("%XDATAMATRIX_RANGE%", aDataMatrixRange);
+ rTemplate.autoReplaceRange(u"%XDATAMATRIX_RANGE%"_ustr, aDataMatrixRange);
// Write X variable names
for (size_t nXvarIdx = 1; nXvarIdx <= mnNumIndependentVars; ++nXvarIdx)
@@ -636,7 +636,7 @@ void ScRegressionDialog::WritePredictionsWithResiduals(AddressWalkerWriter& rOut
// Write the X data matrix
rOutput.nextRow();
- OUString aDataMatrixFormula = bGroupedByColumn ? OUString("=%VARIABLE1_RANGE%") : OUString("=TRANSPOSE(%VARIABLE1_RANGE%)");
+ OUString aDataMatrixFormula = bGroupedByColumn ? u"=%VARIABLE1_RANGE%"_ustr : u"=TRANSPOSE(%VARIABLE1_RANGE%)"_ustr;
rTemplate.setTemplate(aDataMatrixFormula);
rOutput.writeMatrixFormula(rTemplate.getTemplate(), mnNumIndependentVars, mnNumObservations);
@@ -646,16 +646,16 @@ void ScRegressionDialog::WritePredictionsWithResiduals(AddressWalkerWriter& rOut
rOutput.nextRow();
rTemplate.setTemplate(constRegressionFormula[nRegressionIndex]);
rOutput.writeMatrixFormula(rTemplate.getTemplate(), 1, mnNumObservations);
- rTemplate.autoReplaceRange("%PREDICTEDY_RANGE%", ScRange(rOutput.current(), rOutput.current(0, mnNumObservations - 1)));
+ rTemplate.autoReplaceRange(u"%PREDICTEDY_RANGE%"_ustr, ScRange(rOutput.current(), rOutput.current(0, mnNumObservations - 1)));
// Write actual Y
rOutput.push(1, -1);
rOutput.writeFormula(GetYVariableNameFormula(false));
rOutput.nextRow();
- OUString aYVectorFormula = bGroupedByColumn ? OUString("=%VARIABLE2_RANGE%") : OUString("=TRANSPOSE(%VARIABLE2_RANGE%)");
+ OUString aYVectorFormula = bGroupedByColumn ? u"=%VARIABLE2_RANGE%"_ustr : u"=TRANSPOSE(%VARIABLE2_RANGE%)"_ustr;
rTemplate.setTemplate(aYVectorFormula);
rOutput.writeMatrixFormula(rTemplate.getTemplate(), 1, mnNumObservations);
- rTemplate.autoReplaceRange("%ACTUALY_RANGE%", ScRange(rOutput.current(), rOutput.current(0, mnNumObservations - 1)));
+ rTemplate.autoReplaceRange(u"%ACTUALY_RANGE%"_ustr, ScRange(rOutput.current(), rOutput.current(0, mnNumObservations - 1)));
// Write residual
rOutput.push(1, -1);
diff --git a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx
index 0667fd6a314c..c6a807ddf3f8 100644
--- a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx
@@ -22,7 +22,7 @@
ScSamplingDialog::ScSamplingDialog(SfxBindings* pSfxBindings, SfxChildWindow* pChildWindow,
weld::Window* pParent, ScViewData& rViewData)
: ScAnyRefDlgController(pSfxBindings, pChildWindow, pParent,
- "modules/scalc/ui/samplingdialog.ui", "SamplingDialog")
+ u"modules/scalc/ui/samplingdialog.ui"_ustr, u"SamplingDialog"_ustr)
, mpActiveEdit(nullptr)
, mViewData(rViewData)
, mDocument(rViewData.GetDocument())
@@ -33,20 +33,20 @@ ScSamplingDialog::ScSamplingDialog(SfxBindings* pSfxBindings, SfxChildWindow* pC
, mnLastSampleSizeValue(1)
, mnLastPeriodValue(1)
, mDialogLostFocus(false)
- , mxInputRangeLabel(m_xBuilder->weld_label("input-range-label"))
- , mxInputRangeEdit(new formula::RefEdit(m_xBuilder->weld_entry("input-range-edit")))
- , mxInputRangeButton(new formula::RefButton(m_xBuilder->weld_button("input-range-button")))
- , mxOutputRangeLabel(m_xBuilder->weld_label("output-range-label"))
- , mxOutputRangeEdit(new formula::RefEdit(m_xBuilder->weld_entry("output-range-edit")))
- , mxOutputRangeButton(new formula::RefButton(m_xBuilder->weld_button("output-range-button")))
- , mxSampleSize(m_xBuilder->weld_spin_button("sample-size-spin"))
- , mxPeriod(m_xBuilder->weld_spin_button("period-spin"))
- , mxRandomMethodRadio(m_xBuilder->weld_radio_button("random-method-radio"))
- , mxWithReplacement(m_xBuilder->weld_check_button("with-replacement"))
- , mxKeepOrder(m_xBuilder->weld_check_button("keep-order"))
- , mxPeriodicMethodRadio(m_xBuilder->weld_radio_button("periodic-method-radio"))
- , mxButtonOk(m_xBuilder->weld_button("ok"))
- , mxButtonCancel(m_xBuilder->weld_button("cancel"))
+ , mxInputRangeLabel(m_xBuilder->weld_label(u"input-range-label"_ustr))
+ , mxInputRangeEdit(new formula::RefEdit(m_xBuilder->weld_entry(u"input-range-edit"_ustr)))
+ , mxInputRangeButton(new formula::RefButton(m_xBuilder->weld_button(u"input-range-button"_ustr)))
+ , mxOutputRangeLabel(m_xBuilder->weld_label(u"output-range-label"_ustr))
+ , mxOutputRangeEdit(new formula::RefEdit(m_xBuilder->weld_entry(u"output-range-edit"_ustr)))
+ , mxOutputRangeButton(new formula::RefButton(m_xBuilder->weld_button(u"output-range-button"_ustr)))
+ , mxSampleSize(m_xBuilder->weld_spin_button(u"sample-size-spin"_ustr))
+ , mxPeriod(m_xBuilder->weld_spin_button(u"period-spin"_ustr))
+ , mxRandomMethodRadio(m_xBuilder->weld_radio_button(u"random-method-radio"_ustr))
+ , mxWithReplacement(m_xBuilder->weld_check_button(u"with-replacement"_ustr))
+ , mxKeepOrder(m_xBuilder->weld_check_button(u"keep-order"_ustr))
+ , mxPeriodicMethodRadio(m_xBuilder->weld_radio_button(u"periodic-method-radio"_ustr))
+ , mxButtonOk(m_xBuilder->weld_button(u"ok"_ustr))
+ , mxButtonCancel(m_xBuilder->weld_button(u"cancel"_ustr))
{
mxInputRangeEdit->SetReferences(this, mxInputRangeLabel.get());
mxInputRangeButton->SetReferences(this, mxInputRangeEdit.get());
diff --git a/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx b/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx
index 15521dd1e1ef..cff235681f1e 100644
--- a/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx
@@ -50,22 +50,22 @@ ScStatisticsInputOutputDialog::ScStatisticsInputOutputDialog(
SfxBindings* pSfxBindings, SfxChildWindow* pChildWindow,
weld::Window* pParent, ScViewData& rViewData, const OUString& rUIXMLDescription, const OUString& rID)
: ScAnyRefDlgController(pSfxBindings, pChildWindow, pParent, rUIXMLDescription, rID)
- , mxInputRangeLabel(m_xBuilder->weld_label("input-range-label"))
- , mxInputRangeEdit(new formula::RefEdit(m_xBuilder->weld_entry("input-range-edit")))
- , mxInputRangeButton(new formula::RefButton(m_xBuilder->weld_button("input-range-button")))
- , mxOutputRangeLabel(m_xBuilder->weld_label("output-range-label"))
- , mxOutputRangeEdit(new formula::RefEdit(m_xBuilder->weld_entry("output-range-edit")))
- , mxOutputRangeButton(new formula::RefButton(m_xBuilder->weld_button("output-range-button")))
- , mxGroupByColumnsRadio(m_xBuilder->weld_radio_button("groupedby-columns-radio"))
- , mxGroupByRowsRadio(m_xBuilder->weld_radio_button("groupedby-rows-radio"))
+ , mxInputRangeLabel(m_xBuilder->weld_label(u"input-range-label"_ustr))
+ , mxInputRangeEdit(new formula::RefEdit(m_xBuilder->weld_entry(u"input-range-edit"_ustr)))
+ , mxInputRangeButton(new formula::RefButton(m_xBuilder->weld_button(u"input-range-button"_ustr)))
+ , mxOutputRangeLabel(m_xBuilder->weld_label(u"output-range-label"_ustr))
+ , mxOutputRangeEdit(new formula::RefEdit(m_xBuilder->weld_entry(u"output-range-edit"_ustr)))
+ , mxOutputRangeButton(new formula::RefButton(m_xBuilder->weld_button(u"output-range-button"_ustr)))
+ , mxGroupByColumnsRadio(m_xBuilder->weld_radio_button(u"groupedby-columns-radio"_ustr))
+ , mxGroupByRowsRadio(m_xBuilder->weld_radio_button(u"groupedby-rows-radio"_ustr))
, mViewData(rViewData)
, mDocument(rViewData.GetDocument())
, mInputRange(ScAddress::INITIALIZE_INVALID)
, mAddressDetails(mDocument.GetAddressConvention(), 0, 0)
, mOutputAddress(ScAddress::INITIALIZE_INVALID)
, mGroupedBy(BY_COLUMN)
- , mxButtonOk(m_xBuilder->weld_button("ok"))
- , mxButtonCancel(m_xBuilder->weld_button("cancel"))
+ , mxButtonOk(m_xBuilder->weld_button(u"ok"_ustr))
+ , mxButtonCancel(m_xBuilder->weld_button(u"cancel"_ustr))
, mpActiveEdit(nullptr)
, mCurrentAddress(rViewData.GetCurX(), rViewData.GetCurY(), rViewData.GetTabNo())
, mDialogLostFocus(false)
diff --git a/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx b/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx
index 8c45f4b2df24..c0fcbc751dbc 100644
--- a/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx
@@ -22,15 +22,15 @@ ScStatisticsTwoVariableDialog::ScStatisticsTwoVariableDialog(
SfxBindings* pSfxBindings, SfxChildWindow* pChildWindow,
weld::Window* pParent, ScViewData& rViewData, const OUString& rUIXMLDescription, const OUString& rID)
: ScAnyRefDlgController(pSfxBindings, pChildWindow, pParent, rUIXMLDescription, rID)
- , mxVariable1RangeLabel(m_xBuilder->weld_label("variable1-range-label"))
- , mxVariable1RangeEdit(new formula::RefEdit(m_xBuilder->weld_entry("variable1-range-edit")))
- , mxVariable1RangeButton(new formula::RefButton(m_xBuilder->weld_button("variable1-range-button")))
- , mxVariable2RangeLabel(m_xBuilder->weld_label("variable2-range-label"))
- , mxVariable2RangeEdit(new formula::RefEdit(m_xBuilder->weld_entry("variable2-range-edit")))
- , mxVariable2RangeButton(new formula::RefButton(m_xBuilder->weld_button("variable2-range-button")))
- , mxOutputRangeLabel(m_xBuilder->weld_label("output-range-label"))
- , mxOutputRangeEdit(new formula::RefEdit(m_xBuilder->weld_entry("output-range-edit")))
- , mxOutputRangeButton(new formula::RefButton(m_xBuilder->weld_button("output-range-button")))
+ , mxVariable1RangeLabel(m_xBuilder->weld_label(u"variable1-range-label"_ustr))
+ , mxVariable1RangeEdit(new formula::RefEdit(m_xBuilder->weld_entry(u"variable1-range-edit"_ustr)))
+ , mxVariable1RangeButton(new formula::RefButton(m_xBuilder->weld_button(u"variable1-range-button"_ustr)))
+ , mxVariable2RangeLabel(m_xBuilder->weld_label(u"variable2-range-label"_ustr))
+ , mxVariable2RangeEdit(new formula::RefEdit(m_xBuilder->weld_entry(u"variable2-range-edit"_ustr)))
+ , mxVariable2RangeButton(new formula::RefButton(m_xBuilder->weld_button(u"variable2-range-button"_ustr)))
+ , mxOutputRangeLabel(m_xBuilder->weld_label(u"output-range-label"_ustr))
+ , mxOutputRangeEdit(new formula::RefEdit(m_xBuilder->weld_entry(u"output-range-edit"_ustr)))
+ , mxOutputRangeButton(new formula::RefButton(m_xBuilder->weld_button(u"output-range-button"_ustr)))
, mViewData(rViewData)
, mDocument(rViewData.GetDocument())
, mVariable1Range(ScAddress::INITIALIZE_INVALID)
@@ -38,10 +38,10 @@ ScStatisticsTwoVariableDialog::ScStatisticsTwoVariableDialog(
, mAddressDetails(mDocument.GetAddressConvention(), 0, 0 )
, mOutputAddress(ScAddress::INITIALIZE_INVALID)
, mGroupedBy(BY_COLUMN)
- , mxButtonOk(m_xBuilder->weld_button("ok"))
- , mxButtonCancel(m_xBuilder->weld_button("cancel"))
- , mxGroupByColumnsRadio(m_xBuilder->weld_radio_button("groupedby-columns-radio"))
- , mxGroupByRowsRadio(m_xBuilder->weld_radio_button("groupedby-rows-radio"))
+ , mxButtonOk(m_xBuilder->weld_button(u"ok"_ustr))
+ , mxButtonCancel(m_xBuilder->weld_button(u"cancel"_ustr))
+ , mxGroupByColumnsRadio(m_xBuilder->weld_radio_button(u"groupedby-columns-radio"_ustr))
+ , mxGroupByRowsRadio(m_xBuilder->weld_radio_button(u"groupedby-rows-radio"_ustr))
, mpActiveEdit(nullptr)
, mCurrentAddress(rViewData.GetCurX(), rViewData.GetCurY(), rViewData.GetTabNo() )
, mDialogLostFocus(false)
diff --git a/sc/source/ui/StatisticsDialogs/TTestDialog.cxx b/sc/source/ui/StatisticsDialogs/TTestDialog.cxx
index 864d4ac4f6c2..7f57ebebdb35 100644
--- a/sc/source/ui/StatisticsDialogs/TTestDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/TTestDialog.cxx
@@ -21,7 +21,7 @@ ScTTestDialog::ScTTestDialog(
weld::Window* pParent, ScViewData& rViewData ) :
ScStatisticsTwoVariableDialog(
pSfxBindings, pChildWindow, pParent, rViewData,
- "modules/scalc/ui/ttestdialog.ui", "TTestDialog")
+ u"modules/scalc/ui/ttestdialog.ui"_ustr, u"TTestDialog"_ustr)
{
m_xDialog->set_title(ScResId(STR_TTEST));
}
@@ -57,8 +57,8 @@ ScRange ScTTestDialog::ApplyOutput(ScDocShell* pDocShell)
else
pVariable2Iterator.reset(new DataRangeByRowIterator(mVariable2Range));
- aTemplate.autoReplaceRange("%VARIABLE1_RANGE%", pVariable1Iterator->get());
- aTemplate.autoReplaceRange("%VARIABLE2_RANGE%", pVariable2Iterator->get());
+ aTemplate.autoReplaceRange(u"%VARIABLE1_RANGE%"_ustr, pVariable1Iterator->get());
+ aTemplate.autoReplaceRange(u"%VARIABLE2_RANGE%"_ustr, pVariable2Iterator->get());
aOutput.writeBoldString(ScResId(STR_TTEST_UNDO_NAME));
aOutput.newLine();
@@ -67,14 +67,14 @@ ScRange ScTTestDialog::ApplyOutput(ScDocShell* pDocShell)
aOutput.writeString(ScResId(STR_LABEL_ALPHA));
aOutput.nextColumn();
aOutput.writeValue(0.05);
- aTemplate.autoReplaceAddress("%ALPHA%", aOutput.current());
+ aTemplate.autoReplaceAddress(u"%ALPHA%"_ustr, aOutput.current());
aOutput.newLine();
// Hypothesized mean difference
aOutput.writeString(ScResId(STR_HYPOTHESIZED_MEAN_DIFFERENCE_LABEL));
aOutput.nextColumn();
aOutput.writeValue(0);
- aTemplate.autoReplaceAddress("%HYPOTHESIZED_MEAN_DIFFERENCE%", aOutput.current());
+ aTemplate.autoReplaceAddress(u"%HYPOTHESIZED_MEAN_DIFFERENCE%"_ustr, aOutput.current());
aOutput.newLine();
aOutput.nextColumn();
@@ -123,7 +123,7 @@ ScRange ScTTestDialog::ApplyOutput(ScDocShell* pDocShell)
aOutput.nextColumn();
aTemplate.setTemplate("=AVERAGE(IF(ISODD(IF(ISNUMBER(%VARIABLE1_RANGE%); 1; 0) * IF(ISNUMBER(%VARIABLE2_RANGE%); 1; 0)); %VARIABLE1_RANGE% - %VARIABLE2_RANGE%; \"NA\"))");
aOutput.writeMatrixFormula(aTemplate.getTemplate());
- aTemplate.autoReplaceAddress("%OBSERVED_MEAN_DIFFERENCE%", aOutput.current());
+ aTemplate.autoReplaceAddress(u"%OBSERVED_MEAN_DIFFERENCE%"_ustr, aOutput.current());
aOutput.newLine();
// Variance of the Differences
@@ -131,7 +131,7 @@ ScRange ScTTestDialog::ApplyOutput(ScDocShell* pDocShell)
aOutput.nextColumn();
aTemplate.setTemplate("=VAR(IF(ISODD(IF(ISNUMBER(%VARIABLE1_RANGE%); 1; 0) * IF(ISNUMBER(%VARIABLE2_RANGE%); 1; 0)); %VARIABLE1_RANGE% - %VARIABLE2_RANGE%; \"NA\"))");
aOutput.writeMatrixFormula(aTemplate.getTemplate());
- aTemplate.autoReplaceAddress("%VARIANCE_OF_DIFFERENCES%", aOutput.current());
+ aTemplate.autoReplaceAddress(u"%VARIANCE_OF_DIFFERENCES%"_ustr, aOutput.current());
aOutput.newLine();
// df
@@ -139,7 +139,7 @@ ScRange ScTTestDialog::ApplyOutput(ScDocShell* pDocShell)
aOutput.nextColumn();
aTemplate.setTemplate("=SUM(IF(ISNUMBER(%VARIABLE1_RANGE%); 1; 0) * IF(ISNUMBER(%VARIABLE2_RANGE%); 1; 0)) - 1");
aOutput.writeMatrixFormula(aTemplate.getTemplate());
- aTemplate.autoReplaceAddress("%DEGREE_OF_FREEDOM%", aOutput.current());
+ aTemplate.autoReplaceAddress(u"%DEGREE_OF_FREEDOM%"_ustr, aOutput.current());
aOutput.newLine();
// t stat
@@ -147,7 +147,7 @@ ScRange ScTTestDialog::ApplyOutput(ScDocShell* pDocShell)
aOutput.nextColumn();
aTemplate.setTemplate("=(%OBSERVED_MEAN_DIFFERENCE% - %HYPOTHESIZED_MEAN_DIFFERENCE%) / (%VARIANCE_OF_DIFFERENCES% / ( %DEGREE_OF_FREEDOM% + 1)) ^ 0.5");
aOutput.writeFormula(aTemplate.getTemplate());
- aTemplate.autoReplaceAddress("%T_STAT%", aOutput.current());
+ aTemplate.autoReplaceAddress(u"%T_STAT%"_ustr, aOutput.current());
aOutput.newLine();
// P one-tail
diff --git a/sc/source/ui/StatisticsDialogs/ZTestDialog.cxx b/sc/source/ui/StatisticsDialogs/ZTestDialog.cxx
index a1731fa8f055..627c1cf65006 100644
--- a/sc/source/ui/StatisticsDialogs/ZTestDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/ZTestDialog.cxx
@@ -21,7 +21,7 @@ ScZTestDialog::ScZTestDialog(
weld::Window* pParent, ScViewData& rViewData ) :
ScStatisticsTwoVariableDialog(
pSfxBindings, pChildWindow, pParent, rViewData,
- "modules/scalc/ui/ztestdialog.ui", "ZTestDialog")
+ u"modules/scalc/ui/ztestdialog.ui"_ustr, u"ZTestDialog"_ustr)
{
m_xDialog->set_title(ScResId(STR_ZTEST));
}
@@ -57,8 +57,8 @@ ScRange ScZTestDialog::ApplyOutput(ScDocShell* pDocShell)
else
pVariable2Iterator.reset(new DataRangeByRowIterator(mVariable2Range));
- aTemplate.autoReplaceRange("%VARIABLE1_RANGE%", pVariable1Iterator->get());
- aTemplate.autoReplaceRange("%VARIABLE2_RANGE%", pVariable2Iterator->get());
+ aTemplate.autoReplaceRange(u"%VARIABLE1_RANGE%"_ustr, pVariable1Iterator->get());
+ aTemplate.autoReplaceRange(u"%VARIABLE2_RANGE%"_ustr, pVariable2Iterator->get());
aOutput.writeBoldString(ScResId(STR_ZTEST));
aOutput.newLine();
@@ -67,14 +67,14 @@ ScRange ScZTestDialog::ApplyOutput(ScDocShell* pDocShell)
aOutput.writeString(ScResId(STR_LABEL_ALPHA));
aOutput.nextColumn();
aOutput.writeValue(0.05);
- aTemplate.autoReplaceAddress("%ALPHA%", aOutput.current());
+ aTemplate.autoReplaceAddress(u"%ALPHA%"_ustr, aOutput.current());
aOutput.newLine();
// Hypothesized mean difference
aOutput.writeString(ScResId(STR_HYPOTHESIZED_MEAN_DIFFERENCE_LABEL));
aOutput.nextColumn();
aOutput.writeValue(0);
- aTemplate.autoReplaceAddress("%HYPOTHESIZED_MEAN_DIFFERENCE%", aOutput.current());
+ aTemplate.autoReplaceAddress(u"%HYPOTHESIZED_MEAN_DIFFERENCE%"_ustr, aOutput.current());
aOutput.newLine();
// Variable Label
@@ -88,21 +88,21 @@ ScRange ScZTestDialog::ApplyOutput(ScDocShell* pDocShell)
aOutput.writeString(ScResId(STR_ZTEST_KNOWN_VARIANCE));
aOutput.nextColumn();
aOutput.writeValue(0);
- aTemplate.autoReplaceAddress("%KNOWN_VARIANCE_VARIABLE1%", aOutput.current());
+ aTemplate.autoReplaceAddress(u"%KNOWN_VARIANCE_VARIABLE1%"_ustr, aOutput.current());
aOutput.nextColumn();
aOutput.writeValue(0);
- aTemplate.autoReplaceAddress("%KNOWN_VARIANCE_VARIABLE2%", aOutput.current());
+ aTemplate.autoReplaceAddress(u"%KNOWN_VARIANCE_VARIABLE2%"_ustr, aOutput.current());
aOutput.newLine();
// Mean
aOutput.writeString(ScResId(STRID_CALC_MEAN));
aOutput.nextColumn();
aTemplate.setTemplate("=AVERAGE(%VARIABLE1_RANGE%)");
- aTemplate.autoReplaceAddress("%MEAN_VARIABLE1%", aOutput.current());
+ aTemplate.autoReplaceAddress(u"%MEAN_VARIABLE1%"_ustr, aOutput.current());
aOutput.writeFormula(aTemplate.getTemplate());
aOutput.nextColumn();
aTemplate.setTemplate("=AVERAGE(%VARIABLE2_RANGE%)");
- aTemplate.autoReplaceAddress("%MEAN_VARIABLE2%", aOutput.current());
+ aTemplate.autoReplaceAddress(u"%MEAN_VARIABLE2%"_ustr, aOutput.current());
aOutput.writeFormula(aTemplate.getTemplate());
aOutput.newLine();
@@ -111,11 +111,11 @@ ScRange ScZTestDialog::ApplyOutput(ScDocShell* pDocShell)
aOutput.nextColumn();
aTemplate.setTemplate("=COUNT(%VARIABLE1_RANGE%)");
aOutput.writeFormula(aTemplate.getTemplate());
- aTemplate.autoReplaceAddress("%OBSERVATION_VARIABLE1%", aOutput.current());
+ aTemplate.autoReplaceAddress(u"%OBSERVATION_VARIABLE1%"_ustr, aOutput.current());
aOutput.nextColumn();
aTemplate.setTemplate("=COUNT(%VARIABLE2_RANGE%)");
aOutput.writeFormula(aTemplate.getTemplate());
- aTemplate.autoReplaceAddress("%OBSERVATION_VARIABLE2%", aOutput.current());
+ aTemplate.autoReplaceAddress(u"%OBSERVATION_VARIABLE2%"_ustr, aOutput.current());
aOutput.newLine();
// Observed mean difference
@@ -123,7 +123,7 @@ ScRange ScZTestDialog::ApplyOutput(ScDocShell* pDocShell)
aOutput.nextColumn();
aTemplate.setTemplate("=%MEAN_VARIABLE1% - %MEAN_VARIABLE2%");
aOutput.writeMatrixFormula(aTemplate.getTemplate());
- aTemplate.autoReplaceAddress("%OBSERVED_MEAN_DIFFERENCE%", aOutput.current());
+ aTemplate.autoReplaceAddress(u"%OBSERVED_MEAN_DIFFERENCE%"_ustr, aOutput.current());
aOutput.newLine();
// z
@@ -131,7 +131,7 @@ ScRange ScZTestDialog::ApplyOutput(ScDocShell* pDocShell)
aOutput.nextColumn();
aTemplate.setTemplate("=(%OBSERVED_MEAN_DIFFERENCE% - %HYPOTHESIZED_MEAN_DIFFERENCE%) / SQRT( %KNOWN_VARIANCE_VARIABLE1% / %OBSERVATION_VARIABLE1% + %KNOWN_VARIANCE_VARIABLE2% / %OBSERVATION_VARIABLE2% )");
aOutput.writeFormula(aTemplate.getTemplate());
- aTemplate.autoReplaceAddress("%Z_STAT%", aOutput.current());
+ aTemplate.autoReplaceAddress(u"%Z_STAT%"_ustr, aOutput.current());
aOutput.newLine();
// P one-tail