summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-07-27 16:54:25 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-07-28 22:14:05 +0200
commitbd0825752a39644bd4da1d6ad9f18ce41e0fd5b8 (patch)
tree549859fcdd56f6c9a39d2818edaa0d4547a6b4f9
parent42277cf8ad6946b9b144a3a54b5eb295188ced72 (diff)
fix indentation
Change-Id: I7c58328b4943e1891d2643ea52c3486894c35fda Reviewed-on: https://gerrit.libreoffice.org/40535 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-rw-r--r--sfx2/source/appl/appopen.cxx140
1 files changed, 70 insertions, 70 deletions
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