diff options
Diffstat (limited to 'sc/inc/stringutil.hxx')
-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 |