Coverage Report

Created: 2026-02-14 09:37

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/include/vcl/toolkit/longcurr.hxx
Line
Count
Source
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
#if !defined(VCL_DLLIMPLEMENTATION) && !defined(TOOLKIT_DLLIMPLEMENTATION) && !defined(VCL_INTERNALS)
23
#error "don't use this in new code"
24
#endif
25
26
#include <config_options.h>
27
#include <vcl/dllapi.h>
28
#include <tools/bigint.hxx>
29
#include <vcl/toolkit/field.hxx>
30
31
class LocaleDataWrapper;
32
33
class UNLESS_MERGELIBS(VCL_DLLPUBLIC) LongCurrencyFormatter : public FormatterBase
34
{
35
public:
36
                            virtual ~LongCurrencyFormatter() override;
37
38
    virtual void            Reformat() override;
39
    virtual void            ReformatAll() override;
40
41
    OUString const &        GetCurrencySymbol() const;
42
43
0
    static sal_uInt16       GetDecimalDigits() { return 0;}
44
    void                    SetValue(const BigInt& rNewValue);
45
    void                    SetUserValue( BigInt nNewValue );
46
    BigInt                  GetValue() const;
47
48
protected:
49
    BigInt                  mnLastValue;
50
    BigInt                  mnMin;
51
    BigInt                  mnMax;
52
53
                            LongCurrencyFormatter(Edit* pEdit);
54
private:
55
    friend bool ImplLongCurrencyReformat( const OUString&, BigInt const &, BigInt const &, sal_uInt16, const LocaleDataWrapper&, OUString&, LongCurrencyFormatter const & );
56
    SAL_DLLPRIVATE void        ImpInit();
57
};
58
59
class UNLESS_MERGELIBS(VCL_DLLPUBLIC) LongCurrencyBox final : public ComboBox, public LongCurrencyFormatter
60
{
61
public:
62
                    LongCurrencyBox( vcl::Window* pParent, WinBits nWinStyle );
63
64
    virtual bool    EventNotify( NotifyEvent& rNEvt ) override;
65
66
    void            Modify() override;
67
    void            ReformatAll() override;
68
};
69
70
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */