diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2024-02-01 13:10:26 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2024-02-01 16:28:44 +0100 |
commit | 001bdef856fb8efe32081d2b222c68b9235bafb9 (patch) | |
tree | 16cc2f1a2eb1101d84899601f2ed3d5791aadac1 /include | |
parent | d39ff240123232e5af87e0c168d474a466071e44 (diff) |
tdf#159483 sc HTML import: handle data-sheets-value attribute for the text case
The A2 cell in the bugdoc has 01 in it, which was auto-converted to 1
(float) value on import, even if it was text originally.
This is hard to solve for HTML in general, which is not typed, but this
input is coming from google sheets, which has an additional
data-sheets-value attribute on <td> that does tell us about the type of
the cell.
Fix the problem by handling that attribute, and in case it explicitly
says it's text, then apply the matching number format.
Other types are not yet handled.
(cherry picked from commit e6e5660b726ecf3b0c39b277568568973b43c9f0)
Change-Id: I2986ef864e97d9c46d191aba25ca5740a1151a71
Diffstat (limited to 'include')
-rw-r--r-- | include/svtools/htmlkywd.hxx | 1 | ||||
-rw-r--r-- | include/svtools/htmltokn.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/include/svtools/htmlkywd.hxx b/include/svtools/htmlkywd.hxx index 00c8260749bd..23e836ea7cea 100644 --- a/include/svtools/htmlkywd.hxx +++ b/include/svtools/htmlkywd.hxx @@ -445,6 +445,7 @@ #define OOO_STRING_SVTOOLS_HTML_O_title "title" #define OOO_STRING_SVTOOLS_HTML_O_value "value" #define OOO_STRING_SVTOOLS_HTML_O_SDval "sdval" +#define OOO_STRING_SVTOOLS_HTML_O_DSval "data-sheets-value" #define OOO_STRING_SVTOOLS_HTML_O_SDnum "sdnum" #define OOO_STRING_SVTOOLS_HTML_O_sdlibrary "sdlibrary" #define OOO_STRING_SVTOOLS_HTML_O_sdmodule "sdmodule" diff --git a/include/svtools/htmltokn.h b/include/svtools/htmltokn.h index 4a333ee2f6d9..27370e5cb869 100644 --- a/include/svtools/htmltokn.h +++ b/include/svtools/htmltokn.h @@ -344,6 +344,7 @@ STRING_START = BOOL_END, TITLE, VALUE, SDVAL, // StarDiv NumberValue + DSVAL, SDNUM, // StarDiv NumberFormat SDLIBRARY, SDMODULE, |