20#include <statusindicator.hxx>
22#include <com/sun/star/awt/PosSize.hpp>
23#include <com/sun/star/awt/XFixedText.hpp>
24#include <com/sun/star/uno/XComponentContext.hpp>
28#include <progressbar.hxx>
30using namespace ::
cppu;
47 : BaseContainerControl ( rxContext )
54 m_xText.set( rxContext->getServiceManager()->createInstanceWithContext(
FIXEDTEXT_SERVICENAME, rxContext ), UNO_QUERY );
58 css::uno::Reference< XControl > xTextControl ( m_xText , UNO_QUERY );
59 xTextControl->setModel( css::uno::Reference< XControlModel >( rxContext->getServiceManager()->createInstanceWithContext(
FIXEDTEXT_MODELNAME, rxContext ), UNO_QUERY ) );
65 m_xProgressBar->setVisible(
true );
68 m_xText->setText(
"" );
81 Any aReturn ( ::cppu::queryInterface( rType ,
82 static_cast< XLayoutConstrains*
> (
this ) ,
83 static_cast< XStatusIndicator*
> (
this )
88 if ( !aReturn.hasValue() )
123 static OTypeCollection ourTypeCollection(
128 return ourTypeCollection.getTypes();
153 m_xText->setText( OUString() );
189 m_xText->setText( OUString() );
205 ClearableMutexGuard aGuard (
m_aMutex );
208 css::uno::Reference< XLayoutConstrains > xTextLayout (
m_xText, UNO_QUERY );
209 Size aTextSize = xTextLayout->getPreferredSize();
228 return Size ( nWidth, nHeight );
241 const css::uno::Reference< XToolkit > & rToolkit,
242 const css::uno::Reference< XWindowPeer > & rParent
271 return css::uno::Reference< XControlModel > ();
282 css::uno::Reference< XControl > xTextControl (
m_xText , UNO_QUERY );
289 xTextControl->dispose();
309 ( nWidth != aBasePosSize.Width ) ||
310 ( nHeight != aBasePosSize.Height)
327 WindowDescriptor aDescriptor;
329 aDescriptor.Type = WindowClass_SIMPLE;
330 aDescriptor.WindowServiceName =
"floatingwindow";
331 aDescriptor.ParentIndex = -1;
332 aDescriptor.Parent = xParentPeer;
344 if ( !rGraphics.is () )
355 css::uno::Reference< XControl > xTextControl(
m_xText, UNO_QUERY );
356 xPeer = xTextControl->getPeer();
379 sal_Int32 nX_ProgressBar;
380 sal_Int32 nY_ProgressBar;
381 sal_Int32 nWidth_ProgressBar;
382 sal_Int32 nHeight_ProgressBar;
385 sal_Int32 nWidth_Text;
386 sal_Int32 nHeight_Text;
393 css::uno::Reference< XLayoutConstrains > xTextLayout (
m_xText, UNO_QUERY );
394 Size aTextSize = xTextLayout->getPreferredSize();
408 nWidth_Text = aTextSize.
Width;
409 nHeight_Text = aTextSize.
Height;
412 nY_ProgressBar = nY_Text;
414 nHeight_ProgressBar = nHeight_Text;
417 css::uno::Reference< XWindow > xTextWindow (
m_xText , UNO_QUERY );
419 xTextWindow->setPosSize ( nX_Text , nY_Text , nWidth_Text , nHeight_Text , 15 );
420 m_xProgressBar->setPosSize( nX_ProgressBar, nY_ProgressBar, nWidth_ProgressBar, nHeight_ProgressBar, 15 );
425extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
427 css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any>
const&)
constexpr tools::Long Height() const
constexpr tools::Long Width() const
mutable::osl::Mutex m_aMutex
virtual void SAL_CALL dispose() override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
get information about supported interfaces @seealso XTypeProvider
virtual void SAL_CALL createPeer(const css::uno::Reference< css::awt::XToolkit > &xToolkit, const css::uno::Reference< css::awt::XWindowPeer > &xParent) override
virtual void SAL_CALL setVisible(sal_Bool bVisible) override
virtual void SAL_CALL removeControl(const css::uno::Reference< css::awt::XControl > &xControl) override
sal_Int32 impl_getWidth() const
const css::uno::Reference< css::awt::XWindow > & impl_getPeerWindow() const
virtual void SAL_CALL setPosSize(sal_Int32 nX, sal_Int32 nY, sal_Int32 nWidth, sal_Int32 nHeight, sal_Int16 nFlags) override
sal_Int32 impl_getHeight() const
const css::uno::Reference< css::awt::XGraphics > & impl_getGraphicsPeer() const
virtual void SAL_CALL release() noexcept override
decrement refcount @seealso XInterface @seealso acquire() @onerror A RuntimeException is thrown.
virtual css::uno::Reference< css::awt::XWindowPeer > SAL_CALL getPeer() override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &aType) override
give answer, if interface is supported @descr The interfaces are searched by type.
virtual css::awt::Rectangle SAL_CALL getPosSize() override
virtual void SAL_CALL acquire() noexcept override
increment refcount @seealso XInterface @seealso release() @onerror A RuntimeException is thrown.
virtual css::uno::Reference< css::awt::XControlModel > SAL_CALL getModel() override
virtual void SAL_CALL acquire() noexcept override
increment refcount @seealso XInterface @seealso release() @onerror A RuntimeException is thrown.
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
get information about supported interfaces @seealso XTypeProvider
virtual void SAL_CALL reset() override
virtual void SAL_CALL setText(const OUString &sText) override
virtual void SAL_CALL setValue(sal_Int32 nValue) override
virtual void SAL_CALL release() noexcept override
decrement refcount @seealso XInterface @seealso acquire() @onerror A RuntimeException is thrown.
virtual ~StatusIndicator() override
virtual sal_Bool SAL_CALL setModel(const css::uno::Reference< css::awt::XControlModel > &xModel) override
virtual void SAL_CALL setPosSize(sal_Int32 nX, sal_Int32 nY, sal_Int32 nWidth, sal_Int32 nHeight, sal_Int16 nFlags) override
virtual void SAL_CALL start(const OUString &sText, sal_Int32 nRange) override
virtual css::awt::Size SAL_CALL getPreferredSize() override
StatusIndicator(const css::uno::Reference< css::uno::XComponentContext > &rxContext)
css::uno::Reference< css::awt::XFixedText > m_xText
virtual css::awt::Size SAL_CALL calcAdjustedSize(const css::awt::Size &aNewSize) override
virtual css::awt::Size SAL_CALL getMinimumSize() override
virtual void impl_paint(sal_Int32 nX, sal_Int32 nY, const css::uno::Reference< css::awt::XGraphics > &rGraphics) override
virtual css::awt::WindowDescriptor impl_getWindowDescriptor(const css::uno::Reference< css::awt::XWindowPeer > &xParentPeer) override
virtual void SAL_CALL dispose() override
virtual void SAL_CALL createPeer(const css::uno::Reference< css::awt::XToolkit > &xToolkit, const css::uno::Reference< css::awt::XWindowPeer > &xParent) override
virtual void SAL_CALL end() override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &aType) override
give answer, if interface is supported @descr The interfaces are searched by type.
rtl::Reference< ProgressBar > m_xProgressBar
virtual void impl_recalcLayout(const css::awt::WindowEvent &aEvent) override
if(aStr !=aBuf) UpdateName_Impl(m_xFollowLb.get()
constexpr auto STATUSINDICATOR_FREEBORDER
constexpr auto STATUSINDICATOR_DEFAULT_WIDTH
constexpr auto STATUSINDICATOR_DEFAULT_HEIGHT
constexpr sal_Int32 STATUSINDICATOR_BACKGROUNDCOLOR
constexpr sal_Int32 STATUSINDICATOR_LINECOLOR_SHADOW
constexpr sal_Int32 STATUSINDICATOR_LINECOLOR_BRIGHT
constexpr OUStringLiteral FIXEDTEXT_SERVICENAME
constexpr OUStringLiteral CONTROLNAME_PROGRESSBAR
constexpr OUStringLiteral FIXEDTEXT_MODELNAME
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * stardiv_UnoControls_StatusIndicator_get_implementation(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &)
constexpr OUStringLiteral CONTROLNAME_TEXT