summaryrefslogtreecommitdiff
path: root/toolkit/doc/layout/metricfield.txt
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2008-03-06 10:36:54 +0000
committerKurt Zenker <kz@openoffice.org>2008-03-06 10:36:54 +0000
commite364a8ee9a3589d192ba5adcdcd668a93cba545a (patch)
tree03a0481ee57bdfbdde1a98d66d0454ea89705d7d /toolkit/doc/layout/metricfield.txt
parent83302b39a3167387c6cc762071df481d2a3ceae9 (diff)
INTEGRATION: CWS layout_DEV300 (1.1.2); FILE ADDED
2008/02/13 08:56:21 jcn 1.1.2.1: Import src2xml and doc/layout from GIT.
Diffstat (limited to 'toolkit/doc/layout/metricfield.txt')
-rw-r--r--toolkit/doc/layout/metricfield.txt57
1 files changed, 57 insertions, 0 deletions
diff --git a/toolkit/doc/layout/metricfield.txt b/toolkit/doc/layout/metricfield.txt
new file mode 100644
index 000000000000..21ebe4b50459
--- /dev/null
+++ b/toolkit/doc/layout/metricfield.txt
@@ -0,0 +1,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 ...