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 |
When true, we try to detect special number format (dates etc) from the input string, when false, we only try to detect a basic decimal number format. More... | |
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 45 of file stringutil.cxx.
References mbDetectNumberFormat, 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 38 of file stringutil.cxx.
References Always, mbDetectNumberFormat, 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 100 of file stringutil.hxx.
Referenced by ScColumn::ParseString(), ScDocumentImport::setAutoInput(), ScImportExport::Text2Doc(), and ScEEImport::WriteToDocument().
bool ScSetStringParam::mbDetectNumberFormat |
When true, we try to detect special number format (dates etc) from the input string, when false, we only try to detect a basic decimal number format.
Definition at line 77 of file stringutil.hxx.
Referenced by ScDPOutput::FieldCell(), 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 91 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 83 of file stringutil.hxx.
Referenced by ScDPOutput::FieldCell(), ScColumn::ParseString(), setNumericInput(), setTextInput(), ScUndoSetCell::SetValue(), and ScEEImport::WriteToDocument().
sc::StartListeningType ScSetStringParam::meStartListening |
Definition at line 93 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().