blob: 21ebe4b504593960fdb1daad2b43e7fdac40a143 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
** MetricField:
+ in vcl:
class VCL_DLLPUBLIC CurrencyField : public SpinField, public CurrencyFormatter
class VCL_DLLPUBLIC CurrencyFormatter : public NumericFormatter
class VCL_DLLPUBLIC MetricFormatter : public NumericFormatter
class VCL_DLLPUBLIC NumericFormatter : public FormatterBase
MetricFormatter - very simple sal_Int64 wrapping ...
+ no doubles ...
+ *Could* replicate this with the same interface:
+ prolly easier / better to add an XMetricField interface.
vcl's MetricField - itself does a load of (double) casting ...
+ to get the value it wants :-)
+ Urgh ! ...
** Can we just twist VCLXCurrencyField to this purpose ?
+ what differences would we want ?
+ LongCurrencyFormatter -> 'MetricFormatter' ...
** Interesting !
+ VCLXCurrencyField is based on 'LongCurrencyField' not CurrencyField ...
+ this is really based on 'BigInt' [ curious ] - so even more precision loss.
+ So ... cut/paste VCLXCurencyField -> VCLXMetricField
+ Look at 'VCLXNumericField' interface ...
+ Use 'XNumericField' instead (?)
+ why does this just not "just work" ?
+ The 'MetricField' (is also a MetricFormatter)
+ MetricFormatter [ unusually ] has 'Unit' support
+ API grep shows:
+ a) requires 'fieldunit'
+ b) has "UserValue"
+ c) => new IDL interface required ...
+ sub-set / expand NumericField ?
+ add 'CustomConvert' ?
+ add '[SG]etFirst'/Last
+ Properties:
+ 'Unit'
+ 'CustomUnitText'
+ 'spin-size' -> 'value-step'
+ 'BaseValue' ...
+ sal_Int64 ... [!?] ...
+ CorrectedValue
+ Want properties for the UI designer (?)
+ move that stuff out into there ?
+ FIXME:
+ rationalise the 'Modify' event crud ...
+ share the code in a base-class ...
+ Wrapper:
+ need to have static methods 'ConvertDoubleValue' etc.
+ also 'ConvertValue' etc.
+ GetCorrectedValue - never used ...
|