Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / include / vcl / toolkit / longcurr.hxx
blob3206f39806c815f13aff487540b2a1e1489b1e46
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 #pragma once
22 #if !defined(VCL_DLLIMPLEMENTATION) && !defined(TOOLKIT_DLLIMPLEMENTATION) && !defined(VCL_INTERNALS)
23 #error "don't use this in new code"
24 #endif
26 #include <config_options.h>
27 #include <vcl/dllapi.h>
28 #include <tools/bigint.hxx>
29 #include <vcl/toolkit/field.hxx>
31 class LocaleDataWrapper;
33 class UNLESS_MERGELIBS(VCL_DLLPUBLIC) LongCurrencyFormatter : public FormatterBase
35 public:
36 virtual ~LongCurrencyFormatter() override;
38 virtual void Reformat() override;
39 virtual void ReformatAll() override;
41 OUString const & GetCurrencySymbol() const;
43 void SetDecimalDigits( sal_uInt16 nDigits );
44 sal_uInt16 GetDecimalDigits() const { return mnDecimalDigits;}
45 void SetValue(const BigInt& rNewValue);
46 void SetUserValue( BigInt nNewValue );
47 BigInt GetValue() const;
49 protected:
50 BigInt mnLastValue;
51 BigInt mnMin;
52 BigInt mnMax;
54 LongCurrencyFormatter(Edit* pEdit);
55 private:
56 friend bool ImplLongCurrencyReformat( const OUString&, BigInt const &, BigInt const &, sal_uInt16, const LocaleDataWrapper&, OUString&, LongCurrencyFormatter const & );
57 SAL_DLLPRIVATE void ImpInit();
59 sal_uInt16 mnDecimalDigits;
63 class UNLESS_MERGELIBS(VCL_DLLPUBLIC) LongCurrencyBox final : public ComboBox, public LongCurrencyFormatter
65 public:
66 LongCurrencyBox( vcl::Window* pParent, WinBits nWinStyle );
68 virtual bool EventNotify( NotifyEvent& rNEvt ) override;
70 void Modify() override;
71 void ReformatAll() override;
74 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */