fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / framework / source / uielement / statusindicatorinterfacewrapper.cxx
blob9108ceb13fc4e0aabfc74dc00c1c8a1a5c5174dc
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <uielement/statusindicatorinterfacewrapper.hxx>
21 #include <uielement/progressbarwrapper.hxx>
23 #include <vcl/svapp.hxx>
24 #include <osl/mutex.hxx>
26 using namespace cppu;
27 using namespace com::sun::star::uno;
28 using namespace com::sun::star::lang;
29 using namespace com::sun::star::beans;
31 namespace framework
34 StatusIndicatorInterfaceWrapper::StatusIndicatorInterfaceWrapper(
35 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& rStatusIndicatorImpl ) :
36 m_xStatusIndicatorImpl( rStatusIndicatorImpl )
40 StatusIndicatorInterfaceWrapper::~StatusIndicatorInterfaceWrapper()
44 void SAL_CALL StatusIndicatorInterfaceWrapper::start(
45 const OUString& sText,
46 sal_Int32 nRange )
47 throw( ::com::sun::star::uno::RuntimeException, std::exception )
49 Reference< XComponent > xComp( m_xStatusIndicatorImpl );
50 if ( xComp.is() )
52 ProgressBarWrapper* pProgressBar = static_cast<ProgressBarWrapper*>(xComp.get());
53 if ( pProgressBar )
54 pProgressBar->start( sText, nRange );
58 void SAL_CALL StatusIndicatorInterfaceWrapper::end()
59 throw( ::com::sun::star::uno::RuntimeException, std::exception )
61 Reference< XComponent > xComp( m_xStatusIndicatorImpl );
62 if ( xComp.is() )
64 ProgressBarWrapper* pProgressBar = static_cast<ProgressBarWrapper*>(xComp.get());
65 if ( pProgressBar )
66 pProgressBar->end();
70 void SAL_CALL StatusIndicatorInterfaceWrapper::reset()
71 throw( ::com::sun::star::uno::RuntimeException, std::exception )
73 Reference< XComponent > xComp( m_xStatusIndicatorImpl );
74 if ( xComp.is() )
76 ProgressBarWrapper* pProgressBar = static_cast<ProgressBarWrapper*>(xComp.get());
77 if ( pProgressBar )
78 pProgressBar->reset();
82 void SAL_CALL StatusIndicatorInterfaceWrapper::setText(
83 const OUString& sText )
84 throw( ::com::sun::star::uno::RuntimeException, std::exception )
86 Reference< XComponent > xComp( m_xStatusIndicatorImpl );
87 if ( xComp.is() )
89 ProgressBarWrapper* pProgressBar = static_cast<ProgressBarWrapper*>(xComp.get());
90 if ( pProgressBar )
91 pProgressBar->setText( sText );
95 void SAL_CALL StatusIndicatorInterfaceWrapper::setValue(
96 sal_Int32 nValue )
97 throw( ::com::sun::star::uno::RuntimeException, std::exception )
99 Reference< XComponent > xComp( m_xStatusIndicatorImpl );
100 if ( xComp.is() )
102 ProgressBarWrapper* pProgressBar = static_cast<ProgressBarWrapper*>(xComp.get());
103 if ( pProgressBar )
104 pProgressBar->setValue( nValue );
108 } // namespace framework
110 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */