LibreOffice Module toolkit (master) 1
formattedcontrol.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
24
25namespace com::sun::star::util { class XNumberFormatter; }
26
27
28namespace toolkit
29{
30
31
32 // = UnoControlFormattedFieldModel
33
35 {
36 public:
37 UnoControlFormattedFieldModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
39 : UnoControlModel(rModel)
40 , m_bRevokedAsClient(false)
42 {
43 }
44
46
47 // css::io::XPersistObject
48 OUString SAL_CALL getServiceName() override;
49
50 // css::beans::XMultiPropertySet
51 css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override;
52
53
54 // css::lang::XServiceInfo
55 OUString SAL_CALL getImplementationName() override;
56
57 css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
58
59 private:
60 virtual ~UnoControlFormattedFieldModel() override;
61
62 // XComponent
63 void SAL_CALL dispose() override;
64
65 // XPropertySet
66 void SAL_CALL setPropertyValues( const css::uno::Sequence< OUString >& PropertyNames, const css::uno::Sequence< css::uno::Any >& Values ) override;
67
68 // UnoControlModel
70 const sal_Int32 _nCount,
71 sal_Int32* _pHandles,
72 css::uno::Any* _pValues,
73 sal_Int32* _pValidHandles
74 ) const override;
75 void impl_updateTextFromValue_nothrow(std::unique_lock<std::mutex>& rGuard);
76 void impl_updateCachedFormatter_nothrow(std::unique_lock<std::mutex>& rGuard);
77 void impl_updateCachedFormatKey_nothrow(std::unique_lock<std::mutex>& rGuard);
78
79 css::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const override;
82 std::unique_lock<std::mutex>& rGuard,
83 css::uno::Any& rConvertedValue,
84 css::uno::Any& rOldValue,
85 sal_Int32 nPropId,
86 const css::uno::Any& rValue
87 ) override;
88
90 std::unique_lock<std::mutex>& rGuard,
91 sal_Int32 nHandle,
92 const css::uno::Any& rValue
93 ) override;
94
95 css::uno::Any m_aCachedFormat;
98 css::uno::Reference< css::util::XNumberFormatter >
100 };
101
102
103 // = UnoFormattedFieldControl
104
106 {
107 public:
109 OUString GetComponentServiceName() const override;
110
111 // css::awt::XTextListener
112 void SAL_CALL textChanged( const css::awt::TextEvent& rEvent ) override;
113
114 // css::lang::XServiceInfo
115 OUString SAL_CALL getImplementationName() override;
116
117 css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
118 };
119
120
121} // namespace toolkit
122
123
124/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void ImplNormalizePropertySequence(const sal_Int32 _nCount, sal_Int32 *_pHandles, css::uno::Any *_pValues, sal_Int32 *_pValidHandles) const override
called before setting multiple properties, allows to care for property dependencies
OUString SAL_CALL getImplementationName() override
css::uno::Any ImplGetDefaultValue(sal_uInt16 nPropId) const override
rtl::Reference< UnoControlModel > Clone() const override
css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
::cppu::IPropertyArrayHelper & getInfoHelper() override
UnoControlFormattedFieldModel(const css::uno::Reference< css::uno::XComponentContext > &rxContext)
UnoControlFormattedFieldModel(const UnoControlFormattedFieldModel &rModel)
css::uno::Reference< css::util::XNumberFormatter > m_xCachedFormatter
void setFastPropertyValue_NoBroadcast(std::unique_lock< std::mutex > &rGuard, sal_Int32 nHandle, const css::uno::Any &rValue) override
void impl_updateCachedFormatter_nothrow(std::unique_lock< std::mutex > &rGuard)
void SAL_CALL setPropertyValues(const css::uno::Sequence< OUString > &PropertyNames, const css::uno::Sequence< css::uno::Any > &Values) override
OUString SAL_CALL getServiceName() override
bool convertFastPropertyValue(std::unique_lock< std::mutex > &rGuard, css::uno::Any &rConvertedValue, css::uno::Any &rOldValue, sal_Int32 nPropId, const css::uno::Any &rValue) override
void impl_updateCachedFormatKey_nothrow(std::unique_lock< std::mutex > &rGuard)
css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
void impl_updateTextFromValue_nothrow(std::unique_lock< std::mutex > &rGuard)
void SAL_CALL textChanged(const css::awt::TextEvent &rEvent) override
OUString GetComponentServiceName() const override
css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
OUString SAL_CALL getImplementationName() override