summaryrefslogtreecommitdiff
path: root/sw/qa/extras/layout/data
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2018-08-02 17:53:06 +0200
committerMiklos Vajna <vmiklos@collabora.com>2019-06-07 15:40:27 +0200
commite87f6c248a939c27d7023e752a16c3c278aa922b (patch)
treeca6654e867e0e1ef5d39a5663446d255fe8b899d /sw/qa/extras/layout/data
parentdb51bd203ff2796f268b0c89fd1c13f6b81f95d7 (diff)
sw user field type: fix locale of string -> float conversion
The key part is the SwUserFieldType::GetValue() hunk, the field type has to always use the same locale, which means if we get an SwCalc reference that works with the document or field locale that has to be switched temporarily. Reviewed-on: https://gerrit.libreoffice.org/58492 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins (cherry picked from commit 6ca5d288ca810f128163da121777ee2e11c46edc) Conflicts: sw/qa/extras/layout/layout.cxx sw/source/core/fields/usrfld.cxx Change-Id: I26ff18e74f477729a66b066c4baf6d215a7685bc (cherry picked from commit 5109f63c66dc8b91e7ff4ac62ebec59ece5eb3a9)
Diffstat (limited to 'sw/qa/extras/layout/data')
-rw-r--r--sw/qa/extras/layout/data/user-field-type-language.fodt21
1 files changed, 21 insertions, 0 deletions
diff --git a/sw/qa/extras/layout/data/user-field-type-language.fodt b/sw/qa/extras/layout/data/user-field-type-language.fodt
new file mode 100644
index 000000000000..f741add7ddd7
--- /dev/null
+++ b/sw/qa/extras/layout/data/user-field-type-language.fodt
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:styles>
+ <style:default-style style:family="paragraph">
+ <style:text-properties fo:language="en" fo:country="GB"/>
+ </style:default-style>
+ </office:styles>
+ <office:automatic-styles>
+ <number:number-style style:name="N10004" number:language="en" number:country="GB">
+ <number:number number:decimal-places="2" number:min-integer-digits="1" number:grouping="true"/>
+ </number:number-style>
+ </office:automatic-styles>
+ <office:body>
+ <office:text text:use-soft-page-breaks="true">
+ <text:user-field-decls>
+ <text:user-field-decl office:value-type="float" office:value="1234.56" text:name="user-field-decl-name-example"/>
+ </text:user-field-decls>
+ <text:p>Before <text:user-field-get style:data-style-name="N10004" text:name="user-field-decl-name-example">1,234.56</text:user-field-get> after.</text:p>
+ </office:text>
+ </office:body>
+</office:document>