summaryrefslogtreecommitdiff
path: root/include/svl
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2021-10-20 18:09:46 +0200
committerEike Rathke <erack@redhat.com>2021-10-26 16:04:13 +0200
commit546e7d14b397cfd1210b891c8dc4a195c25f3876 (patch)
tree6df65672872a4ab03ca5e4f33a4c7a50801df37b /include/svl
parent7e53757f91a176d68cdad1dbde2ecaba1db5c764 (diff)
tdf#131025 swtable: don't apply number format to non-number text
Applying a numbering style to text causes export to save that out as a number (valued as zero). That is not good because the ODF spec says that a number overrides a string. So don't accept a numbering format on non-number text. Why is this change good? -the cell previously had no direct formatting (by definition). -the cell's previous old format was text (tested). -any numbering format applied obviously isn't correct (by definition). -any previous formatting has already been overwritten with numformat. -the default numbering is appropriate for text. -empty cells still get the numbering format (tested). -odd human-designed formats are accepted as intentional (tested). What are the concerns? -the scope of this change is HUGE, way beyond this bug. -on both my dev box and patch box I saw occassional crashes. -the bug was "fixed" by a different import commit that ensured different languages were treated consistently. So this patch is no longer critical, just nice to have to avoid exporting out-of-spec content. Change-Id: Id3dc5f803c3cf4875bc0cab52d1019a18679da77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123904 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'include/svl')
-rw-r--r--include/svl/numformat.hxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/svl/numformat.hxx b/include/svl/numformat.hxx
index 4026ff71e4a4..2cbfeb9cd171 100644
--- a/include/svl/numformat.hxx
+++ b/include/svl/numformat.hxx
@@ -256,6 +256,8 @@ public:
/// Get return string for Calc CELL() function, "G", "D1", ...
OUString GetCalcCellReturn(sal_uInt32 nFormat) const;
+ bool IsUserDefined(sal_uInt32 F_Index) const;
+
/// Check if format code string may be deleted by user
bool IsUserDefined(std::u16string_view sStr, LanguageType eLnge = LANGUAGE_DONTKNOW);