Makefile.fetch | 2 config_host.mk.in | 1 configure.ac | 17 distro-configs/LibreOfficeCoverity.conf | 1 distro-configs/LibreOfficeOssFuzz.conf | 1 external/Module_external.mk | 2 registry/source/reflread.cxx | 7 sc/inc/sc.hrc | 130 + sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx | 23 sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx | 15 sc/source/ui/StatisticsDialogs/CorrelationDialog.cxx | 3 sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx | 3 sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx | 7 sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx | 7 sc/source/ui/StatisticsDialogs/FTestDialog.cxx | 33 sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx | 9 sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx | 5 sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx | 29 sc/source/ui/StatisticsDialogs/RegressionDialog.cxx | 15 sc/source/ui/StatisticsDialogs/SamplingDialog.cxx | 3 sc/source/ui/StatisticsDialogs/StatisticsDialogs.hrc | 129 - sc/source/ui/StatisticsDialogs/StatisticsDialogs.src | 928 ++++------ sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx | 2 sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx | 2 sc/source/ui/StatisticsDialogs/TTestDialog.cxx | 37 sc/source/ui/StatisticsDialogs/ZTestDialog.cxx | 31 sc/source/ui/cctrl/checklistmenu.cxx | 10 sc/source/ui/cctrl/checklistmenu.src | 57 sc/source/ui/inc/checklistmenu.hrc | 35 sc/source/ui/view/gridwin.cxx | 5 sc/source/ui/view/gridwin2.cxx | 7 unoidl/source/unoidlprovider.cxx | 7 vcl/source/gdi/pdfwriter_impl.cxx | 18 xmlsecurity/Module_xmlsecurity.mk | 2 34 files changed, 777 insertions(+), 806 deletions(-)
New commits: commit a65211ad92d62caad426a17dcbe81bec9da5bc4c Author: Caolán McNamara <[email protected]> Date: Fri Feb 10 14:03:08 2017 +0000 unwind RID_POPUP_FILTER local resource Change-Id: I7369b3eb0e0d937c135fe591beafe9ec96ea9c17 diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc index 3521e20..4d1e380 100644 --- a/sc/inc/sc.hrc +++ b/sc/inc/sc.hrc @@ -1105,7 +1105,15 @@ #define STR_ZTEST_P_TWO_TAIL (STR_START + 546) #define STR_ZTEST_Z_CRITICAL_TWO_TAIL (STR_START + 547) -#define STR_END (STR_ZTEST_Z_CRITICAL_TWO_TAIL) +#define STR_MENU_SORT_ASC (STR_START + 548) +#define STR_MENU_SORT_DESC (STR_START + 549) +#define STR_MENU_SORT_CUSTOM (STR_START + 550) +#define STR_BTN_TOGGLE_ALL (STR_START + 551) +#define STR_BTN_SELECT_CURRENT (STR_START + 552) +#define STR_BTN_UNSELECT_CURRENT (STR_START + 553) +#define STR_EDIT_SEARCH_ITEMS (STR_START + 554) + +#define STR_END (STR_EDIT_SEARCH_ITEMS) #define BMP_START (STR_END) @@ -1222,8 +1230,6 @@ #define BMP_STYLES_FAMILY_CELL (SC_DIALOGS_START + 140) #define BMP_STYLES_FAMILY_PAGE (SC_DIALOGS_START + 141) -#define RID_POPUP_FILTER (SC_DIALOGS_START + 153) - #define RID_SCDLG_COND_FORMAT_MANAGER (SC_DIALOGS_START + 159) #define WID_CONDFRMT_REF (SC_DIALOGS_START + 163) diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx index 68afaff..5cca65b 100644 --- a/sc/source/ui/cctrl/checklistmenu.cxx +++ b/sc/source/ui/cctrl/checklistmenu.cxx @@ -18,9 +18,9 @@ */ #include "checklistmenu.hxx" -#include "checklistmenu.hrc" #include "strload.hxx" #include "globstr.hrc" +#include "sc.hrc" #include <vcl/decoview.hxx> #include <vcl/settings.hxx> @@ -1075,7 +1075,7 @@ void ScCheckListMenuWindow::packWindow() maEdSearch->SetPosSizePixel(aPos, aSize); maEdSearch->SetFont(getLabelFont()); maEdSearch->SetControlBackground(rStyle.GetFieldColor()); - maEdSearch->SetPlaceholderText(SC_STRLOAD(RID_POPUP_FILTER, STR_EDIT_SEARCH_ITEMS)); + maEdSearch->SetPlaceholderText(SC_RESSTR(STR_EDIT_SEARCH_ITEMS)); maEdSearch->SetModifyHdl( LINK(this, ScCheckListMenuWindow, EdModifyHdl) ); maEdSearch->Show(); @@ -1088,7 +1088,7 @@ void ScCheckListMenuWindow::packWindow() getSectionPosSize(aPos, aSize, CHECK_TOGGLE_ALL); maChkToggleAll->SetPosSizePixel(aPos, aSize); maChkToggleAll->SetFont(getLabelFont()); - maChkToggleAll->SetText(SC_STRLOAD(RID_POPUP_FILTER, STR_BTN_TOGGLE_ALL)); + maChkToggleAll->SetText(SC_RESSTR(STR_BTN_TOGGLE_ALL)); maChkToggleAll->SetTextColor(rStyle.GetMenuTextColor()); maChkToggleAll->SetControlBackground(rStyle.GetMenuColor()); maChkToggleAll->SetClickHdl( LINK(this, ScCheckListMenuWindow, TriStateHdl) ); @@ -1103,7 +1103,7 @@ void ScCheckListMenuWindow::packWindow() getSectionPosSize(aPos, aSize, BTN_SINGLE_SELECT); maBtnSelectSingle->SetPosSizePixel(aPos, aSize); - maBtnSelectSingle->SetQuickHelpText(SC_STRLOAD(RID_POPUP_FILTER, STR_BTN_SELECT_CURRENT)); + maBtnSelectSingle->SetQuickHelpText(SC_RESSTR(STR_BTN_SELECT_CURRENT)); maBtnSelectSingle->SetModeImage(aSingleSelect); maBtnSelectSingle->SetClickHdl( LINK(this, ScCheckListMenuWindow, ButtonHdl) ); maBtnSelectSingle->Show(); @@ -1115,7 +1115,7 @@ void ScCheckListMenuWindow::packWindow() getSectionPosSize(aPos, aSize, BTN_SINGLE_UNSELECT); maBtnUnselectSingle->SetPosSizePixel(aPos, aSize); - maBtnUnselectSingle->SetQuickHelpText(SC_STRLOAD(RID_POPUP_FILTER, STR_BTN_UNSELECT_CURRENT)); + maBtnUnselectSingle->SetQuickHelpText(SC_RESSTR(STR_BTN_UNSELECT_CURRENT)); maBtnUnselectSingle->SetModeImage(aSingleUnselect); maBtnUnselectSingle->SetClickHdl( LINK(this, ScCheckListMenuWindow, ButtonHdl) ); maBtnUnselectSingle->Show(); diff --git a/sc/source/ui/cctrl/checklistmenu.src b/sc/source/ui/cctrl/checklistmenu.src index 55323c0..387431f 100644 --- a/sc/source/ui/cctrl/checklistmenu.src +++ b/sc/source/ui/cctrl/checklistmenu.src @@ -17,44 +17,41 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include "checklistmenu.hrc" +#include "sc.hrc" -Resource RID_POPUP_FILTER +String STR_MENU_SORT_ASC { - String STR_MENU_SORT_ASC - { - Text [ en-US ] = "Sort Ascending" ; - }; + Text [ en-US ] = "Sort Ascending" ; +}; - String STR_MENU_SORT_DESC - { - Text [ en-US ] = "Sort Descending" ; - }; +String STR_MENU_SORT_DESC +{ + Text [ en-US ] = "Sort Descending" ; +}; - String STR_MENU_SORT_CUSTOM - { - Text [ en-US ] = "Custom Sort" ; - }; +String STR_MENU_SORT_CUSTOM +{ + Text [ en-US ] = "Custom Sort" ; +}; - String STR_BTN_TOGGLE_ALL - { - Text [ en-US ] = "All" ; - }; +String STR_BTN_TOGGLE_ALL +{ + Text [ en-US ] = "All" ; +}; - String STR_BTN_SELECT_CURRENT - { - Text [ en-US ] = "Show only the current item." ; - }; +String STR_BTN_SELECT_CURRENT +{ + Text [ en-US ] = "Show only the current item." ; +}; - String STR_BTN_UNSELECT_CURRENT - { - Text [ en-US ] = "Hide only the current item." ; - }; +String STR_BTN_UNSELECT_CURRENT +{ + Text [ en-US ] = "Hide only the current item." ; +}; - String STR_EDIT_SEARCH_ITEMS - { - Text [ en-US ] = "Search items..." ; - }; +String STR_EDIT_SEARCH_ITEMS +{ + Text [ en-US ] = "Search items..." ; }; Bitmap RID_BMP_SELECT_CURRENT diff --git a/sc/source/ui/inc/checklistmenu.hrc b/sc/source/ui/inc/checklistmenu.hrc deleted file mode 100644 index 7d00957..0000000 --- a/sc/source/ui/inc/checklistmenu.hrc +++ /dev/null @@ -1,35 +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/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_SC_SOURCE_UI_INC_CHECKLISTMENU_HRC -#define INCLUDED_SC_SOURCE_UI_INC_CHECKLISTMENU_HRC - -#include <sc.hrc> - -#define STR_MENU_SORT_ASC 1 -#define STR_MENU_SORT_DESC 2 -#define STR_MENU_SORT_CUSTOM 3 -#define STR_BTN_TOGGLE_ALL 4 -#define STR_BTN_SELECT_CURRENT 5 -#define STR_BTN_UNSELECT_CURRENT 6 -#define STR_EDIT_SEARCH_ITEMS 7 - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 8f1697c..2278476 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -123,7 +123,6 @@ #include "cliputil.hxx" #include "queryentry.hxx" #include "markdata.hxx" -#include "checklistmenu.hrc" #include "strload.hxx" #include "externalrefmgr.hxx" #include "dociter.hxx" @@ -726,10 +725,10 @@ void ScGridWindow::LaunchAutoFilterMenu(SCCOL nCol, SCROW nRow) // Populate the menu. mpAutoFilterPopup->addMenuItem( - SC_STRLOAD(RID_POPUP_FILTER, STR_MENU_SORT_ASC), + SC_RESSTR(STR_MENU_SORT_ASC), new AutoFilterAction(this, SortAscending)); mpAutoFilterPopup->addMenuItem( - SC_STRLOAD(RID_POPUP_FILTER, STR_MENU_SORT_DESC), + SC_RESSTR(STR_MENU_SORT_DESC), 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 c2e34db..270a568 100644 --- a/sc/source/ui/view/gridwin2.cxx +++ b/sc/source/ui/view/gridwin2.cxx @@ -39,7 +39,6 @@ #include "dbdocfun.hxx" #include "checklistmenu.hxx" #include "dpcontrol.hxx" -#include "checklistmenu.hrc" #include "strload.hxx" #include "userlist.hxx" #include "scabstdlg.hxx" @@ -493,13 +492,13 @@ void ScGridWindow::DPLaunchFieldPopupMenu( // Populate the menus. ScTabViewShell* pViewShell = pViewData->GetViewShell(); mpDPFieldPopup->addMenuItem( - SC_STRLOAD(RID_POPUP_FILTER, STR_MENU_SORT_ASC), + SC_RESSTR(STR_MENU_SORT_ASC), new PopupSortAction(rPos, PopupSortAction::ASCENDING, 0, pViewShell)); mpDPFieldPopup->addMenuItem( - SC_STRLOAD(RID_POPUP_FILTER, STR_MENU_SORT_DESC), + SC_RESSTR(STR_MENU_SORT_DESC), new PopupSortAction(rPos, PopupSortAction::DESCENDING, 0, pViewShell)); ScMenuFloatingWindow* pSubMenu = mpDPFieldPopup->addSubMenuItem( - SC_STRLOAD(RID_POPUP_FILTER, STR_MENU_SORT_CUSTOM), !aUserSortNames.empty()); + SC_RESSTR(STR_MENU_SORT_CUSTOM), !aUserSortNames.empty()); if (pSubMenu && !aUserSortNames.empty()) { commit a194597597f259f1120d0e2e5f0d533e7561c274 Author: Caolán McNamara <[email protected]> Date: Fri Feb 10 13:05:45 2017 +0000 unwind RID_STATISTICS_DLGS local resource Change-Id: Ib5e7692cce9e097250182ec1518e93848fdc9b86 diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc index 3bd2e75..3521e20 100644 --- a/sc/inc/sc.hrc +++ b/sc/inc/sc.hrc @@ -696,7 +696,6 @@ #define RID_GRAPHIC_OBJECTBAR (SC_RESOURCE_START+54) #define RID_MEDIA_OBJECTBAR (SC_RESOURCE_START+60) #define RID_FUNCTION_CATEGORIES (SC_RESOURCE_START+62) -#define RID_STATISTICS_DLGS (SC_RESOURCE_START+64) #define STR_START (SC_RESOURCE_START+100) #define STR_ROWHEIGHT (STR_START) @@ -989,7 +988,124 @@ #define STR_TITLE_AUTHOR (STR_START + 442) #define STR_TITLE_DATE (STR_START + 443) #define STR_UNKNOWN_USER_CONFLICT (STR_START + 444) -#define STR_END (STR_UNKNOWN_USER_CONFLICT) + +#define STR_UNDO_DISTRIBUTION_TEMPLATE (STR_START + 445) +#define STR_DISTRIBUTION_UNIFORM_REAL (STR_START + 446) +#define STR_DISTRIBUTION_UNIFORM_INTEGER (STR_START + 447) +#define STR_DISTRIBUTION_NORMAL (STR_START + 448) +#define STR_DISTRIBUTION_CAUCHY (STR_START + 449) +#define STR_DISTRIBUTION_BERNOULLI (STR_START + 450) +#define STR_DISTRIBUTION_BINOMIAL (STR_START + 451) +#define STR_DISTRIBUTION_NEGATIVE_BINOMIAL (STR_START + 452) +#define STR_DISTRIBUTION_CHI_SQUARED (STR_START + 453) +#define STR_DISTRIBUTION_GEOMETRIC (STR_START + 454) + +#define STR_RNG_PARAMETER_MINIMUM (STR_START + 455) +#define STR_RNG_PARAMETER_MAXIMUM (STR_START + 456) +#define STR_RNG_PARAMETER_MEAN (STR_START + 457) +#define STR_RNG_PARAMETER_STANDARD_DEVIATION (STR_START + 458) +#define STR_RNG_PARAMETER_STANDARD_MEDIAN (STR_START + 459) +#define STR_RNG_PARAMETER_STANDARD_SIGMA (STR_START + 460) +#define STR_RNG_PARAMETER_STANDARD_PROBABILITY (STR_START + 461) +#define STR_RNG_PARAMETER_STANDARD_NUMBER_OF_TRIALS (STR_START + 462) +#define STR_RNG_PARAMETER_STANDARD_NU_VALUE (STR_START + 463) + +#define STR_SAMPLING_UNDO_NAME (STR_START + 464) + +#define STRID_CALC_MEAN (STR_START + 465) +#define STRID_CALC_STD_ERROR (STR_START + 466) +#define STRID_CALC_MODE (STR_START + 467) +#define STRID_CALC_MEDIAN (STR_START + 468) +#define STRID_CALC_VARIANCE (STR_START + 469) +#define STRID_CALC_STD_DEVIATION (STR_START + 470) +#define STRID_CALC_KURTOSIS (STR_START + 471) +#define STRID_CALC_SKEWNESS (STR_START + 472) +#define STRID_CALC_RANGE (STR_START + 473) +#define STRID_CALC_MIN (STR_START + 474) +#define STRID_CALC_MAX (STR_START + 475) +#define STRID_CALC_SUM (STR_START + 476) +#define STRID_CALC_COUNT (STR_START + 477) +#define STRID_CALC_FIRST_QUARTILE (STR_START + 478) +#define STRID_CALC_THIRD_QUARTILE (STR_START + 479) + +#define STR_DESCRIPTIVE_STATISTICS_UNDO_NAME (STR_START + 480) +#define STR_ANALYSIS_OF_VARIANCE_UNDO_NAME (STR_START + 481) +#define STR_CORRELATION_UNDO_NAME (STR_START + 482) +#define STR_COVARIANCE_UNDO_NAME (STR_START + 483) +#define STR_EXPONENTIAL_SMOOTHING_UNDO_NAME (STR_START + 484) +#define STR_MOVING_AVERAGE_UNDO_NAME (STR_START + 485) +#define STR_REGRESSION (STR_START + 486) +#define STR_REGRESSION_UNDO_NAME (STR_START + 487) +#define STR_TTEST (STR_START + 488) +#define STR_TTEST_UNDO_NAME (STR_START + 489) +#define STR_FTEST (STR_START + 490) +#define STR_FTEST_UNDO_NAME (STR_START + 491) +#define STR_ZTEST (STR_START + 492) +#define STR_ZTEST_UNDO_NAME (STR_START + 493) +#define STR_CHI_SQUARE_TEST (STR_START + 494) + +#define STR_COLUMN_LABEL_TEMPLATE (STR_START + 495) +#define STR_ROW_LABEL_TEMPLATE (STR_START + 496) + +#define STR_ANOVA_SINGLE_FACTOR_LABEL (STR_START + 497) +#define STR_ANOVA_LABEL_GROUPS (STR_START + 498) +#define STR_ANOVA_LABEL_BETWEEN_GROUPS (STR_START + 499) +#define STR_ANOVA_LABEL_WITHIN_GROUPS (STR_START + 500) +#define STR_ANOVA_LABEL_SOURCE_OF_VARIATION (STR_START + 501) +#define STR_ANOVA_LABEL_SS (STR_START + 502) +#define STR_ANOVA_LABEL_DF (STR_START + 503) +#define STR_ANOVA_LABEL_MS (STR_START + 504) +#define STR_ANOVA_LABEL_F (STR_START + 505) +#define STR_ANOVA_LABEL_P_VALUE (STR_START + 506) +#define STR_ANOVA_LABEL_F_CRITICAL (STR_START + 507) +#define STR_ANOVA_LABEL_TOTAL (STR_START + 508) +#define STR_ANOVA_TWO_FACTOR_LABEL (STR_START + 509) + +#define STR_CORRELATION_LABEL (STR_START + 510) +#define STR_COVARIANCE_LABEL (STR_START + 511) +#define STR_LABEL_ALPHA (STR_START + 512) +#define STR_VARIABLE_1_LABEL (STR_START + 513) +#define STR_VARIABLE_2_LABEL (STR_START + 514) +#define STR_HYPOTHESIZED_MEAN_DIFFERENCE_LABEL (STR_START + 515) +#define STR_OBSERVATIONS_LABEL (STR_START + 516) +#define STR_OBSERVED_MEAN_DIFFERENCE_LABEL (STR_START + 517) +#define STR_DEGREES_OF_FREEDOM_LABEL (STR_START + 518) +#define STR_P_VALUE_LABEL (STR_START + 519) +#define STR_CRITICAL_VALUE_LABEL (STR_START + 520) +#define STR_TEST_STATISTIC_LABEL (STR_START + 521) + +#define STR_LABEL_LINEAR (STR_START + 522) +#define STR_LABEL_LOGARITHMIC (STR_START + 523) +#define STR_LABEL_POWER (STR_START + 524) + +#define STR_LABEL_REGRESSION_MODEL (STR_START + 525) +#define STR_LABEL_RSQUARED (STR_START + 526) +#define STR_LABEL_SLOPE (STR_START + 527) +#define STR_LABEL_INTERCEPT (STR_START + 528) + +#define STR_FTEST_P_RIGHT_TAIL (STR_START + 529) +#define STR_FTEST_F_CRITICAL_RIGHT_TAIL (STR_START + 530) +#define STR_FTEST_P_LEFT_TAIL (STR_START + 531) +#define STR_FTEST_F_CRITICAL_LEFT_TAIL (STR_START + 532) +#define STR_FTEST_P_TWO_TAIL (STR_START + 533) +#define STR_FTEST_F_CRITICAL_TWO_TAIL (STR_START + 534) + +#define STR_TTEST_PEARSON_CORRELATION (STR_START + 535) +#define STR_TTEST_VARIANCE_OF_THE_DIFFERENCES (STR_START + 536) +#define STR_TTEST_T_STAT (STR_START + 537) +#define STR_TTEST_P_ONE_TAIL (STR_START + 538) +#define STR_TTEST_T_CRITICAL_ONE_TAIL (STR_START + 539) +#define STR_TTEST_P_TWO_TAIL (STR_START + 540) +#define STR_TTEST_T_CRITICAL_TWO_TAIL (STR_START + 541) + +#define STR_ZTEST_KNOWN_VARIANCE (STR_START + 542) +#define STR_ZTEST_Z_VALUE (STR_START + 543) +#define STR_ZTEST_P_ONE_TAIL (STR_START + 544) +#define STR_ZTEST_Z_CRITICAL_ONE_TAIL (STR_START + 545) +#define STR_ZTEST_P_TWO_TAIL (STR_START + 546) +#define STR_ZTEST_Z_CRITICAL_TWO_TAIL (STR_START + 547) + +#define STR_END (STR_ZTEST_Z_CRITICAL_TWO_TAIL) #define BMP_START (STR_END) diff --git a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx index 17aabcc..68cee57 100644 --- a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx @@ -21,7 +21,6 @@ #include "reffact.hxx" #include "strload.hxx" #include "docfunc.hxx" -#include "StatisticsDialogs.hrc" #include "TableFillingAndNavigationTools.hxx" #include "AnalysisOfVarianceDialog.hxx" @@ -183,7 +182,7 @@ void ScAnalysisOfVarianceDialog::RowColumn(ScRangeList& rRangeList, AddressWalke else { sal_Int16 aLabelId = (aGroupedBy == BY_COLUMN) ? STR_COLUMN_LABEL_TEMPLATE : STR_ROW_LABEL_TEMPLATE; - OUString aLabelTemplate(SC_STRLOAD(RID_STATISTICS_DLGS, aLabelId)); + OUString aLabelTemplate(SC_RESSTR(aLabelId)); for (size_t i = 0; i < rRangeList.size(); i++) { @@ -199,11 +198,11 @@ void ScAnalysisOfVarianceDialog::RowColumn(ScRangeList& rRangeList, AddressWalke void ScAnalysisOfVarianceDialog::AnovaSingleFactor(AddressWalkerWriter& output, FormulaTemplate& aTemplate) { - output.writeBoldString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_ANOVA_SINGLE_FACTOR_LABEL)); + output.writeBoldString(SC_RESSTR(STR_ANOVA_SINGLE_FACTOR_LABEL)); output.newLine(); double aAlphaValue = mpAlphaField->GetValue() / 100.0; - output.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_LABEL_ALPHA)); + output.writeString(SC_RESSTR(STR_LABEL_ALPHA)); output.nextColumn(); output.writeValue(aAlphaValue); aTemplate.autoReplaceAddress("%ALPHA%", output.current()); @@ -213,7 +212,7 @@ void ScAnalysisOfVarianceDialog::AnovaSingleFactor(AddressWalkerWriter& output, // Write labels for(sal_Int32 i = 0; lclBasicStatistics[i].aLabelId != 0; i++) { - output.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, lclBasicStatistics[i].aLabelId)); + output.writeString(SC_RESSTR(lclBasicStatistics[i].aLabelId)); output.nextColumn(); } output.newLine(); @@ -245,7 +244,7 @@ void ScAnalysisOfVarianceDialog::AnovaSingleFactor(AddressWalkerWriter& output, output.resetColumn(); for(sal_Int32 i = 0; lclAnovaLabels[i] != 0; i++) { - output.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, lclAnovaLabels[i])); + output.writeString(SC_RESSTR(lclAnovaLabels[i])); output.nextColumn(); } output.nextRow(); @@ -256,7 +255,7 @@ void ScAnalysisOfVarianceDialog::AnovaSingleFactor(AddressWalkerWriter& output, { // Label output.resetColumn(); - output.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_ANOVA_LABEL_BETWEEN_GROUPS)); + output.writeString(SC_RESSTR(STR_ANOVA_LABEL_BETWEEN_GROUPS)); output.nextColumn(); // Sum of Squares @@ -302,7 +301,7 @@ void ScAnalysisOfVarianceDialog::AnovaSingleFactor(AddressWalkerWriter& output, { // Label output.resetColumn(); - output.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_ANOVA_LABEL_WITHIN_GROUPS)); + output.writeString(SC_RESSTR(STR_ANOVA_LABEL_WITHIN_GROUPS)); output.nextColumn(); // Sum of Squares @@ -329,7 +328,7 @@ void ScAnalysisOfVarianceDialog::AnovaSingleFactor(AddressWalkerWriter& output, { // Label output.resetColumn(); - output.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_ANOVA_LABEL_TOTAL)); + output.writeString(SC_RESSTR(STR_ANOVA_LABEL_TOTAL)); output.nextColumn(); // Sum of Squares @@ -347,7 +346,7 @@ void ScAnalysisOfVarianceDialog::AnovaSingleFactor(AddressWalkerWriter& output, void ScAnalysisOfVarianceDialog::AnovaTwoFactor(AddressWalkerWriter& output, FormulaTemplate& aTemplate) { - output.writeBoldString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_ANOVA_TWO_FACTOR_LABEL)); + output.writeBoldString(SC_RESSTR(STR_ANOVA_TWO_FACTOR_LABEL)); output.newLine(); double aAlphaValue = mpAlphaField->GetValue() / 100.0; @@ -361,7 +360,7 @@ void ScAnalysisOfVarianceDialog::AnovaTwoFactor(AddressWalkerWriter& output, For // Write labels for(sal_Int32 i = 0; lclBasicStatistics[i].aLabelId != 0; i++) { - output.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, lclBasicStatistics[i].aLabelId)); + output.writeString(SC_RESSTR(lclBasicStatistics[i].aLabelId)); output.nextColumn(); } output.newLine(); @@ -410,7 +409,7 @@ void ScAnalysisOfVarianceDialog::AnovaTwoFactor(AddressWalkerWriter& output, For // Write ANOVA labels for(sal_Int32 i = 0; lclAnovaLabels[i] != 0; i++) { - output.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, lclAnovaLabels[i])); + output.writeString(SC_RESSTR(lclAnovaLabels[i])); output.nextColumn(); } output.nextRow(); diff --git a/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx b/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx index 1759c71..f8914fe 100644 --- a/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx @@ -21,7 +21,6 @@ #include "reffact.hxx" #include "strload.hxx" #include "docfunc.hxx" -#include "StatisticsDialogs.hrc" #include "TableFillingAndNavigationTools.hxx" #include "ChiSquareTestDialog.hxx" @@ -33,7 +32,7 @@ ScChiSquareTestDialog::ScChiSquareTestDialog( pSfxBindings, pChildWindow, pParent, pViewData, "ChiSquareTestDialog", "modules/scalc/ui/chisquaretestdialog.ui" ) { - SetText(SC_STRLOAD(RID_STATISTICS_DLGS, STR_CHI_SQUARE_TEST)); + SetText(SC_RESSTR(STR_CHI_SQUARE_TEST)); } ScChiSquareTestDialog::~ScChiSquareTestDialog() @@ -57,18 +56,18 @@ ScRange ScChiSquareTestDialog::ApplyOutput(ScDocShell* pDocShell) aTemplate.autoReplaceRange("%RANGE%", mInputRange); - aOutput.writeBoldString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_CHI_SQUARE_TEST)); + aOutput.writeBoldString(SC_RESSTR(STR_CHI_SQUARE_TEST)); aOutput.newLine(); // Alpha - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_LABEL_ALPHA)); + aOutput.writeString(SC_RESSTR(STR_LABEL_ALPHA)); aOutput.nextColumn(); aOutput.writeValue(0.05); aTemplate.autoReplaceAddress("%ALPHA%", aOutput.current()); aOutput.newLine(); // DF - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_DEGREES_OF_FREEDOM_LABEL)); + aOutput.writeString(SC_RESSTR(STR_DEGREES_OF_FREEDOM_LABEL)); aOutput.nextColumn(); aTemplate.setTemplate("=(COLUMNS(%RANGE%) - 1) * (ROWS(%RANGE%) - 1)"); aTemplate.autoReplaceAddress("%DEGREES_OF_FREEDOM%", aOutput.current()); @@ -76,7 +75,7 @@ ScRange ScChiSquareTestDialog::ApplyOutput(ScDocShell* pDocShell) aOutput.newLine(); // p Value - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_P_VALUE_LABEL)); + aOutput.writeString(SC_RESSTR(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()); @@ -84,14 +83,14 @@ ScRange ScChiSquareTestDialog::ApplyOutput(ScDocShell* pDocShell) aOutput.newLine(); // Test Statistic - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_TEST_STATISTIC_LABEL)); + aOutput.writeString(SC_RESSTR(STR_TEST_STATISTIC_LABEL)); aOutput.nextColumn(); aTemplate.setTemplate("=CHIINV(%P_VALUE%; %DEGREES_OF_FREEDOM%)"); aOutput.writeFormula(aTemplate.getTemplate()); aOutput.newLine(); // Critical value - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_CRITICAL_VALUE_LABEL)); + aOutput.writeString(SC_RESSTR(STR_CRITICAL_VALUE_LABEL)); aOutput.nextColumn(); aTemplate.setTemplate("=CHIINV(%ALPHA%; %DEGREES_OF_FREEDOM%)"); aOutput.writeFormula(aTemplate.getTemplate()); diff --git a/sc/source/ui/StatisticsDialogs/CorrelationDialog.cxx b/sc/source/ui/StatisticsDialogs/CorrelationDialog.cxx index 74b0976..a2e5e2a 100644 --- a/sc/source/ui/StatisticsDialogs/CorrelationDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/CorrelationDialog.cxx @@ -11,7 +11,6 @@ #include "docsh.hxx" #include "reffact.hxx" #include "strload.hxx" -#include "StatisticsDialogs.hrc" #include "CorrelationDialog.hxx" @@ -30,7 +29,7 @@ bool ScCorrelationDialog::Close() const OUString ScCorrelationDialog::getLabel() { - return SC_STRLOAD(RID_STATISTICS_DLGS, STR_CORRELATION_LABEL); + return SC_RESSTR(STR_CORRELATION_LABEL); } const OUString ScCorrelationDialog::getTemplate() diff --git a/sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx b/sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx index 4443b61..c037bbe 100644 --- a/sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx @@ -11,7 +11,6 @@ #include "docsh.hxx" #include "reffact.hxx" #include "strload.hxx" -#include "StatisticsDialogs.hrc" #include "CovarianceDialog.hxx" @@ -35,7 +34,7 @@ bool ScCovarianceDialog::Close() const OUString ScCovarianceDialog::getLabel() { - return SC_STRLOAD(RID_STATISTICS_DLGS, STR_COVARIANCE_LABEL); + return SC_RESSTR(STR_COVARIANCE_LABEL); } const OUString ScCovarianceDialog::getTemplate() diff --git a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx index a8c3939..b7c7128 100644 --- a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx @@ -21,7 +21,6 @@ #include "reffact.hxx" #include "strload.hxx" #include "docfunc.hxx" -#include "StatisticsDialogs.hrc" #include "TableFillingAndNavigationTools.hxx" #include "DescriptiveStatisticsDialog.hxx" @@ -98,9 +97,9 @@ ScRange ScDescriptiveStatisticsDialog::ApplyOutput(ScDocShell* pDocShell) for( ; pIterator->hasNext(); pIterator->next() ) { if (mGroupedBy == BY_COLUMN) - aTemplate.setTemplate(SC_STRLOAD(RID_STATISTICS_DLGS, STR_COLUMN_LABEL_TEMPLATE)); + aTemplate.setTemplate(SC_RESSTR(STR_COLUMN_LABEL_TEMPLATE)); else - aTemplate.setTemplate(SC_STRLOAD(RID_STATISTICS_DLGS, STR_ROW_LABEL_TEMPLATE)); + aTemplate.setTemplate(SC_RESSTR(STR_ROW_LABEL_TEMPLATE)); aTemplate.applyNumber("%NUMBER%", pIterator->index() + 1); aOutput.writeBoldString(aTemplate.getTemplate()); @@ -113,7 +112,7 @@ ScRange ScDescriptiveStatisticsDialog::ApplyOutput(ScDocShell* pDocShell) // Write calculation labels for(sal_Int32 i = 0; lclCalcDefinitions[i].aFormula != nullptr; i++) { - OUString aLabel(SC_STRLOAD(RID_STATISTICS_DLGS, lclCalcDefinitions[i].aCalculationNameId)); + OUString aLabel(SC_RESSTR(lclCalcDefinitions[i].aCalculationNameId)); aOutput.writeString(aLabel); aOutput.nextRow(); } diff --git a/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx b/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx index e023d45a..e0b077f 100644 --- a/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx @@ -21,7 +21,6 @@ #include "reffact.hxx" #include "strload.hxx" #include "docfunc.hxx" -#include "StatisticsDialogs.hrc" #include "TableFillingAndNavigationTools.hxx" #include "ExponentialSmoothingDialog.hxx" @@ -67,7 +66,7 @@ ScRange ScExponentialSmoothingDialog::ApplyOutput(ScDocShell* pDocShell) double aSmoothingFactor = mpSmoothingFactor->GetValue() / 100.0; // Alpha - output.writeBoldString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_LABEL_ALPHA)); + output.writeBoldString(SC_RESSTR(STR_LABEL_ALPHA)); output.nextRow(); // Alpha Value @@ -92,9 +91,9 @@ ScRange ScExponentialSmoothingDialog::ApplyOutput(ScDocShell* pDocShell) // Write column label if (mGroupedBy == BY_COLUMN) - aTemplate.setTemplate(SC_STRLOAD(RID_STATISTICS_DLGS, STR_COLUMN_LABEL_TEMPLATE)); + aTemplate.setTemplate(SC_RESSTR(STR_COLUMN_LABEL_TEMPLATE)); else - aTemplate.setTemplate(SC_STRLOAD(RID_STATISTICS_DLGS, STR_ROW_LABEL_TEMPLATE)); + aTemplate.setTemplate(SC_RESSTR(STR_ROW_LABEL_TEMPLATE)); aTemplate.applyNumber("%NUMBER%", pIterator->index() + 1); output.writeBoldString(aTemplate.getTemplate()); output.nextRow(); diff --git a/sc/source/ui/StatisticsDialogs/FTestDialog.cxx b/sc/source/ui/StatisticsDialogs/FTestDialog.cxx index c2e68e8..c4d5ae3 100644 --- a/sc/source/ui/StatisticsDialogs/FTestDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/FTestDialog.cxx @@ -21,7 +21,6 @@ #include "reffact.hxx" #include "strload.hxx" #include "docfunc.hxx" -#include "StatisticsDialogs.hrc" #include "TableFillingAndNavigationTools.hxx" #include "FTestDialog.hxx" @@ -33,7 +32,7 @@ ScFTestDialog::ScFTestDialog( pSfxBindings, pChildWindow, pParent, pViewData, "TTestDialog", "modules/scalc/ui/ttestdialog.ui" ) { - SetText(SC_STRLOAD(RID_STATISTICS_DLGS, STR_FTEST)); + SetText(SC_RESSTR(STR_FTEST)); } ScFTestDialog::~ScFTestDialog() @@ -70,23 +69,23 @@ ScRange ScFTestDialog::ApplyOutput(ScDocShell* pDocShell) aTemplate.autoReplaceRange("%VARIABLE1_RANGE%", pVariable1Iterator->get()); aTemplate.autoReplaceRange("%VARIABLE2_RANGE%", pVariable2Iterator->get()); - aOutput.writeBoldString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_FTEST_UNDO_NAME)); + aOutput.writeBoldString(SC_RESSTR(STR_FTEST_UNDO_NAME)); aOutput.newLine(); // Alpha - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_LABEL_ALPHA)); + aOutput.writeString(SC_RESSTR(STR_LABEL_ALPHA)); aOutput.nextColumn(); aOutput.writeValue(0.05); aTemplate.autoReplaceAddress("%ALPHA%", aOutput.current()); aOutput.newLine(); aOutput.nextColumn(); - aOutput.writeBoldString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_VARIABLE_1_LABEL)); + aOutput.writeBoldString(SC_RESSTR(STR_VARIABLE_1_LABEL)); aOutput.nextColumn(); - aOutput.writeBoldString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_VARIABLE_2_LABEL)); + aOutput.writeBoldString(SC_RESSTR(STR_VARIABLE_2_LABEL)); aOutput.newLine(); - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STRID_CALC_MEAN)); + aOutput.writeString(SC_RESSTR(STRID_CALC_MEAN)); aOutput.nextColumn(); aTemplate.setTemplate("=AVERAGE(%VARIABLE1_RANGE%)"); aOutput.writeFormula(aTemplate.getTemplate()); @@ -95,7 +94,7 @@ ScRange ScFTestDialog::ApplyOutput(ScDocShell* pDocShell) aOutput.writeFormula(aTemplate.getTemplate()); aOutput.newLine(); - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STRID_CALC_VARIANCE)); + aOutput.writeString(SC_RESSTR(STRID_CALC_VARIANCE)); aOutput.nextColumn(); aTemplate.setTemplate("=VAR(%VARIABLE1_RANGE%)"); aOutput.writeFormula(aTemplate.getTemplate()); @@ -106,7 +105,7 @@ ScRange ScFTestDialog::ApplyOutput(ScDocShell* pDocShell) aTemplate.autoReplaceAddress("%VARIABLE2_VARIANCE%", aOutput.current()); aOutput.newLine(); - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_OBSERVATIONS_LABEL)); + aOutput.writeString(SC_RESSTR(STR_OBSERVATIONS_LABEL)); aOutput.nextColumn(); aTemplate.setTemplate("=COUNT(%VARIABLE1_RANGE%)"); aOutput.writeFormula(aTemplate.getTemplate()); @@ -117,7 +116,7 @@ ScRange ScFTestDialog::ApplyOutput(ScDocShell* pDocShell) aTemplate.autoReplaceAddress("%VARIABLE2_OBSERVATIONS%", aOutput.current()); aOutput.newLine(); - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_ANOVA_LABEL_DF)); + aOutput.writeString(SC_RESSTR(STR_ANOVA_LABEL_DF)); aOutput.nextColumn(); aTemplate.setTemplate("=%VARIABLE1_OBSERVATIONS% - 1"); aOutput.writeFormula(aTemplate.getTemplate()); @@ -128,46 +127,46 @@ ScRange ScFTestDialog::ApplyOutput(ScDocShell* pDocShell) aTemplate.autoReplaceAddress("%VARIABLE2_DEGREE_OF_FREEDOM%", aOutput.current()); aOutput.newLine(); - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_ANOVA_LABEL_F)); + aOutput.writeString(SC_RESSTR(STR_ANOVA_LABEL_F)); aOutput.nextColumn(); aTemplate.setTemplate("=%VARIABLE1_VARIANCE% / %VARIABLE2_VARIANCE%"); aOutput.writeFormula(aTemplate.getTemplate()); aTemplate.autoReplaceAddress("%F_VALUE%", aOutput.current()); aOutput.newLine(); - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_FTEST_P_RIGHT_TAIL)); + aOutput.writeString(SC_RESSTR(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()); aOutput.newLine(); - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_FTEST_F_CRITICAL_RIGHT_TAIL)); + aOutput.writeString(SC_RESSTR(STR_FTEST_F_CRITICAL_RIGHT_TAIL)); aOutput.nextColumn(); aTemplate.setTemplate("=FINV(%ALPHA%; %VARIABLE1_DEGREE_OF_FREEDOM%; %VARIABLE2_DEGREE_OF_FREEDOM%)"); aOutput.writeFormula(aTemplate.getTemplate()); aOutput.newLine(); - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_FTEST_P_LEFT_TAIL)); + aOutput.writeString(SC_RESSTR(STR_FTEST_P_LEFT_TAIL)); aOutput.nextColumn(); aTemplate.setTemplate("=1 - %P_RIGHT_TAIL_VALUE%"); aOutput.writeFormula(aTemplate.getTemplate()); aTemplate.autoReplaceAddress("%P_LEFT_TAIL_VALUE%", aOutput.current()); aOutput.newLine(); - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_FTEST_F_CRITICAL_LEFT_TAIL)); + aOutput.writeString(SC_RESSTR(STR_FTEST_F_CRITICAL_LEFT_TAIL)); aOutput.nextColumn(); aTemplate.setTemplate("=FINV(1-%ALPHA%; %VARIABLE1_DEGREE_OF_FREEDOM%; %VARIABLE2_DEGREE_OF_FREEDOM%)"); aOutput.writeFormula(aTemplate.getTemplate()); aOutput.newLine(); - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_FTEST_P_TWO_TAIL)); + aOutput.writeString(SC_RESSTR(STR_FTEST_P_TWO_TAIL)); aOutput.nextColumn(); aTemplate.setTemplate("=2*MIN(%P_RIGHT_TAIL_VALUE%; %P_LEFT_TAIL_VALUE%)"); aOutput.writeFormula(aTemplate.getTemplate()); aOutput.newLine(); - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_FTEST_F_CRITICAL_TWO_TAIL)); + aOutput.writeString(SC_RESSTR(STR_FTEST_F_CRITICAL_TWO_TAIL)); aOutput.nextColumn(); aTemplate.setTemplate("=FINV(1-(%ALPHA%/2); %VARIABLE1_DEGREE_OF_FREEDOM%; %VARIABLE2_DEGREE_OF_FREEDOM%)"); aOutput.writeFormula(aTemplate.getTemplate()); diff --git a/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx b/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx index 3d4945d..8cbeee6 100644 --- a/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx +++ b/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx @@ -21,7 +21,6 @@ #include "reffact.hxx" #include "strload.hxx" #include "docfunc.hxx" -#include "StatisticsDialogs.hrc" #include "TableFillingAndNavigationTools.hxx" #include "MatrixComparisonGenerator.hxx" @@ -88,9 +87,9 @@ ScRange ScMatrixComparisonGenerator::ApplyOutput(ScDocShell* pDocShell) for (size_t i = 0; i < aRangeList.size(); i++) { if (mGroupedBy == BY_COLUMN) - aTemplate.setTemplate(SC_STRLOAD(RID_STATISTICS_DLGS, STR_COLUMN_LABEL_TEMPLATE)); + aTemplate.setTemplate(SC_RESSTR(STR_COLUMN_LABEL_TEMPLATE)); else - aTemplate.setTemplate(SC_STRLOAD(RID_STATISTICS_DLGS, STR_ROW_LABEL_TEMPLATE)); + aTemplate.setTemplate(SC_RESSTR(STR_ROW_LABEL_TEMPLATE)); aTemplate.applyNumber(strWildcardNumber, i + 1); output.writeString(aTemplate.getTemplate()); @@ -103,9 +102,9 @@ ScRange ScMatrixComparisonGenerator::ApplyOutput(ScDocShell* pDocShell) for (size_t i = 0; i < aRangeList.size(); i++) { if (mGroupedBy == BY_COLUMN) - aTemplate.setTemplate(SC_STRLOAD(RID_STATISTICS_DLGS, STR_COLUMN_LABEL_TEMPLATE)); + aTemplate.setTemplate(SC_RESSTR(STR_COLUMN_LABEL_TEMPLATE)); else - aTemplate.setTemplate(SC_STRLOAD(RID_STATISTICS_DLGS, STR_ROW_LABEL_TEMPLATE)); + aTemplate.setTemplate(SC_RESSTR(STR_ROW_LABEL_TEMPLATE)); aTemplate.applyNumber(strWildcardNumber, i + 1); output.writeString(aTemplate.getTemplate()); diff --git a/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx b/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx index 4bebec6..aa7776a 100644 --- a/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx @@ -21,7 +21,6 @@ #include "reffact.hxx" #include "strload.hxx" #include "docfunc.hxx" -#include "StatisticsDialogs.hrc" #include "TableFillingAndNavigationTools.hxx" #include "MovingAverageDialog.hxx" @@ -78,9 +77,9 @@ ScRange ScMovingAverageDialog::ApplyOutput(ScDocShell* pDocShell) // Write label if (mGroupedBy == BY_COLUMN) - aTemplate.setTemplate(SC_STRLOAD(RID_STATISTICS_DLGS, STR_COLUMN_LABEL_TEMPLATE)); + aTemplate.setTemplate(SC_RESSTR(STR_COLUMN_LABEL_TEMPLATE)); else - aTemplate.setTemplate(SC_STRLOAD(RID_STATISTICS_DLGS, STR_ROW_LABEL_TEMPLATE)); + aTemplate.setTemplate(SC_RESSTR(STR_ROW_LABEL_TEMPLATE)); aTemplate.applyNumber("%NUMBER%", pIterator->index() + 1); output.writeBoldString(aTemplate.getTemplate()); diff --git a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx index c59e9cc..f8b28ab 100644 --- a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx @@ -21,7 +21,6 @@ #include "reffact.hxx" #include "strload.hxx" #include "docfunc.hxx" -#include "StatisticsDialogs.hrc" #include <random> @@ -283,8 +282,8 @@ void ScRandomNumberGeneratorDialog::SelectGeneratorAndGenerateNumbers() template<class RNG> void ScRandomNumberGeneratorDialog::GenerateNumbers(RNG& randomGenerator, const sal_Int16 aDistributionStringId, boost::optional<sal_Int8> aDecimalPlaces) { - OUString aUndo = SC_STRLOAD(RID_STATISTICS_DLGS, STR_UNDO_DISTRIBUTION_TEMPLATE); - OUString aDistributionName = SC_STRLOAD(RID_STATISTICS_DLGS, aDistributionStringId); + OUString aUndo = SC_RESSTR(STR_UNDO_DISTRIBUTION_TEMPLATE); + OUString aDistributionName = SC_RESSTR(aDistributionStringId); aUndo = aUndo.replaceAll("$(DISTRIBUTION)", aDistributionName); ScDocShell* pDocShell = mpViewData->GetDocShell(); @@ -437,19 +436,19 @@ IMPL_LINK_NOARG(ScRandomNumberGeneratorDialog, DistributionChanged, ListBox&, vo { case DIST_UNIFORM: { - mpParameter1Text->SetText( SC_STRLOAD( RID_STATISTICS_DLGS, STR_RNG_PARAMETER_MINIMUM)); - mpParameter2Text->SetText( SC_STRLOAD( RID_STATISTICS_DLGS, STR_RNG_PARAMETER_MAXIMUM)); + mpParameter1Text->SetText(SC_RESSTR(STR_RNG_PARAMETER_MINIMUM)); + mpParameter2Text->SetText(SC_RESSTR(STR_RNG_PARAMETER_MAXIMUM)); mpParameter2Text->Show(); mpParameter2Value->Show(); break; } case DIST_UNIFORM_INTEGER: { - mpParameter1Text->SetText( SC_STRLOAD( RID_STATISTICS_DLGS, STR_RNG_PARAMETER_MINIMUM)); + mpParameter1Text->SetText(SC_RESSTR(STR_RNG_PARAMETER_MINIMUM)); mpParameter1Value->SetDecimalDigits(0); mpParameter1Value->SetSpinSize(1); - mpParameter2Text->SetText( SC_STRLOAD( RID_STATISTICS_DLGS, STR_RNG_PARAMETER_MAXIMUM)); + mpParameter2Text->SetText(SC_RESSTR(STR_RNG_PARAMETER_MAXIMUM)); mpParameter2Value->SetDecimalDigits(0); mpParameter2Value->SetSpinSize(1); @@ -459,16 +458,16 @@ IMPL_LINK_NOARG(ScRandomNumberGeneratorDialog, DistributionChanged, ListBox&, vo } case DIST_NORMAL: { - mpParameter1Text->SetText( SC_STRLOAD( RID_STATISTICS_DLGS, STR_RNG_PARAMETER_MEAN)); - mpParameter2Text->SetText( SC_STRLOAD( RID_STATISTICS_DLGS, STR_RNG_PARAMETER_STANDARD_DEVIATION)); + mpParameter1Text->SetText(SC_RESSTR(STR_RNG_PARAMETER_MEAN)); + mpParameter2Text->SetText(SC_RESSTR(STR_RNG_PARAMETER_STANDARD_DEVIATION)); mpParameter2Text->Show(); mpParameter2Value->Show(); break; } case DIST_CAUCHY: { - mpParameter1Text->SetText( SC_STRLOAD( RID_STATISTICS_DLGS, STR_RNG_PARAMETER_STANDARD_MEDIAN)); - mpParameter2Text->SetText( SC_STRLOAD( RID_STATISTICS_DLGS, STR_RNG_PARAMETER_STANDARD_SIGMA)); + mpParameter1Text->SetText(SC_RESSTR(STR_RNG_PARAMETER_STANDARD_MEDIAN)); + mpParameter2Text->SetText(SC_RESSTR(STR_RNG_PARAMETER_STANDARD_SIGMA)); mpParameter2Text->Show(); mpParameter2Value->Show(); break; @@ -476,7 +475,7 @@ IMPL_LINK_NOARG(ScRandomNumberGeneratorDialog, DistributionChanged, ListBox&, vo case DIST_BERNOULLI: case DIST_GEOMETRIC: { - mpParameter1Text->SetText( SC_STRLOAD( RID_STATISTICS_DLGS, STR_RNG_PARAMETER_STANDARD_PROBABILITY)); + mpParameter1Text->SetText(SC_RESSTR(STR_RNG_PARAMETER_STANDARD_PROBABILITY)); mpParameter1Value->SetMin( 0 ); mpParameter1Value->SetMax( PERCISION ); mpParameter1Value->SetSpinSize(1000); @@ -488,12 +487,12 @@ IMPL_LINK_NOARG(ScRandomNumberGeneratorDialog, DistributionChanged, ListBox&, vo case DIST_BINOMIAL: case DIST_NEGATIVE_BINOMIAL: { - mpParameter1Text->SetText( SC_STRLOAD( RID_STATISTICS_DLGS, STR_RNG_PARAMETER_STANDARD_PROBABILITY)); + mpParameter1Text->SetText(SC_RESSTR(STR_RNG_PARAMETER_STANDARD_PROBABILITY)); mpParameter1Value->SetMin( 0 ); mpParameter1Value->SetMax( PERCISION ); mpParameter1Value->SetSpinSize(1000); - mpParameter2Text->SetText( SC_STRLOAD( RID_STATISTICS_DLGS, STR_RNG_PARAMETER_STANDARD_NUMBER_OF_TRIALS)); + mpParameter2Text->SetText(SC_RESSTR(STR_RNG_PARAMETER_STANDARD_NUMBER_OF_TRIALS)); mpParameter2Value->SetDecimalDigits(0); mpParameter2Value->SetSpinSize(1); mpParameter2Value->SetMin(0); @@ -504,7 +503,7 @@ IMPL_LINK_NOARG(ScRandomNumberGeneratorDialog, DistributionChanged, ListBox&, vo } case DIST_CHI_SQUARED: { - mpParameter1Text->SetText( SC_STRLOAD( RID_STATISTICS_DLGS, STR_RNG_PARAMETER_STANDARD_NU_VALUE)); + mpParameter1Text->SetText(SC_RESSTR(STR_RNG_PARAMETER_STANDARD_NU_VALUE)); mpParameter2Text->Hide(); mpParameter2Value->Hide(); diff --git a/sc/source/ui/StatisticsDialogs/RegressionDialog.cxx b/sc/source/ui/StatisticsDialogs/RegressionDialog.cxx index 84939a8..f513b05 100644 --- a/sc/source/ui/StatisticsDialogs/RegressionDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/RegressionDialog.cxx @@ -21,7 +21,6 @@ #include "reffact.hxx" #include "strload.hxx" #include "docfunc.hxx" -#include "StatisticsDialogs.hrc" #include "TableFillingAndNavigationTools.hxx" #include "RegressionDialog.hxx" @@ -129,31 +128,31 @@ ScRange ScRegressionDialog::ApplyOutput(ScDocShell* pDocShell) aTemplate.autoReplaceRange("%VARIABLE1_RANGE%", pVariable1Iterator->get()); aTemplate.autoReplaceRange("%VARIABLE2_RANGE%", pVariable2Iterator->get()); - aOutput.writeBoldString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_REGRESSION)); + aOutput.writeBoldString(SC_RESSTR(STR_REGRESSION)); aOutput.newLine(); aOutput.newLine(); aOutput.push(); // REGRESSION MODEL - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_LABEL_REGRESSION_MODEL)); + aOutput.writeString(SC_RESSTR(STR_LABEL_REGRESSION_MODEL)); aOutput.nextRow(); // RSQUARED - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_LABEL_RSQUARED)); + aOutput.writeString(SC_RESSTR(STR_LABEL_RSQUARED)); aOutput.nextRow(); // Standard Error - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STRID_CALC_STD_ERROR)); + aOutput.writeString(SC_RESSTR(STRID_CALC_STD_ERROR)); aOutput.nextRow(); aOutput.nextRow(); // Slope - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_LABEL_SLOPE)); + aOutput.writeString(SC_RESSTR(STR_LABEL_SLOPE)); aOutput.nextRow(); // Intercept - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_LABEL_INTERCEPT)); + aOutput.writeString(SC_RESSTR(STR_LABEL_INTERCEPT)); aOutput.nextRow(); aOutput.nextRow(); @@ -193,7 +192,7 @@ ScRange ScRegressionDialog::ApplyOutput(ScDocShell* pDocShell) nColumn += 1; // REGRESSION MODEL - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, constRegressionModel[nRegressionIndex])); + aOutput.writeString(SC_RESSTR(constRegressionModel[nRegressionIndex])); aOutput.nextRow(); // RSQUARED diff --git a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx index 0657199..a7c87fd 100644 --- a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx @@ -20,7 +20,6 @@ #include "reffact.hxx" #include "strload.hxx" #include "docfunc.hxx" -#include "StatisticsDialogs.hrc" #include "SamplingDialog.hxx" @@ -267,7 +266,7 @@ ScRange ScSamplingDialog::PerformRandomSampling(ScDocShell* pDocShell) void ScSamplingDialog::PerformSampling() { - OUString aUndo( SC_STRLOAD( RID_STATISTICS_DLGS, STR_SAMPLING_UNDO_NAME)); + OUString aUndo(SC_RESSTR(STR_SAMPLING_UNDO_NAME)); ScDocShell* pDocShell = mViewData->GetDocShell(); svl::IUndoManager* pUndoManager = pDocShell->GetUndoManager(); diff --git a/sc/source/ui/StatisticsDialogs/StatisticsDialogs.hrc b/sc/source/ui/StatisticsDialogs/StatisticsDialogs.hrc deleted file mode 100644 index f8cbcbb..0000000 --- a/sc/source/ui/StatisticsDialogs/StatisticsDialogs.hrc +++ /dev/null @@ -1,129 +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 "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 20 -#define STR_RNG_PARAMETER_MAXIMUM 21 -#define STR_RNG_PARAMETER_MEAN 22 -#define STR_RNG_PARAMETER_STANDARD_DEVIATION 23 -#define STR_RNG_PARAMETER_STANDARD_MEDIAN 24 -#define STR_RNG_PARAMETER_STANDARD_SIGMA 25 -#define STR_RNG_PARAMETER_STANDARD_PROBABILITY 26 -#define STR_RNG_PARAMETER_STANDARD_NUMBER_OF_TRIALS 27 -#define STR_RNG_PARAMETER_STANDARD_NU_VALUE 28 - -#define STR_SAMPLING_UNDO_NAME 39 - -#define STRID_CALC_MEAN 40 -#define STRID_CALC_STD_ERROR 41 -#define STRID_CALC_MODE 42 -#define STRID_CALC_MEDIAN 43 -#define STRID_CALC_VARIANCE 44 -#define STRID_CALC_STD_DEVIATION 45 -#define STRID_CALC_KURTOSIS 46 -#define STRID_CALC_SKEWNESS 47 -#define STRID_CALC_RANGE 48 -#define STRID_CALC_MIN 49 -#define STRID_CALC_MAX 50 -#define STRID_CALC_SUM 51 -#define STRID_CALC_COUNT 52 -#define STRID_CALC_FIRST_QUARTILE 53 -#define STRID_CALC_THIRD_QUARTILE 54 - -#define STR_DESCRIPTIVE_STATISTICS_UNDO_NAME 60 -#define STR_ANALYSIS_OF_VARIANCE_UNDO_NAME 61 -#define STR_CORRELATION_UNDO_NAME 62 -#define STR_COVARIANCE_UNDO_NAME 63 -#define STR_EXPONENTIAL_SMOOTHING_UNDO_NAME 64 -#define STR_MOVING_AVERAGE_UNDO_NAME 65 -#define STR_REGRESSION 66 -#define STR_REGRESSION_UNDO_NAME 67 -#define STR_TTEST 68 -#define STR_TTEST_UNDO_NAME 69 -#define STR_FTEST 70 -#define STR_FTEST_UNDO_NAME 71 -#define STR_ZTEST 72 -#define STR_ZTEST_UNDO_NAME 73 -#define STR_CHI_SQUARE_TEST 74 - -#define STR_COLUMN_LABEL_TEMPLATE 100 -#define STR_ROW_LABEL_TEMPLATE 101 - -#define STR_ANOVA_SINGLE_FACTOR_LABEL 110 -#define STR_ANOVA_LABEL_GROUPS 111 -#define STR_ANOVA_LABEL_BETWEEN_GROUPS 112 -#define STR_ANOVA_LABEL_WITHIN_GROUPS 113 -#define STR_ANOVA_LABEL_SOURCE_OF_VARIATION 114 -#define STR_ANOVA_LABEL_SS 115 -#define STR_ANOVA_LABEL_DF 116 -#define STR_ANOVA_LABEL_MS 117 -#define STR_ANOVA_LABEL_F 118 -#define STR_ANOVA_LABEL_P_VALUE 119 -#define STR_ANOVA_LABEL_F_CRITICAL 120 -#define STR_ANOVA_LABEL_TOTAL 121 -#define STR_ANOVA_TWO_FACTOR_LABEL 122 - -#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_LABEL_LINEAR 160 -#define STR_LABEL_LOGARITHMIC 161 -#define STR_LABEL_POWER 162 - -#define STR_LABEL_REGRESSION_MODEL 170 -#define STR_LABEL_RSQUARED 171 -#define STR_LABEL_SLOPE 172 -#define STR_LABEL_INTERCEPT 173 - -#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 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 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 d807e4d..7942da2 100644 --- a/sc/source/ui/StatisticsDialogs/StatisticsDialogs.src +++ b/sc/source/ui/StatisticsDialogs/StatisticsDialogs.src @@ -8,475 +8,471 @@ * */ -#include "StatisticsDialogs.hrc" - -Resource RID_STATISTICS_DLGS -{ +#include "sc.hrc" - /* MovingAverageDialog */ +/* MovingAverageDialog */ - String STR_MOVING_AVERAGE_UNDO_NAME - { - Text [ en-US ] = "Moving Average"; - }; - - /* ExponentialSmoothingDialog */ - - String STR_EXPONENTIAL_SMOOTHING_UNDO_NAME - { - Text [ en-US ] = "Exponential Smoothing"; - }; +String STR_MOVING_AVERAGE_UNDO_NAME +{ + Text [ en-US ] = "Moving Average"; +}; + +/* ExponentialSmoothingDialog */ + +String STR_EXPONENTIAL_SMOOTHING_UNDO_NAME +{ + Text [ en-US ] = "Exponential Smoothing"; +}; + +/* AnalysisOfVarianceDialog */ + +String STR_ANALYSIS_OF_VARIANCE_UNDO_NAME +{ + Text [ en-US ] = "Analysis of Variance"; +}; + +String STR_ANOVA_SINGLE_FACTOR_LABEL +{ + Text [ en-US ] = "ANOVA - Single Factor"; +}; + +String STR_ANOVA_TWO_FACTOR_LABEL +{ + Text [ en-US ] = "ANOVA - Two Factor"; +}; + +String STR_ANOVA_LABEL_GROUPS +{ + Text [ en-US ] = "Groups"; +}; + +String STR_ANOVA_LABEL_BETWEEN_GROUPS +{ + Text [ en-US ] = "Between Groups"; +}; + +String STR_ANOVA_LABEL_WITHIN_GROUPS +{ + Text [ en-US ] = "Within Groups"; +}; + +String STR_ANOVA_LABEL_SOURCE_OF_VARIATION +{ + Text [ en-US ] = "Source of Variation"; +}; + +String STR_ANOVA_LABEL_SS +{ + Text [ en-US ] = "SS"; +}; - /* AnalysisOfVarianceDialog */ - - String STR_ANALYSIS_OF_VARIANCE_UNDO_NAME - { - Text [ en-US ] = "Analysis of Variance"; - }; - - String STR_ANOVA_SINGLE_FACTOR_LABEL - { - Text [ en-US ] = "ANOVA - Single Factor"; - }; - - String STR_ANOVA_TWO_FACTOR_LABEL - { - Text [ en-US ] = "ANOVA - Two Factor"; - }; - - String STR_ANOVA_LABEL_GROUPS - { - Text [ en-US ] = "Groups"; - }; - - String STR_ANOVA_LABEL_BETWEEN_GROUPS - { - Text [ en-US ] = "Between Groups"; - }; - - String STR_ANOVA_LABEL_WITHIN_GROUPS - { - Text [ en-US ] = "Within Groups"; - }; - - String STR_ANOVA_LABEL_SOURCE_OF_VARIATION - { - Text [ en-US ] = "Source of Variation"; - }; - - String STR_ANOVA_LABEL_SS - { - Text [ en-US ] = "SS"; - }; - - String STR_ANOVA_LABEL_DF - { - Text [ en-US ] = "df"; - }; - - String STR_ANOVA_LABEL_MS - { - Text [ en-US ] = "MS"; - }; - - String STR_ANOVA_LABEL_F - { - Text [ en-US ] = "F"; - }; - - String STR_ANOVA_LABEL_P_VALUE - { - Text [ en-US ] = "P-value"; - }; - - String STR_ANOVA_LABEL_F_CRITICAL - { - Text [ en-US ] = "F critical"; - }; - - String STR_ANOVA_LABEL_TOTAL - { - Text [ en-US ] = "Total"; - }; - - /* CorrelationDialog */ - - String STR_CORRELATION_UNDO_NAME - { - Text [ en-US ] = "Correlation"; - }; - - String STR_CORRELATION_LABEL - { - Text [ en-US ] = "Correlations"; - }; - - /* CovarianceDialog */ - - String STR_COVARIANCE_UNDO_NAME - { - Text [ en-US ] = "Covariance"; - }; - - String STR_COVARIANCE_LABEL - { - Text [ en-US ] = "Covariances"; - }; - - /* DescriptiveStatisticsDialog */ - - String STR_DESCRIPTIVE_STATISTICS_UNDO_NAME - { - Text [ en-US ] = "Descriptive Statistics"; - }; - String STRID_CALC_MEAN - { - Text [ en-US ] = "Mean"; - }; - String STRID_CALC_STD_ERROR - { - Text [ en-US ] = "Standard Error"; - }; - String STRID_CALC_MODE - { - Text [ en-US ] = "Mode"; - }; - String STRID_CALC_MEDIAN - { - Text [ en-US ] = "Median"; - }; - String STRID_CALC_VARIANCE - { - Text [ en-US ] = "Variance"; - }; - String STRID_CALC_STD_DEVIATION - { - Text [ en-US ] = "Standard Deviation"; - }; - String STRID_CALC_KURTOSIS - { - Text [ en-US ] = "Kurtosis"; - }; - String STRID_CALC_SKEWNESS - { - Text [ en-US ] = "Skewness"; - }; - String STRID_CALC_RANGE - { - Text [ en-US ] = "Range"; - }; - String STRID_CALC_MIN - { - Text [ en-US ] = "Minimum"; - }; - String STRID_CALC_MAX - { - Text [ en-US ] = "Maximum"; - }; - String STRID_CALC_SUM - { - Text [ en-US ] = "Sum"; - }; - String STRID_CALC_COUNT - { - Text [ en-US ] = "Count"; - }; - String STRID_CALC_FIRST_QUARTILE - { - Text [ en-US ] = "First Quartile "; - }; - String STRID_CALC_THIRD_QUARTILE - { - Text [ en-US ] = "Third Quartile"; - }; - - /* 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 ] = "Chi Squared"; - }; - 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"; - }; - - /* Names of dialogs */ - String STR_FTEST - { - Text [ en-US ] = "F-test"; - }; - String STR_FTEST_UNDO_NAME - { - Text [ en-US ] = "F-test"; - }; - String STR_TTEST - { - Text [ en-US ] = "t-test"; - }; - String STR_TTEST_UNDO_NAME - { - Text [ en-US ] = "t-test"; - }; - String STR_ZTEST - { - Text [ en-US ] = "z-test"; - }; - String STR_ZTEST_UNDO_NAME - { - Text [ en-US ] = "z-test"; - }; - String STR_CHI_SQUARE_TEST - { - Text [ en-US ] = "Test of Independence (Chi-Square)"; - }; - String STR_REGRESSION_UNDO_NAME - { - Text [ en-US ] = "Regression"; - }; - String STR_REGRESSION - { - Text [ en-US ] = "Regression"; - }; - - /* Common */ - String STR_COLUMN_LABEL_TEMPLATE - { - Text [ en-US ] = "Column %NUMBER%"; - }; - String STR_ROW_LABEL_TEMPLATE - { - Text [ en-US ] = "Row %NUMBER%"; - }; - String STR_LABEL_ALPHA - { - Text [ en-US ] = "Alpha"; - }; - String STR_VARIABLE_1_LABEL - { - Text [ en-US ] = "Variable 1"; - }; - String STR_VARIABLE_2_LABEL - { - Text [ en-US ] = "Variable 2"; - }; - String STR_HYPOTHESIZED_MEAN_DIFFERENCE_LABEL - { - Text [ en-US ] = "Hypothesized Mean Difference"; - }; - String STR_OBSERVATIONS_LABEL - { - Text [ en-US ] = "Observations"; - }; - String STR_OBSERVED_MEAN_DIFFERENCE_LABEL - { - 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"; - }; - - /* RegressionDialog */ - - String STR_LABEL_LINEAR - { - Text [ en-US ] = "Linear"; - }; - String STR_LABEL_LOGARITHMIC - { - Text [ en-US ] = "Logarithmic"; - }; - String STR_LABEL_POWER - { - Text [ en-US ] = "Power"; - }; - - String STR_LABEL_REGRESSION_MODEL - { - Text [ en-US ] = "Regression Model"; - }; - String STR_LABEL_RSQUARED - { - Text [ en-US ] = "R^2"; - }; - String STR_LABEL_SLOPE - { - Text [ en-US ] = "Slope"; - }; - String STR_LABEL_INTERCEPT - { - Text [ en-US ] = "Intercept"; - }; - - /*F Test */ - String STR_FTEST_P_RIGHT_TAIL - { - Text [ en-US ] = "P (F<=f) right-tail"; - }; - String STR_FTEST_F_CRITICAL_RIGHT_TAIL - { - Text [ en-US ] = "F Critical right-tail"; - }; - String STR_FTEST_P_LEFT_TAIL - { - Text [ en-US ] = "P (F<=f) left-tail"; - }; - String STR_FTEST_F_CRITICAL_LEFT_TAIL - { - Text [ en-US ] = "F Critical left-tail"; - }; - String STR_FTEST_P_TWO_TAIL - { - Text [ en-US ] = "P two-tail"; - }; - String STR_FTEST_F_CRITICAL_TWO_TAIL - { - Text [ en-US ] = "F Critical two-tail"; - }; - - /*t Test*/ - String STR_TTEST_PEARSON_CORRELATION - { - Text [ en-US ] = "Pearson Correlation"; - }; - String STR_TTEST_VARIANCE_OF_THE_DIFFERENCES - { - Text [ en-US ] = "Variance of the Differences"; - }; - String STR_TTEST_T_STAT - { - Text [ en-US ] = "t Stat"; - }; - String STR_TTEST_P_ONE_TAIL - { - Text [ en-US ] = "P (T<=t) one-tail"; - }; - String STR_TTEST_T_CRITICAL_ONE_TAIL - { - Text [ en-US ] = "t Critical one-tail"; - }; - String STR_TTEST_P_TWO_TAIL - { - Text [ en-US ] = "P (T<=t) two-tail"; - }; - String STR_TTEST_T_CRITICAL_TWO_TAIL - { - Text [ en-US ] = "t Critical two-tail"; - }; - - /*Z Test*/ - String STR_ZTEST_Z_VALUE - { - Text [ en-US ] = "z"; - }; - String STR_ZTEST_KNOWN_VARIANCE - { - Text [ en-US ] = "Known Variance"; - }; - String STR_ZTEST_P_ONE_TAIL - { - Text [ en-US ] = "P (Z<=z) one-tail"; - }; - String STR_ZTEST_Z_CRITICAL_ONE_TAIL - { - Text [ en-US ] = "z Critical one-tail"; - }; - String STR_ZTEST_P_TWO_TAIL - { - Text [ en-US ] = "P (Z<=z) two-tail"; - }; - String STR_ZTEST_Z_CRITICAL_TWO_TAIL - { - Text [ en-US ] = "z Critical two-tail"; - }; +String STR_ANOVA_LABEL_DF +{ + Text [ en-US ] = "df"; +}; + +String STR_ANOVA_LABEL_MS +{ + Text [ en-US ] = "MS"; +}; + +String STR_ANOVA_LABEL_F +{ + Text [ en-US ] = "F"; +}; + +String STR_ANOVA_LABEL_P_VALUE +{ + Text [ en-US ] = "P-value"; +}; + +String STR_ANOVA_LABEL_F_CRITICAL +{ + Text [ en-US ] = "F critical"; +}; + +String STR_ANOVA_LABEL_TOTAL +{ + Text [ en-US ] = "Total"; +}; + +/* CorrelationDialog */ + +String STR_CORRELATION_UNDO_NAME +{ + Text [ en-US ] = "Correlation"; +}; + +String STR_CORRELATION_LABEL +{ + Text [ en-US ] = "Correlations"; +}; + +/* CovarianceDialog */ + +String STR_COVARIANCE_UNDO_NAME +{ + Text [ en-US ] = "Covariance"; +}; + +String STR_COVARIANCE_LABEL +{ + Text [ en-US ] = "Covariances"; +}; + +/* DescriptiveStatisticsDialog */ + +String STR_DESCRIPTIVE_STATISTICS_UNDO_NAME +{ + Text [ en-US ] = "Descriptive Statistics"; +}; +String STRID_CALC_MEAN +{ + Text [ en-US ] = "Mean"; +}; +String STRID_CALC_STD_ERROR +{ + Text [ en-US ] = "Standard Error"; +}; +String STRID_CALC_MODE +{ + Text [ en-US ] = "Mode"; +}; +String STRID_CALC_MEDIAN +{ + Text [ en-US ] = "Median"; +}; +String STRID_CALC_VARIANCE +{ + Text [ en-US ] = "Variance"; +}; +String STRID_CALC_STD_DEVIATION +{ + Text [ en-US ] = "Standard Deviation"; +}; +String STRID_CALC_KURTOSIS +{ + Text [ en-US ] = "Kurtosis"; +}; +String STRID_CALC_SKEWNESS +{ + Text [ en-US ] = "Skewness"; +}; +String STRID_CALC_RANGE +{ + Text [ en-US ] = "Range"; +}; +String STRID_CALC_MIN +{ + Text [ en-US ] = "Minimum"; +}; +String STRID_CALC_MAX +{ + Text [ en-US ] = "Maximum"; +}; +String STRID_CALC_SUM +{ + Text [ en-US ] = "Sum"; +}; +String STRID_CALC_COUNT +{ + Text [ en-US ] = "Count"; +}; +String STRID_CALC_FIRST_QUARTILE +{ + Text [ en-US ] = "First Quartile "; +}; +String STRID_CALC_THIRD_QUARTILE +{ + Text [ en-US ] = "Third Quartile"; +}; + +/* 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 ] = "Chi Squared"; +}; +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"; +}; + +/* Names of dialogs */ +String STR_FTEST +{ + Text [ en-US ] = "F-test"; +}; +String STR_FTEST_UNDO_NAME +{ + Text [ en-US ] = "F-test"; +}; +String STR_TTEST +{ + Text [ en-US ] = "t-test"; +}; +String STR_TTEST_UNDO_NAME +{ + Text [ en-US ] = "t-test"; +}; +String STR_ZTEST +{ + Text [ en-US ] = "z-test"; +}; +String STR_ZTEST_UNDO_NAME +{ + Text [ en-US ] = "z-test"; +}; +String STR_CHI_SQUARE_TEST +{ + Text [ en-US ] = "Test of Independence (Chi-Square)"; +}; +String STR_REGRESSION_UNDO_NAME +{ + Text [ en-US ] = "Regression"; +}; +String STR_REGRESSION +{ + Text [ en-US ] = "Regression"; +}; + +/* Common */ +String STR_COLUMN_LABEL_TEMPLATE +{ + Text [ en-US ] = "Column %NUMBER%"; +}; +String STR_ROW_LABEL_TEMPLATE +{ + Text [ en-US ] = "Row %NUMBER%"; +}; +String STR_LABEL_ALPHA +{ + Text [ en-US ] = "Alpha"; +}; +String STR_VARIABLE_1_LABEL +{ + Text [ en-US ] = "Variable 1"; +}; +String STR_VARIABLE_2_LABEL +{ + Text [ en-US ] = "Variable 2"; +}; +String STR_HYPOTHESIZED_MEAN_DIFFERENCE_LABEL +{ + Text [ en-US ] = "Hypothesized Mean Difference"; +}; +String STR_OBSERVATIONS_LABEL +{ + Text [ en-US ] = "Observations"; +}; +String STR_OBSERVED_MEAN_DIFFERENCE_LABEL +{ + 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"; +}; + +/* RegressionDialog */ + +String STR_LABEL_LINEAR +{ + Text [ en-US ] = "Linear"; +}; +String STR_LABEL_LOGARITHMIC +{ + Text [ en-US ] = "Logarithmic"; +}; +String STR_LABEL_POWER +{ + Text [ en-US ] = "Power"; +}; + +String STR_LABEL_REGRESSION_MODEL +{ + Text [ en-US ] = "Regression Model"; +}; +String STR_LABEL_RSQUARED +{ + Text [ en-US ] = "R^2"; +}; +String STR_LABEL_SLOPE +{ + Text [ en-US ] = "Slope"; +}; +String STR_LABEL_INTERCEPT +{ + Text [ en-US ] = "Intercept"; +}; + +/*F Test */ +String STR_FTEST_P_RIGHT_TAIL +{ + Text [ en-US ] = "P (F<=f) right-tail"; +}; +String STR_FTEST_F_CRITICAL_RIGHT_TAIL +{ + Text [ en-US ] = "F Critical right-tail"; +}; +String STR_FTEST_P_LEFT_TAIL +{ + Text [ en-US ] = "P (F<=f) left-tail"; +}; +String STR_FTEST_F_CRITICAL_LEFT_TAIL +{ + Text [ en-US ] = "F Critical left-tail"; +}; +String STR_FTEST_P_TWO_TAIL +{ + Text [ en-US ] = "P two-tail"; +}; +String STR_FTEST_F_CRITICAL_TWO_TAIL +{ + Text [ en-US ] = "F Critical two-tail"; +}; + +/*t Test*/ +String STR_TTEST_PEARSON_CORRELATION +{ + Text [ en-US ] = "Pearson Correlation"; +}; +String STR_TTEST_VARIANCE_OF_THE_DIFFERENCES +{ + Text [ en-US ] = "Variance of the Differences"; +}; +String STR_TTEST_T_STAT +{ + Text [ en-US ] = "t Stat"; +}; +String STR_TTEST_P_ONE_TAIL +{ + Text [ en-US ] = "P (T<=t) one-tail"; +}; +String STR_TTEST_T_CRITICAL_ONE_TAIL +{ + Text [ en-US ] = "t Critical one-tail"; +}; +String STR_TTEST_P_TWO_TAIL +{ + Text [ en-US ] = "P (T<=t) two-tail"; +}; +String STR_TTEST_T_CRITICAL_TWO_TAIL +{ + Text [ en-US ] = "t Critical two-tail"; +}; + +/*Z Test*/ +String STR_ZTEST_Z_VALUE +{ + Text [ en-US ] = "z"; +}; +String STR_ZTEST_KNOWN_VARIANCE +{ + Text [ en-US ] = "Known Variance"; +}; +String STR_ZTEST_P_ONE_TAIL +{ + Text [ en-US ] = "P (Z<=z) one-tail"; +}; +String STR_ZTEST_Z_CRITICAL_ONE_TAIL +{ + Text [ en-US ] = "z Critical one-tail"; +}; +String STR_ZTEST_P_TWO_TAIL +{ + Text [ en-US ] = "P (Z<=z) two-tail"; +}; +String STR_ZTEST_Z_CRITICAL_TWO_TAIL +{ + Text [ en-US ] = "z Critical two-tail"; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx b/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx index 78bc143..0c361b8 100644 --- a/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx @@ -284,7 +284,7 @@ IMPL_LINK_NOARG( ScStatisticsInputOutputDialog, RefInputModifyHandler, Edit&, vo void ScStatisticsInputOutputDialog::CalculateInputAndWriteToOutput() { - OUString aUndo(SC_STRLOAD(RID_STATISTICS_DLGS, GetUndoNameId())); + OUString aUndo(SC_RESSTR(GetUndoNameId())); ScDocShell* pDocShell = mViewData->GetDocShell(); svl::IUndoManager* pUndoManager = pDocShell->GetUndoManager(); pUndoManager->EnterListAction( aUndo, aUndo, 0, mViewData->GetViewShell()->GetViewShellId() ); diff --git a/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx b/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx index d32effd..e0a00e1 100644 --- a/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx @@ -323,7 +323,7 @@ IMPL_LINK_NOARG( ScStatisticsTwoVariableDialog, RefInputModifyHandler, Edit&, vo void ScStatisticsTwoVariableDialog::CalculateInputAndWriteToOutput() { - OUString aUndo(SC_STRLOAD(RID_STATISTICS_DLGS, GetUndoNameId())); + OUString aUndo(SC_RESSTR(GetUndoNameId())); ScDocShell* pDocShell = mViewData->GetDocShell(); svl::IUndoManager* pUndoManager = pDocShell->GetUndoManager(); pUndoManager->EnterListAction( aUndo, aUndo, 0, mViewData->GetViewShell()->GetViewShellId() ); diff --git a/sc/source/ui/StatisticsDialogs/TTestDialog.cxx b/sc/source/ui/StatisticsDialogs/TTestDialog.cxx index 457cb67..870631f 100644 --- a/sc/source/ui/StatisticsDialogs/TTestDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/TTestDialog.cxx @@ -21,7 +21,6 @@ #include "reffact.hxx" #include "strload.hxx" #include "docfunc.hxx" -#include "StatisticsDialogs.hrc" #include "TableFillingAndNavigationTools.hxx" #include "TTestDialog.hxx" @@ -33,7 +32,7 @@ ScTTestDialog::ScTTestDialog( pSfxBindings, pChildWindow, pParent, pViewData, "TTestDialog", "modules/scalc/ui/ttestdialog.ui" ) { - SetText(SC_STRLOAD(RID_STATISTICS_DLGS, STR_TTEST)); + SetText(SC_RESSTR(STR_TTEST)); } ScTTestDialog::~ScTTestDialog() @@ -70,30 +69,30 @@ ScRange ScTTestDialog::ApplyOutput(ScDocShell* pDocShell) aTemplate.autoReplaceRange("%VARIABLE1_RANGE%", pVariable1Iterator->get()); aTemplate.autoReplaceRange("%VARIABLE2_RANGE%", pVariable2Iterator->get()); - aOutput.writeBoldString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_TTEST_UNDO_NAME)); + aOutput.writeBoldString(SC_RESSTR(STR_TTEST_UNDO_NAME)); aOutput.newLine(); // Alpha - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_LABEL_ALPHA)); + aOutput.writeString(SC_RESSTR(STR_LABEL_ALPHA)); aOutput.nextColumn(); aOutput.writeValue(0.05); aTemplate.autoReplaceAddress("%ALPHA%", aOutput.current()); aOutput.newLine(); // Hypothesized mean difference - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_HYPOTHESIZED_MEAN_DIFFERENCE_LABEL)); + aOutput.writeString(SC_RESSTR(STR_HYPOTHESIZED_MEAN_DIFFERENCE_LABEL)); aOutput.nextColumn(); aOutput.writeValue(0); aTemplate.autoReplaceAddress("%HYPOTHESIZED_MEAN_DIFFERENCE%", aOutput.current()); aOutput.newLine(); aOutput.nextColumn(); - aOutput.writeBoldString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_VARIABLE_1_LABEL)); + aOutput.writeBoldString(SC_RESSTR(STR_VARIABLE_1_LABEL)); aOutput.nextColumn(); - aOutput.writeBoldString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_VARIABLE_2_LABEL)); + aOutput.writeBoldString(SC_RESSTR(STR_VARIABLE_2_LABEL)); aOutput.newLine(); - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STRID_CALC_MEAN)); + aOutput.writeString(SC_RESSTR(STRID_CALC_MEAN)); aOutput.nextColumn(); aTemplate.setTemplate("=AVERAGE(%VARIABLE1_RANGE%)"); aOutput.writeFormula(aTemplate.getTemplate()); @@ -102,7 +101,7 @@ ScRange ScTTestDialog::ApplyOutput(ScDocShell* pDocShell) aOutput.writeFormula(aTemplate.getTemplate()); aOutput.newLine(); - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STRID_CALC_VARIANCE)); + aOutput.writeString(SC_RESSTR(STRID_CALC_VARIANCE)); aOutput.nextColumn(); aTemplate.setTemplate("=VAR(%VARIABLE1_RANGE%)"); aOutput.writeFormula(aTemplate.getTemplate()); @@ -112,7 +111,7 @@ ScRange ScTTestDialog::ApplyOutput(ScDocShell* pDocShell) aOutput.newLine(); // Observations - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_OBSERVATIONS_LABEL)); + aOutput.writeString(SC_RESSTR(STR_OBSERVATIONS_LABEL)); aOutput.nextColumn(); aTemplate.setTemplate("=COUNT(%VARIABLE1_RANGE%)"); aOutput.writeFormula(aTemplate.getTemplate()); @@ -122,14 +121,14 @@ ScRange ScTTestDialog::ApplyOutput(ScDocShell* pDocShell) aOutput.newLine(); // Pearson Correlation - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_TTEST_PEARSON_CORRELATION)); + aOutput.writeString(SC_RESSTR(STR_TTEST_PEARSON_CORRELATION)); aOutput.nextColumn(); aTemplate.setTemplate("=CORREL(%VARIABLE1_RANGE%;%VARIABLE2_RANGE%)"); aOutput.writeFormula(aTemplate.getTemplate()); aOutput.newLine(); // Observed mean difference - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_OBSERVED_MEAN_DIFFERENCE_LABEL)); + aOutput.writeString(SC_RESSTR(STR_OBSERVED_MEAN_DIFFERENCE_LABEL)); 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()); @@ -137,7 +136,7 @@ ScRange ScTTestDialog::ApplyOutput(ScDocShell* pDocShell) aOutput.newLine(); // Variance of the Differences - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_TTEST_VARIANCE_OF_THE_DIFFERENCES)); + aOutput.writeString(SC_RESSTR(STR_TTEST_VARIANCE_OF_THE_DIFFERENCES)); 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()); @@ -145,7 +144,7 @@ ScRange ScTTestDialog::ApplyOutput(ScDocShell* pDocShell) aOutput.newLine(); // df - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_ANOVA_LABEL_DF)); + aOutput.writeString(SC_RESSTR(STR_ANOVA_LABEL_DF)); aOutput.nextColumn(); aTemplate.setTemplate("=SUM(IF(ISNUMBER(%VARIABLE1_RANGE%); 1; 0) * IF(ISNUMBER(%VARIABLE2_RANGE%); 1; 0)) - 1"); aOutput.writeMatrixFormula(aTemplate.getTemplate()); @@ -153,7 +152,7 @@ ScRange ScTTestDialog::ApplyOutput(ScDocShell* pDocShell) aOutput.newLine(); // t stat - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_TTEST_T_STAT)); + aOutput.writeString(SC_RESSTR(STR_TTEST_T_STAT)); aOutput.nextColumn(); aTemplate.setTemplate("=(%OBSERVED_MEAN_DIFFERENCE% - %HYPOTHESIZED_MEAN_DIFFERENCE%) / (%VARIANCE_OF_DIFFERENCES% / ( %DEGREE_OF_FREEDOM% + 1)) ^ 0.5"); aOutput.writeFormula(aTemplate.getTemplate()); @@ -161,28 +160,28 @@ ScRange ScTTestDialog::ApplyOutput(ScDocShell* pDocShell) aOutput.newLine(); // P one-tail - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_TTEST_P_ONE_TAIL)); + aOutput.writeString(SC_RESSTR(STR_TTEST_P_ONE_TAIL)); aOutput.nextColumn(); aTemplate.setTemplate("=TDIST(ABS(%T_STAT%); %DEGREE_OF_FREEDOM%; 1)"); aOutput.writeFormula(aTemplate.getTemplate()); aOutput.newLine(); // T critical one-tail - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_TTEST_T_CRITICAL_ONE_TAIL)); + aOutput.writeString(SC_RESSTR(STR_TTEST_T_CRITICAL_ONE_TAIL)); aOutput.nextColumn(); aTemplate.setTemplate("=TINV(2*%ALPHA%; %DEGREE_OF_FREEDOM%)"); aOutput.writeFormula(aTemplate.getTemplate()); aOutput.newLine(); // P two-tail - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_TTEST_P_TWO_TAIL)); + aOutput.writeString(SC_RESSTR(STR_TTEST_P_TWO_TAIL)); aOutput.nextColumn(); aTemplate.setTemplate("=TDIST(ABS(%T_STAT%); %DEGREE_OF_FREEDOM%; 2)"); aOutput.writeFormula(aTemplate.getTemplate()); aOutput.newLine(); // T critical two-tail - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_TTEST_T_CRITICAL_TWO_TAIL)); + aOutput.writeString(SC_RESSTR(STR_TTEST_T_CRITICAL_TWO_TAIL)); aOutput.nextColumn(); aTemplate.setTemplate("=TINV(%ALPHA%; %DEGREE_OF_FREEDOM%)"); aOutput.writeFormula(aTemplate.getTemplate()); diff --git a/sc/source/ui/StatisticsDialogs/ZTestDialog.cxx b/sc/source/ui/StatisticsDialogs/ZTestDialog.cxx index 4be10af..a304bb9 100644 --- a/sc/source/ui/StatisticsDialogs/ZTestDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/ZTestDialog.cxx @@ -21,7 +21,6 @@ #include "reffact.hxx" #include "strload.hxx" #include "docfunc.hxx" -#include "StatisticsDialogs.hrc" #include "TableFillingAndNavigationTools.hxx" #include "ZTestDialog.hxx" @@ -33,7 +32,7 @@ ScZTestDialog::ScZTestDialog( pSfxBindings, pChildWindow, pParent, pViewData, "ZTestDialog", "modules/scalc/ui/ztestdialog.ui" ) { - SetText(SC_STRLOAD(RID_STATISTICS_DLGS, STR_ZTEST)); + SetText(SC_RESSTR(STR_ZTEST)); } ScZTestDialog::~ScZTestDialog() @@ -70,18 +69,18 @@ ScRange ScZTestDialog::ApplyOutput(ScDocShell* pDocShell) aTemplate.autoReplaceRange("%VARIABLE1_RANGE%", pVariable1Iterator->get()); aTemplate.autoReplaceRange("%VARIABLE2_RANGE%", pVariable2Iterator->get()); - aOutput.writeBoldString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_ZTEST)); + aOutput.writeBoldString(SC_RESSTR(STR_ZTEST)); aOutput.newLine(); // Alpha - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_LABEL_ALPHA)); + aOutput.writeString(SC_RESSTR(STR_LABEL_ALPHA)); aOutput.nextColumn(); aOutput.writeValue(0.05); aTemplate.autoReplaceAddress("%ALPHA%", aOutput.current()); aOutput.newLine(); // Hypothesized mean difference - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_HYPOTHESIZED_MEAN_DIFFERENCE_LABEL)); + aOutput.writeString(SC_RESSTR(STR_HYPOTHESIZED_MEAN_DIFFERENCE_LABEL)); aOutput.nextColumn(); aOutput.writeValue(0); aTemplate.autoReplaceAddress("%HYPOTHESIZED_MEAN_DIFFERENCE%", aOutput.current()); @@ -89,13 +88,13 @@ ScRange ScZTestDialog::ApplyOutput(ScDocShell* pDocShell) // Variable Label aOutput.nextColumn(); - aOutput.writeBoldString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_VARIABLE_1_LABEL)); + aOutput.writeBoldString(SC_RESSTR(STR_VARIABLE_1_LABEL)); aOutput.nextColumn(); - aOutput.writeBoldString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_VARIABLE_2_LABEL)); + aOutput.writeBoldString(SC_RESSTR(STR_VARIABLE_2_LABEL)); aOutput.newLine(); // Known Variance - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_ZTEST_KNOWN_VARIANCE)); + aOutput.writeString(SC_RESSTR(STR_ZTEST_KNOWN_VARIANCE)); aOutput.nextColumn(); aOutput.writeValue(0); aTemplate.autoReplaceAddress("%KNOWN_VARIANCE_VARIABLE1%", aOutput.current()); @@ -105,7 +104,7 @@ ScRange ScZTestDialog::ApplyOutput(ScDocShell* pDocShell) aOutput.newLine(); // Mean - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STRID_CALC_MEAN)); + aOutput.writeString(SC_RESSTR(STRID_CALC_MEAN)); aOutput.nextColumn(); aTemplate.setTemplate("=AVERAGE(%VARIABLE1_RANGE%)"); aTemplate.autoReplaceAddress("%MEAN_VARIABLE1%", aOutput.current()); @@ -117,7 +116,7 @@ ScRange ScZTestDialog::ApplyOutput(ScDocShell* pDocShell) aOutput.newLine(); // Observations - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_OBSERVATIONS_LABEL)); + aOutput.writeString(SC_RESSTR(STR_OBSERVATIONS_LABEL)); aOutput.nextColumn(); aTemplate.setTemplate("=COUNT(%VARIABLE1_RANGE%)"); aOutput.writeFormula(aTemplate.getTemplate()); @@ -129,7 +128,7 @@ ScRange ScZTestDialog::ApplyOutput(ScDocShell* pDocShell) aOutput.newLine(); // Observed mean difference - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_OBSERVED_MEAN_DIFFERENCE_LABEL)); + aOutput.writeString(SC_RESSTR(STR_OBSERVED_MEAN_DIFFERENCE_LABEL)); aOutput.nextColumn(); aTemplate.setTemplate("=%MEAN_VARIABLE1% - %MEAN_VARIABLE2%"); aOutput.writeMatrixFormula(aTemplate.getTemplate()); @@ -137,7 +136,7 @@ ScRange ScZTestDialog::ApplyOutput(ScDocShell* pDocShell) aOutput.newLine(); // z - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_ZTEST_Z_VALUE)); + aOutput.writeString(SC_RESSTR(STR_ZTEST_Z_VALUE)); 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()); @@ -145,28 +144,28 @@ ScRange ScZTestDialog::ApplyOutput(ScDocShell* pDocShell) aOutput.newLine(); // P one-tail - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_ZTEST_P_ONE_TAIL)); + aOutput.writeString(SC_RESSTR(STR_ZTEST_P_ONE_TAIL)); aOutput.nextColumn(); aTemplate.setTemplate("=1 - NORMSDIST(ABS(%Z_STAT%))"); aOutput.writeFormula(aTemplate.getTemplate()); aOutput.newLine(); // z critical one-tail - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_ZTEST_Z_CRITICAL_ONE_TAIL)); + aOutput.writeString(SC_RESSTR(STR_ZTEST_Z_CRITICAL_ONE_TAIL)); aOutput.nextColumn(); aTemplate.setTemplate("=-NORMSINV(%ALPHA%)"); aOutput.writeFormula(aTemplate.getTemplate()); aOutput.newLine(); // P two-tail - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_ZTEST_P_TWO_TAIL)); + aOutput.writeString(SC_RESSTR(STR_ZTEST_P_TWO_TAIL)); aOutput.nextColumn(); aTemplate.setTemplate("=2 * NORMSDIST(-ABS(%Z_STAT%))"); aOutput.writeFormula(aTemplate.getTemplate()); aOutput.newLine(); // z critical two-tail - aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_ZTEST_Z_CRITICAL_TWO_TAIL)); + aOutput.writeString(SC_RESSTR(STR_ZTEST_Z_CRITICAL_TWO_TAIL)); aOutput.nextColumn(); aTemplate.setTemplate("=-NORMSINV(%ALPHA%/2)"); aOutput.writeFormula(aTemplate.getTemplate()); commit 55e203a0c6c8c6f0c58025efd7c9079e27b438c9 Author: Caolán McNamara <[email protected]> Date: Fri Feb 10 12:27:07 2017 +0000 add --disable-pdfium Change-Id: I9137dc0030c3c752ffc0931721bf6b0013309d39 diff --git a/Makefile.fetch b/Makefile.fetch index 2544e9b..7dedf3b 100644 --- a/Makefile.fetch +++ b/Makefile.fetch @@ -195,7 +195,7 @@ $(WORKDIR)/download: $(BUILDDIR)/config_host.mk $(SRCDIR)/download.lst $(SRCDIR) $(call fetch_Optional,ORCUS,ORCUS_TARBALL) \ $(call fetch_Optional,OWNCLOUD_ANDROID_LIB,OWNCLOUD_ANDROID_LIB_TARBALL) \ $(call fetch_Optional,PAGEMAKER,PAGEMAKER_TARBALL) \ - PDFIUM_TARBALL \ + $(call fetch_Optional,PDFIUM,PDFIUM_TARBALL) \ $(call fetch_Optional,POPPLER,POPPLER_TARBALL) \ $(call fetch_Optional,POSTGRESQL,POSTGRESQL_TARBALL) \ $(call fetch_Optional,PYTHON,PYTHON_TARBALL) \ diff --git a/config_host.mk.in b/config_host.mk.in index c0caf0c..02151ae 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -158,6 +158,7 @@ export ENABLE_OPENGL_TRANSITIONS=@ENABLE_OPENGL_TRANSITIONS@ export ENABLE_OPENGL_CANVAS=@ENABLE_OPENGL_CANVAS@ export ENABLE_PCH=@ENABLE_PCH@ export ENABLE_PDFIMPORT=@ENABLE_PDFIMPORT@ +export ENABLE_PDFIUM=@ENABLE_PDFIUM@ export ENABLE_RANDR=@ENABLE_RANDR@ export ENABLE_RELEASE_BUILD=@ENABLE_RELEASE_BUILD@ export ENABLE_REPORTBUILDER=@ENABLE_REPORTBUILDER@ diff --git a/configure.ac b/configure.ac index 5f23f29..58ece8a 100644 --- a/configure.ac +++ b/configure.ac @@ -1033,6 +1033,11 @@ libo_FUZZ_ARG_ENABLE(pdfimport, [Disable building the PDF import feature.]) ) +libo_FUZZ_ARG_ENABLE(pdfium, + AS_HELP_STRING([--disable-pdfium], + [Disable building PDFium.]) +) + ############################################################################### dnl ---------- *** ---------- @@ -10634,6 +10639,18 @@ AC_SUBST(SYSTEM_POPPLER) AC_SUBST(POPPLER_CFLAGS) AC_SUBST(POPPLER_LIBS) +# pdf import? +AC_MSG_CHECKING([whether to build PDFium]) +ENABLE_PDFIUM= +if test -z "$enable_pdfium" -o "$enable_pdfium" = yes; then + AC_MSG_RESULT([yes]) + ENABLE_PDFIUM=TRUE + BUILD_TYPE="$BUILD_TYPE PDFIUM" +else + AC_MSG_RESULT([no]) +fi +AC_SUBST(ENABLE_PDFIUM) + SYSTEM_GPGME= if test "$_os" = "Linux"; then dnl =================================================================== diff --git a/distro-configs/LibreOfficeCoverity.conf b/distro-configs/LibreOfficeCoverity.conf index e1a1d24..a20b3cc 100644 --- a/distro-configs/LibreOfficeCoverity.conf +++ b/distro-configs/LibreOfficeCoverity.conf @@ -3,6 +3,7 @@ --enable-gio --without-myspell-dicts --disable-ccache +--disable-pdfium --disable-gstreamer-0-10 --enable-gstreamer-1-0 --enable-option-checking=fatal diff --git a/distro-configs/LibreOfficeOssFuzz.conf b/distro-configs/LibreOfficeOssFuzz.conf index a58a862..9476647 100644 --- a/distro-configs/LibreOfficeOssFuzz.conf +++ b/distro-configs/LibreOfficeOssFuzz.conf @@ -8,6 +8,7 @@ --disable-gui --disable-gtk --disable-gtk3 +--disable-pdfium --disable-postgresql-sdbc --disable-firebird-sdbc --disable-coinmp diff --git a/external/Module_external.mk b/external/Module_external.mk index 44b24d7..52950c2 100644 --- a/external/Module_external.mk +++ b/external/Module_external.mk @@ -88,7 +88,7 @@ $(eval $(call gb_Module_add_moduledirs,external,\ $(call gb_Helper_optional,ORCUS,liborcus) \ $(call gb_Helper_optional,OWNCLOUD_ANDROID_LIB,owncloud-android-lib) \ $(call gb_Helper_optional,PAGEMAKER,libpagemaker) \ - pdfium \ + $(call gb_Helper_optional,PDFIUM,pdfium) \ $(call gb_Helper_optional,POPPLER,poppler) \ $(call gb_Helper_optional,POSTGRESQL,postgresql) \ $(call gb_Helper_optional,PYTHON,$(if $(filter $(PYTHON_VERSION_MINOR),3),python33,python3)) \ diff --git a/xmlsecurity/Module_xmlsecurity.mk b/xmlsecurity/Module_xmlsecurity.mk index b14729f..4fca006 100644 --- a/xmlsecurity/Module_xmlsecurity.mk +++ b/xmlsecurity/Module_xmlsecurity.mk @@ -40,12 +40,14 @@ $(eval $(call gb_Module_add_screenshot_targets,xmlsecurity,\ )) ifneq (,$(filter DESKTOP,$(BUILD_TYPE))) +ifeq ($(ENABLE_PDFIUM),TRUE) $(eval $(call gb_Module_add_targets,xmlsecurity,\ Executable_pdfverify \ )) endif +endif endif commit 9960002118fda6515c6985bc2908a69c0568a71d Author: Caolán McNamara <[email protected]> Date: Fri Feb 10 11:36:22 2017 +0000 coverity#1079165 Uninitialized scalar variable Change-Id: I49284d409bbe678e1e018c9d9502d79db5553faa diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 9a09603..4cfbca2 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -3055,8 +3055,8 @@ sal_Int32 PDFWriterImpl::createToUnicodeCMap( sal_uInt8* pEncoding, sal_Int32* pEncToUnicodeIndex, int nGlyphs ) { - int nMapped = 0, n = 0; - for( n = 0; n < nGlyphs; n++ ) + int nMapped = 0; + for (int n = 0; n < nGlyphs; ++n) if( pUnicodes[pEncToUnicodeIndex[n]] && pUnicodesPerGlyph[n] ) nMapped++; @@ -3083,7 +3083,7 @@ sal_Int32 PDFWriterImpl::createToUnicodeCMap( sal_uInt8* pEncoding, "endcodespacerange\n" ); int nCount = 0; - for( n = 0; n < nGlyphs; n++ ) + for (int n = 0; n < nGlyphs; ++n) { if( pUnicodes[pEncToUnicodeIndex[n]] && pUnicodesPerGlyph[n] ) { @@ -8509,8 +8509,9 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool sal_uInt8 pMappedGlyphs[nMaxGlyphs]; sal_Int32 pMappedFontObjects[nMaxGlyphs]; std::vector<sal_Ucs> aUnicodes; - aUnicodes.reserve( nMaxGlyphs ); - sal_Int32 pUnicodesPerGlyph[nMaxGlyphs]; + aUnicodes.reserve(nMaxGlyphs); + std::vector<sal_Int32> aUnicodesPerGlyph; + aUnicodes.reserve(nMaxGlyphs); bool bVertical = m_aCurrentPDFState.m_aFont.IsVertical(); int nGlyphs; int nIndex = 0; @@ -8644,7 +8645,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool for( int i = 0; i < nGlyphs; i++ ) { // default case: 1 glyph is one unicode - pUnicodesPerGlyph[i] = 1; + aUnicodesPerGlyph.push_back(1); if (pGlyphs[i]->mnCharPos >= nMinCharPos && pGlyphs[i]->mnCharPos <= nMaxCharPos) { int nChars = 1; @@ -8662,7 +8663,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool } else if (nChars == 0) nChars = 1; - pUnicodesPerGlyph[i] = nChars; + aUnicodesPerGlyph.back() = nChars; for( int n = 0; n < nChars; n++ ) aUnicodes.push_back( rText[ start + n ] ); } @@ -8677,7 +8678,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool // mapping is possible } - registerGlyphs( nGlyphs, pGlyphs, pGlyphWidths, aUnicodes.data(), pUnicodesPerGlyph, pMappedGlyphs, pMappedFontObjects, pFallbackFonts ); + registerGlyphs( nGlyphs, pGlyphs, pGlyphWidths, aUnicodes.data(), aUnicodesPerGlyph.data(), pMappedGlyphs, pMappedFontObjects, pFallbackFonts ); for( int i = 0; i < nGlyphs; i++ ) { commit 9050cc641a7449e270a26bcaeae4f75d4b862d3f Author: Caolán McNamara <[email protected]> Date: Fri Feb 10 11:32:34 2017 +0000 pUnicodesPerGlyph[i] is already 1 here Change-Id: Ib47e850d8ade769cad11f53b7eb3d7cab0337feb diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 5c3aede..9a09603 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -8648,7 +8648,6 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool if (pGlyphs[i]->mnCharPos >= nMinCharPos && pGlyphs[i]->mnCharPos <= nMaxCharPos) { int nChars = 1; - pUnicodesPerGlyph[i] = 1; // try to handle ligatures and such if( i < nGlyphs-1 ) { commit 775bf0c7d973226cad13c0e54ad384ae4e905041 Author: Caolán McNamara <[email protected]> Date: Fri Feb 10 11:23:51 2017 +0000 test coverity sanitizing in-source modelling Change-Id: I31b1f021c414b26372c07a28c235bedb3e5a2b32 diff --git a/registry/source/reflread.cxx b/registry/source/reflread.cxx index 97699af..d54a309 100644 --- a/registry/source/reflread.cxx +++ b/registry/source/reflread.cxx @@ -1020,6 +1020,10 @@ RTParamMode MethodList::getMethodParamMode(sal_uInt16 index, sal_uInt16 paramInd return aMode; } +#if defined(__COVERITY__) +extern "C" void __coverity_tainted_data_sanitize__(void *); +#endif + sal_uInt16 MethodList::getMethodExcCount(sal_uInt16 index) { sal_uInt16 aCount = 0; @@ -1028,6 +1032,9 @@ sal_uInt16 MethodList::getMethodExcCount(sal_uInt16 index) { try { aCount = readUINT16(m_pIndex[index] + calcMethodParamIndex(readUINT16(m_pIndex[index] + METHOD_OFFSET_PARAM_COUNT))); +#if defined(__COVERITY__) + __coverity_tainted_data_sanitize__(&aCount); +#endif } catch (BlopObject::BoundsError &) { SAL_WARN("registry", "bad data"); } diff --git a/unoidl/source/unoidlprovider.cxx b/unoidl/source/unoidlprovider.cxx index ea15ff5..47e59bf 100644 --- a/unoidl/source/unoidlprovider.cxx +++ b/unoidl/source/unoidlprovider.cxx @@ -531,6 +531,10 @@ sal_uInt32 findInMap( return off; } +#if defined(__COVERITY__) +extern "C" void __coverity_tainted_data_sanitize__(void *); +#endif + std::vector< OUString > readAnnotations( bool annotated, rtl::Reference< MappedFile > const & file, sal_uInt32 offset, sal_uInt32 * newOffset = nullptr) @@ -538,6 +542,9 @@ std::vector< OUString > readAnnotations( std::vector< OUString > ans; if (annotated) { sal_uInt32 n = file->read32(offset); +#if defined(__COVERITY__) + __coverity_tainted_data_sanitize__(&n); +#endif offset += 4; for (sal_uInt32 i = 0; i != n; ++i) { ans.push_back(file->readIdxString(&offset));
_______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
