[ooo-build-commit] Branch 'ooo-build-3-1' - patches/dev300

Kohei Yoshida kohei at kemper.freedesktop.org
Fri Jul 17 12:38:30 PDT 2009


 patches/dev300/calc-jump-on-formula-ref-sfx2.diff |   34 ++++++++++++++++++++--
 1 file changed, 32 insertions(+), 2 deletions(-)

New commits:
commit 4b23c78ba2f01b2590a806dc8cc5e9e14f1b0a03
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Fri Jul 17 15:33:57 2009 -0400

    Fixed a regression on hyperlinks in Calc.
    
    Clicking URLs to html documents opened up Writer instead of the
    default browser on the system. (i#103587, n#523005).
    
    * patches/dev300/calc-jump-on-formula-ref-sfx2.diff:

diff --git a/patches/dev300/calc-jump-on-formula-ref-sfx2.diff b/patches/dev300/calc-jump-on-formula-ref-sfx2.diff
index ab4ef4f..395b0ee 100644
--- a/patches/dev300/calc-jump-on-formula-ref-sfx2.diff
+++ b/patches/dev300/calc-jump-on-formula-ref-sfx2.diff
@@ -1,13 +1,43 @@
 diff --git sfx2/source/appl/appopen.cxx sfx2/source/appl/appopen.cxx
-index 9514db0..16797df 100644
+index b8b5222..ce90cf7 100644
 --- sfx2/source/appl/appopen.cxx
 +++ sfx2/source/appl/appopen.cxx
+@@ -841,6 +841,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();
 @@ -1150,7 +1150,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 || !pFilter->CanImport())
++            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(


More information about the ooo-build-commit mailing list