summaryrefslogtreecommitdiff
path: root/sfx2/source/view
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-11-05 15:20:22 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-11-06 06:27:51 +0100
commit7b99cdb2d77a3feaf9b782c1e656f2d922e2746e (patch)
tree180459dcd8379ee1a2e89098a4d9eda72abe8f05 /sfx2/source/view
parent7ee07296a66df29555c9e9a684f24bc68201cb78 (diff)
loplugin:indentation find broken if statements
so I don't read the "then" block as being a sequential statements Change-Id: Ib2004acd3518bd4ebd2246f02a26c2c0a8bbab4c Reviewed-on: https://gerrit.libreoffice.org/82069 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2/source/view')
-rw-r--r--sfx2/source/view/frmload.cxx58
1 files changed, 29 insertions, 29 deletions
diff --git a/sfx2/source/view/frmload.cxx b/sfx2/source/view/frmload.cxx
index e6885694a944..d098ac5c00e2 100644
--- a/sfx2/source/view/frmload.cxx
+++ b/sfx2/source/view/frmload.cxx
@@ -538,35 +538,35 @@ SfxInterfaceId SfxFrameLoader_Impl::impl_determineEffectiveViewId_nothrow( const
try
{
if ( nViewId == SFX_INTERFACE_NONE )
- do
- {
- Reference< XViewDataSupplier > xViewDataSupplier( i_rDocument.GetModel(), UNO_QUERY );
- Reference< XIndexAccess > xViewData;
- if ( xViewDataSupplier.is() )
- xViewData.set( xViewDataSupplier->getViewData() );
-
- if ( !xViewData.is() || ( xViewData->getCount() == 0 ) )
- // no view data stored together with the model
- break;
-
- // obtain the ViewID from the view data
- Sequence< PropertyValue > aViewData;
- if ( !( xViewData->getByIndex( 0 ) >>= aViewData ) )
- break;
-
- ::comphelper::NamedValueCollection aNamedViewData( aViewData );
- OUString sViewId = aNamedViewData.getOrDefault( "ViewId", OUString() );
- if ( sViewId.isEmpty() )
- break;
-
- // somewhat weird convention here ... in the view data, the ViewId is a string, effectively describing
- // a view name. In the document load descriptor, the ViewId is in fact the numeric ID.
-
- SfxViewFactory* pViewFactory = i_rDocument.GetFactory().GetViewFactoryByViewName( sViewId );
- if ( pViewFactory )
- nViewId = pViewFactory->GetOrdinal();
- }
- while ( false );
+ do
+ {
+ Reference< XViewDataSupplier > xViewDataSupplier( i_rDocument.GetModel(), UNO_QUERY );
+ Reference< XIndexAccess > xViewData;
+ if ( xViewDataSupplier.is() )
+ xViewData.set( xViewDataSupplier->getViewData() );
+
+ if ( !xViewData.is() || ( xViewData->getCount() == 0 ) )
+ // no view data stored together with the model
+ break;
+
+ // obtain the ViewID from the view data
+ Sequence< PropertyValue > aViewData;
+ if ( !( xViewData->getByIndex( 0 ) >>= aViewData ) )
+ break;
+
+ ::comphelper::NamedValueCollection aNamedViewData( aViewData );
+ OUString sViewId = aNamedViewData.getOrDefault( "ViewId", OUString() );
+ if ( sViewId.isEmpty() )
+ break;
+
+ // somewhat weird convention here ... in the view data, the ViewId is a string, effectively describing
+ // a view name. In the document load descriptor, the ViewId is in fact the numeric ID.
+
+ SfxViewFactory* pViewFactory = i_rDocument.GetFactory().GetViewFactoryByViewName( sViewId );
+ if ( pViewFactory )
+ nViewId = pViewFactory->GetOrdinal();
+ }
+ while ( false );
}
catch( const Exception& )
{