summaryrefslogtreecommitdiff
path: root/sfx2/source/appl/appopen.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2010-09-16 10:37:52 +0200
committerFridrich Štrba <fridrich.strba@bluewin.ch>2010-09-16 10:37:52 +0200
commit16757437b9e4cc7d39dd8b8c4933eece3043341e (patch)
tree732f040f3abb4d09606a5ebef04339d74d5fd1be /sfx2/source/appl/appopen.cxx
parent18c9ae89e16e620999af675d7a6abab503cf143f (diff)
calc-jump-on-formula-ref-sfx2.diff: Migrated
n#464359, i#101018 allow ctrl-[ and ctrl-] to jump to references used in a formula expression.
Diffstat (limited to 'sfx2/source/appl/appopen.cxx')
-rw-r--r--sfx2/source/appl/appopen.cxx25
1 files changed, 24 insertions, 1 deletions
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index b7cf7129bd..e16a694cf4 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -652,6 +652,29 @@ void SfxApplication::NewDocExec_Impl( SfxRequest& rReq )
//---------------------------------------------------------------------------
+namespace {
+
+/**
+ * Check if a given filter type should open the hyperlinked document
+ * natively.
+ *
+ * @param rFilter filter object
+ */
+bool lcl_isFilterNativelySupported(const SfxFilter& rFilter)
+{
+ if (rFilter.IsOwnFormat())
+ return true;
+
+ ::rtl::OUString aName = rFilter.GetFilterName();
+ if (aName.indexOf(::rtl::OUString::createFromAscii("MS Excel")) == 0)
+ // We can handle all Excel variants natively.
+ return true;
+
+ return false;
+}
+
+}
+
void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
{
DBG_MEMTEST();
@@ -961,7 +984,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
aTypeName = xTypeDetection->queryTypeByURL( aURL.Main );
SfxFilterMatcher& rMatcher = SFX_APP()->GetFilterMatcher();
const SfxFilter* pFilter = rMatcher.GetFilter4EA( aTypeName );
- if ( !pFilter || !( pFilter->IsOwnFormat() ))
+ if (!pFilter || !lcl_isFilterNativelySupported(*pFilter))
{
// hyperlink does not link to own type => special handling (http, ftp) browser and (other external protocols) OS
Reference< XSystemShellExecute > xSystemShellExecute( ::comphelper::getProcessServiceFactory()->createInstance(