LibreOffice Module sc (master) 1
|
Store parameters used in the ScDocument::SetString() method. More...
#include <stringutil.hxx>
Public Types | |
enum | TextFormatPolicy { Always , SpecialNumberOnly , Keep , Never } |
Enum settings that take effect if mbDetectNumberFormat=false or if true a number was not detected. More... | |
Public Member Functions | |
ScSetStringParam () | |
void | setTextInput () |
Call this whenever you need to unconditionally set input as text, no matter what the input is. More... | |
void | setNumericInput () |
Call this whenever you need to maximize the chance of input being detected as a numeric value (numbers, dates, times etc). More... | |
Public Attributes | |
SvNumberFormatter * | mpNumFormatter |
Stores the pointer to the number formatter instance to be used during number format detection. More... | |
bool | mbDetectNumberFormat |
Specify which number formats are detected: mbDetectNumberFormat=true && mbDetectScientificNumberFormat=true : detect all special number formats : basic decimal number, date, scientific notation, etc mbDetectNumberFormat=false && mbDetectScientificNumberFormat=true : detect scientific notation and basic decimal number, but not other special number formats (date etc) mbDetectNumberFormat=false && mbDetectScientificNumberFormat=false : detect only basic decimal number, but not scientific notation or other special number formats (date etc) Note: mbDetectNumberFormat=true && mbDetectScientificNumberFormat=false not allowed. More... | |
bool | mbDetectScientificNumberFormat |
TextFormatPolicy | meSetTextNumFormat |
Determine when to set the 'Text' number format to the cell where the input string is being set. More... | |
bool | mbHandleApostrophe |
When true, treat input with a leading apostrophe as an escape character for all content, to treat also numeric value as a text. More... | |
sc::StartListeningType | meStartListening |
bool | mbCheckLinkFormula |
When true and the string results in a compiled formula, check the formula tokens for presence of functions that could trigger access to external resources. More... | |
Store parameters used in the ScDocument::SetString() method.
Various options for string-setting operation are specified herein.
Definition at line 34 of file stringutil.hxx.
Enum settings that take effect if mbDetectNumberFormat=false or if true a number was not detected.
Definition at line 39 of file stringutil.hxx.
ScSetStringParam::ScSetStringParam | ( | ) |
Definition at line 28 of file stringutil.cxx.
void ScSetStringParam::setNumericInput | ( | ) |
Call this whenever you need to maximize the chance of input being detected as a numeric value (numbers, dates, times etc).
Definition at line 47 of file stringutil.cxx.
References mbDetectNumberFormat, mbDetectScientificNumberFormat, mbHandleApostrophe, meSetTextNumFormat, and Never.
Referenced by ScDPOutput::HeaderCell().
void ScSetStringParam::setTextInput | ( | ) |
Call this whenever you need to unconditionally set input as text, no matter what the input is.
Definition at line 39 of file stringutil.cxx.
References Always, mbDetectNumberFormat, mbDetectScientificNumberFormat, mbHandleApostrophe, and meSetTextNumFormat.
Referenced by ScCellValue::commit(), ScRefCellValue::commit(), ImportLotus::Errcell(), ScDPOutput::HeaderCell(), ScDocFunc::InsertNameList(), ImportLotus::Labelcell(), lcl_PutDataArray(), ImportLotus::Nacell(), ScDPOutput::Output(), ScDatabaseDocUtil::PutData(), PutFormString(), ScCellValue::release(), ScFormatFilterPluginImpl::ScImportDif(), ScDocFunc::SetStringCell(), ScDocument::SetTextCell(), ScUndoSetCell::SetValue(), ScTransferObj::StripRefs(), and ScDocument::TransliterateText().
bool ScSetStringParam::mbCheckLinkFormula |
When true and the string results in a compiled formula, check the formula tokens for presence of functions that could trigger access to external resources.
This is to be set to true in import filter code, but not for user input.
Definition at line 103 of file stringutil.hxx.
Referenced by ScColumn::ParseString(), ScDocumentImport::setAutoInput(), ScImportExport::Text2Doc(), and ScEEImport::WriteToDocument().
bool ScSetStringParam::mbDetectNumberFormat |
Specify which number formats are detected: mbDetectNumberFormat=true && mbDetectScientificNumberFormat=true : detect all special number formats : basic decimal number, date, scientific notation, etc mbDetectNumberFormat=false && mbDetectScientificNumberFormat=true : detect scientific notation and basic decimal number, but not other special number formats (date etc) mbDetectNumberFormat=false && mbDetectScientificNumberFormat=false : detect only basic decimal number, but not scientific notation or other special number formats (date etc) Note: mbDetectNumberFormat=true && mbDetectScientificNumberFormat=false not allowed.
Definition at line 79 of file stringutil.hxx.
Referenced by ScDPOutput::FieldCell(), ScColumn::ParseString(), setNumericInput(), setTextInput(), and ScEEImport::WriteToDocument().
bool ScSetStringParam::mbDetectScientificNumberFormat |
Definition at line 80 of file stringutil.hxx.
Referenced by ScColumn::ParseString(), setNumericInput(), setTextInput(), and ScEEImport::WriteToDocument().
bool ScSetStringParam::mbHandleApostrophe |
When true, treat input with a leading apostrophe as an escape character for all content, to treat also numeric value as a text.
When false, the whole string input including the leading apostrophe will be entered literally as string.
Definition at line 94 of file stringutil.hxx.
Referenced by ScDPOutput::FieldCell(), ScColumn::ParseString(), setNumericInput(), setTextInput(), and ScEEImport::WriteToDocument().
TextFormatPolicy ScSetStringParam::meSetTextNumFormat |
Determine when to set the 'Text' number format to the cell where the input string is being set.
Definition at line 86 of file stringutil.hxx.
Referenced by ScDPOutput::FieldCell(), ScColumn::ParseString(), setNumericInput(), setTextInput(), ScUndoSetCell::SetValue(), and ScEEImport::WriteToDocument().
sc::StartListeningType ScSetStringParam::meStartListening |
Definition at line 96 of file stringutil.hxx.
Referenced by ScColumn::SetString().
SvNumberFormatter* ScSetStringParam::mpNumFormatter |
Stores the pointer to the number formatter instance to be used during number format detection.
The caller must manage the life cycle of the instance.
Definition at line 70 of file stringutil.hxx.
Referenced by ScColumn::ParseString(), and ScEEImport::WriteToDocument().