summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.com>2014-11-20 20:40:00 +0100
committerTomaž Vajngerl <tomaz.vajngerl@collabora.com>2014-11-20 20:42:07 +0100
commit77685ab68e5892cc72ba1c7283fb6658d2516cd0 (patch)
tree6e2877353d74157acb95479ebe7914b578c375e3
parent3fcb0c3aa8d58a819aa21eb9743eaa6da7394819 (diff)
Add string for transl. and "Test statistic" for Chi-Square Test
Change-Id: I711c70a56021dfbba867e38a32331e662a6bb9d4
-rw-r--r--sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx20
-rw-r--r--sc/source/ui/StatisticsDialogs/StatisticsDialogs.hrc59
-rw-r--r--sc/source/ui/StatisticsDialogs/StatisticsDialogs.src21
3 files changed, 67 insertions, 33 deletions
diff --git a/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx b/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx
index f4d092ab7989..1e6483d7ea35 100644
--- a/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx
@@ -35,7 +35,7 @@ ScChiSquareTestDialog::ScChiSquareTestDialog(
pSfxBindings, pChildWindow, pParent, pViewData,
"ChiSquareTestDialog", "modules/scalc/ui/chisquaretestdialog.ui" )
{
- SetText(SC_STRLOAD(RID_STATISTICS_DLGS, STR_ZTEST));
+ SetText(SC_STRLOAD(RID_STATISTICS_DLGS, STR_CHI_SQUARE_TEST));
}
ScChiSquareTestDialog::~ScChiSquareTestDialog()
@@ -48,7 +48,7 @@ bool ScChiSquareTestDialog::Close()
sal_Int16 ScChiSquareTestDialog::GetUndoNameId()
{
- return STR_ZTEST_UNDO_NAME;
+ return STR_CHI_SQUARE_TEST;
}
ScRange ScChiSquareTestDialog::ApplyOutput(ScDocShell* pDocShell)
@@ -59,7 +59,7 @@ ScRange ScChiSquareTestDialog::ApplyOutput(ScDocShell* pDocShell)
aTemplate.autoReplaceRange("%RANGE%", mInputRange);
- aOutput.writeBoldString("Independence Test (Chi-Square)");
+ aOutput.writeBoldString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_CHI_SQUARE_TEST));
aOutput.newLine();
// Alpha
@@ -70,7 +70,7 @@ ScRange ScChiSquareTestDialog::ApplyOutput(ScDocShell* pDocShell)
aOutput.newLine();
// DF
- aOutput.writeString("df");
+ aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_DEGREES_OF_FREEDOM_LABEL));
aOutput.nextColumn();
aTemplate.setTemplate("=(COLUMNS(%RANGE%) - 1) * (ROWS(%RANGE%) - 1)");
aTemplate.autoReplaceAddress("%DEGREES_OF_FREEDOM%", aOutput.current());
@@ -78,14 +78,22 @@ ScRange ScChiSquareTestDialog::ApplyOutput(ScDocShell* pDocShell)
aOutput.newLine();
// p Value
- aOutput.writeString("P-Value");
+ aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, 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());
+ aOutput.writeFormula(aTemplate.getTemplate());
+ aOutput.newLine();
+
+ // Test Statistic
+ aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_TEST_STATISTIC_LABEL));
+ aOutput.nextColumn();
+ aTemplate.setTemplate("=CHIINV(%P_VALUE%; %DEGREES_OF_FREEDOM%)");
aOutput.writeFormula(aTemplate.getTemplate());
aOutput.newLine();
// Critical value
- aOutput.writeString("Critical Value");
+ aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_CRITICAL_VALUE_LABEL));
aOutput.nextColumn();
aTemplate.setTemplate("=CHIINV(%ALPHA%; %DEGREES_OF_FREEDOM%)");
aOutput.writeFormula(aTemplate.getTemplate());
diff --git a/sc/source/ui/StatisticsDialogs/StatisticsDialogs.hrc b/sc/source/ui/StatisticsDialogs/StatisticsDialogs.hrc
index c4fdd4c950cb..662dc6dfd416 100644
--- a/sc/source/ui/StatisticsDialogs/StatisticsDialogs.hrc
+++ b/sc/source/ui/StatisticsDialogs/StatisticsDialogs.hrc
@@ -61,6 +61,7 @@
#define STR_FTEST_UNDO_NAME 69
#define STR_ZTEST 70
#define STR_ZTEST_UNDO_NAME 71
+#define STR_CHI_SQUARE_TEST 72
#define STR_COLUMN_LABEL_TEMPLATE 100
#define STR_ROW_LABEL_TEMPLATE 101
@@ -79,35 +80,39 @@
#define STR_ANOVA_LABEL_TOTAL 121
#define STR_ANOVA_TWO_FACTOR_LABEL 122
-#define STR_CORRELATION_LABEL 130
-#define STR_COVARIANCE_LABEL 131
-#define STR_LABEL_ALPHA 132
-#define STR_VARIABLE_1_LABEL 133
-#define STR_VARIABLE_2_LABEL 134
-#define STR_HYPOTHESIZED_MEAN_DIFFERENCE_LABEL 135
-#define STR_OBSERVATIONS_LABEL 136
-#define STR_OBSERVED_MEAN_DIFFERENCE_LABEL 137
+#define STR_CORRELATION_LABEL 140
+#define STR_COVARIANCE_LABEL 141
+#define STR_LABEL_ALPHA 142
+#define STR_VARIABLE_1_LABEL 143
+#define STR_VARIABLE_2_LABEL 144
+#define STR_HYPOTHESIZED_MEAN_DIFFERENCE_LABEL 145
+#define STR_OBSERVATIONS_LABEL 146
+#define STR_OBSERVED_MEAN_DIFFERENCE_LABEL 147
+#define STR_DEGREES_OF_FREEDOM_LABEL 148
+#define STR_P_VALUE_LABEL 149
+#define STR_CRITICAL_VALUE_LABEL 150
+#define STR_TEST_STATISTIC_LABEL 151
-#define STR_FTEST_P_RIGHT_TAIL 140
-#define STR_FTEST_F_CRITICAL_RIGHT_TAIL 141
-#define STR_FTEST_P_LEFT_TAIL 142
-#define STR_FTEST_F_CRITICAL_LEFT_TAIL 143
-#define STR_FTEST_P_TWO_TAIL 144
-#define STR_FTEST_F_CRITICAL_TWO_TAIL 145
+#define STR_FTEST_P_RIGHT_TAIL 200
+#define STR_FTEST_F_CRITICAL_RIGHT_TAIL 201
+#define STR_FTEST_P_LEFT_TAIL 202
+#define STR_FTEST_F_CRITICAL_LEFT_TAIL 203
+#define STR_FTEST_P_TWO_TAIL 204
+#define STR_FTEST_F_CRITICAL_TWO_TAIL 205
-#define STR_TTEST_PEARSON_CORRELATION 150
-#define STR_TTEST_VARIANCE_OF_THE_DIFFERENCES 152
-#define STR_TTEST_T_STAT 153
-#define STR_TTEST_P_ONE_TAIL 154
-#define STR_TTEST_T_CRITICAL_ONE_TAIL 155
-#define STR_TTEST_P_TWO_TAIL 156
-#define STR_TTEST_T_CRITICAL_TWO_TAIL 157
+#define STR_TTEST_PEARSON_CORRELATION 220
+#define STR_TTEST_VARIANCE_OF_THE_DIFFERENCES 222
+#define STR_TTEST_T_STAT 223
+#define STR_TTEST_P_ONE_TAIL 224
+#define STR_TTEST_T_CRITICAL_ONE_TAIL 225
+#define STR_TTEST_P_TWO_TAIL 226
+#define STR_TTEST_T_CRITICAL_TWO_TAIL 227
-#define STR_ZTEST_KNOWN_VARIANCE 160
-#define STR_ZTEST_Z_VALUE 161
-#define STR_ZTEST_P_ONE_TAIL 162
-#define STR_ZTEST_Z_CRITICAL_ONE_TAIL 163
-#define STR_ZTEST_P_TWO_TAIL 164
-#define STR_ZTEST_Z_CRITICAL_TWO_TAIL 165
+#define STR_ZTEST_KNOWN_VARIANCE 240
+#define STR_ZTEST_Z_VALUE 241
+#define STR_ZTEST_P_ONE_TAIL 242
+#define STR_ZTEST_Z_CRITICAL_ONE_TAIL 243
+#define STR_ZTEST_P_TWO_TAIL 244
+#define STR_ZTEST_Z_CRITICAL_TWO_TAIL 245
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/StatisticsDialogs/StatisticsDialogs.src b/sc/source/ui/StatisticsDialogs/StatisticsDialogs.src
index f6865627d232..501e443aa761 100644
--- a/sc/source/ui/StatisticsDialogs/StatisticsDialogs.src
+++ b/sc/source/ui/StatisticsDialogs/StatisticsDialogs.src
@@ -276,6 +276,7 @@ Resource RID_STATISTICS_DLGS
Text [ en-US ] = "Sampling";
};
+ /* Names of dialogs */
String STR_FTEST
{
Text [ en-US ] = "F-test";
@@ -300,6 +301,10 @@ Resource RID_STATISTICS_DLGS
{
Text [ en-US ] = "z-test";
};
+ String STR_CHI_SQUARE_TEST
+ {
+ Text [ en-US ] = "Test of Independence (Chi-Square)";
+ };
/* Common */
String STR_COLUMN_LABEL_TEMPLATE
@@ -334,6 +339,22 @@ Resource RID_STATISTICS_DLGS
{
Text [ en-US ] = "Observed Mean Difference";
};
+ String STR_DEGREES_OF_FREEDOM_LABEL
+ {
+ Text [ en-US ] = "df";
+ };
+ String STR_P_VALUE_LABEL
+ {
+ Text [ en-US ] = "P-value";
+ };
+ String STR_CRITICAL_VALUE_LABEL
+ {
+ Text [ en-US ] = "Critical Value";
+ };
+ String STR_TEST_STATISTIC_LABEL
+ {
+ Text [ en-US ] = "Test Statistic";
+ };
/*F Test */
String STR_FTEST_P_RIGHT_TAIL