[Libreoffice-commits] core.git: sc/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Thu Nov 14 15:20:13 UTC 2019
sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx | 6 ++---
sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx | 4 +--
sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx | 4 +--
sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx | 4 +--
sc/source/ui/StatisticsDialogs/FourierAnalysisDialog.cxx | 8 +++---
sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx | 4 +--
sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx | 6 ++---
sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx | 12 +++++-----
sc/source/ui/inc/StatisticsInputOutputDialog.hxx | 2 -
9 files changed, 25 insertions(+), 25 deletions(-)
New commits:
commit 6d1c34b3698c0fff6125205494e71d32d11a4dbd
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Nov 14 11:59:34 2019 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Nov 14 16:18:24 2019 +0100
mDocument is assumed to be non-null
Change-Id: I53cf6625a24fe0b79914736f271ed3577af2e6e5
Reviewed-on: https://gerrit.libreoffice.org/82680
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
index 0c4aaa7b3d70..bdb4c51f350f 100644
--- a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
@@ -286,7 +286,7 @@ void ScAnalysisOfVarianceDialog::AnovaSingleFactor(AddressWalkerWriter& output,
output.nextColumn();
// Sum of Squares
- OUString aSSPart = lclCreateMultiParameterFormula(aRangeList, "DEVSQ(%RANGE%)", strWildcardRange, mDocument, mAddressDetails);
+ OUString aSSPart = lclCreateMultiParameterFormula(aRangeList, "DEVSQ(%RANGE%)", strWildcardRange, &mDocument, mAddressDetails);
aTemplate.setTemplate("=SUM(%RANGE%)");
aTemplate.applyString(strWildcardRange, aSSPart);
aTemplate.autoReplaceAddress("%WITHIN_SS%", output.current());
@@ -539,9 +539,9 @@ void ScAnalysisOfVarianceDialog::AnovaTwoFactor(AddressWalkerWriter& output, For
ScRange ScAnalysisOfVarianceDialog::ApplyOutput(ScDocShell* pDocShell)
{
- AddressWalkerWriter output(mOutputAddress, pDocShell, mDocument,
+ AddressWalkerWriter output(mOutputAddress, pDocShell, &mDocument,
formula::FormulaGrammar::mergeToGrammar(formula::FormulaGrammar::GRAM_ENGLISH, mAddressDetails.eConv));
- FormulaTemplate aTemplate(mDocument);
+ FormulaTemplate aTemplate(&mDocument);
if (meFactor == SINGLE_FACTOR)
{
diff --git a/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx b/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx
index 0d5a4faabf98..e2de2db8246d 100644
--- a/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx
@@ -39,9 +39,9 @@ const char* ScChiSquareTestDialog::GetUndoNameId()
ScRange ScChiSquareTestDialog::ApplyOutput(ScDocShell* pDocShell)
{
- AddressWalkerWriter aOutput(mOutputAddress, pDocShell, mDocument,
+ AddressWalkerWriter aOutput(mOutputAddress, pDocShell, &mDocument,
formula::FormulaGrammar::mergeToGrammar( formula::FormulaGrammar::GRAM_ENGLISH, mAddressDetails.eConv));
- FormulaTemplate aTemplate(mDocument);
+ FormulaTemplate aTemplate(&mDocument);
aTemplate.autoReplaceRange("%RANGE%", mInputRange);
diff --git a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
index 99798b0c73d5..434271d0a3ca 100644
--- a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
@@ -70,9 +70,9 @@ const char* ScDescriptiveStatisticsDialog::GetUndoNameId()
ScRange ScDescriptiveStatisticsDialog::ApplyOutput(ScDocShell* pDocShell)
{
- AddressWalkerWriter aOutput(mOutputAddress, pDocShell, mDocument,
+ AddressWalkerWriter aOutput(mOutputAddress, pDocShell, &mDocument,
formula::FormulaGrammar::mergeToGrammar( formula::FormulaGrammar::GRAM_ENGLISH, mAddressDetails.eConv));
- FormulaTemplate aTemplate(mDocument);
+ FormulaTemplate aTemplate(&mDocument);
std::unique_ptr<DataRangeIterator> pIterator;
if (mGroupedBy == BY_COLUMN)
diff --git a/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx b/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx
index 3057f85d587b..8e87c11fb80f 100644
--- a/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx
@@ -43,9 +43,9 @@ const char* ScExponentialSmoothingDialog::GetUndoNameId()
ScRange ScExponentialSmoothingDialog::ApplyOutput(ScDocShell* pDocShell)
{
- AddressWalkerWriter output(mOutputAddress, pDocShell, mDocument,
+ AddressWalkerWriter output(mOutputAddress, pDocShell, &mDocument,
formula::FormulaGrammar::mergeToGrammar( formula::FormulaGrammar::GRAM_ENGLISH, mAddressDetails.eConv));
- FormulaTemplate aTemplate(mDocument);
+ FormulaTemplate aTemplate(&mDocument);
// Smoothing factor
double aSmoothingFactor = mxSmoothingFactor->get_value() / 100.0;
diff --git a/sc/source/ui/StatisticsDialogs/FourierAnalysisDialog.cxx b/sc/source/ui/StatisticsDialogs/FourierAnalysisDialog.cxx
index b32ae3a9ce42..635b83804226 100644
--- a/sc/source/ui/StatisticsDialogs/FourierAnalysisDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/FourierAnalysisDialog.cxx
@@ -63,10 +63,10 @@ const char* ScFourierAnalysisDialog::GetUndoNameId() { return STR_FOURIER_ANALYS
ScRange ScFourierAnalysisDialog::ApplyOutput(ScDocShell* pDocShell)
{
getOptions();
- AddressWalkerWriter aOutput(mOutputAddress, pDocShell, mDocument,
+ AddressWalkerWriter aOutput(mOutputAddress, pDocShell, &mDocument,
formula::FormulaGrammar::mergeToGrammar(
formula::FormulaGrammar::GRAM_ENGLISH, mAddressDetails.eConv));
- FormulaTemplate aTemplate(mDocument);
+ FormulaTemplate aTemplate(&mDocument);
aTemplate.autoReplaceUses3D(mbUse3DAddresses);
aOutput.writeBoldString(mbInverse ? ScResId(STR_INVERSE_FOURIER_TRANSFORM)
@@ -204,14 +204,14 @@ void ScFourierAnalysisDialog::getDataLabel(OUString& rLabel)
rLabel = "="
+ maLabelAddr.Format(mbUse3DAddresses ? ScRefFlags::ADDR_ABS_3D
: ScRefFlags::ADDR_ABS,
- mDocument, mAddressDetails);
+ &mDocument, mAddressDetails);
return;
}
OUString aDataSrc(
mInputRange.Format(mbUse3DAddresses ? ScRefFlags::RANGE_ABS_3D : ScRefFlags::RANGE_ABS,
- mDocument, mAddressDetails));
+ &mDocument, mAddressDetails));
rLabel = ScResId(STR_INPUT_DATA_RANGE) + " : " + aDataSrc;
return;
diff --git a/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx b/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx
index 6a371033b4a3..bb8e43efeded 100644
--- a/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx
+++ b/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx
@@ -57,9 +57,9 @@ const char* ScMatrixComparisonGenerator::GetUndoNameId()
ScRange ScMatrixComparisonGenerator::ApplyOutput(ScDocShell* pDocShell)
{
- AddressWalkerWriter output(mOutputAddress, pDocShell, mDocument,
+ AddressWalkerWriter output(mOutputAddress, pDocShell, &mDocument,
formula::FormulaGrammar::mergeToGrammar( formula::FormulaGrammar::GRAM_ENGLISH, mAddressDetails.eConv));
- FormulaTemplate aTemplate(mDocument);
+ FormulaTemplate aTemplate(&mDocument);
SCTAB inTab = mInputRange.aStart.Tab();
diff --git a/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx b/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx
index 4d59e28336c7..07e104f39328 100644
--- a/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx
@@ -44,12 +44,12 @@ const char* ScMovingAverageDialog::GetUndoNameId()
ScRange ScMovingAverageDialog::ApplyOutput(ScDocShell* pDocShell)
{
- AddressWalkerWriter output(mOutputAddress, pDocShell, mDocument,
+ AddressWalkerWriter output(mOutputAddress, pDocShell, &mDocument,
formula::FormulaGrammar::mergeToGrammar( formula::FormulaGrammar::GRAM_ENGLISH, mAddressDetails.eConv));
- FormulaTemplate aTemplate(mDocument);
+ FormulaTemplate aTemplate(&mDocument);
if (mxTrimRangeCheck->get_active())
- mDocument->GetDataAreaSubrange(mInputRange);
+ mDocument.GetDataAreaSubrange(mInputRange);
std::unique_ptr<DataRangeIterator> pIterator;
if (mGroupedBy == BY_COLUMN)
diff --git a/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx b/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx
index 36558845a8ae..afe85effa5a2 100644
--- a/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx
@@ -59,9 +59,9 @@ ScStatisticsInputOutputDialog::ScStatisticsInputOutputDialog(
, mxGroupByColumnsRadio(m_xBuilder->weld_radio_button("groupedby-columns-radio"))
, mxGroupByRowsRadio(m_xBuilder->weld_radio_button("groupedby-rows-radio"))
, mViewData(pViewData)
- , mDocument(pViewData->GetDocument())
+ , mDocument(*pViewData->GetDocument())
, mInputRange(ScAddress::INITIALIZE_INVALID)
- , mAddressDetails(mDocument->GetAddressConvention(), 0, 0)
+ , mAddressDetails(mDocument.GetAddressConvention(), 0, 0)
, mOutputAddress(ScAddress::INITIALIZE_INVALID)
, mGroupedBy(BY_COLUMN)
, mxButtonOk(m_xBuilder->weld_button("ok"))
@@ -118,7 +118,7 @@ void ScStatisticsInputOutputDialog::Init()
void ScStatisticsInputOutputDialog::GetRangeFromSelection()
{
mViewData->GetSimpleArea(mInputRange);
- OUString aCurrentString(mInputRange.Format(ScRefFlags::RANGE_ABS_3D, mDocument, mAddressDetails));
+ OUString aCurrentString(mInputRange.Format(ScRefFlags::RANGE_ABS_3D, &mDocument, mAddressDetails));
mxInputRangeEdit->SetText(aCurrentString);
}
@@ -226,7 +226,7 @@ IMPL_LINK_NOARG( ScStatisticsInputOutputDialog, RefInputModifyHandler, formula::
if (mpActiveEdit == mxInputRangeEdit.get())
{
ScRangeList aRangeList;
- bool bValid = ParseWithNames( aRangeList, mxInputRangeEdit->GetText(), mDocument);
+ bool bValid = ParseWithNames( aRangeList, mxInputRangeEdit->GetText(), &mDocument);
const ScRange* pRange = (bValid && aRangeList.size() == 1) ? &aRangeList[0] : nullptr;
if (pRange)
{
@@ -242,7 +242,7 @@ IMPL_LINK_NOARG( ScStatisticsInputOutputDialog, RefInputModifyHandler, formula::
else if (mpActiveEdit == mxOutputRangeEdit.get())
{
ScRangeList aRangeList;
- bool bValid = ParseWithNames( aRangeList, mxOutputRangeEdit->GetText(), mDocument);
+ bool bValid = ParseWithNames( aRangeList, mxOutputRangeEdit->GetText(), &mDocument);
const ScRange* pRange = (bValid && aRangeList.size() == 1) ? &aRangeList[0] : nullptr;
if (pRange)
{
@@ -254,7 +254,7 @@ IMPL_LINK_NOARG( ScStatisticsInputOutputDialog, RefInputModifyHandler, formula::
ScRefFlags nFormat = ( mOutputAddress.Tab() == mCurrentAddress.Tab() ) ?
ScRefFlags::ADDR_ABS :
ScRefFlags::ADDR_ABS_3D;
- OUString aReferenceString = mOutputAddress.Format(nFormat, mDocument, mDocument->GetAddressConvention());
+ OUString aReferenceString = mOutputAddress.Format(nFormat, &mDocument, mDocument.GetAddressConvention());
mxOutputRangeEdit->SetRefString( aReferenceString );
}
diff --git a/sc/source/ui/inc/StatisticsInputOutputDialog.hxx b/sc/source/ui/inc/StatisticsInputOutputDialog.hxx
index 8bdc1fa9e019..5640dfaa5222 100644
--- a/sc/source/ui/inc/StatisticsInputOutputDialog.hxx
+++ b/sc/source/ui/inc/StatisticsInputOutputDialog.hxx
@@ -56,7 +56,7 @@ protected:
// Data
ScViewData* const mViewData;
- ScDocument* const mDocument;
+ ScDocument& mDocument;
ScRange mInputRange;
ScAddress::Details const mAddressDetails;
More information about the Libreoffice-commits
mailing list