[Libreoffice-commits] core.git: 2 commits - sc/CppunitTest_sc_tiledrendering.mk sfx2/source

Markus Mohrhard markus.mohrhard at googlemail.com
Fri Jul 28 20:15:01 UTC 2017


 sc/CppunitTest_sc_tiledrendering.mk |    1 
 sfx2/source/appl/appopen.cxx        |  140 ++++++++++++++++++------------------
 2 files changed, 71 insertions(+), 70 deletions(-)

New commits:
commit f6fa7427858e3c9a5ac12ac30dbc99afdc066dfc
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Thu Jul 27 22:29:29 2017 +0200

    fix missing dependency to scfilt in sc's tiledrendering test
    
    Noticed by Eike.
    
    Using the scfilt component as in the other calc tests does not work
    as the test immediately starts to fail. In general it looks
    dubious that the test does not use any component files.
    
    Change-Id: Ic44ff5112c6a131f3820e32f7a71ea2f90142cd3
    Reviewed-on: https://gerrit.libreoffice.org/40536
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/sc/CppunitTest_sc_tiledrendering.mk b/sc/CppunitTest_sc_tiledrendering.mk
index c02453891c3f..ac70a06453ad 100644
--- a/sc/CppunitTest_sc_tiledrendering.mk
+++ b/sc/CppunitTest_sc_tiledrendering.mk
@@ -26,6 +26,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sc_tiledrendering, \
     svt \
     svxcore \
     sc \
+    scfilt \
     scui \
     test \
     unotest \
commit bd0825752a39644bd4da1d6ad9f18ce41e0fd5b8
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Thu Jul 27 16:54:25 2017 +0200

    fix indentation
    
    Change-Id: I7c58328b4943e1891d2643ea52c3486894c35fda
    Reviewed-on: https://gerrit.libreoffice.org/40535
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index 36903d8489dd..17564eed84ab 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -1001,89 +1001,89 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
     }
 
     Reference < XController > xController;
-        // if a frame is given, it must be used for the starting point of the targeting mechanism
-        // this code is also used if asynchronous loading is possible, because loadComponent always is synchron
-        if ( !xTargetFrame.is() )
+    // if a frame is given, it must be used for the starting point of the targeting mechanism
+    // this code is also used if asynchronous loading is possible, because loadComponent always is synchron
+    if ( !xTargetFrame.is() )
+    {
+        if ( pTargetFrame )
         {
-            if ( pTargetFrame )
-            {
-                xTargetFrame = pTargetFrame->GetFrameInterface();
-            }
-            else
-            {
-                xTargetFrame.set( Desktop::create(::comphelper::getProcessComponentContext()), UNO_QUERY );
-            }
+            xTargetFrame = pTargetFrame->GetFrameInterface();
         }
-
-        // make URL ready
-        const SfxStringItem* pURLItem = rReq.GetArg<SfxStringItem>(SID_FILE_NAME);
-        aFileName = pURLItem->GetValue();
-        if( aFileName.startsWith("#") ) // Mark without URL
+        else
         {
-            SfxViewFrame *pView = pTargetFrame ? pTargetFrame->GetCurrentViewFrame() : nullptr;
-            if ( !pView )
-                pView = SfxViewFrame::Current();
-            pView->GetViewShell()->JumpToMark( aFileName.copy(1) );
-            rReq.SetReturnValue( SfxViewFrameItem( pView ) );
-            return;
-        }
-
-        // convert items to properties for framework API calls
-        Sequence < PropertyValue > aArgs;
-        TransformItems( SID_OPENDOC, *rReq.GetArgs(), aArgs );
-        // Any Referer (that was relevant in the above call to
-        // SvtSecurityOptions::isSecureMacroUri) is no longer relevant, assuming
-        // this "open" request is initiated directly by the user:
-        for (sal_Int32 i = 0; i != aArgs.getLength(); ++i) {
-            if (aArgs[i].Name == "Referer") {
-                ++i;
-                for (; i != aArgs.getLength(); ++i) {
-                    aArgs[i - 1] = aArgs[i];
-                }
-                aArgs.realloc(aArgs.getLength()-1);
-                break;
-            }
+            xTargetFrame.set( Desktop::create(::comphelper::getProcessComponentContext()), UNO_QUERY );
         }
+    }
 
