summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2012-05-29 15:48:16 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-05-30 11:37:19 -0400
commit2990def85b40e0529049a1bca208d4ebb8600f5a (patch)
treedd1ab7fa3a77fd881aa7fa4c98891a85d340d9fa /sc
parentce2bcf8901d491866b62bff4b5bfe63918a0fe24 (diff)
Allow editing of enumerated option value.
Still lots of things are hard-coded. Change-Id: I34512d87431082d35130954c6818c65bc3c18966
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/optdlg/calcoptionsdlg.cxx17
-rw-r--r--sc/source/ui/optdlg/calcoptionsdlg.hrc12
-rw-r--r--sc/source/ui/optdlg/calcoptionsdlg.hxx5
-rw-r--r--sc/source/ui/optdlg/calcoptionsdlg.src22
4 files changed, 44 insertions, 12 deletions
diff --git a/sc/source/ui/optdlg/calcoptionsdlg.cxx b/sc/source/ui/optdlg/calcoptionsdlg.cxx
index ae3569446362..be6803bbc2ba 100644
--- a/sc/source/ui/optdlg/calcoptionsdlg.cxx
+++ b/sc/source/ui/optdlg/calcoptionsdlg.cxx
@@ -67,11 +67,13 @@ void OptionString::Paint(const Point& rPos, SvLBox& rDev, sal_uInt16 /*nFlags*/,
ScCalcOptionsDialog::ScCalcOptionsDialog(Window* pParent) :
ModalDialog(pParent, ScResId(RID_SCDLG_FORMULA_CALCOPTIONS)),
maLbSettings(this, ScResId(LB_SETTINGS)),
- maBtnEdit(this, ScResId(BTN_EDIT)),
+ maFtOptionEditCaption(this, ScResId(FT_OPTION_EDIT_CAPTION)),
+ maLbOptionEdit(this, ScResId(LB_OPTION_EDIT)),
maFlAnnotation(this, ScResId(FL_ANNOTATION)),
maFtAnnotation(this, ScResId(FT_ANNOTATION)),
maBtnOK(this, ScResId(BTN_OK)),
maBtnCancel(this, ScResId(BTN_CANCEL)),
+ maCaptionIndirectSyntax(ScResId(STR_INDIRECT_SYNTAX_CAPTION).toString()),
maDescIndirectSyntax(ScResId(STR_INDIRECT_SYNTAX_DESC).toString())
{
maLbSettings.SetStyle(maLbSettings.GetStyle() | WB_CLIPCHILDREN | WB_FORCE_MAKEVISIBLE);
@@ -95,7 +97,7 @@ void ScCalcOptionsDialog::FillOptionsList()
SvLBoxEntry* pEntry = new SvLBoxEntry;
pEntry->AddItem(new SvLBoxString(pEntry, 0, rtl::OUString()));
pEntry->AddItem(new SvLBoxContextBmp(pEntry, 0, Image(), Image(), 0));
- OptionString* pItem = new OptionString("Formula syntax INDIRECT function expects", "Calc A1");
+ OptionString* pItem = new OptionString(maCaptionIndirectSyntax, "Calc A1");
pEntry->AddItem(pItem);
pModel->Insert(pEntry);
@@ -105,7 +107,16 @@ void ScCalcOptionsDialog::FillOptionsList()
void ScCalcOptionsDialog::SelectionChanged()
{
- maFtAnnotation.SetText(maDescIndirectSyntax);
+ if (true)
+ {
+ // Formula syntax for INDIRECT function.
+ maLbOptionEdit.Clear();
+ maLbOptionEdit.InsertEntry(rtl::OUString("Calc A1"));
+ maLbOptionEdit.InsertEntry(rtl::OUString("Excel A1"));
+ maLbOptionEdit.InsertEntry(rtl::OUString("Excel R1C1"));
+ maLbOptionEdit.SelectEntryPos(0);
+ maFtAnnotation.SetText(maDescIndirectSyntax);
+ }
}
void ScCalcOptionsDialog::EditOption()
diff --git a/sc/source/ui/optdlg/calcoptionsdlg.hrc b/sc/source/ui/optdlg/calcoptionsdlg.hrc
index 6dc6ae5f727c..d0049b9911ac 100644
--- a/sc/source/ui/optdlg/calcoptionsdlg.hrc
+++ b/sc/source/ui/optdlg/calcoptionsdlg.hrc
@@ -31,10 +31,14 @@
#define BTN_OK 1
#define BTN_CANCEL 2
#define LB_SETTINGS 3
-#define BTN_EDIT 4
-#define FL_ANNOTATION 5
-#define FT_ANNOTATION 6
-#define STR_INDIRECT_SYNTAX_DESC 10
+#define FT_OPTION_EDIT_CAPTION 4
+#define LB_OPTION_EDIT 5
+
+#define FL_ANNOTATION 20
+#define FT_ANNOTATION 21
+
+#define STR_INDIRECT_SYNTAX_CAPTION 22
+#define STR_INDIRECT_SYNTAX_DESC 23
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/optdlg/calcoptionsdlg.hxx b/sc/source/ui/optdlg/calcoptionsdlg.hxx
index 9bb1ca582cff..a812d92a19c7 100644
--- a/sc/source/ui/optdlg/calcoptionsdlg.hxx
+++ b/sc/source/ui/optdlg/calcoptionsdlg.hxx
@@ -51,13 +51,16 @@ private:
private:
SvxCheckListBox maLbSettings;
- PushButton maBtnEdit;
+ FixedText maFtOptionEditCaption;
+ ListBox maLbOptionEdit;
+
FixedLine maFlAnnotation;
FixedText maFtAnnotation;
OKButton maBtnOK;
CancelButton maBtnCancel;
+ rtl::OUString maCaptionIndirectSyntax;
rtl::OUString maDescIndirectSyntax;
};
diff --git a/sc/source/ui/optdlg/calcoptionsdlg.src b/sc/source/ui/optdlg/calcoptionsdlg.src
index e80fa098c55d..cb0571b4bdc7 100644
--- a/sc/source/ui/optdlg/calcoptionsdlg.src
+++ b/sc/source/ui/optdlg/calcoptionsdlg.src
@@ -43,12 +43,21 @@ ModalDialog RID_SCDLG_FORMULA_CALCOPTIONS
TabStop = TRUE ;
};
- PushButton BTN_EDIT
+ FixedText FT_OPTION_EDIT_CAPTION
{
- Pos = MAP_APPFONT ( 8 , 82 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
+ Pos = MAP_APPFONT ( 8 , 84 ) ;
+ Size = MAP_APPFONT ( 40 , 14 ) ;
TabStop = TRUE ;
- Text [ en-US ] = "Edit...";
+
+ Text [ en-US ] = "Value";
+ };
+
+ ListBox LB_OPTION_EDIT
+ {
+ Pos = MAP_APPFONT ( 50 , 82 ) ;
+ Size = MAP_APPFONT ( 60, 46 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
};
FixedLine FL_ANNOTATION
@@ -80,6 +89,11 @@ ModalDialog RID_SCDLG_FORMULA_CALCOPTIONS
TabStop = TRUE ;
};
+ String STR_INDIRECT_SYNTAX_CAPTION
+ {
+ Text [ en-US ] = "Formula syntax for INDIRECT function";
+ };
+
String STR_INDIRECT_SYNTAX_DESC
{
Text [ en-US ] = "Formula syntax that built-in function INDIRECT expects.";