LibreOffice Module framework (master) 1
statusindicatorinterfacewrapper.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
22
23using namespace cppu;
24using namespace com::sun::star::uno;
25using namespace com::sun::star::lang;
26using namespace com::sun::star::beans;
27
28namespace framework
29{
30
32 const css::uno::Reference< css::lang::XComponent >& rStatusIndicatorImpl ) :
33 m_xStatusIndicatorImpl( rStatusIndicatorImpl )
34{
35}
36
38{
39}
40
42 const OUString& sText,
43 sal_Int32 nRange )
44{
46 if ( xComp.is() )
47 {
48 ProgressBarWrapper* pProgressBar = static_cast<ProgressBarWrapper*>(xComp.get());
49 if ( pProgressBar )
50 pProgressBar->start( sText, nRange );
51 }
52}
53
55{
57 if ( xComp.is() )
58 {
59 ProgressBarWrapper* pProgressBar = static_cast<ProgressBarWrapper*>(xComp.get());
60 if ( pProgressBar )
61 pProgressBar->end();
62 }
63}
64
66{
68 if ( xComp.is() )
69 {
70 ProgressBarWrapper* pProgressBar = static_cast<ProgressBarWrapper*>(xComp.get());
71 if ( pProgressBar )
72 pProgressBar->reset();
73 }
74}
75
77 const OUString& sText )
78{
80 if ( xComp.is() )
81 {
82 ProgressBarWrapper* pProgressBar = static_cast<ProgressBarWrapper*>(xComp.get());
83 if ( pProgressBar )
84 pProgressBar->setText( sText );
85 }
86}
87
89 sal_Int32 nValue )
90{
92 if ( xComp.is() )
93 {
94 ProgressBarWrapper* pProgressBar = static_cast<ProgressBarWrapper*>(xComp.get());
95 if ( pProgressBar )
96 pProgressBar->setValue( nValue );
97 }
98}
99
100} // namespace framework
101
102/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void start(const OUString &Text, ::sal_Int32 Range)
void setValue(::sal_Int32 Value)
void setText(const OUString &Text)
virtual void SAL_CALL start(const OUString &sText, sal_Int32 nRange) override
virtual void SAL_CALL setValue(sal_Int32 nValue) override
StatusIndicatorInterfaceWrapper(const css::uno::Reference< css::lang::XComponent > &rStatusIndicatorImpl)
css::uno::WeakReference< css::lang::XComponent > m_xStatusIndicatorImpl
virtual void SAL_CALL setText(const OUString &sText) override
sal_Int16 nValue