-        // TODO/LATER: either remove LinkItem or create an asynchronous process for it
-        if( bHidden || pLinkItem || rReq.IsSynchronCall() )
-        {
-            // if loading must be done synchron, we must wait for completion to get a return value
-            // find frame by myself; I must know the exact frame to get the controller for the return value from it
-            Reference < XComponent > xComp;
+    // make URL ready
+    const SfxStringItem* pURLItem = rReq.GetArg<SfxStringItem>(SID_FILE_NAME);
+    aFileName = pURLItem->GetValue();
+    if( aFileName.startsWith("#") ) // Mark without URL
+    {
+        SfxViewFrame *pView = pTargetFrame ? pTargetFrame->GetCurrentViewFrame() : nullptr;
+        if ( !pView )
+            pView = SfxViewFrame::Current();
+        pView->GetViewShell()->JumpToMark( aFileName.copy(1) );
+        rReq.SetReturnValue( SfxViewFrameItem( pView ) );
+        return;
+    }
 
-            try
-            {
-                xComp = ::comphelper::SynchronousDispatch::dispatch( xTargetFrame, aFileName, aTarget, 0, aArgs );
-            }
-            catch(const RuntimeException&)
-            {
-                throw;
-            }
-            catch(const css::uno::Exception&)
-            {
+    // convert items to properties for framework API calls
+    Sequence < PropertyValue > aArgs;
+    TransformItems( SID_OPENDOC, *rReq.GetArgs(), aArgs );
+    // Any Referer (that was relevant in the above call to
+    // SvtSecurityOptions::isSecureMacroUri) is no longer relevant, assuming
+    // this "open" request is initiated directly by the user:
+    for (sal_Int32 i = 0; i != aArgs.getLength(); ++i) {
+        if (aArgs[i].Name == "Referer") {
+            ++i;
+            for (; i != aArgs.getLength(); ++i) {
+                aArgs[i - 1] = aArgs[i];
             }
+            aArgs.realloc(aArgs.getLength()-1);
+            break;
+        }
+    }
 
-            Reference < XModel > xModel( xComp, UNO_QUERY );
-            if ( xModel.is() )
-                xController = xModel->getCurrentController();
-            else
-                xController.set( xComp, UNO_QUERY );
+    // TODO/LATER: either remove LinkItem or create an asynchronous process for it
+    if( bHidden || pLinkItem || rReq.IsSynchronCall() )
+    {
+        // if loading must be done synchron, we must wait for completion to get a return value
+        // find frame by myself; I must know the exact frame to get the controller for the return value from it
+        Reference < XComponent > xComp;
 
+        try
+        {
+            xComp = ::comphelper::SynchronousDispatch::dispatch( xTargetFrame, aFileName, aTarget, 0, aArgs );
         }
-        else
+        catch(const RuntimeException&)
+        {
+            throw;
+        }
+        catch(const css::uno::Exception&)
         {
-            URL aURL;
-            aURL.Complete = aFileName;
-            Reference< util::XURLTransformer > xTrans( util::URLTransformer::create( ::comphelper::getProcessComponentContext() ) );
-            xTrans->parseStrict( aURL );
-
-            Reference < XDispatchProvider > xProv( xTargetFrame, UNO_QUERY );
-            Reference < XDispatch > xDisp = xProv.is() ? xProv->queryDispatch( aURL, aTarget, FrameSearchFlag::ALL ) : Reference < XDispatch >();
-            if ( xDisp.is() )
-                xDisp->dispatch( aURL, aArgs );
         }
 
+        Reference < XModel > xModel( xComp, UNO_QUERY );
+        if ( xModel.is() )
+            xController = xModel->getCurrentController();
+        else
+            xController.set( xComp, UNO_QUERY );
+
+    }
+    else
+    {
+        URL aURL;
+        aURL.Complete = aFileName;
+        Reference< util::XURLTransformer > xTrans( util::URLTransformer::create( ::comphelper::getProcessComponentContext() ) );
+        xTrans->parseStrict( aURL );
+
+        Reference < XDispatchProvider > xProv( xTargetFrame, UNO_QUERY );
+        Reference < XDispatch > xDisp = xProv.is() ? xProv->queryDispatch( aURL, aTarget, FrameSearchFlag::ALL ) : Reference < XDispatch >();
+        if ( xDisp.is() )
+            xDisp->dispatch( aURL, aArgs );
+    }
+
     if ( xController.is() )
     {
         // try to find the SfxFrame for the controller


More information about the Libreoffice-commits mailing list