summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2006-09-07 15:45:19 +0000
committerVladimir Glazounov <vg@openoffice.org>2006-09-07 15:45:19 +0000
commitf5c6c22ce7c5a572d1264eba685c1c2d0af930c7 (patch)
tree180db1fb1cf020b23847a67f8cb649c423b7f7b4 /sfx2
parentdfbd7eb3734936109769349ebd908258725c505f (diff)
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).
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/workwin.cxx33
1 files changed, 22 insertions, 11 deletions
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 <com/sun/star/frame/XLayoutManagerEventBroadcaster.hpp>
#endif
-#ifndef _COM_SUN_STAR_TASK_XSTATUSINDICATOR_HPP_
-#include <com/sun/star/task/XStatusIndicator.hpp>
-#endif
-#ifndef _COM_SUN_STAR_TASK_XSTATUSINDICATORFACTORY_HPP_
-#include <com/sun/star/task/XStatusIndicatorFactory.hpp>
-#endif
#ifndef _COM_SUN_STAR_FRAME_LAYOUTMANAGEREVENTS_HPP_
#include <com/sun/star/frame/LayoutManagerEvents.hpp>
#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;
}