diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-05-23 01:41:42 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-05-23 02:23:07 -0400 |
commit | 124c020f4290911d2bfb8216c9680734722c8db7 (patch) | |
tree | c161f7be18a1a9fb2045ce953459c21da75de0e0 /sc/source | |
parent | e58eb031374fb18aa82654c01d0f0841a437c667 (diff) |
Receive the file open command in Calc in order to pass doc service name.
This way the type detection is guaranteed to receive the document service
name whenever a file is being opened from Calc.
Change-Id: I0eec06d4ca1f3f30bcbc5685af73392276990d69
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/ui/docshell/docsh4.cxx | 11 |
1 files changed, 10 insertions, 1 deletions
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 |