Commits

Anonymous committed 35cb108

cws mba34issues01: #i117708#: status indicator for inactive document

Comments (0)

Files changed (1)

sfx2/source/doc/objserv.cxx

 				{
 					// get statusindicator
 					uno::Reference< task::XStatusIndicator > xStatusIndicator;
-					SfxViewFrame *pFrame = GetFrame();
-					if ( pFrame )
+					uno::Reference < frame::XController > xCtrl( GetModel()->getCurrentController() );
+					if ( xCtrl.is() )
 					{
-						uno::Reference< task::XStatusIndicatorFactory > xStatFactory(
-																	pFrame->GetFrame().GetFrameInterface(),
-																	uno::UNO_QUERY );
+						uno::Reference< task::XStatusIndicatorFactory > xStatFactory( xCtrl->getFrame(), uno::UNO_QUERY );
 						if( xStatFactory.is() )
 							xStatusIndicator = xStatFactory->createStatusIndicator();
 					}
 
+					OSL_ENSURE( xStatusIndicator.is(), "Can not retrieve default status indicator!\n" );
 
-					OSL_ENSURE( xStatusIndicator.is(), "Can not retrieve default status indicator!\n" );
 					if ( xStatusIndicator.is() )
 					{
 						SfxUnoAnyItem aStatIndItem( SID_PROGRESS_STATUSBAR_CONTROL, uno::makeAny( xStatusIndicator ) );