diff options
author | Eike Rathke <erack@redhat.com> | 2014-03-13 19:50:14 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2014-03-14 13:30:18 +0100 |
commit | c52f3ea0eb327343b1945290c43d3b66f546dfe9 (patch) | |
tree | 9d0c3961b8f311c016bbdd65a2fafb239d8b191b /sc/source/ui/optdlg/calcoptionsdlg.hxx | |
parent | cb87c1eefb434bb24fe1c5472328a93cbdc5d761 (diff) |
user selectable string conversion models, related fdo#37132 fdo#74622
Determines how to treat text when encountered as operand in an arithmetic
operation or as argument to a function that expects a number instead.
Selectable under Tools->Options->Calc->Formula "Detailed calculation settings"
"Custom" from "Conversion from text to number" are:
Generate #VALUE! error: =1+"1" or =1+"x" give #VALUE!
Treat as zero: =1+"1" or =1+"x" give 1
Convert only unambiguous: =1+"1" gives 2, but =1+"1.000" or =1+"x" give #VALUE!
Convert also locale dependent: =1+"1.000" may be 2 or 1001 ... =1+"x" gives #VALUE!
For "Generate #VALUE! error" and "Treat as zero" the "Treat empty string as
zero" option follows these settings, for "Convert only unambiguous" and
"Convert also locale dependent" it can be set independently.
When reading documents created by other spreadsheet applications or older
versions of LibreOffice, and to interchange documents between different locales
the "Convert only unambiguous" with "Treat empty string as zero = True" setting
is recommended, though LibreOffice so far acted as "Convert also locale
dependent" with "Treat empty string as zero = False", which is the reason that
option is kept as default.
The best setting to create new documents that can be interpreted by all
spreadsheet applications without on-the-fly string conversion is
"Generate #VALUE! error". Not having to convert strings during
calculation ist also faster, of course.
Change-Id: Ie6dc34a00a82064a2d862b2178ce715fab945f85
Diffstat (limited to 'sc/source/ui/optdlg/calcoptionsdlg.hxx')
-rw-r--r-- | sc/source/ui/optdlg/calcoptionsdlg.hxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sc/source/ui/optdlg/calcoptionsdlg.hxx b/sc/source/ui/optdlg/calcoptionsdlg.hxx index ae4f04358c76..c542caa00c89 100644 --- a/sc/source/ui/optdlg/calcoptionsdlg.hxx +++ b/sc/source/ui/optdlg/calcoptionsdlg.hxx @@ -50,6 +50,7 @@ private: #endif OUString toString(formula::FormulaGrammar::AddressConvention eConv) const; + OUString toString(ScCalcConfig::StringConversion eConv) const; OUString toString(bool bVal) const; SvTreeListEntry *createBoolItem(const OUString &rCaption, bool bValue) const; void setValueAt(size_t nPos, const OUString &rString); @@ -81,6 +82,14 @@ private: OUString maDescStringRefSyntax; OUString maUseFormulaSyntax; + OUString maStringConversionAsError; + OUString maStringConversionAsZero; + OUString maStringConversionUnambiguous; + OUString maStringConversionLocaleDependent; + + OUString maCaptionStringConversion; + OUString maDescStringConversion; + OUString maCaptionEmptyStringAsZero; OUString maDescEmptyStringAsZero; @@ -93,6 +102,8 @@ private: #if HAVE_FEATURE_OPENCL std::vector<sc::OpenclPlatformInfo> maPlatformInfo; #endif + + bool mbSelectedEmptyStringAsZero; }; #endif |