LibreOffice Module framework (master) 1
statusindicator.hxx
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
20#pragma once
21
22// include files of own module
24
25// include UNO interfaces
26#include <com/sun/star/task/XStatusIndicator.hpp>
27
28// include all others
31
32namespace framework{
33
50class StatusIndicator final : public ::cppu::WeakImplHelper< css::task::XStatusIndicator >
51{
52
53 // member
54 private:
55
64 css::uno::WeakReference< css::task::XStatusIndicatorFactory > m_xFactory;
65
66 sal_Int32 m_nRange;
67 // We want the callback percentages to increase monotonically
69
70 // c++ interface
71 public:
72
79
82 virtual ~StatusIndicator() override;
83
84 // uno interface
85 public:
86
87 // XStatusIndicator
88 virtual void SAL_CALL start(const OUString& sText ,
89 sal_Int32 nRange) override;
90
91 virtual void SAL_CALL end() override;
92
93 virtual void SAL_CALL reset() override;
94
95 virtual void SAL_CALL setText(const OUString& sText) override;
96
97 virtual void SAL_CALL setValue(sal_Int32 nValue) override;
98
99}; // class StatusIndicator
100
101} // namespace framework
102
103/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
implement a factory service to create new status indicator objects
implement a status indicator object
virtual void SAL_CALL start(const OUString &sText, sal_Int32 nRange) override
virtual void SAL_CALL setText(const OUString &sText) override
virtual void SAL_CALL reset() override
virtual void SAL_CALL end() override
virtual ~StatusIndicator() override
does nothing real...
css::uno::WeakReference< css::task::XStatusIndicatorFactory > m_xFactory
weak reference to our factory @descr All our interface calls will be forwarded to a suitable c++ inte...
StatusIndicator(StatusIndicatorFactory *pFactory)
initialize new instance of this class.
virtual void SAL_CALL setValue(sal_Int32 nValue) override