summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-01-29 16:48:11 -0500
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-01-29 17:13:18 -0500
commitcb9b6d94d805026062ebc6e2f7bdb2f659d9665a (patch)
treeb769d008640f229354800eb052c4233fa0357e1a
parent9eba10af95cfdcc01ffbdfabfb523a579bd624ea (diff)
No need to store the address detail object.
Just get one from the document when needed. Change-Id: Id053c70c40e7a7580a3c5969af8d547ac1fcbf4e
-rw-r--r--sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx9
-rw-r--r--sc/source/ui/inc/RandomNumberGeneratorDialog.hxx1
2 files changed, 4 insertions, 6 deletions
diff --git a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
index 36ba2cb67fdf..0c47c5be3ce5 100644
--- a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
@@ -59,8 +59,7 @@ ScRandomNumberGeneratorDialog::ScRandomNumberGeneratorDialog(
ScAnyRefDlg ( pSfxBindings, pChildWindow, pParent,
"RandomNumberGeneratorDialog", "modules/scalc/ui/randomnumbergenerator.ui" ),
mpViewData ( pViewData ),
- mpDoc ( pViewData->GetDocument() ),
- maAddressDetails ( mpDoc->GetAddressConvention(), 0, 0 ),
+ mpDoc( pViewData->GetDocument() ),
mbDialogLostFocus( false )
{
get(mpInputRangeText, "cell-range-label");
@@ -115,7 +114,7 @@ void ScRandomNumberGeneratorDialog::Init()
void ScRandomNumberGeneratorDialog::GetRangeFromSelection()
{
mpViewData->GetSimpleArea(maInputRange);
- OUString aCurrentString(maInputRange.Format(SCR_ABS_3D, mpDoc, maAddressDetails));
+ OUString aCurrentString(maInputRange.Format(SCR_ABS_3D, mpDoc, mpDoc->GetAddressConvention()));
mpInputRangeEdit->SetText( aCurrentString );
}
@@ -142,7 +141,7 @@ sal_Bool ScRandomNumberGeneratorDialog::Close()
return DoClose( ScRandomNumberGeneratorDialogWrapper::GetChildWindowId() );
}
-void ScRandomNumberGeneratorDialog::SetReference( const ScRange& rReferenceRange, ScDocument* pDocument )
+void ScRandomNumberGeneratorDialog::SetReference( const ScRange& rReferenceRange, ScDocument* pDoc )
{
if ( mpInputRangeEdit->IsEnabled() )
{
@@ -151,7 +150,7 @@ void ScRandomNumberGeneratorDialog::SetReference( const ScRange& rReferenceRange
maInputRange = rReferenceRange;
- OUString aReferenceString(maInputRange.Format(SCR_ABS_3D, pDocument, maAddressDetails));
+ OUString aReferenceString(maInputRange.Format(SCR_ABS_3D, pDoc, pDoc->GetAddressConvention()));
mpInputRangeEdit->SetRefString( aReferenceString );
}
}
diff --git a/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx b/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx
index a99f47f87cda..b20ce912ea7f 100644
--- a/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx
+++ b/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx
@@ -54,7 +54,6 @@ private:
ScDocument* mpDoc;
ScRange maInputRange;
- ScAddress::Details maAddressDetails;
bool mbDialogLostFocus;