diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-08-13 14:20:13 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-08-13 14:22:32 -0400 |
commit | 51f1fc69aa539dec8035195b98e0b128026388e9 (patch) | |
tree | 849dff14f3b2b3f5b259a233c06b4d74ca9335f8 /sc/inc | |
parent | f97a3a7f51a7de9c2170953ee3969ef48d914e25 (diff) |
fdo#53089: Avoid setting valid numbers as text during html import.
Change-Id: I5fa9a54f70e8e4d8aac42687f2a204b2925d4619
Diffstat (limited to 'sc/inc')
-rw-r--r-- | sc/inc/stringutil.hxx | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/sc/inc/stringutil.hxx b/sc/inc/stringutil.hxx index a178bebf7ca7..75c378cd2152 100644 --- a/sc/inc/stringutil.hxx +++ b/sc/inc/stringutil.hxx @@ -41,6 +41,25 @@ class SvNumberFormatter; */ struct SC_DLLPUBLIC ScSetStringParam { + enum TextFormatPolicy + { + /** + * Set Text number format no matter what the input string is. + */ + Always, + + /** + * Set Text number format only when the input string is considered a + * special number but we only want to detect a simple number. + */ + SpecialNumberOnly, + + /** + * Never set Text number format. + */ + Never + }; + /** * Stores the pointer to the number formatter instance to be used during * number format detection. The caller must manage the life cycle of the @@ -56,11 +75,10 @@ struct SC_DLLPUBLIC ScSetStringParam bool mbDetectNumberFormat; /** - * When true, set the format of the cell to Text when a string cell is - * requested for a number input. We may want to do this during text file - * import (csv, html etc). + * Determine when to set the 'Text' number format to the cell where the + * input string is being set. */ - bool mbSetTextCellFormat; + TextFormatPolicy meSetTextNumFormat; /** * When true, treat input with a leading apostrophe / single quote special |