summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2012-05-03 14:48:34 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-05-03 20:28:18 -0400
commit4b8186dbe41677c5c7ee156c586f3295dab7528c (patch)
tree2d60ec2fb27c9df7a8c9fc01b3e4b3af85720a9b
parent7684ae6cf43e2fa186f6e9c80d7d377e0dc1a1ab (diff)
Add menu entries for sheet name and date field items.
Change-Id: I5ae910d455a7364209a203c2e3567a902e1f01a2
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu9
-rw-r--r--sc/inc/sc.hrc3
-rw-r--r--sc/sdi/editsh.sdi3
-rw-r--r--sc/sdi/scalc.sdi26
-rw-r--r--sc/source/ui/src/popup.src9
-rw-r--r--sc/source/ui/view/editsh.cxx12
6 files changed, 53 insertions, 9 deletions
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
index c1f1aa30ea78..97fcfc86e4e8 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
@@ -1514,9 +1514,14 @@
<value>1</value>
</prop>
</node>
- <node oor:name=".uno:InsertFieldTest" oor:op="replace">
+ <node oor:name=".uno:InsertFieldSheet" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Insert Field Test</value>
+ <value xml:lang="en-US">Insert Sheet Name Field</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:InsertFieldDateVariable" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Insert Date Field (variable)</value>
</prop>
</node>
</node>
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index 1e8b0330e1da..f7a556d0594d 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -716,7 +716,8 @@
#define SID_DELETE_SCENARIO (SID_NEW_SLOTS+95)
#define SID_EDIT_SCENARIO (SID_NEW_SLOTS+96)
-#define SID_INSERT_FIELD_TEST (SID_NEW_SLOTS+97)
+#define SID_INSERT_FIELD_SHEET (SID_NEW_SLOTS+97)
+#define SID_INSERT_FIELD_DATE_VAR (SID_NEW_SLOTS+98)
// idl parameter
diff --git a/sc/sdi/editsh.sdi b/sc/sdi/editsh.sdi
index c896cc4bdc7c..d306091fa94b 100644
--- a/sc/sdi/editsh.sdi
+++ b/sc/sdi/editsh.sdi
@@ -99,7 +99,8 @@ interface TableText
SID_INSERT_ZWSP [ ExecMethod = Execute; StateMethod = GetState; Export = FALSE; ]
SID_INSERT_ZWNBSP [ ExecMethod = Execute; StateMethod = GetState; Export = FALSE; ]
- SID_INSERT_FIELD_TEST [ ExecMethod = Execute; StateMethod = GetState; ]
+ SID_INSERT_FIELD_SHEET [ ExecMethod = Execute; StateMethod = GetState; ]
+ SID_INSERT_FIELD_DATE_VAR [ ExecMethod = Execute; StateMethod = GetState; ]
}
diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index 9ca1858f4ec8..e9a0b7a5c383 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -8001,7 +8001,31 @@ SfxVoidItem SetTabBgColor FID_TAB_MENU_SET_TAB_BG_COLOR
GroupId = GID_FORMAT;
]
-SfxVoidItem InsertFieldTest SID_INSERT_FIELD_TEST
+SfxVoidItem InsertFieldSheet SID_INSERT_FIELD_SHEET
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_OPTIONS;
+]
+
+SfxVoidItem InsertFieldDateVariable SID_INSERT_FIELD_DATE_VAR
()
[
/* flags: */
diff --git a/sc/source/ui/src/popup.src b/sc/source/ui/src/popup.src
index 66e84bf61a64..67f4089a3380 100644
--- a/sc/source/ui/src/popup.src
+++ b/sc/source/ui/src/popup.src
@@ -438,8 +438,13 @@ Menu RID_POPUP_EDIT
{
MenuItem
{
- Identifier = SID_INSERT_FIELD_TEST ;
- Text [ en-US ] = "Test Field";
+ Identifier = SID_INSERT_FIELD_DATE_VAR ;
+ Text [ en-US ] = "Date" ;
+ };
+ MenuItem
+ {
+ Identifier = SID_INSERT_FIELD_SHEET ;
+ Text [ en-US ] = "Sheet Name" ;
};
};
};
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index cf479772b8b5..adb60bb5a485 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -614,13 +614,20 @@ void ScEditShell::Execute( SfxRequest& rReq )
case SID_INSERT_ZWNBSP:
lclInsertCharacter( pTableView, pTopView, CHAR_ZWNBSP );
break;
- case SID_INSERT_FIELD_TEST:
+ case SID_INSERT_FIELD_SHEET:
{
SvxTableField aField(pViewData->GetTabNo());
SvxFieldItem aItem(aField, EE_FEATURE_FIELD);
pTableView->InsertField(aItem);
}
break;
+ case SID_INSERT_FIELD_DATE_VAR:
+ {
+ SvxDateField aField;
+ SvxFieldItem aItem(aField, EE_FEATURE_FIELD);
+ pTableView->InsertField(aItem);
+ }
+ break;
}
pHdl->DataChanged();
@@ -721,7 +728,8 @@ void ScEditShell::GetState( SfxItemSet& rSet )
rSet.DisableItem( SID_THES );
}
break;
- case SID_INSERT_FIELD_TEST:
+ case SID_INSERT_FIELD_SHEET:
+ case SID_INSERT_FIELD_DATE_VAR:
break;
}