diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-11-14 12:49:07 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-11-14 21:23:40 +0100 |
commit | 2c354558454e66c158c71164eaf56ad18433291c (patch) | |
tree | 8ae44aca42435daa86ebf67c1ed0c4366a2a3dbd /sc/source/ui/StatisticsDialogs | |
parent | 7cb1599411c309a8544c8e86845593026a773f32 (diff) |
cid#1455325 establish that pDoc cannot be null there
Change-Id: Ia7bca1e74a8ede90e29ec6cbd63c7fdcaf25b072
Reviewed-on: https://gerrit.libreoffice.org/82696
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/ui/StatisticsDialogs')
7 files changed, 19 insertions, 19 deletions
diff --git a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx index bdb4c51f350f..f508b0217b60 100644 --- a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx @@ -52,13 +52,13 @@ static const char strWildcardRange[] = "%RANGE%"; OUString lclCreateMultiParameterFormula( ScRangeList& aRangeList, const OUString& aFormulaTemplate, - const OUString& aWildcard, const ScDocument* pDocument, + const OUString& aWildcard, const ScDocument& rDocument, const ScAddress::Details& aAddressDetails) { OUStringBuffer aResult; for (size_t i = 0; i < aRangeList.size(); i++) { - OUString aRangeString(aRangeList[i].Format(ScRefFlags::RANGE_ABS_3D, pDocument, aAddressDetails)); + OUString aRangeString(aRangeList[i].Format(rDocument, ScRefFlags::RANGE_ABS_3D, aAddressDetails)); OUString aFormulaString = aFormulaTemplate.replaceAll(aWildcard, aRangeString); aResult.append(aFormulaString); if(i != aRangeList.size() - 1) // Not Last @@ -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()); diff --git a/sc/source/ui/StatisticsDialogs/FourierAnalysisDialog.cxx b/sc/source/ui/StatisticsDialogs/FourierAnalysisDialog.cxx index 635b83804226..70116e059077 100644 --- a/sc/source/ui/StatisticsDialogs/FourierAnalysisDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/FourierAnalysisDialog.cxx @@ -209,9 +209,9 @@ void ScFourierAnalysisDialog::getDataLabel(OUString& rLabel) return; } - OUString aDataSrc( - mInputRange.Format(mbUse3DAddresses ? ScRefFlags::RANGE_ABS_3D : ScRefFlags::RANGE_ABS, - &mDocument, mAddressDetails)); + OUString aDataSrc(mInputRange.Format( + mDocument, mbUse3DAddresses ? ScRefFlags::RANGE_ABS_3D : ScRefFlags::RANGE_ABS, + mAddressDetails)); rLabel = ScResId(STR_INPUT_DATA_RANGE) + " : " + aDataSrc; return; diff --git a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx index 9a7673450570..c4f358c5e7d0 100644 --- a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx @@ -106,7 +106,7 @@ void ScRandomNumberGeneratorDialog::Init() void ScRandomNumberGeneratorDialog::GetRangeFromSelection() { mpViewData->GetSimpleArea(maInputRange); - OUString aCurrentString(maInputRange.Format(ScRefFlags::RANGE_ABS_3D, &mrDoc, mrDoc.GetAddressConvention())); + OUString aCurrentString(maInputRange.Format(mrDoc, ScRefFlags::RANGE_ABS_3D, mrDoc.GetAddressConvention())); mxInputRangeEdit->SetText( aCurrentString ); } @@ -139,7 +139,7 @@ void ScRandomNumberGeneratorDialog::SetReference( const ScRange& rReferenceRange maInputRange = rReferenceRange; - OUString aReferenceString(maInputRange.Format(ScRefFlags::RANGE_ABS_3D, &rDoc, rDoc.GetAddressConvention())); + OUString aReferenceString(maInputRange.Format(rDoc, ScRefFlags::RANGE_ABS_3D, rDoc.GetAddressConvention())); mxInputRangeEdit->SetRefString( aReferenceString ); mxButtonApply->set_sensitive(true); diff --git a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx index 7600ec78830c..62a93829c707 100644 --- a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx @@ -102,7 +102,7 @@ void ScSamplingDialog::Init() void ScSamplingDialog::GetRangeFromSelection() { mViewData->GetSimpleArea(mInputRange); - OUString aCurrentString(mInputRange.Format(ScRefFlags::RANGE_ABS_3D, &mDocument, mAddressDetails)); + OUString aCurrentString(mInputRange.Format(mDocument, ScRefFlags::RANGE_ABS_3D, mAddressDetails)); mxInputRangeEdit->SetText(aCurrentString); } @@ -138,7 +138,7 @@ void ScSamplingDialog::SetReference( const ScRange& rReferenceRange, ScDocument& if ( mpActiveEdit == mxInputRangeEdit.get() ) { mInputRange = rReferenceRange; - aReferenceString = mInputRange.Format(ScRefFlags::RANGE_ABS_3D, &rDocument, mAddressDetails); + aReferenceString = mInputRange.Format(rDocument, ScRefFlags::RANGE_ABS_3D, mAddressDetails); mxInputRangeEdit->SetRefString( aReferenceString ); LimitSampleSizeAndPeriod(); diff --git a/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx b/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx index fcb9666678da..959d7ee2dee3 100644 --- a/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx @@ -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(mDocument, ScRefFlags::RANGE_ABS_3D, mAddressDetails)); mxInputRangeEdit->SetText(aCurrentString); } @@ -149,7 +149,7 @@ void ScStatisticsInputOutputDialog::SetReference( const ScRange& rReferenceRange if (mpActiveEdit == mxInputRangeEdit.get()) { mInputRange = rReferenceRange; - aReferenceString = mInputRange.Format(ScRefFlags::RANGE_ABS_3D, &rDocument, mAddressDetails); + aReferenceString = mInputRange.Format(rDocument, ScRefFlags::RANGE_ABS_3D, mAddressDetails); mxInputRangeEdit->SetRefString( aReferenceString ); } else if (mpActiveEdit == mxOutputRangeEdit.get()) diff --git a/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx b/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx index fb0b34d6be4f..ab2b3c7fbd62 100644 --- a/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx @@ -112,18 +112,18 @@ void ScStatisticsTwoVariableDialog::GetRangeFromSelection() { mVariable1Range = aCurrentRange; mVariable1Range.aEnd.SetCol(mVariable1Range.aStart.Col()); - aCurrentString = mVariable1Range.Format(ScRefFlags::RANGE_ABS_3D, &mDocument, mAddressDetails); + aCurrentString = mVariable1Range.Format(mDocument, ScRefFlags::RANGE_ABS_3D, mAddressDetails); mxVariable1RangeEdit->SetText(aCurrentString); mVariable2Range = aCurrentRange; mVariable2Range.aStart.SetCol(mVariable2Range.aEnd.Col()); - aCurrentString = mVariable2Range.Format(ScRefFlags::RANGE_ABS_3D, &mDocument, mAddressDetails); + aCurrentString = mVariable2Range.Format(mDocument, ScRefFlags::RANGE_ABS_3D, mAddressDetails); mxVariable2RangeEdit->SetText(aCurrentString); } else { mVariable1Range = aCurrentRange; - aCurrentString = mVariable1Range.Format(ScRefFlags::RANGE_ABS_3D, &mDocument, mAddressDetails); + aCurrentString = mVariable1Range.Format(mDocument, ScRefFlags::RANGE_ABS_3D, mAddressDetails); mxVariable1RangeEdit->SetText(aCurrentString); } } @@ -155,13 +155,13 @@ void ScStatisticsTwoVariableDialog::SetReference( const ScRange& rReferenceRange if ( mpActiveEdit == mxVariable1RangeEdit.get() ) { mVariable1Range = rReferenceRange; - aReferenceString = mVariable1Range.Format(ScRefFlags::RANGE_ABS_3D, &rDocument, mAddressDetails); + aReferenceString = mVariable1Range.Format(rDocument, ScRefFlags::RANGE_ABS_3D, mAddressDetails); mxVariable1RangeEdit->SetRefString(aReferenceString); } else if ( mpActiveEdit == mxVariable2RangeEdit.get() ) { mVariable2Range = rReferenceRange; - aReferenceString = mVariable2Range.Format(ScRefFlags::RANGE_ABS_3D, &rDocument, mAddressDetails); + aReferenceString = mVariable2Range.Format(rDocument, ScRefFlags::RANGE_ABS_3D, mAddressDetails); mxVariable2RangeEdit->SetRefString(aReferenceString); } else if ( mpActiveEdit == mxOutputRangeEdit.get() ) diff --git a/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx b/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx index 02d709bfd079..a27598441330 100644 --- a/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx +++ b/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx @@ -63,14 +63,14 @@ void FormulaTemplate::autoReplaceAddress(const OUString& aVariable, ScAddress co void FormulaTemplate::applyRange(const OUString& aVariable, const ScRange& aRange, bool b3D) { ScRefFlags nFlag = b3D ? ScRefFlags::RANGE_ABS_3D : ScRefFlags::RANGE_ABS; - OUString aString = aRange.Format(nFlag, mpDoc, mpDoc->GetAddressConvention()); + OUString aString = aRange.Format(*mpDoc, nFlag, mpDoc->GetAddressConvention()); mTemplate = mTemplate.replaceAll(aVariable, aString); } void FormulaTemplate::applyRangeList(const OUString& aVariable, const ScRangeList& aRangeList, sal_Unicode cDelimiter) { OUString aString; - aRangeList.Format(aString, ScRefFlags::RANGE_ABS_3D, mpDoc, mpDoc->GetAddressConvention(), cDelimiter); + aRangeList.Format(aString, ScRefFlags::RANGE_ABS_3D, *mpDoc, mpDoc->GetAddressConvention(), cDelimiter); mTemplate = mTemplate.replaceAll(aVariable, aString); } |