31#include <com/sun/star/lang/XServiceInfo.hpp>
32#include <com/sun/star/lang/XInitialization.hpp>
33#include <com/sun/star/task/XStatusIndicatorFactory.hpp>
34#include <com/sun/star/task/XStatusIndicator.hpp>
35#include <com/sun/star/awt/XWindow.hpp>
36#include <com/sun/star/frame/XFrame.hpp>
37#include <com/sun/star/util/XUpdatable.hpp>
38#include <com/sun/star/uno/XComponentContext.hpp>
81 IndicatorInfo(
const css::uno::Reference< css::task::XStatusIndicator >& xIndicator,
82 const OUString& sText )
95 bool operator==(
const css::uno::Reference< css::task::XStatusIndicator >& xIndicator)
const
120 css::lang::XServiceInfo
121 , css::lang::XInitialization
122 , css::task::XStatusIndicatorFactory
123 , css::util::XUpdatable >
134 css::uno::Reference< css::uno::XComponentContext >
m_xContext;
145 css::uno::WeakReference< css::frame::XFrame >
m_xFrame;
177 return "com.sun.star.comp.framework.StatusIndicatorFactory";
187 return {
"com.sun.star.task.StatusIndicatorFactory" };
191 virtual void SAL_CALL
initialize(
const css::uno::Sequence< css::uno::Any >& lArguments)
override;
194 virtual css::uno::Reference< css::task::XStatusIndicator > SAL_CALL
createStatusIndicator()
override;
197 virtual void SAL_CALL
update()
override;
200 void start(
const css::uno::Reference< css::task::XStatusIndicator >& xChild,
201 const OUString& sText ,
204 void reset(
const css::uno::Reference< css::task::XStatusIndicator >& xChild);
206 void end(
const css::uno::Reference< css::task::XStatusIndicator >& xChild);
208 void setText(
const css::uno::Reference< css::task::XStatusIndicator >& xChild,
209 const OUString& sText );
211 void setValue(
const css::uno::Reference< css::task::XStatusIndicator >& xChild,
implement a factory service to create new status indicator objects
virtual void SAL_CALL update() override
void setText(const css::uno::Reference< css::task::XStatusIndicator > &xChild, const OUString &sText)
void impl_startWakeUpThread()
bool m_bDisableReschedule
enable/disable rescheduling.
bool m_bAllowReschedule
Our WakeUpThread calls us in our interface method "XUpdatable::update().
void end(const css::uno::Reference< css::task::XStatusIndicator > &xChild)
static sal_Int32 m_nInReschedule
prevent recursive calling of Application::Reschedule().
css::uno::Reference< css::task::XStatusIndicator > m_xActiveChild
most active indicator child, which could work with our shared indicator window only.
virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > &lArguments) override
IndicatorStack m_aStack
stack with all current indicator children.
void setValue(const css::uno::Reference< css::task::XStatusIndicator > &xChild, sal_Int32 nValue)
void start(const css::uno::Reference< css::task::XStatusIndicator > &xChild, const OUString &sText, sal_Int32 nRange)
virtual sal_Bool SAL_CALL supportsService(OUString const &ServiceName) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
StatusIndicatorFactory(css::uno::Reference< css::uno::XComponentContext > xContext)
virtual OUString SAL_CALL getImplementationName() override
void impl_reschedule(bool bForceUpdate)
try to "share the current thread in an intelligent manner" :-)
void impl_showProgress()
shows the internal used progress.
css::uno::WeakReference< css::frame::XFrame > m_xFrame
points to the frame, where we show the progress (in case m_xProgress points to a frame progress.
css::uno::Reference< css::task::XStatusIndicator > m_xProgress
used to show the progress on the frame (layouted!) or as a plugged vcl window.
virtual css::uno::Reference< css::task::XStatusIndicator > SAL_CALL createStatusIndicator() override
rtl::Reference< WakeUpThread > m_pWakeUp
Notify us if a fix time is over.
void implts_makeParentVisibleIfAllowed()
show the parent window of this progress ... if it's allowed to do so.
void impl_stopWakeUpThread()
void impl_createProgress()
creates a new internal used progress.
css::uno::WeakReference< css::awt::XWindow > m_xPluggWindow
points to an outside window, where we show the progress (in case we are plugged into such window).
void impl_hideProgress()
hides the internal used progress.
void reset(const css::uno::Reference< css::task::XStatusIndicator > &xChild)
bool m_bAllowParentShow
enable/disable automatic showing of our parent window.
css::uno::Reference< css::uno::XComponentContext > m_xContext
uno service manager to create own needed uno resources.
virtual ~StatusIndicatorFactory() override
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
::std::vector< IndicatorInfo > IndicatorStack
@descr Define a list of child indicator objects and its data.
@descr This struct hold some information about all currently running progress processes.
bool operator==(const css::uno::Reference< css::task::XStatusIndicator > &xIndicator) const
Used to locate an info struct inside a stl structure...
css::uno::Reference< css::task::XStatusIndicator > m_xIndicator
points to the indicator child, where we hold its states alive here.
sal_Int32 m_nValue
the last set value for this indicator
OUString m_sText
the last set text for this indicator
IndicatorInfo(const css::uno::Reference< css::task::XStatusIndicator > &xIndicator, const OUString &sText)
initialize new instance of this class