LibreOffice Module vcl (master) 1
field.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#if !defined(VCL_DLLIMPLEMENTATION) && !defined(TOOLKIT_DLLIMPLEMENTATION) && !defined(VCL_INTERNALS)
23#error "don't use this in new code"
24#endif
25
26#include <sal/config.h>
27
28#include <string_view>
29
30#include <config_options.h>
31#include <tools/date.hxx>
32#include <tools/fldunit.hxx>
33#include <tools/time.hxx>
36#include <vcl/formatter.hxx>
37
38namespace com::sun::star::lang { struct Locale; }
39
40class CalendarWrapper;
42class LanguageTag;
43
45{
46private:
48 mutable std::unique_ptr<LocaleDataWrapper>
54
55protected:
56 SAL_DLLPRIVATE void ImplSetText( const OUString& rText, Selection const * pNewSel = nullptr );
57 SAL_DLLPRIVATE bool ImplGetEmptyFieldValue() const { return mbEmptyFieldValue; }
58
59 void SetEmptyFieldValueData( bool bValue ) { mbEmptyFieldValue = bValue; }
60
61 SAL_DLLPRIVATE LocaleDataWrapper& ImplGetLocaleDataWrapper() const;
63 SAL_DLLPRIVATE void ImplResetLocaleDataWrapper() const;
64
65 Edit* GetField() const { return mpField; }
66 void ClearField() { mpField.clear(); }
67
68public:
69 explicit FormatterBase(Edit* pField);
70 virtual ~FormatterBase();
71
73
74 bool MustBeReformatted() const { return mbReformat; }
75 void MarkToBeReformatted( bool b ) { mbReformat = b; }
76
77 void SetStrictFormat( bool bStrict );
78 bool IsStrictFormat() const { return mbStrictFormat; }
79
80 virtual void Reformat();
81 virtual void ReformatAll();
82
83 const css::lang::Locale& GetLocale() const;
84 const LanguageTag& GetLanguageTag() const;
85
86 void SetEmptyFieldValue();
87 bool IsEmptyFieldValue() const;
88
89 void EnableEmptyFieldValue( bool bEnable ) { mbEmptyFieldValueEnabled = bEnable; }
90 bool IsEmptyFieldValueEnabled() const { return mbEmptyFieldValueEnabled; }
91};
92
94{
95public:
96 virtual ~NumericFormatter() override;
97
98 virtual void Reformat() override;
99
100 void SetMin( sal_Int64 nNewMin );
101 sal_Int64 GetMin() const { return mnMin; }
102 void SetMax( sal_Int64 nNewMax );
103 sal_Int64 GetMax() const { return mnMax; }
104
105 sal_Int64 ClipAgainstMinMax(sal_Int64 nValue) const;
106
107 void SetFirst( sal_Int64 nNewFirst ) { mnFirst = nNewFirst; }
108 sal_Int64 GetFirst() const { return mnFirst; }
109 void SetLast( sal_Int64 nNewLast ) { mnLast = nNewLast; }
110 sal_Int64 GetLast() const { return mnLast; }
111 void SetSpinSize( sal_Int64 nNewSize ) { mnSpinSize = nNewSize; }
112 sal_Int64 GetSpinSize() const { return mnSpinSize; }
113
114 void SetDecimalDigits( sal_uInt16 nDigits );
115 sal_uInt16 GetDecimalDigits() const { return mnDecimalDigits;}
116
117 void SetUseThousandSep( bool b );
118 bool IsUseThousandSep() const { return mbThousandSep; }
119
120 void SetUserValue( sal_Int64 nNewValue );
121 virtual void SetValue( sal_Int64 nNewValue );
122 sal_Int64 GetValue() const;
123 virtual OUString CreateFieldText( sal_Int64 nValue ) const;
124
125 sal_Int64 Normalize( sal_Int64 nValue ) const;
126 sal_Int64 Denormalize( sal_Int64 nValue ) const;
127
128 OUString GetValueString() const;
129 void SetValueFromString(const OUString& rStr);
130
131protected:
132 sal_Int64 mnLastValue;
133 sal_Int64 mnMin;
134 sal_Int64 mnMax;
136
137 // the members below are used in all derivatives of NumericFormatter
138 // not in NumericFormatter itself.
139 sal_Int64 mnSpinSize;
140 sal_Int64 mnFirst;
141 sal_Int64 mnLast;
142
143 NumericFormatter(Edit* pEdit);
144
145 void FieldUp();
146 void FieldDown();
147 void FieldFirst();
148 void FieldLast();
149 void FormatValue(Selection const * pNewSelection = nullptr);
150
151 SAL_DLLPRIVATE void ImplNumericReformat();
152 SAL_DLLPRIVATE void ImplNewFieldValue( sal_Int64 nNewValue );
153 SAL_DLLPRIVATE void ImplSetUserValue( sal_Int64 nNewValue, Selection const * pNewSelection = nullptr );
154
155 virtual sal_Int64 GetValueFromString(const OUString& rStr) const;
156
157private:
158 sal_uInt16 mnDecimalDigits;
160
161};
162
164{
165public:
166 virtual ~MetricFormatter() override;
167
168 virtual void Reformat() override;
169
170 virtual void SetUnit( FieldUnit meUnit );
171 FieldUnit GetUnit() const { return meUnit; }
172 void SetCustomUnitText( const OUString& rStr );
173 const OUString& GetCustomUnitText() const { return maCustomUnitText; }
174
176 void SetMax( sal_Int64 nNewMax, FieldUnit eInUnit );
178 sal_Int64 GetMax( FieldUnit eOutUnit ) const;
180 void SetMin( sal_Int64 nNewMin, FieldUnit eInUnit );
182 sal_Int64 GetMin( FieldUnit eOutUnit ) const;
183
184 void SetValue( sal_Int64 nNewValue, FieldUnit eInUnit );
185 virtual void SetValue( sal_Int64 nValue ) override;
187 void SetUserValue( sal_Int64 nNewValue, FieldUnit eInUnit );
189 sal_Int64 GetValue( FieldUnit eOutUnit ) const;
190 virtual OUString CreateFieldText( sal_Int64 nValue ) const override;
191 sal_Int64 GetCorrectedValue( FieldUnit eOutUnit ) const;
192
193protected:
195
196 MetricFormatter(Edit* pEdit);
197
198 SAL_DLLPRIVATE void ImplMetricReformat( const OUString& rStr, double& rValue, OUString& rOutStr );
199
200 virtual sal_Int64 GetValueFromString(const OUString& rStr) const override;
201 sal_Int64 GetValueFromStringUnit(const OUString& rStr, FieldUnit eOutUnit) const;
202
203private:
205};
206
208{
209public:
210 explicit MetricField( vcl::Window* pParent, WinBits nWinStyle );
211
212 virtual bool PreNotify( NotifyEvent& rNEvt ) override;
213 virtual bool EventNotify( NotifyEvent& rNEvt ) override;
214 virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
215
216 virtual Size CalcMinimumSize() const override;
217
218 virtual void Modify() override;
219
220 virtual void Up() override;
221 virtual void Down() override;
222 virtual void First() override;
223 virtual void Last() override;
224
225 virtual void SetUnit( FieldUnit meUnit ) override;
226
227 void SetFirst( sal_Int64 nNewFirst, FieldUnit eInUnit );
228 sal_Int64 GetFirst( FieldUnit eOutUnit ) const;
229 void SetLast( sal_Int64 nNewLast, FieldUnit eInUnit );
230 sal_Int64 GetLast( FieldUnit eOutUnit ) const;
231
232 virtual bool set_property(const OString &rKey, const OUString &rValue) override;
233 virtual void dispose() override;
234
235 virtual void DumpAsPropertyTree(tools::JsonWriter&) override;
236 virtual FactoryFunction GetUITestFactory() const override;
237};
238
240{
241public:
242 explicit MetricBox( vcl::Window* pParent, WinBits nWinStyle );
243
244 virtual bool PreNotify( NotifyEvent& rNEvt ) override;
245 virtual bool EventNotify( NotifyEvent& rNEvt ) override;
246 virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
247
248 virtual Size CalcMinimumSize() const override;
249
250 virtual void Modify() override;
251
252 virtual void ReformatAll() override;
253
254 // Needed, because GetValue() with nPos hide these functions
256
257 virtual void dispose() override;
258};
259
260class UNLESS_MERGELIBS(VCL_DLLPUBLIC) CurrencyFormatter : public NumericFormatter
261{
262protected:
263 CurrencyFormatter(Edit* pEdit);
264 SAL_DLLPRIVATE void ImplCurrencyReformat( const OUString& rStr, OUString& rOutStr );
265 virtual sal_Int64 GetValueFromString(const OUString& rStr) const override;
266
267public:
268 virtual ~CurrencyFormatter() override;
269
270 virtual void Reformat() override;
271
272 virtual void SetValue( sal_Int64 nNewValue ) override;
273 virtual OUString CreateFieldText( sal_Int64 nValue ) const override;
274};
275
276class UNLESS_MERGELIBS(VCL_DLLPUBLIC) CurrencyField final : public SpinField, public CurrencyFormatter
277{
278public:
279 CurrencyField( vcl::Window* pParent, WinBits nWinStyle );
280
281 virtual bool PreNotify( NotifyEvent& rNEvt ) override;
282 virtual bool EventNotify( NotifyEvent& rNEvt ) override;
283 virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
284
285 virtual void Modify() override;
286
287 virtual void Up() override;
288 virtual void Down() override;
289 virtual void First() override;
290 virtual void Last() override;
291 virtual void dispose() override;
292};
293
294class UNLESS_MERGELIBS(VCL_DLLPUBLIC) TimeFormatter : public FormatterBase
295{
296private:
297 tools::Time maLastTime;
298 tools::Time maMin;
299 tools::Time maMax;
300 TimeFieldFormat meFormat;
301 TimeFormat mnTimeFormat;
302 bool mbDuration;
303 bool mbEnforceValidValue;
304
305protected:
306 tools::Time maFieldTime;
307
308 TimeFormatter(Edit* pEdit);
309
310 SAL_DLLPRIVATE void ImplTimeReformat( std::u16string_view rStr, OUString& rOutStr );
311 SAL_DLLPRIVATE void ImplNewFieldValue( const tools::Time& rTime );
312 SAL_DLLPRIVATE void ImplSetUserTime( const tools::Time& rNewTime, Selection const * pNewSelection = nullptr );
313 SAL_DLLPRIVATE bool ImplAllowMalformedInput() const;
314
315public:
316 static OUString FormatTime(const tools::Time& rNewTime, TimeFieldFormat eFormat, TimeFormat eHourFormat, bool bDuration, const LocaleDataWrapper& rLocaleData);
317 static bool TextToTime(std::u16string_view rStr, tools::Time& rTime, TimeFieldFormat eFormat, bool bDuration, const LocaleDataWrapper& rLocaleDataWrapper, bool _bSkipInvalidCharacters = true);
318 static int GetTimeArea(TimeFieldFormat eFormat, std::u16string_view rText, int nCursor,
319 const LocaleDataWrapper& rLocaleDataWrapper);
320 static tools::Time SpinTime(bool bUp, const tools::Time& rTime, TimeFieldFormat eFormat,
321 bool bDuration, std::u16string_view rText, int nCursor,
322 const LocaleDataWrapper& rLocaleDataWrapper);
323
324 virtual ~TimeFormatter() override;
325
326 virtual void Reformat() override;
327 virtual void ReformatAll() override;
328
329 void SetMin( const tools::Time& rNewMin );
330 const tools::Time& GetMin() const { return maMin; }
331 void SetMax( const tools::Time& rNewMax );
332 const tools::Time& GetMax() const { return maMax; }
333
334 void SetTimeFormat( TimeFormat eNewFormat );
335 TimeFormat GetTimeFormat() const { return mnTimeFormat;}
336
337 void SetFormat( TimeFieldFormat eNewFormat );
338 TimeFieldFormat GetFormat() const { return meFormat; }
339
340 void SetDuration( bool mbDuration );
341 bool IsDuration() const { return mbDuration; }
342
343 void SetTime( const tools::Time& rNewTime );
344 void SetUserTime( const tools::Time& rNewTime );
345 tools::Time GetTime() const;
346 void SetEmptyTime() { FormatterBase::SetEmptyFieldValue(); }
347 bool IsEmptyTime() const { return FormatterBase::IsEmptyFieldValue(); }
348
361 void EnforceValidValue( bool _bEnforce ) { mbEnforceValidValue = _bEnforce; }
362 bool IsEnforceValidValue( ) const { return mbEnforceValidValue; }
363};
364
365class UNLESS_MERGELIBS(VCL_DLLPUBLIC) TimeField final : public SpinField, public TimeFormatter
366{
367private:
368 tools::Time maFirst;
369 tools::Time maLast;
370
371 SAL_DLLPRIVATE void ImplTimeSpinArea( bool bUp );
372
373public:
374 explicit TimeField( vcl::Window* pParent, WinBits nWinStyle );
375
376 virtual bool PreNotify( NotifyEvent& rNEvt ) override;
377 virtual bool EventNotify( NotifyEvent& rNEvt ) override;
378 virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
379
380 virtual void Modify() override;
381
382 virtual void Up() override;
383 virtual void Down() override;
384 virtual void First() override;
385 virtual void Last() override;
386
387 void SetFirst( const tools::Time& rNewFirst ) { maFirst = rNewFirst; }
388 const tools::Time& GetFirst() const { return maFirst; }
389 void SetLast( const tools::Time& rNewLast ) { maLast = rNewLast; }
390 const tools::Time& GetLast() const { return maLast; }
391
392 void SetExtFormat( ExtTimeFieldFormat eFormat );
393 virtual void dispose() override;
394};
395
396class UNLESS_MERGELIBS(VCL_DLLPUBLIC) DateFormatter : public FormatterBase
397{
398private:
399 Formatter::StaticFormatter maStaticFormatter;
400 std::unique_ptr<CalendarWrapper> mxCalendarWrapper;
401 Date maFieldDate;
402 Date maLastDate;
403 Date maMin;
404 Date maMax;
405 bool mbLongFormat;
406 bool mbShowDateCentury;
407 ExtDateFieldFormat mnExtDateFormat;
408 bool mbEnforceValidValue;
409
410protected:
411 DateFormatter(Edit* pEdit);
412
413 SAL_DLLPRIVATE const Date& ImplGetFieldDate() const { return maFieldDate; }
414 SAL_DLLPRIVATE void ImplDateReformat( const OUString& rStr, OUString& rOutStr );
415 SAL_DLLPRIVATE void ImplSetUserDate( const Date& rNewDate,
416 Selection const * pNewSelection = nullptr );
417 SAL_DLLPRIVATE OUString ImplGetDateAsText( const Date& rDate ) const;
418 SAL_DLLPRIVATE void ImplNewFieldValue( const Date& rDate );
419 CalendarWrapper& GetCalendarWrapper() const;
420
421 SAL_DLLPRIVATE bool ImplAllowMalformedInput() const;
422
423public:
424 static OUString FormatDate(const Date& rNewDate, ExtDateFieldFormat eFormat, const LocaleDataWrapper& rLocaleData, const Formatter::StaticFormatter& rStaticFormatter);
425 static bool TextToDate(const OUString& rStr, Date& rTime, ExtDateFieldFormat eFormat, const LocaleDataWrapper& rLocaleDataWrapper, const CalendarWrapper& rCalendarWrapper);
426 static int GetDateArea(ExtDateFieldFormat eFormat, std::u16string_view rText, int nCursor, const LocaleDataWrapper& rLocaleDataWrapper);
427
428 virtual ~DateFormatter() override;
429
430 virtual void Reformat() override;
431 virtual void ReformatAll() override;
432
433 void SetExtDateFormat( ExtDateFieldFormat eFormat );
434 ExtDateFieldFormat GetExtDateFormat( bool bResolveSystemFormat = false ) const;
435
436 void SetMin( const Date& rNewMin );
437 const Date& GetMin() const { return maMin; }
438
439 void SetMax( const Date& rNewMax );
440 const Date& GetMax() const { return maMax; }
441
442
443 // MT: Remove these methods too, ExtDateFormat should be enough!
444 // What should happen if using DDMMYYYY, but ShowCentury=false?
445
446 void SetLongFormat( bool bLong );
447 bool IsLongFormat() const { return mbLongFormat; }
448 void SetShowDateCentury( bool bShowCentury );
449 bool IsShowDateCentury() const { return mbShowDateCentury; }
450
451
452 void SetDate( const Date& rNewDate );
453 Date GetDate() const;
454 void SetEmptyDate();
455 bool IsEmptyDate() const;
456
457 void ResetLastDate() { maLastDate = Date( Date::EMPTY ); }
458
459 static void ExpandCentury( Date& rDate );
460 static void ExpandCentury( Date& rDate, sal_uInt16 nTwoDigitYearStart );
461
474 void EnforceValidValue( bool _bEnforce ) { mbEnforceValidValue = _bEnforce; }
475 bool IsEnforceValidValue( ) const { return mbEnforceValidValue; }
476};
477
478class SAL_DLLPUBLIC_RTTI DateField : public SpinField, public DateFormatter
479{
480private:
483
484protected:
485 void ImplDateSpinArea( bool bUp );
486
487public:
488 explicit DateField( vcl::Window* pParent, WinBits nWinStyle );
489
490 virtual bool PreNotify( NotifyEvent& rNEvt ) override;
491 virtual bool EventNotify( NotifyEvent& rNEvt ) override;
492 virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
493
494 virtual void Modify() override;
495
496 virtual void Up() override;
497 virtual void Down() override;
498 virtual void First() override;
499 virtual void Last() override;
500
501 void SetFirst( const Date& rNewFirst ) { maFirst = rNewFirst; }
502 const Date& GetFirst() const { return maFirst; }
503 void SetLast( const Date& rNewLast ) { maLast = rNewLast; }
504 const Date& GetLast() const { return maLast; }
505 virtual void dispose() override;
506};
507
508class UNLESS_MERGELIBS(VCL_DLLPUBLIC) NumericBox final : public ComboBox, public NumericFormatter
509{
510 SAL_DLLPRIVATE void ImplNumericReformat( const OUString& rStr, sal_Int64& rValue, OUString& rOutStr );
511public:
512 explicit NumericBox( vcl::Window* pParent, WinBits nWinStyle );
513
514 virtual Size CalcMinimumSize() const override;
515
516 virtual bool PreNotify( NotifyEvent& rNEvt ) override;
517 virtual bool EventNotify( NotifyEvent& rNEvt ) override;
518 virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
519
520 virtual void Modify() override;
521
522 virtual void ReformatAll() override;
523
524 virtual void dispose() override;
525};
526
527#define PATTERN_FORMAT_EMPTYLITERALS (sal_uInt16(0x0001))
528
529class UNLESS_MERGELIBS(VCL_DLLPUBLIC) PatternFormatter : public FormatterBase
530{
531private:
532 OString m_aEditMask;
533 OUString maLiteralMask;
534 bool mbSameMask;
535 bool mbInPattKeyInput;
536
537protected:
538 PatternFormatter(Edit* pEdit);
539
540 SAL_DLLPRIVATE bool ImplIsSameMask() const { return mbSameMask; }
541 SAL_DLLPRIVATE bool& ImplGetInPattKeyInput() { return mbInPattKeyInput; }
542
543public:
544 virtual ~PatternFormatter() override;
545
546 virtual void Reformat() override;
547
548 void SetMask(const OString& rEditMask, const OUString& rLiteralMask );
549 const OString& GetEditMask() const { return m_aEditMask; }
550 const OUString& GetLiteralMask() const { return maLiteralMask; }
551
552 void SetString( const OUString& rStr );
553 OUString GetString() const;
554};
555
556class UNLESS_MERGELIBS(VCL_DLLPUBLIC) PatternField final : public SpinField, public PatternFormatter
557{
558public:
559 explicit PatternField( vcl::Window* pParent, WinBits nWinStyle );
560
561 virtual bool PreNotify( NotifyEvent& rNEvt ) override;
562 virtual bool EventNotify( NotifyEvent& rNEvt ) override;
563 virtual void Modify() override;
564 virtual void dispose() override;
565};
566
567class UNLESS_MERGELIBS(VCL_DLLPUBLIC) PatternBox final : public ComboBox, public PatternFormatter
568{
569public:
570 PatternBox( vcl::Window* pParent, WinBits nWinStyle );
571
572 virtual bool PreNotify( NotifyEvent& rNEvt ) override;
573 virtual bool EventNotify( NotifyEvent& rNEvt ) override;
574
575 virtual void Modify() override;
576
577 virtual void ReformatAll() override;
578 virtual void dispose() override;
579};
580
581class UNLESS_MERGELIBS(VCL_DLLPUBLIC) CurrencyBox final : public ComboBox, public CurrencyFormatter
582{
583public:
584 explicit CurrencyBox( vcl::Window* pParent, WinBits nWinStyle );
585
586 virtual bool PreNotify( NotifyEvent& rNEvt ) override;
587 virtual bool EventNotify( NotifyEvent& rNEvt ) override;
588 virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
589
590 virtual void Modify() override;
591
592 virtual void ReformatAll() override;
593
594 virtual void dispose() override;
595};
596
597class UNLESS_MERGELIBS(VCL_DLLPUBLIC) DateBox final : public ComboBox, public DateFormatter
598{
599public:
600 explicit DateBox( vcl::Window* pParent, WinBits nWinStyle );
601
602 virtual bool PreNotify( NotifyEvent& rNEvt ) override;
603 virtual bool EventNotify( NotifyEvent& rNEvt ) override;
604 virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
605
606 virtual void Modify() override;
607
608 virtual void ReformatAll() override;
609 virtual void dispose() override;
610};
611
612class UNLESS_MERGELIBS(VCL_DLLPUBLIC) TimeBox final : public ComboBox, public TimeFormatter
613{
614public:
615 explicit TimeBox( vcl::Window* pParent, WinBits nWinStyle );
616
617 virtual bool PreNotify( NotifyEvent& rNEvt ) override;
618 virtual bool EventNotify( NotifyEvent& rNEvt ) override;
619 virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
620
621 virtual void Modify() override;
622
623 virtual void ReformatAll() override;
624 virtual void dispose() override;
625};
626
627/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
A widget used to choose from a list of items and which has an entry.
Definition: combobox.hxx:39
void SetFirst(const Date &rNewFirst)
Definition: field.hxx:501
Date maLast
Definition: field.hxx:482
const Date & GetFirst() const
Definition: field.hxx:502
Date maFirst
Definition: field.hxx:481
void SetLast(const Date &rNewLast)
Definition: field.hxx:503
const Date & GetLast() const
Definition: field.hxx:504
Definition: edit.hxx:56
bool IsStrictFormat() const
Definition: field.hxx:78
SAL_DLLPRIVATE bool ImplGetEmptyFieldValue() const
Definition: field.hxx:57
void SetEmptyFieldValueData(bool bValue)
Definition: field.hxx:59
bool mbEmptyFieldValue
Definition: field.hxx:52
bool mbReformat
Definition: field.hxx:50
void EnableEmptyFieldValue(bool bEnable)
Definition: field.hxx:89
std::unique_ptr< LocaleDataWrapper > mpLocaleDataWrapper
Definition: field.hxx:49
bool MustBeReformatted() const
Definition: field.hxx:74
void SetEmptyFieldValue()
Definition: field.cxx:530
virtual void ReformatAll()
Definition: field.cxx:483
bool mbEmptyFieldValueEnabled
Definition: field.hxx:53
VclPtr< Edit > mpField
Definition: field.hxx:47
bool IsEmptyFieldValueEnabled() const
Definition: field.hxx:90
bool IsEmptyFieldValue() const
Definition: field.cxx:537
void MarkToBeReformatted(bool b)
Definition: field.hxx:75
void ClearField()
Definition: field.hxx:66
bool mbStrictFormat
Definition: field.hxx:51
Edit * GetField() const
Definition: field.hxx:65
FieldUnit meUnit
Definition: field.hxx:194
sal_Int64 GetValue() const
Definition: field.cxx:663
FieldUnit GetUnit() const
Definition: field.hxx:171
OUString maCustomUnitText
Definition: field.hxx:204
const OUString & GetCustomUnitText() const
Definition: field.hxx:173
void SetMax(sal_Int64 nNewMax)
Definition: field.cxx:584
sal_Int64 GetLast() const
Definition: field.hxx:110
sal_Int64 GetFirst() const
Definition: field.hxx:108
bool IsUseThousandSep() const
Definition: field.hxx:118
sal_Int64 mnLastValue
Definition: field.hxx:132
sal_Int64 GetMin() const
Definition: field.hxx:101
bool mbFormatting
Definition: field.hxx:135
sal_Int64 GetValue() const
Definition: field.cxx:663
bool mbThousandSep
Definition: field.hxx:159
sal_Int64 mnMax
Definition: field.hxx:134
void SetFirst(sal_Int64 nNewFirst)
Definition: field.hxx:107
virtual sal_Int64 GetValueFromString(const OUString &rStr) const
Definition: field.cxx:628
sal_Int64 mnFirst
Definition: field.hxx:140
virtual OUString CreateFieldText(sal_Int64 nValue) const
Definition: field.cxx:609
sal_uInt16 GetDecimalDigits() const
Definition: field.hxx:115
SAL_DLLPRIVATE void ImplNewFieldValue(sal_Int64 nNewValue)
Definition: field.cxx:747
sal_Int64 GetMax() const
Definition: field.hxx:103
sal_uInt16 mnDecimalDigits
Definition: field.hxx:158
virtual void SetValue(sal_Int64 nNewValue)
Definition: field.cxx:603
void SetLast(sal_Int64 nNewLast)
Definition: field.hxx:109
sal_Int64 GetSpinSize() const
Definition: field.hxx:112
void SetUserValue(sal_Int64 nNewValue)
Definition: field.cxx:623
virtual void Reformat() override
Definition: field.cxx:698
void SetSpinSize(sal_Int64 nNewSize)
Definition: field.hxx:111
SAL_DLLPRIVATE void ImplNumericReformat()
Definition: field.cxx:549
sal_Int64 mnMin
Definition: field.hxx:133
void SetMin(sal_Int64 nNewMin)
Definition: field.cxx:577
sal_Int64 mnSpinSize
Definition: field.hxx:139
sal_Int64 mnLast
Definition: field.hxx:141
void clear()
Definition: vclptr.hxx:190
virtual SotClipboardFormatId GetFormat(const TransferableDataHelper &aHelper) override
virtual void SetValue(tools::Long nNew) override
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
FieldUnit
std::function< std::unique_ptr< UIObject >(vcl::Window *)> FactoryFunction
OUString GetString(int nId)
void SetString(SwCursor &rCursor, const OUString &rString)
const LocaleDataWrapper & GetLocaleDataWrapper(LanguageType nLang)
Any GetTime(const OUString &val)
void dispose()
const char GetValue[]
void SetFormat(LotusContext &rContext, SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt8 nFormat, sal_uInt8 nSt)
TimeFormat
Definition: vclenum.hxx:122
ExtDateFieldFormat
Definition: vclenum.hxx:135
TimeFieldFormat
Definition: vclenum.hxx:28
ExtTimeFieldFormat
Definition: vclenum.hxx:127
sal_Int64 WinBits
Definition: wintypes.hxx:109