diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-03-20 10:16:10 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-03-22 21:49:16 -0400 |
commit | 611cb65c2a5d8d99b1ce0b3d9d0fbde95d877f72 (patch) | |
tree | 2e29229bf479c7a7644696f31e5e451512246ace /sc/inc/stringutil.hxx | |
parent | More on reducing the ScBaseCell usage. That's it for today. (diff) | |
download | core-611cb65c2a5d8d99b1ce0b3d9d0fbde95d877f72.tar.gz core-611cb65c2a5d8d99b1ce0b3d9d0fbde95d877f72.zip |
Add convenience methods to set maximum text input and numeric input modes.
And remove one use of ScDocument::PutCell().
Change-Id: Iaa3c115794894964cb7c9f809235cdb7669be094
Diffstat (limited to 'sc/inc/stringutil.hxx')
-rw-r--r-- | sc/inc/stringutil.hxx | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/sc/inc/stringutil.hxx b/sc/inc/stringutil.hxx index 132eb92d8170..f5bdf3e1ec42 100644 --- a/sc/inc/stringutil.hxx +++ b/sc/inc/stringutil.hxx @@ -72,15 +72,26 @@ struct SC_DLLPUBLIC ScSetStringParam TextFormatPolicy meSetTextNumFormat; /** - * When true, treat input with a leading apostrophe / single quote special - * in that it escapes numeric or date/time input such that it is not - * interpreted and the input string is taken instead. This can be used - * during text file import so the leading apostrophe is not lost if it - * precedes a numeric value. + * When true, treat input with a leading apostrophe as an escape character + * for a numeric value content, to treat the numeric value as a text. When + * false, the whole string input including the leading apostrophe will be + * entered literally as string. */ bool mbHandleApostrophe; ScSetStringParam(); + + /** + * Call this whenever you need to unconditionally set input as text, no + * matter what the input is. + */ + void setTextInput(); + + /** + * Call this whenever you need to maximize the chance of input being + * detected as a numeric value (numbers, dates, times etc). + */ + void setNumericInput(); }; // ============================================================================ |