From f5c6c22ce7c5a572d1264eba685c1c2d0af930c7 Mon Sep 17 00:00:00 2001 From: Vladimir Glazounov Date: Thu, 7 Sep 2006 15:45:19 +0000 Subject: INTEGRATION: CWS fwk49_SRC680 (1.63.18); FILE MERGED 2006/08/30 11:48:06 cd 1.63.18.1: #i69089# Use old method to provide status indicator from WorkWindow. New implementation provided a status indicator which calls reschedule() more often and resulted in several reentrance problems (crashes). --- sfx2/source/appl/workwin.cxx | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) (limited to 'sfx2') diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx index 9bbc6293a5d2..2ca38a3183da 100644 --- a/sfx2/source/appl/workwin.cxx +++ b/sfx2/source/appl/workwin.cxx @@ -4,9 +4,9 @@ * * $RCSfile: workwin.cxx,v $ * - * $Revision: 1.63 $ + * $Revision: 1.64 $ * - * last change: $Author: ihi $ $Date: 2006-08-04 11:11:12 $ + * last change: $Author: vg $ $Date: 2006-09-07 16:45:19 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -82,12 +82,6 @@ #ifndef _COM_SUN_STAR_FRAME_XLAYOUTMANAGEREVENTBROADCASTER_HPP_ #include #endif -#ifndef _COM_SUN_STAR_TASK_XSTATUSINDICATOR_HPP_ -#include -#endif -#ifndef _COM_SUN_STAR_TASK_XSTATUSINDICATORFACTORY_HPP_ -#include -#endif #ifndef _COM_SUN_STAR_FRAME_LAYOUTMANAGEREVENTS_HPP_ #include #endif @@ -1426,11 +1420,28 @@ void SfxIPWorkWin_Impl::UpdateObjectBars_Impl() Reference< ::com::sun::star::task::XStatusIndicator > SfxWorkWindow::GetStatusIndicator() { - Reference< task::XStatusIndicatorFactory > xFactory( GetFrameInterface(), UNO_QUERY ); + Reference< com::sun::star::beans::XPropertySet > xPropSet( GetFrameInterface(), UNO_QUERY ); + Reference< ::com::sun::star::frame::XLayoutManager > xLayoutManager; Reference< com::sun::star::task::XStatusIndicator > xStatusIndicator; - if ( xFactory.is() ) - xStatusIndicator = xFactory->createStatusIndicator(); + if ( xPropSet.is() ) + { + Any aValue = xPropSet->getPropertyValue( m_aLayoutManagerPropName ); + aValue >>= xLayoutManager; + if ( xLayoutManager.is() ) + { + xLayoutManager->createElement( m_aProgressBarResName ); + xLayoutManager->showElement( m_aProgressBarResName ); + + Reference< ::com::sun::star::ui::XUIElement > xProgressBar = + xLayoutManager->getElement( m_aProgressBarResName ); + if ( xProgressBar.is() ) + { + xStatusIndicator = Reference< ::com::sun::star::task::XStatusIndicator >( + xProgressBar->getRealInterface(), UNO_QUERY ); + } + } + } return xStatusIndicator; } -- cgit