summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu5
-rw-r--r--sc/inc/sc.hrc1
-rw-r--r--sc/inc/sccommands.h1
-rw-r--r--sc/sdi/docsh.sdi1
-rw-r--r--sc/sdi/scalc.sdi25
-rw-r--r--sc/source/ui/docshell/docsh4.cxx11
-rw-r--r--sc/uiconfig/scalc/menubar/menubar.xml2
7 files changed, 44 insertions, 2 deletions
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
index fc5fcaf7e170..3104810fcb9e 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
@@ -1529,6 +1529,11 @@
<value xml:lang="en-US">Insert Date Field (variable)</value>
</prop>
</node>
+ <node oor:name=".uno:OpenFromCalc" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">~Open...</value>
+ </prop>
+ </node>
</node>
<node oor:name="Popups">
<node oor:name=".uno:AuditMenu" oor:op="replace">
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index 59b6564f26ca..1860bcf3e1dd 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -296,6 +296,7 @@
#define FID_DOC_MANAGER (SC_FUNCTION_START + 1)
#define FID_CURSOR_ENTER (SC_FUNCTION_START + 2)
#define SID_MAIL (SC_FUNCTION_START + 3)
+#define SID_OPEN_CALC (SC_FUNCTION_START + 4)
#define FILE_MENU_END (SC_FUNCTION_START + 20)
#define EDIT_MENU_START (FILE_MENU_END)
diff --git a/sc/inc/sccommands.h b/sc/inc/sccommands.h
index c16902ea2306..3bac2d856bc3 100644
--- a/sc/inc/sccommands.h
+++ b/sc/inc/sccommands.h
@@ -334,6 +334,7 @@
#define CMD_FID_TAB_EVENTS ".uno:TableEvents"
#define CMD_FID_TAB_MENU_SET_TAB_BG_COLOR ".uno:SetTabBgColor"
#define CMD_FID_TAB_SET_TAB_BG_COLOR ".uno:TabBgColor"
+#define CMD_SID_OPEN_CALC ".uno:OpenFromCalc"
#endif
diff --git a/sc/sdi/docsh.sdi b/sc/sdi/docsh.sdi
index 3cc5609918e2..5891c10e6100 100644
--- a/sc/sdi/docsh.sdi
+++ b/sc/sdi/docsh.sdi
@@ -73,6 +73,7 @@ interface TableDocument
uuid = "BA338A42-064E-11d0-89CB-008029E4B0B1" ;
]
{
+ SID_OPEN_CALC [ ExecMethod = Execute; ]
SID_SBA_IMPORT [ ExecMethod = Execute; ]
SID_SC_CELLS [ ExecMethod = Execute; ]
SID_SC_CELLTEXT [ ExecMethod = Execute; ]
diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index a39c8842db07..b924b8e4deed 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -8072,3 +8072,28 @@ SfxVoidItem InsertFieldDateVariable SID_INSERT_FIELD_DATE_VAR
ToolBoxConfig = FALSE,
GroupId = GID_OPTIONS;
]
+
+
+SfxVoidItem OpenFromCalc SID_OPEN_CALC
+()
+[
+ /* 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/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index f01b5106aa28..a55f46f47cc5 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -30,7 +30,7 @@
#include <com/sun/star/embed/XEmbeddedObject.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
-
+
using namespace ::com::sun::star;
@@ -67,6 +67,7 @@ using namespace ::com::sun::star;
#include <sfx2/passwd.hxx>
#include <sfx2/filedlghelper.hxx>
#include <sfx2/docinsert.hxx>
+#include "sfx2/dispatch.hxx"
#include <svl/PasswordHelper.hxx>
#include <svl/documentlockfile.hxx>
#include <svl/sharecontrolfile.hxx>
@@ -1096,6 +1097,14 @@ void ScDocShell::Execute( SfxRequest& rReq )
}
break;
+ case SID_OPEN_CALC:
+ {
+ SfxStringItem aApp(SID_DOC_SERVICE, rtl::OUString("com.sun.star.sheet.SpreadsheetDocument"));
+ SfxStringItem aTarget(SID_TARGETNAME, rtl::OUString("_blank"));
+ GetViewData()->GetDispatcher().Execute(
+ SID_OPENDOC, SFX_CALLMODE_API|SFX_CALLMODE_SYNCHRON, &aApp, &aTarget, 0L);
+ }
+ break;
default:
{
// kleiner (?) Hack -> forward der Slots an TabViewShell
diff --git a/sc/uiconfig/scalc/menubar/menubar.xml b/sc/uiconfig/scalc/menubar/menubar.xml
index 45bafb94b710..ce3e3f234785 100644
--- a/sc/uiconfig/scalc/menubar/menubar.xml
+++ b/sc/uiconfig/scalc/menubar/menubar.xml
@@ -3,7 +3,7 @@
<menu:menu menu:id=".uno:PickList">
<menu:menupopup>
<menu:menuitem menu:id=".uno:AddDirect"/>
- <menu:menuitem menu:id=".uno:Open"/>
+ <menu:menuitem menu:id=".uno:OpenFromCalc"/>
<menu:menuitem menu:id=".uno:RecentFileList"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:AutoPilotMenu"/>