diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2010-09-16 10:37:52 +0200 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2010-09-16 10:37:52 +0200 |
commit | 4de186f43456baf1de162aefa5f76d76e0817e5e (patch) | |
tree | c77b2adcd3834f9bbfcb99830fc66303c62ddb9a | |
parent | 82cf91ed03aefaff15d61692d22438ad848bd771 (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.xcu | 10 | ||||
-rw-r--r-- | sfx2/source/appl/appopen.cxx | 25 |
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 073a2bbc5435..0eb50461b97f 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 89bb5f23f1de..f2e441976bd0 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( |