21#include <com/sun/star/task/XStatusIndicator.hpp>
31ProgressHandlerWrap::ProgressHandlerWrap( css::uno::Reference< css::task::XStatusIndicator > xSI )
32: m_xStatusIndicator(
std::move( xSI ))
38 bool bNumIsSet =
false;
40 Sequence< Any > aSetList;
41 if( aAny >>= aSetList )
42 for(
const auto&
rSet : std::as_const(aSetList) )
44 if( !bNumIsSet && (
rSet >>= nNum ) )
47 aText.isEmpty() && (
rSet >>= aText );
53void SAL_CALL ProgressHandlerWrap::push(
const Any&
Status )
55 if( !m_xStatusIndicator.is() )
62 m_xStatusIndicator->start( aText, nRange );
65void SAL_CALL ProgressHandlerWrap::update(
const Any&
Status )
67 if( !m_xStatusIndicator.is() )
75 if( !aText.isEmpty() ) m_xStatusIndicator->setText( aText );
76 m_xStatusIndicator->setValue( nValue );
80void SAL_CALL ProgressHandlerWrap::pop()
82 if( m_xStatusIndicator.is() )
83 m_xStatusIndicator->end();
static bool getStatusFromAny_Impl(const Any &aAny, OUString &aText, sal_Int32 &nNum)