[Libreoffice-commits] core.git: 8 commits - sc/AllLangResTarget_sc.mk sc/inc sc/source
Eike Rathke
erack at redhat.com
Wed Oct 30 01:28:22 CET 2013
sc/AllLangResTarget_sc.mk | 7
sc/inc/globstr.hrc | 62 ---
sc/inc/sc.hrc | 5
sc/inc/strload.hxx | 1
sc/source/core/data/global.cxx | 14
sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx | 7
sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.src | 19 -
sc/source/ui/StatisticsDialogs/CorrelationDialog.cxx | 7
sc/source/ui/StatisticsDialogs/CorrelationDialog.src | 19 -
sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx | 7
sc/source/ui/StatisticsDialogs/CovarianceDialog.src | 19 -
sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx | 33 -
sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.src | 83 ----
sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx | 49 +-
sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.src | 90 ----
sc/source/ui/StatisticsDialogs/SamplingDialog.cxx | 7
sc/source/ui/StatisticsDialogs/SamplingDialog.src | 19 -
sc/source/ui/StatisticsDialogs/StatisticsDialogs.hrc | 55 +++
sc/source/ui/StatisticsDialogs/StatisticsDialogs.src | 183 ++++++++++
sc/source/ui/cctrl/checklistmenu.cxx | 6
sc/source/ui/miscdlgs/filldlg.cxx | 2
sc/source/ui/src/globstr.src | 5
sc/source/ui/src/scstring.src | 6
sc/source/ui/view/gridwin.cxx | 4
sc/source/ui/view/gridwin2.cxx | 6
25 files changed, 330 insertions(+), 385 deletions(-)
New commits:
commit 19bae2d3e36052cd902d6f127128c8aa91b937bb
Author: Eike Rathke <erack at redhat.com>
Date: Wed Oct 30 01:04:44 2013 +0100
renamed STR_COUNT to SC_GLOBSTR_STR_COUNT to clarify ...
... that it is not an ID of a string but indeed the count of global
strings.
Change-Id: Ia4ebc389bad86333bae6a3ce761399b9248f2696
diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index 275f7b9..25a5a01 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -688,7 +688,7 @@
#define STR_CTRLCLICKHYPERLINK 551
#define STR_CLICKHYPERLINK 552
-#define STR_COUNT 553
+#define SC_GLOBSTR_STR_COUNT 553 /**< the count of permanently resident strings */
#endif
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index fed00ee..f6a376b 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -346,7 +346,7 @@ void ScGlobal::SetUserList( const ScUserList* pNewList )
const OUString& ScGlobal::GetRscString( sal_uInt16 nIndex )
{
- OSL_ENSURE( nIndex < STR_COUNT, "ScGlobal::GetRscString - invalid string index");
+ OSL_ENSURE( nIndex < SC_GLOBSTR_STR_COUNT, "ScGlobal::GetRscString - invalid string index");
if( !ppRscString[ nIndex ] )
{
OpCode eOp = ocNone;
@@ -539,8 +539,8 @@ void ScGlobal::Init()
pCharClass = pSysLocale->GetCharClassPtr();
pLocaleData = pSysLocale->GetLocaleDataPtr();
- ppRscString = new OUString *[ STR_COUNT ];
- for( sal_uInt16 nC = 0 ; nC < STR_COUNT ; nC++ ) ppRscString[ nC ] = NULL;
+ ppRscString = new OUString *[ SC_GLOBSTR_STR_COUNT ];
+ for( sal_uInt16 nC = 0 ; nC < SC_GLOBSTR_STR_COUNT ; nC++ ) ppRscString[ nC ] = NULL;
pEmptyBrushItem = new SvxBrushItem( Color( COL_TRANSPARENT ), ATTR_BACKGROUND );
pButtonBrushItem = new SvxBrushItem( Color(), ATTR_BACKGROUND );
@@ -645,7 +645,7 @@ void ScGlobal::Clear()
DELETEZ(pAddInCollection);
DELETEZ(pUserList);
- for( sal_uInt16 nC = 0 ; nC < STR_COUNT ; nC++ )
+ for( sal_uInt16 nC = 0 ; nC < SC_GLOBSTR_STR_COUNT ; nC++ )
if( ppRscString ) delete ppRscString[ nC ];
delete[] ppRscString;
ppRscString = NULL;
commit bc131959ad0cd58262859a11af1977e47d62cb32
Author: Eike Rathke <erack at redhat.com>
Date: Wed Oct 30 00:49:37 2013 +0100
STR_VALERR had no place in globstr, moved to scstring SCSTR_VALERR
Change-Id: I311918aaacc8b0de32af5bd7fd7e5be146d977e2
diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index 2f64f3f..275f7b9 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -690,11 +690,6 @@
#define STR_COUNT 553
-
-// Row fillers
-#define STR_VALERR 591
-
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index 3b18b95..73d9a15 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -954,7 +954,9 @@
#define SCSTR_FIELDSEP_TAB (STR_START + 412)
#define SCSTR_FIELDSEP_SPACE (STR_START + 413)
-#define STR_END (SCSTR_FIELDSEP_SPACE)
+#define SCSTR_VALERR (STR_START + 414)
+
+#define STR_END (SCSTR_VALERR)
#define BMP_START (STR_END)
diff --git a/sc/source/ui/miscdlgs/filldlg.cxx b/sc/source/ui/miscdlgs/filldlg.cxx
index cfca8e8..1e28222 100644
--- a/sc/source/ui/miscdlgs/filldlg.cxx
+++ b/sc/source/ui/miscdlgs/filldlg.cxx
@@ -55,7 +55,7 @@ ScFillSeriesDlg::ScFillSeriesDlg( Window* pParent,
sal_uInt16 nPossDir )
: ModalDialog(pParent, "FillSeriesDialog", "modules/scalc/ui/filldlg.ui"),
aStartStrVal ( aStartStr),
- aErrMsgInvalidVal( SC_RESSTR(STR_VALERR) ),
+ aErrMsgInvalidVal( SC_RESSTR(SCSTR_VALERR) ),
rDoc ( rDocument ),
theFillDir ( eFillDir ),
theFillCmd ( eFillCmd ),
diff --git a/sc/source/ui/src/globstr.src b/sc/source/ui/src/globstr.src
index a19f2c8..3c57f48 100644
--- a/sc/source/ui/src/globstr.src
+++ b/sc/source/ui/src/globstr.src
@@ -2081,11 +2081,6 @@ Resource RID_GLOBSTR
{
Text [ en-US ] = "click to open hyperlink:";
};
- String STR_VALERR
- {
- Text [ en-US ] = "Invalid value" ;
- };
-
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/src/scstring.src b/sc/source/ui/src/scstring.src
index c42c8df..fda6bd8 100644
--- a/sc/source/ui/src/scstring.src
+++ b/sc/source/ui/src/scstring.src
@@ -859,4 +859,10 @@ StringArray SCSTR_UNIT
< "Point" ; FUNIT_POINT ; > ;
};
};
+
+String SCSTR_VALERR
+{
+ Text [ en-US ] = "Invalid value" ;
+};
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 4eb1aa5b773110f66666d5aecf7d0df27c305c66
Author: Eike Rathke <erack at redhat.com>
Date: Wed Oct 30 00:32:52 2013 +0100
use something different than the SID_ prefix confused with SlotID
Change-Id: I6e87b1288d05c698e7c71b28ca1c6d503b25a332
diff --git a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
index 39bf061..ed9bf1c 100644
--- a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
@@ -38,20 +38,20 @@ struct StatisticCalculation {
static const StatisticCalculation lclCalcDefinitions[] =
{
- { SID_CALC_MEAN, "=AVERAGE(%RANGE%)" },
- { SID_CALC_STD_ERROR, "=SQRT(VAR(%RANGE%)/COUNT(%RANGE%))"},
- { SID_CALC_MODE, "=MODE(%RANGE%)"},
- { SID_CALC_MEDIAN, "=MEDIAN(%RANGE%)"},
- { SID_CALC_VARIANCE, "=VAR(%RANGE%)"},
- { SID_CALC_STD_DEVIATION, "=STDEV(%RANGE%)"},
- { SID_CALC_KURTOSIS, "=KURT(%RANGE%)"},
- { SID_CALC_SKEWNESS, "=SKEW(%RANGE%)"},
- { SID_CALC_RANGE, "=MAX(%RANGE%)-MIN(%RANGE%)"},
- { SID_CALC_MIN, "=MIN(%RANGE%)"},
- { SID_CALC_MAX, "=MAX(%RANGE%)"},
- { SID_CALC_SUM, "=SUM(%RANGE%)"},
- { SID_CALC_COUNT, "=COUNT(%RANGE%)" },
- { 0, NULL }
+ { STRID_CALC_MEAN, "=AVERAGE(%RANGE%)" },
+ { STRID_CALC_STD_ERROR, "=SQRT(VAR(%RANGE%)/COUNT(%RANGE%))"},
+ { STRID_CALC_MODE, "=MODE(%RANGE%)"},
+ { STRID_CALC_MEDIAN, "=MEDIAN(%RANGE%)"},
+ { STRID_CALC_VARIANCE, "=VAR(%RANGE%)"},
+ { STRID_CALC_STD_DEVIATION, "=STDEV(%RANGE%)"},
+ { STRID_CALC_KURTOSIS, "=KURT(%RANGE%)"},
+ { STRID_CALC_SKEWNESS, "=SKEW(%RANGE%)"},
+ { STRID_CALC_RANGE, "=MAX(%RANGE%)-MIN(%RANGE%)"},
+ { STRID_CALC_MIN, "=MIN(%RANGE%)"},
+ { STRID_CALC_MAX, "=MAX(%RANGE%)"},
+ { STRID_CALC_SUM, "=SUM(%RANGE%)"},
+ { STRID_CALC_COUNT, "=COUNT(%RANGE%)" },
+ { 0, NULL }
};
static const OUString lclWildcardRange("%RANGE%");
diff --git a/sc/source/ui/StatisticsDialogs/StatisticsDialogs.hrc b/sc/source/ui/StatisticsDialogs/StatisticsDialogs.hrc
index a6fe83f..4686b3f 100644
--- a/sc/source/ui/StatisticsDialogs/StatisticsDialogs.hrc
+++ b/sc/source/ui/StatisticsDialogs/StatisticsDialogs.hrc
@@ -33,19 +33,19 @@
#define STR_SAMPLING_UNDO_NAME 20
-#define SID_CALC_MEAN 21
-#define SID_CALC_STD_ERROR 22
-#define SID_CALC_MODE 23
-#define SID_CALC_MEDIAN 24
-#define SID_CALC_VARIANCE 25
-#define SID_CALC_STD_DEVIATION 26
-#define SID_CALC_KURTOSIS 27
-#define SID_CALC_SKEWNESS 28
-#define SID_CALC_RANGE 29
-#define SID_CALC_MIN 30
-#define SID_CALC_MAX 31
-#define SID_CALC_SUM 32
-#define SID_CALC_COUNT 33
+#define STRID_CALC_MEAN 21
+#define STRID_CALC_STD_ERROR 22
+#define STRID_CALC_MODE 23
+#define STRID_CALC_MEDIAN 24
+#define STRID_CALC_VARIANCE 25
+#define STRID_CALC_STD_DEVIATION 26
+#define STRID_CALC_KURTOSIS 27
+#define STRID_CALC_SKEWNESS 28
+#define STRID_CALC_RANGE 29
+#define STRID_CALC_MIN 30
+#define STRID_CALC_MAX 31
+#define STRID_CALC_SUM 32
+#define STRID_CALC_COUNT 33
#define STR_DESCRIPTIVE_STATISTICS_UNDO_NAME 34
#define STR_ANALYSIS_OF_VARIANCE_UNDO_NAME 35
diff --git a/sc/source/ui/StatisticsDialogs/StatisticsDialogs.src b/sc/source/ui/StatisticsDialogs/StatisticsDialogs.src
index 63d5ba6..00ebc17 100644
--- a/sc/source/ui/StatisticsDialogs/StatisticsDialogs.src
+++ b/sc/source/ui/StatisticsDialogs/StatisticsDialogs.src
@@ -40,55 +40,55 @@ Resource RID_STATISTICS_DLGS
{
Text [ en-US ] = "Descriptive Statistics";
};
- String SID_CALC_MEAN
+ String STRID_CALC_MEAN
{
Text [ en-US ] = "Mean";
};
- String SID_CALC_STD_ERROR
+ String STRID_CALC_STD_ERROR
{
Text [ en-US ] = "Standard Error";
};
- String SID_CALC_MODE
+ String STRID_CALC_MODE
{
Text [ en-US ] = "Mode";
};
- String SID_CALC_MEDIAN
+ String STRID_CALC_MEDIAN
{
Text [ en-US ] = "Median";
};
- String SID_CALC_VARIANCE
+ String STRID_CALC_VARIANCE
{
Text [ en-US ] = "Variance";
};
- String SID_CALC_STD_DEVIATION
+ String STRID_CALC_STD_DEVIATION
{
Text [ en-US ] = "Standard Deviation";
};
- String SID_CALC_KURTOSIS
+ String STRID_CALC_KURTOSIS
{
Text [ en-US ] = "Kurtosis";
};
- String SID_CALC_SKEWNESS
+ String STRID_CALC_SKEWNESS
{
Text [ en-US ] = "Skewness";
};
- String SID_CALC_RANGE
+ String STRID_CALC_RANGE
{
Text [ en-US ] = "Range";
};
- String SID_CALC_MIN
+ String STRID_CALC_MIN
{
Text [ en-US ] = "Minimum";
};
- String SID_CALC_MAX
+ String STRID_CALC_MAX
{
Text [ en-US ] = "Maximum";
};
- String SID_CALC_SUM
+ String STRID_CALC_SUM
{
Text [ en-US ] = "Sum";
};
- String SID_CALC_COUNT
+ String STRID_CALC_COUNT
{
Text [ en-US ] = "Count";
};
commit 8df6531b2652c16004ad0977b81f4a822c3f2689
Author: Eike Rathke <erack at redhat.com>
Date: Wed Oct 30 00:09:57 2013 +0100
moved StatisticsDialogs string IDs from globstr to RID_STATISTICS_DLGS
They aren't needed in globstr and weren't in RID_GLOBSTR anyway but in
global STR_START+... range possibly sharing IDs with something else
after STR_END of sc.hrc ...
Change-Id: I1f9f8e9e1748afdd00ceb3106ec405456415ee21
diff --git a/sc/AllLangResTarget_sc.mk b/sc/AllLangResTarget_sc.mk
index 4147daf..274c08a 100644
--- a/sc/AllLangResTarget_sc.mk
+++ b/sc/AllLangResTarget_sc.mk
@@ -78,12 +78,7 @@ $(eval $(call gb_SrsTarget_add_files,sc/res,\
sc/source/ui/formdlg/formdlgs.src \
sc/source/ui/formdlg/dwfunctr.src \
sc/source/ui/sidebar/CellAppearancePropertyPanel.src \
- sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.src \
- sc/source/ui/StatisticsDialogs/SamplingDialog.src \
- sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.src \
- sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.src \
- sc/source/ui/StatisticsDialogs/CorrelationDialog.src \
- sc/source/ui/StatisticsDialogs/CovarianceDialog.src \
+ sc/source/ui/StatisticsDialogs/StatisticsDialogs.src \
sc/source/core/src/compiler.src \
))
diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index b8eb5c4..2f64f3f 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -690,47 +690,6 @@
#define STR_COUNT 553
-#define STR_UNDO_DISTRIBUTION_TEMPLATE 554
-#define STR_DISTRIBUTION_UNIFORM_REAL 555
-#define STR_DISTRIBUTION_UNIFORM_INTEGER 556
-#define STR_DISTRIBUTION_NORMAL 557
-#define STR_DISTRIBUTION_CAUCHY 558
-#define STR_DISTRIBUTION_BERNOULLI 559
-#define STR_DISTRIBUTION_BINOMIAL 560
-#define STR_DISTRIBUTION_NEGATIVE_BINOMIAL 561
-#define STR_DISTRIBUTION_CHI_SQUARED 562
-#define STR_DISTRIBUTION_GEOMETRIC 563
-
-#define STR_RNG_PARAMETER_MINIMUM 564
-#define STR_RNG_PARAMETER_MAXIMUM 565
-#define STR_RNG_PARAMETER_MEAN 566
-#define STR_RNG_PARAMETER_STANDARD_DEVIATION 567
-#define STR_RNG_PARAMETER_STANDARD_MEDIAN 568
-#define STR_RNG_PARAMETER_STANDARD_SIGMA 569
-#define STR_RNG_PARAMETER_STANDARD_PROBABILITY 570
-#define STR_RNG_PARAMETER_STANDARD_NUMBER_OF_TRIALS 571
-#define STR_RNG_PARAMETER_STANDARD_NU_VALUE 572
-
-#define STR_SAMPLING_UNDO_NAME 573
-
-#define SID_CALC_MEAN 574
-#define SID_CALC_STD_ERROR 575
-#define SID_CALC_MODE 576
-#define SID_CALC_MEDIAN 577
-#define SID_CALC_VARIANCE 578
-#define SID_CALC_STD_DEVIATION 579
-#define SID_CALC_KURTOSIS 580
-#define SID_CALC_SKEWNESS 581
-#define SID_CALC_RANGE 582
-#define SID_CALC_MIN 583
-#define SID_CALC_MAX 584
-#define SID_CALC_SUM 585
-#define SID_CALC_COUNT 586
-
-#define STR_DESCRIPTIVE_STATISTICS_UNDO_NAME 587
-#define STR_ANALYSIS_OF_VARIANCE_UNDO_NAME 588
-#define STR_CORRELATION_UNDO_NAME 589
-#define STR_COVARIANCE_UNDO_NAME 590
// Row fillers
#define STR_VALERR 591
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index 89f3898..3b18b95 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -711,6 +711,7 @@
#define RID_POPUP_MEDIA (SC_RESOURCE_START+61)
#define RID_FUNCTION_CATEGORIES (SC_RESOURCE_START+62)
#define RID_MN_INSERT_FIELDS (SC_RESOURCE_START+63)
+#define RID_STATISTICS_DLGS (SC_RESOURCE_START+64)
#define STR_START (SC_RESOURCE_START+100)
#define STR_ROWHEIGHT (STR_START)
diff --git a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
index d0c809d..0559316 100644
--- a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
@@ -19,11 +19,10 @@
#include "document.hxx"
#include "uiitems.hxx"
#include "reffact.hxx"
-#include "scresid.hxx"
+#include "strload.hxx"
#include "random.hxx"
#include "docfunc.hxx"
-#include "globstr.hrc"
-#include "sc.hrc"
+#include "StatisticsDialogs.hrc"
#include "AnalysisOfVarianceDialog.hxx"
@@ -89,7 +88,7 @@ sal_Bool ScAnalysisOfVarianceDialog::Close()
void ScAnalysisOfVarianceDialog::CalculateInputAndWriteToOutput( )
{
- OUString aUndo(SC_RESSTR(STR_ANALYSIS_OF_VARIANCE_UNDO_NAME));
+ OUString aUndo( SC_STRLOAD( RID_STATISTICS_DLGS, STR_ANALYSIS_OF_VARIANCE_UNDO_NAME));
ScDocShell* pDocShell = mViewData->GetDocShell();
svl::IUndoManager* pUndoManager = pDocShell->GetUndoManager();
diff --git a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.src b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.src
deleted file mode 100644
index dffcb11..0000000
--- a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.src
+++ /dev/null
@@ -1,19 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- */
-
-#include "globstr.hrc"
-
-String STR_ANALYSIS_OF_VARIANCE_UNDO_NAME
-{
- Text [ en-US ] = "Analysis of Variance";
-};
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/StatisticsDialogs/CorrelationDialog.cxx b/sc/source/ui/StatisticsDialogs/CorrelationDialog.cxx
index 780804d..336a63f 100644
--- a/sc/source/ui/StatisticsDialogs/CorrelationDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/CorrelationDialog.cxx
@@ -19,11 +19,10 @@
#include "document.hxx"
#include "uiitems.hxx"
#include "reffact.hxx"
-#include "scresid.hxx"
+#include "strload.hxx"
#include "random.hxx"
#include "docfunc.hxx"
-#include "globstr.hrc"
-#include "sc.hrc"
+#include "StatisticsDialogs.hrc"
#include "CorrelationDialog.hxx"
@@ -56,7 +55,7 @@ sal_Bool ScCorrelationDialog::Close()
void ScCorrelationDialog::CalculateInputAndWriteToOutput( )
{
- OUString aUndo(SC_RESSTR(STR_CORRELATION_UNDO_NAME));
+ OUString aUndo( SC_STRLOAD( RID_STATISTICS_DLGS, STR_CORRELATION_UNDO_NAME));
ScDocShell* pDocShell = mViewData->GetDocShell();
svl::IUndoManager* pUndoManager = pDocShell->GetUndoManager();
pUndoManager->EnterListAction( aUndo, aUndo );
diff --git a/sc/source/ui/StatisticsDialogs/CorrelationDialog.src b/sc/source/ui/StatisticsDialogs/CorrelationDialog.src
deleted file mode 100644
index 84e7e39..0000000
--- a/sc/source/ui/StatisticsDialogs/CorrelationDialog.src
+++ /dev/null
@@ -1,19 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- */
-
-#include "globstr.hrc"
-
-String STR_CORRELATION_UNDO_NAME
-{
- Text [ en-US ] = "Correlation";
-};
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx b/sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx
index b72e569..beade9f 100644
--- a/sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx
@@ -19,11 +19,10 @@
#include "document.hxx"
#include "uiitems.hxx"
#include "reffact.hxx"
-#include "scresid.hxx"
+#include "strload.hxx"
#include "random.hxx"
#include "docfunc.hxx"
-#include "globstr.hrc"
-#include "sc.hrc"
+#include "StatisticsDialogs.hrc"
#include "CovarianceDialog.hxx"
@@ -56,7 +55,7 @@ sal_Bool ScCovarianceDialog::Close()
void ScCovarianceDialog::CalculateInputAndWriteToOutput( )
{
- OUString aUndo(SC_RESSTR(STR_COVARIANCE_UNDO_NAME));
+ OUString aUndo( SC_STRLOAD( RID_STATISTICS_DLGS, STR_COVARIANCE_UNDO_NAME));
ScDocShell* pDocShell = mViewData->GetDocShell();
svl::IUndoManager* pUndoManager = pDocShell->GetUndoManager();
pUndoManager->EnterListAction( aUndo, aUndo );
diff --git a/sc/source/ui/StatisticsDialogs/CovarianceDialog.src b/sc/source/ui/StatisticsDialogs/CovarianceDialog.src
deleted file mode 100644
index f3ca409..0000000
--- a/sc/source/ui/StatisticsDialogs/CovarianceDialog.src
+++ /dev/null
@@ -1,19 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- */
-
-#include "globstr.hrc"
-
-String STR_COVARIANCE_UNDO_NAME
-{
- Text [ en-US ] = "Covariance";
-};
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
index f6ae015..39bf061 100644
--- a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
@@ -19,11 +19,10 @@
#include "document.hxx"
#include "uiitems.hxx"
#include "reffact.hxx"
-#include "scresid.hxx"
+#include "strload.hxx"
#include "random.hxx"
#include "docfunc.hxx"
-#include "globstr.hrc"
-#include "sc.hrc"
+#include "StatisticsDialogs.hrc"
#include <boost/random.hpp>
diff --git a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.src b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.src
deleted file mode 100644
index 035dab7..0000000
--- a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.src
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- */
-
-#include "globstr.hrc"
-
-String STR_DESCRIPTIVE_STATISTICS_UNDO_NAME
-{
- Text [ en-US ] = "Descriptive Statistics";
-};
-
-String SID_CALC_MEAN
-{
- Text [ en-US ] = "Mean";
-};
-
-String SID_CALC_STD_ERROR
-{
- Text [ en-US ] = "Standard Error";
-};
-
-String SID_CALC_MODE
-{
- Text [ en-US ] = "Mode";
-};
-
-String SID_CALC_MEDIAN
-{
- Text [ en-US ] = "Median";
-};
-
-String SID_CALC_VARIANCE
-{
- Text [ en-US ] = "Variance";
-};
-
-String SID_CALC_STD_DEVIATION
-{
- Text [ en-US ] = "Standard Deviation";
-};
-
-String SID_CALC_KURTOSIS
-{
- Text [ en-US ] = "Kurtosis";
-};
-
-String SID_CALC_SKEWNESS
-{
- Text [ en-US ] = "Skewness";
-};
-
-String SID_CALC_RANGE
-{
- Text [ en-US ] = "Range";
-};
-
-String SID_CALC_MIN
-{
- Text [ en-US ] = "Minimum";
-};
-
-String SID_CALC_MAX
-{
- Text [ en-US ] = "Maximum";
-};
-
-String SID_CALC_SUM
-{
- Text [ en-US ] = "Sum";
-};
-
-String SID_CALC_COUNT
-{
- Text [ en-US ] = "Count";
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
index 917b296..a8792e4 100644
--- a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
@@ -18,11 +18,10 @@
#include "document.hxx"
#include "uiitems.hxx"
#include "reffact.hxx"
-#include "scresid.hxx"
+#include "strload.hxx"
#include "random.hxx"
#include "docfunc.hxx"
-#include "globstr.hrc"
-#include "sc.hrc"
+#include "StatisticsDialogs.hrc"
#include <boost/random.hpp>
#include <boost/random/uniform_real_distribution.hpp>
@@ -190,63 +189,63 @@ void ScRandomNumberGeneratorDialog::SelectGeneratorAndGenerateNumbers()
{
boost::random::uniform_real_distribution<> distribution(parameter1, parameter2);
boost::variate_generator<boost::mt19937&, boost::random::uniform_real_distribution<> > rng(seed, distribution);
- GenerateNumbers(rng, SC_RESSTR(STR_DISTRIBUTION_UNIFORM_REAL));
+ GenerateNumbers(rng, SC_STRLOAD( RID_STATISTICS_DLGS, STR_DISTRIBUTION_UNIFORM_REAL));
break;
}
case DIST_UNIFORM_INTEGER:
{
boost::random::uniform_int_distribution<> distribution(parameterInteger1, parameterInteger2);
boost::variate_generator<boost::mt19937&, boost::random::uniform_int_distribution<> > rng(seed, distribution);
- GenerateNumbers(rng, SC_RESSTR(STR_DISTRIBUTION_UNIFORM_INTEGER));
+ GenerateNumbers(rng, SC_STRLOAD( RID_STATISTICS_DLGS, STR_DISTRIBUTION_UNIFORM_INTEGER));
break;
}
case DIST_NORMAL:
{
boost::random::normal_distribution<> distribution(parameter1, parameter2);
boost::variate_generator<boost::mt19937&, boost::random::normal_distribution<> > rng(seed, distribution);
- GenerateNumbers(rng, SC_RESSTR(STR_DISTRIBUTION_NORMAL));
+ GenerateNumbers(rng, SC_STRLOAD( RID_STATISTICS_DLGS, STR_DISTRIBUTION_NORMAL));
break;
}
case DIST_CAUCHY:
{
boost::random::cauchy_distribution<> distribution(parameter1);
boost::variate_generator<boost::mt19937&, boost::random::cauchy_distribution<> > rng(seed, distribution);
- GenerateNumbers(rng, SC_RESSTR(STR_DISTRIBUTION_CAUCHY));
+ GenerateNumbers(rng, SC_STRLOAD( RID_STATISTICS_DLGS, STR_DISTRIBUTION_CAUCHY));
break;
}
case DIST_BERNOULLI:
{
boost::random::bernoulli_distribution<> distribution(parameter1);
boost::variate_generator<boost::mt19937&, boost::random::bernoulli_distribution<> > rng(seed, distribution);
- GenerateNumbers(rng, SC_RESSTR(STR_DISTRIBUTION_BERNOULLI));
+ GenerateNumbers(rng, SC_STRLOAD( RID_STATISTICS_DLGS, STR_DISTRIBUTION_BERNOULLI));
break;
}
case DIST_BINOMIAL:
{
boost::random::binomial_distribution<> distribution(parameterInteger2, parameter1);
boost::variate_generator<boost::mt19937&, boost::random::binomial_distribution<> > rng(seed, distribution);
- GenerateNumbers(rng, SC_RESSTR(STR_DISTRIBUTION_BINOMIAL));
+ GenerateNumbers(rng, SC_STRLOAD( RID_STATISTICS_DLGS, STR_DISTRIBUTION_BINOMIAL));
break;
}
case DIST_NEGATIVE_BINOMIAL:
{
boost::random::negative_binomial_distribution<> distribution(parameterInteger2, parameter1);
boost::variate_generator<boost::mt19937&, boost::random::negative_binomial_distribution<> > rng(seed, distribution);
- GenerateNumbers(rng, SC_RESSTR(STR_DISTRIBUTION_NEGATIVE_BINOMIAL));
+ GenerateNumbers(rng, SC_STRLOAD( RID_STATISTICS_DLGS, STR_DISTRIBUTION_NEGATIVE_BINOMIAL));
break;
}
case DIST_CHI_SQUARED:
{
boost::random::chi_squared_distribution<> distribution(parameter1);
boost::variate_generator<boost::mt19937&, boost::random::chi_squared_distribution<> > rng(seed, distribution);
- GenerateNumbers(rng, SC_RESSTR(STR_DISTRIBUTION_CHI_SQUARED));
+ GenerateNumbers(rng, SC_STRLOAD( RID_STATISTICS_DLGS, STR_DISTRIBUTION_CHI_SQUARED));
break;
}
case DIST_GEOMETRIC:
{
boost::random::geometric_distribution<> distribution(parameter1);
boost::variate_generator<boost::mt19937&, boost::random::geometric_distribution<> > rng(seed, distribution);
- GenerateNumbers(rng, SC_RESSTR(STR_DISTRIBUTION_GEOMETRIC));
+ GenerateNumbers(rng, SC_STRLOAD( RID_STATISTICS_DLGS, STR_DISTRIBUTION_GEOMETRIC));
break;
}
}
@@ -255,7 +254,7 @@ void ScRandomNumberGeneratorDialog::SelectGeneratorAndGenerateNumbers()
template<class RNG>
void ScRandomNumberGeneratorDialog::GenerateNumbers(RNG randomGenerator, OUString aDistributionName)
{
- OUString aUndo = SC_RESSTR(STR_UNDO_DISTRIBUTION_TEMPLATE);
+ OUString aUndo = SC_STRLOAD( RID_STATISTICS_DLGS, STR_UNDO_DISTRIBUTION_TEMPLATE);
aUndo = aUndo.replaceAll("$(DISTRIBUTION)", aDistributionName);
ScDocShell* pDocShell = mViewData->GetDocShell();
@@ -384,19 +383,19 @@ IMPL_LINK_NOARG(ScRandomNumberGeneratorDialog, DistributionChanged)
{
case DIST_UNIFORM:
{
- mpParameter1Text->SetText(SC_RESSTR(STR_RNG_PARAMETER_MINIMUM));
- mpParameter2Text->SetText(SC_RESSTR(STR_RNG_PARAMETER_MAXIMUM));
+ mpParameter1Text->SetText( SC_STRLOAD( RID_STATISTICS_DLGS, STR_RNG_PARAMETER_MINIMUM));
+ mpParameter2Text->SetText( SC_STRLOAD( RID_STATISTICS_DLGS, STR_RNG_PARAMETER_MAXIMUM));
mpParameter2Text->Show();
mpParameter2Value->Show();
break;
}
case DIST_UNIFORM_INTEGER:
{
- mpParameter1Text->SetText(SC_RESSTR(STR_RNG_PARAMETER_MINIMUM));
+ mpParameter1Text->SetText( SC_STRLOAD( RID_STATISTICS_DLGS, STR_RNG_PARAMETER_MINIMUM));
mpParameter1Value->SetDecimalDigits(0);
mpParameter1Value->SetSpinSize(1);
- mpParameter2Text->SetText(SC_RESSTR(STR_RNG_PARAMETER_MAXIMUM));
+ mpParameter2Text->SetText( SC_STRLOAD( RID_STATISTICS_DLGS, STR_RNG_PARAMETER_MAXIMUM));
mpParameter2Value->SetDecimalDigits(0);
mpParameter2Value->SetSpinSize(1);
@@ -406,16 +405,16 @@ IMPL_LINK_NOARG(ScRandomNumberGeneratorDialog, DistributionChanged)
}
case DIST_NORMAL:
{
- mpParameter1Text->SetText(SC_RESSTR(STR_RNG_PARAMETER_MEAN));
- mpParameter2Text->SetText(SC_RESSTR(STR_RNG_PARAMETER_STANDARD_DEVIATION));
+ mpParameter1Text->SetText( SC_STRLOAD( RID_STATISTICS_DLGS, STR_RNG_PARAMETER_MEAN));
+ mpParameter2Text->SetText( SC_STRLOAD( RID_STATISTICS_DLGS, STR_RNG_PARAMETER_STANDARD_DEVIATION));
mpParameter2Text->Show();
mpParameter2Value->Show();
break;
}
case DIST_CAUCHY:
{
- mpParameter1Text->SetText(SC_RESSTR(STR_RNG_PARAMETER_STANDARD_MEDIAN));
- mpParameter2Text->SetText(SC_RESSTR(STR_RNG_PARAMETER_STANDARD_SIGMA));
+ mpParameter1Text->SetText( SC_STRLOAD( RID_STATISTICS_DLGS, STR_RNG_PARAMETER_STANDARD_MEDIAN));
+ mpParameter2Text->SetText( SC_STRLOAD( RID_STATISTICS_DLGS, STR_RNG_PARAMETER_STANDARD_SIGMA));
mpParameter2Text->Show();
mpParameter2Value->Show();
break;
@@ -423,7 +422,7 @@ IMPL_LINK_NOARG(ScRandomNumberGeneratorDialog, DistributionChanged)
case DIST_BERNOULLI:
case DIST_GEOMETRIC:
{
- mpParameter1Text->SetText(SC_RESSTR(STR_RNG_PARAMETER_STANDARD_PROBABILITY));
+ mpParameter1Text->SetText( SC_STRLOAD( RID_STATISTICS_DLGS, STR_RNG_PARAMETER_STANDARD_PROBABILITY));
mpParameter1Value->SetMin( 0 );
mpParameter1Value->SetMax( PERCISION );
mpParameter1Value->SetSpinSize(1000);
@@ -435,12 +434,12 @@ IMPL_LINK_NOARG(ScRandomNumberGeneratorDialog, DistributionChanged)
case DIST_BINOMIAL:
case DIST_NEGATIVE_BINOMIAL:
{
- mpParameter1Text->SetText(SC_RESSTR(STR_RNG_PARAMETER_STANDARD_PROBABILITY));
+ mpParameter1Text->SetText( SC_STRLOAD( RID_STATISTICS_DLGS, STR_RNG_PARAMETER_STANDARD_PROBABILITY));
mpParameter1Value->SetMin( 0 );
mpParameter1Value->SetMax( PERCISION );
mpParameter1Value->SetSpinSize(1000);
- mpParameter2Text->SetText(SC_RESSTR(STR_RNG_PARAMETER_STANDARD_NUMBER_OF_TRIALS));
+ mpParameter2Text->SetText( SC_STRLOAD( RID_STATISTICS_DLGS, STR_RNG_PARAMETER_STANDARD_NUMBER_OF_TRIALS));
mpParameter2Value->SetDecimalDigits(0);
mpParameter2Value->SetSpinSize(1);
mpParameter2Value->SetMin(0);
@@ -451,7 +450,7 @@ IMPL_LINK_NOARG(ScRandomNumberGeneratorDialog, DistributionChanged)
}
case DIST_CHI_SQUARED:
{
- mpParameter1Text->SetText(SC_RESSTR(STR_RNG_PARAMETER_STANDARD_NU_VALUE));
+ mpParameter1Text->SetText( SC_STRLOAD( RID_STATISTICS_DLGS, STR_RNG_PARAMETER_STANDARD_NU_VALUE));
mpParameter2Text->Hide();
mpParameter2Value->Hide();
diff --git a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.src b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.src
deleted file mode 100644
index afd8891..0000000
--- a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.src
+++ /dev/null
@@ -1,90 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- */
-
-#include "globstr.hrc"
-
-String STR_UNDO_DISTRIBUTION_TEMPLATE
-{
- Text [ en-US ] = "Random ($(DISTRIBUTION))";
-};
-String STR_DISTRIBUTION_UNIFORM_REAL
-{
- Text [ en-US ] = "Uniform";
-};
-String STR_DISTRIBUTION_UNIFORM_INTEGER
-{
- Text [ en-US ] = "Uniform Integer";
-};
-String STR_DISTRIBUTION_NORMAL
-{
- Text [ en-US ] = "Normal";
-};
-String STR_DISTRIBUTION_CAUCHY
-{
- Text [ en-US ] = "Cauchy";
-};
-String STR_DISTRIBUTION_BERNOULLI
-{
- Text [ en-US ] = "Bernoulli";
-};
-String STR_DISTRIBUTION_BINOMIAL
-{
- Text [ en-US ] = "Binomial";
-};
-String STR_DISTRIBUTION_NEGATIVE_BINOMIAL
-{
- Text [ en-US ] = "Negative Binomial";
-};
-String STR_DISTRIBUTION_CHI_SQUARED
-{
- Text [ en-US ] = "Geometric";
-};
-String STR_DISTRIBUTION_GEOMETRIC
-{
- Text [ en-US ] = "Geometric";
-};
-String STR_RNG_PARAMETER_MINIMUM
-{
- Text [ en-US ] = "Minimum";
-};
-String STR_RNG_PARAMETER_MAXIMUM
-{
- Text [ en-US ] = "Maximum";
-};
-String STR_RNG_PARAMETER_MEAN
-{
- Text [ en-US ] = "Mean";
-};
-String STR_RNG_PARAMETER_STANDARD_DEVIATION
-{
- Text [ en-US ] = "Standard Deviation";
-};
-String STR_RNG_PARAMETER_STANDARD_MEDIAN
-{
- Text [ en-US ] = "Median";
-};
-String STR_RNG_PARAMETER_STANDARD_SIGMA
-{
- Text [ en-US ] = "Sigma";
-};
-String STR_RNG_PARAMETER_STANDARD_PROBABILITY
-{
- Text [ en-US ] = "p Value";
-};
-String STR_RNG_PARAMETER_STANDARD_NUMBER_OF_TRIALS
-{
- Text [ en-US ] = "Number of Trials";
-};
-String STR_RNG_PARAMETER_STANDARD_NU_VALUE
-{
- Text [ en-US ] = "nu Value";
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx
index 8681dce..e67b1c6 100644
--- a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx
@@ -18,11 +18,10 @@
#include "document.hxx"
#include "uiitems.hxx"
#include "reffact.hxx"
-#include "scresid.hxx"
+#include "strload.hxx"
#include "random.hxx"
#include "docfunc.hxx"
-#include "globstr.hrc"
-#include "sc.hrc"
+#include "StatisticsDialogs.hrc"
#include <boost/random.hpp>
@@ -257,7 +256,7 @@ ScRange ScSamplingDialog::PerformRandomSampling(ScDocShell* pDocShell)
void ScSamplingDialog::PerformSampling()
{
- OUString aUndo(SC_RESSTR(STR_SAMPLING_UNDO_NAME));
+ OUString aUndo( SC_STRLOAD( RID_STATISTICS_DLGS, STR_SAMPLING_UNDO_NAME));
ScDocShell* pDocShell = mViewData->GetDocShell();
svl::IUndoManager* pUndoManager = pDocShell->GetUndoManager();
diff --git a/sc/source/ui/StatisticsDialogs/SamplingDialog.src b/sc/source/ui/StatisticsDialogs/SamplingDialog.src
deleted file mode 100644
index ddd007a2..0000000
--- a/sc/source/ui/StatisticsDialogs/SamplingDialog.src
+++ /dev/null
@@ -1,19 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- */
-
-#include "globstr.hrc"
-
-String STR_SAMPLING_UNDO_NAME
-{
- Text [ en-US ] = "Sampling";
-};
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/StatisticsDialogs/StatisticsDialogs.hrc b/sc/source/ui/StatisticsDialogs/StatisticsDialogs.hrc
new file mode 100644
index 0000000..a6fe83f
--- /dev/null
+++ b/sc/source/ui/StatisticsDialogs/StatisticsDialogs.hrc
@@ -0,0 +1,55 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#include "sc.hrc"
+
+#define STR_UNDO_DISTRIBUTION_TEMPLATE 1
+#define STR_DISTRIBUTION_UNIFORM_REAL 2
+#define STR_DISTRIBUTION_UNIFORM_INTEGER 3
+#define STR_DISTRIBUTION_NORMAL 4
+#define STR_DISTRIBUTION_CAUCHY 5
+#define STR_DISTRIBUTION_BERNOULLI 6
+#define STR_DISTRIBUTION_BINOMIAL 7
+#define STR_DISTRIBUTION_NEGATIVE_BINOMIAL 8
+#define STR_DISTRIBUTION_CHI_SQUARED 9
+#define STR_DISTRIBUTION_GEOMETRIC 10
+
+#define STR_RNG_PARAMETER_MINIMUM 11
+#define STR_RNG_PARAMETER_MAXIMUM 12
+#define STR_RNG_PARAMETER_MEAN 13
+#define STR_RNG_PARAMETER_STANDARD_DEVIATION 14
+#define STR_RNG_PARAMETER_STANDARD_MEDIAN 15
+#define STR_RNG_PARAMETER_STANDARD_SIGMA 16
+#define STR_RNG_PARAMETER_STANDARD_PROBABILITY 17
+#define STR_RNG_PARAMETER_STANDARD_NUMBER_OF_TRIALS 18
+#define STR_RNG_PARAMETER_STANDARD_NU_VALUE 19
+
+#define STR_SAMPLING_UNDO_NAME 20
+
+#define SID_CALC_MEAN 21
+#define SID_CALC_STD_ERROR 22
+#define SID_CALC_MODE 23
+#define SID_CALC_MEDIAN 24
+#define SID_CALC_VARIANCE 25
+#define SID_CALC_STD_DEVIATION 26
+#define SID_CALC_KURTOSIS 27
+#define SID_CALC_SKEWNESS 28
+#define SID_CALC_RANGE 29
+#define SID_CALC_MIN 30
+#define SID_CALC_MAX 31
+#define SID_CALC_SUM 32
+#define SID_CALC_COUNT 33
+
+#define STR_DESCRIPTIVE_STATISTICS_UNDO_NAME 34
+#define STR_ANALYSIS_OF_VARIANCE_UNDO_NAME 35
+#define STR_CORRELATION_UNDO_NAME 36
+#define STR_COVARIANCE_UNDO_NAME 37
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/StatisticsDialogs/StatisticsDialogs.src b/sc/source/ui/StatisticsDialogs/StatisticsDialogs.src
new file mode 100644
index 0000000..63d5ba6
--- /dev/null
+++ b/sc/source/ui/StatisticsDialogs/StatisticsDialogs.src
@@ -0,0 +1,183 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#include "StatisticsDialogs.hrc"
+
+Resource RID_STATISTICS_DLGS
+{
+
+ /* AnalysisOfVarianceDialog */
+
+ String STR_ANALYSIS_OF_VARIANCE_UNDO_NAME
+ {
+ Text [ en-US ] = "Analysis of Variance";
+ };
+
+ /* CorrelationDialog */
+
+ String STR_CORRELATION_UNDO_NAME
+ {
+ Text [ en-US ] = "Correlation";
+ };
+
+ /* CovarianceDialog */
+
+ String STR_COVARIANCE_UNDO_NAME
+ {
+ Text [ en-US ] = "Covariance";
+ };
+
+ /* DescriptiveStatisticsDialog */
+
+ String STR_DESCRIPTIVE_STATISTICS_UNDO_NAME
+ {
+ Text [ en-US ] = "Descriptive Statistics";
+ };
+ String SID_CALC_MEAN
+ {
+ Text [ en-US ] = "Mean";
+ };
+ String SID_CALC_STD_ERROR
+ {
+ Text [ en-US ] = "Standard Error";
+ };
+ String SID_CALC_MODE
+ {
+ Text [ en-US ] = "Mode";
+ };
+ String SID_CALC_MEDIAN
+ {
+ Text [ en-US ] = "Median";
+ };
+ String SID_CALC_VARIANCE
+ {
+ Text [ en-US ] = "Variance";
+ };
+ String SID_CALC_STD_DEVIATION
+ {
+ Text [ en-US ] = "Standard Deviation";
+ };
+ String SID_CALC_KURTOSIS
+ {
+ Text [ en-US ] = "Kurtosis";
+ };
+ String SID_CALC_SKEWNESS
+ {
+ Text [ en-US ] = "Skewness";
+ };
+ String SID_CALC_RANGE
+ {
+ Text [ en-US ] = "Range";
+ };
+ String SID_CALC_MIN
+ {
+ Text [ en-US ] = "Minimum";
+ };
+ String SID_CALC_MAX
+ {
+ Text [ en-US ] = "Maximum";
+ };
+ String SID_CALC_SUM
+ {
+ Text [ en-US ] = "Sum";
+ };
+ String SID_CALC_COUNT
+ {
+ Text [ en-US ] = "Count";
+ };
+
+ /* RandomNumberGeneratorDialog */
+
+ String STR_UNDO_DISTRIBUTION_TEMPLATE
+ {
+ Text [ en-US ] = "Random ($(DISTRIBUTION))";
+ };
+ String STR_DISTRIBUTION_UNIFORM_REAL
+ {
+ Text [ en-US ] = "Uniform";
+ };
+ String STR_DISTRIBUTION_UNIFORM_INTEGER
+ {
+ Text [ en-US ] = "Uniform Integer";
+ };
+ String STR_DISTRIBUTION_NORMAL
+ {
+ Text [ en-US ] = "Normal";
+ };
+ String STR_DISTRIBUTION_CAUCHY
+ {
+ Text [ en-US ] = "Cauchy";
+ };
+ String STR_DISTRIBUTION_BERNOULLI
+ {
+ Text [ en-US ] = "Bernoulli";
+ };
+ String STR_DISTRIBUTION_BINOMIAL
+ {
+ Text [ en-US ] = "Binomial";
+ };
+ String STR_DISTRIBUTION_NEGATIVE_BINOMIAL
+ {
+ Text [ en-US ] = "Negative Binomial";
+ };
+ String STR_DISTRIBUTION_CHI_SQUARED
+ {
+ Text [ en-US ] = "Geometric";
+ };
+ String STR_DISTRIBUTION_GEOMETRIC
+ {
+ Text [ en-US ] = "Geometric";
+ };
+ String STR_RNG_PARAMETER_MINIMUM
+ {
+ Text [ en-US ] = "Minimum";
+ };
+ String STR_RNG_PARAMETER_MAXIMUM
+ {
+ Text [ en-US ] = "Maximum";
+ };
+ String STR_RNG_PARAMETER_MEAN
+ {
+ Text [ en-US ] = "Mean";
+ };
+ String STR_RNG_PARAMETER_STANDARD_DEVIATION
+ {
+ Text [ en-US ] = "Standard Deviation";
+ };
+ String STR_RNG_PARAMETER_STANDARD_MEDIAN
+ {
+ Text [ en-US ] = "Median";
+ };
+ String STR_RNG_PARAMETER_STANDARD_SIGMA
+ {
+ Text [ en-US ] = "Sigma";
+ };
+ String STR_RNG_PARAMETER_STANDARD_PROBABILITY
+ {
+ Text [ en-US ] = "p Value";
+ };
+ String STR_RNG_PARAMETER_STANDARD_NUMBER_OF_TRIALS
+ {
+ Text [ en-US ] = "Number of Trials";
+ };
+ String STR_RNG_PARAMETER_STANDARD_NU_VALUE
+ {
+ Text [ en-US ] = "nu Value";
+ };
+
+ /* SamplingDialog */
+
+ String STR_SAMPLING_UNDO_NAME
+ {
+ Text [ en-US ] = "Sampling";
+ };
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit d41ed4d5c6d052b9b4099dcb72f143ff49a2fcdb
Author: Eike Rathke <erack at redhat.com>
Date: Tue Oct 29 23:00:43 2013 +0100
use SC_STRLOAD()
Change-Id: Ib59005bf6a7f2f28eb37c5e90782dc448ec20aa4
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 0b76d33..fed00ee 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -378,11 +378,9 @@ const OUString& ScGlobal::GetRscString( sal_uInt16 nIndex )
; // nothing
}
if (eOp != ocNone)
- ppRscString[ nIndex ] = new OUString(
- ScCompiler::GetNativeSymbol( eOp));
+ ppRscString[ nIndex ] = new OUString( ScCompiler::GetNativeSymbol( eOp));
else
- ppRscString[ nIndex ] = new OUString(
- ScRscStrLoader( RID_GLOBSTR, nIndex ).GetString());
+ ppRscString[ nIndex ] = new OUString( SC_STRLOAD( RID_GLOBSTR, nIndex ));
}
return *ppRscString[ nIndex ];
}
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index e684fc3..30b4b0c 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -1060,7 +1060,7 @@ void ScCheckListMenuWindow::packWindow()
getSectionPosSize(aPos, aSize, CHECK_TOGGLE_ALL);
maChkToggleAll.SetPosSizePixel(aPos, aSize);
maChkToggleAll.SetFont(getLabelFont());
- maChkToggleAll.SetText(ScRscStrLoader(RID_POPUP_FILTER, STR_BTN_TOGGLE_ALL).GetString());
+ maChkToggleAll.SetText(SC_STRLOAD(RID_POPUP_FILTER, STR_BTN_TOGGLE_ALL));
maChkToggleAll.SetTextColor(rStyle.GetMenuTextColor());
maChkToggleAll.SetControlBackground(rStyle.GetMenuColor());
maChkToggleAll.SetClickHdl( LINK(this, ScCheckListMenuWindow, TriStateHdl) );
@@ -1068,14 +1068,14 @@ void ScCheckListMenuWindow::packWindow()
getSectionPosSize(aPos, aSize, BTN_SINGLE_SELECT);
maBtnSelectSingle.SetPosSizePixel(aPos, aSize);
- maBtnSelectSingle.SetQuickHelpText(ScRscStrLoader(RID_POPUP_FILTER, STR_BTN_SELECT_CURRENT).GetString());
+ maBtnSelectSingle.SetQuickHelpText(SC_STRLOAD(RID_POPUP_FILTER, STR_BTN_SELECT_CURRENT));
maBtnSelectSingle.SetModeImage(Image(ScResId(RID_IMG_SELECT_CURRENT)));
maBtnSelectSingle.SetClickHdl( LINK(this, ScCheckListMenuWindow, ButtonHdl) );
maBtnSelectSingle.Show();
getSectionPosSize(aPos, aSize, BTN_SINGLE_UNSELECT);
maBtnUnselectSingle.SetPosSizePixel(aPos, aSize);
- maBtnUnselectSingle.SetQuickHelpText(ScRscStrLoader(RID_POPUP_FILTER, STR_BTN_UNSELECT_CURRENT).GetString());
+ maBtnUnselectSingle.SetQuickHelpText(SC_STRLOAD(RID_POPUP_FILTER, STR_BTN_UNSELECT_CURRENT));
maBtnUnselectSingle.SetModeImage(Image(ScResId(RID_IMG_UNSELECT_CURRENT)));
maBtnUnselectSingle.SetClickHdl( LINK(this, ScCheckListMenuWindow, ButtonHdl) );
maBtnUnselectSingle.Show();
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index beef804..f10ca07 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -736,10 +736,10 @@ void ScGridWindow::LaunchAutoFilterMenu(SCCOL nCol, SCROW nRow)
// Populate the menu.
mpAutoFilterPopup->addMenuItem(
- ScRscStrLoader(RID_POPUP_FILTER, STR_MENU_SORT_ASC).GetString(),
+ SC_STRLOAD(RID_POPUP_FILTER, STR_MENU_SORT_ASC),
true, new AutoFilterAction(this, SortAscending));
mpAutoFilterPopup->addMenuItem(
- ScRscStrLoader(RID_POPUP_FILTER, STR_MENU_SORT_DESC).GetString(),
+ SC_STRLOAD(RID_POPUP_FILTER, STR_MENU_SORT_DESC),
true, new AutoFilterAction(this, SortDescending));
mpAutoFilterPopup->addSeparator();
mpAutoFilterPopup->addMenuItem(
diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx
index bbc2657..1d9c9ed 100644
--- a/sc/source/ui/view/gridwin2.cxx
+++ b/sc/source/ui/view/gridwin2.cxx
@@ -503,13 +503,13 @@ void ScGridWindow::DPLaunchFieldPopupMenu(
// Populate the menus.
ScTabViewShell* pViewShell = pViewData->GetViewShell();
mpDPFieldPopup->addMenuItem(
- ScRscStrLoader(RID_POPUP_FILTER, STR_MENU_SORT_ASC).GetString(), true,
+ SC_STRLOAD(RID_POPUP_FILTER, STR_MENU_SORT_ASC), true,
new PopupSortAction(rPos, PopupSortAction::ASCENDING, 0, pViewShell));
mpDPFieldPopup->addMenuItem(
- ScRscStrLoader(RID_POPUP_FILTER, STR_MENU_SORT_DESC).GetString(), true,
+ SC_STRLOAD(RID_POPUP_FILTER, STR_MENU_SORT_DESC), true,
new PopupSortAction(rPos, PopupSortAction::DESCENDING, 0, pViewShell));
ScMenuFloatingWindow* pSubMenu = mpDPFieldPopup->addSubMenuItem(
- ScRscStrLoader(RID_POPUP_FILTER, STR_MENU_SORT_CUSTOM).GetString(), !aUserSortNames.empty());
+ SC_STRLOAD(RID_POPUP_FILTER, STR_MENU_SORT_CUSTOM), !aUserSortNames.empty());
if (pSubMenu && !aUserSortNames.empty())
{
commit 1e40ce0555afc43ac4a61513a1fde69e2575cbb5
Author: Eike Rathke <erack at redhat.com>
Date: Tue Oct 29 22:34:43 2013 +0100
added SC_STRLOAD() macro
Change-Id: Ia6bb9361bd1327c6a67d71e7908bd632a3e99ba7
diff --git a/sc/inc/strload.hxx b/sc/inc/strload.hxx
index 9607dc8..199ca38 100644
--- a/sc/inc/strload.hxx
+++ b/sc/inc/strload.hxx
@@ -38,6 +38,7 @@ private:
OUString theStr;
};
+#define SC_STRLOAD(resource,strid) ScRscStrLoader( resource, strid).GetString()
#endif // SC_STRLOAD_HXX
commit b1febe2901d03a0e46fb7ca18b4398af2f5142da
Author: Eike Rathke <erack at redhat.com>
Date: Tue Oct 29 20:56:09 2013 +0100
commented purpose of this file to clarify resident nature
currently it's a mess of what was added here
Change-Id: Iaea4a6a44358c93c9dda45030898e2cb453526af
diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index d24ee73..b8eb5c4 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -20,6 +20,16 @@
#ifndef SC_GLOBSTR_HRC
#define SC_GLOBSTR_HRC
+/*
+ * This file is reserved for string IDs of permanently loaded resident string
+ * resources for faster access in core and filter code (and some UI like
+ * Undo/Redo or strings displayed in the status bar), they reside in resource
+ * RID_GLOBSTR and are meant to be accessed via ScGlobal::GetRscString(). All
+ * other string IDs of strings used in message boxes and elsewhere go into
+ * sc/inc/sc.hrc if they need to be global, or if restricted to UI dialogs into
+ * a proper sc/source/ui/xxx/yyy.hrc and corresponding .src PLEASE!
+ */
+
#define STR_UNDO_DELETECELLS 1
#define STR_UNDO_CUT 2
#define STR_UNDO_PASTE 3
commit 6638ea3eec48b008fd3abdca99f0f8ef7d91f00b
Author: Eike Rathke <erack at redhat.com>
Date: Tue Oct 29 21:39:53 2013 +0100
proper include guard name
Change-Id: Ib2c8724ba0759860a6374d9152c6a1d93387f5cd
diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index 688d589..d24ee73 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -17,8 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef __GLOBSTR_HRC_
-#define __GLOBSTR_HRC_
+#ifndef SC_GLOBSTR_HRC
+#define SC_GLOBSTR_HRC
#define STR_UNDO_DELETECELLS 1
#define STR_UNDO_CUT 2
More information about the Libreoffice-commits
mailing list