summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2012-04-19 23:20:53 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-05-03 20:28:15 -0400
commit9b99bf09a25d9c9016a1c6b730fa0ef1cc5bc04a (patch)
treef9d2e1465b7fe07231907c5900ef82c6e851588d /sc
parent326d255eaa2cde1d4ffff87a0a3a5074a326513f (diff)
Initial skeleton for inserting a field into cell.
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/sc.hrc2
-rw-r--r--sc/sdi/editsh.sdi2
-rw-r--r--sc/sdi/scalc.sdi23
-rw-r--r--sc/source/ui/src/popup.src16
-rw-r--r--sc/source/ui/view/editsh.cxx7
5 files changed, 49 insertions, 1 deletions
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index f8b187505f31..1e8b0330e1da 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -716,6 +716,7 @@
#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)
// idl parameter
@@ -771,6 +772,7 @@
#define RID_MEDIA_OBJECTBAR (SC_RESOURCE_START+60)
#define RID_POPUP_MEDIA (SC_RESOURCE_START+61)
#define RID_FUNCTION_CATEGORIES (SC_RESOURCE_START+62)
+#define RID_MN_INSERT_FIELDS (SC_RESOURCE_START+63)
#define STR_START (SC_RESOURCE_START+100)
#define STR_ROWHEIGHT (STR_START)
diff --git a/sc/sdi/editsh.sdi b/sc/sdi/editsh.sdi
index 1d95f2debdc3..c896cc4bdc7c 100644
--- a/sc/sdi/editsh.sdi
+++ b/sc/sdi/editsh.sdi
@@ -98,6 +98,8 @@ interface TableText
SID_INSERT_LRM [ ExecMethod = Execute; StateMethod = GetState; Export = FALSE; ]
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; ]
}
diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index 99976ec30ca2..9ca1858f4ec8 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -8001,3 +8001,26 @@ SfxVoidItem SetTabBgColor FID_TAB_MENU_SET_TAB_BG_COLOR
GroupId = GID_FORMAT;
]
+SfxVoidItem InsertFieldTest SID_INSERT_FIELD_TEST
+()
+[
+ /* 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;
+]
diff --git a/sc/source/ui/src/popup.src b/sc/source/ui/src/popup.src
index 6e27ce38ac49..66e84bf61a64 100644
--- a/sc/source/ui/src/popup.src
+++ b/sc/source/ui/src/popup.src
@@ -430,6 +430,22 @@ Menu RID_POPUP_EDIT
//------------------------------
MenuItem
{
+ Text [ en-US ] = "Insert Fields" ;
+ Identifier = RID_MN_INSERT_FIELDS ;
+ SubMenu = Menu
+ {
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = SID_INSERT_FIELD_TEST ;
+ Text [ en-US ] = "Test Field";
+ };
+ };
+ };
+ };
+ MenuItem
+ {
ITEM_FORMAT_CHAR_DLG
};
//------------------------------
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index 9f3dfe120497..8b05f33ce43b 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -614,6 +614,9 @@ void ScEditShell::Execute( SfxRequest& rReq )
case SID_INSERT_ZWNBSP:
lclInsertCharacter( pTableView, pTopView, CHAR_ZWNBSP );
break;
+ case SID_INSERT_FIELD_TEST:
+ fprintf(stdout, "ScEditShell::Execute: SID_INSERT_FIELD_TEST\n");
+ break;
}
pHdl->DataChanged();
@@ -714,7 +717,9 @@ void ScEditShell::GetState( SfxItemSet& rSet )
rSet.DisableItem( SID_THES );
}
break;
-
+ case SID_INSERT_FIELD_TEST:
+ fprintf(stdout, "ScEditShell::GetState: SID_INSERT_FIELD_TEST\n");
+ break;
}
nWhich = aIter.NextWhich();