summaryrefslogtreecommitdiff
path: root/sfx2/source/view/frmload.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/view/frmload.cxx')
-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& )
{