[Libreoffice-commits] core.git: sc/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Aug 31 08:13:45 UTC 2018


 sc/source/core/tool/interpr1.cxx |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 0383ccd4e7116c3d26edc1f86b7a74fe3cf649bd
Author:     Michael Weghorn <m.weghorn at posteo.de>
AuthorDate: Thu Aug 30 17:18:18 2018 +0200
Commit:     Eike Rathke <erack at redhat.com>
CommitDate: Fri Aug 31 10:13:19 2018 +0200

    tdf#73078 Let 'Type()' return '1' for empty cells
    
    Quote from tdf#73078:
    
    > The function TYPE is specified with the Syntax:
    > TYPE( Any value ) and the rule "If a Reference
    > is provided, the reference is first dereferenced,
    > and any formulas are evaluated."
    > [ODF1.2 part2 section 6.13.33 TYP]
    >
    > Because of argument type "Any" the function cannot result
    > in an error. Gnumeric, Apache OpenOffice, and Excel return
    > the number 1 in this case.
    
    Therefore, have LibreOffice return 1 as well, rather than
    having an "Err:502" ("Error: Invalid argument").
    
    Change-Id: I1e679645e7b2e70e185574f805cd410b0508cbd8
    Reviewed-on: https://gerrit.libreoffice.org/59826
    Tested-by: Jenkins
    Reviewed-by: Eike Rathke <erack at redhat.com>

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index a534486eb898..a40a514873c5 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -2118,6 +2118,10 @@ void ScInterpreter::ScType()
                             nType = 1;
                     }
                     break;
+                    case CELLTYPE_NONE:
+                        // always 1, s. tdf#73078
+                        nType = 1;
+                        break;
                     case CELLTYPE_FORMULA :
                         nType = 8;
                         break;


More information about the Libreoffice-commits mailing list