summaryrefslogtreecommitdiff
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
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.
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu10
-rw-r--r--sfx2/source/appl/appopen.cxx25
2 files changed, 34 insertions, 1 deletions
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
index 073a2bbc54..0eb50461b9 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
@@ -1608,6 +1608,16 @@
<value xml:lang="en-US">Assign Macro...</value>
</prop>
</node>
+ <node oor:name=".uno:MarkPrecedents" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Mark Precedents</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:MarkDependents" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Mark Dependents</value>
+ </prop>
+ </node>
</node>
</node>
</oor:component-data>
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(