Pass the config data to the sub-dialog.

Change-Id: I7d5e5cd22a64446c379446372f29bf1c597bd783
This commit is contained in:
Kohei Yoshida
2012-05-29 23:33:17 -04:00
parent b52fc9ad04
commit 7dd9054bde
3 changed files with 9 additions and 4 deletions

View File

@@ -64,7 +64,7 @@ void OptionString::Paint(const Point& rPos, SvLBox& rDev, sal_uInt16 /*nFlags*/,
}
ScCalcOptionsDialog::ScCalcOptionsDialog(Window* pParent) :
ScCalcOptionsDialog::ScCalcOptionsDialog(Window* pParent, const ScCalcConfig& rConfig) :
ModalDialog(pParent, ScResId(RID_SCDLG_FORMULA_CALCOPTIONS)),
maLbSettings(this, ScResId(LB_SETTINGS)),
maFtOptionEditCaption(this, ScResId(FT_OPTION_EDIT_CAPTION)),
@@ -74,7 +74,8 @@ ScCalcOptionsDialog::ScCalcOptionsDialog(Window* pParent) :
maBtnOK(this, ScResId(BTN_OK)),
maBtnCancel(this, ScResId(BTN_CANCEL)),
maCaptionIndirectSyntax(ScResId(STR_INDIRECT_SYNTAX_CAPTION).toString()),
maDescIndirectSyntax(ScResId(STR_INDIRECT_SYNTAX_DESC).toString())
maDescIndirectSyntax(ScResId(STR_INDIRECT_SYNTAX_DESC).toString()),
maConfig(rConfig)
{
maLbSettings.SetStyle(maLbSettings.GetStyle() | WB_CLIPCHILDREN | WB_FORCE_MAKEVISIBLE);
maLbSettings.SetHighlightRange();

View File

@@ -34,10 +34,12 @@
#include "vcl/fixed.hxx"
#include "svx/checklbx.hxx"
#include "calcconfig.hxx"
class ScCalcOptionsDialog : public ModalDialog
{
public:
ScCalcOptionsDialog(Window* pParent);
ScCalcOptionsDialog(Window* pParent, const ScCalcConfig& rConfig);
virtual ~ScCalcOptionsDialog();
DECL_LINK( SettingsSelHdl, void* );
@@ -62,6 +64,8 @@ private:
rtl::OUString maCaptionIndirectSyntax;
rtl::OUString maDescIndirectSyntax;
ScCalcConfig maConfig;
};
#endif

View File

@@ -141,7 +141,7 @@ void ScTpFormulaOptions::UpdateCustomCalcRadioButtons(bool bDefault)
void ScTpFormulaOptions::LaunchCustomCalcSettings()
{
ScCalcOptionsDialog aDlg(this);
ScCalcOptionsDialog aDlg(this, maCurrentConfig);
if (aDlg.Execute() == RET_OK)
{