Files
libreoffice/sc/source/core/tool/interpr1.cxx

8727 lines
286 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
re-base on ALv2 code. Includes: Patches contributed by Herbert Duerr i#118735 prevent endless loop if vlookup/hlookup doesn't find anything http://svn.apache.org/viewvc?view=revision&revision=1239673 Patches contributed by Andre Fischer remove lp_solver http://svn.apache.org/viewvc?view=revision&revision=1199180 i#118160: Added external CoinMP library. http://svn.apache.org/viewvc?view=revision&revision=1233909 Patches contributed by Armin Le-Grand i#118485 - Styles for OLEs are not saved. http://svn.apache.org/viewvc?view=revision&revision=1182166 i#118524: apply patch, followup fixes to 118485 http://svn.apache.org/viewvc?view=revision&revision=1186077 Patches contributed by lihuiibm i#108860 - Fix range validation. http://svn.apache.org/viewvc?view=revision&revision=1242846 i#118954 Chart data will lost after copy to different file http://svn.apache.org/viewvc?view=revision&revision=1301345 Patches contributed by Ariel Constenla-Haile Fix Linux build breaker: extra qualification on member http://svn.apache.org/viewvc?view=revision&revision=1301591 i#118696 - i#118697 - Fix some Sheet Tab Color API issues http://svn.apache.org/viewvc?view=revision&revision=1225428 i#118697 - Fix uninitialized variable http://svn.apache.org/viewvc?view=revision&revision=1225859 i#118771 - ScUndoImportTab should preserve tab background color http://svn.apache.org/viewvc?view=revision&revision=1230356 i#118921 - Repaint linked sheet tab background color after updating link http://svn.apache.org/viewvc?view=revision&revision=1245177 i#118927 - Undo/Redo "Update Link" does not reset sheet tab color http://svn.apache.org/viewvc?view=revision&revision=1245241 i#118747 - Copy tab color when transferring sheets across documents http://svn.apache.org/viewvc?view=revision&revision=1230355 Patch contributed by Oliver Rainer-Wittman i#118012 - methods <ScBroadcastAreaSlot::AreaBroadcast(..)> and <ScBroadcastAreaSlot::AreaBroadcastInRange(..)> adapt stl-container iteration in order to avoid destroyed iterators during iteration. http://svn.apache.org/viewvc?view=revision&revision=1297916 Patches contributed by Mathias Bauer gnumake4 work variously http://svn.apache.org/viewvc?view=revision&revision=1394707 http://svn.apache.org/viewvc?view=revision&revision=1394326 http://svn.apache.org/viewvc?view=revision&revision=1396797 http://svn.apache.org/viewvc?view=revision&revision=1397315 Patch contributed by Daniel Rentz calc69: #i116936# fix VBA symbol Cells http://svn.apache.org/viewvc?view=revision&revision=1172135 Patches contributed by leiw: i#118546 CPU 100% on switched off AutoCalculate with Conditional Formatting on date values http://svn.apache.org/viewvc?view=revision&revision=1301380 Re-add new function documentation. Many various cleanups. Add missing calc66: #o11817313# also look at formula result number format, remove redundant binaries.
2012-11-30 12:23:25 +00:00
/*
* This file is part of the LibreOffice project.
2000-09-18 23:16:46 +00:00
*
re-base on ALv2 code. Includes: Patches contributed by Herbert Duerr i#118735 prevent endless loop if vlookup/hlookup doesn't find anything http://svn.apache.org/viewvc?view=revision&revision=1239673 Patches contributed by Andre Fischer remove lp_solver http://svn.apache.org/viewvc?view=revision&revision=1199180 i#118160: Added external CoinMP library. http://svn.apache.org/viewvc?view=revision&revision=1233909 Patches contributed by Armin Le-Grand i#118485 - Styles for OLEs are not saved. http://svn.apache.org/viewvc?view=revision&revision=1182166 i#118524: apply patch, followup fixes to 118485 http://svn.apache.org/viewvc?view=revision&revision=1186077 Patches contributed by lihuiibm i#108860 - Fix range validation. http://svn.apache.org/viewvc?view=revision&revision=1242846 i#118954 Chart data will lost after copy to different file http://svn.apache.org/viewvc?view=revision&revision=1301345 Patches contributed by Ariel Constenla-Haile Fix Linux build breaker: extra qualification on member http://svn.apache.org/viewvc?view=revision&revision=1301591 i#118696 - i#118697 - Fix some Sheet Tab Color API issues http://svn.apache.org/viewvc?view=revision&revision=1225428 i#118697 - Fix uninitialized variable http://svn.apache.org/viewvc?view=revision&revision=1225859 i#118771 - ScUndoImportTab should preserve tab background color http://svn.apache.org/viewvc?view=revision&revision=1230356 i#118921 - Repaint linked sheet tab background color after updating link http://svn.apache.org/viewvc?view=revision&revision=1245177 i#118927 - Undo/Redo "Update Link" does not reset sheet tab color http://svn.apache.org/viewvc?view=revision&revision=1245241 i#118747 - Copy tab color when transferring sheets across documents http://svn.apache.org/viewvc?view=revision&revision=1230355 Patch contributed by Oliver Rainer-Wittman i#118012 - methods <ScBroadcastAreaSlot::AreaBroadcast(..)> and <ScBroadcastAreaSlot::AreaBroadcastInRange(..)> adapt stl-container iteration in order to avoid destroyed iterators during iteration. http://svn.apache.org/viewvc?view=revision&revision=1297916 Patches contributed by Mathias Bauer gnumake4 work variously http://svn.apache.org/viewvc?view=revision&revision=1394707 http://svn.apache.org/viewvc?view=revision&revision=1394326 http://svn.apache.org/viewvc?view=revision&revision=1396797 http://svn.apache.org/viewvc?view=revision&revision=1397315 Patch contributed by Daniel Rentz calc69: #i116936# fix VBA symbol Cells http://svn.apache.org/viewvc?view=revision&revision=1172135 Patches contributed by leiw: i#118546 CPU 100% on switched off AutoCalculate with Conditional Formatting on date values http://svn.apache.org/viewvc?view=revision&revision=1301380 Re-add new function documentation. Many various cleanups. Add missing calc66: #o11817313# also look at formula result number format, remove redundant binaries.
2012-11-30 12:23:25 +00:00
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
2000-09-18 23:16:46 +00:00
*
re-base on ALv2 code. Includes: Patches contributed by Herbert Duerr i#118735 prevent endless loop if vlookup/hlookup doesn't find anything http://svn.apache.org/viewvc?view=revision&revision=1239673 Patches contributed by Andre Fischer remove lp_solver http://svn.apache.org/viewvc?view=revision&revision=1199180 i#118160: Added external CoinMP library. http://svn.apache.org/viewvc?view=revision&revision=1233909 Patches contributed by Armin Le-Grand i#118485 - Styles for OLEs are not saved. http://svn.apache.org/viewvc?view=revision&revision=1182166 i#118524: apply patch, followup fixes to 118485 http://svn.apache.org/viewvc?view=revision&revision=1186077 Patches contributed by lihuiibm i#108860 - Fix range validation. http://svn.apache.org/viewvc?view=revision&revision=1242846 i#118954 Chart data will lost after copy to different file http://svn.apache.org/viewvc?view=revision&revision=1301345 Patches contributed by Ariel Constenla-Haile Fix Linux build breaker: extra qualification on member http://svn.apache.org/viewvc?view=revision&revision=1301591 i#118696 - i#118697 - Fix some Sheet Tab Color API issues http://svn.apache.org/viewvc?view=revision&revision=1225428 i#118697 - Fix uninitialized variable http://svn.apache.org/viewvc?view=revision&revision=1225859 i#118771 - ScUndoImportTab should preserve tab background color http://svn.apache.org/viewvc?view=revision&revision=1230356 i#118921 - Repaint linked sheet tab background color after updating link http://svn.apache.org/viewvc?view=revision&revision=1245177 i#118927 - Undo/Redo "Update Link" does not reset sheet tab color http://svn.apache.org/viewvc?view=revision&revision=1245241 i#118747 - Copy tab color when transferring sheets across documents http://svn.apache.org/viewvc?view=revision&revision=1230355 Patch contributed by Oliver Rainer-Wittman i#118012 - methods <ScBroadcastAreaSlot::AreaBroadcast(..)> and <ScBroadcastAreaSlot::AreaBroadcastInRange(..)> adapt stl-container iteration in order to avoid destroyed iterators during iteration. http://svn.apache.org/viewvc?view=revision&revision=1297916 Patches contributed by Mathias Bauer gnumake4 work variously http://svn.apache.org/viewvc?view=revision&revision=1394707 http://svn.apache.org/viewvc?view=revision&revision=1394326 http://svn.apache.org/viewvc?view=revision&revision=1396797 http://svn.apache.org/viewvc?view=revision&revision=1397315 Patch contributed by Daniel Rentz calc69: #i116936# fix VBA symbol Cells http://svn.apache.org/viewvc?view=revision&revision=1172135 Patches contributed by leiw: i#118546 CPU 100% on switched off AutoCalculate with Conditional Formatting on date values http://svn.apache.org/viewvc?view=revision&revision=1301380 Re-add new function documentation. Many various cleanups. Add missing calc66: #o11817313# also look at formula result number format, remove redundant binaries.
2012-11-30 12:23:25 +00:00
* This file incorporates work covered by the following license notice:
2000-09-18 23:16:46 +00:00
*
re-base on ALv2 code. Includes: Patches contributed by Herbert Duerr i#118735 prevent endless loop if vlookup/hlookup doesn't find anything http://svn.apache.org/viewvc?view=revision&revision=1239673 Patches contributed by Andre Fischer remove lp_solver http://svn.apache.org/viewvc?view=revision&revision=1199180 i#118160: Added external CoinMP library. http://svn.apache.org/viewvc?view=revision&revision=1233909 Patches contributed by Armin Le-Grand i#118485 - Styles for OLEs are not saved. http://svn.apache.org/viewvc?view=revision&revision=1182166 i#118524: apply patch, followup fixes to 118485 http://svn.apache.org/viewvc?view=revision&revision=1186077 Patches contributed by lihuiibm i#108860 - Fix range validation. http://svn.apache.org/viewvc?view=revision&revision=1242846 i#118954 Chart data will lost after copy to different file http://svn.apache.org/viewvc?view=revision&revision=1301345 Patches contributed by Ariel Constenla-Haile Fix Linux build breaker: extra qualification on member http://svn.apache.org/viewvc?view=revision&revision=1301591 i#118696 - i#118697 - Fix some Sheet Tab Color API issues http://svn.apache.org/viewvc?view=revision&revision=1225428 i#118697 - Fix uninitialized variable http://svn.apache.org/viewvc?view=revision&revision=1225859 i#118771 - ScUndoImportTab should preserve tab background color http://svn.apache.org/viewvc?view=revision&revision=1230356 i#118921 - Repaint linked sheet tab background color after updating link http://svn.apache.org/viewvc?view=revision&revision=1245177 i#118927 - Undo/Redo "Update Link" does not reset sheet tab color http://svn.apache.org/viewvc?view=revision&revision=1245241 i#118747 - Copy tab color when transferring sheets across documents http://svn.apache.org/viewvc?view=revision&revision=1230355 Patch contributed by Oliver Rainer-Wittman i#118012 - methods <ScBroadcastAreaSlot::AreaBroadcast(..)> and <ScBroadcastAreaSlot::AreaBroadcastInRange(..)> adapt stl-container iteration in order to avoid destroyed iterators during iteration. http://svn.apache.org/viewvc?view=revision&revision=1297916 Patches contributed by Mathias Bauer gnumake4 work variously http://svn.apache.org/viewvc?view=revision&revision=1394707 http://svn.apache.org/viewvc?view=revision&revision=1394326 http://svn.apache.org/viewvc?view=revision&revision=1396797 http://svn.apache.org/viewvc?view=revision&revision=1397315 Patch contributed by Daniel Rentz calc69: #i116936# fix VBA symbol Cells http://svn.apache.org/viewvc?view=revision&revision=1172135 Patches contributed by leiw: i#118546 CPU 100% on switched off AutoCalculate with Conditional Formatting on date values http://svn.apache.org/viewvc?view=revision&revision=1301380 Re-add new function documentation. Many various cleanups. Add missing calc66: #o11817313# also look at formula result number format, remove redundant binaries.
2012-11-30 12:23:25 +00:00
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
2000-09-18 23:16:46 +00:00
#include "scitems.hxx"
#include <editeng/langitem.hxx>
#include <editeng/justifyitem.hxx>
2001-03-08 10:57:21 +00:00
#include <svx/algitem.hxx>
#include <unotools/textsearch.hxx>
#include <svl/zforlist.hxx>
#include <svl/zformat.hxx>
#include <tools/urlobj.hxx>
2000-09-18 23:16:46 +00:00
#include <unotools/charclass.hxx>
2001-03-08 10:57:21 +00:00
#include <sfx2/docfile.hxx>
#include <sfx2/printer.hxx>
#include <unotools/collatorwrapper.hxx>
#include <unotools/transliterationwrapper.hxx>
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
#include <rtl/ustring.hxx>
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
#include <rtl/logfile.hxx>
2000-09-18 23:16:46 +00:00
#include "interpre.hxx"
#include "patattr.hxx"
#include "global.hxx"
#include "document.hxx"
#include "dociter.hxx"
#include "cell.hxx"
#include "scmatrix.hxx"
#include "docoptio.hxx"
#include "globstr.hrc"
2001-03-08 10:57:21 +00:00
#include "attrib.hxx"
#include "jumpmatrix.hxx"
#include "random.hxx"
CWS-TOOLING: integrate CWS chart35 2009-02-20 12:33:54 +0100 nn r268312 : correct line ends 2009-01-19 12:50:45 +0100 iha r266491 : #i91800# style:text-position='0' is wrongly imported 2009-01-19 11:59:09 +0100 iha r266486 : #i91037# Position of Datalabels in 3D Bar-Charts are crossing the edge 2009-01-16 16:45:50 +0100 iha r266435 : #i93802# clockwise does not work on solars sparc 2009-01-16 13:23:37 +0100 iha r266414 : #i91037# Position of Datalabels in 3D Bar-Charts are crossing the edge 2009-01-15 14:09:27 +0100 iha r266370 : #i98102# checkbox show equation should not be checked initially 2009-01-14 17:41:33 +0100 iha r266323 : #i97133# #i97318# chart type is not detected correctly in case of invisible series 2009-01-14 16:23:06 +0100 iha r266316 : #i97133# #i97318# chart type is not detected correctly in case of invisible series 2009-01-14 13:43:38 +0100 iha r266298 : #i84417# Unable to edit existing chart title with clipboard 2009-01-14 13:43:04 +0100 iha r266297 : #i84417# Unable to edit existing chart title with IME 2009-01-14 13:14:15 +0100 dr r266293 : do not set CharEscapement property if not needed 2009-01-14 00:48:46 +0100 er r266262 : #i81383# changed ASC and JIS to use transliteration provided by i18n transliteration; patch from <bluedwarf> 2009-01-14 00:28:06 +0100 er r266261 : #i97536# silence gcc's unbracketed && || warnings 2009-01-13 22:43:45 +0100 er r266259 : #i97905# corrected IndexKey order 2009-01-13 20:36:15 +0100 er r266254 : #i97905# add SKK/EUR conversion (plus MTL/EUR and CYP/EUR) 2009-01-13 20:31:17 +0100 er r266253 : #i97905# updated locale data; contributed by <brko> 2009-01-13 11:57:08 +0100 iha r266204 : #i84103# cannot set data in xy diagram in draw 2009-01-12 20:29:37 +0100 nn r266181 : #i97680# GetStylesContainer: handle non-available style family 2009-01-12 19:53:19 +0100 nn r266180 : #i98000# don't get initial zoom value via SfxViewFrame::Current 2009-01-12 16:11:19 +0100 iha r266166 : #i71686# XY charts without valid x values are not imported correctly from Excel 2009-01-09 17:10:20 +0100 iha r266102 : #i95051# truncated asian strings on scale tabpage 2009-01-09 15:58:46 +0100 iha r266094 : #i89430# truncated asian strings in smooth lines dialog 2009-01-09 13:09:14 +0100 iha r266076 : #i94813# importing pie chart with multiline categories crashes
2009-03-03 11:39:43 +00:00
#include <comphelper/processfactory.hxx>
#include <comphelper/string.hxx>
CWS-TOOLING: integrate CWS chart35 2009-02-20 12:33:54 +0100 nn r268312 : correct line ends 2009-01-19 12:50:45 +0100 iha r266491 : #i91800# style:text-position='0' is wrongly imported 2009-01-19 11:59:09 +0100 iha r266486 : #i91037# Position of Datalabels in 3D Bar-Charts are crossing the edge 2009-01-16 16:45:50 +0100 iha r266435 : #i93802# clockwise does not work on solars sparc 2009-01-16 13:23:37 +0100 iha r266414 : #i91037# Position of Datalabels in 3D Bar-Charts are crossing the edge 2009-01-15 14:09:27 +0100 iha r266370 : #i98102# checkbox show equation should not be checked initially 2009-01-14 17:41:33 +0100 iha r266323 : #i97133# #i97318# chart type is not detected correctly in case of invisible series 2009-01-14 16:23:06 +0100 iha r266316 : #i97133# #i97318# chart type is not detected correctly in case of invisible series 2009-01-14 13:43:38 +0100 iha r266298 : #i84417# Unable to edit existing chart title with clipboard 2009-01-14 13:43:04 +0100 iha r266297 : #i84417# Unable to edit existing chart title with IME 2009-01-14 13:14:15 +0100 dr r266293 : do not set CharEscapement property if not needed 2009-01-14 00:48:46 +0100 er r266262 : #i81383# changed ASC and JIS to use transliteration provided by i18n transliteration; patch from <bluedwarf> 2009-01-14 00:28:06 +0100 er r266261 : #i97536# silence gcc's unbracketed && || warnings 2009-01-13 22:43:45 +0100 er r266259 : #i97905# corrected IndexKey order 2009-01-13 20:36:15 +0100 er r266254 : #i97905# add SKK/EUR conversion (plus MTL/EUR and CYP/EUR) 2009-01-13 20:31:17 +0100 er r266253 : #i97905# updated locale data; contributed by <brko> 2009-01-13 11:57:08 +0100 iha r266204 : #i84103# cannot set data in xy diagram in draw 2009-01-12 20:29:37 +0100 nn r266181 : #i97680# GetStylesContainer: handle non-available style family 2009-01-12 19:53:19 +0100 nn r266180 : #i98000# don't get initial zoom value via SfxViewFrame::Current 2009-01-12 16:11:19 +0100 iha r266166 : #i71686# XY charts without valid x values are not imported correctly from Excel 2009-01-09 17:10:20 +0100 iha r266102 : #i95051# truncated asian strings on scale tabpage 2009-01-09 15:58:46 +0100 iha r266094 : #i89430# truncated asian strings in smooth lines dialog 2009-01-09 13:09:14 +0100 iha r266076 : #i94813# importing pie chart with multiline categories crashes
2009-03-03 11:39:43 +00:00
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <vector>
#include <memory>
#include "cellkeytranslator.hxx"
#include "lookupcache.hxx"
#include "rangenam.hxx"
#include "rangeutl.hxx"
#include "compiler.hxx"
CWS-TOOLING: integrate CWS calc51 2009-07-17 15:47:46 +0200 er r274098 : #i101544# more thorough reference checking in chart data ranges; also prevent some possible crash if invalid ranges were to be passed to document/cell access. 2009-07-16 14:20:11 +0200 er r274051 : #i101544# let ScRefTokenHelper::compileRangeRepresentation() fail on all possible non-reference occasions 2009-07-07 10:11:40 +0200 nn r273776 : #i35579# don't use long instead of sal_Int32 2009-07-03 16:41:39 +0200 nn r273711 : msvc warnings 2009-07-03 14:18:45 +0200 nn r273698 : msvc warning 2009-07-03 11:30:41 +0200 nn r273685 : #i35579# move new tokens to the end 2009-07-03 10:12:55 +0200 nn r273681 : CWS-TOOLING: rebase CWS calc51 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 17:57:30 +0200 nn r273529 : #i103027# EnterData: if it's a formula, don't pass EditTextObject to undo 2009-06-29 14:31:18 +0200 er r273474 : #i101544# #i101645# #i102388# applied diff from CWS dr68ooo311 2009-06-29 10:30:20 +0200 nn r273457 : #i103161# DeleteCells: always leave list action 2009-06-24 16:16:34 +0200 nn r273353 : gcc warnings 2009-06-17 11:50:28 +0200 tbe r273055 : #i35579# Standard filter requires more options 2009-06-17 11:44:22 +0200 tbe r273054 : #i35579# Standard filter requires more options 2009-06-17 11:22:23 +0200 tbe r273052 : #i35579# Standard filter requires more options 2009-06-15 18:29:32 +0200 nn r273006 : #160063# UseFormulaData: check parenthesis position 2009-06-12 15:41:16 +0200 nn r272923 : #i99250# handle range lists in DoAutoOutline (patch from dtardon) 2009-06-11 15:07:05 +0200 nn r272874 : #i86943# GetNextPos: skip overlapped cells 2009-06-11 11:17:37 +0200 nn r272856 : #i97726# EnterData: get text from EditTextObject for repeat string of undo action 2009-06-10 20:45:07 +0200 nn r272839 : #i102566# minimum amount of code between updates of calculation progress (patch by cmc) 2009-06-10 20:22:02 +0200 nn r272838 : #i69524# PasteFile: specify target for SID_OPENDOC 2009-06-09 17:33:08 +0200 nn r272789 : #i16615# absolute/relative reference conversion for cell ranges (patch by gaojingmei)
2009-07-28 10:04:47 +00:00
#include "externalrefmgr.hxx"
#include <basic/sbstar.hxx>
#include "doubleref.hxx"
#include "queryparam.hxx"
#include "queryentry.hxx"
2000-09-18 23:16:46 +00:00
static const sal_uInt64 n2power48 = SAL_CONST_UINT64( 281474976710656); // 2^48
2012-01-20 11:44:15 +01:00
IMPL_FIXEDMEMPOOL_NEWDEL( ScTokenStack )
IMPL_FIXEDMEMPOOL_NEWDEL( ScInterpreter )
2000-09-18 23:16:46 +00:00
ScCalcConfig ScInterpreter::maGlobalConfig;
2000-09-18 23:16:46 +00:00
ScTokenStack* ScInterpreter::pGlobalStack = NULL;
2011-08-14 16:10:05 +02:00
bool ScInterpreter::bGlobalStackInUse = false;
2000-09-18 23:16:46 +00:00
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
using namespace formula;
using ::std::auto_ptr;
using ::rtl::OUString;
struct ScCompare
{
double nVal[2];
String* pVal[2];
bool bVal[2];
bool bEmpty[2];
ScCompare( String* p1, String* p2 )
{
pVal[ 0 ] = p1;
pVal[ 1 ] = p2;
bEmpty[0] = false;
bEmpty[1] = false;
}
};
struct ScCompareOptions
{
ScQueryEntry aQueryEntry;
bool bRegEx;
bool bMatchWholeCell;
bool bIgnoreCase;
ScCompareOptions( ScDocument* pDoc, const ScQueryEntry& rEntry, bool bReg );
private:
// Not implemented, prevent usage.
ScCompareOptions();
ScCompareOptions( const ScCompareOptions & );
ScCompareOptions& operator=( const ScCompareOptions & );
};
2000-09-18 23:16:46 +00:00
//-----------------------------------------------------------------------------
// Functions
2000-09-18 23:16:46 +00:00
//-----------------------------------------------------------------------------
void ScInterpreter::ScIfJump()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScIfJump" );
2001-02-21 17:39:37 +00:00
const short* pJump = pCur->GetJump();
short nJumpCount = pJump[ 0 ];
MatrixDoubleRefToMatrix();
switch ( GetStackType() )
{
case svMatrix:
{
ScMatrixRef pMat = PopMatrix();
if ( !pMat )
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalParameter();
else
{
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
FormulaTokenRef xNew;
ScTokenMatrixMap::const_iterator aMapIter;
// DoubleError handled by JumpMatrix
pMat->SetErrorInterpreter( NULL);
SCSIZE nCols, nRows;
pMat->GetDimensions( nCols, nRows );
if ( nCols == 0 || nRows == 0 )
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalArgument();
else if (pTokenMatrixMap && ((aMapIter = pTokenMatrixMap->find(
pCur)) != pTokenMatrixMap->end()))
xNew = (*aMapIter).second;
else
{
ScJumpMatrix* pJumpMat = new ScJumpMatrix( nCols, nRows );
for ( SCSIZE nC=0; nC < nCols; ++nC )
{
for ( SCSIZE nR=0; nR < nRows; ++nR )
{
double fVal;
bool bTrue;
bool bIsValue = pMat->IsValue(nC, nR);
if (bIsValue)
{
fVal = pMat->GetDouble(nC, nR);
bIsValue = ::rtl::math::isFinite(fVal);
bTrue = bIsValue && (fVal != 0.0);
if (bTrue)
fVal = 1.0;
}
else
{
CWS-TOOLING: integrate CWS odff05 2008-12-11 04:17:37 +0100 er r265237 : #i94555# AppendIntToken for GAMMADIST, Excel needs 4 parameters; also use AppendIntToken instead of AppendNumToken for POISSON 2008-12-11 04:04:27 +0100 er r265236 : #i96837# make cumulative parameter of POISSON optional; patch from <lvyue> with slight modifications 2008-12-11 03:35:03 +0100 er r265235 : #i96835# make base parameter of LOG() optional also in UI; patch from <lvyue> 2008-12-11 03:15:30 +0100 er r265234 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-10 18:14:16 +0100 er r265214 : DBG_... need semicolon 2008-12-05 00:49:55 +0100 er r264881 : WaE unxlngi6: declaration of 'pFuncInfo' shadows a previous local 2008-12-05 00:26:05 +0100 er r264879 : #i91547# BETADIST with optional density/cumulative parameter and much better precision; patch from <regina> 2008-12-04 22:51:40 +0100 er r264877 : #i91602# add expm1() and log1p() replacements; based on a patch from <regina> 2008-12-01 16:07:35 +0100 dr r264614 : #i93789# import of EUROCONVERT from XLSX/XLSB 2008-11-28 13:15:01 +0100 dr r264543 : #i93789# new sheet function EUROCONVERT + XLS import/export, patch contributed by lvyue 2008-11-26 14:54:23 +0100 er r264397 : CWS-TOOLING: rebase CWS odff05 to trunk@264325 (milestone: DEV300:m36) 2008-11-20 14:23:33 +0100 er r264053 : CWS-TOOLING: rebase CWS odff05 to trunk@263288 (milestone: DEV300:m35) 2008-11-19 18:07:43 +0100 er r264012 : merged from trunk 2008-11-19 17:51:36 +0100 er r264011 : migrate CWS odff05 to SVN
2009-01-06 13:57:48 +00:00
// Treat empty and empty path as 0, but string
// as error.
bIsValue = (!pMat->IsString(nC, nR) || pMat->IsEmpty(nC, nR));
bTrue = false;
CWS-TOOLING: integrate CWS odff05 2008-12-11 04:17:37 +0100 er r265237 : #i94555# AppendIntToken for GAMMADIST, Excel needs 4 parameters; also use AppendIntToken instead of AppendNumToken for POISSON 2008-12-11 04:04:27 +0100 er r265236 : #i96837# make cumulative parameter of POISSON optional; patch from <lvyue> with slight modifications 2008-12-11 03:35:03 +0100 er r265235 : #i96835# make base parameter of LOG() optional also in UI; patch from <lvyue> 2008-12-11 03:15:30 +0100 er r265234 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-10 18:14:16 +0100 er r265214 : DBG_... need semicolon 2008-12-05 00:49:55 +0100 er r264881 : WaE unxlngi6: declaration of 'pFuncInfo' shadows a previous local 2008-12-05 00:26:05 +0100 er r264879 : #i91547# BETADIST with optional density/cumulative parameter and much better precision; patch from <regina> 2008-12-04 22:51:40 +0100 er r264877 : #i91602# add expm1() and log1p() replacements; based on a patch from <regina> 2008-12-01 16:07:35 +0100 dr r264614 : #i93789# import of EUROCONVERT from XLSX/XLSB 2008-11-28 13:15:01 +0100 dr r264543 : #i93789# new sheet function EUROCONVERT + XLS import/export, patch contributed by lvyue 2008-11-26 14:54:23 +0100 er r264397 : CWS-TOOLING: rebase CWS odff05 to trunk@264325 (milestone: DEV300:m36) 2008-11-20 14:23:33 +0100 er r264053 : CWS-TOOLING: rebase CWS odff05 to trunk@263288 (milestone: DEV300:m35) 2008-11-19 18:07:43 +0100 er r264012 : merged from trunk 2008-11-19 17:51:36 +0100 er r264011 : migrate CWS odff05 to SVN
2009-01-06 13:57:48 +00:00
fVal = (bIsValue ? 0.0 : CreateDoubleError( errNoValue));
}
if ( bTrue )
{ // TRUE
if( nJumpCount >= 2 )
{ // THEN path
pJumpMat->SetJump( nC, nR, fVal,
pJump[ 1 ],
pJump[ nJumpCount ]);
}
else
{ // no parameter given for THEN
pJumpMat->SetJump( nC, nR, fVal,
pJump[ nJumpCount ],
pJump[ nJumpCount ]);
}
}
else
{ // FALSE
if( nJumpCount == 3 && bIsValue )
{ // ELSE path
pJumpMat->SetJump( nC, nR, fVal,
pJump[ 2 ],
pJump[ nJumpCount ]);
}
else
{ // no parameter given for ELSE,
// or DoubleError
pJumpMat->SetJump( nC, nR, fVal,
pJump[ nJumpCount ],
pJump[ nJumpCount ]);
}
}
}
}
xNew = new ScJumpMatrixToken( pJumpMat );
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
GetTokenMatrixMap().insert( ScTokenMatrixMap::value_type(pCur, xNew));
}
PushTempToken( xNew.get());
// set endpoint of path for main code line
aCode.Jump( pJump[ nJumpCount ], pJump[ nJumpCount ] );
}
2000-09-18 23:16:46 +00:00
}
break;
default:
{
if ( GetBool() )
{ // TRUE
if( nJumpCount >= 2 )
{ // THEN path
aCode.Jump( pJump[ 1 ], pJump[ nJumpCount ] );
}
else
{ // no parameter given for THEN
nFuncFmtType = NUMBERFORMAT_LOGICAL;
PushInt(1);
aCode.Jump( pJump[ nJumpCount ], pJump[ nJumpCount ] );
}
}
else
{ // FALSE
if( nJumpCount == 3 )
{ // ELSE path
aCode.Jump( pJump[ 2 ], pJump[ nJumpCount ] );
}
else
{ // no parameter given for ELSE
nFuncFmtType = NUMBERFORMAT_LOGICAL;
PushInt(0);
aCode.Jump( pJump[ nJumpCount ], pJump[ nJumpCount ] );
}
}
2000-09-18 23:16:46 +00:00
}
}
}
void ScInterpreter::ScChoseJump()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScChoseJump" );
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
// We have to set a jump, if there was none chosen because of an error set
// it to endpoint.
bool bHaveJump = false;
2001-02-21 17:39:37 +00:00
const short* pJump = pCur->GetJump();
short nJumpCount = pJump[ 0 ];
MatrixDoubleRefToMatrix();
switch ( GetStackType() )
{
case svMatrix:
{
ScMatrixRef pMat = PopMatrix();
if ( !pMat )
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalParameter();
else
{
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
FormulaTokenRef xNew;
ScTokenMatrixMap::const_iterator aMapIter;
// DoubleError handled by JumpMatrix
pMat->SetErrorInterpreter( NULL);
SCSIZE nCols, nRows;
pMat->GetDimensions( nCols, nRows );
if ( nCols == 0 || nRows == 0 )
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalParameter();
else if (pTokenMatrixMap && ((aMapIter = pTokenMatrixMap->find(
pCur)) != pTokenMatrixMap->end()))
xNew = (*aMapIter).second;
else
{
ScJumpMatrix* pJumpMat = new ScJumpMatrix( nCols, nRows );
for ( SCSIZE nC=0; nC < nCols; ++nC )
{
for ( SCSIZE nR=0; nR < nRows; ++nR )
{
double fVal;
bool bIsValue = pMat->IsValue(nC, nR);
if ( bIsValue )
{
fVal = pMat->GetDouble(nC, nR);
bIsValue = ::rtl::math::isFinite( fVal );
if ( bIsValue )
{
fVal = ::rtl::math::approxFloor( fVal);
if ( (fVal < 1) || (fVal >= nJumpCount))
{
bIsValue = false;
fVal = CreateDoubleError(
errIllegalArgument);
}
}
}
else
{
fVal = CreateDoubleError( errNoValue);
}
if ( bIsValue )
{
pJumpMat->SetJump( nC, nR, fVal,
pJump[ (short)fVal ],
pJump[ nJumpCount ]);
}
else
{
pJumpMat->SetJump( nC, nR, fVal,
pJump[ nJumpCount ],
pJump[ nJumpCount ]);
}
}
}
xNew = new ScJumpMatrixToken( pJumpMat );
GetTokenMatrixMap().insert( ScTokenMatrixMap::value_type(
pCur, xNew));
}
PushTempToken( xNew.get());
// set endpoint of path for main code line
aCode.Jump( pJump[ nJumpCount ], pJump[ nJumpCount ] );
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
bHaveJump = true;
}
}
break;
default:
{
double nJumpIndex = ::rtl::math::approxFloor( GetDouble() );
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
if (!nGlobalError && (nJumpIndex >= 1) && (nJumpIndex < nJumpCount))
{
aCode.Jump( pJump[ (short) nJumpIndex ], pJump[ nJumpCount ] );
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
bHaveJump = true;
}
else
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalArgument();
}
}
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
if (!bHaveJump)
aCode.Jump( pJump[ nJumpCount ], pJump[ nJumpCount ] );
2000-09-18 23:16:46 +00:00
}
static void lcl_AdjustJumpMatrix( ScJumpMatrix* pJumpM, ScMatrixRef& pResMat, SCSIZE nParmCols, SCSIZE nParmRows )
CWS-TOOLING: integrate CWS odff05 2008-12-11 04:17:37 +0100 er r265237 : #i94555# AppendIntToken for GAMMADIST, Excel needs 4 parameters; also use AppendIntToken instead of AppendNumToken for POISSON 2008-12-11 04:04:27 +0100 er r265236 : #i96837# make cumulative parameter of POISSON optional; patch from <lvyue> with slight modifications 2008-12-11 03:35:03 +0100 er r265235 : #i96835# make base parameter of LOG() optional also in UI; patch from <lvyue> 2008-12-11 03:15:30 +0100 er r265234 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-10 18:14:16 +0100 er r265214 : DBG_... need semicolon 2008-12-05 00:49:55 +0100 er r264881 : WaE unxlngi6: declaration of 'pFuncInfo' shadows a previous local 2008-12-05 00:26:05 +0100 er r264879 : #i91547# BETADIST with optional density/cumulative parameter and much better precision; patch from <regina> 2008-12-04 22:51:40 +0100 er r264877 : #i91602# add expm1() and log1p() replacements; based on a patch from <regina> 2008-12-01 16:07:35 +0100 dr r264614 : #i93789# import of EUROCONVERT from XLSX/XLSB 2008-11-28 13:15:01 +0100 dr r264543 : #i93789# new sheet function EUROCONVERT + XLS import/export, patch contributed by lvyue 2008-11-26 14:54:23 +0100 er r264397 : CWS-TOOLING: rebase CWS odff05 to trunk@264325 (milestone: DEV300:m36) 2008-11-20 14:23:33 +0100 er r264053 : CWS-TOOLING: rebase CWS odff05 to trunk@263288 (milestone: DEV300:m35) 2008-11-19 18:07:43 +0100 er r264012 : merged from trunk 2008-11-19 17:51:36 +0100 er r264011 : migrate CWS odff05 to SVN
2009-01-06 13:57:48 +00:00
{
SCSIZE nJumpCols, nJumpRows;
SCSIZE nResCols, nResRows;
SCSIZE nAdjustCols, nAdjustRows;
pJumpM->GetDimensions( nJumpCols, nJumpRows );
pJumpM->GetResMatDimensions( nResCols, nResRows );
if (( nJumpCols == 1 && nParmCols > nResCols ) ||
( nJumpRows == 1 && nParmRows > nResRows ))
{
if ( nJumpCols == 1 && nJumpRows == 1 )
{
nAdjustCols = nParmCols > nResCols ? nParmCols : nResCols;
nAdjustRows = nParmRows > nResRows ? nParmRows : nResRows;
}
else if ( nJumpCols == 1 )
{
nAdjustCols = nParmCols;
nAdjustRows = nResRows;
}
else
{
nAdjustCols = nResCols;
nAdjustRows = nParmRows;
}
pJumpM->SetNewResMat( nAdjustCols, nAdjustRows );
pResMat = pJumpM->GetResultMatrix();
}
}
bool ScInterpreter::JumpMatrix( short nStackLevel )
2000-09-18 23:16:46 +00:00
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::JumpMatrix" );
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
pJumpMatrix = static_cast<ScToken*>(pStack[sp-nStackLevel])->GetJumpMatrix();
ScMatrixRef pResMat = pJumpMatrix->GetResultMatrix();
SCSIZE nC, nR;
if ( nStackLevel == 2 )
{
if ( aCode.HasStacked() )
aCode.Pop(); // pop what Jump() pushed
else
{
OSL_FAIL( "ScInterpreter::JumpMatrix: pop goes the weasel" );
}
if ( !pResMat )
{
Pop();
SetError( errUnknownStackVariable );
}
else
{
pJumpMatrix->GetPos( nC, nR );
switch ( GetStackType() )
{
case svDouble:
{
double fVal = GetDouble();
if ( nGlobalError )
{
fVal = CreateDoubleError( nGlobalError );
nGlobalError = 0;
}
pResMat->PutDouble( fVal, nC, nR );
}
break;
case svString:
{
const String& rStr = GetString();
if ( nGlobalError )
{
pResMat->PutDouble( CreateDoubleError( nGlobalError),
nC, nR);
nGlobalError = 0;
}
else
pResMat->PutString( rStr, nC, nR );
}
break;
case svSingleRef:
{
ScAddress aAdr;
PopSingleRef( aAdr );
if ( nGlobalError )
{
pResMat->PutDouble( CreateDoubleError( nGlobalError),
nC, nR);
nGlobalError = 0;
}
else
{
ScBaseCell* pCell = GetCell( aAdr );
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
if (HasCellEmptyData( pCell))
pResMat->PutEmpty( nC, nR );
else if (HasCellValueData( pCell))
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
double fVal = GetCellValue( aAdr, pCell);
if ( nGlobalError )
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
fVal = CreateDoubleError(
nGlobalError);
nGlobalError = 0;
}
pResMat->PutDouble( fVal, nC, nR );
}
else
{
String aStr;
GetCellString( aStr, pCell );
if ( nGlobalError )
{
pResMat->PutDouble( CreateDoubleError(
nGlobalError), nC, nR);
nGlobalError = 0;
}
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
else
pResMat->PutString( aStr, nC, nR);
}
}
}
break;
case svDoubleRef:
{ // upper left plus offset within matrix
double fVal;
ScRange aRange;
PopDoubleRef( aRange );
if ( nGlobalError )
{
fVal = CreateDoubleError( nGlobalError );
nGlobalError = 0;
pResMat->PutDouble( fVal, nC, nR );
}
else
{
CWS-TOOLING: integrate CWS odff05 2008-12-11 04:17:37 +0100 er r265237 : #i94555# AppendIntToken for GAMMADIST, Excel needs 4 parameters; also use AppendIntToken instead of AppendNumToken for POISSON 2008-12-11 04:04:27 +0100 er r265236 : #i96837# make cumulative parameter of POISSON optional; patch from <lvyue> with slight modifications 2008-12-11 03:35:03 +0100 er r265235 : #i96835# make base parameter of LOG() optional also in UI; patch from <lvyue> 2008-12-11 03:15:30 +0100 er r265234 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-10 18:14:16 +0100 er r265214 : DBG_... need semicolon 2008-12-05 00:49:55 +0100 er r264881 : WaE unxlngi6: declaration of 'pFuncInfo' shadows a previous local 2008-12-05 00:26:05 +0100 er r264879 : #i91547# BETADIST with optional density/cumulative parameter and much better precision; patch from <regina> 2008-12-04 22:51:40 +0100 er r264877 : #i91602# add expm1() and log1p() replacements; based on a patch from <regina> 2008-12-01 16:07:35 +0100 dr r264614 : #i93789# import of EUROCONVERT from XLSX/XLSB 2008-11-28 13:15:01 +0100 dr r264543 : #i93789# new sheet function EUROCONVERT + XLS import/export, patch contributed by lvyue 2008-11-26 14:54:23 +0100 er r264397 : CWS-TOOLING: rebase CWS odff05 to trunk@264325 (milestone: DEV300:m36) 2008-11-20 14:23:33 +0100 er r264053 : CWS-TOOLING: rebase CWS odff05 to trunk@263288 (milestone: DEV300:m35) 2008-11-19 18:07:43 +0100 er r264012 : merged from trunk 2008-11-19 17:51:36 +0100 er r264011 : migrate CWS odff05 to SVN
2009-01-06 13:57:48 +00:00
// Do not modify the original range because we use it
// to adjust the size of the result matrix if necessary.
ScAddress aAdr( aRange.aStart);
sal_uLong nCol = (sal_uLong)aAdr.Col() + nC;
sal_uLong nRow = (sal_uLong)aAdr.Row() + nR;
if ((nCol > static_cast<sal_uLong>(aRange.aEnd.Col()) &&
CWS-TOOLING: integrate CWS odff05 2008-12-11 04:17:37 +0100 er r265237 : #i94555# AppendIntToken for GAMMADIST, Excel needs 4 parameters; also use AppendIntToken instead of AppendNumToken for POISSON 2008-12-11 04:04:27 +0100 er r265236 : #i96837# make cumulative parameter of POISSON optional; patch from <lvyue> with slight modifications 2008-12-11 03:35:03 +0100 er r265235 : #i96835# make base parameter of LOG() optional also in UI; patch from <lvyue> 2008-12-11 03:15:30 +0100 er r265234 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-10 18:14:16 +0100 er r265214 : DBG_... need semicolon 2008-12-05 00:49:55 +0100 er r264881 : WaE unxlngi6: declaration of 'pFuncInfo' shadows a previous local 2008-12-05 00:26:05 +0100 er r264879 : #i91547# BETADIST with optional density/cumulative parameter and much better precision; patch from <regina> 2008-12-04 22:51:40 +0100 er r264877 : #i91602# add expm1() and log1p() replacements; based on a patch from <regina> 2008-12-01 16:07:35 +0100 dr r264614 : #i93789# import of EUROCONVERT from XLSX/XLSB 2008-11-28 13:15:01 +0100 dr r264543 : #i93789# new sheet function EUROCONVERT + XLS import/export, patch contributed by lvyue 2008-11-26 14:54:23 +0100 er r264397 : CWS-TOOLING: rebase CWS odff05 to trunk@264325 (milestone: DEV300:m36) 2008-11-20 14:23:33 +0100 er r264053 : CWS-TOOLING: rebase CWS odff05 to trunk@263288 (milestone: DEV300:m35) 2008-11-19 18:07:43 +0100 er r264012 : merged from trunk 2008-11-19 17:51:36 +0100 er r264011 : migrate CWS odff05 to SVN
2009-01-06 13:57:48 +00:00
aRange.aEnd.Col() != aRange.aStart.Col())
|| (nRow > static_cast<sal_uLong>(aRange.aEnd.Row()) &&
CWS-TOOLING: integrate CWS odff05 2008-12-11 04:17:37 +0100 er r265237 : #i94555# AppendIntToken for GAMMADIST, Excel needs 4 parameters; also use AppendIntToken instead of AppendNumToken for POISSON 2008-12-11 04:04:27 +0100 er r265236 : #i96837# make cumulative parameter of POISSON optional; patch from <lvyue> with slight modifications 2008-12-11 03:35:03 +0100 er r265235 : #i96835# make base parameter of LOG() optional also in UI; patch from <lvyue> 2008-12-11 03:15:30 +0100 er r265234 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-10 18:14:16 +0100 er r265214 : DBG_... need semicolon 2008-12-05 00:49:55 +0100 er r264881 : WaE unxlngi6: declaration of 'pFuncInfo' shadows a previous local 2008-12-05 00:26:05 +0100 er r264879 : #i91547# BETADIST with optional density/cumulative parameter and much better precision; patch from <regina> 2008-12-04 22:51:40 +0100 er r264877 : #i91602# add expm1() and log1p() replacements; based on a patch from <regina> 2008-12-01 16:07:35 +0100 dr r264614 : #i93789# import of EUROCONVERT from XLSX/XLSB 2008-11-28 13:15:01 +0100 dr r264543 : #i93789# new sheet function EUROCONVERT + XLS import/export, patch contributed by lvyue 2008-11-26 14:54:23 +0100 er r264397 : CWS-TOOLING: rebase CWS odff05 to trunk@264325 (milestone: DEV300:m36) 2008-11-20 14:23:33 +0100 er r264053 : CWS-TOOLING: rebase CWS odff05 to trunk@263288 (milestone: DEV300:m35) 2008-11-19 18:07:43 +0100 er r264012 : merged from trunk 2008-11-19 17:51:36 +0100 er r264011 : migrate CWS odff05 to SVN
2009-01-06 13:57:48 +00:00
aRange.aEnd.Row() != aRange.aStart.Row()))
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
{
CWS-TOOLING: integrate CWS odff05 2008-12-11 04:17:37 +0100 er r265237 : #i94555# AppendIntToken for GAMMADIST, Excel needs 4 parameters; also use AppendIntToken instead of AppendNumToken for POISSON 2008-12-11 04:04:27 +0100 er r265236 : #i96837# make cumulative parameter of POISSON optional; patch from <lvyue> with slight modifications 2008-12-11 03:35:03 +0100 er r265235 : #i96835# make base parameter of LOG() optional also in UI; patch from <lvyue> 2008-12-11 03:15:30 +0100 er r265234 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-10 18:14:16 +0100 er r265214 : DBG_... need semicolon 2008-12-05 00:49:55 +0100 er r264881 : WaE unxlngi6: declaration of 'pFuncInfo' shadows a previous local 2008-12-05 00:26:05 +0100 er r264879 : #i91547# BETADIST with optional density/cumulative parameter and much better precision; patch from <regina> 2008-12-04 22:51:40 +0100 er r264877 : #i91602# add expm1() and log1p() replacements; based on a patch from <regina> 2008-12-01 16:07:35 +0100 dr r264614 : #i93789# import of EUROCONVERT from XLSX/XLSB 2008-11-28 13:15:01 +0100 dr r264543 : #i93789# new sheet function EUROCONVERT + XLS import/export, patch contributed by lvyue 2008-11-26 14:54:23 +0100 er r264397 : CWS-TOOLING: rebase CWS odff05 to trunk@264325 (milestone: DEV300:m36) 2008-11-20 14:23:33 +0100 er r264053 : CWS-TOOLING: rebase CWS odff05 to trunk@263288 (milestone: DEV300:m35) 2008-11-19 18:07:43 +0100 er r264012 : merged from trunk 2008-11-19 17:51:36 +0100 er r264011 : migrate CWS odff05 to SVN
2009-01-06 13:57:48 +00:00
fVal = CreateDoubleError( NOTAVAILABLE );
pResMat->PutDouble( fVal, nC, nR );
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
}
else
{
CWS-TOOLING: integrate CWS odff05 2008-12-11 04:17:37 +0100 er r265237 : #i94555# AppendIntToken for GAMMADIST, Excel needs 4 parameters; also use AppendIntToken instead of AppendNumToken for POISSON 2008-12-11 04:04:27 +0100 er r265236 : #i96837# make cumulative parameter of POISSON optional; patch from <lvyue> with slight modifications 2008-12-11 03:35:03 +0100 er r265235 : #i96835# make base parameter of LOG() optional also in UI; patch from <lvyue> 2008-12-11 03:15:30 +0100 er r265234 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-10 18:14:16 +0100 er r265214 : DBG_... need semicolon 2008-12-05 00:49:55 +0100 er r264881 : WaE unxlngi6: declaration of 'pFuncInfo' shadows a previous local 2008-12-05 00:26:05 +0100 er r264879 : #i91547# BETADIST with optional density/cumulative parameter and much better precision; patch from <regina> 2008-12-04 22:51:40 +0100 er r264877 : #i91602# add expm1() and log1p() replacements; based on a patch from <regina> 2008-12-01 16:07:35 +0100 dr r264614 : #i93789# import of EUROCONVERT from XLSX/XLSB 2008-11-28 13:15:01 +0100 dr r264543 : #i93789# new sheet function EUROCONVERT + XLS import/export, patch contributed by lvyue 2008-11-26 14:54:23 +0100 er r264397 : CWS-TOOLING: rebase CWS odff05 to trunk@264325 (milestone: DEV300:m36) 2008-11-20 14:23:33 +0100 er r264053 : CWS-TOOLING: rebase CWS odff05 to trunk@263288 (milestone: DEV300:m35) 2008-11-19 18:07:43 +0100 er r264012 : merged from trunk 2008-11-19 17:51:36 +0100 er r264011 : migrate CWS odff05 to SVN
2009-01-06 13:57:48 +00:00
// Replicate column and/or row of a vector if it is
// one. Note that this could be a range reference
// that in fact consists of only one cell, e.g. A1:A1
if (aRange.aEnd.Col() == aRange.aStart.Col())
nCol = aRange.aStart.Col();
if (aRange.aEnd.Row() == aRange.aStart.Row())
nRow = aRange.aStart.Row();
aAdr.SetCol( static_cast<SCCOL>(nCol) );
aAdr.SetRow( static_cast<SCROW>(nRow) );
ScBaseCell* pCell = GetCell( aAdr );
if (HasCellEmptyData( pCell))
pResMat->PutEmpty( nC, nR );
else if (HasCellValueData( pCell))
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
{
CWS-TOOLING: integrate CWS odff05 2008-12-11 04:17:37 +0100 er r265237 : #i94555# AppendIntToken for GAMMADIST, Excel needs 4 parameters; also use AppendIntToken instead of AppendNumToken for POISSON 2008-12-11 04:04:27 +0100 er r265236 : #i96837# make cumulative parameter of POISSON optional; patch from <lvyue> with slight modifications 2008-12-11 03:35:03 +0100 er r265235 : #i96835# make base parameter of LOG() optional also in UI; patch from <lvyue> 2008-12-11 03:15:30 +0100 er r265234 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-10 18:14:16 +0100 er r265214 : DBG_... need semicolon 2008-12-05 00:49:55 +0100 er r264881 : WaE unxlngi6: declaration of 'pFuncInfo' shadows a previous local 2008-12-05 00:26:05 +0100 er r264879 : #i91547# BETADIST with optional density/cumulative parameter and much better precision; patch from <regina> 2008-12-04 22:51:40 +0100 er r264877 : #i91602# add expm1() and log1p() replacements; based on a patch from <regina> 2008-12-01 16:07:35 +0100 dr r264614 : #i93789# import of EUROCONVERT from XLSX/XLSB 2008-11-28 13:15:01 +0100 dr r264543 : #i93789# new sheet function EUROCONVERT + XLS import/export, patch contributed by lvyue 2008-11-26 14:54:23 +0100 er r264397 : CWS-TOOLING: rebase CWS odff05 to trunk@264325 (milestone: DEV300:m36) 2008-11-20 14:23:33 +0100 er r264053 : CWS-TOOLING: rebase CWS odff05 to trunk@263288 (milestone: DEV300:m35) 2008-11-19 18:07:43 +0100 er r264012 : merged from trunk 2008-11-19 17:51:36 +0100 er r264011 : migrate CWS odff05 to SVN
2009-01-06 13:57:48 +00:00
double fCellVal = GetCellValue( aAdr, pCell);
if ( nGlobalError )
{
fCellVal = CreateDoubleError(
nGlobalError);
nGlobalError = 0;
}
pResMat->PutDouble( fCellVal, nC, nR );
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
}
else
CWS-TOOLING: integrate CWS odff05 2008-12-11 04:17:37 +0100 er r265237 : #i94555# AppendIntToken for GAMMADIST, Excel needs 4 parameters; also use AppendIntToken instead of AppendNumToken for POISSON 2008-12-11 04:04:27 +0100 er r265236 : #i96837# make cumulative parameter of POISSON optional; patch from <lvyue> with slight modifications 2008-12-11 03:35:03 +0100 er r265235 : #i96835# make base parameter of LOG() optional also in UI; patch from <lvyue> 2008-12-11 03:15:30 +0100 er r265234 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-10 18:14:16 +0100 er r265214 : DBG_... need semicolon 2008-12-05 00:49:55 +0100 er r264881 : WaE unxlngi6: declaration of 'pFuncInfo' shadows a previous local 2008-12-05 00:26:05 +0100 er r264879 : #i91547# BETADIST with optional density/cumulative parameter and much better precision; patch from <regina> 2008-12-04 22:51:40 +0100 er r264877 : #i91602# add expm1() and log1p() replacements; based on a patch from <regina> 2008-12-01 16:07:35 +0100 dr r264614 : #i93789# import of EUROCONVERT from XLSX/XLSB 2008-11-28 13:15:01 +0100 dr r264543 : #i93789# new sheet function EUROCONVERT + XLS import/export, patch contributed by lvyue 2008-11-26 14:54:23 +0100 er r264397 : CWS-TOOLING: rebase CWS odff05 to trunk@264325 (milestone: DEV300:m36) 2008-11-20 14:23:33 +0100 er r264053 : CWS-TOOLING: rebase CWS odff05 to trunk@263288 (milestone: DEV300:m35) 2008-11-19 18:07:43 +0100 er r264012 : merged from trunk 2008-11-19 17:51:36 +0100 er r264011 : migrate CWS odff05 to SVN
2009-01-06 13:57:48 +00:00
{
String aStr;
GetCellString( aStr, pCell );
if ( nGlobalError )
{
pResMat->PutDouble( CreateDoubleError(
nGlobalError), nC, nR);
nGlobalError = 0;
}
else
pResMat->PutString( aStr, nC, nR );
}
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
}
CWS-TOOLING: integrate CWS odff05 2008-12-11 04:17:37 +0100 er r265237 : #i94555# AppendIntToken for GAMMADIST, Excel needs 4 parameters; also use AppendIntToken instead of AppendNumToken for POISSON 2008-12-11 04:04:27 +0100 er r265236 : #i96837# make cumulative parameter of POISSON optional; patch from <lvyue> with slight modifications 2008-12-11 03:35:03 +0100 er r265235 : #i96835# make base parameter of LOG() optional also in UI; patch from <lvyue> 2008-12-11 03:15:30 +0100 er r265234 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-10 18:14:16 +0100 er r265214 : DBG_... need semicolon 2008-12-05 00:49:55 +0100 er r264881 : WaE unxlngi6: declaration of 'pFuncInfo' shadows a previous local 2008-12-05 00:26:05 +0100 er r264879 : #i91547# BETADIST with optional density/cumulative parameter and much better precision; patch from <regina> 2008-12-04 22:51:40 +0100 er r264877 : #i91602# add expm1() and log1p() replacements; based on a patch from <regina> 2008-12-01 16:07:35 +0100 dr r264614 : #i93789# import of EUROCONVERT from XLSX/XLSB 2008-11-28 13:15:01 +0100 dr r264543 : #i93789# new sheet function EUROCONVERT + XLS import/export, patch contributed by lvyue 2008-11-26 14:54:23 +0100 er r264397 : CWS-TOOLING: rebase CWS odff05 to trunk@264325 (milestone: DEV300:m36) 2008-11-20 14:23:33 +0100 er r264053 : CWS-TOOLING: rebase CWS odff05 to trunk@263288 (milestone: DEV300:m35) 2008-11-19 18:07:43 +0100 er r264012 : merged from trunk 2008-11-19 17:51:36 +0100 er r264011 : migrate CWS odff05 to SVN
2009-01-06 13:57:48 +00:00
SCSIZE nParmCols = aRange.aEnd.Col() - aRange.aStart.Col() + 1;
SCSIZE nParmRows = aRange.aEnd.Row() - aRange.aStart.Row() + 1;
lcl_AdjustJumpMatrix( pJumpMatrix, pResMat, nParmCols, nParmRows );
}
}
break;
case svMatrix:
{ // match matrix offsets
double fVal;
ScMatrixRef pMat = PopMatrix();
if ( nGlobalError )
{
fVal = CreateDoubleError( nGlobalError );
nGlobalError = 0;
pResMat->PutDouble( fVal, nC, nR );
}
else if ( !pMat )
{
fVal = CreateDoubleError( errUnknownVariable );
pResMat->PutDouble( fVal, nC, nR );
}
else
{
SCSIZE nCols, nRows;
pMat->GetDimensions( nCols, nRows );
CWS-TOOLING: integrate CWS odff05 2008-12-11 04:17:37 +0100 er r265237 : #i94555# AppendIntToken for GAMMADIST, Excel needs 4 parameters; also use AppendIntToken instead of AppendNumToken for POISSON 2008-12-11 04:04:27 +0100 er r265236 : #i96837# make cumulative parameter of POISSON optional; patch from <lvyue> with slight modifications 2008-12-11 03:35:03 +0100 er r265235 : #i96835# make base parameter of LOG() optional also in UI; patch from <lvyue> 2008-12-11 03:15:30 +0100 er r265234 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-10 18:14:16 +0100 er r265214 : DBG_... need semicolon 2008-12-05 00:49:55 +0100 er r264881 : WaE unxlngi6: declaration of 'pFuncInfo' shadows a previous local 2008-12-05 00:26:05 +0100 er r264879 : #i91547# BETADIST with optional density/cumulative parameter and much better precision; patch from <regina> 2008-12-04 22:51:40 +0100 er r264877 : #i91602# add expm1() and log1p() replacements; based on a patch from <regina> 2008-12-01 16:07:35 +0100 dr r264614 : #i93789# import of EUROCONVERT from XLSX/XLSB 2008-11-28 13:15:01 +0100 dr r264543 : #i93789# new sheet function EUROCONVERT + XLS import/export, patch contributed by lvyue 2008-11-26 14:54:23 +0100 er r264397 : CWS-TOOLING: rebase CWS odff05 to trunk@264325 (milestone: DEV300:m36) 2008-11-20 14:23:33 +0100 er r264053 : CWS-TOOLING: rebase CWS odff05 to trunk@263288 (milestone: DEV300:m35) 2008-11-19 18:07:43 +0100 er r264012 : merged from trunk 2008-11-19 17:51:36 +0100 er r264011 : migrate CWS odff05 to SVN
2009-01-06 13:57:48 +00:00
if ((nCols <= nC && nCols != 1) ||
(nRows <= nR && nRows != 1))
{
CWS-TOOLING: integrate CWS odff05 2008-12-11 04:17:37 +0100 er r265237 : #i94555# AppendIntToken for GAMMADIST, Excel needs 4 parameters; also use AppendIntToken instead of AppendNumToken for POISSON 2008-12-11 04:04:27 +0100 er r265236 : #i96837# make cumulative parameter of POISSON optional; patch from <lvyue> with slight modifications 2008-12-11 03:35:03 +0100 er r265235 : #i96835# make base parameter of LOG() optional also in UI; patch from <lvyue> 2008-12-11 03:15:30 +0100 er r265234 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-10 18:14:16 +0100 er r265214 : DBG_... need semicolon 2008-12-05 00:49:55 +0100 er r264881 : WaE unxlngi6: declaration of 'pFuncInfo' shadows a previous local 2008-12-05 00:26:05 +0100 er r264879 : #i91547# BETADIST with optional density/cumulative parameter and much better precision; patch from <regina> 2008-12-04 22:51:40 +0100 er r264877 : #i91602# add expm1() and log1p() replacements; based on a patch from <regina> 2008-12-01 16:07:35 +0100 dr r264614 : #i93789# import of EUROCONVERT from XLSX/XLSB 2008-11-28 13:15:01 +0100 dr r264543 : #i93789# new sheet function EUROCONVERT + XLS import/export, patch contributed by lvyue 2008-11-26 14:54:23 +0100 er r264397 : CWS-TOOLING: rebase CWS odff05 to trunk@264325 (milestone: DEV300:m36) 2008-11-20 14:23:33 +0100 er r264053 : CWS-TOOLING: rebase CWS odff05 to trunk@263288 (milestone: DEV300:m35) 2008-11-19 18:07:43 +0100 er r264012 : merged from trunk 2008-11-19 17:51:36 +0100 er r264011 : migrate CWS odff05 to SVN
2009-01-06 13:57:48 +00:00
fVal = CreateDoubleError( NOTAVAILABLE );
pResMat->PutDouble( fVal, nC, nR );
}
else
{
if ( pMat->IsValue( nC, nR ) )
{
fVal = pMat->GetDouble( nC, nR );
pResMat->PutDouble( fVal, nC, nR );
}
else if ( pMat->IsEmpty( nC, nR ) )
pResMat->PutEmpty( nC, nR );
else
{
const String& rStr = pMat->GetString( nC, nR );
pResMat->PutString( rStr, nC, nR );
}
}
CWS-TOOLING: integrate CWS odff05 2008-12-11 04:17:37 +0100 er r265237 : #i94555# AppendIntToken for GAMMADIST, Excel needs 4 parameters; also use AppendIntToken instead of AppendNumToken for POISSON 2008-12-11 04:04:27 +0100 er r265236 : #i96837# make cumulative parameter of POISSON optional; patch from <lvyue> with slight modifications 2008-12-11 03:35:03 +0100 er r265235 : #i96835# make base parameter of LOG() optional also in UI; patch from <lvyue> 2008-12-11 03:15:30 +0100 er r265234 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-10 18:14:16 +0100 er r265214 : DBG_... need semicolon 2008-12-05 00:49:55 +0100 er r264881 : WaE unxlngi6: declaration of 'pFuncInfo' shadows a previous local 2008-12-05 00:26:05 +0100 er r264879 : #i91547# BETADIST with optional density/cumulative parameter and much better precision; patch from <regina> 2008-12-04 22:51:40 +0100 er r264877 : #i91602# add expm1() and log1p() replacements; based on a patch from <regina> 2008-12-01 16:07:35 +0100 dr r264614 : #i93789# import of EUROCONVERT from XLSX/XLSB 2008-11-28 13:15:01 +0100 dr r264543 : #i93789# new sheet function EUROCONVERT + XLS import/export, patch contributed by lvyue 2008-11-26 14:54:23 +0100 er r264397 : CWS-TOOLING: rebase CWS odff05 to trunk@264325 (milestone: DEV300:m36) 2008-11-20 14:23:33 +0100 er r264053 : CWS-TOOLING: rebase CWS odff05 to trunk@263288 (milestone: DEV300:m35) 2008-11-19 18:07:43 +0100 er r264012 : merged from trunk 2008-11-19 17:51:36 +0100 er r264011 : migrate CWS odff05 to SVN
2009-01-06 13:57:48 +00:00
lcl_AdjustJumpMatrix( pJumpMatrix, pResMat, nCols, nRows );
}
}
break;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
case svError:
{
PopError();
double fVal = CreateDoubleError( nGlobalError);
nGlobalError = 0;
pResMat->PutDouble( fVal, nC, nR );
}
break;
default:
{
Pop();
double fVal = CreateDoubleError( errIllegalArgument);
pResMat->PutDouble( fVal, nC, nR );
}
}
}
}
bool bCont = pJumpMatrix->Next( nC, nR );
if ( bCont )
{
double fBool;
short nStart, nNext, nStop;
pJumpMatrix->GetJump( nC, nR, fBool, nStart, nNext, nStop );
while ( bCont && nStart == nNext )
{ // push all results that have no jump path
if ( pResMat )
{
2011-08-14 16:10:05 +02:00
// a false without path results in an empty path value
if ( fBool == 0.0 )
pResMat->PutEmptyPath( nC, nR );
else
pResMat->PutDouble( fBool, nC, nR );
}
bCont = pJumpMatrix->Next( nC, nR );
if ( bCont )
pJumpMatrix->GetJump( nC, nR, fBool, nStart, nNext, nStop );
}
if ( bCont && nStart != nNext )
{
const ScTokenVec* pParams = pJumpMatrix->GetJumpParameters();
if ( pParams )
{
for ( ScTokenVec::const_iterator i = pParams->begin();
i != pParams->end(); ++i )
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
// This is not the current state of the interpreter, so
// push without error, and elements' errors are coded into
// double.
PushWithoutError( *(*i));
}
}
aCode.Jump( nStart, nNext, nStop );
}
}
if ( !bCont )
{ // we're done with it, throw away jump matrix, keep result
pJumpMatrix = NULL;
Pop();
PushMatrix( pResMat );
// Remove jump matrix from map and remember result matrix in case it
// could be reused in another path of the same condition.
if (pTokenMatrixMap)
{
pTokenMatrixMap->erase( pCur);
pTokenMatrixMap->insert( ScTokenMatrixMap::value_type( pCur,
pStack[sp-1]));
}
return true;
}
return false;
}
CWS-TOOLING: integrate CWS calc51 2009-07-17 15:47:46 +0200 er r274098 : #i101544# more thorough reference checking in chart data ranges; also prevent some possible crash if invalid ranges were to be passed to document/cell access. 2009-07-16 14:20:11 +0200 er r274051 : #i101544# let ScRefTokenHelper::compileRangeRepresentation() fail on all possible non-reference occasions 2009-07-07 10:11:40 +0200 nn r273776 : #i35579# don't use long instead of sal_Int32 2009-07-03 16:41:39 +0200 nn r273711 : msvc warnings 2009-07-03 14:18:45 +0200 nn r273698 : msvc warning 2009-07-03 11:30:41 +0200 nn r273685 : #i35579# move new tokens to the end 2009-07-03 10:12:55 +0200 nn r273681 : CWS-TOOLING: rebase CWS calc51 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 17:57:30 +0200 nn r273529 : #i103027# EnterData: if it's a formula, don't pass EditTextObject to undo 2009-06-29 14:31:18 +0200 er r273474 : #i101544# #i101645# #i102388# applied diff from CWS dr68ooo311 2009-06-29 10:30:20 +0200 nn r273457 : #i103161# DeleteCells: always leave list action 2009-06-24 16:16:34 +0200 nn r273353 : gcc warnings 2009-06-17 11:50:28 +0200 tbe r273055 : #i35579# Standard filter requires more options 2009-06-17 11:44:22 +0200 tbe r273054 : #i35579# Standard filter requires more options 2009-06-17 11:22:23 +0200 tbe r273052 : #i35579# Standard filter requires more options 2009-06-15 18:29:32 +0200 nn r273006 : #160063# UseFormulaData: check parenthesis position 2009-06-12 15:41:16 +0200 nn r272923 : #i99250# handle range lists in DoAutoOutline (patch from dtardon) 2009-06-11 15:07:05 +0200 nn r272874 : #i86943# GetNextPos: skip overlapped cells 2009-06-11 11:17:37 +0200 nn r272856 : #i97726# EnterData: get text from EditTextObject for repeat string of undo action 2009-06-10 20:45:07 +0200 nn r272839 : #i102566# minimum amount of code between updates of calculation progress (patch by cmc) 2009-06-10 20:22:02 +0200 nn r272838 : #i69524# PasteFile: specify target for SID_OPENDOC 2009-06-09 17:33:08 +0200 nn r272789 : #i16615# absolute/relative reference conversion for cell ranges (patch by gaojingmei)
2009-07-28 10:04:47 +00:00
ScCompareOptions::ScCompareOptions( ScDocument* pDoc, const ScQueryEntry& rEntry, bool bReg ) :
aQueryEntry(rEntry),
bRegEx(bReg),
bMatchWholeCell(pDoc->GetDocOptions().IsMatchWholeCell()),
bIgnoreCase(true)
{
bRegEx = (bRegEx && (aQueryEntry.eOp == SC_EQUAL || aQueryEntry.eOp == SC_NOT_EQUAL));
// Interpreter functions usually are case insensitive, except the simple
// comparison operators, for which these options aren't used. Override in
// struct if needed.
}
double ScInterpreter::CompareFunc( const ScCompare& rComp, ScCompareOptions* pOptions )
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::CompareFunc" );
// Keep DoubleError if encountered
// #i40539# if bEmpty is set, bVal/nVal are uninitialized
if ( !rComp.bEmpty[0] && rComp.bVal[0] && !::rtl::math::isFinite( rComp.nVal[0]))
return rComp.nVal[0];
if ( !rComp.bEmpty[1] && rComp.bVal[1] && !::rtl::math::isFinite( rComp.nVal[1]))
return rComp.nVal[1];
size_t nStringQuery = 0; // 0:=no, 1:=0, 2:=1
double fRes = 0;
2000-09-18 23:16:46 +00:00
if ( rComp.bEmpty[ 0 ] )
{
if ( rComp.bEmpty[ 1 ] )
; // empty cell == empty cell, fRes 0
2000-09-18 23:16:46 +00:00
else if( rComp.bVal[ 1 ] )
{
if ( !::rtl::math::approxEqual( rComp.nVal[ 1 ], 0.0 ) )
2000-09-18 23:16:46 +00:00
{
if ( rComp.nVal[ 1 ] < 0.0 )
fRes = 1; // empty cell > -x
2000-09-18 23:16:46 +00:00
else
fRes = -1; // empty cell < x
2000-09-18 23:16:46 +00:00
}
// else: empty cell == 0.0
2000-09-18 23:16:46 +00:00
}
else
{
if ( rComp.pVal[ 1 ]->Len() )
fRes = -1; // empty cell < "..."
// else: empty cell == ""
2000-09-18 23:16:46 +00:00
}
}
else if ( rComp.bEmpty[ 1 ] )
{
if( rComp.bVal[ 0 ] )
{
if ( !::rtl::math::approxEqual( rComp.nVal[ 0 ], 0.0 ) )
2000-09-18 23:16:46 +00:00
{
if ( rComp.nVal[ 0 ] < 0.0 )
fRes = -1; // -x < empty cell
2000-09-18 23:16:46 +00:00
else
fRes = 1; // x > empty cell
2000-09-18 23:16:46 +00:00
}
// else: empty cell == 0.0
2000-09-18 23:16:46 +00:00
}
else
{
if ( rComp.pVal[ 0 ]->Len() )
fRes = 1; // "..." > empty cell
// else: "" == empty cell
2000-09-18 23:16:46 +00:00
}
}
else if( rComp.bVal[ 0 ] )
{
if( rComp.bVal[ 1 ] )
{
if ( !::rtl::math::approxEqual( rComp.nVal[ 0 ], rComp.nVal[ 1 ] ) )
2000-09-18 23:16:46 +00:00
{
if( rComp.nVal[ 0 ] - rComp.nVal[ 1 ] < 0 )
fRes = -1;
2000-09-18 23:16:46 +00:00
else
fRes = 1;
2000-09-18 23:16:46 +00:00
}
}
else
{
fRes = -1; // number is less than string
nStringQuery = 2; // 1+1
}
2000-09-18 23:16:46 +00:00
}
else if( rComp.bVal[ 1 ] )
{
fRes = 1; // string is greater than number
nStringQuery = 1; // 0+1
}
2000-09-18 23:16:46 +00:00
else
{
CWS-TOOLING: integrate CWS calc51 2009-07-17 15:47:46 +0200 er r274098 : #i101544# more thorough reference checking in chart data ranges; also prevent some possible crash if invalid ranges were to be passed to document/cell access. 2009-07-16 14:20:11 +0200 er r274051 : #i101544# let ScRefTokenHelper::compileRangeRepresentation() fail on all possible non-reference occasions 2009-07-07 10:11:40 +0200 nn r273776 : #i35579# don't use long instead of sal_Int32 2009-07-03 16:41:39 +0200 nn r273711 : msvc warnings 2009-07-03 14:18:45 +0200 nn r273698 : msvc warning 2009-07-03 11:30:41 +0200 nn r273685 : #i35579# move new tokens to the end 2009-07-03 10:12:55 +0200 nn r273681 : CWS-TOOLING: rebase CWS calc51 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 17:57:30 +0200 nn r273529 : #i103027# EnterData: if it's a formula, don't pass EditTextObject to undo 2009-06-29 14:31:18 +0200 er r273474 : #i101544# #i101645# #i102388# applied diff from CWS dr68ooo311 2009-06-29 10:30:20 +0200 nn r273457 : #i103161# DeleteCells: always leave list action 2009-06-24 16:16:34 +0200 nn r273353 : gcc warnings 2009-06-17 11:50:28 +0200 tbe r273055 : #i35579# Standard filter requires more options 2009-06-17 11:44:22 +0200 tbe r273054 : #i35579# Standard filter requires more options 2009-06-17 11:22:23 +0200 tbe r273052 : #i35579# Standard filter requires more options 2009-06-15 18:29:32 +0200 nn r273006 : #160063# UseFormulaData: check parenthesis position 2009-06-12 15:41:16 +0200 nn r272923 : #i99250# handle range lists in DoAutoOutline (patch from dtardon) 2009-06-11 15:07:05 +0200 nn r272874 : #i86943# GetNextPos: skip overlapped cells 2009-06-11 11:17:37 +0200 nn r272856 : #i97726# EnterData: get text from EditTextObject for repeat string of undo action 2009-06-10 20:45:07 +0200 nn r272839 : #i102566# minimum amount of code between updates of calculation progress (patch by cmc) 2009-06-10 20:22:02 +0200 nn r272838 : #i69524# PasteFile: specify target for SID_OPENDOC 2009-06-09 17:33:08 +0200 nn r272789 : #i16615# absolute/relative reference conversion for cell ranges (patch by gaojingmei)
2009-07-28 10:04:47 +00:00
// Both strings.
if (pOptions)
{
// All similar to ScTable::ValidQuery(), *rComp.pVal[1] actually
CWS-TOOLING: integrate CWS calc51 2009-07-17 15:47:46 +0200 er r274098 : #i101544# more thorough reference checking in chart data ranges; also prevent some possible crash if invalid ranges were to be passed to document/cell access. 2009-07-16 14:20:11 +0200 er r274051 : #i101544# let ScRefTokenHelper::compileRangeRepresentation() fail on all possible non-reference occasions 2009-07-07 10:11:40 +0200 nn r273776 : #i35579# don't use long instead of sal_Int32 2009-07-03 16:41:39 +0200 nn r273711 : msvc warnings 2009-07-03 14:18:45 +0200 nn r273698 : msvc warning 2009-07-03 11:30:41 +0200 nn r273685 : #i35579# move new tokens to the end 2009-07-03 10:12:55 +0200 nn r273681 : CWS-TOOLING: rebase CWS calc51 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 17:57:30 +0200 nn r273529 : #i103027# EnterData: if it's a formula, don't pass EditTextObject to undo 2009-06-29 14:31:18 +0200 er r273474 : #i101544# #i101645# #i102388# applied diff from CWS dr68ooo311 2009-06-29 10:30:20 +0200 nn r273457 : #i103161# DeleteCells: always leave list action 2009-06-24 16:16:34 +0200 nn r273353 : gcc warnings 2009-06-17 11:50:28 +0200 tbe r273055 : #i35579# Standard filter requires more options 2009-06-17 11:44:22 +0200 tbe r273054 : #i35579# Standard filter requires more options 2009-06-17 11:22:23 +0200 tbe r273052 : #i35579# Standard filter requires more options 2009-06-15 18:29:32 +0200 nn r273006 : #160063# UseFormulaData: check parenthesis position 2009-06-12 15:41:16 +0200 nn r272923 : #i99250# handle range lists in DoAutoOutline (patch from dtardon) 2009-06-11 15:07:05 +0200 nn r272874 : #i86943# GetNextPos: skip overlapped cells 2009-06-11 11:17:37 +0200 nn r272856 : #i97726# EnterData: get text from EditTextObject for repeat string of undo action 2009-06-10 20:45:07 +0200 nn r272839 : #i102566# minimum amount of code between updates of calculation progress (patch by cmc) 2009-06-10 20:22:02 +0200 nn r272838 : #i69524# PasteFile: specify target for SID_OPENDOC 2009-06-09 17:33:08 +0200 nn r272789 : #i16615# absolute/relative reference conversion for cell ranges (patch by gaojingmei)
2009-07-28 10:04:47 +00:00
// is/must be identical to *rEntry.pStr, which is essential for
// regex to work through GetSearchTextPtr().
ScQueryEntry& rEntry = pOptions->aQueryEntry;
OSL_ENSURE(rEntry.GetQueryItem().maString.equals(*rComp.pVal[1]), "ScInterpreter::CompareFunc: broken options");
CWS-TOOLING: integrate CWS calc51 2009-07-17 15:47:46 +0200 er r274098 : #i101544# more thorough reference checking in chart data ranges; also prevent some possible crash if invalid ranges were to be passed to document/cell access. 2009-07-16 14:20:11 +0200 er r274051 : #i101544# let ScRefTokenHelper::compileRangeRepresentation() fail on all possible non-reference occasions 2009-07-07 10:11:40 +0200 nn r273776 : #i35579# don't use long instead of sal_Int32 2009-07-03 16:41:39 +0200 nn r273711 : msvc warnings 2009-07-03 14:18:45 +0200 nn r273698 : msvc warning 2009-07-03 11:30:41 +0200 nn r273685 : #i35579# move new tokens to the end 2009-07-03 10:12:55 +0200 nn r273681 : CWS-TOOLING: rebase CWS calc51 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 17:57:30 +0200 nn r273529 : #i103027# EnterData: if it's a formula, don't pass EditTextObject to undo 2009-06-29 14:31:18 +0200 er r273474 : #i101544# #i101645# #i102388# applied diff from CWS dr68ooo311 2009-06-29 10:30:20 +0200 nn r273457 : #i103161# DeleteCells: always leave list action 2009-06-24 16:16:34 +0200 nn r273353 : gcc warnings 2009-06-17 11:50:28 +0200 tbe r273055 : #i35579# Standard filter requires more options 2009-06-17 11:44:22 +0200 tbe r273054 : #i35579# Standard filter requires more options 2009-06-17 11:22:23 +0200 tbe r273052 : #i35579# Standard filter requires more options 2009-06-15 18:29:32 +0200 nn r273006 : #160063# UseFormulaData: check parenthesis position 2009-06-12 15:41:16 +0200 nn r272923 : #i99250# handle range lists in DoAutoOutline (patch from dtardon) 2009-06-11 15:07:05 +0200 nn r272874 : #i86943# GetNextPos: skip overlapped cells 2009-06-11 11:17:37 +0200 nn r272856 : #i97726# EnterData: get text from EditTextObject for repeat string of undo action 2009-06-10 20:45:07 +0200 nn r272839 : #i102566# minimum amount of code between updates of calculation progress (patch by cmc) 2009-06-10 20:22:02 +0200 nn r272838 : #i69524# PasteFile: specify target for SID_OPENDOC 2009-06-09 17:33:08 +0200 nn r272789 : #i16615# absolute/relative reference conversion for cell ranges (patch by gaojingmei)
2009-07-28 10:04:47 +00:00
if (pOptions->bRegEx)
{
xub_StrLen nStart = 0;
xub_StrLen nStop = rComp.pVal[0]->Len();
bool bMatch = rEntry.GetSearchTextPtr(
!pOptions->bIgnoreCase)->SearchFrwrd( *rComp.pVal[0],
&nStart, &nStop);
if (bMatch && pOptions->bMatchWholeCell && (nStart != 0 || nStop != rComp.pVal[0]->Len()))
bMatch = false; // RegEx must match entire string.
fRes = (bMatch ? 0 : 1);
}
else if (rEntry.eOp == SC_EQUAL || rEntry.eOp == SC_NOT_EQUAL)
{
::utl::TransliterationWrapper* pTransliteration =
CWS-TOOLING: integrate CWS oj18 2009-08-21 15:08:49 +0200 oj r275263 : wrong check 2009-08-21 08:56:01 +0200 oj r275215 : missing not 2009-08-20 07:27:13 +0200 oj r275164 : use new method from global 2009-08-19 10:22:35 +0200 oj r275138 : call GetLocale instead of pLocale 2009-08-18 10:39:32 +0200 oj r275082 : missing header include 2009-08-18 10:09:44 +0200 oj r275081 : new methods at global 2009-08-18 10:09:00 +0200 oj r275080 : unused var 2009-08-18 08:59:04 +0200 oj r275078 : move files from classes to xml 2009-08-17 14:58:16 +0200 oj r275056 : CWS-TOOLING: rebase CWS oj18 to trunk@275001 (milestone: DEV300:m55) 2009-08-17 13:29:44 +0200 oj r275047 : compile error 2009-08-17 13:27:47 +0200 oj r275045 : compile error 2009-08-17 11:44:54 +0200 oj r275040 : add dep 2009-07-22 14:26:05 +0200 oj r274240 : move unused services into fwl 2009-07-22 14:25:35 +0200 oj r274239 : move unused services into fwl 2009-07-22 13:47:45 +0200 oj r274233 : remove some unused code 2009-07-22 09:06:20 +0200 oj r274219 : export dbtoolsclient dbcharsethelper for sc 2009-07-22 08:48:58 +0200 oj r274218 : create NumberFormatter on demand 2009-07-22 08:39:23 +0200 oj r274217 : change char to sal_Char 2009-07-22 07:33:34 +0200 oj r274214 : export dbtoolsclient dbcharsethelper for sc 2009-07-22 07:30:04 +0200 oj r274213 : late init of numberformatter and breakiterator 2009-07-22 07:28:55 +0200 oj r274212 : export dbtoolsclient dbcharsethelper for sc 2009-07-21 13:43:28 +0200 oj r274196 : check if quick start is enbaled 2009-07-21 13:40:09 +0200 oj r274195 : check config entry for UiEventsLogger 2009-07-21 13:37:40 +0200 oj r274194 : code refactoring, remove of duplicate code and some late inits and removale of not needed files 2009-07-21 13:35:38 +0200 oj r274193 : code refactoring, remove of duplicate code and some late inits and removale of not needed files 2009-07-21 13:33:41 +0200 oj r274192 : doc meta data will now be created on demand 2009-07-21 13:13:40 +0200 oj r274187 : load ldap functions on demand 2009-07-21 13:03:17 +0200 oj r274183 : late init of TransliterationImpl 2009-07-21 12:36:10 +0200 oj r274180 : late init of charClass
2009-09-08 04:57:32 +00:00
(pOptions->bIgnoreCase ? ScGlobal::GetpTransliteration() :
ScGlobal::GetCaseTransliteration());
CWS-TOOLING: integrate CWS calc51 2009-07-17 15:47:46 +0200 er r274098 : #i101544# more thorough reference checking in chart data ranges; also prevent some possible crash if invalid ranges were to be passed to document/cell access. 2009-07-16 14:20:11 +0200 er r274051 : #i101544# let ScRefTokenHelper::compileRangeRepresentation() fail on all possible non-reference occasions 2009-07-07 10:11:40 +0200 nn r273776 : #i35579# don't use long instead of sal_Int32 2009-07-03 16:41:39 +0200 nn r273711 : msvc warnings 2009-07-03 14:18:45 +0200 nn r273698 : msvc warning 2009-07-03 11:30:41 +0200 nn r273685 : #i35579# move new tokens to the end 2009-07-03 10:12:55 +0200 nn r273681 : CWS-TOOLING: rebase CWS calc51 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 17:57:30 +0200 nn r273529 : #i103027# EnterData: if it's a formula, don't pass EditTextObject to undo 2009-06-29 14:31:18 +0200 er r273474 : #i101544# #i101645# #i102388# applied diff from CWS dr68ooo311 2009-06-29 10:30:20 +0200 nn r273457 : #i103161# DeleteCells: always leave list action 2009-06-24 16:16:34 +0200 nn r273353 : gcc warnings 2009-06-17 11:50:28 +0200 tbe r273055 : #i35579# Standard filter requires more options 2009-06-17 11:44:22 +0200 tbe r273054 : #i35579# Standard filter requires more options 2009-06-17 11:22:23 +0200 tbe r273052 : #i35579# Standard filter requires more options 2009-06-15 18:29:32 +0200 nn r273006 : #160063# UseFormulaData: check parenthesis position 2009-06-12 15:41:16 +0200 nn r272923 : #i99250# handle range lists in DoAutoOutline (patch from dtardon) 2009-06-11 15:07:05 +0200 nn r272874 : #i86943# GetNextPos: skip overlapped cells 2009-06-11 11:17:37 +0200 nn r272856 : #i97726# EnterData: get text from EditTextObject for repeat string of undo action 2009-06-10 20:45:07 +0200 nn r272839 : #i102566# minimum amount of code between updates of calculation progress (patch by cmc) 2009-06-10 20:22:02 +0200 nn r272838 : #i69524# PasteFile: specify target for SID_OPENDOC 2009-06-09 17:33:08 +0200 nn r272789 : #i16615# absolute/relative reference conversion for cell ranges (patch by gaojingmei)
2009-07-28 10:04:47 +00:00
bool bMatch;
if (pOptions->bMatchWholeCell)
bMatch = pTransliteration->isEqual( *rComp.pVal[0], *rComp.pVal[1]);
else
{
String aCell( pTransliteration->transliterate(
*rComp.pVal[0], ScGlobal::eLnge, 0,
rComp.pVal[0]->Len(), NULL));
String aQuer( pTransliteration->transliterate(
*rComp.pVal[1], ScGlobal::eLnge, 0,
rComp.pVal[1]->Len(), NULL));
bMatch = (aCell.Search( aQuer ) != STRING_NOTFOUND);
}
fRes = (bMatch ? 0 : 1);
}
else if (pOptions->bIgnoreCase)
CWS-TOOLING: integrate CWS oj18 2009-08-21 15:08:49 +0200 oj r275263 : wrong check 2009-08-21 08:56:01 +0200 oj r275215 : missing not 2009-08-20 07:27:13 +0200 oj r275164 : use new method from global 2009-08-19 10:22:35 +0200 oj r275138 : call GetLocale instead of pLocale 2009-08-18 10:39:32 +0200 oj r275082 : missing header include 2009-08-18 10:09:44 +0200 oj r275081 : new methods at global 2009-08-18 10:09:00 +0200 oj r275080 : unused var 2009-08-18 08:59:04 +0200 oj r275078 : move files from classes to xml 2009-08-17 14:58:16 +0200 oj r275056 : CWS-TOOLING: rebase CWS oj18 to trunk@275001 (milestone: DEV300:m55) 2009-08-17 13:29:44 +0200 oj r275047 : compile error 2009-08-17 13:27:47 +0200 oj r275045 : compile error 2009-08-17 11:44:54 +0200 oj r275040 : add dep 2009-07-22 14:26:05 +0200 oj r274240 : move unused services into fwl 2009-07-22 14:25:35 +0200 oj r274239 : move unused services into fwl 2009-07-22 13:47:45 +0200 oj r274233 : remove some unused code 2009-07-22 09:06:20 +0200 oj r274219 : export dbtoolsclient dbcharsethelper for sc 2009-07-22 08:48:58 +0200 oj r274218 : create NumberFormatter on demand 2009-07-22 08:39:23 +0200 oj r274217 : change char to sal_Char 2009-07-22 07:33:34 +0200 oj r274214 : export dbtoolsclient dbcharsethelper for sc 2009-07-22 07:30:04 +0200 oj r274213 : late init of numberformatter and breakiterator 2009-07-22 07:28:55 +0200 oj r274212 : export dbtoolsclient dbcharsethelper for sc 2009-07-21 13:43:28 +0200 oj r274196 : check if quick start is enbaled 2009-07-21 13:40:09 +0200 oj r274195 : check config entry for UiEventsLogger 2009-07-21 13:37:40 +0200 oj r274194 : code refactoring, remove of duplicate code and some late inits and removale of not needed files 2009-07-21 13:35:38 +0200 oj r274193 : code refactoring, remove of duplicate code and some late inits and removale of not needed files 2009-07-21 13:33:41 +0200 oj r274192 : doc meta data will now be created on demand 2009-07-21 13:13:40 +0200 oj r274187 : load ldap functions on demand 2009-07-21 13:03:17 +0200 oj r274183 : late init of TransliterationImpl 2009-07-21 12:36:10 +0200 oj r274180 : late init of charClass
2009-09-08 04:57:32 +00:00
fRes = (double) ScGlobal::GetCollator()->compareString(
CWS-TOOLING: integrate CWS calc51 2009-07-17 15:47:46 +0200 er r274098 : #i101544# more thorough reference checking in chart data ranges; also prevent some possible crash if invalid ranges were to be passed to document/cell access. 2009-07-16 14:20:11 +0200 er r274051 : #i101544# let ScRefTokenHelper::compileRangeRepresentation() fail on all possible non-reference occasions 2009-07-07 10:11:40 +0200 nn r273776 : #i35579# don't use long instead of sal_Int32 2009-07-03 16:41:39 +0200 nn r273711 : msvc warnings 2009-07-03 14:18:45 +0200 nn r273698 : msvc warning 2009-07-03 11:30:41 +0200 nn r273685 : #i35579# move new tokens to the end 2009-07-03 10:12:55 +0200 nn r273681 : CWS-TOOLING: rebase CWS calc51 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 17:57:30 +0200 nn r273529 : #i103027# EnterData: if it's a formula, don't pass EditTextObject to undo 2009-06-29 14:31:18 +0200 er r273474 : #i101544# #i101645# #i102388# applied diff from CWS dr68ooo311 2009-06-29 10:30:20 +0200 nn r273457 : #i103161# DeleteCells: always leave list action 2009-06-24 16:16:34 +0200 nn r273353 : gcc warnings 2009-06-17 11:50:28 +0200 tbe r273055 : #i35579# Standard filter requires more options 2009-06-17 11:44:22 +0200 tbe r273054 : #i35579# Standard filter requires more options 2009-06-17 11:22:23 +0200 tbe r273052 : #i35579# Standard filter requires more options 2009-06-15 18:29:32 +0200 nn r273006 : #160063# UseFormulaData: check parenthesis position 2009-06-12 15:41:16 +0200 nn r272923 : #i99250# handle range lists in DoAutoOutline (patch from dtardon) 2009-06-11 15:07:05 +0200 nn r272874 : #i86943# GetNextPos: skip overlapped cells 2009-06-11 11:17:37 +0200 nn r272856 : #i97726# EnterData: get text from EditTextObject for repeat string of undo action 2009-06-10 20:45:07 +0200 nn r272839 : #i102566# minimum amount of code between updates of calculation progress (patch by cmc) 2009-06-10 20:22:02 +0200 nn r272838 : #i69524# PasteFile: specify target for SID_OPENDOC 2009-06-09 17:33:08 +0200 nn r272789 : #i16615# absolute/relative reference conversion for cell ranges (patch by gaojingmei)
2009-07-28 10:04:47 +00:00
*rComp.pVal[ 0 ], *rComp.pVal[ 1 ] );
else
CWS-TOOLING: integrate CWS oj18 2009-08-21 15:08:49 +0200 oj r275263 : wrong check 2009-08-21 08:56:01 +0200 oj r275215 : missing not 2009-08-20 07:27:13 +0200 oj r275164 : use new method from global 2009-08-19 10:22:35 +0200 oj r275138 : call GetLocale instead of pLocale 2009-08-18 10:39:32 +0200 oj r275082 : missing header include 2009-08-18 10:09:44 +0200 oj r275081 : new methods at global 2009-08-18 10:09:00 +0200 oj r275080 : unused var 2009-08-18 08:59:04 +0200 oj r275078 : move files from classes to xml 2009-08-17 14:58:16 +0200 oj r275056 : CWS-TOOLING: rebase CWS oj18 to trunk@275001 (milestone: DEV300:m55) 2009-08-17 13:29:44 +0200 oj r275047 : compile error 2009-08-17 13:27:47 +0200 oj r275045 : compile error 2009-08-17 11:44:54 +0200 oj r275040 : add dep 2009-07-22 14:26:05 +0200 oj r274240 : move unused services into fwl 2009-07-22 14:25:35 +0200 oj r274239 : move unused services into fwl 2009-07-22 13:47:45 +0200 oj r274233 : remove some unused code 2009-07-22 09:06:20 +0200 oj r274219 : export dbtoolsclient dbcharsethelper for sc 2009-07-22 08:48:58 +0200 oj r274218 : create NumberFormatter on demand 2009-07-22 08:39:23 +0200 oj r274217 : change char to sal_Char 2009-07-22 07:33:34 +0200 oj r274214 : export dbtoolsclient dbcharsethelper for sc 2009-07-22 07:30:04 +0200 oj r274213 : late init of numberformatter and breakiterator 2009-07-22 07:28:55 +0200 oj r274212 : export dbtoolsclient dbcharsethelper for sc 2009-07-21 13:43:28 +0200 oj r274196 : check if quick start is enbaled 2009-07-21 13:40:09 +0200 oj r274195 : check config entry for UiEventsLogger 2009-07-21 13:37:40 +0200 oj r274194 : code refactoring, remove of duplicate code and some late inits and removale of not needed files 2009-07-21 13:35:38 +0200 oj r274193 : code refactoring, remove of duplicate code and some late inits and removale of not needed files 2009-07-21 13:33:41 +0200 oj r274192 : doc meta data will now be created on demand 2009-07-21 13:13:40 +0200 oj r274187 : load ldap functions on demand 2009-07-21 13:03:17 +0200 oj r274183 : late init of TransliterationImpl 2009-07-21 12:36:10 +0200 oj r274180 : late init of charClass
2009-09-08 04:57:32 +00:00
fRes = (double) ScGlobal::GetCaseCollator()->compareString(
CWS-TOOLING: integrate CWS calc51 2009-07-17 15:47:46 +0200 er r274098 : #i101544# more thorough reference checking in chart data ranges; also prevent some possible crash if invalid ranges were to be passed to document/cell access. 2009-07-16 14:20:11 +0200 er r274051 : #i101544# let ScRefTokenHelper::compileRangeRepresentation() fail on all possible non-reference occasions 2009-07-07 10:11:40 +0200 nn r273776 : #i35579# don't use long instead of sal_Int32 2009-07-03 16:41:39 +0200 nn r273711 : msvc warnings 2009-07-03 14:18:45 +0200 nn r273698 : msvc warning 2009-07-03 11:30:41 +0200 nn r273685 : #i35579# move new tokens to the end 2009-07-03 10:12:55 +0200 nn r273681 : CWS-TOOLING: rebase CWS calc51 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 17:57:30 +0200 nn r273529 : #i103027# EnterData: if it's a formula, don't pass EditTextObject to undo 2009-06-29 14:31:18 +0200 er r273474 : #i101544# #i101645# #i102388# applied diff from CWS dr68ooo311 2009-06-29 10:30:20 +0200 nn r273457 : #i103161# DeleteCells: always leave list action 2009-06-24 16:16:34 +0200 nn r273353 : gcc warnings 2009-06-17 11:50:28 +0200 tbe r273055 : #i35579# Standard filter requires more options 2009-06-17 11:44:22 +0200 tbe r273054 : #i35579# Standard filter requires more options 2009-06-17 11:22:23 +0200 tbe r273052 : #i35579# Standard filter requires more options 2009-06-15 18:29:32 +0200 nn r273006 : #160063# UseFormulaData: check parenthesis position 2009-06-12 15:41:16 +0200 nn r272923 : #i99250# handle range lists in DoAutoOutline (patch from dtardon) 2009-06-11 15:07:05 +0200 nn r272874 : #i86943# GetNextPos: skip overlapped cells 2009-06-11 11:17:37 +0200 nn r272856 : #i97726# EnterData: get text from EditTextObject for repeat string of undo action 2009-06-10 20:45:07 +0200 nn r272839 : #i102566# minimum amount of code between updates of calculation progress (patch by cmc) 2009-06-10 20:22:02 +0200 nn r272838 : #i69524# PasteFile: specify target for SID_OPENDOC 2009-06-09 17:33:08 +0200 nn r272789 : #i16615# absolute/relative reference conversion for cell ranges (patch by gaojingmei)
2009-07-28 10:04:47 +00:00
*rComp.pVal[ 0 ], *rComp.pVal[ 1 ] );
}
else if (pDok->GetDocOptions().IsIgnoreCase())
CWS-TOOLING: integrate CWS oj18 2009-08-21 15:08:49 +0200 oj r275263 : wrong check 2009-08-21 08:56:01 +0200 oj r275215 : missing not 2009-08-20 07:27:13 +0200 oj r275164 : use new method from global 2009-08-19 10:22:35 +0200 oj r275138 : call GetLocale instead of pLocale 2009-08-18 10:39:32 +0200 oj r275082 : missing header include 2009-08-18 10:09:44 +0200 oj r275081 : new methods at global 2009-08-18 10:09:00 +0200 oj r275080 : unused var 2009-08-18 08:59:04 +0200 oj r275078 : move files from classes to xml 2009-08-17 14:58:16 +0200 oj r275056 : CWS-TOOLING: rebase CWS oj18 to trunk@275001 (milestone: DEV300:m55) 2009-08-17 13:29:44 +0200 oj r275047 : compile error 2009-08-17 13:27:47 +0200 oj r275045 : compile error 2009-08-17 11:44:54 +0200 oj r275040 : add dep 2009-07-22 14:26:05 +0200 oj r274240 : move unused services into fwl 2009-07-22 14:25:35 +0200 oj r274239 : move unused services into fwl 2009-07-22 13:47:45 +0200 oj r274233 : remove some unused code 2009-07-22 09:06:20 +0200 oj r274219 : export dbtoolsclient dbcharsethelper for sc 2009-07-22 08:48:58 +0200 oj r274218 : create NumberFormatter on demand 2009-07-22 08:39:23 +0200 oj r274217 : change char to sal_Char 2009-07-22 07:33:34 +0200 oj r274214 : export dbtoolsclient dbcharsethelper for sc 2009-07-22 07:30:04 +0200 oj r274213 : late init of numberformatter and breakiterator 2009-07-22 07:28:55 +0200 oj r274212 : export dbtoolsclient dbcharsethelper for sc 2009-07-21 13:43:28 +0200 oj r274196 : check if quick start is enbaled 2009-07-21 13:40:09 +0200 oj r274195 : check config entry for UiEventsLogger 2009-07-21 13:37:40 +0200 oj r274194 : code refactoring, remove of duplicate code and some late inits and removale of not needed files 2009-07-21 13:35:38 +0200 oj r274193 : code refactoring, remove of duplicate code and some late inits and removale of not needed files 2009-07-21 13:33:41 +0200 oj r274192 : doc meta data will now be created on demand 2009-07-21 13:13:40 +0200 oj r274187 : load ldap functions on demand 2009-07-21 13:03:17 +0200 oj r274183 : late init of TransliterationImpl 2009-07-21 12:36:10 +0200 oj r274180 : late init of charClass
2009-09-08 04:57:32 +00:00
fRes = (double) ScGlobal::GetCollator()->compareString(
*rComp.pVal[ 0 ], *rComp.pVal[ 1 ] );
2000-09-18 23:16:46 +00:00
else
CWS-TOOLING: integrate CWS oj18 2009-08-21 15:08:49 +0200 oj r275263 : wrong check 2009-08-21 08:56:01 +0200 oj r275215 : missing not 2009-08-20 07:27:13 +0200 oj r275164 : use new method from global 2009-08-19 10:22:35 +0200 oj r275138 : call GetLocale instead of pLocale 2009-08-18 10:39:32 +0200 oj r275082 : missing header include 2009-08-18 10:09:44 +0200 oj r275081 : new methods at global 2009-08-18 10:09:00 +0200 oj r275080 : unused var 2009-08-18 08:59:04 +0200 oj r275078 : move files from classes to xml 2009-08-17 14:58:16 +0200 oj r275056 : CWS-TOOLING: rebase CWS oj18 to trunk@275001 (milestone: DEV300:m55) 2009-08-17 13:29:44 +0200 oj r275047 : compile error 2009-08-17 13:27:47 +0200 oj r275045 : compile error 2009-08-17 11:44:54 +0200 oj r275040 : add dep 2009-07-22 14:26:05 +0200 oj r274240 : move unused services into fwl 2009-07-22 14:25:35 +0200 oj r274239 : move unused services into fwl 2009-07-22 13:47:45 +0200 oj r274233 : remove some unused code 2009-07-22 09:06:20 +0200 oj r274219 : export dbtoolsclient dbcharsethelper for sc 2009-07-22 08:48:58 +0200 oj r274218 : create NumberFormatter on demand 2009-07-22 08:39:23 +0200 oj r274217 : change char to sal_Char 2009-07-22 07:33:34 +0200 oj r274214 : export dbtoolsclient dbcharsethelper for sc 2009-07-22 07:30:04 +0200 oj r274213 : late init of numberformatter and breakiterator 2009-07-22 07:28:55 +0200 oj r274212 : export dbtoolsclient dbcharsethelper for sc 2009-07-21 13:43:28 +0200 oj r274196 : check if quick start is enbaled 2009-07-21 13:40:09 +0200 oj r274195 : check config entry for UiEventsLogger 2009-07-21 13:37:40 +0200 oj r274194 : code refactoring, remove of duplicate code and some late inits and removale of not needed files 2009-07-21 13:35:38 +0200 oj r274193 : code refactoring, remove of duplicate code and some late inits and removale of not needed files 2009-07-21 13:33:41 +0200 oj r274192 : doc meta data will now be created on demand 2009-07-21 13:13:40 +0200 oj r274187 : load ldap functions on demand 2009-07-21 13:03:17 +0200 oj r274183 : late init of TransliterationImpl 2009-07-21 12:36:10 +0200 oj r274180 : late init of charClass
2009-09-08 04:57:32 +00:00
fRes = (double) ScGlobal::GetCaseCollator()->compareString(
*rComp.pVal[ 0 ], *rComp.pVal[ 1 ] );
2000-09-18 23:16:46 +00:00
}
#ifdef FIXME_REMOVE_WHEN_RE_BASE_COMPLETE
if (nStringQuery && pOptions)
{
const ScQueryEntry& rEntry = pOptions->aQueryEntry;
if (!rEntry.bQueryByString && rEntry.pStr->Len() &&
(rEntry.eOp == SC_EQUAL || rEntry.eOp == SC_NOT_EQUAL))
{
// As in ScTable::ValidQuery() match a numeric string for a
// number query that originated from a string, e.g. in SUMIF
// and COUNTIF. Transliteration is not needed here.
bool bEqual = rComp.pVal[nStringQuery-1]->Equals( *rEntry.pStr);
// match => fRes=0, else fRes=1
fRes = (rEntry.eOp == SC_NOT_EQUAL) ? bEqual : !bEqual;
}
}
re-base on ALv2 code. Includes: Patches contributed by Herbert Duerr i#118735 prevent endless loop if vlookup/hlookup doesn't find anything http://svn.apache.org/viewvc?view=revision&revision=1239673 Patches contributed by Andre Fischer remove lp_solver http://svn.apache.org/viewvc?view=revision&revision=1199180 i#118160: Added external CoinMP library. http://svn.apache.org/viewvc?view=revision&revision=1233909 Patches contributed by Armin Le-Grand i#118485 - Styles for OLEs are not saved. http://svn.apache.org/viewvc?view=revision&revision=1182166 i#118524: apply patch, followup fixes to 118485 http://svn.apache.org/viewvc?view=revision&revision=1186077 Patches contributed by lihuiibm i#108860 - Fix range validation. http://svn.apache.org/viewvc?view=revision&revision=1242846 i#118954 Chart data will lost after copy to different file http://svn.apache.org/viewvc?view=revision&revision=1301345 Patches contributed by Ariel Constenla-Haile Fix Linux build breaker: extra qualification on member http://svn.apache.org/viewvc?view=revision&revision=1301591 i#118696 - i#118697 - Fix some Sheet Tab Color API issues http://svn.apache.org/viewvc?view=revision&revision=1225428 i#118697 - Fix uninitialized variable http://svn.apache.org/viewvc?view=revision&revision=1225859 i#118771 - ScUndoImportTab should preserve tab background color http://svn.apache.org/viewvc?view=revision&revision=1230356 i#118921 - Repaint linked sheet tab background color after updating link http://svn.apache.org/viewvc?view=revision&revision=1245177 i#118927 - Undo/Redo "Update Link" does not reset sheet tab color http://svn.apache.org/viewvc?view=revision&revision=1245241 i#118747 - Copy tab color when transferring sheets across documents http://svn.apache.org/viewvc?view=revision&revision=1230355 Patch contributed by Oliver Rainer-Wittman i#118012 - methods <ScBroadcastAreaSlot::AreaBroadcast(..)> and <ScBroadcastAreaSlot::AreaBroadcastInRange(..)> adapt stl-container iteration in order to avoid destroyed iterators during iteration. http://svn.apache.org/viewvc?view=revision&revision=1297916 Patches contributed by Mathias Bauer gnumake4 work variously http://svn.apache.org/viewvc?view=revision&revision=1394707 http://svn.apache.org/viewvc?view=revision&revision=1394326 http://svn.apache.org/viewvc?view=revision&revision=1396797 http://svn.apache.org/viewvc?view=revision&revision=1397315 Patch contributed by Daniel Rentz calc69: #i116936# fix VBA symbol Cells http://svn.apache.org/viewvc?view=revision&revision=1172135 Patches contributed by leiw: i#118546 CPU 100% on switched off AutoCalculate with Conditional Formatting on date values http://svn.apache.org/viewvc?view=revision&revision=1301380 Re-add new function documentation. Many various cleanups. Add missing calc66: #o11817313# also look at formula result number format, remove redundant binaries.
2012-11-30 12:23:25 +00:00
#else
(void)nStringQuery;
#endif
return fRes;
2000-09-18 23:16:46 +00:00
}
double ScInterpreter::Compare()
2000-09-18 23:16:46 +00:00
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::Compare" );
2000-09-18 23:16:46 +00:00
String aVal1, aVal2;
ScCompare aComp( &aVal1, &aVal2 );
for( short i = 1; i >= 0; i-- )
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
switch ( GetRawStackType() )
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
case svEmptyCell:
Pop();
2011-08-14 16:10:05 +02:00
aComp.bEmpty[ i ] = true;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
break;
case svMissing:
2000-09-18 23:16:46 +00:00
case svDouble:
aComp.nVal[ i ] = GetDouble();
2011-08-14 16:10:05 +02:00
aComp.bVal[ i ] = true;
2000-09-18 23:16:46 +00:00
break;
case svString:
*aComp.pVal[ i ] = GetString();
aComp.bVal[ i ] = false;
2000-09-18 23:16:46 +00:00
break;
case svDoubleRef :
case svSingleRef :
{
ScAddress aAdr;
if ( !PopDoubleRefOrSingleRef( aAdr ) )
break;
ScBaseCell* pCell = GetCell( aAdr );
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
if (HasCellEmptyData( pCell))
2011-08-14 16:10:05 +02:00
aComp.bEmpty[ i ] = true;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
else if (HasCellStringData( pCell))
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
GetCellString( *aComp.pVal[ i ], pCell);
aComp.bVal[ i ] = false;
2000-09-18 23:16:46 +00:00
}
else
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
{
aComp.nVal[ i ] = GetCellValue( aAdr, pCell );
2011-08-14 16:10:05 +02:00
aComp.bVal[ i ] = true;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
}
2000-09-18 23:16:46 +00:00
}
break;
case svExternalSingleRef:
{
ScMatrixRef pMat = GetMatrix();
if (!pMat)
{
SetError( errIllegalParameter);
break;
}
SCSIZE nC, nR;
pMat->GetDimensions(nC, nR);
if (!nC || !nR)
{
SetError( errIllegalParameter);
break;
}
if (pMat->IsEmpty(0, 0))
aComp.bEmpty[i] = true;
else if (pMat->IsString(0, 0))
{
*aComp.pVal[i] = pMat->GetString(0, 0);
aComp.bVal[i] = false;
}
else
{
aComp.nVal[i] = pMat->GetDouble(0, 0);
aComp.bVal[i] = true;
}
}
break;
case svExternalDoubleRef:
// TODO: Find out how to handle this...
2000-09-18 23:16:46 +00:00
default:
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
SetError( errIllegalParameter);
2000-09-18 23:16:46 +00:00
break;
}
}
if( nGlobalError )
return 0;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
nCurFmtType = nFuncFmtType = NUMBERFORMAT_LOGICAL;
2000-09-18 23:16:46 +00:00
return CompareFunc( aComp );
}
CWS-TOOLING: integrate CWS calc51 2009-07-17 15:47:46 +0200 er r274098 : #i101544# more thorough reference checking in chart data ranges; also prevent some possible crash if invalid ranges were to be passed to document/cell access. 2009-07-16 14:20:11 +0200 er r274051 : #i101544# let ScRefTokenHelper::compileRangeRepresentation() fail on all possible non-reference occasions 2009-07-07 10:11:40 +0200 nn r273776 : #i35579# don't use long instead of sal_Int32 2009-07-03 16:41:39 +0200 nn r273711 : msvc warnings 2009-07-03 14:18:45 +0200 nn r273698 : msvc warning 2009-07-03 11:30:41 +0200 nn r273685 : #i35579# move new tokens to the end 2009-07-03 10:12:55 +0200 nn r273681 : CWS-TOOLING: rebase CWS calc51 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 17:57:30 +0200 nn r273529 : #i103027# EnterData: if it's a formula, don't pass EditTextObject to undo 2009-06-29 14:31:18 +0200 er r273474 : #i101544# #i101645# #i102388# applied diff from CWS dr68ooo311 2009-06-29 10:30:20 +0200 nn r273457 : #i103161# DeleteCells: always leave list action 2009-06-24 16:16:34 +0200 nn r273353 : gcc warnings 2009-06-17 11:50:28 +0200 tbe r273055 : #i35579# Standard filter requires more options 2009-06-17 11:44:22 +0200 tbe r273054 : #i35579# Standard filter requires more options 2009-06-17 11:22:23 +0200 tbe r273052 : #i35579# Standard filter requires more options 2009-06-15 18:29:32 +0200 nn r273006 : #160063# UseFormulaData: check parenthesis position 2009-06-12 15:41:16 +0200 nn r272923 : #i99250# handle range lists in DoAutoOutline (patch from dtardon) 2009-06-11 15:07:05 +0200 nn r272874 : #i86943# GetNextPos: skip overlapped cells 2009-06-11 11:17:37 +0200 nn r272856 : #i97726# EnterData: get text from EditTextObject for repeat string of undo action 2009-06-10 20:45:07 +0200 nn r272839 : #i102566# minimum amount of code between updates of calculation progress (patch by cmc) 2009-06-10 20:22:02 +0200 nn r272838 : #i69524# PasteFile: specify target for SID_OPENDOC 2009-06-09 17:33:08 +0200 nn r272789 : #i16615# absolute/relative reference conversion for cell ranges (patch by gaojingmei)
2009-07-28 10:04:47 +00:00
ScMatrixRef ScInterpreter::CompareMat( ScCompareOptions* pOptions )
2000-09-18 23:16:46 +00:00
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::CompareMat" );
2000-09-18 23:16:46 +00:00
String aVal1, aVal2;
ScCompare aComp( &aVal1, &aVal2 );
ScMatrixRef pMat[2];
2000-09-18 23:16:46 +00:00
ScAddress aAdr;
for( short i = 1; i >= 0; i-- )
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
switch (GetRawStackType())
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
case svEmptyCell:
Pop();
2011-08-14 16:10:05 +02:00
aComp.bEmpty[ i ] = true;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
break;
case svMissing:
2000-09-18 23:16:46 +00:00
case svDouble:
aComp.nVal[ i ] = GetDouble();
2011-08-14 16:10:05 +02:00
aComp.bVal[ i ] = true;
2000-09-18 23:16:46 +00:00
break;
case svString:
*aComp.pVal[ i ] = GetString();
aComp.bVal[ i ] = false;
2000-09-18 23:16:46 +00:00
break;
case svSingleRef:
{
PopSingleRef( aAdr );
ScBaseCell* pCell = GetCell( aAdr );
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
if (HasCellEmptyData( pCell))
2011-08-14 16:10:05 +02:00
aComp.bEmpty[ i ] = true;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
else if (HasCellStringData( pCell))
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
GetCellString( *aComp.pVal[ i ], pCell);
aComp.bVal[ i ] = false;
2000-09-18 23:16:46 +00:00
}
else
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
{
aComp.nVal[ i ] = GetCellValue( aAdr, pCell );
2011-08-14 16:10:05 +02:00
aComp.bVal[ i ] = true;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
}
2000-09-18 23:16:46 +00:00
}
break;
case svDoubleRef:
case svMatrix:
pMat[ i ] = GetMatrix();
2000-09-18 23:16:46 +00:00
if ( !pMat[ i ] )
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
SetError( errIllegalParameter);
else
pMat[i]->SetErrorInterpreter( NULL);
// errors are transported as DoubleError inside matrix
2000-09-18 23:16:46 +00:00
break;
default:
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
SetError( errIllegalParameter);
2000-09-18 23:16:46 +00:00
break;
}
}
ScMatrixRef pResMat = NULL;
2000-09-18 23:16:46 +00:00
if( !nGlobalError )
{
if ( pMat[0] && pMat[1] )
{
SCSIZE nC0, nC1;
SCSIZE nR0, nR1;
2000-09-18 23:16:46 +00:00
pMat[0]->GetDimensions( nC0, nR0 );
pMat[1]->GetDimensions( nC1, nR1 );
SCSIZE nC = Max( nC0, nC1 );
SCSIZE nR = Max( nR0, nR1 );
pResMat = GetNewMat( nC, nR);
2000-09-18 23:16:46 +00:00
if ( !pResMat )
return NULL;
for ( SCSIZE j=0; j<nC; j++ )
2000-09-18 23:16:46 +00:00
{
for ( SCSIZE k=0; k<nR; k++ )
2000-09-18 23:16:46 +00:00
{
CWS-TOOLING: integrate CWS odff05 2008-12-11 04:17:37 +0100 er r265237 : #i94555# AppendIntToken for GAMMADIST, Excel needs 4 parameters; also use AppendIntToken instead of AppendNumToken for POISSON 2008-12-11 04:04:27 +0100 er r265236 : #i96837# make cumulative parameter of POISSON optional; patch from <lvyue> with slight modifications 2008-12-11 03:35:03 +0100 er r265235 : #i96835# make base parameter of LOG() optional also in UI; patch from <lvyue> 2008-12-11 03:15:30 +0100 er r265234 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-10 18:14:16 +0100 er r265214 : DBG_... need semicolon 2008-12-05 00:49:55 +0100 er r264881 : WaE unxlngi6: declaration of 'pFuncInfo' shadows a previous local 2008-12-05 00:26:05 +0100 er r264879 : #i91547# BETADIST with optional density/cumulative parameter and much better precision; patch from <regina> 2008-12-04 22:51:40 +0100 er r264877 : #i91602# add expm1() and log1p() replacements; based on a patch from <regina> 2008-12-01 16:07:35 +0100 dr r264614 : #i93789# import of EUROCONVERT from XLSX/XLSB 2008-11-28 13:15:01 +0100 dr r264543 : #i93789# new sheet function EUROCONVERT + XLS import/export, patch contributed by lvyue 2008-11-26 14:54:23 +0100 er r264397 : CWS-TOOLING: rebase CWS odff05 to trunk@264325 (milestone: DEV300:m36) 2008-11-20 14:23:33 +0100 er r264053 : CWS-TOOLING: rebase CWS odff05 to trunk@263288 (milestone: DEV300:m35) 2008-11-19 18:07:43 +0100 er r264012 : merged from trunk 2008-11-19 17:51:36 +0100 er r264011 : migrate CWS odff05 to SVN
2009-01-06 13:57:48 +00:00
SCSIZE nCol = j, nRow = k;
if ( pMat[0]->ValidColRowOrReplicated( nCol, nRow ) &&
pMat[1]->ValidColRowOrReplicated( nCol, nRow ))
2000-09-18 23:16:46 +00:00
{
for ( short i=1; i>=0; i-- )
{
if ( pMat[i]->IsString(j,k) )
{
aComp.bVal[i] = false;
2000-09-18 23:16:46 +00:00
*aComp.pVal[i] = pMat[i]->GetString(j,k);
aComp.bEmpty[i] = pMat[i]->IsEmpty(j,k);
}
else
{
2011-08-14 16:10:05 +02:00
aComp.bVal[i] = true;
2000-09-18 23:16:46 +00:00
aComp.nVal[i] = pMat[i]->GetDouble(j,k);
aComp.bEmpty[i] = false;
2000-09-18 23:16:46 +00:00
}
}
CWS-TOOLING: integrate CWS calc51 2009-07-17 15:47:46 +0200 er r274098 : #i101544# more thorough reference checking in chart data ranges; also prevent some possible crash if invalid ranges were to be passed to document/cell access. 2009-07-16 14:20:11 +0200 er r274051 : #i101544# let ScRefTokenHelper::compileRangeRepresentation() fail on all possible non-reference occasions 2009-07-07 10:11:40 +0200 nn r273776 : #i35579# don't use long instead of sal_Int32 2009-07-03 16:41:39 +0200 nn r273711 : msvc warnings 2009-07-03 14:18:45 +0200 nn r273698 : msvc warning 2009-07-03 11:30:41 +0200 nn r273685 : #i35579# move new tokens to the end 2009-07-03 10:12:55 +0200 nn r273681 : CWS-TOOLING: rebase CWS calc51 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 17:57:30 +0200 nn r273529 : #i103027# EnterData: if it's a formula, don't pass EditTextObject to undo 2009-06-29 14:31:18 +0200 er r273474 : #i101544# #i101645# #i102388# applied diff from CWS dr68ooo311 2009-06-29 10:30:20 +0200 nn r273457 : #i103161# DeleteCells: always leave list action 2009-06-24 16:16:34 +0200 nn r273353 : gcc warnings 2009-06-17 11:50:28 +0200 tbe r273055 : #i35579# Standard filter requires more options 2009-06-17 11:44:22 +0200 tbe r273054 : #i35579# Standard filter requires more options 2009-06-17 11:22:23 +0200 tbe r273052 : #i35579# Standard filter requires more options 2009-06-15 18:29:32 +0200 nn r273006 : #160063# UseFormulaData: check parenthesis position 2009-06-12 15:41:16 +0200 nn r272923 : #i99250# handle range lists in DoAutoOutline (patch from dtardon) 2009-06-11 15:07:05 +0200 nn r272874 : #i86943# GetNextPos: skip overlapped cells 2009-06-11 11:17:37 +0200 nn r272856 : #i97726# EnterData: get text from EditTextObject for repeat string of undo action 2009-06-10 20:45:07 +0200 nn r272839 : #i102566# minimum amount of code between updates of calculation progress (patch by cmc) 2009-06-10 20:22:02 +0200 nn r272838 : #i69524# PasteFile: specify target for SID_OPENDOC 2009-06-09 17:33:08 +0200 nn r272789 : #i16615# absolute/relative reference conversion for cell ranges (patch by gaojingmei)
2009-07-28 10:04:47 +00:00
pResMat->PutDouble( CompareFunc( aComp, pOptions ), j,k );
2000-09-18 23:16:46 +00:00
}
else
pResMat->PutString( ScGlobal::GetRscString(STR_NO_VALUE), j,k );
}
}
}
else if ( pMat[0] || pMat[1] )
{
short i = ( pMat[0] ? 0 : 1);
SCSIZE nC, nR;
2000-09-18 23:16:46 +00:00
pMat[i]->GetDimensions( nC, nR );
pResMat = GetNewMat( nC, nR);
2000-09-18 23:16:46 +00:00
if ( !pResMat )
return NULL;
for (SCSIZE j = 0; j < nC; ++j)
2000-09-18 23:16:46 +00:00
{
for (SCSIZE k = 0; k < nR; ++k)
2000-09-18 23:16:46 +00:00
{
if ( pMat[i]->IsValue(j,k) )
{
aComp.bVal[i] = true;
aComp.nVal[i] = pMat[i]->GetDouble(j,k);
aComp.bEmpty[i] = false;
}
else
{
aComp.bVal[i] = false;
*aComp.pVal[i] = pMat[i]->GetString(j,k);
aComp.bEmpty[i] = pMat[i]->IsEmpty(j,k);
}
pResMat->PutDouble( CompareFunc(aComp, pOptions), j, k);
2000-09-18 23:16:46 +00:00
}
}
}
}
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
nCurFmtType = nFuncFmtType = NUMBERFORMAT_LOGICAL;
2000-09-18 23:16:46 +00:00
return pResMat;
}
ScMatrixRef ScInterpreter::QueryMat( const ScMatrixRef& pMat, ScCompareOptions& rOptions )
CWS-TOOLING: integrate CWS calc51 2009-07-17 15:47:46 +0200 er r274098 : #i101544# more thorough reference checking in chart data ranges; also prevent some possible crash if invalid ranges were to be passed to document/cell access. 2009-07-16 14:20:11 +0200 er r274051 : #i101544# let ScRefTokenHelper::compileRangeRepresentation() fail on all possible non-reference occasions 2009-07-07 10:11:40 +0200 nn r273776 : #i35579# don't use long instead of sal_Int32 2009-07-03 16:41:39 +0200 nn r273711 : msvc warnings 2009-07-03 14:18:45 +0200 nn r273698 : msvc warning 2009-07-03 11:30:41 +0200 nn r273685 : #i35579# move new tokens to the end 2009-07-03 10:12:55 +0200 nn r273681 : CWS-TOOLING: rebase CWS calc51 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 17:57:30 +0200 nn r273529 : #i103027# EnterData: if it's a formula, don't pass EditTextObject to undo 2009-06-29 14:31:18 +0200 er r273474 : #i101544# #i101645# #i102388# applied diff from CWS dr68ooo311 2009-06-29 10:30:20 +0200 nn r273457 : #i103161# DeleteCells: always leave list action 2009-06-24 16:16:34 +0200 nn r273353 : gcc warnings 2009-06-17 11:50:28 +0200 tbe r273055 : #i35579# Standard filter requires more options 2009-06-17 11:44:22 +0200 tbe r273054 : #i35579# Standard filter requires more options 2009-06-17 11:22:23 +0200 tbe r273052 : #i35579# Standard filter requires more options 2009-06-15 18:29:32 +0200 nn r273006 : #160063# UseFormulaData: check parenthesis position 2009-06-12 15:41:16 +0200 nn r272923 : #i99250# handle range lists in DoAutoOutline (patch from dtardon) 2009-06-11 15:07:05 +0200 nn r272874 : #i86943# GetNextPos: skip overlapped cells 2009-06-11 11:17:37 +0200 nn r272856 : #i97726# EnterData: get text from EditTextObject for repeat string of undo action 2009-06-10 20:45:07 +0200 nn r272839 : #i102566# minimum amount of code between updates of calculation progress (patch by cmc) 2009-06-10 20:22:02 +0200 nn r272838 : #i69524# PasteFile: specify target for SID_OPENDOC 2009-06-09 17:33:08 +0200 nn r272789 : #i16615# absolute/relative reference conversion for cell ranges (patch by gaojingmei)
2009-07-28 10:04:47 +00:00
{
short nSaveCurFmtType = nCurFmtType;
short nSaveFuncFmtType = nFuncFmtType;
PushMatrix( pMat);
const ScQueryEntry::Item& rItem = rOptions.aQueryEntry.GetQueryItem();
if (rItem.meType == ScQueryEntry::ByString)
PushString(rItem.maString);
CWS-TOOLING: integrate CWS calc51 2009-07-17 15:47:46 +0200 er r274098 : #i101544# more thorough reference checking in chart data ranges; also prevent some possible crash if invalid ranges were to be passed to document/cell access. 2009-07-16 14:20:11 +0200 er r274051 : #i101544# let ScRefTokenHelper::compileRangeRepresentation() fail on all possible non-reference occasions 2009-07-07 10:11:40 +0200 nn r273776 : #i35579# don't use long instead of sal_Int32 2009-07-03 16:41:39 +0200 nn r273711 : msvc warnings 2009-07-03 14:18:45 +0200 nn r273698 : msvc warning 2009-07-03 11:30:41 +0200 nn r273685 : #i35579# move new tokens to the end 2009-07-03 10:12:55 +0200 nn r273681 : CWS-TOOLING: rebase CWS calc51 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 17:57:30 +0200 nn r273529 : #i103027# EnterData: if it's a formula, don't pass EditTextObject to undo 2009-06-29 14:31:18 +0200 er r273474 : #i101544# #i101645# #i102388# applied diff from CWS dr68ooo311 2009-06-29 10:30:20 +0200 nn r273457 : #i103161# DeleteCells: always leave list action 2009-06-24 16:16:34 +0200 nn r273353 : gcc warnings 2009-06-17 11:50:28 +0200 tbe r273055 : #i35579# Standard filter requires more options 2009-06-17 11:44:22 +0200 tbe r273054 : #i35579# Standard filter requires more options 2009-06-17 11:22:23 +0200 tbe r273052 : #i35579# Standard filter requires more options 2009-06-15 18:29:32 +0200 nn r273006 : #160063# UseFormulaData: check parenthesis position 2009-06-12 15:41:16 +0200 nn r272923 : #i99250# handle range lists in DoAutoOutline (patch from dtardon) 2009-06-11 15:07:05 +0200 nn r272874 : #i86943# GetNextPos: skip overlapped cells 2009-06-11 11:17:37 +0200 nn r272856 : #i97726# EnterData: get text from EditTextObject for repeat string of undo action 2009-06-10 20:45:07 +0200 nn r272839 : #i102566# minimum amount of code between updates of calculation progress (patch by cmc) 2009-06-10 20:22:02 +0200 nn r272838 : #i69524# PasteFile: specify target for SID_OPENDOC 2009-06-09 17:33:08 +0200 nn r272789 : #i16615# absolute/relative reference conversion for cell ranges (patch by gaojingmei)
2009-07-28 10:04:47 +00:00
else
PushDouble(rItem.mfVal);
CWS-TOOLING: integrate CWS calc51 2009-07-17 15:47:46 +0200 er r274098 : #i101544# more thorough reference checking in chart data ranges; also prevent some possible crash if invalid ranges were to be passed to document/cell access. 2009-07-16 14:20:11 +0200 er r274051 : #i101544# let ScRefTokenHelper::compileRangeRepresentation() fail on all possible non-reference occasions 2009-07-07 10:11:40 +0200 nn r273776 : #i35579# don't use long instead of sal_Int32 2009-07-03 16:41:39 +0200 nn r273711 : msvc warnings 2009-07-03 14:18:45 +0200 nn r273698 : msvc warning 2009-07-03 11:30:41 +0200 nn r273685 : #i35579# move new tokens to the end 2009-07-03 10:12:55 +0200 nn r273681 : CWS-TOOLING: rebase CWS calc51 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 17:57:30 +0200 nn r273529 : #i103027# EnterData: if it's a formula, don't pass EditTextObject to undo 2009-06-29 14:31:18 +0200 er r273474 : #i101544# #i101645# #i102388# applied diff from CWS dr68ooo311 2009-06-29 10:30:20 +0200 nn r273457 : #i103161# DeleteCells: always leave list action 2009-06-24 16:16:34 +0200 nn r273353 : gcc warnings 2009-06-17 11:50:28 +0200 tbe r273055 : #i35579# Standard filter requires more options 2009-06-17 11:44:22 +0200 tbe r273054 : #i35579# Standard filter requires more options 2009-06-17 11:22:23 +0200 tbe r273052 : #i35579# Standard filter requires more options 2009-06-15 18:29:32 +0200 nn r273006 : #160063# UseFormulaData: check parenthesis position 2009-06-12 15:41:16 +0200 nn r272923 : #i99250# handle range lists in DoAutoOutline (patch from dtardon) 2009-06-11 15:07:05 +0200 nn r272874 : #i86943# GetNextPos: skip overlapped cells 2009-06-11 11:17:37 +0200 nn r272856 : #i97726# EnterData: get text from EditTextObject for repeat string of undo action 2009-06-10 20:45:07 +0200 nn r272839 : #i102566# minimum amount of code between updates of calculation progress (patch by cmc) 2009-06-10 20:22:02 +0200 nn r272838 : #i69524# PasteFile: specify target for SID_OPENDOC 2009-06-09 17:33:08 +0200 nn r272789 : #i16615# absolute/relative reference conversion for cell ranges (patch by gaojingmei)
2009-07-28 10:04:47 +00:00
ScMatrixRef pResultMatrix = CompareMat( &rOptions);
nCurFmtType = nSaveCurFmtType;
nFuncFmtType = nSaveFuncFmtType;
if (nGlobalError || !pResultMatrix)
{
SetError( errIllegalParameter);
return pResultMatrix;
}
switch (rOptions.aQueryEntry.eOp)
{
case SC_EQUAL:
pResultMatrix->CompareEqual();
break;
case SC_LESS:
pResultMatrix->CompareLess();
break;
case SC_GREATER:
pResultMatrix->CompareGreater();
break;
case SC_LESS_EQUAL:
pResultMatrix->CompareLessEqual();
break;
case SC_GREATER_EQUAL:
pResultMatrix->CompareGreaterEqual();
break;
case SC_NOT_EQUAL:
pResultMatrix->CompareNotEqual();
break;
default:
SetError( errIllegalArgument);
2011-03-04 21:30:47 +01:00
OSL_TRACE( "ScInterpreter::QueryMat: unhandled comparison operator: %d", (int)rOptions.aQueryEntry.eOp);
CWS-TOOLING: integrate CWS calc51 2009-07-17 15:47:46 +0200 er r274098 : #i101544# more thorough reference checking in chart data ranges; also prevent some possible crash if invalid ranges were to be passed to document/cell access. 2009-07-16 14:20:11 +0200 er r274051 : #i101544# let ScRefTokenHelper::compileRangeRepresentation() fail on all possible non-reference occasions 2009-07-07 10:11:40 +0200 nn r273776 : #i35579# don't use long instead of sal_Int32 2009-07-03 16:41:39 +0200 nn r273711 : msvc warnings 2009-07-03 14:18:45 +0200 nn r273698 : msvc warning 2009-07-03 11:30:41 +0200 nn r273685 : #i35579# move new tokens to the end 2009-07-03 10:12:55 +0200 nn r273681 : CWS-TOOLING: rebase CWS calc51 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 17:57:30 +0200 nn r273529 : #i103027# EnterData: if it's a formula, don't pass EditTextObject to undo 2009-06-29 14:31:18 +0200 er r273474 : #i101544# #i101645# #i102388# applied diff from CWS dr68ooo311 2009-06-29 10:30:20 +0200 nn r273457 : #i103161# DeleteCells: always leave list action 2009-06-24 16:16:34 +0200 nn r273353 : gcc warnings 2009-06-17 11:50:28 +0200 tbe r273055 : #i35579# Standard filter requires more options 2009-06-17 11:44:22 +0200 tbe r273054 : #i35579# Standard filter requires more options 2009-06-17 11:22:23 +0200 tbe r273052 : #i35579# Standard filter requires more options 2009-06-15 18:29:32 +0200 nn r273006 : #160063# UseFormulaData: check parenthesis position 2009-06-12 15:41:16 +0200 nn r272923 : #i99250# handle range lists in DoAutoOutline (patch from dtardon) 2009-06-11 15:07:05 +0200 nn r272874 : #i86943# GetNextPos: skip overlapped cells 2009-06-11 11:17:37 +0200 nn r272856 : #i97726# EnterData: get text from EditTextObject for repeat string of undo action 2009-06-10 20:45:07 +0200 nn r272839 : #i102566# minimum amount of code between updates of calculation progress (patch by cmc) 2009-06-10 20:22:02 +0200 nn r272838 : #i69524# PasteFile: specify target for SID_OPENDOC 2009-06-09 17:33:08 +0200 nn r272789 : #i16615# absolute/relative reference conversion for cell ranges (patch by gaojingmei)
2009-07-28 10:04:47 +00:00
}
return pResultMatrix;
}
2000-09-18 23:16:46 +00:00
void ScInterpreter::ScEqual()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScEqual" );
if ( GetStackType(1) == svMatrix || GetStackType(2) == svMatrix )
2000-09-18 23:16:46 +00:00
{
ScMatrixRef pMat = CompareMat();
2000-09-18 23:16:46 +00:00
if ( !pMat )
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalParameter();
2000-09-18 23:16:46 +00:00
else
{
pMat->CompareEqual();
PushMatrix( pMat );
}
}
else
PushInt( Compare() == 0 );
}
void ScInterpreter::ScNotEqual()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScNotEqual" );
if ( GetStackType(1) == svMatrix || GetStackType(2) == svMatrix )
2000-09-18 23:16:46 +00:00
{
ScMatrixRef pMat = CompareMat();
2000-09-18 23:16:46 +00:00
if ( !pMat )
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalParameter();
2000-09-18 23:16:46 +00:00
else
{
pMat->CompareNotEqual();
PushMatrix( pMat );
}
}
else
PushInt( Compare() != 0 );
}
void ScInterpreter::ScLess()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScLess" );
if ( GetStackType(1) == svMatrix || GetStackType(2) == svMatrix )
2000-09-18 23:16:46 +00:00
{
ScMatrixRef pMat = CompareMat();
2000-09-18 23:16:46 +00:00
if ( !pMat )
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalParameter();
2000-09-18 23:16:46 +00:00
else
{
pMat->CompareLess();
PushMatrix( pMat );
}
}
else
PushInt( Compare() < 0 );
}
void ScInterpreter::ScGreater()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScGreater" );
if ( GetStackType(1) == svMatrix || GetStackType(2) == svMatrix )
2000-09-18 23:16:46 +00:00
{
ScMatrixRef pMat = CompareMat();
2000-09-18 23:16:46 +00:00
if ( !pMat )
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalParameter();
2000-09-18 23:16:46 +00:00
else
{
pMat->CompareGreater();
PushMatrix( pMat );
}
}
else
PushInt( Compare() > 0 );
}
void ScInterpreter::ScLessEqual()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScLessEqual" );
if ( GetStackType(1) == svMatrix || GetStackType(2) == svMatrix )
2000-09-18 23:16:46 +00:00
{
ScMatrixRef pMat = CompareMat();
2000-09-18 23:16:46 +00:00
if ( !pMat )
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalParameter();
2000-09-18 23:16:46 +00:00
else
{
pMat->CompareLessEqual();
PushMatrix( pMat );
}
}
else
PushInt( Compare() <= 0 );
}
void ScInterpreter::ScGreaterEqual()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScGreaterEqual" );
if ( GetStackType(1) == svMatrix || GetStackType(2) == svMatrix )
2000-09-18 23:16:46 +00:00
{
ScMatrixRef pMat = CompareMat();
2000-09-18 23:16:46 +00:00
if ( !pMat )
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalParameter();
2000-09-18 23:16:46 +00:00
else
{
pMat->CompareGreaterEqual();
PushMatrix( pMat );
}
}
else
PushInt( Compare() >= 0 );
}
void ScInterpreter::ScAnd()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScAnd" );
2000-09-18 23:16:46 +00:00
nFuncFmtType = NUMBERFORMAT_LOGICAL;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
short nParamCount = GetByte();
2000-09-18 23:16:46 +00:00
if ( MustHaveParamCountMin( nParamCount, 1 ) )
{
2011-08-14 16:10:05 +02:00
bool bHaveValue = false;
short nRes = true;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
size_t nRefInList = 0;
while( nParamCount-- > 0)
2000-09-18 23:16:46 +00:00
{
if ( !nGlobalError )
{
switch ( GetStackType() )
{
case svDouble :
2011-08-14 16:10:05 +02:00
bHaveValue = true;
2000-09-18 23:16:46 +00:00
nRes &= ( PopDouble() != 0.0 );
break;
case svString :
Pop();
SetError( errNoValue );
break;
case svSingleRef :
{
ScAddress aAdr;
PopSingleRef( aAdr );
if ( !nGlobalError )
{
ScBaseCell* pCell = GetCell( aAdr );
if ( HasCellValueData( pCell ) )
{
2011-08-14 16:10:05 +02:00
bHaveValue = true;
2000-09-18 23:16:46 +00:00
nRes &= ( GetCellValue( aAdr, pCell ) != 0.0 );
}
// else: Xcl raises no error here
2000-09-18 23:16:46 +00:00
}
}
break;
case svDoubleRef:
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
case svRefList:
2000-09-18 23:16:46 +00:00
{
ScRange aRange;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PopDoubleRef( aRange, nParamCount, nRefInList);
2000-09-18 23:16:46 +00:00
if ( !nGlobalError )
{
double fVal;
sal_uInt16 nErr = 0;
2000-09-18 23:16:46 +00:00
ScValueIterator aValIter( pDok, aRange );
if ( aValIter.GetFirst( fVal, nErr ) )
{
2011-08-14 16:10:05 +02:00
bHaveValue = true;
2000-09-18 23:16:46 +00:00
do
{
nRes &= ( fVal != 0.0 );
} while ( (nErr == 0) &&
aValIter.GetNext( fVal, nErr ) );
}
SetError( nErr );
}
}
break;
case svExternalSingleRef:
case svExternalDoubleRef:
2000-09-18 23:16:46 +00:00
case svMatrix:
{
ScMatrixRef pMat = GetMatrix();
2000-09-18 23:16:46 +00:00
if ( pMat )
{
2011-08-14 16:10:05 +02:00
bHaveValue = true;
double fVal = pMat->And();
sal_uInt16 nErr = GetDoubleErrorValue( fVal );
if ( nErr )
{
SetError( nErr );
nRes = false;
}
else
nRes &= (fVal != 0.0);
2000-09-18 23:16:46 +00:00
}
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
// else: GetMatrix did set errIllegalParameter
2000-09-18 23:16:46 +00:00
}
break;
default:
Pop();
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
SetError( errIllegalParameter);
2000-09-18 23:16:46 +00:00
}
}
else
Pop();
}
if ( bHaveValue )
PushInt( nRes );
else
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushNoValue();
2000-09-18 23:16:46 +00:00
}
}
void ScInterpreter::ScOr()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScOr" );
2000-09-18 23:16:46 +00:00
nFuncFmtType = NUMBERFORMAT_LOGICAL;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
short nParamCount = GetByte();
2000-09-18 23:16:46 +00:00
if ( MustHaveParamCountMin( nParamCount, 1 ) )
{
2011-08-14 16:10:05 +02:00
bool bHaveValue = false;
short nRes = false;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
size_t nRefInList = 0;
while( nParamCount-- > 0)
2000-09-18 23:16:46 +00:00
{
if ( !nGlobalError )
{
switch ( GetStackType() )
{
case svDouble :
2011-08-14 16:10:05 +02:00
bHaveValue = true;
2000-09-18 23:16:46 +00:00
nRes |= ( PopDouble() != 0.0 );
break;
case svString :
Pop();
SetError( errNoValue );
break;
case svSingleRef :
{
ScAddress aAdr;
PopSingleRef( aAdr );
if ( !nGlobalError )
{
ScBaseCell* pCell = GetCell( aAdr );
if ( HasCellValueData( pCell ) )
{
2011-08-14 16:10:05 +02:00
bHaveValue = true;
2000-09-18 23:16:46 +00:00
nRes |= ( GetCellValue( aAdr, pCell ) != 0.0 );
}
// else: Xcl raises no error here
2000-09-18 23:16:46 +00:00
}
}
break;
case svDoubleRef:
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
case svRefList:
2000-09-18 23:16:46 +00:00
{
ScRange aRange;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PopDoubleRef( aRange, nParamCount, nRefInList);
2000-09-18 23:16:46 +00:00
if ( !nGlobalError )
{
double fVal;
sal_uInt16 nErr = 0;
2000-09-18 23:16:46 +00:00
ScValueIterator aValIter( pDok, aRange );
if ( aValIter.GetFirst( fVal, nErr ) )
{
2011-08-14 16:10:05 +02:00
bHaveValue = true;
2000-09-18 23:16:46 +00:00
do
{
nRes |= ( fVal != 0.0 );
} while ( (nErr == 0) &&
aValIter.GetNext( fVal, nErr ) );
}
SetError( nErr );
}
}
break;
case svExternalSingleRef:
case svExternalDoubleRef:
2000-09-18 23:16:46 +00:00
case svMatrix:
{
2011-08-14 16:10:05 +02:00
bHaveValue = true;
ScMatrixRef pMat = GetMatrix();
2000-09-18 23:16:46 +00:00
if ( pMat )
{
2011-08-14 16:10:05 +02:00
bHaveValue = true;
double fVal = pMat->Or();
sal_uInt16 nErr = GetDoubleErrorValue( fVal );
if ( nErr )
{
SetError( nErr );
nRes = false;
}
else
nRes |= (fVal != 0.0);
2000-09-18 23:16:46 +00:00
}
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
// else: GetMatrix did set errIllegalParameter
}
break;
default:
Pop();
SetError( errIllegalParameter);
}
}
else
Pop();
}
if ( bHaveValue )
PushInt( nRes );
else
PushNoValue();
}
}
void ScInterpreter::ScXor()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScXor" );
nFuncFmtType = NUMBERFORMAT_LOGICAL;
short nParamCount = GetByte();
if ( MustHaveParamCountMin( nParamCount, 1 ) )
{
bool bHaveValue = false;
short nRes = false;
size_t nRefInList = 0;
while( nParamCount-- > 0)
{
if ( !nGlobalError )
{
switch ( GetStackType() )
{
case svDouble :
bHaveValue = true;
nRes ^= ( PopDouble() != 0.0 );
break;
case svString :
Pop();
SetError( errNoValue );
break;
case svSingleRef :
{
ScAddress aAdr;
PopSingleRef( aAdr );
if ( !nGlobalError )
{
ScBaseCell* pCell = GetCell( aAdr );
if ( HasCellValueData( pCell ) )
{
bHaveValue = true;
nRes ^= ( GetCellValue( aAdr, pCell ) != 0.0 );
}
/* TODO: set error? Excel doesn't have XOR, but
* doesn't set an error in this case for AND and
* OR. */
}
}
break;
case svDoubleRef:
case svRefList:
{
ScRange aRange;
PopDoubleRef( aRange, nParamCount, nRefInList);
if ( !nGlobalError )
{
double fVal;
sal_uInt16 nErr = 0;
ScValueIterator aValIter( pDok, aRange );
if ( aValIter.GetFirst( fVal, nErr ) )
{
bHaveValue = true;
do
{
nRes ^= ( fVal != 0.0 );
} while ( (nErr == 0) &&
aValIter.GetNext( fVal, nErr ) );
}
SetError( nErr );
}
}
break;
case svExternalSingleRef:
case svExternalDoubleRef:
case svMatrix:
{
bHaveValue = true;
ScMatrixRef pMat = GetMatrix();
if ( pMat )
{
bHaveValue = true;
double fVal = pMat->Xor();
sal_uInt16 nErr = GetDoubleErrorValue( fVal );
if ( nErr )
{
SetError( nErr );
nRes = 0;
}
else
nRes ^= ( fVal != 0.0 );
}
// else: GetMatrix did set errIllegalParameter
2000-09-18 23:16:46 +00:00
}
break;
default:
Pop();
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
SetError( errIllegalParameter);
2000-09-18 23:16:46 +00:00
}
}
else
Pop();
}
if ( bHaveValue )
PushInt( nRes );
else
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushNoValue();
2000-09-18 23:16:46 +00:00
}
}
void ScInterpreter::ScNeg()
2000-09-18 23:16:46 +00:00
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScNeg" );
// Simple negation doesn't change current format type to number, keep
// current type.
nFuncFmtType = nCurFmtType;
switch ( GetStackType() )
{
case svMatrix :
{
ScMatrixRef pMat = GetMatrix();
if ( !pMat )
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalParameter();
else
{
SCSIZE nC, nR;
pMat->GetDimensions( nC, nR );
ScMatrixRef pResMat = GetNewMat( nC, nR);
if ( !pResMat )
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalArgument();
else
{
for (SCSIZE i = 0; i < nC; ++i)
{
for (SCSIZE j = 0; j < nR; ++j)
{
if ( pMat->IsValueOrEmpty(i,j) )
pResMat->PutDouble( -pMat->GetDouble(i,j), i, j );
else
pResMat->PutString(
ScGlobal::GetRscString( STR_NO_VALUE ), i, j );
}
}
PushMatrix( pResMat );
}
}
}
break;
default:
PushDouble( -GetDouble() );
}
2000-09-18 23:16:46 +00:00
}
void ScInterpreter::ScPercentSign()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScPercentSign" );
nFuncFmtType = NUMBERFORMAT_PERCENT;
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
const FormulaToken* pSaveCur = pCur;
sal_uInt8 nSavePar = cPar;
PushInt( 100 );
cPar = 2;
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
FormulaByteToken aDivOp( ocDiv, cPar );
pCur = &aDivOp;
ScDiv();
pCur = pSaveCur;
cPar = nSavePar;
}
void ScInterpreter::ScNot()
2000-09-18 23:16:46 +00:00
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScNot" );
nFuncFmtType = NUMBERFORMAT_LOGICAL;
switch ( GetStackType() )
{
case svMatrix :
{
ScMatrixRef pMat = GetMatrix();
if ( !pMat )
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalParameter();
else
{
SCSIZE nC, nR;
pMat->GetDimensions( nC, nR );
ScMatrixRef pResMat = GetNewMat( nC, nR);
if ( !pResMat )
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalArgument();
else
{
for (SCSIZE i = 0; i < nC; ++i)
{
for (SCSIZE j = 0; j < nR; ++j)
{
if ( pMat->IsValueOrEmpty(i,j) )
pResMat->PutDouble( (pMat->GetDouble(i,j) == 0.0), i, j );
else
pResMat->PutString(
ScGlobal::GetRscString( STR_NO_VALUE ), i, j );
}
}
PushMatrix( pResMat );
}
}
}
break;
default:
PushInt( GetDouble() == 0.0 );
}
2000-09-18 23:16:46 +00:00
}
void ScInterpreter::ScBitAnd()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "pechlaner", "ScInterpreter::ScBitAnd" );
if ( !MustHaveParamCount( GetByte(), 2 ) )
return;
double num1 = ::rtl::math::approxFloor( GetDouble());
double num2 = ::rtl::math::approxFloor( GetDouble());
if ( (num1 >= n2power48) || (num1 < 0) ||
(num2 >= n2power48) || (num2 < 0))
PushIllegalArgument();
else
PushDouble ((sal_uInt64) num1 & (sal_uInt64) num2);
}
void ScInterpreter::ScBitOr()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "pechlaner", "ScInterpreter::ScBitOr" );
if ( !MustHaveParamCount( GetByte(), 2 ) )
return;
double num1 = ::rtl::math::approxFloor( GetDouble());
double num2 = ::rtl::math::approxFloor( GetDouble());
if ( (num1 >= n2power48) || (num1 < 0) ||
(num2 >= n2power48) || (num2 < 0))
PushIllegalArgument();
else
PushDouble ((sal_uInt64) num1 | (sal_uInt64) num2);
}
void ScInterpreter::ScBitXor()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "pechlaner", "ScInterpreter::ScBitXor" );
if ( !MustHaveParamCount( GetByte(), 2 ) )
return;
double num1 = ::rtl::math::approxFloor( GetDouble());
double num2 = ::rtl::math::approxFloor( GetDouble());
if ( (num1 >= n2power48) || (num1 < 0) ||
(num2 >= n2power48) || (num2 < 0))
PushIllegalArgument();
else
PushDouble ((sal_uInt64) num1 ^ (sal_uInt64) num2);
}
void ScInterpreter::ScBitLshift()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "pechlaner", "ScInterpreter::ScBitLshift" );
if ( !MustHaveParamCount( GetByte(), 2 ) )
return;
double fShift = ::rtl::math::approxFloor( GetDouble());
double num = ::rtl::math::approxFloor( GetDouble());
if ((num >= n2power48) || (num < 0))
PushIllegalArgument();
else
{
double fRes;
if (fShift < 0)
fRes = ::rtl::math::approxFloor( num / pow( 2.0, -fShift));
else if (fShift == 0)
fRes = num;
else
fRes = num * pow( 2.0, fShift);
PushDouble( fRes);
}
}
void ScInterpreter::ScBitRshift()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "pechlaner", "ScInterpreter::ScBitRshift" );
if ( !MustHaveParamCount( GetByte(), 2 ) )
return;
double fShift = ::rtl::math::approxFloor( GetDouble());
double num = ::rtl::math::approxFloor( GetDouble());
if ((num >= n2power48) || (num < 0))
PushIllegalArgument();
else
{
double fRes;
if (fShift < 0)
fRes = num * pow( 2.0, -fShift);
else if (fShift == 0)
fRes = num;
else
fRes = ::rtl::math::approxFloor( num / pow( 2.0, fShift));
PushDouble( fRes);
}
}
2000-09-18 23:16:46 +00:00
void ScInterpreter::ScPi()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScPi" );
2000-09-18 23:16:46 +00:00
PushDouble(F_PI);
}
void ScInterpreter::ScRandom()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScRandom" );
PushDouble(sc::rng::uniform());
2000-09-18 23:16:46 +00:00
}
void ScInterpreter::ScTrue()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScTrue" );
2000-09-18 23:16:46 +00:00
nFuncFmtType = NUMBERFORMAT_LOGICAL;
PushInt(1);
}
void ScInterpreter::ScFalse()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScFalse" );
2000-09-18 23:16:46 +00:00
nFuncFmtType = NUMBERFORMAT_LOGICAL;
PushInt(0);
}
void ScInterpreter::ScDeg()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScDeg" );
2000-09-18 23:16:46 +00:00
PushDouble((GetDouble() / F_PI) * 180.0);
}
void ScInterpreter::ScRad()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScRad" );
2000-09-18 23:16:46 +00:00
PushDouble(GetDouble() * (F_PI / 180));
}
void ScInterpreter::ScSin()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSin" );
PushDouble(::rtl::math::sin(GetDouble()));
2000-09-18 23:16:46 +00:00
}
void ScInterpreter::ScCos()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScCos" );
PushDouble(::rtl::math::cos(GetDouble()));
2000-09-18 23:16:46 +00:00
}
void ScInterpreter::ScTan()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScTan" );
PushDouble(::rtl::math::tan(GetDouble()));
2000-09-18 23:16:46 +00:00
}
void ScInterpreter::ScCot()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScCot" );
PushDouble(1.0 / ::rtl::math::tan(GetDouble()));
2000-09-18 23:16:46 +00:00
}
void ScInterpreter::ScArcSin()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScArcSin" );
2000-09-18 23:16:46 +00:00
PushDouble(asin(GetDouble()));
}
void ScInterpreter::ScArcCos()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScArcCos" );
2000-09-18 23:16:46 +00:00
PushDouble(acos(GetDouble()));
}
void ScInterpreter::ScArcTan()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScArcTan" );
2000-09-18 23:16:46 +00:00
PushDouble(atan(GetDouble()));
}
void ScInterpreter::ScArcCot()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScArcCot" );
2000-09-18 23:16:46 +00:00
PushDouble((F_PI2) - atan(GetDouble()));
}
void ScInterpreter::ScSinHyp()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSinHyp" );
2000-09-18 23:16:46 +00:00
PushDouble(sinh(GetDouble()));
}
void ScInterpreter::ScCosHyp()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScCosHyp" );
2000-09-18 23:16:46 +00:00
PushDouble(cosh(GetDouble()));
}
void ScInterpreter::ScTanHyp()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScTanHyp" );
2000-09-18 23:16:46 +00:00
PushDouble(tanh(GetDouble()));
}
void ScInterpreter::ScCotHyp()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScCotHyp" );
2000-09-18 23:16:46 +00:00
PushDouble(1.0 / tanh(GetDouble()));
}
void ScInterpreter::ScArcSinHyp()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScArcSinHyp" );
PushDouble( ::rtl::math::asinh( GetDouble()));
2000-09-18 23:16:46 +00:00
}
void ScInterpreter::ScArcCosHyp()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScArcCosHyp" );
double fVal = GetDouble();
if (fVal < 1.0)
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalArgument();
2000-09-18 23:16:46 +00:00
else
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
PushDouble( ::rtl::math::acosh( fVal));
2000-09-18 23:16:46 +00:00
}
void ScInterpreter::ScArcTanHyp()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScArcTanHyp" );
CWS-TOOLING: integrate CWS calcperf03 2009-01-27 17:45:09 +0100 er r267014 : satisfy some stoneage compiler (tinderbox error) 2009-01-26 13:53:16 +0100 er r266921 : corrected merge accident 2009-01-23 23:27:18 +0100 er r266857 : #i97468# for better accuracy use ::rtl::math::atanh() in ATANH and FISHER, tanh() in FISHERINV; patch from <regina> 2009-01-23 23:08:14 +0100 er r266854 : #i97467# added C99 atanh() substitute rtl_math_atanh() and ::rtl::math::atanh() since not all compilers have it; patch from <regina> Plus in rtl_math_log1p() made a variable volatile to prevent compilers from being too smart. 2009-01-23 19:20:43 +0100 er r266849 : #i95381# make PODF adapter recognize empty/missing parameter, in this case ADDRESS 3rd parameter 2009-01-23 17:34:21 +0100 er r266841 : #i95450# support ADDRESS 3rd parameter (abs) as missing parameter 2009-01-23 15:53:23 +0100 er r266830 : some minor beautification 2009-01-23 15:45:20 +0100 er r266829 : small bits missed during integration of cws frmdlg 2009-01-23 02:56:38 +0100 er r266764 : removed CVS nonsense 2009-01-23 02:50:15 +0100 er r266763 : get rid of nasty DOS lineends 2009-01-23 01:56:09 +0100 er r266762 : #i98318# fix crash with external references constructed via Function Wizard; also fixes crash #i98338# and WaE #i97555# 2009-01-22 15:58:41 +0100 er r266732 : #i97547# EUROCONVERT: add SKK/EUR 2009-01-21 15:47:39 +0100 er r266676 : CWS-TOOLING: rebase CWS calcperf03 to trunk@266428 (milestone: DEV300:m39) 2009-01-09 17:22:23 +0100 er r266105 : #i89976# use ::std::nth_element() instead of a fully sorted array for MEDIAN, PERCENTILE, QUARTILE, LARGE, SMALL 2008-11-07 20:13:55 +0100 er r263483 : #i95967# Broadcast: use bulk broadcast also for single cell changes as multiple identical listeners may be involved; speeds up the Zaske document to draw level with Excel 2008-11-07 20:08:37 +0100 er r263482 : #i95967# Notify: spare a vtable access
2009-03-04 12:41:00 +00:00
double fVal = GetDouble();
if (fabs(fVal) >= 1.0)
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalArgument();
2000-09-18 23:16:46 +00:00
else
CWS-TOOLING: integrate CWS calcperf03 2009-01-27 17:45:09 +0100 er r267014 : satisfy some stoneage compiler (tinderbox error) 2009-01-26 13:53:16 +0100 er r266921 : corrected merge accident 2009-01-23 23:27:18 +0100 er r266857 : #i97468# for better accuracy use ::rtl::math::atanh() in ATANH and FISHER, tanh() in FISHERINV; patch from <regina> 2009-01-23 23:08:14 +0100 er r266854 : #i97467# added C99 atanh() substitute rtl_math_atanh() and ::rtl::math::atanh() since not all compilers have it; patch from <regina> Plus in rtl_math_log1p() made a variable volatile to prevent compilers from being too smart. 2009-01-23 19:20:43 +0100 er r266849 : #i95381# make PODF adapter recognize empty/missing parameter, in this case ADDRESS 3rd parameter 2009-01-23 17:34:21 +0100 er r266841 : #i95450# support ADDRESS 3rd parameter (abs) as missing parameter 2009-01-23 15:53:23 +0100 er r266830 : some minor beautification 2009-01-23 15:45:20 +0100 er r266829 : small bits missed during integration of cws frmdlg 2009-01-23 02:56:38 +0100 er r266764 : removed CVS nonsense 2009-01-23 02:50:15 +0100 er r266763 : get rid of nasty DOS lineends 2009-01-23 01:56:09 +0100 er r266762 : #i98318# fix crash with external references constructed via Function Wizard; also fixes crash #i98338# and WaE #i97555# 2009-01-22 15:58:41 +0100 er r266732 : #i97547# EUROCONVERT: add SKK/EUR 2009-01-21 15:47:39 +0100 er r266676 : CWS-TOOLING: rebase CWS calcperf03 to trunk@266428 (milestone: DEV300:m39) 2009-01-09 17:22:23 +0100 er r266105 : #i89976# use ::std::nth_element() instead of a fully sorted array for MEDIAN, PERCENTILE, QUARTILE, LARGE, SMALL 2008-11-07 20:13:55 +0100 er r263483 : #i95967# Broadcast: use bulk broadcast also for single cell changes as multiple identical listeners may be involved; speeds up the Zaske document to draw level with Excel 2008-11-07 20:08:37 +0100 er r263482 : #i95967# Notify: spare a vtable access
2009-03-04 12:41:00 +00:00
PushDouble( ::rtl::math::atanh( fVal));
2000-09-18 23:16:46 +00:00
}
void ScInterpreter::ScArcCotHyp()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScArcCotHyp" );
2000-09-18 23:16:46 +00:00
double nVal = GetDouble();
if (fabs(nVal) <= 1.0)
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalArgument();
2000-09-18 23:16:46 +00:00
else
PushDouble(0.5 * log((nVal + 1.0) / (nVal - 1.0)));
}
void ScInterpreter::ScCosecant()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "regina", "ScInterpreter::ScCosecant" );
PushDouble(1.0 / ::rtl::math::sin(GetDouble()));
}
void ScInterpreter::ScSecant()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "regina", "ScInterpreter::ScSecant" );
PushDouble(1.0 / ::rtl::math::cos(GetDouble()));
}
void ScInterpreter::ScCosecantHyp()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "regina", "ScInterpreter::ScCosecantHyp" );
PushDouble(1.0 / sinh(GetDouble()));
}
void ScInterpreter::ScSecantHyp()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "regina", "ScInterpreter::ScSecantHyp" );
PushDouble(1.0 / cosh(GetDouble()));
}
2000-09-18 23:16:46 +00:00
void ScInterpreter::ScExp()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScExp" );
2000-09-18 23:16:46 +00:00
PushDouble(exp(GetDouble()));
}
void ScInterpreter::ScSqrt()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSqrt" );
2000-09-18 23:16:46 +00:00
double fVal = GetDouble();
if (fVal >= 0.0)
PushDouble(sqrt(fVal));
else
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalArgument();
2000-09-18 23:16:46 +00:00
}
void ScInterpreter::ScIsEmpty()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScIsEmpty" );
2000-09-18 23:16:46 +00:00
short nRes = 0;
nFuncFmtType = NUMBERFORMAT_LOGICAL;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
switch ( GetRawStackType() )
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
case svEmptyCell:
{
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
FormulaTokenRef p = PopToken();
if (!static_cast<const ScEmptyCellToken*>(p.get())->IsInherited())
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
nRes = 1;
}
break;
2000-09-18 23:16:46 +00:00
case svDoubleRef :
case svSingleRef :
{
ScAddress aAdr;
if ( !PopDoubleRefOrSingleRef( aAdr ) )
break;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
// NOTE: this could test also on inherited emptiness, but then the
// cell tested wouldn't be empty. Must correspond with
// ScCountEmptyCells().
// if (HasCellEmptyData( GetCell( aAdr)))
2000-09-18 23:16:46 +00:00
CellType eCellType = GetCellType( GetCell( aAdr ) );
if((eCellType == CELLTYPE_NONE) || (eCellType == CELLTYPE_NOTE))
nRes = 1;
}
break;
case svExternalSingleRef:
case svExternalDoubleRef:
case svMatrix:
{
ScMatrixRef pMat = GetMatrix();
if ( !pMat )
; // nothing
else if ( !pJumpMatrix )
2010-11-07 00:20:50 -04:00
nRes = pMat->IsEmpty( 0, 0);
else
{
SCSIZE nCols, nRows, nC, nR;
pMat->GetDimensions( nCols, nRows);
pJumpMatrix->GetPos( nC, nR);
if ( nC < nCols && nR < nRows )
nRes = pMat->IsEmpty( nC, nR);
2011-08-14 16:10:05 +02:00
// else: false, not empty (which is what Xcl does)
}
}
break;
2000-09-18 23:16:46 +00:00
default:
Pop();
}
nGlobalError = 0;
PushInt( nRes );
}
short ScInterpreter::IsString()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::IsString" );
2000-09-18 23:16:46 +00:00
nFuncFmtType = NUMBERFORMAT_LOGICAL;
short nRes = 0;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
switch ( GetRawStackType() )
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
case svString:
Pop();
nRes = 1;
break;
2000-09-18 23:16:46 +00:00
case svDoubleRef :
case svSingleRef :
{
ScAddress aAdr;
if ( !PopDoubleRefOrSingleRef( aAdr ) )
break;
ScBaseCell* pCell = GetCell( aAdr );
if (GetCellErrCode( pCell ) == 0)
{
switch ( GetCellType( pCell ) )
{
case CELLTYPE_STRING :
case CELLTYPE_EDIT :
nRes = 1;
break;
case CELLTYPE_FORMULA :
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
nRes = !((ScFormulaCell*)pCell)->IsValue() &&
!((ScFormulaCell*)pCell)->IsEmpty();
2000-09-18 23:16:46 +00:00
break;
default:
; // nothing
2000-09-18 23:16:46 +00:00
}
}
}
break;
case svMatrix:
{
ScMatrixRef pMat = PopMatrix();
if ( !pMat )
; // nothing
else if ( !pJumpMatrix )
2010-11-07 00:20:50 -04:00
nRes = pMat->IsString(0, 0) && !pMat->IsEmpty(0, 0);
else
{
SCSIZE nCols, nRows, nC, nR;
pMat->GetDimensions( nCols, nRows);
pJumpMatrix->GetPos( nC, nR);
if ( nC < nCols && nR < nRows )
nRes = pMat->IsString( nC, nR) && !pMat->IsEmpty( nC, nR);
}
}
break;
2000-09-18 23:16:46 +00:00
default:
Pop();
}
nGlobalError = 0;
return nRes;
}
void ScInterpreter::ScIsString()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScIsString" );
2000-09-18 23:16:46 +00:00
PushInt( IsString() );
}
void ScInterpreter::ScIsNonString()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScIsNonString" );
2000-09-18 23:16:46 +00:00
PushInt( !IsString() );
}
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
void ScInterpreter::ScIsLogical()
2000-09-18 23:16:46 +00:00
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScIsLogical" );
2000-09-18 23:16:46 +00:00
short nRes = 0;
switch ( GetStackType() )
{
case svDoubleRef :
case svSingleRef :
{
ScAddress aAdr;
if ( !PopDoubleRefOrSingleRef( aAdr ) )
break;
ScBaseCell* pCell = GetCell( aAdr );
if (GetCellErrCode( pCell ) == 0)
{
if (HasCellValueData(pCell))
{
sal_uLong nFormat = GetCellNumberFormat( aAdr, pCell );
2000-09-18 23:16:46 +00:00
nRes = ( pFormatter->GetType(nFormat)
== NUMBERFORMAT_LOGICAL);
}
}
}
break;
case svMatrix:
// TODO: we don't have type information for arrays except
// numerical/string.
// Fall thru
2000-09-18 23:16:46 +00:00
default:
PopError();
if ( !nGlobalError )
nRes = ( nCurFmtType == NUMBERFORMAT_LOGICAL );
}
nCurFmtType = nFuncFmtType = NUMBERFORMAT_LOGICAL;
nGlobalError = 0;
PushInt( nRes );
}
void ScInterpreter::ScType()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScType" );
2000-09-18 23:16:46 +00:00
short nType = 0;
switch ( GetStackType() )
{
case svDoubleRef :
case svSingleRef :
{
ScAddress aAdr;
if ( !PopDoubleRefOrSingleRef( aAdr ) )
break;
ScBaseCell* pCell = GetCell( aAdr );
if (GetCellErrCode( pCell ) == 0)
{
switch ( GetCellType( pCell ) )
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
// NOTE: this is Xcl nonsense!
case CELLTYPE_NOTE :
nType = 1; // empty cell is value (0)
break;
2000-09-18 23:16:46 +00:00
case CELLTYPE_STRING :
case CELLTYPE_EDIT :
nType = 2;
break;
case CELLTYPE_VALUE :
{
sal_uLong nFormat = GetCellNumberFormat( aAdr, pCell );
2000-09-18 23:16:46 +00:00
if (pFormatter->GetType(nFormat)
== NUMBERFORMAT_LOGICAL)
nType = 4;
else
nType = 1;
}
break;
case CELLTYPE_FORMULA :
nType = 8;
break;
default:
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalArgument();
2000-09-18 23:16:46 +00:00
}
}
else
nType = 16;
}
break;
case svString:
PopError();
if ( nGlobalError )
{
nType = 16;
nGlobalError = 0;
}
else
nType = 2;
break;
case svMatrix:
PopMatrix();
if ( nGlobalError )
{
nType = 16;
nGlobalError = 0;
}
else
nType = 64;
// we could return the type of one element if in JumpMatrix or
// ForceArray mode, but Xcl doesn't ...
break;
2000-09-18 23:16:46 +00:00
default:
PopError();
if ( nGlobalError )
{
nType = 16;
nGlobalError = 0;
}
else
nType = 1;
}
PushInt( nType );
}
static inline bool lcl_FormatHasNegColor( const SvNumberformat* pFormat )
2001-03-08 10:57:21 +00:00
{
return pFormat && pFormat->GetColor( 1 );
}
static inline bool lcl_FormatHasOpenPar( const SvNumberformat* pFormat )
2001-03-08 10:57:21 +00:00
{
return pFormat && (pFormat->GetFormatstring().indexOf('(') != -1);
2001-03-08 10:57:21 +00:00
}
namespace {
void getFormatString(SvNumberFormatter* pFormatter, sal_uLong nFormat, String& rFmtStr)
{
bool bAppendPrec = true;
sal_uInt16 nPrec, nLeading;
bool bThousand, bIsRed;
pFormatter->GetFormatSpecialInfo( nFormat, bThousand, bIsRed, nPrec, nLeading );
switch( pFormatter->GetType( nFormat ) )
{
case NUMBERFORMAT_NUMBER: rFmtStr = (bThousand ? ',' : 'F'); break;
case NUMBERFORMAT_CURRENCY: rFmtStr = 'C'; break;
case NUMBERFORMAT_SCIENTIFIC: rFmtStr = 'S'; break;
case NUMBERFORMAT_PERCENT: rFmtStr = 'P'; break;
default:
{
bAppendPrec = false;
switch( pFormatter->GetIndexTableOffset( nFormat ) )
{
case NF_DATE_SYSTEM_SHORT:
case NF_DATE_SYS_DMMMYY:
case NF_DATE_SYS_DDMMYY:
case NF_DATE_SYS_DDMMYYYY:
case NF_DATE_SYS_DMMMYYYY:
case NF_DATE_DIN_DMMMYYYY:
case NF_DATE_SYS_DMMMMYYYY:
case NF_DATE_DIN_DMMMMYYYY: rFmtStr.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "D1" ) ); break;
case NF_DATE_SYS_DDMMM: rFmtStr.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "D2" ) ); break;
case NF_DATE_SYS_MMYY: rFmtStr.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "D3" ) ); break;
case NF_DATETIME_SYSTEM_SHORT_HHMM:
case NF_DATETIME_SYS_DDMMYYYY_HHMMSS:
rFmtStr.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "D4" ) ); break;
case NF_DATE_DIN_MMDD: rFmtStr.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "D5" ) ); break;
case NF_TIME_HHMMSSAMPM: rFmtStr.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "D6" ) ); break;
case NF_TIME_HHMMAMPM: rFmtStr.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "D7" ) ); break;
case NF_TIME_HHMMSS: rFmtStr.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "D8" ) ); break;
case NF_TIME_HHMM: rFmtStr.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "D9" ) ); break;
default: rFmtStr = 'G';
}
}
}
if( bAppendPrec )
rFmtStr += rtl::OUString::valueOf(static_cast<sal_Int32>(nPrec));
const SvNumberformat* pFormat = pFormatter->GetEntry( nFormat );
if( lcl_FormatHasNegColor( pFormat ) )
rFmtStr += '-';
if( lcl_FormatHasOpenPar( pFormat ) )
rFmtStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "()" ) );
}
}
2001-03-08 10:57:21 +00:00
void ScInterpreter::ScCell()
{ // ATTRIBUTE ; [REF]
sal_uInt8 nParamCount = GetByte();
2001-03-08 10:57:21 +00:00
if( MustHaveParamCount( nParamCount, 1, 2 ) )
{
ScAddress aCellPos( aPos );
2011-08-14 16:10:05 +02:00
bool bError = false;
2001-03-08 10:57:21 +00:00
if( nParamCount == 2 )
{
switch (GetStackType())
{
case svExternalSingleRef:
case svExternalDoubleRef:
{
// Let's handle external reference separately...
ScCellExternal();
return;
}
default:
;
}
2001-03-08 10:57:21 +00:00
bError = !PopDoubleRefOrSingleRef( aCellPos );
}
2001-03-08 10:57:21 +00:00
String aInfoType( GetString() );
if( bError || nGlobalError )
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalParameter();
2001-03-08 10:57:21 +00:00
else
{
ScBaseCell* pCell = GetCell( aCellPos );
CWS-TOOLING: integrate CWS oj18 2009-08-21 15:08:49 +0200 oj r275263 : wrong check 2009-08-21 08:56:01 +0200 oj r275215 : missing not 2009-08-20 07:27:13 +0200 oj r275164 : use new method from global 2009-08-19 10:22:35 +0200 oj r275138 : call GetLocale instead of pLocale 2009-08-18 10:39:32 +0200 oj r275082 : missing header include 2009-08-18 10:09:44 +0200 oj r275081 : new methods at global 2009-08-18 10:09:00 +0200 oj r275080 : unused var 2009-08-18 08:59:04 +0200 oj r275078 : move files from classes to xml 2009-08-17 14:58:16 +0200 oj r275056 : CWS-TOOLING: rebase CWS oj18 to trunk@275001 (milestone: DEV300:m55) 2009-08-17 13:29:44 +0200 oj r275047 : compile error 2009-08-17 13:27:47 +0200 oj r275045 : compile error 2009-08-17 11:44:54 +0200 oj r275040 : add dep 2009-07-22 14:26:05 +0200 oj r274240 : move unused services into fwl 2009-07-22 14:25:35 +0200 oj r274239 : move unused services into fwl 2009-07-22 13:47:45 +0200 oj r274233 : remove some unused code 2009-07-22 09:06:20 +0200 oj r274219 : export dbtoolsclient dbcharsethelper for sc 2009-07-22 08:48:58 +0200 oj r274218 : create NumberFormatter on demand 2009-07-22 08:39:23 +0200 oj r274217 : change char to sal_Char 2009-07-22 07:33:34 +0200 oj r274214 : export dbtoolsclient dbcharsethelper for sc 2009-07-22 07:30:04 +0200 oj r274213 : late init of numberformatter and breakiterator 2009-07-22 07:28:55 +0200 oj r274212 : export dbtoolsclient dbcharsethelper for sc 2009-07-21 13:43:28 +0200 oj r274196 : check if quick start is enbaled 2009-07-21 13:40:09 +0200 oj r274195 : check config entry for UiEventsLogger 2009-07-21 13:37:40 +0200 oj r274194 : code refactoring, remove of duplicate code and some late inits and removale of not needed files 2009-07-21 13:35:38 +0200 oj r274193 : code refactoring, remove of duplicate code and some late inits and removale of not needed files 2009-07-21 13:33:41 +0200 oj r274192 : doc meta data will now be created on demand 2009-07-21 13:13:40 +0200 oj r274187 : load ldap functions on demand 2009-07-21 13:03:17 +0200 oj r274183 : late init of TransliterationImpl 2009-07-21 12:36:10 +0200 oj r274180 : late init of charClass
2009-09-08 04:57:32 +00:00
ScCellKeywordTranslator::transKeyword(aInfoType, ScGlobal::GetLocale(), ocCell);
2001-03-08 10:57:21 +00:00
// *** ADDRESS INFO ***
if( aInfoType.EqualsAscii( "COL" ) )
{ // column number (1-based)
PushInt( aCellPos.Col() + 1 );
}
else if( aInfoType.EqualsAscii( "ROW" ) )
{ // row number (1-based)
PushInt( aCellPos.Row() + 1 );
}
else if( aInfoType.EqualsAscii( "SHEET" ) )
{ // table number (1-based)
PushInt( aCellPos.Tab() + 1 );
}
else if( aInfoType.EqualsAscii( "ADDRESS" ) )
{ // address formatted as [['FILENAME'#]$TABLE.]$COL$ROW
sal_uInt16 nFlags = (aCellPos.Tab() == aPos.Tab()) ? (SCA_ABS) : (SCA_ABS_3D);
2011-08-26 19:33:59 -04:00
rtl::OUString aStr;
aCellPos.Format( aStr, nFlags, pDok, pDok->GetAddressConvention() );
PushString(aStr);
2001-03-08 10:57:21 +00:00
}
else if( aInfoType.EqualsAscii( "FILENAME" ) )
{ // file name and table name: 'FILENAME'#$TABLE
SCTAB nTab = aCellPos.Tab();
2011-08-26 19:33:59 -04:00
rtl::OUString aFuncResult;
2001-03-08 10:57:21 +00:00
if( nTab < pDok->GetTableCount() )
{
if( pDok->GetLinkMode( nTab ) == SC_LINK_VALUE )
pDok->GetName( nTab, aFuncResult );
2001-03-08 10:57:21 +00:00
else
{
SfxObjectShell* pShell = pDok->GetDocumentShell();
if( pShell && pShell->GetMedium() )
{
2011-08-26 19:33:59 -04:00
rtl::OUStringBuffer aBuf;
aBuf.append(sal_Unicode('\''));
const INetURLObject& rURLObj = pShell->GetMedium()->GetURLObject();
2011-08-26 19:33:59 -04:00
aBuf.append(rURLObj.GetMainURL(INetURLObject::DECODE_UNAMBIGUOUS));
aBuf.appendAscii("'#$");
rtl::OUString aTabName;
2001-03-08 10:57:21 +00:00
pDok->GetName( nTab, aTabName );
2011-08-26 19:33:59 -04:00
aBuf.append(aTabName);
aFuncResult = aBuf.makeStringAndClear();
2001-03-08 10:57:21 +00:00
}
}
}
PushString( aFuncResult );
2001-03-08 10:57:21 +00:00
}
else if( aInfoType.EqualsAscii( "COORD" ) )
{ // address, lotus 1-2-3 formatted: $TABLE:$COL$ROW
// Yes, passing tab as col is intentional!
2011-08-26 19:33:59 -04:00
rtl::OUStringBuffer aFuncResult;
rtl::OUString aCellStr;
ScAddress( static_cast<SCCOL>(aCellPos.Tab()), 0, 0 ).Format(
2011-08-26 19:33:59 -04:00
aCellStr, (SCA_COL_ABSOLUTE|SCA_VALID_COL), NULL, pDok->GetAddressConvention() );
aFuncResult.append(aCellStr);
aFuncResult.append(sal_Unicode(':'));
aCellPos.Format( aCellStr, (SCA_COL_ABSOLUTE|SCA_VALID_COL|SCA_ROW_ABSOLUTE|SCA_VALID_ROW),
NULL, pDok->GetAddressConvention() );
2011-08-26 19:33:59 -04:00
aFuncResult.append(aCellStr);
PushString( aFuncResult.makeStringAndClear() );
2001-03-08 10:57:21 +00:00
}
// *** CELL PROPERTIES ***
else if( aInfoType.EqualsAscii( "CONTENTS" ) )
{ // contents of the cell, no formatting
if( pCell && pCell->HasStringData() )
{
2011-08-26 19:33:59 -04:00
String aStr;
GetCellString( aStr, pCell );
PushString( aStr );
2001-03-08 10:57:21 +00:00
}
else
PushDouble( GetCellValue( aCellPos, pCell ) );
}
else if( aInfoType.EqualsAscii( "TYPE" ) )
{ // b = blank; l = string (label); v = otherwise (value)
2011-08-26 19:33:59 -04:00
sal_Unicode c;
2001-03-08 10:57:21 +00:00
if( HasCellStringData( pCell ) )
2011-08-26 19:33:59 -04:00
c = 'l';
2001-03-08 10:57:21 +00:00
else
2011-08-26 19:33:59 -04:00
c = HasCellValueData( pCell ) ? 'v' : 'b';
PushString( rtl::OUString(c) );
2001-03-08 10:57:21 +00:00
}
else if( aInfoType.EqualsAscii( "WIDTH" ) )
{ // column width (rounded off as count of zero characters in standard font and size)
Printer* pPrinter = pDok->GetPrinter();
MapMode aOldMode( pPrinter->GetMapMode() );
Font aOldFont( pPrinter->GetFont() );
Font aDefFont;
pPrinter->SetMapMode( MAP_TWIP );
// font color doesn't matter here
pDok->GetDefPattern()->GetFont( aDefFont, SC_AUTOCOL_BLACK, pPrinter );
2001-03-08 10:57:21 +00:00
pPrinter->SetFont( aDefFont );
long nZeroWidth = pPrinter->GetTextWidth( rtl::OUString( '0' ) );
2001-03-08 10:57:21 +00:00
pPrinter->SetFont( aOldFont );
pPrinter->SetMapMode( aOldMode );
int nZeroCount = (int)(pDok->GetColWidth( aCellPos.Col(), aCellPos.Tab() ) / nZeroWidth);
PushInt( nZeroCount );
}
else if( aInfoType.EqualsAscii( "PREFIX" ) )
{ // ' = left; " = right; ^ = centered
2011-08-26 19:33:59 -04:00
sal_Unicode c = 0;
2001-03-08 10:57:21 +00:00
if( HasCellStringData( pCell ) )
{
const SvxHorJustifyItem* pJustAttr = (const SvxHorJustifyItem*)
pDok->GetAttr( aCellPos.Col(), aCellPos.Row(), aCellPos.Tab(), ATTR_HOR_JUSTIFY );
switch( pJustAttr->GetValue() )
{
case SVX_HOR_JUSTIFY_STANDARD:
case SVX_HOR_JUSTIFY_LEFT:
2011-08-26 19:33:59 -04:00
case SVX_HOR_JUSTIFY_BLOCK: c = '\''; break;
case SVX_HOR_JUSTIFY_CENTER: c = '^'; break;
case SVX_HOR_JUSTIFY_RIGHT: c = '"'; break;
case SVX_HOR_JUSTIFY_REPEAT: c = '\\'; break;
2001-03-08 10:57:21 +00:00
}
}
2011-08-26 19:33:59 -04:00
PushString( rtl::OUString(c) );
2001-03-08 10:57:21 +00:00
}
else if( aInfoType.EqualsAscii( "PROTECT" ) )
{ // 1 = cell locked
const ScProtectionAttr* pProtAttr = (const ScProtectionAttr*)
pDok->GetAttr( aCellPos.Col(), aCellPos.Row(), aCellPos.Tab(), ATTR_PROTECTION );
PushInt( pProtAttr->GetProtection() ? 1 : 0 );
}
// *** FORMATTING ***
else if( aInfoType.EqualsAscii( "FORMAT" ) )
{ // specific format code for standard formats
2011-08-26 19:33:59 -04:00
String aFuncResult;
sal_uLong nFormat = pDok->GetNumberFormat( aCellPos );
getFormatString(pFormatter, nFormat, aFuncResult);
PushString( aFuncResult );
2001-03-08 10:57:21 +00:00
}
else if( aInfoType.EqualsAscii( "COLOR" ) )
{ // 1 = negative values are colored, otherwise 0
const SvNumberformat* pFormat = pFormatter->GetEntry( pDok->GetNumberFormat( aCellPos ) );
PushInt( lcl_FormatHasNegColor( pFormat ) ? 1 : 0 );
}
else if( aInfoType.EqualsAscii( "PARENTHESES" ) )
{ // 1 = format string contains a '(' character, otherwise 0
const SvNumberformat* pFormat = pFormatter->GetEntry( pDok->GetNumberFormat( aCellPos ) );
PushInt( lcl_FormatHasOpenPar( pFormat ) ? 1 : 0 );
}
else
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalArgument();
2001-03-08 10:57:21 +00:00
}
}
}
void ScInterpreter::ScCellExternal()
{
sal_uInt16 nFileId;
String aTabName;
ScSingleRefData aRef;
ScExternalRefCache::TokenRef pToken;
ScExternalRefCache::CellFormat aFmt;
PopExternalSingleRef(nFileId, aTabName, aRef, pToken, &aFmt);
if (nGlobalError)
{
PushIllegalParameter();
return;
}
rtl::OUString aInfoType = GetString();
if (nGlobalError)
{
PushIllegalParameter();
return;
}
SCCOL nCol;
SCROW nRow;
SCTAB nTab;
aRef.nTab = 0; // external ref has a tab index of -1, which SingleRefToVars() don't like.
SingleRefToVars(aRef, nCol, nRow, nTab);
if (nGlobalError)
{
PushIllegalParameter();
return;
}
aRef.nTab = -1; // revert the value.
ScCellKeywordTranslator::transKeyword(aInfoType, ScGlobal::GetLocale(), ocCell);
ScExternalRefManager* pRefMgr = pDok->GetExternalRefManager();
if ( aInfoType == "COL" )
PushInt(nCol + 1);
else if ( aInfoType == "ROW" )
PushInt(nRow + 1);
else if ( aInfoType == "SHEET" )
{
// For SHEET, No idea what number we should set, but let's always set
// 1 if the external sheet exists, no matter what sheet. Excel does
// the same.
if (pRefMgr->getCacheTable(nFileId, aTabName, false, NULL).get())
PushInt(1);
else
SetError(errNoName);
}
else if ( aInfoType == "ADDRESS" )
{
// ODF 1.2 says we need to always display address using the ODF A1 grammar.
ScTokenArray aArray;
aArray.AddExternalSingleReference(nFileId, aTabName, aRef);
ScCompiler aComp(pDok, aPos, aArray);
aComp.SetGrammar(formula::FormulaGrammar::GRAM_ODFF_A1);
String aStr;
aComp.CreateStringFromTokenArray(aStr);
PushString(aStr);
}
else if ( aInfoType == "FILENAME" )
{
// 'file URI'#$SheetName
const rtl::OUString* p = pRefMgr->getExternalFileName(nFileId);
if (!p)
{
// In theory this should never happen...
SetError(errNoName);
return;
}
rtl::OUStringBuffer aBuf;
aBuf.append(sal_Unicode('\''));
aBuf.append(*p);
aBuf.appendAscii("'#$");
aBuf.append(aTabName);
PushString(aBuf.makeStringAndClear());
}
else if ( aInfoType == "CONTENTS" )
{
switch (pToken->GetType())
{
case svString:
PushString(pToken->GetString());
break;
case svDouble:
PushString(rtl::OUString::valueOf(pToken->GetDouble()));
break;
case svError:
PushString(ScGlobal::GetErrorString(pToken->GetError()));
break;
default:
PushString(ScGlobal::GetEmptyString());
}
}
else if ( aInfoType == "TYPE" )
{
sal_Unicode c = 'v';
switch (pToken->GetType())
{
case svString:
c = 'l';
break;
case svEmptyCell:
c = 'b';
break;
default:
;
}
PushString(rtl::OUString(c));
}
else if ( aInfoType == "FORMAT" )
{
String aFmtStr;
sal_uLong nFmt = aFmt.mbIsSet ? aFmt.mnIndex : 0;
getFormatString(pFormatter, nFmt, aFmtStr);
PushString(aFmtStr);
}
else if ( aInfoType == "COLOR" )
{
// 1 = negative values are colored, otherwise 0
int nVal = 0;
if (aFmt.mbIsSet)
{
const SvNumberformat* pFormat = pFormatter->GetEntry(aFmt.mnIndex);
nVal = lcl_FormatHasNegColor(pFormat) ? 1 : 0;
}
PushInt(nVal);
}
else if ( aInfoType == "PARENTHESES" )
{
// 1 = format string contains a '(' character, otherwise 0
int nVal = 0;
if (aFmt.mbIsSet)
{
const SvNumberformat* pFormat = pFormatter->GetEntry(aFmt.mnIndex);
nVal = lcl_FormatHasOpenPar(pFormat) ? 1 : 0;
}
PushInt(nVal);
}
else
PushIllegalParameter();
}
2001-03-08 10:57:21 +00:00
2000-09-18 23:16:46 +00:00
void ScInterpreter::ScIsRef()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScCell" );
2000-09-18 23:16:46 +00:00
nFuncFmtType = NUMBERFORMAT_LOGICAL;
short nRes = 0;
switch ( GetStackType() )
{
case svSingleRef :
{
ScAddress aAdr;
PopSingleRef( aAdr );
if ( !nGlobalError )
nRes = 1;
}
break;
case svDoubleRef :
{
ScRange aRange;
PopDoubleRef( aRange );
if ( !nGlobalError )
nRes = 1;
}
break;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
case svRefList :
{
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
FormulaTokenRef x = PopToken();
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
if ( !nGlobalError )
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
nRes = !static_cast<ScToken*>(x.get())->GetRefList()->empty();
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
}
break;
2000-09-18 23:16:46 +00:00
default:
Pop();
}
nGlobalError = 0;
PushInt( nRes );
}
void ScInterpreter::ScIsValue()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScIsValue" );
2000-09-18 23:16:46 +00:00
nFuncFmtType = NUMBERFORMAT_LOGICAL;
short nRes = 0;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
switch ( GetRawStackType() )
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
case svDouble:
Pop();
nRes = 1;
break;
2000-09-18 23:16:46 +00:00
case svDoubleRef :
case svSingleRef :
{
ScAddress aAdr;
if ( !PopDoubleRefOrSingleRef( aAdr ) )
break;
ScBaseCell* pCell = GetCell( aAdr );
if (GetCellErrCode( pCell ) == 0)
{
switch ( GetCellType( pCell ) )
{
case CELLTYPE_VALUE :
nRes = 1;
break;
case CELLTYPE_FORMULA :
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
nRes = ((ScFormulaCell*)pCell)->IsValue() &&
!((ScFormulaCell*)pCell)->IsEmpty();
2000-09-18 23:16:46 +00:00
break;
default:
; // nothing
2000-09-18 23:16:46 +00:00
}
}
}
break;
case svMatrix:
{
ScMatrixRef pMat = PopMatrix();
if ( !pMat )
; // nothing
else if ( !pJumpMatrix )
{
if (pMat->GetErrorIfNotString( 0, 0) == 0)
nRes = pMat->IsValue( 0, 0);
}
else
{
SCSIZE nCols, nRows, nC, nR;
pMat->GetDimensions( nCols, nRows);
pJumpMatrix->GetPos( nC, nR);
if ( nC < nCols && nR < nRows )
if (pMat->GetErrorIfNotString( nC, nR) == 0)
nRes = pMat->IsValue( nC, nR);
}
}
break;
2000-09-18 23:16:46 +00:00
default:
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
Pop();
2000-09-18 23:16:46 +00:00
}
nGlobalError = 0;
PushInt( nRes );
}
void ScInterpreter::ScIsFormula()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScIsFormula" );
2000-09-18 23:16:46 +00:00
nFuncFmtType = NUMBERFORMAT_LOGICAL;
short nRes = 0;
switch ( GetStackType() )
{
case svDoubleRef :
case svSingleRef :
{
ScAddress aAdr;
if ( !PopDoubleRefOrSingleRef( aAdr ) )
break;
nRes = (GetCellType( GetCell( aAdr ) ) == CELLTYPE_FORMULA);
}
break;
default:
Pop();
}
nGlobalError = 0;
PushInt( nRes );
}
void ScInterpreter::ScFormula()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScFormula" );
rtl::OUString aFormula;
2000-09-18 23:16:46 +00:00
switch ( GetStackType() )
{
case svDoubleRef :
case svSingleRef :
{
ScAddress aAdr;
if ( !PopDoubleRefOrSingleRef( aAdr ) )
break;
ScBaseCell* pCell = GetCell( aAdr );
switch ( GetCellType( pCell ) )
{
case CELLTYPE_FORMULA :
((ScFormulaCell*)pCell)->GetFormula( aFormula );
break;
default:
SetError( NOTAVAILABLE );
2000-09-18 23:16:46 +00:00
}
}
break;
default:
Pop();
SetError( NOTAVAILABLE );
2000-09-18 23:16:46 +00:00
}
2001-02-21 17:39:37 +00:00
PushString( aFormula );
2000-09-18 23:16:46 +00:00
}
void ScInterpreter::ScIsNV()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScIsNV" );
2000-09-18 23:16:46 +00:00
nFuncFmtType = NUMBERFORMAT_LOGICAL;
short nRes = 0;
switch ( GetStackType() )
{
case svDoubleRef :
case svSingleRef :
{
ScAddress aAdr;
PopDoubleRefOrSingleRef( aAdr );
if ( nGlobalError == NOTAVAILABLE )
2000-09-18 23:16:46 +00:00
nRes = 1;
else
{
ScBaseCell* pCell = GetCell( aAdr );
sal_uInt16 nErr = GetCellErrCode( pCell );
nRes = (nErr == NOTAVAILABLE);
2000-09-18 23:16:46 +00:00
}
}
break;
case svMatrix:
{
ScMatrixRef pMat = PopMatrix();
if ( !pMat )
; // nothing
else if ( !pJumpMatrix )
nRes = (pMat->GetErrorIfNotString( 0, 0) == NOTAVAILABLE);
else
{
SCSIZE nCols, nRows, nC, nR;
pMat->GetDimensions( nCols, nRows);
pJumpMatrix->GetPos( nC, nR);
if ( nC < nCols && nR < nRows )
nRes = (pMat->GetErrorIfNotString( nC, nR) == NOTAVAILABLE);
}
}
break;
2000-09-18 23:16:46 +00:00
default:
PopError();
if ( nGlobalError == NOTAVAILABLE )
2000-09-18 23:16:46 +00:00
nRes = 1;
}
nGlobalError = 0;
PushInt( nRes );
}
void ScInterpreter::ScIsErr()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScIsErr" );
2000-09-18 23:16:46 +00:00
nFuncFmtType = NUMBERFORMAT_LOGICAL;
short nRes = 0;
switch ( GetStackType() )
{
case svDoubleRef :
case svSingleRef :
{
ScAddress aAdr;
PopDoubleRefOrSingleRef( aAdr );
if ( nGlobalError && nGlobalError != NOTAVAILABLE )
2000-09-18 23:16:46 +00:00
nRes = 1;
else
{
ScBaseCell* pCell = GetCell( aAdr );
sal_uInt16 nErr = GetCellErrCode( pCell );
nRes = (nErr && nErr != NOTAVAILABLE);
2000-09-18 23:16:46 +00:00
}
}
break;
case svMatrix:
{
ScMatrixRef pMat = PopMatrix();
if ( nGlobalError || !pMat )
nRes = ((nGlobalError && nGlobalError != NOTAVAILABLE) || !pMat);
else if ( !pJumpMatrix )
{
sal_uInt16 nErr = pMat->GetErrorIfNotString( 0, 0);
nRes = (nErr && nErr != NOTAVAILABLE);
}
else
{
SCSIZE nCols, nRows, nC, nR;
pMat->GetDimensions( nCols, nRows);
pJumpMatrix->GetPos( nC, nR);
if ( nC < nCols && nR < nRows )
{
sal_uInt16 nErr = pMat->GetErrorIfNotString( nC, nR);
nRes = (nErr && nErr != NOTAVAILABLE);
}
}
}
break;
2000-09-18 23:16:46 +00:00
default:
PopError();
if ( nGlobalError && nGlobalError != NOTAVAILABLE )
2000-09-18 23:16:46 +00:00
nRes = 1;
}
nGlobalError = 0;
PushInt( nRes );
}
void ScInterpreter::ScIsError()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScIsError" );
2000-09-18 23:16:46 +00:00
nFuncFmtType = NUMBERFORMAT_LOGICAL;
short nRes = 0;
switch ( GetStackType() )
{
case svDoubleRef :
case svSingleRef :
{
ScAddress aAdr;
if ( !PopDoubleRefOrSingleRef( aAdr ) )
{
nRes = 1;
break;
}
if ( nGlobalError )
nRes = 1;
else
{
ScBaseCell* pCell = GetCell( aAdr );
nRes = (GetCellErrCode( pCell ) != 0);
}
}
break;
case svMatrix:
{
ScMatrixRef pMat = PopMatrix();
if ( nGlobalError || !pMat )
nRes = 1;
else if ( !pJumpMatrix )
nRes = (pMat->GetErrorIfNotString( 0, 0) != 0);
else
{
SCSIZE nCols, nRows, nC, nR;
pMat->GetDimensions( nCols, nRows);
pJumpMatrix->GetPos( nC, nR);
if ( nC < nCols && nR < nRows )
nRes = (pMat->GetErrorIfNotString( nC, nR) != 0);
}
}
break;
2000-09-18 23:16:46 +00:00
default:
PopError();
if ( nGlobalError )
nRes = 1;
}
nGlobalError = 0;
PushInt( nRes );
}
short ScInterpreter::IsEven()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::IsEven" );
2000-09-18 23:16:46 +00:00
nFuncFmtType = NUMBERFORMAT_LOGICAL;
short nRes = 0;
double fVal = 0.0;
2000-09-18 23:16:46 +00:00
switch ( GetStackType() )
{
case svDoubleRef :
case svSingleRef :
{
ScAddress aAdr;
if ( !PopDoubleRefOrSingleRef( aAdr ) )
break;
ScBaseCell* pCell = GetCell( aAdr );
sal_uInt16 nErr = GetCellErrCode( pCell );
2000-09-18 23:16:46 +00:00
if (nErr != 0)
SetError(nErr);
else
{
switch ( GetCellType( pCell ) )
{
case CELLTYPE_VALUE :
fVal = GetCellValue( aAdr, pCell );
nRes = 1;
break;
2000-09-18 23:16:46 +00:00
case CELLTYPE_FORMULA :
if( ((ScFormulaCell*)pCell)->IsValue() )
{
fVal = GetCellValue( aAdr, pCell );
nRes = 1;
}
break;
default:
; // nothing
2000-09-18 23:16:46 +00:00
}
}
}
break;
case svDouble:
{
fVal = PopDouble();
nRes = 1;
}
break;
case svMatrix:
{
ScMatrixRef pMat = PopMatrix();
if ( !pMat )
; // nothing
else if ( !pJumpMatrix )
{
nRes = pMat->IsValue( 0, 0);
if ( nRes )
fVal = pMat->GetDouble( 0, 0);
}
else
{
SCSIZE nCols, nRows, nC, nR;
pMat->GetDimensions( nCols, nRows);
pJumpMatrix->GetPos( nC, nR);
if ( nC < nCols && nR < nRows )
{
nRes = pMat->IsValue( nC, nR);
if ( nRes )
fVal = pMat->GetDouble( nC, nR);
}
else
SetError( errNoValue);
}
}
break;
default:
; // nothing
2000-09-18 23:16:46 +00:00
}
if ( !nRes )
SetError( errIllegalParameter);
else
nRes = ( fmod( ::rtl::math::approxFloor( fabs( fVal ) ), 2.0 ) < 0.5 );
2000-09-18 23:16:46 +00:00
return nRes;
}
void ScInterpreter::ScIsEven()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScIsEven" );
2000-09-18 23:16:46 +00:00
PushInt( IsEven() );
}
void ScInterpreter::ScIsOdd()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScIsOdd" );
2000-09-18 23:16:46 +00:00
PushInt( !IsEven() );
}
void ScInterpreter::ScN()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScN" );
sal_uInt16 nErr = nGlobalError;
nGlobalError = 0;
// Temporarily override the ConvertStringToValue() error for
// GetCellValue() / GetCellValueOrZero()
sal_uInt16 nSErr = mnStringNoValueError;
mnStringNoValueError = errCellNoValue;
double fVal = GetDouble();
mnStringNoValueError = nSErr;
if (nErr)
nGlobalError = nErr; // preserve previous error if any
else if (nGlobalError == errCellNoValue)
nGlobalError = 0; // reset temporary detection error
PushDouble(fVal);
2000-09-18 23:16:46 +00:00
}
void ScInterpreter::ScTrim()
{
// Doesn't only trim but also removes duplicated blanks within!
String aVal = comphelper::string::strip(GetString(), ' ');
2000-09-18 23:16:46 +00:00
String aStr;
register const sal_Unicode* p = aVal.GetBuffer();
register const sal_Unicode* const pEnd = p + aVal.Len();
while ( p < pEnd )
{
if ( *p != ' ' || p[-1] != ' ' ) // first can't be ' ', so -1 is fine
2000-09-18 23:16:46 +00:00
aStr += *p;
p++;
}
2001-02-21 17:39:37 +00:00
PushString( aStr );
2000-09-18 23:16:46 +00:00
}
void ScInterpreter::ScUpper()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScTrim" );
String aString = ScGlobal::pCharClass->uppercase(GetString());
2001-02-21 17:39:37 +00:00
PushString(aString);
2000-09-18 23:16:46 +00:00
}
void ScInterpreter::ScPropper()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScPropper" );
2000-09-18 23:16:46 +00:00
//2do: what to do with I18N-CJK ?!?
String aStr( GetString() );
const xub_StrLen nLen = aStr.Len();
// #i82487# don't try to write to empty string's BufferAccess
// (would crash now that the empty string is const)
if ( nLen > 0 )
2000-09-18 23:16:46 +00:00
{
String aUpr( ScGlobal::pCharClass->uppercase( aStr ) );
String aLwr( ScGlobal::pCharClass->lowercase( aStr ) );
register sal_Unicode* pStr = aStr.GetBufferAccess();
const sal_Unicode* pUpr = aUpr.GetBuffer();
const sal_Unicode* pLwr = aLwr.GetBuffer();
*pStr = *pUpr;
xub_StrLen nPos = 1;
while( nPos < nLen )
{
rtl::OUString aTmpStr( pStr[nPos-1] );
if ( !ScGlobal::pCharClass->isLetter( aTmpStr, 0 ) )
pStr[nPos] = pUpr[nPos];
else
pStr[nPos] = pLwr[nPos];
nPos++;
}
aStr.ReleaseBufferAccess( nLen );
2000-09-18 23:16:46 +00:00
}
2001-02-21 17:39:37 +00:00
PushString( aStr );
2000-09-18 23:16:46 +00:00
}
void ScInterpreter::ScLower()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScLower" );
String aString = ScGlobal::pCharClass->lowercase(GetString());
2001-02-21 17:39:37 +00:00
PushString(aString);
2000-09-18 23:16:46 +00:00
}
void ScInterpreter::ScLen()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScLen" );
2000-09-18 23:16:46 +00:00
String aStr( GetString() );
PushDouble( aStr.Len() );
}
void ScInterpreter::ScT()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScT" );
2000-09-18 23:16:46 +00:00
switch ( GetStackType() )
{
case svDoubleRef :
case svSingleRef :
{
ScAddress aAdr;
if ( !PopDoubleRefOrSingleRef( aAdr ) )
{
PushInt(0);
return ;
}
2011-08-14 16:10:05 +02:00
bool bValue = false;
2000-09-18 23:16:46 +00:00
ScBaseCell* pCell = GetCell( aAdr );
if ( GetCellErrCode( pCell ) == 0 )
{
switch ( GetCellType( pCell ) )
{
case CELLTYPE_VALUE :
2011-08-14 16:10:05 +02:00
bValue = true;
2000-09-18 23:16:46 +00:00
break;
case CELLTYPE_FORMULA :
bValue = ((ScFormulaCell*)pCell)->IsValue();
break;
default:
; // nothing
2000-09-18 23:16:46 +00:00
}
}
if ( bValue )
2001-02-21 17:39:37 +00:00
PushString( EMPTY_STRING );
2000-09-18 23:16:46 +00:00
else
{
// like GetString()
2000-09-18 23:16:46 +00:00
GetCellString( aTempStr, pCell );
2001-02-21 17:39:37 +00:00
PushString( aTempStr );
2000-09-18 23:16:46 +00:00
}
}
break;
case svMatrix:
case svExternalSingleRef:
case svExternalDoubleRef:
{
double fVal;
String aStr;
ScMatValType nMatValType = GetDoubleOrStringFromMatrix( fVal, aStr);
if (ScMatrix::IsValueType( nMatValType))
PushString( EMPTY_STRING);
else
PushString( aStr);
}
break;
2000-09-18 23:16:46 +00:00
case svDouble :
{
PopError();
2001-02-21 17:39:37 +00:00
PushString( EMPTY_STRING );
2000-09-18 23:16:46 +00:00
}
break;
case svString :
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
; // leave on stack
2000-09-18 23:16:46 +00:00
break;
default :
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushError( errUnknownOpCode);
2000-09-18 23:16:46 +00:00
}
}
void ScInterpreter::ScValue()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScValue" );
String aInputString;
2000-09-18 23:16:46 +00:00
double fVal;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
switch ( GetRawStackType() )
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
case svMissing:
case svEmptyCell:
Pop();
PushInt(0);
return;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
case svDouble:
return; // leave on stack
//break;
case svSingleRef:
case svDoubleRef:
{
ScAddress aAdr;
if ( !PopDoubleRefOrSingleRef( aAdr ) )
{
PushInt(0);
return;
}
ScBaseCell* pCell = GetCell( aAdr );
if ( pCell && pCell->HasStringData() )
GetCellString( aInputString, pCell );
else if ( pCell && pCell->HasValueData() )
{
PushDouble( GetCellValue(aAdr, pCell) );
return;
}
else
{
PushDouble(0.0);
return;
}
}
break;
case svMatrix:
{
ScMatValType nType = GetDoubleOrStringFromMatrix( fVal,
aInputString);
switch (nType)
{
case SC_MATVAL_EMPTY:
fVal = 0.0;
// fallthru
case SC_MATVAL_VALUE:
case SC_MATVAL_BOOLEAN:
PushDouble( fVal);
return;
//break;
case SC_MATVAL_STRING:
// evaluated below
break;
default:
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalArgument();
}
}
break;
default:
aInputString = GetString();
break;
}
sal_uInt32 nFIndex = 0; // 0 for default locale
2000-09-18 23:16:46 +00:00
if (pFormatter->IsNumberFormat(aInputString, nFIndex, fVal))
PushDouble(fVal);
else
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalArgument();
2000-09-18 23:16:46 +00:00
}
//2do: this should be a proper unicode string method
static inline bool lcl_ScInterpreter_IsPrintable( sal_Unicode c )
2000-09-18 23:16:46 +00:00
{
return 0x20 <= c && c != 0x7f;
}
void ScInterpreter::ScClean()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScClean" );
2000-09-18 23:16:46 +00:00
String aStr( GetString() );
for ( xub_StrLen i = 0; i < aStr.Len(); i++ )
{
if ( !lcl_ScInterpreter_IsPrintable( aStr.GetChar( i ) ) )
aStr.Erase(i,1);
}
2001-02-21 17:39:37 +00:00
PushString(aStr);
2000-09-18 23:16:46 +00:00
}
void ScInterpreter::ScCode()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScCode" );
2000-09-18 23:16:46 +00:00
//2do: make it full range unicode?
2001-02-21 17:39:37 +00:00
const String& rStr = GetString();
//"classic" ByteString conversion flags
const sal_uInt32 convertFlags =
RTL_UNICODETOTEXT_FLAGS_NONSPACING_IGNORE |
RTL_UNICODETOTEXT_FLAGS_CONTROL_IGNORE |
RTL_UNICODETOTEXT_FLAGS_FLUSH |
RTL_UNICODETOTEXT_FLAGS_UNDEFINED_DEFAULT |
RTL_UNICODETOTEXT_FLAGS_INVALID_DEFAULT |
RTL_UNICODETOTEXT_FLAGS_UNDEFINED_REPLACE;
PushInt( (sal_uChar) rtl::OUStringToOString(rtl::OUString(rStr.GetChar(0)), osl_getThreadTextEncoding(), convertFlags).toChar() );
2000-09-18 23:16:46 +00:00
}
void ScInterpreter::ScChar()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScChar" );
2000-09-18 23:16:46 +00:00
//2do: make it full range unicode?
double fVal = GetDouble();
if (fVal < 0.0 || fVal >= 256.0)
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalArgument();
2000-09-18 23:16:46 +00:00
else
{
//"classic" ByteString conversion flags
const sal_uInt32 convertFlags =
RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_DEFAULT |
RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_DEFAULT |
RTL_TEXTTOUNICODE_FLAGS_INVALID_DEFAULT;
sal_Char cEncodedChar = static_cast<sal_Char>(fVal);
rtl::OUString aStr(&cEncodedChar, 1, osl_getThreadTextEncoding(), convertFlags);
PushString(aStr);
2000-09-18 23:16:46 +00:00
}
}
/* #i70213# fullwidth/halfwidth conversion provided by
* Takashi Nakamoto <bluedwarf@ooo>
* erAck: added Excel compatibility conversions as seen in issue's test case. */
static ::rtl::OUString lcl_convertIntoHalfWidth( const ::rtl::OUString & rStr )
{
CWS-TOOLING: integrate CWS chart35 2009-02-20 12:33:54 +0100 nn r268312 : correct line ends 2009-01-19 12:50:45 +0100 iha r266491 : #i91800# style:text-position='0' is wrongly imported 2009-01-19 11:59:09 +0100 iha r266486 : #i91037# Position of Datalabels in 3D Bar-Charts are crossing the edge 2009-01-16 16:45:50 +0100 iha r266435 : #i93802# clockwise does not work on solars sparc 2009-01-16 13:23:37 +0100 iha r266414 : #i91037# Position of Datalabels in 3D Bar-Charts are crossing the edge 2009-01-15 14:09:27 +0100 iha r266370 : #i98102# checkbox show equation should not be checked initially 2009-01-14 17:41:33 +0100 iha r266323 : #i97133# #i97318# chart type is not detected correctly in case of invisible series 2009-01-14 16:23:06 +0100 iha r266316 : #i97133# #i97318# chart type is not detected correctly in case of invisible series 2009-01-14 13:43:38 +0100 iha r266298 : #i84417# Unable to edit existing chart title with clipboard 2009-01-14 13:43:04 +0100 iha r266297 : #i84417# Unable to edit existing chart title with IME 2009-01-14 13:14:15 +0100 dr r266293 : do not set CharEscapement property if not needed 2009-01-14 00:48:46 +0100 er r266262 : #i81383# changed ASC and JIS to use transliteration provided by i18n transliteration; patch from <bluedwarf> 2009-01-14 00:28:06 +0100 er r266261 : #i97536# silence gcc's unbracketed && || warnings 2009-01-13 22:43:45 +0100 er r266259 : #i97905# corrected IndexKey order 2009-01-13 20:36:15 +0100 er r266254 : #i97905# add SKK/EUR conversion (plus MTL/EUR and CYP/EUR) 2009-01-13 20:31:17 +0100 er r266253 : #i97905# updated locale data; contributed by <brko> 2009-01-13 11:57:08 +0100 iha r266204 : #i84103# cannot set data in xy diagram in draw 2009-01-12 20:29:37 +0100 nn r266181 : #i97680# GetStylesContainer: handle non-available style family 2009-01-12 19:53:19 +0100 nn r266180 : #i98000# don't get initial zoom value via SfxViewFrame::Current 2009-01-12 16:11:19 +0100 iha r266166 : #i71686# XY charts without valid x values are not imported correctly from Excel 2009-01-09 17:10:20 +0100 iha r266102 : #i95051# truncated asian strings on scale tabpage 2009-01-09 15:58:46 +0100 iha r266094 : #i89430# truncated asian strings in smooth lines dialog 2009-01-09 13:09:14 +0100 iha r266076 : #i94813# importing pie chart with multiline categories crashes
2009-03-03 11:39:43 +00:00
static bool bFirstASCCall = true;
static utl::TransliterationWrapper aTrans( ::comphelper::getProcessComponentContext(), 0 );
CWS-TOOLING: integrate CWS chart35 2009-02-20 12:33:54 +0100 nn r268312 : correct line ends 2009-01-19 12:50:45 +0100 iha r266491 : #i91800# style:text-position='0' is wrongly imported 2009-01-19 11:59:09 +0100 iha r266486 : #i91037# Position of Datalabels in 3D Bar-Charts are crossing the edge 2009-01-16 16:45:50 +0100 iha r266435 : #i93802# clockwise does not work on solars sparc 2009-01-16 13:23:37 +0100 iha r266414 : #i91037# Position of Datalabels in 3D Bar-Charts are crossing the edge 2009-01-15 14:09:27 +0100 iha r266370 : #i98102# checkbox show equation should not be checked initially 2009-01-14 17:41:33 +0100 iha r266323 : #i97133# #i97318# chart type is not detected correctly in case of invisible series 2009-01-14 16:23:06 +0100 iha r266316 : #i97133# #i97318# chart type is not detected correctly in case of invisible series 2009-01-14 13:43:38 +0100 iha r266298 : #i84417# Unable to edit existing chart title with clipboard 2009-01-14 13:43:04 +0100 iha r266297 : #i84417# Unable to edit existing chart title with IME 2009-01-14 13:14:15 +0100 dr r266293 : do not set CharEscapement property if not needed 2009-01-14 00:48:46 +0100 er r266262 : #i81383# changed ASC and JIS to use transliteration provided by i18n transliteration; patch from <bluedwarf> 2009-01-14 00:28:06 +0100 er r266261 : #i97536# silence gcc's unbracketed && || warnings 2009-01-13 22:43:45 +0100 er r266259 : #i97905# corrected IndexKey order 2009-01-13 20:36:15 +0100 er r266254 : #i97905# add SKK/EUR conversion (plus MTL/EUR and CYP/EUR) 2009-01-13 20:31:17 +0100 er r266253 : #i97905# updated locale data; contributed by <brko> 2009-01-13 11:57:08 +0100 iha r266204 : #i84103# cannot set data in xy diagram in draw 2009-01-12 20:29:37 +0100 nn r266181 : #i97680# GetStylesContainer: handle non-available style family 2009-01-12 19:53:19 +0100 nn r266180 : #i98000# don't get initial zoom value via SfxViewFrame::Current 2009-01-12 16:11:19 +0100 iha r266166 : #i71686# XY charts without valid x values are not imported correctly from Excel 2009-01-09 17:10:20 +0100 iha r266102 : #i95051# truncated asian strings on scale tabpage 2009-01-09 15:58:46 +0100 iha r266094 : #i89430# truncated asian strings in smooth lines dialog 2009-01-09 13:09:14 +0100 iha r266076 : #i94813# importing pie chart with multiline categories crashes
2009-03-03 11:39:43 +00:00
if( bFirstASCCall )
{
2010-11-11 10:10:14 +00:00
aTrans.loadModuleByImplName( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "FULLWIDTH_HALFWIDTH_LIKE_ASC" )), LANGUAGE_SYSTEM );
CWS-TOOLING: integrate CWS chart35 2009-02-20 12:33:54 +0100 nn r268312 : correct line ends 2009-01-19 12:50:45 +0100 iha r266491 : #i91800# style:text-position='0' is wrongly imported 2009-01-19 11:59:09 +0100 iha r266486 : #i91037# Position of Datalabels in 3D Bar-Charts are crossing the edge 2009-01-16 16:45:50 +0100 iha r266435 : #i93802# clockwise does not work on solars sparc 2009-01-16 13:23:37 +0100 iha r266414 : #i91037# Position of Datalabels in 3D Bar-Charts are crossing the edge 2009-01-15 14:09:27 +0100 iha r266370 : #i98102# checkbox show equation should not be checked initially 2009-01-14 17:41:33 +0100 iha r266323 : #i97133# #i97318# chart type is not detected correctly in case of invisible series 2009-01-14 16:23:06 +0100 iha r266316 : #i97133# #i97318# chart type is not detected correctly in case of invisible series 2009-01-14 13:43:38 +0100 iha r266298 : #i84417# Unable to edit existing chart title with clipboard 2009-01-14 13:43:04 +0100 iha r266297 : #i84417# Unable to edit existing chart title with IME 2009-01-14 13:14:15 +0100 dr r266293 : do not set CharEscapement property if not needed 2009-01-14 00:48:46 +0100 er r266262 : #i81383# changed ASC and JIS to use transliteration provided by i18n transliteration; patch from <bluedwarf> 2009-01-14 00:28:06 +0100 er r266261 : #i97536# silence gcc's unbracketed && || warnings 2009-01-13 22:43:45 +0100 er r266259 : #i97905# corrected IndexKey order 2009-01-13 20:36:15 +0100 er r266254 : #i97905# add SKK/EUR conversion (plus MTL/EUR and CYP/EUR) 2009-01-13 20:31:17 +0100 er r266253 : #i97905# updated locale data; contributed by <brko> 2009-01-13 11:57:08 +0100 iha r266204 : #i84103# cannot set data in xy diagram in draw 2009-01-12 20:29:37 +0100 nn r266181 : #i97680# GetStylesContainer: handle non-available style family 2009-01-12 19:53:19 +0100 nn r266180 : #i98000# don't get initial zoom value via SfxViewFrame::Current 2009-01-12 16:11:19 +0100 iha r266166 : #i71686# XY charts without valid x values are not imported correctly from Excel 2009-01-09 17:10:20 +0100 iha r266102 : #i95051# truncated asian strings on scale tabpage 2009-01-09 15:58:46 +0100 iha r266094 : #i89430# truncated asian strings in smooth lines dialog 2009-01-09 13:09:14 +0100 iha r266076 : #i94813# importing pie chart with multiline categories crashes
2009-03-03 11:39:43 +00:00
bFirstASCCall = false;
}
return aTrans.transliterate( rStr, 0, sal_uInt16( rStr.getLength() ), NULL );
}
static ::rtl::OUString lcl_convertIntoFullWidth( const ::rtl::OUString & rStr )
{
CWS-TOOLING: integrate CWS chart35 2009-02-20 12:33:54 +0100 nn r268312 : correct line ends 2009-01-19 12:50:45 +0100 iha r266491 : #i91800# style:text-position='0' is wrongly imported 2009-01-19 11:59:09 +0100 iha r266486 : #i91037# Position of Datalabels in 3D Bar-Charts are crossing the edge 2009-01-16 16:45:50 +0100 iha r266435 : #i93802# clockwise does not work on solars sparc 2009-01-16 13:23:37 +0100 iha r266414 : #i91037# Position of Datalabels in 3D Bar-Charts are crossing the edge 2009-01-15 14:09:27 +0100 iha r266370 : #i98102# checkbox show equation should not be checked initially 2009-01-14 17:41:33 +0100 iha r266323 : #i97133# #i97318# chart type is not detected correctly in case of invisible series 2009-01-14 16:23:06 +0100 iha r266316 : #i97133# #i97318# chart type is not detected correctly in case of invisible series 2009-01-14 13:43:38 +0100 iha r266298 : #i84417# Unable to edit existing chart title with clipboard 2009-01-14 13:43:04 +0100 iha r266297 : #i84417# Unable to edit existing chart title with IME 2009-01-14 13:14:15 +0100 dr r266293 : do not set CharEscapement property if not needed 2009-01-14 00:48:46 +0100 er r266262 : #i81383# changed ASC and JIS to use transliteration provided by i18n transliteration; patch from <bluedwarf> 2009-01-14 00:28:06 +0100 er r266261 : #i97536# silence gcc's unbracketed && || warnings 2009-01-13 22:43:45 +0100 er r266259 : #i97905# corrected IndexKey order 2009-01-13 20:36:15 +0100 er r266254 : #i97905# add SKK/EUR conversion (plus MTL/EUR and CYP/EUR) 2009-01-13 20:31:17 +0100 er r266253 : #i97905# updated locale data; contributed by <brko> 2009-01-13 11:57:08 +0100 iha r266204 : #i84103# cannot set data in xy diagram in draw 2009-01-12 20:29:37 +0100 nn r266181 : #i97680# GetStylesContainer: handle non-available style family 2009-01-12 19:53:19 +0100 nn r266180 : #i98000# don't get initial zoom value via SfxViewFrame::Current 2009-01-12 16:11:19 +0100 iha r266166 : #i71686# XY charts without valid x values are not imported correctly from Excel 2009-01-09 17:10:20 +0100 iha r266102 : #i95051# truncated asian strings on scale tabpage 2009-01-09 15:58:46 +0100 iha r266094 : #i89430# truncated asian strings in smooth lines dialog 2009-01-09 13:09:14 +0100 iha r266076 : #i94813# importing pie chart with multiline categories crashes
2009-03-03 11:39:43 +00:00
static bool bFirstJISCall = true;
static utl::TransliterationWrapper aTrans( ::comphelper::getProcessComponentContext(), 0 );
CWS-TOOLING: integrate CWS chart35 2009-02-20 12:33:54 +0100 nn r268312 : correct line ends 2009-01-19 12:50:45 +0100 iha r266491 : #i91800# style:text-position='0' is wrongly imported 2009-01-19 11:59:09 +0100 iha r266486 : #i91037# Position of Datalabels in 3D Bar-Charts are crossing the edge 2009-01-16 16:45:50 +0100 iha r266435 : #i93802# clockwise does not work on solars sparc 2009-01-16 13:23:37 +0100 iha r266414 : #i91037# Position of Datalabels in 3D Bar-Charts are crossing the edge 2009-01-15 14:09:27 +0100 iha r266370 : #i98102# checkbox show equation should not be checked initially 2009-01-14 17:41:33 +0100 iha r266323 : #i97133# #i97318# chart type is not detected correctly in case of invisible series 2009-01-14 16:23:06 +0100 iha r266316 : #i97133# #i97318# chart type is not detected correctly in case of invisible series 2009-01-14 13:43:38 +0100 iha r266298 : #i84417# Unable to edit existing chart title with clipboard 2009-01-14 13:43:04 +0100 iha r266297 : #i84417# Unable to edit existing chart title with IME 2009-01-14 13:14:15 +0100 dr r266293 : do not set CharEscapement property if not needed 2009-01-14 00:48:46 +0100 er r266262 : #i81383# changed ASC and JIS to use transliteration provided by i18n transliteration; patch from <bluedwarf> 2009-01-14 00:28:06 +0100 er r266261 : #i97536# silence gcc's unbracketed && || warnings 2009-01-13 22:43:45 +0100 er r266259 : #i97905# corrected IndexKey order 2009-01-13 20:36:15 +0100 er r266254 : #i97905# add SKK/EUR conversion (plus MTL/EUR and CYP/EUR) 2009-01-13 20:31:17 +0100 er r266253 : #i97905# updated locale data; contributed by <brko> 2009-01-13 11:57:08 +0100 iha r266204 : #i84103# cannot set data in xy diagram in draw 2009-01-12 20:29:37 +0100 nn r266181 : #i97680# GetStylesContainer: handle non-available style family 2009-01-12 19:53:19 +0100 nn r266180 : #i98000# don't get initial zoom value via SfxViewFrame::Current 2009-01-12 16:11:19 +0100 iha r266166 : #i71686# XY charts without valid x values are not imported correctly from Excel 2009-01-09 17:10:20 +0100 iha r266102 : #i95051# truncated asian strings on scale tabpage 2009-01-09 15:58:46 +0100 iha r266094 : #i89430# truncated asian strings in smooth lines dialog 2009-01-09 13:09:14 +0100 iha r266076 : #i94813# importing pie chart with multiline categories crashes
2009-03-03 11:39:43 +00:00
if( bFirstJISCall )
{
2010-11-11 10:10:14 +00:00
aTrans.loadModuleByImplName( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "HALFWIDTH_FULLWIDTH_LIKE_JIS" )), LANGUAGE_SYSTEM );
CWS-TOOLING: integrate CWS chart35 2009-02-20 12:33:54 +0100 nn r268312 : correct line ends 2009-01-19 12:50:45 +0100 iha r266491 : #i91800# style:text-position='0' is wrongly imported 2009-01-19 11:59:09 +0100 iha r266486 : #i91037# Position of Datalabels in 3D Bar-Charts are crossing the edge 2009-01-16 16:45:50 +0100 iha r266435 : #i93802# clockwise does not work on solars sparc 2009-01-16 13:23:37 +0100 iha r266414 : #i91037# Position of Datalabels in 3D Bar-Charts are crossing the edge 2009-01-15 14:09:27 +0100 iha r266370 : #i98102# checkbox show equation should not be checked initially 2009-01-14 17:41:33 +0100 iha r266323 : #i97133# #i97318# chart type is not detected correctly in case of invisible series 2009-01-14 16:23:06 +0100 iha r266316 : #i97133# #i97318# chart type is not detected correctly in case of invisible series 2009-01-14 13:43:38 +0100 iha r266298 : #i84417# Unable to edit existing chart title with clipboard 2009-01-14 13:43:04 +0100 iha r266297 : #i84417# Unable to edit existing chart title with IME 2009-01-14 13:14:15 +0100 dr r266293 : do not set CharEscapement property if not needed 2009-01-14 00:48:46 +0100 er r266262 : #i81383# changed ASC and JIS to use transliteration provided by i18n transliteration; patch from <bluedwarf> 2009-01-14 00:28:06 +0100 er r266261 : #i97536# silence gcc's unbracketed && || warnings 2009-01-13 22:43:45 +0100 er r266259 : #i97905# corrected IndexKey order 2009-01-13 20:36:15 +0100 er r266254 : #i97905# add SKK/EUR conversion (plus MTL/EUR and CYP/EUR) 2009-01-13 20:31:17 +0100 er r266253 : #i97905# updated locale data; contributed by <brko> 2009-01-13 11:57:08 +0100 iha r266204 : #i84103# cannot set data in xy diagram in draw 2009-01-12 20:29:37 +0100 nn r266181 : #i97680# GetStylesContainer: handle non-available style family 2009-01-12 19:53:19 +0100 nn r266180 : #i98000# don't get initial zoom value via SfxViewFrame::Current 2009-01-12 16:11:19 +0100 iha r266166 : #i71686# XY charts without valid x values are not imported correctly from Excel 2009-01-09 17:10:20 +0100 iha r266102 : #i95051# truncated asian strings on scale tabpage 2009-01-09 15:58:46 +0100 iha r266094 : #i89430# truncated asian strings in smooth lines dialog 2009-01-09 13:09:14 +0100 iha r266076 : #i94813# importing pie chart with multiline categories crashes
2009-03-03 11:39:43 +00:00
bFirstJISCall = false;
}
return aTrans.transliterate( rStr, 0, sal_uInt16( rStr.getLength() ), NULL );
}
/* ODFF:
* Summary: Converts half-width to full-width ASCII and katakana characters.
* Semantics: Conversion is done for half-width ASCII and katakana characters,
* other characters are simply copied from T to the result. This is the
* complementary function to ASC.
* For references regarding halfwidth and fullwidth characters see
* http://www.unicode.org/reports/tr11/
* http://www.unicode.org/charts/charindex2.html#H
* http://www.unicode.org/charts/charindex2.html#F
*/
void ScInterpreter::ScJis()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScJis" );
if (MustHaveParamCount( GetByte(), 1))
PushString( lcl_convertIntoFullWidth( GetString()));
}
/* ODFF:
* Summary: Converts full-width to half-width ASCII and katakana characters.
* Semantics: Conversion is done for full-width ASCII and katakana characters,
* other characters are simply copied from T to the result. This is the
* complementary function to JIS.
*/
void ScInterpreter::ScAsc()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScAsc" );
if (MustHaveParamCount( GetByte(), 1))
PushString( lcl_convertIntoHalfWidth( GetString()));
}
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
void ScInterpreter::ScUnicode()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScUnicode" );
if ( MustHaveParamCount( GetByte(), 1 ) )
{
const rtl::OUString& rStr = GetString();
if (rStr.isEmpty())
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
PushIllegalParameter();
else
{
sal_Int32 i = 0;
PushDouble( rStr.iterateCodePoints(&i) );
}
}
}
void ScInterpreter::ScUnichar()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScUnichar" );
if ( MustHaveParamCount( GetByte(), 1 ) )
{
double dVal = ::rtl::math::approxFloor( GetDouble() );
if ((dVal < 0x000000) || (dVal > 0x10FFFF))
PushIllegalArgument();
else
{
sal_uInt32 nCodePoint = static_cast<sal_uInt32>( dVal );
rtl::OUString aStr( &nCodePoint, 1 );
PushString( aStr );
}
}
}
2011-08-14 16:10:05 +02:00
void ScInterpreter::ScMin( bool bTextAsZero )
2000-09-18 23:16:46 +00:00
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScMin" );
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
short nParamCount = GetByte();
if (!MustHaveParamCountMin( nParamCount, 1))
return;
double nMin = ::std::numeric_limits<double>::max();
2000-09-18 23:16:46 +00:00
double nVal = 0.0;
ScAddress aAdr;
ScRange aRange;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
size_t nRefInList = 0;
while (nParamCount-- > 0)
2000-09-18 23:16:46 +00:00
{
switch (GetStackType())
{
case svDouble :
{
nVal = GetDouble();
if (nMin > nVal) nMin = nVal;
nFuncFmtType = NUMBERFORMAT_NUMBER;
}
break;
case svSingleRef :
{
PopSingleRef( aAdr );
ScBaseCell* pCell = GetCell( aAdr );
if (HasCellValueData(pCell))
{
nVal = GetCellValue( aAdr, pCell );
CurFmtToFuncFmt();
if (nMin > nVal) nMin = nVal;
}
else if ( bTextAsZero && HasCellStringData( pCell ) )
{
if ( nMin > 0.0 )
nMin = 0.0;
}
}
break;
case svDoubleRef :
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
case svRefList :
2000-09-18 23:16:46 +00:00
{
sal_uInt16 nErr = 0;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PopDoubleRef( aRange, nParamCount, nRefInList);
2000-09-18 23:16:46 +00:00
ScValueIterator aValIter( pDok, aRange, glSubTotal, bTextAsZero );
if (aValIter.GetFirst(nVal, nErr))
{
if (nMin > nVal)
nMin = nVal;
aValIter.GetCurNumFmtInfo( nFuncFmtType, nFuncFmtIndex );
while ((nErr == 0) && aValIter.GetNext(nVal, nErr))
{
if (nMin > nVal)
nMin = nVal;
}
SetError(nErr);
}
}
break;
case svMatrix :
case svExternalSingleRef:
case svExternalDoubleRef:
2000-09-18 23:16:46 +00:00
{
ScMatrixRef pMat = GetMatrix();
2000-09-18 23:16:46 +00:00
if (pMat)
{
SCSIZE nC, nR;
2000-09-18 23:16:46 +00:00
nFuncFmtType = NUMBERFORMAT_NUMBER;
pMat->GetDimensions(nC, nR);
if (pMat->IsNumeric())
{
for (SCSIZE nMatCol = 0; nMatCol < nC; nMatCol++)
for (SCSIZE nMatRow = 0; nMatRow < nR; nMatRow++)
2000-09-18 23:16:46 +00:00
{
nVal = pMat->GetDouble(nMatCol,nMatRow);
2000-09-18 23:16:46 +00:00
if (nMin > nVal) nMin = nVal;
}
}
else
{
for (SCSIZE nMatCol = 0; nMatCol < nC; nMatCol++)
2000-09-18 23:16:46 +00:00
{
for (SCSIZE nMatRow = 0; nMatRow < nR; nMatRow++)
2000-09-18 23:16:46 +00:00
{
if (!pMat->IsString(nMatCol,nMatRow))
2000-09-18 23:16:46 +00:00
{
nVal = pMat->GetDouble(nMatCol,nMatRow);
2000-09-18 23:16:46 +00:00
if (nMin > nVal) nMin = nVal;
}
else if ( bTextAsZero )
{
if ( nMin > 0.0 )
nMin = 0.0;
}
}
}
}
}
}
break;
case svString :
{
Pop();
if ( bTextAsZero )
{
if ( nMin > 0.0 )
nMin = 0.0;
}
else
SetError(errIllegalParameter);
}
break;
default :
Pop();
SetError(errIllegalParameter);
}
}
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
if ( nVal < nMin )
PushDouble(0.0);
2000-09-18 23:16:46 +00:00
else
PushDouble(nMin);
}
2011-08-14 16:10:05 +02:00
void ScInterpreter::ScMax( bool bTextAsZero )
2000-09-18 23:16:46 +00:00
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScMax" );
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
short nParamCount = GetByte();
if (!MustHaveParamCountMin( nParamCount, 1))
return;
double nMax = -(::std::numeric_limits<double>::max());
2000-09-18 23:16:46 +00:00
double nVal = 0.0;
ScAddress aAdr;
ScRange aRange;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
size_t nRefInList = 0;
while (nParamCount-- > 0)
2000-09-18 23:16:46 +00:00
{
switch (GetStackType())
{
case svDouble :
{
nVal = GetDouble();
if (nMax < nVal) nMax = nVal;
nFuncFmtType = NUMBERFORMAT_NUMBER;
}
break;
case svSingleRef :
{
PopSingleRef( aAdr );
ScBaseCell* pCell = GetCell( aAdr );
if (HasCellValueData(pCell))
{
nVal = GetCellValue( aAdr, pCell );
CurFmtToFuncFmt();
if (nMax < nVal) nMax = nVal;
}
else if ( bTextAsZero && HasCellStringData( pCell ) )
{
if ( nMax < 0.0 )
nMax = 0.0;
}
}
break;
case svDoubleRef :
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
case svRefList :
2000-09-18 23:16:46 +00:00
{
sal_uInt16 nErr = 0;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PopDoubleRef( aRange, nParamCount, nRefInList);
2000-09-18 23:16:46 +00:00
ScValueIterator aValIter( pDok, aRange, glSubTotal, bTextAsZero );
if (aValIter.GetFirst(nVal, nErr))
{
if (nMax < nVal)
nMax = nVal;
aValIter.GetCurNumFmtInfo( nFuncFmtType, nFuncFmtIndex );
while ((nErr == 0) && aValIter.GetNext(nVal, nErr))
{
if (nMax < nVal)
nMax = nVal;
}
SetError(nErr);
}
}
break;
case svMatrix :
case svExternalSingleRef:
case svExternalDoubleRef:
2000-09-18 23:16:46 +00:00
{
ScMatrixRef pMat = GetMatrix();
2000-09-18 23:16:46 +00:00
if (pMat)
{
nFuncFmtType = NUMBERFORMAT_NUMBER;
SCSIZE nC, nR;
2000-09-18 23:16:46 +00:00
pMat->GetDimensions(nC, nR);
if (pMat->IsNumeric())
{
for (SCSIZE nMatCol = 0; nMatCol < nC; nMatCol++)
for (SCSIZE nMatRow = 0; nMatRow < nR; nMatRow++)
2000-09-18 23:16:46 +00:00
{
nVal = pMat->GetDouble(nMatCol,nMatRow);
2000-09-18 23:16:46 +00:00
if (nMax < nVal) nMax = nVal;
}
}
else
{
for (SCSIZE nMatCol = 0; nMatCol < nC; nMatCol++)
2000-09-18 23:16:46 +00:00
{
for (SCSIZE nMatRow = 0; nMatRow < nR; nMatRow++)
2000-09-18 23:16:46 +00:00
{
if (!pMat->IsString(nMatCol,nMatRow))
2000-09-18 23:16:46 +00:00
{
nVal = pMat->GetDouble(nMatCol,nMatRow);
2000-09-18 23:16:46 +00:00
if (nMax < nVal) nMax = nVal;
}
else if ( bTextAsZero )
{
if ( nMax < 0.0 )
nMax = 0.0;
}
}
}
}
}
}
break;
case svString :
{
Pop();
if ( bTextAsZero )
{
if ( nMax < 0.0 )
nMax = 0.0;
}
else
SetError(errIllegalParameter);
}
break;
default :
Pop();
SetError(errIllegalParameter);
}
}
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
if ( nVal > nMax )
PushDouble(0.0);
2000-09-18 23:16:46 +00:00
else
PushDouble(nMax);
}
namespace {
void IterateMatrix(
2011-08-14 16:10:05 +02:00
const ScMatrixRef& pMat, ScIterFunc eFunc, bool bTextAsZero,
sal_uLong& rCount, short& rFuncFmtType, double& fRes, double& fMem, bool& bNull)
{
if (!pMat)
return;
rFuncFmtType = NUMBERFORMAT_NUMBER;
switch (eFunc)
2010-12-17 16:43:18 -05:00
{
case ifAVERAGE:
case ifSUM:
{
ScMatrix::IterateResult aRes = pMat->Sum(bTextAsZero);
if (bNull)
{
bNull = false;
fMem = aRes.mfFirst;
fRes += aRes.mfRest;
}
else
fRes += aRes.mfFirst + aRes.mfRest;
rCount += aRes.mnCount;
}
break;
case ifCOUNT:
rCount += pMat->Count(bTextAsZero);
break;
case ifCOUNT2:
rCount += pMat->Count(true);
break;
case ifPRODUCT:
{
ScMatrix::IterateResult aRes = pMat->Product(bTextAsZero);
fRes *= aRes.mfRest;
rCount += aRes.mnCount;
}
break;
case ifSUMSQ:
{
ScMatrix::IterateResult aRes = pMat->SumSquare(bTextAsZero);
fRes += aRes.mfRest;
rCount += aRes.mnCount;
}
break;
default:
;
}
}
}
2000-09-18 23:16:46 +00:00
2011-08-14 16:10:05 +02:00
double ScInterpreter::IterateParameters( ScIterFunc eFunc, bool bTextAsZero )
2000-09-18 23:16:46 +00:00
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::IterateParameters" );
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
short nParamCount = GetByte();
2000-09-18 23:16:46 +00:00
double fRes = ( eFunc == ifPRODUCT ) ? 1.0 : 0.0;
double fVal = 0.0;
2010-12-17 16:43:18 -05:00
double fMem = 0.0; // first numeric value.
bool bNull = true;
sal_uLong nCount = 0;
2000-09-18 23:16:46 +00:00
ScAddress aAdr;
ScRange aRange;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
size_t nRefInList = 0;
if ( nGlobalError && ( eFunc == ifCOUNT2 || eFunc == ifCOUNT ) )
nGlobalError = 0;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
while (nParamCount-- > 0)
2000-09-18 23:16:46 +00:00
{
switch (GetStackType())
{
case svString:
{
if( eFunc == ifCOUNT )
{
String aStr( PopString() );
sal_uInt32 nFIndex = 0; // damit default Land/Spr.
2000-09-18 23:16:46 +00:00
if ( bTextAsZero || pFormatter->IsNumberFormat(aStr, nFIndex, fVal))
nCount++;
}
else
{
switch ( eFunc )
{
case ifAVERAGE:
case ifSUM:
case ifSUMSQ:
case ifPRODUCT:
{
if ( bTextAsZero )
{
Pop();
nCount++;
if ( eFunc == ifPRODUCT )
fRes = 0.0;
}
else
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
while (nParamCount-- > 0)
2000-09-18 23:16:46 +00:00
Pop();
SetError( errNoValue );
}
}
break;
default:
Pop();
nCount++;
}
}
}
break;
case svDouble :
fVal = GetDouble();
nCount++;
switch( eFunc )
{
case ifAVERAGE:
case ifSUM:
if ( bNull && fVal != 0.0 )
{
2010-12-17 16:43:18 -05:00
bNull = false;
2000-09-18 23:16:46 +00:00
fMem = fVal;
}
else
fRes += fVal;
break;
case ifSUMSQ: fRes += fVal * fVal; break;
case ifPRODUCT: fRes *= fVal; break;
default: ; // nothing
2000-09-18 23:16:46 +00:00
}
nFuncFmtType = NUMBERFORMAT_NUMBER;
break;
case svExternalSingleRef:
{
ScExternalRefCache::TokenRef pToken;
ScExternalRefCache::CellFormat aFmt;
PopExternalSingleRef(pToken, &aFmt);
if (nGlobalError && (eFunc == ifCOUNT2 || eFunc == ifCOUNT))
{
nGlobalError = 0;
if ( eFunc == ifCOUNT2 )
++nCount;
break;
}
if (!pToken)
break;
StackVar eType = pToken->GetType();
if (eFunc == ifCOUNT2)
{
if (eType != formula::svEmptyCell)
nCount++;
if (nGlobalError)
nGlobalError = 0;
}
else if (eType == formula::svDouble)
{
nCount++;
fVal = pToken->GetDouble();
if (aFmt.mbIsSet)
{
nFuncFmtType = aFmt.mnType;
nFuncFmtIndex = aFmt.mnIndex;
}
switch( eFunc )
{
case ifAVERAGE:
case ifSUM:
if ( bNull && fVal != 0.0 )
{
2010-12-17 16:43:18 -05:00
bNull = false;
fMem = fVal;
}
else
fRes += fVal;
break;
case ifSUMSQ: fRes += fVal * fVal; break;
case ifPRODUCT: fRes *= fVal; break;
case ifCOUNT:
if ( nGlobalError )
{
nGlobalError = 0;
nCount--;
}
break;
default: ; // nothing
}
}
else if (bTextAsZero && eType == formula::svString)
{
nCount++;
if ( eFunc == ifPRODUCT )
fRes = 0.0;
}
}
break;
2000-09-18 23:16:46 +00:00
case svSingleRef :
{
PopSingleRef( aAdr );
if ( nGlobalError && ( eFunc == ifCOUNT2 || eFunc == ifCOUNT ) )
{
nGlobalError = 0;
if ( eFunc == ifCOUNT2 )
++nCount;
break;
}
2000-09-18 23:16:46 +00:00
ScBaseCell* pCell = GetCell( aAdr );
if ( pCell )
{
if( eFunc == ifCOUNT2 )
{
CellType eCellType = pCell->GetCellType();
if (eCellType != CELLTYPE_NONE && eCellType != CELLTYPE_NOTE)
nCount++;
if ( nGlobalError )
nGlobalError = 0;
2000-09-18 23:16:46 +00:00
}
else if ( pCell->HasValueData() )
{
nCount++;
fVal = GetCellValue( aAdr, pCell );
CurFmtToFuncFmt();
switch( eFunc )
{
case ifAVERAGE:
case ifSUM:
if ( bNull && fVal != 0.0 )
{
2010-12-17 16:43:18 -05:00
bNull = false;
2000-09-18 23:16:46 +00:00
fMem = fVal;
}
else
fRes += fVal;
break;
case ifSUMSQ: fRes += fVal * fVal; break;
case ifPRODUCT: fRes *= fVal; break;
case ifCOUNT:
if ( nGlobalError )
{
nGlobalError = 0;
nCount--;
}
break;
default: ; // nothing
2000-09-18 23:16:46 +00:00
}
}
else if ( bTextAsZero && pCell->HasStringData() )
{
nCount++;
if ( eFunc == ifPRODUCT )
fRes = 0.0;
}
}
}
break;
case svDoubleRef :
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
case svRefList :
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PopDoubleRef( aRange, nParamCount, nRefInList);
if ( nGlobalError && ( eFunc == ifCOUNT2 || eFunc == ifCOUNT ) )
{
nGlobalError = 0;
if ( eFunc == ifCOUNT2 )
++nCount;
break;
}
2000-09-18 23:16:46 +00:00
if( eFunc == ifCOUNT2 )
{
ScBaseCell* pCell;
ScCellIterator aIter( pDok, aRange, glSubTotal );
if ( (pCell = aIter.GetFirst()) != NULL )
2000-09-18 23:16:46 +00:00
{
do
{
CellType eType = pCell->GetCellType();
if( eType != CELLTYPE_NONE && eType != CELLTYPE_NOTE )
nCount++;
}
while ( (pCell = aIter.GetNext()) != NULL );
2000-09-18 23:16:46 +00:00
}
if ( nGlobalError )
nGlobalError = 0;
2000-09-18 23:16:46 +00:00
}
else
{
ScValueIterator aValIter( pDok, aRange, glSubTotal, bTextAsZero );
sal_uInt16 nErr = 0;
2000-09-18 23:16:46 +00:00
if (aValIter.GetFirst(fVal, nErr))
{
// placed the loop on the inside for performance reasons:
2000-09-18 23:16:46 +00:00
aValIter.GetCurNumFmtInfo( nFuncFmtType, nFuncFmtIndex );
switch( eFunc )
{
case ifAVERAGE:
case ifSUM:
do
{
SetError(nErr);
if ( bNull && fVal != 0.0 )
{
2010-12-17 16:43:18 -05:00
bNull = false;
2000-09-18 23:16:46 +00:00
fMem = fVal;
}
else
fRes += fVal;
nCount++;
}
while (aValIter.GetNext(fVal, nErr));
break;
case ifSUMSQ:
do
{
SetError(nErr);
fRes += fVal * fVal;
nCount++;
}
while (aValIter.GetNext(fVal, nErr));
break;
case ifPRODUCT:
do
{
SetError(nErr);
fRes *= fVal;
nCount++;
}
while (aValIter.GetNext(fVal, nErr));
break;
case ifCOUNT:
2000-09-18 23:16:46 +00:00
do
{
if ( !nErr )
nCount++;
2000-09-18 23:16:46 +00:00
}
while (aValIter.GetNext(fVal, nErr));
break;
default: ; // nothing
2000-09-18 23:16:46 +00:00
}
SetError( nErr );
}
}
}
break;
case svExternalDoubleRef:
{
ScMatrixRef pMat;
PopExternalDoubleRef(pMat);
if (nGlobalError)
break;
IterateMatrix(pMat, eFunc, bTextAsZero, nCount, nFuncFmtType, fRes, fMem, bNull);
}
break;
2000-09-18 23:16:46 +00:00
case svMatrix :
{
ScMatrixRef pMat = PopMatrix();
IterateMatrix(pMat, eFunc, bTextAsZero, nCount, nFuncFmtType, fRes, fMem, bNull);
2000-09-18 23:16:46 +00:00
}
break;
case svError:
{
PopError();
if ( eFunc == ifCOUNT )
{
nGlobalError = 0;
}
else if ( eFunc == ifCOUNT2 )
{
nCount++;
nGlobalError = 0;
}
}
break;
2000-09-18 23:16:46 +00:00
default :
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
while (nParamCount-- > 0)
PopError();
2000-09-18 23:16:46 +00:00
SetError(errIllegalParameter);
}
}
switch( eFunc )
{
case ifSUM: fRes = ::rtl::math::approxAdd( fRes, fMem ); break;
case ifAVERAGE: fRes = div(::rtl::math::approxAdd( fRes, fMem ), nCount); break;
2000-09-18 23:16:46 +00:00
case ifCOUNT2:
case ifCOUNT: fRes = nCount; break;
case ifPRODUCT: if ( !nCount ) fRes = 0.0; break;
default: ; // nothing
2000-09-18 23:16:46 +00:00
}
2011-08-14 16:10:05 +02:00
// Bei Summen etc. macht ein bool-Ergebnis keinen Sinn
2000-09-18 23:16:46 +00:00
// und Anzahl ist immer Number (#38345#)
if( eFunc == ifCOUNT || nFuncFmtType == NUMBERFORMAT_LOGICAL )
nFuncFmtType = NUMBERFORMAT_NUMBER;
return fRes;
}
void ScInterpreter::ScSumSQ()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSumSQ" );
2000-09-18 23:16:46 +00:00
PushDouble( IterateParameters( ifSUMSQ ) );
}
void ScInterpreter::ScSum()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSum" );
2000-09-18 23:16:46 +00:00
PushDouble( IterateParameters( ifSUM ) );
}
void ScInterpreter::ScProduct()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScProduct" );
2000-09-18 23:16:46 +00:00
PushDouble( IterateParameters( ifPRODUCT ) );
}
2011-08-14 16:10:05 +02:00
void ScInterpreter::ScAverage( bool bTextAsZero )
2000-09-18 23:16:46 +00:00
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScAverage" );
2000-09-18 23:16:46 +00:00
PushDouble( IterateParameters( ifAVERAGE, bTextAsZero ) );
}
void ScInterpreter::ScCount()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScCount" );
2000-09-18 23:16:46 +00:00
PushDouble( IterateParameters( ifCOUNT ) );
}
void ScInterpreter::ScCount2()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScCount2" );
2000-09-18 23:16:46 +00:00
PushDouble( IterateParameters( ifCOUNT2 ) );
}
void ScInterpreter::GetStVarParams( double& rVal, double& rValCount,
2011-08-14 16:10:05 +02:00
bool bTextAsZero )
2000-09-18 23:16:46 +00:00
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::GetStVarParams" );
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
short nParamCount = GetByte();
std::vector<double> values;
2000-09-18 23:16:46 +00:00
double fSum = 0.0;
double vSum = 0.0;
double vMean = 0.0;
double fVal = 0.0;
2000-09-18 23:16:46 +00:00
rValCount = 0.0;
ScAddress aAdr;
ScRange aRange;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
size_t nRefInList = 0;
while (nParamCount-- > 0)
2000-09-18 23:16:46 +00:00
{
switch (GetStackType())
{
case svDouble :
{
fVal = GetDouble();
values.push_back(fVal);
2000-09-18 23:16:46 +00:00
fSum += fVal;
rValCount++;
}
break;
case svSingleRef :
{
PopSingleRef( aAdr );
ScBaseCell* pCell = GetCell( aAdr );
if (HasCellValueData(pCell))
{
fVal = GetCellValue( aAdr, pCell );
values.push_back(fVal);
2000-09-18 23:16:46 +00:00
fSum += fVal;
rValCount++;
}
else if ( bTextAsZero && HasCellStringData( pCell ) )
{
values.push_back(0.0);
2000-09-18 23:16:46 +00:00
rValCount++;
}
2000-09-18 23:16:46 +00:00
}
break;
case svDoubleRef :
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
case svRefList :
2000-09-18 23:16:46 +00:00
{
sal_uInt16 nErr = 0;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PopDoubleRef( aRange, nParamCount, nRefInList);
2000-09-18 23:16:46 +00:00
ScValueIterator aValIter( pDok, aRange, glSubTotal, bTextAsZero );
if (aValIter.GetFirst(fVal, nErr))
{
do
{
values.push_back(fVal);
2000-09-18 23:16:46 +00:00
fSum += fVal;
rValCount++;
}
while ((nErr == 0) && aValIter.GetNext(fVal, nErr));
}
}
break;
case svMatrix :
{
ScMatrixRef pMat = PopMatrix();
2000-09-18 23:16:46 +00:00
if (pMat)
{
SCSIZE nC, nR;
2000-09-18 23:16:46 +00:00
pMat->GetDimensions(nC, nR);
for (SCSIZE nMatCol = 0; nMatCol < nC; nMatCol++)
2000-09-18 23:16:46 +00:00
{
for (SCSIZE nMatRow = 0; nMatRow < nR; nMatRow++)
2000-09-18 23:16:46 +00:00
{
if (!pMat->IsString(nMatCol,nMatRow))
2000-09-18 23:16:46 +00:00
{
fVal= pMat->GetDouble(nMatCol,nMatRow);
values.push_back(fVal);
2000-09-18 23:16:46 +00:00
fSum += fVal;
rValCount++;
}
else if ( bTextAsZero )
{
values.push_back(0.0);
2000-09-18 23:16:46 +00:00
rValCount++;
}
2000-09-18 23:16:46 +00:00
}
}
}
}
break;
case svString :
{
Pop();
2000-09-18 23:16:46 +00:00
if ( bTextAsZero )
{
values.push_back(0.0);
2000-09-18 23:16:46 +00:00
rValCount++;
}
2000-09-18 23:16:46 +00:00
else
SetError(errIllegalParameter);
}
break;
2000-09-18 23:16:46 +00:00
default :
Pop();
SetError(errIllegalParameter);
}
}
::std::vector<double>::size_type n = values.size();
vMean = fSum / n;
for (::std::vector<double>::size_type i = 0; i < n; i++)
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
vSum += ::rtl::math::approxSub( values[i], vMean) * ::rtl::math::approxSub( values[i], vMean);
rVal = vSum;
2000-09-18 23:16:46 +00:00
}
2011-08-14 16:10:05 +02:00
void ScInterpreter::ScVar( bool bTextAsZero )
2000-09-18 23:16:46 +00:00
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScVar" );
2000-09-18 23:16:46 +00:00
double nVal;
double nValCount;
GetStVarParams( nVal, nValCount, bTextAsZero );
if (nValCount <= 1.0)
PushError( errDivisionByZero );
else
PushDouble( nVal / (nValCount - 1.0));
2000-09-18 23:16:46 +00:00
}
2011-08-14 16:10:05 +02:00
void ScInterpreter::ScVarP( bool bTextAsZero )
2000-09-18 23:16:46 +00:00
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScVarP" );
2000-09-18 23:16:46 +00:00
double nVal;
double nValCount;
GetStVarParams( nVal, nValCount, bTextAsZero );
PushDouble( div( nVal, nValCount));
2000-09-18 23:16:46 +00:00
}
2011-08-14 16:10:05 +02:00
void ScInterpreter::ScStDev( bool bTextAsZero )
2000-09-18 23:16:46 +00:00
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScStDev" );
2000-09-18 23:16:46 +00:00
double nVal;
double nValCount;
GetStVarParams( nVal, nValCount, bTextAsZero );
if (nValCount <= 1.0)
PushError( errDivisionByZero );
else
PushDouble( sqrt( nVal / (nValCount - 1.0)));
2000-09-18 23:16:46 +00:00
}
2011-08-14 16:10:05 +02:00
void ScInterpreter::ScStDevP( bool bTextAsZero )
2000-09-18 23:16:46 +00:00
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScStDevP" );
2000-09-18 23:16:46 +00:00
double nVal;
double nValCount;
GetStVarParams( nVal, nValCount, bTextAsZero );
if (nValCount == 0.0)
PushError( errDivisionByZero );
else
PushDouble( sqrt( nVal / nValCount));
/* this was: PushDouble( sqrt( div( nVal, nValCount)));
*
* Besides that the special NAN gets lost in the call through sqrt(),
* unxlngi6.pro then looped back and forth somewhere between div() and
* ::rtl::math::setNan(). Tests showed that
*
* sqrt( div( 1, 0));
*
* produced a loop, but
*
* double f1 = div( 1, 0);
* sqrt( f1 );
*
* was fine. There seems to be some compiler optimization problem. It does
* not occur when compiled with debug=t.
*/
2000-09-18 23:16:46 +00:00
}
void ScInterpreter::ScColumns()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScColumns" );
sal_uInt8 nParamCount = GetByte();
sal_uLong nVal = 0;
SCCOL nCol1;
SCROW nRow1;
SCTAB nTab1;
SCCOL nCol2;
SCROW nRow2;
SCTAB nTab2;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
while (nParamCount-- > 0)
2000-09-18 23:16:46 +00:00
{
switch ( GetStackType() )
{
case svSingleRef:
PopError();
nVal++;
break;
case svDoubleRef:
PopDoubleRef(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2);
nVal += static_cast<sal_uLong>(nTab2 - nTab1 + 1) *
static_cast<sal_uLong>(nCol2 - nCol1 + 1);
2000-09-18 23:16:46 +00:00
break;
case svMatrix:
{
ScMatrixRef pMat = PopMatrix();
2000-09-18 23:16:46 +00:00
if (pMat)
{
SCSIZE nC, nR;
2000-09-18 23:16:46 +00:00
pMat->GetDimensions(nC, nR);
nVal += nC;
}
}
break;
case svExternalSingleRef:
PopError();
nVal++;
break;
case svExternalDoubleRef:
{
sal_uInt16 nFileId;
String aTabName;
ScComplexRefData aRef;
PopExternalDoubleRef( nFileId, aTabName, aRef);
nVal += static_cast<sal_uLong>(aRef.Ref2.nTab - aRef.Ref1.nTab + 1) *
static_cast<sal_uLong>(aRef.Ref2.nCol - aRef.Ref1.nCol + 1);
}
break;
2000-09-18 23:16:46 +00:00
default:
PopError();
SetError(errIllegalParameter);
}
}
PushDouble((double)nVal);
}
void ScInterpreter::ScRows()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScRows" );
sal_uInt8 nParamCount = GetByte();
sal_uLong nVal = 0;
SCCOL nCol1;
SCROW nRow1;
SCTAB nTab1;
SCCOL nCol2;
SCROW nRow2;
SCTAB nTab2;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
while (nParamCount-- > 0)
2000-09-18 23:16:46 +00:00
{
switch ( GetStackType() )
{
case svSingleRef:
PopError();
nVal++;
break;
case svDoubleRef:
PopDoubleRef(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2);
nVal += static_cast<sal_uLong>(nTab2 - nTab1 + 1) *
static_cast<sal_uLong>(nRow2 - nRow1 + 1);
2000-09-18 23:16:46 +00:00
break;
case svMatrix:
{
ScMatrixRef pMat = PopMatrix();
2000-09-18 23:16:46 +00:00
if (pMat)
{
SCSIZE nC, nR;
2000-09-18 23:16:46 +00:00
pMat->GetDimensions(nC, nR);
nVal += nR;
}
}
break;
case svExternalSingleRef:
PopError();
nVal++;
break;
case svExternalDoubleRef:
{
sal_uInt16 nFileId;
String aTabName;
ScComplexRefData aRef;
PopExternalDoubleRef( nFileId, aTabName, aRef);
nVal += static_cast<sal_uLong>(aRef.Ref2.nTab - aRef.Ref1.nTab + 1) *
static_cast<sal_uLong>(aRef.Ref2.nRow - aRef.Ref1.nRow + 1);
}
break;
2000-09-18 23:16:46 +00:00
default:
PopError();
SetError(errIllegalParameter);
}
}
PushDouble((double)nVal);
}
void ScInterpreter::ScTables()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScTables" );
sal_uInt8 nParamCount = GetByte();
sal_uLong nVal;
2000-09-18 23:16:46 +00:00
if ( nParamCount == 0 )
nVal = pDok->GetTableCount();
else
{
nVal = 0;
SCCOL nCol1;
SCROW nRow1;
SCTAB nTab1;
SCCOL nCol2;
SCROW nRow2;
SCTAB nTab2;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
while (nParamCount-- > 0)
2000-09-18 23:16:46 +00:00
{
switch ( GetStackType() )
{
case svSingleRef:
PopError();
nVal++;
break;
case svDoubleRef:
PopDoubleRef(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2);
nVal += static_cast<sal_uLong>(nTab2 - nTab1 + 1);
2000-09-18 23:16:46 +00:00
break;
case svMatrix:
PopError();
nVal++;
break;
case svExternalSingleRef:
PopError();
nVal++;
break;
case svExternalDoubleRef:
{
sal_uInt16 nFileId;
String aTabName;
ScComplexRefData aRef;
PopExternalDoubleRef( nFileId, aTabName, aRef);
nVal += static_cast<sal_uLong>(aRef.Ref2.nTab - aRef.Ref1.nTab + 1);
}
break;
2000-09-18 23:16:46 +00:00
default:
PopError();
SetError( errIllegalParameter );
}
}
}
PushDouble( (double) nVal );
}
void ScInterpreter::ScColumn()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScColumn" );
sal_uInt8 nParamCount = GetByte();
2000-09-18 23:16:46 +00:00
if ( MustHaveParamCount( nParamCount, 0, 1 ) )
{
double nVal = 0;
2000-09-18 23:16:46 +00:00
if (nParamCount == 0)
{
2000-09-18 23:16:46 +00:00
nVal = aPos.Col() + 1;
if (bMatrixFormula)
{
SCCOL nCols;
SCROW nRows;
pMyFormulaCell->GetMatColsRows( nCols, nRows);
ScMatrixRef pResMat = GetNewMat( static_cast<SCSIZE>(nCols), 1);
if (pResMat)
{
for (SCCOL i=0; i < nCols; ++i)
pResMat->PutDouble( nVal + i, static_cast<SCSIZE>(i), 0);
PushMatrix( pResMat);
return;
}
}
}
2000-09-18 23:16:46 +00:00
else
{
switch ( GetStackType() )
{
case svSingleRef :
{
SCCOL nCol1;
SCROW nRow1;
SCTAB nTab1;
2000-09-18 23:16:46 +00:00
PopSingleRef( nCol1, nRow1, nTab1 );
nVal = (double) (nCol1 + 1);
}
break;
case svDoubleRef :
{
SCCOL nCol1;
SCROW nRow1;
SCTAB nTab1;
SCCOL nCol2;
SCROW nRow2;
SCTAB nTab2;
2000-09-18 23:16:46 +00:00
PopDoubleRef( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 );
if (nCol2 > nCol1)
{
ScMatrixRef pResMat = GetNewMat(
static_cast<SCSIZE>(nCol2-nCol1+1), 1);
2000-09-18 23:16:46 +00:00
if (pResMat)
{
for (SCCOL i = nCol1; i <= nCol2; i++)
pResMat->PutDouble((double)(i+1),
static_cast<SCSIZE>(i-nCol1), 0);
2000-09-18 23:16:46 +00:00
PushMatrix(pResMat);
return;
}
else
nVal = 0.0;
}
else
nVal = (double) (nCol1 + 1);
}
break;
default:
SetError( errIllegalParameter );
nVal = 0.0;
}
}
PushDouble( nVal );
}
}
void ScInterpreter::ScRow()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScRow" );
sal_uInt8 nParamCount = GetByte();
2000-09-18 23:16:46 +00:00
if ( MustHaveParamCount( nParamCount, 0, 1 ) )
{
double nVal = 0;
2000-09-18 23:16:46 +00:00
if (nParamCount == 0)
{
2000-09-18 23:16:46 +00:00
nVal = aPos.Row() + 1;
if (bMatrixFormula)
{
SCCOL nCols;
SCROW nRows;
pMyFormulaCell->GetMatColsRows( nCols, nRows);
ScMatrixRef pResMat = GetNewMat( 1, static_cast<SCSIZE>(nRows));
if (pResMat)
{
for (SCROW i=0; i < nRows; i++)
pResMat->PutDouble( nVal + i, 0, static_cast<SCSIZE>(i));
PushMatrix( pResMat);
return;
}
}
}
2000-09-18 23:16:46 +00:00
else
{
switch ( GetStackType() )
{
case svSingleRef :
{
SCCOL nCol1;
SCROW nRow1;
SCTAB nTab1;
2000-09-18 23:16:46 +00:00
PopSingleRef( nCol1, nRow1, nTab1 );
nVal = (double) (nRow1 + 1);
}
break;
case svDoubleRef :
{
SCCOL nCol1;
SCROW nRow1;
SCTAB nTab1;
SCCOL nCol2;
SCROW nRow2;
SCTAB nTab2;
2000-09-18 23:16:46 +00:00
PopDoubleRef( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 );
if (nRow2 > nRow1)
{
ScMatrixRef pResMat = GetNewMat( 1,
static_cast<SCSIZE>(nRow2-nRow1+1));
2000-09-18 23:16:46 +00:00
if (pResMat)
{
for (SCROW i = nRow1; i <= nRow2; i++)
pResMat->PutDouble((double)(i+1), 0,
static_cast<SCSIZE>(i-nRow1));
2000-09-18 23:16:46 +00:00
PushMatrix(pResMat);
return;
}
else
nVal = 0.0;
}
else
nVal = (double) (nRow1 + 1);
}
break;
default:
SetError( errIllegalParameter );
nVal = 0.0;
}
}
PushDouble( nVal );
}
}
void ScInterpreter::ScTable()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScTable" );
sal_uInt8 nParamCount = GetByte();
2000-09-18 23:16:46 +00:00
if ( MustHaveParamCount( nParamCount, 0, 1 ) )
{
SCTAB nVal = 0;
2000-09-18 23:16:46 +00:00
if ( nParamCount == 0 )
nVal = aPos.Tab() + 1;
else
{
switch ( GetStackType() )
{
case svString :
{
String aStr( PopString() );
if ( pDok->GetTable( aStr, nVal ) )
++nVal;
else
SetError( errIllegalArgument );
}
break;
case svSingleRef :
{
SCCOL nCol1;
SCROW nRow1;
SCTAB nTab1;
2000-09-18 23:16:46 +00:00
PopSingleRef( nCol1, nRow1, nTab1 );
nVal = nTab1 + 1;
}
break;
case svDoubleRef :
{
SCCOL nCol1;
SCROW nRow1;
SCTAB nTab1;
SCCOL nCol2;
SCROW nRow2;
SCTAB nTab2;
2000-09-18 23:16:46 +00:00
PopDoubleRef( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 );
nVal = nTab1 + 1;
}
break;
default:
SetError( errIllegalParameter );
}
if ( nGlobalError )
nVal = 0;
}
PushDouble( (double) nVal );
}
}
namespace {
class VectorMatrixAccessor
{
public:
VectorMatrixAccessor(const ScMatrix& rMat, bool bColVec) :
mrMat(rMat), mbColVec(bColVec) {}
bool IsEmpty(SCSIZE i) const
{
return mbColVec ? mrMat.IsEmpty(0, i) : mrMat.IsEmpty(i, 0);
}
bool IsEmptyPath(SCSIZE i) const
{
return mbColVec ? mrMat.IsEmptyPath(0, i) : mrMat.IsEmptyPath(i, 0);
}
bool IsValue(SCSIZE i) const
{
return mbColVec ? mrMat.IsValue(0, i) : mrMat.IsValue(i, 0);
}
bool IsString(SCSIZE i) const
{
return mbColVec ? mrMat.IsString(0, i) : mrMat.IsString(i, 0);
}
double GetDouble(SCSIZE i) const
{
return mbColVec ? mrMat.GetDouble(0, i) : mrMat.GetDouble(i, 0);
}
rtl::OUString GetString(SCSIZE i) const
{
return mbColVec ? mrMat.GetString(0, i) : mrMat.GetString(i, 0);
}
2010-06-29 23:32:33 -04:00
SCSIZE GetElementCount() const
{
SCSIZE nC, nR;
mrMat.GetDimensions(nC, nR);
return mbColVec ? nR : nC;
}
private:
const ScMatrix& mrMat;
bool mbColVec;
};
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
/** returns -1 when the matrix value is smaller than the query value, 0 when
they are equal, and 1 when the matrix value is larger than the query
value. */
static sal_Int32 lcl_CompareMatrix2Query(
SCSIZE i, const VectorMatrixAccessor& rMat, const ScQueryEntry& rEntry)
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
{
if (rMat.IsEmpty(i))
{
/* TODO: in case we introduced query for real empty this would have to
* be changed! */
return -1; // empty always less than anything else
}
/* FIXME: what is an empty path (result of IF(false;true_path) in
* comparisons? */
bool bByString = rEntry.GetQueryItem().meType == ScQueryEntry::ByString;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
if (rMat.IsValue(i))
{
if (bByString)
return -1; // numeric always less than string
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
const double nVal1 = rMat.GetDouble(i);
const double nVal2 = rEntry.GetQueryItem().mfVal;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
if (nVal1 == nVal2)
return 0;
return nVal1 < nVal2 ? -1 : 1;
}
if (!bByString)
return 1; // string always greater than numeric
const rtl::OUString aStr1 = rMat.GetString(i);
const rtl::OUString& rStr2 = rEntry.GetQueryItem().maString;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
return ScGlobal::GetCollator()->compareString(aStr1, rStr2); // case-insensitive
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
}
/** returns the last item with the identical value as the original item
value. */
static void lcl_GetLastMatch( SCSIZE& rIndex, const VectorMatrixAccessor& rMat,
SCSIZE nMatCount, bool bReverse)
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
{
if (rMat.IsValue(rIndex))
{
double nVal = rMat.GetDouble(rIndex);
if (bReverse)
while (rIndex > 0 && rMat.IsValue(rIndex-1) &&
nVal == rMat.GetDouble(rIndex-1))
--rIndex;
else
while (rIndex < nMatCount-1 && rMat.IsValue(rIndex+1) &&
nVal == rMat.GetDouble(rIndex+1))
++rIndex;
}
CWS-TOOLING: integrate CWS odff05 2008-12-11 04:17:37 +0100 er r265237 : #i94555# AppendIntToken for GAMMADIST, Excel needs 4 parameters; also use AppendIntToken instead of AppendNumToken for POISSON 2008-12-11 04:04:27 +0100 er r265236 : #i96837# make cumulative parameter of POISSON optional; patch from <lvyue> with slight modifications 2008-12-11 03:35:03 +0100 er r265235 : #i96835# make base parameter of LOG() optional also in UI; patch from <lvyue> 2008-12-11 03:15:30 +0100 er r265234 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-10 18:14:16 +0100 er r265214 : DBG_... need semicolon 2008-12-05 00:49:55 +0100 er r264881 : WaE unxlngi6: declaration of 'pFuncInfo' shadows a previous local 2008-12-05 00:26:05 +0100 er r264879 : #i91547# BETADIST with optional density/cumulative parameter and much better precision; patch from <regina> 2008-12-04 22:51:40 +0100 er r264877 : #i91602# add expm1() and log1p() replacements; based on a patch from <regina> 2008-12-01 16:07:35 +0100 dr r264614 : #i93789# import of EUROCONVERT from XLSX/XLSB 2008-11-28 13:15:01 +0100 dr r264543 : #i93789# new sheet function EUROCONVERT + XLS import/export, patch contributed by lvyue 2008-11-26 14:54:23 +0100 er r264397 : CWS-TOOLING: rebase CWS odff05 to trunk@264325 (milestone: DEV300:m36) 2008-11-20 14:23:33 +0100 er r264053 : CWS-TOOLING: rebase CWS odff05 to trunk@263288 (milestone: DEV300:m35) 2008-11-19 18:07:43 +0100 er r264012 : merged from trunk 2008-11-19 17:51:36 +0100 er r264011 : migrate CWS odff05 to SVN
2009-01-06 13:57:48 +00:00
//! Order of IsEmptyPath, IsEmpty, IsString is significant!
else if (rMat.IsEmptyPath(rIndex))
{
if (bReverse)
while (rIndex > 0 && rMat.IsEmptyPath(rIndex-1))
--rIndex;
else
while (rIndex < nMatCount-1 && rMat.IsEmptyPath(rIndex+1))
++rIndex;
}
else if (rMat.IsEmpty(rIndex))
{
if (bReverse)
while (rIndex > 0 && rMat.IsEmpty(rIndex-1))
--rIndex;
else
while (rIndex < nMatCount-1 && rMat.IsEmpty(rIndex+1))
++rIndex;
}
else if (rMat.IsString(rIndex))
{
rtl::OUString aStr( rMat.GetString(rIndex));
if (bReverse)
while (rIndex > 0 && rMat.IsString(rIndex-1) &&
aStr == rMat.GetString(rIndex-1))
--rIndex;
else
while (rIndex < nMatCount-1 && rMat.IsString(rIndex+1) &&
aStr == rMat.GetString(rIndex+1))
++rIndex;
}
CWS-TOOLING: integrate CWS odff05 2008-12-11 04:17:37 +0100 er r265237 : #i94555# AppendIntToken for GAMMADIST, Excel needs 4 parameters; also use AppendIntToken instead of AppendNumToken for POISSON 2008-12-11 04:04:27 +0100 er r265236 : #i96837# make cumulative parameter of POISSON optional; patch from <lvyue> with slight modifications 2008-12-11 03:35:03 +0100 er r265235 : #i96835# make base parameter of LOG() optional also in UI; patch from <lvyue> 2008-12-11 03:15:30 +0100 er r265234 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-10 18:14:16 +0100 er r265214 : DBG_... need semicolon 2008-12-05 00:49:55 +0100 er r264881 : WaE unxlngi6: declaration of 'pFuncInfo' shadows a previous local 2008-12-05 00:26:05 +0100 er r264879 : #i91547# BETADIST with optional density/cumulative parameter and much better precision; patch from <regina> 2008-12-04 22:51:40 +0100 er r264877 : #i91602# add expm1() and log1p() replacements; based on a patch from <regina> 2008-12-01 16:07:35 +0100 dr r264614 : #i93789# import of EUROCONVERT from XLSX/XLSB 2008-11-28 13:15:01 +0100 dr r264543 : #i93789# new sheet function EUROCONVERT + XLS import/export, patch contributed by lvyue 2008-11-26 14:54:23 +0100 er r264397 : CWS-TOOLING: rebase CWS odff05 to trunk@264325 (milestone: DEV300:m36) 2008-11-20 14:23:33 +0100 er r264053 : CWS-TOOLING: rebase CWS odff05 to trunk@263288 (milestone: DEV300:m35) 2008-11-19 18:07:43 +0100 er r264012 : merged from trunk 2008-11-19 17:51:36 +0100 er r264011 : migrate CWS odff05 to SVN
2009-01-06 13:57:48 +00:00
else
{
OSL_FAIL("lcl_GetLastMatch: unhandled matrix type");
}
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
}
2000-09-18 23:16:46 +00:00
}
2000-09-18 23:16:46 +00:00
void ScInterpreter::ScMatch()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScMatch" );
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
sal_uInt8 nParamCount = GetByte();
2000-09-18 23:16:46 +00:00
if ( MustHaveParamCount( nParamCount, 2, 3 ) )
{
double fTyp;
if (nParamCount == 3)
fTyp = GetDouble();
else
fTyp = 1.0;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
SCCOL nCol1 = 0;
SCROW nRow1 = 0;
SCTAB nTab1 = 0;
SCCOL nCol2 = 0;
SCROW nRow2 = 0;
SCTAB nTab2 = 0;
2011-01-09 21:11:58 +00:00
ScMatrixRef pMatSrc = NULL;
switch (GetStackType())
2000-09-18 23:16:46 +00:00
{
case svDoubleRef:
2000-09-18 23:16:46 +00:00
{
PopDoubleRef(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2);
if (nTab1 != nTab2 || (nCol1 != nCol2 && nRow1 != nRow2))
{
PushIllegalParameter();
return;
}
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
}
break;
case svMatrix:
case svExternalDoubleRef:
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
{
if (GetStackType() == svMatrix)
pMatSrc = PopMatrix();
else
PopExternalDoubleRef(pMatSrc);
if (!pMatSrc)
{
PushIllegalParameter();
return;
}
}
break;
default:
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalParameter();
2000-09-18 23:16:46 +00:00
return;
}
2000-09-18 23:16:46 +00:00
if (nGlobalError == 0)
{
double fVal;
String sStr;
ScQueryParam rParam;
rParam.nCol1 = nCol1;
rParam.nRow1 = nRow1;
rParam.nCol2 = nCol2;
rParam.nTab = nTab1;
2000-09-18 23:16:46 +00:00
ScQueryEntry& rEntry = rParam.GetEntry(0);
ScQueryEntry::Item& rItem = rEntry.GetQueryItem();
2011-08-14 16:10:05 +02:00
rEntry.bDoQuery = true;
2000-09-18 23:16:46 +00:00
if (fTyp < 0.0)
rEntry.eOp = SC_GREATER_EQUAL;
else if (fTyp > 0.0)
rEntry.eOp = SC_LESS_EQUAL;
switch ( GetStackType() )
{
case svDouble:
{
fVal = GetDouble();
rItem.mfVal = fVal;
rItem.meType = ScQueryEntry::ByValue;
2000-09-18 23:16:46 +00:00
}
break;
case svString:
{
sStr = GetString();
rItem.meType = ScQueryEntry::ByString;
rItem.maString = sStr;
2000-09-18 23:16:46 +00:00
}
break;
case svDoubleRef :
case svSingleRef :
{
ScAddress aAdr;
if ( !PopDoubleRefOrSingleRef( aAdr ) )
{
PushInt(0);
return ;
}
ScBaseCell* pCell = GetCell( aAdr );
if (HasCellValueData(pCell))
{
fVal = GetCellValue( aAdr, pCell );
rItem.meType = ScQueryEntry::ByValue;
rItem.mfVal = fVal;
2000-09-18 23:16:46 +00:00
}
else
{
GetCellString(sStr, pCell);
rItem.meType = ScQueryEntry::ByString;
rItem.maString = sStr;
2000-09-18 23:16:46 +00:00
}
}
break;
case svExternalSingleRef:
{
ScExternalRefCache::TokenRef pToken;
PopExternalSingleRef(pToken);
if (!pToken)
{
PushInt(0);
return;
}
if (pToken->GetType() == svDouble)
{
rItem.meType = ScQueryEntry::ByValue;
rItem.mfVal = pToken->GetDouble();
}
else
{
rItem.meType = ScQueryEntry::ByString;
rItem.maString = pToken->GetString();
}
}
break;
case svExternalDoubleRef:
// TODO: Implement this.
PushIllegalParameter();
return;
break;
case svMatrix :
{
String aStr;
ScMatValType nType = GetDoubleOrStringFromMatrix(
rItem.mfVal, aStr);
rItem.maString = aStr;
rItem.meType = ScMatrix::IsNonValueType(nType) ?
ScQueryEntry::ByString : ScQueryEntry::ByValue;
}
break;
2000-09-18 23:16:46 +00:00
default:
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalParameter();
2000-09-18 23:16:46 +00:00
return;
}
}
if (rItem.meType == ScQueryEntry::ByString)
{
2011-08-14 16:10:05 +02:00
bool bIsVBAMode = false;
if ( pDok )
bIsVBAMode = pDok->IsInVBAMode();
// #TODO handle MSO wildcards
if ( bIsVBAMode )
rParam.bRegExp = false;
else
rParam.bRegExp = MayBeRegExp(rEntry.GetQueryItem().maString, pDok);
}
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
if (pMatSrc) // The source data is matrix array.
{
SCSIZE nC, nR;
pMatSrc->GetDimensions( nC, nR);
if (nC > 1 && nR > 1)
{
// The source matrix must be a vector.
PushIllegalParameter();
return;
}
SCSIZE nMatCount = (nC == 1) ? nR : nC;
VectorMatrixAccessor aMatAcc(*pMatSrc, nC == 1);
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
// simple serial search for equality mode (source data doesn't
// need to be sorted).
if (rEntry.eOp == SC_EQUAL)
{
for (SCSIZE i = 0; i < nMatCount; ++i)
{
if (lcl_CompareMatrix2Query( i, aMatAcc, rEntry) == 0)
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
{
PushDouble(i+1); // found !
return;
}
}
PushNA(); // not found
return;
}
// binary search for non-equality mode (the source data is
// assumed to be sorted).
bool bAscOrder = (rEntry.eOp == SC_LESS_EQUAL);
SCSIZE nFirst = 0, nLast = nMatCount-1, nHitIndex = 0;
for (SCSIZE nLen = nLast-nFirst; nLen > 0; nLen = nLast-nFirst)
{
SCSIZE nMid = nFirst + nLen/2;
sal_Int32 nCmp = lcl_CompareMatrix2Query( nMid, aMatAcc, rEntry);
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
if (nCmp == 0)
{
// exact match. find the last item with the same value.
lcl_GetLastMatch( nMid, aMatAcc, nMatCount, !bAscOrder);
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushDouble( nMid+1);
return;
}
if (nLen == 1) // first and last items are next to each other.
{
if (nCmp < 0)
nHitIndex = bAscOrder ? nLast : nFirst;
else
nHitIndex = bAscOrder ? nFirst : nLast;
break;
}
if (nCmp < 0)
{
if (bAscOrder)
nFirst = nMid;
else
nLast = nMid;
}
else
{
if (bAscOrder)
nLast = nMid;
else
nFirst = nMid;
}
}
if (nHitIndex == nMatCount-1) // last item
{
sal_Int32 nCmp = lcl_CompareMatrix2Query( nHitIndex, aMatAcc, rEntry);
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
if ((bAscOrder && nCmp <= 0) || (!bAscOrder && nCmp >= 0))
{
// either the last item is an exact match or the real
// hit is beyond the last item.
PushDouble( nHitIndex+1);
return;
}
}
if (nHitIndex > 0) // valid hit must be 2nd item or higher
{
PushDouble( nHitIndex); // non-exact match
return;
}
PushNA();
return;
}
SCCOLROW nDelta = 0;
if (nCol1 == nCol2)
{ // search row in column
2000-09-18 23:16:46 +00:00
rParam.nRow2 = nRow2;
rEntry.nField = nCol1;
ScAddress aResultPos( nCol1, nRow1, nTab1);
if (!LookupQueryWithCache( aResultPos, rParam))
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushNA();
return;
2000-09-18 23:16:46 +00:00
}
nDelta = aResultPos.Row() - nRow1;
2000-09-18 23:16:46 +00:00
}
else
{ // search column in row
SCCOL nC;
rParam.bByRow = false;
2000-09-18 23:16:46 +00:00
rParam.nRow2 = nRow1;
rEntry.nField = nCol1;
ScQueryCellIterator aCellIter(pDok, nTab1, rParam, false);
// Advance Entry.nField in Iterator if column changed
2011-08-14 16:10:05 +02:00
aCellIter.SetAdvanceQueryParamEntryField( true );
if (fTyp == 0.0)
{ // EQUAL
2000-09-18 23:16:46 +00:00
if ( aCellIter.GetFirst() )
nC = aCellIter.GetCol();
else
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushNA();
2000-09-18 23:16:46 +00:00
return;
}
}
else
{ // <= or >=
SCROW nR;
if ( !aCellIter.FindEqualOrSortedLastInRange( nC, nR ) )
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushNA();
return;
}
2000-09-18 23:16:46 +00:00
}
nDelta = nC - nCol1;
}
PushDouble((double) (nDelta + 1));
}
else
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalParameter();
2000-09-18 23:16:46 +00:00
}
}
void ScInterpreter::ScCountEmptyCells()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScCountEmptyCells" );
2000-09-18 23:16:46 +00:00
if ( MustHaveParamCount( GetByte(), 1 ) )
{
sal_uLong nMaxCount = 0, nCount = 0;
2000-09-18 23:16:46 +00:00
CellType eCellType;
switch (GetStackType())
{
case svSingleRef :
{
nMaxCount = 1;
ScAddress aAdr;
PopSingleRef( aAdr );
eCellType = GetCellType( GetCell( aAdr ) );
if (eCellType != CELLTYPE_NONE && eCellType != CELLTYPE_NOTE)
nCount = 1;
}
break;
case svDoubleRef :
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
case svRefList :
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
ScRange aRange;
short nParam = 1;
size_t nRefInList = 0;
while (nParam-- > 0)
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PopDoubleRef( aRange, nParam, nRefInList);
nMaxCount +=
static_cast<sal_uLong>(aRange.aEnd.Row() - aRange.aStart.Row() + 1) *
static_cast<sal_uLong>(aRange.aEnd.Col() - aRange.aStart.Col() + 1) *
static_cast<sal_uLong>(aRange.aEnd.Tab() - aRange.aStart.Tab() + 1);
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
ScBaseCell* pCell;
ScCellIterator aDocIter( pDok, aRange, glSubTotal);
if ( (pCell = aDocIter.GetFirst()) != NULL )
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
do
{
if ((eCellType = pCell->GetCellType()) != CELLTYPE_NONE
&& eCellType != CELLTYPE_NOTE)
nCount++;
} while ( (pCell = aDocIter.GetNext()) != NULL );
}
2000-09-18 23:16:46 +00:00
}
}
break;
default : SetError(errIllegalParameter); break;
}
PushDouble(nMaxCount - nCount);
}
}
double ScInterpreter::IterateParametersIf( ScIterFuncIf eFunc )
2000-09-18 23:16:46 +00:00
{
sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 2, 3 ) )
return 0;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
SCCOL nCol3 = 0;
SCROW nRow3 = 0;
SCTAB nTab3 = 0;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
ScMatrixRef pSumExtraMatrix;
bool bSumExtraRange = (nParamCount == 3);
if (bSumExtraRange)
{
// Save only the upperleft cell in case of cell range. The geometry
// of the 3rd parameter is taken from the 1st parameter.
2000-09-18 23:16:46 +00:00
switch ( GetStackType() )
{
case svDoubleRef :
{
SCCOL nColJunk = 0;
SCROW nRowJunk = 0;
SCTAB nTabJunk = 0;
PopDoubleRef( nCol3, nRow3, nTab3, nColJunk, nRowJunk, nTabJunk );
if ( nTabJunk != nTab3 )
{
SetError( errIllegalParameter);
return 0;
}
2000-09-18 23:16:46 +00:00
}
break;
case svSingleRef :
PopSingleRef( nCol3, nRow3, nTab3 );
break;
case svMatrix:
pSumExtraMatrix = PopMatrix();
//! nCol3, nRow3, nTab3 remain 0
break;
case svExternalSingleRef:
{
pSumExtraMatrix = new ScMatrix(1, 1, 0.0);
ScExternalRefCache::TokenRef pToken;
PopExternalSingleRef(pToken);
if (!pToken)
{
SetError( errIllegalParameter);
return 0;
}
if (pToken->GetType() == svDouble)
pSumExtraMatrix->PutDouble(pToken->GetDouble(), 0, 0);
else
pSumExtraMatrix->PutString(pToken->GetString(), 0, 0);
}
break;
case svExternalDoubleRef:
PopExternalDoubleRef(pSumExtraMatrix);
break;
2000-09-18 23:16:46 +00:00
default:
SetError( errIllegalParameter);
return 0;
2000-09-18 23:16:46 +00:00
}
}
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
String aString;
double fVal = 0.0;
bool bIsString = true;
switch ( GetStackType() )
{
case svDoubleRef :
case svSingleRef :
{
ScAddress aAdr;
if ( !PopDoubleRefOrSingleRef( aAdr ) )
return 0;
ScBaseCell* pCell = GetCell( aAdr );
switch ( GetCellType( pCell ) )
{
case CELLTYPE_VALUE :
fVal = GetCellValue( aAdr, pCell );
bIsString = false;
break;
case CELLTYPE_FORMULA :
if( ((ScFormulaCell*)pCell)->IsValue() )
{
fVal = GetCellValue( aAdr, pCell );
bIsString = false;
}
else
GetCellString(aString, pCell);
break;
case CELLTYPE_STRING :
case CELLTYPE_EDIT :
GetCellString(aString, pCell);
break;
default:
fVal = 0.0;
bIsString = false;
}
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
}
break;
case svString:
aString = GetString();
break;
case svMatrix :
case svExternalDoubleRef:
{
ScMatValType nType = GetDoubleOrStringFromMatrix( fVal, aString);
bIsString = ScMatrix::IsNonValueType( nType);
}
break;
case svExternalSingleRef:
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
{
ScExternalRefCache::TokenRef pToken;
PopExternalSingleRef(pToken);
if (pToken)
{
if (pToken->GetType() == svDouble)
{
fVal = pToken->GetDouble();
bIsString = false;
}
else
aString = pToken->GetString();
}
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
}
break;
default:
{
fVal = GetDouble();
bIsString = false;
}
}
2000-09-18 23:16:46 +00:00
double fSum = 0.0;
double fMem = 0.0;
double fRes = 0.0;
double fCount = 0.0;
2011-08-14 16:10:05 +02:00
bool bNull = true;
short nParam = 1;
size_t nRefInList = 0;
while (nParam-- > 0)
{
SCCOL nCol1 = 0;
SCROW nRow1 = 0;
SCTAB nTab1 = 0;
SCCOL nCol2 = 0;
SCROW nRow2 = 0;
SCTAB nTab2 = 0;
ScMatrixRef pQueryMatrix;
switch ( GetStackType() )
{
case svRefList :
if (bSumExtraRange)
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
{
SetError( errIllegalParameter);
CWS-TOOLING: integrate CWS calc51 2009-07-17 15:47:46 +0200 er r274098 : #i101544# more thorough reference checking in chart data ranges; also prevent some possible crash if invalid ranges were to be passed to document/cell access. 2009-07-16 14:20:11 +0200 er r274051 : #i101544# let ScRefTokenHelper::compileRangeRepresentation() fail on all possible non-reference occasions 2009-07-07 10:11:40 +0200 nn r273776 : #i35579# don't use long instead of sal_Int32 2009-07-03 16:41:39 +0200 nn r273711 : msvc warnings 2009-07-03 14:18:45 +0200 nn r273698 : msvc warning 2009-07-03 11:30:41 +0200 nn r273685 : #i35579# move new tokens to the end 2009-07-03 10:12:55 +0200 nn r273681 : CWS-TOOLING: rebase CWS calc51 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 17:57:30 +0200 nn r273529 : #i103027# EnterData: if it's a formula, don't pass EditTextObject to undo 2009-06-29 14:31:18 +0200 er r273474 : #i101544# #i101645# #i102388# applied diff from CWS dr68ooo311 2009-06-29 10:30:20 +0200 nn r273457 : #i103161# DeleteCells: always leave list action 2009-06-24 16:16:34 +0200 nn r273353 : gcc warnings 2009-06-17 11:50:28 +0200 tbe r273055 : #i35579# Standard filter requires more options 2009-06-17 11:44:22 +0200 tbe r273054 : #i35579# Standard filter requires more options 2009-06-17 11:22:23 +0200 tbe r273052 : #i35579# Standard filter requires more options 2009-06-15 18:29:32 +0200 nn r273006 : #160063# UseFormulaData: check parenthesis position 2009-06-12 15:41:16 +0200 nn r272923 : #i99250# handle range lists in DoAutoOutline (patch from dtardon) 2009-06-11 15:07:05 +0200 nn r272874 : #i86943# GetNextPos: skip overlapped cells 2009-06-11 11:17:37 +0200 nn r272856 : #i97726# EnterData: get text from EditTextObject for repeat string of undo action 2009-06-10 20:45:07 +0200 nn r272839 : #i102566# minimum amount of code between updates of calculation progress (patch by cmc) 2009-06-10 20:22:02 +0200 nn r272838 : #i69524# PasteFile: specify target for SID_OPENDOC 2009-06-09 17:33:08 +0200 nn r272789 : #i16615# absolute/relative reference conversion for cell ranges (patch by gaojingmei)
2009-07-28 10:04:47 +00:00
}
else
{
ScRange aRange;
PopDoubleRef( aRange, nParam, nRefInList);
aRange.GetVars( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2);
CWS-TOOLING: integrate CWS calc51 2009-07-17 15:47:46 +0200 er r274098 : #i101544# more thorough reference checking in chart data ranges; also prevent some possible crash if invalid ranges were to be passed to document/cell access. 2009-07-16 14:20:11 +0200 er r274051 : #i101544# let ScRefTokenHelper::compileRangeRepresentation() fail on all possible non-reference occasions 2009-07-07 10:11:40 +0200 nn r273776 : #i35579# don't use long instead of sal_Int32 2009-07-03 16:41:39 +0200 nn r273711 : msvc warnings 2009-07-03 14:18:45 +0200 nn r273698 : msvc warning 2009-07-03 11:30:41 +0200 nn r273685 : #i35579# move new tokens to the end 2009-07-03 10:12:55 +0200 nn r273681 : CWS-TOOLING: rebase CWS calc51 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 17:57:30 +0200 nn r273529 : #i103027# EnterData: if it's a formula, don't pass EditTextObject to undo 2009-06-29 14:31:18 +0200 er r273474 : #i101544# #i101645# #i102388# applied diff from CWS dr68ooo311 2009-06-29 10:30:20 +0200 nn r273457 : #i103161# DeleteCells: always leave list action 2009-06-24 16:16:34 +0200 nn r273353 : gcc warnings 2009-06-17 11:50:28 +0200 tbe r273055 : #i35579# Standard filter requires more options 2009-06-17 11:44:22 +0200 tbe r273054 : #i35579# Standard filter requires more options 2009-06-17 11:22:23 +0200 tbe r273052 : #i35579# Standard filter requires more options 2009-06-15 18:29:32 +0200 nn r273006 : #160063# UseFormulaData: check parenthesis position 2009-06-12 15:41:16 +0200 nn r272923 : #i99250# handle range lists in DoAutoOutline (patch from dtardon) 2009-06-11 15:07:05 +0200 nn r272874 : #i86943# GetNextPos: skip overlapped cells 2009-06-11 11:17:37 +0200 nn r272856 : #i97726# EnterData: get text from EditTextObject for repeat string of undo action 2009-06-10 20:45:07 +0200 nn r272839 : #i102566# minimum amount of code between updates of calculation progress (patch by cmc) 2009-06-10 20:22:02 +0200 nn r272838 : #i69524# PasteFile: specify target for SID_OPENDOC 2009-06-09 17:33:08 +0200 nn r272789 : #i16615# absolute/relative reference conversion for cell ranges (patch by gaojingmei)
2009-07-28 10:04:47 +00:00
}
break;
case svDoubleRef :
PopDoubleRef( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 );
break;
case svSingleRef :
PopSingleRef( nCol1, nRow1, nTab1 );
nCol2 = nCol1;
nRow2 = nRow1;
nTab2 = nTab1;
break;
case svMatrix:
case svExternalSingleRef:
case svExternalDoubleRef:
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
{
pQueryMatrix = PopMatrix();
if (!pQueryMatrix)
{
SetError( errIllegalParameter);
return 0;
}
nCol1 = 0;
nRow1 = 0;
nTab1 = 0;
SCSIZE nC, nR;
pQueryMatrix->GetDimensions( nC, nR);
nCol2 = static_cast<SCCOL>(nC - 1);
nRow2 = static_cast<SCROW>(nR - 1);
nTab2 = 0;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
}
break;
default:
SetError( errIllegalParameter);
}
if ( nTab1 != nTab2 )
{
SetError( errIllegalParameter);
}
if (bSumExtraRange)
{
// Take the range geometry of the 1st parameter and apply it to
// the 3rd. If parts of the resulting range would point outside
// the sheet, don't complain but silently ignore and simply cut
// them away, this is what Xcl does :-/
// For the cut-away part we also don't need to determine the
// criteria match, so shrink the source range accordingly,
// instead of the result range.
SCCOL nColDelta = nCol2 - nCol1;
SCROW nRowDelta = nRow2 - nRow1;
SCCOL nMaxCol;
SCROW nMaxRow;
if (pSumExtraMatrix)
{
SCSIZE nC, nR;
pSumExtraMatrix->GetDimensions( nC, nR);
nMaxCol = static_cast<SCCOL>(nC - 1);
nMaxRow = static_cast<SCROW>(nR - 1);
2000-09-18 23:16:46 +00:00
}
else
{
nMaxCol = MAXCOL;
nMaxRow = MAXROW;
}
if (nCol3 + nColDelta > nMaxCol)
{
SCCOL nNewDelta = nMaxCol - nCol3;
nCol2 = nCol1 + nNewDelta;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
}
if (nRow3 + nRowDelta > nMaxRow)
2000-09-18 23:16:46 +00:00
{
SCROW nNewDelta = nMaxRow - nRow3;
nRow2 = nRow1 + nNewDelta;
}
}
else
{
nCol3 = nCol1;
nRow3 = nRow1;
nTab3 = nTab1;
}
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
if (nGlobalError == 0)
{
ScQueryParam rParam;
rParam.nRow1 = nRow1;
rParam.nRow2 = nRow2;
ScQueryEntry& rEntry = rParam.GetEntry(0);
ScQueryEntry::Item& rItem = rEntry.GetQueryItem();
rEntry.bDoQuery = true;
if (!bIsString)
{
rItem.meType = ScQueryEntry::ByValue;
rItem.mfVal = fVal;
rEntry.eOp = SC_EQUAL;
}
else
{
rParam.FillInExcelSyntax(aString, 0);
sal_uInt32 nIndex = 0;
bool bNumber = pFormatter->IsNumberFormat(
rItem.maString, nIndex, rItem.mfVal);
rItem.meType = bNumber ? ScQueryEntry::ByValue : ScQueryEntry::ByString;
if (rItem.meType == ScQueryEntry::ByString)
rParam.bRegExp = MayBeRegExp(rItem.maString, pDok);
}
ScAddress aAdr;
aAdr.SetTab( nTab3 );
rParam.nCol1 = nCol1;
rParam.nCol2 = nCol2;
rEntry.nField = nCol1;
SCsCOL nColDiff = nCol3 - nCol1;
SCsROW nRowDiff = nRow3 - nRow1;
if (pQueryMatrix)
{
// Never case-sensitive.
ScCompareOptions aOptions( pDok, rEntry, rParam.bRegExp);
ScMatrixRef pResultMatrix = QueryMat( pQueryMatrix, aOptions);
if (nGlobalError || !pResultMatrix)
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
{
SetError( errIllegalParameter);
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
}
CWS-TOOLING: integrate CWS calc51 2009-07-17 15:47:46 +0200 er r274098 : #i101544# more thorough reference checking in chart data ranges; also prevent some possible crash if invalid ranges were to be passed to document/cell access. 2009-07-16 14:20:11 +0200 er r274051 : #i101544# let ScRefTokenHelper::compileRangeRepresentation() fail on all possible non-reference occasions 2009-07-07 10:11:40 +0200 nn r273776 : #i35579# don't use long instead of sal_Int32 2009-07-03 16:41:39 +0200 nn r273711 : msvc warnings 2009-07-03 14:18:45 +0200 nn r273698 : msvc warning 2009-07-03 11:30:41 +0200 nn r273685 : #i35579# move new tokens to the end 2009-07-03 10:12:55 +0200 nn r273681 : CWS-TOOLING: rebase CWS calc51 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 17:57:30 +0200 nn r273529 : #i103027# EnterData: if it's a formula, don't pass EditTextObject to undo 2009-06-29 14:31:18 +0200 er r273474 : #i101544# #i101645# #i102388# applied diff from CWS dr68ooo311 2009-06-29 10:30:20 +0200 nn r273457 : #i103161# DeleteCells: always leave list action 2009-06-24 16:16:34 +0200 nn r273353 : gcc warnings 2009-06-17 11:50:28 +0200 tbe r273055 : #i35579# Standard filter requires more options 2009-06-17 11:44:22 +0200 tbe r273054 : #i35579# Standard filter requires more options 2009-06-17 11:22:23 +0200 tbe r273052 : #i35579# Standard filter requires more options 2009-06-15 18:29:32 +0200 nn r273006 : #160063# UseFormulaData: check parenthesis position 2009-06-12 15:41:16 +0200 nn r272923 : #i99250# handle range lists in DoAutoOutline (patch from dtardon) 2009-06-11 15:07:05 +0200 nn r272874 : #i86943# GetNextPos: skip overlapped cells 2009-06-11 11:17:37 +0200 nn r272856 : #i97726# EnterData: get text from EditTextObject for repeat string of undo action 2009-06-10 20:45:07 +0200 nn r272839 : #i102566# minimum amount of code between updates of calculation progress (patch by cmc) 2009-06-10 20:22:02 +0200 nn r272838 : #i69524# PasteFile: specify target for SID_OPENDOC 2009-06-09 17:33:08 +0200 nn r272789 : #i16615# absolute/relative reference conversion for cell ranges (patch by gaojingmei)
2009-07-28 10:04:47 +00:00
if (pSumExtraMatrix)
CWS-TOOLING: integrate CWS calc51 2009-07-17 15:47:46 +0200 er r274098 : #i101544# more thorough reference checking in chart data ranges; also prevent some possible crash if invalid ranges were to be passed to document/cell access. 2009-07-16 14:20:11 +0200 er r274051 : #i101544# let ScRefTokenHelper::compileRangeRepresentation() fail on all possible non-reference occasions 2009-07-07 10:11:40 +0200 nn r273776 : #i35579# don't use long instead of sal_Int32 2009-07-03 16:41:39 +0200 nn r273711 : msvc warnings 2009-07-03 14:18:45 +0200 nn r273698 : msvc warning 2009-07-03 11:30:41 +0200 nn r273685 : #i35579# move new tokens to the end 2009-07-03 10:12:55 +0200 nn r273681 : CWS-TOOLING: rebase CWS calc51 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 17:57:30 +0200 nn r273529 : #i103027# EnterData: if it's a formula, don't pass EditTextObject to undo 2009-06-29 14:31:18 +0200 er r273474 : #i101544# #i101645# #i102388# applied diff from CWS dr68ooo311 2009-06-29 10:30:20 +0200 nn r273457 : #i103161# DeleteCells: always leave list action 2009-06-24 16:16:34 +0200 nn r273353 : gcc warnings 2009-06-17 11:50:28 +0200 tbe r273055 : #i35579# Standard filter requires more options 2009-06-17 11:44:22 +0200 tbe r273054 : #i35579# Standard filter requires more options 2009-06-17 11:22:23 +0200 tbe r273052 : #i35579# Standard filter requires more options 2009-06-15 18:29:32 +0200 nn r273006 : #160063# UseFormulaData: check parenthesis position 2009-06-12 15:41:16 +0200 nn r272923 : #i99250# handle range lists in DoAutoOutline (patch from dtardon) 2009-06-11 15:07:05 +0200 nn r272874 : #i86943# GetNextPos: skip overlapped cells 2009-06-11 11:17:37 +0200 nn r272856 : #i97726# EnterData: get text from EditTextObject for repeat string of undo action 2009-06-10 20:45:07 +0200 nn r272839 : #i102566# minimum amount of code between updates of calculation progress (patch by cmc) 2009-06-10 20:22:02 +0200 nn r272838 : #i69524# PasteFile: specify target for SID_OPENDOC 2009-06-09 17:33:08 +0200 nn r272789 : #i16615# absolute/relative reference conversion for cell ranges (patch by gaojingmei)
2009-07-28 10:04:47 +00:00
{
for (SCCOL nCol = nCol1; nCol <= nCol2; ++nCol)
CWS-TOOLING: integrate CWS calc51 2009-07-17 15:47:46 +0200 er r274098 : #i101544# more thorough reference checking in chart data ranges; also prevent some possible crash if invalid ranges were to be passed to document/cell access. 2009-07-16 14:20:11 +0200 er r274051 : #i101544# let ScRefTokenHelper::compileRangeRepresentation() fail on all possible non-reference occasions 2009-07-07 10:11:40 +0200 nn r273776 : #i35579# don't use long instead of sal_Int32 2009-07-03 16:41:39 +0200 nn r273711 : msvc warnings 2009-07-03 14:18:45 +0200 nn r273698 : msvc warning 2009-07-03 11:30:41 +0200 nn r273685 : #i35579# move new tokens to the end 2009-07-03 10:12:55 +0200 nn r273681 : CWS-TOOLING: rebase CWS calc51 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 17:57:30 +0200 nn r273529 : #i103027# EnterData: if it's a formula, don't pass EditTextObject to undo 2009-06-29 14:31:18 +0200 er r273474 : #i101544# #i101645# #i102388# applied diff from CWS dr68ooo311 2009-06-29 10:30:20 +0200 nn r273457 : #i103161# DeleteCells: always leave list action 2009-06-24 16:16:34 +0200 nn r273353 : gcc warnings 2009-06-17 11:50:28 +0200 tbe r273055 : #i35579# Standard filter requires more options 2009-06-17 11:44:22 +0200 tbe r273054 : #i35579# Standard filter requires more options 2009-06-17 11:22:23 +0200 tbe r273052 : #i35579# Standard filter requires more options 2009-06-15 18:29:32 +0200 nn r273006 : #160063# UseFormulaData: check parenthesis position 2009-06-12 15:41:16 +0200 nn r272923 : #i99250# handle range lists in DoAutoOutline (patch from dtardon) 2009-06-11 15:07:05 +0200 nn r272874 : #i86943# GetNextPos: skip overlapped cells 2009-06-11 11:17:37 +0200 nn r272856 : #i97726# EnterData: get text from EditTextObject for repeat string of undo action 2009-06-10 20:45:07 +0200 nn r272839 : #i102566# minimum amount of code between updates of calculation progress (patch by cmc) 2009-06-10 20:22:02 +0200 nn r272838 : #i69524# PasteFile: specify target for SID_OPENDOC 2009-06-09 17:33:08 +0200 nn r272789 : #i16615# absolute/relative reference conversion for cell ranges (patch by gaojingmei)
2009-07-28 10:04:47 +00:00
{
for (SCROW nRow = nRow1; nRow <= nRow2; ++nRow)
CWS-TOOLING: integrate CWS calc51 2009-07-17 15:47:46 +0200 er r274098 : #i101544# more thorough reference checking in chart data ranges; also prevent some possible crash if invalid ranges were to be passed to document/cell access. 2009-07-16 14:20:11 +0200 er r274051 : #i101544# let ScRefTokenHelper::compileRangeRepresentation() fail on all possible non-reference occasions 2009-07-07 10:11:40 +0200 nn r273776 : #i35579# don't use long instead of sal_Int32 2009-07-03 16:41:39 +0200 nn r273711 : msvc warnings 2009-07-03 14:18:45 +0200 nn r273698 : msvc warning 2009-07-03 11:30:41 +0200 nn r273685 : #i35579# move new tokens to the end 2009-07-03 10:12:55 +0200 nn r273681 : CWS-TOOLING: rebase CWS calc51 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 17:57:30 +0200 nn r273529 : #i103027# EnterData: if it's a formula, don't pass EditTextObject to undo 2009-06-29 14:31:18 +0200 er r273474 : #i101544# #i101645# #i102388# applied diff from CWS dr68ooo311 2009-06-29 10:30:20 +0200 nn r273457 : #i103161# DeleteCells: always leave list action 2009-06-24 16:16:34 +0200 nn r273353 : gcc warnings 2009-06-17 11:50:28 +0200 tbe r273055 : #i35579# Standard filter requires more options 2009-06-17 11:44:22 +0200 tbe r273054 : #i35579# Standard filter requires more options 2009-06-17 11:22:23 +0200 tbe r273052 : #i35579# Standard filter requires more options 2009-06-15 18:29:32 +0200 nn r273006 : #160063# UseFormulaData: check parenthesis position 2009-06-12 15:41:16 +0200 nn r272923 : #i99250# handle range lists in DoAutoOutline (patch from dtardon) 2009-06-11 15:07:05 +0200 nn r272874 : #i86943# GetNextPos: skip overlapped cells 2009-06-11 11:17:37 +0200 nn r272856 : #i97726# EnterData: get text from EditTextObject for repeat string of undo action 2009-06-10 20:45:07 +0200 nn r272839 : #i102566# minimum amount of code between updates of calculation progress (patch by cmc) 2009-06-10 20:22:02 +0200 nn r272838 : #i69524# PasteFile: specify target for SID_OPENDOC 2009-06-09 17:33:08 +0200 nn r272789 : #i16615# absolute/relative reference conversion for cell ranges (patch by gaojingmei)
2009-07-28 10:04:47 +00:00
{
if (pResultMatrix->IsValue( nCol, nRow) &&
pResultMatrix->GetDouble( nCol, nRow))
CWS-TOOLING: integrate CWS calc51 2009-07-17 15:47:46 +0200 er r274098 : #i101544# more thorough reference checking in chart data ranges; also prevent some possible crash if invalid ranges were to be passed to document/cell access. 2009-07-16 14:20:11 +0200 er r274051 : #i101544# let ScRefTokenHelper::compileRangeRepresentation() fail on all possible non-reference occasions 2009-07-07 10:11:40 +0200 nn r273776 : #i35579# don't use long instead of sal_Int32 2009-07-03 16:41:39 +0200 nn r273711 : msvc warnings 2009-07-03 14:18:45 +0200 nn r273698 : msvc warning 2009-07-03 11:30:41 +0200 nn r273685 : #i35579# move new tokens to the end 2009-07-03 10:12:55 +0200 nn r273681 : CWS-TOOLING: rebase CWS calc51 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 17:57:30 +0200 nn r273529 : #i103027# EnterData: if it's a formula, don't pass EditTextObject to undo 2009-06-29 14:31:18 +0200 er r273474 : #i101544# #i101645# #i102388# applied diff from CWS dr68ooo311 2009-06-29 10:30:20 +0200 nn r273457 : #i103161# DeleteCells: always leave list action 2009-06-24 16:16:34 +0200 nn r273353 : gcc warnings 2009-06-17 11:50:28 +0200 tbe r273055 : #i35579# Standard filter requires more options 2009-06-17 11:44:22 +0200 tbe r273054 : #i35579# Standard filter requires more options 2009-06-17 11:22:23 +0200 tbe r273052 : #i35579# Standard filter requires more options 2009-06-15 18:29:32 +0200 nn r273006 : #160063# UseFormulaData: check parenthesis position 2009-06-12 15:41:16 +0200 nn r272923 : #i99250# handle range lists in DoAutoOutline (patch from dtardon) 2009-06-11 15:07:05 +0200 nn r272874 : #i86943# GetNextPos: skip overlapped cells 2009-06-11 11:17:37 +0200 nn r272856 : #i97726# EnterData: get text from EditTextObject for repeat string of undo action 2009-06-10 20:45:07 +0200 nn r272839 : #i102566# minimum amount of code between updates of calculation progress (patch by cmc) 2009-06-10 20:22:02 +0200 nn r272838 : #i69524# PasteFile: specify target for SID_OPENDOC 2009-06-09 17:33:08 +0200 nn r272789 : #i16615# absolute/relative reference conversion for cell ranges (patch by gaojingmei)
2009-07-28 10:04:47 +00:00
{
SCSIZE nC = nCol + nColDiff;
SCSIZE nR = nRow + nRowDiff;
CWS-TOOLING: integrate CWS calc51 2009-07-17 15:47:46 +0200 er r274098 : #i101544# more thorough reference checking in chart data ranges; also prevent some possible crash if invalid ranges were to be passed to document/cell access. 2009-07-16 14:20:11 +0200 er r274051 : #i101544# let ScRefTokenHelper::compileRangeRepresentation() fail on all possible non-reference occasions 2009-07-07 10:11:40 +0200 nn r273776 : #i35579# don't use long instead of sal_Int32 2009-07-03 16:41:39 +0200 nn r273711 : msvc warnings 2009-07-03 14:18:45 +0200 nn r273698 : msvc warning 2009-07-03 11:30:41 +0200 nn r273685 : #i35579# move new tokens to the end 2009-07-03 10:12:55 +0200 nn r273681 : CWS-TOOLING: rebase CWS calc51 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 17:57:30 +0200 nn r273529 : #i103027# EnterData: if it's a formula, don't pass EditTextObject to undo 2009-06-29 14:31:18 +0200 er r273474 : #i101544# #i101645# #i102388# applied diff from CWS dr68ooo311 2009-06-29 10:30:20 +0200 nn r273457 : #i103161# DeleteCells: always leave list action 2009-06-24 16:16:34 +0200 nn r273353 : gcc warnings 2009-06-17 11:50:28 +0200 tbe r273055 : #i35579# Standard filter requires more options 2009-06-17 11:44:22 +0200 tbe r273054 : #i35579# Standard filter requires more options 2009-06-17 11:22:23 +0200 tbe r273052 : #i35579# Standard filter requires more options 2009-06-15 18:29:32 +0200 nn r273006 : #160063# UseFormulaData: check parenthesis position 2009-06-12 15:41:16 +0200 nn r272923 : #i99250# handle range lists in DoAutoOutline (patch from dtardon) 2009-06-11 15:07:05 +0200 nn r272874 : #i86943# GetNextPos: skip overlapped cells 2009-06-11 11:17:37 +0200 nn r272856 : #i97726# EnterData: get text from EditTextObject for repeat string of undo action 2009-06-10 20:45:07 +0200 nn r272839 : #i102566# minimum amount of code between updates of calculation progress (patch by cmc) 2009-06-10 20:22:02 +0200 nn r272838 : #i69524# PasteFile: specify target for SID_OPENDOC 2009-06-09 17:33:08 +0200 nn r272789 : #i16615# absolute/relative reference conversion for cell ranges (patch by gaojingmei)
2009-07-28 10:04:47 +00:00
if (pSumExtraMatrix->IsValue( nC, nR))
{
fVal = pSumExtraMatrix->GetDouble( nC, nR);
++fCount;
CWS-TOOLING: integrate CWS calc51 2009-07-17 15:47:46 +0200 er r274098 : #i101544# more thorough reference checking in chart data ranges; also prevent some possible crash if invalid ranges were to be passed to document/cell access. 2009-07-16 14:20:11 +0200 er r274051 : #i101544# let ScRefTokenHelper::compileRangeRepresentation() fail on all possible non-reference occasions 2009-07-07 10:11:40 +0200 nn r273776 : #i35579# don't use long instead of sal_Int32 2009-07-03 16:41:39 +0200 nn r273711 : msvc warnings 2009-07-03 14:18:45 +0200 nn r273698 : msvc warning 2009-07-03 11:30:41 +0200 nn r273685 : #i35579# move new tokens to the end 2009-07-03 10:12:55 +0200 nn r273681 : CWS-TOOLING: rebase CWS calc51 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 17:57:30 +0200 nn r273529 : #i103027# EnterData: if it's a formula, don't pass EditTextObject to undo 2009-06-29 14:31:18 +0200 er r273474 : #i101544# #i101645# #i102388# applied diff from CWS dr68ooo311 2009-06-29 10:30:20 +0200 nn r273457 : #i103161# DeleteCells: always leave list action 2009-06-24 16:16:34 +0200 nn r273353 : gcc warnings 2009-06-17 11:50:28 +0200 tbe r273055 : #i35579# Standard filter requires more options 2009-06-17 11:44:22 +0200 tbe r273054 : #i35579# Standard filter requires more options 2009-06-17 11:22:23 +0200 tbe r273052 : #i35579# Standard filter requires more options 2009-06-15 18:29:32 +0200 nn r273006 : #160063# UseFormulaData: check parenthesis position 2009-06-12 15:41:16 +0200 nn r272923 : #i99250# handle range lists in DoAutoOutline (patch from dtardon) 2009-06-11 15:07:05 +0200 nn r272874 : #i86943# GetNextPos: skip overlapped cells 2009-06-11 11:17:37 +0200 nn r272856 : #i97726# EnterData: get text from EditTextObject for repeat string of undo action 2009-06-10 20:45:07 +0200 nn r272839 : #i102566# minimum amount of code between updates of calculation progress (patch by cmc) 2009-06-10 20:22:02 +0200 nn r272838 : #i69524# PasteFile: specify target for SID_OPENDOC 2009-06-09 17:33:08 +0200 nn r272789 : #i16615# absolute/relative reference conversion for cell ranges (patch by gaojingmei)
2009-07-28 10:04:47 +00:00
if ( bNull && fVal != 0.0 )
{
bNull = false;
CWS-TOOLING: integrate CWS calc51 2009-07-17 15:47:46 +0200 er r274098 : #i101544# more thorough reference checking in chart data ranges; also prevent some possible crash if invalid ranges were to be passed to document/cell access. 2009-07-16 14:20:11 +0200 er r274051 : #i101544# let ScRefTokenHelper::compileRangeRepresentation() fail on all possible non-reference occasions 2009-07-07 10:11:40 +0200 nn r273776 : #i35579# don't use long instead of sal_Int32 2009-07-03 16:41:39 +0200 nn r273711 : msvc warnings 2009-07-03 14:18:45 +0200 nn r273698 : msvc warning 2009-07-03 11:30:41 +0200 nn r273685 : #i35579# move new tokens to the end 2009-07-03 10:12:55 +0200 nn r273681 : CWS-TOOLING: rebase CWS calc51 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 17:57:30 +0200 nn r273529 : #i103027# EnterData: if it's a formula, don't pass EditTextObject to undo 2009-06-29 14:31:18 +0200 er r273474 : #i101544# #i101645# #i102388# applied diff from CWS dr68ooo311 2009-06-29 10:30:20 +0200 nn r273457 : #i103161# DeleteCells: always leave list action 2009-06-24 16:16:34 +0200 nn r273353 : gcc warnings 2009-06-17 11:50:28 +0200 tbe r273055 : #i35579# Standard filter requires more options 2009-06-17 11:44:22 +0200 tbe r273054 : #i35579# Standard filter requires more options 2009-06-17 11:22:23 +0200 tbe r273052 : #i35579# Standard filter requires more options 2009-06-15 18:29:32 +0200 nn r273006 : #160063# UseFormulaData: check parenthesis position 2009-06-12 15:41:16 +0200 nn r272923 : #i99250# handle range lists in DoAutoOutline (patch from dtardon) 2009-06-11 15:07:05 +0200 nn r272874 : #i86943# GetNextPos: skip overlapped cells 2009-06-11 11:17:37 +0200 nn r272856 : #i97726# EnterData: get text from EditTextObject for repeat string of undo action 2009-06-10 20:45:07 +0200 nn r272839 : #i102566# minimum amount of code between updates of calculation progress (patch by cmc) 2009-06-10 20:22:02 +0200 nn r272838 : #i69524# PasteFile: specify target for SID_OPENDOC 2009-06-09 17:33:08 +0200 nn r272789 : #i16615# absolute/relative reference conversion for cell ranges (patch by gaojingmei)
2009-07-28 10:04:47 +00:00
fMem = fVal;
}
else
fSum += fVal;
}
}
CWS-TOOLING: integrate CWS calc51 2009-07-17 15:47:46 +0200 er r274098 : #i101544# more thorough reference checking in chart data ranges; also prevent some possible crash if invalid ranges were to be passed to document/cell access. 2009-07-16 14:20:11 +0200 er r274051 : #i101544# let ScRefTokenHelper::compileRangeRepresentation() fail on all possible non-reference occasions 2009-07-07 10:11:40 +0200 nn r273776 : #i35579# don't use long instead of sal_Int32 2009-07-03 16:41:39 +0200 nn r273711 : msvc warnings 2009-07-03 14:18:45 +0200 nn r273698 : msvc warning 2009-07-03 11:30:41 +0200 nn r273685 : #i35579# move new tokens to the end 2009-07-03 10:12:55 +0200 nn r273681 : CWS-TOOLING: rebase CWS calc51 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 17:57:30 +0200 nn r273529 : #i103027# EnterData: if it's a formula, don't pass EditTextObject to undo 2009-06-29 14:31:18 +0200 er r273474 : #i101544# #i101645# #i102388# applied diff from CWS dr68ooo311 2009-06-29 10:30:20 +0200 nn r273457 : #i103161# DeleteCells: always leave list action 2009-06-24 16:16:34 +0200 nn r273353 : gcc warnings 2009-06-17 11:50:28 +0200 tbe r273055 : #i35579# Standard filter requires more options 2009-06-17 11:44:22 +0200 tbe r273054 : #i35579# Standard filter requires more options 2009-06-17 11:22:23 +0200 tbe r273052 : #i35579# Standard filter requires more options 2009-06-15 18:29:32 +0200 nn r273006 : #160063# UseFormulaData: check parenthesis position 2009-06-12 15:41:16 +0200 nn r272923 : #i99250# handle range lists in DoAutoOutline (patch from dtardon) 2009-06-11 15:07:05 +0200 nn r272874 : #i86943# GetNextPos: skip overlapped cells 2009-06-11 11:17:37 +0200 nn r272856 : #i97726# EnterData: get text from EditTextObject for repeat string of undo action 2009-06-10 20:45:07 +0200 nn r272839 : #i102566# minimum amount of code between updates of calculation progress (patch by cmc) 2009-06-10 20:22:02 +0200 nn r272838 : #i69524# PasteFile: specify target for SID_OPENDOC 2009-06-09 17:33:08 +0200 nn r272789 : #i16615# absolute/relative reference conversion for cell ranges (patch by gaojingmei)
2009-07-28 10:04:47 +00:00
}
}
}
else
{
for (SCCOL nCol = nCol1; nCol <= nCol2; ++nCol)
{
for (SCROW nRow = nRow1; nRow <= nRow2; ++nRow)
CWS-TOOLING: integrate CWS calc51 2009-07-17 15:47:46 +0200 er r274098 : #i101544# more thorough reference checking in chart data ranges; also prevent some possible crash if invalid ranges were to be passed to document/cell access. 2009-07-16 14:20:11 +0200 er r274051 : #i101544# let ScRefTokenHelper::compileRangeRepresentation() fail on all possible non-reference occasions 2009-07-07 10:11:40 +0200 nn r273776 : #i35579# don't use long instead of sal_Int32 2009-07-03 16:41:39 +0200 nn r273711 : msvc warnings 2009-07-03 14:18:45 +0200 nn r273698 : msvc warning 2009-07-03 11:30:41 +0200 nn r273685 : #i35579# move new tokens to the end 2009-07-03 10:12:55 +0200 nn r273681 : CWS-TOOLING: rebase CWS calc51 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 17:57:30 +0200 nn r273529 : #i103027# EnterData: if it's a formula, don't pass EditTextObject to undo 2009-06-29 14:31:18 +0200 er r273474 : #i101544# #i101645# #i102388# applied diff from CWS dr68ooo311 2009-06-29 10:30:20 +0200 nn r273457 : #i103161# DeleteCells: always leave list action 2009-06-24 16:16:34 +0200 nn r273353 : gcc warnings 2009-06-17 11:50:28 +0200 tbe r273055 : #i35579# Standard filter requires more options 2009-06-17 11:44:22 +0200 tbe r273054 : #i35579# Standard filter requires more options 2009-06-17 11:22:23 +0200 tbe r273052 : #i35579# Standard filter requires more options 2009-06-15 18:29:32 +0200 nn r273006 : #160063# UseFormulaData: check parenthesis position 2009-06-12 15:41:16 +0200 nn r272923 : #i99250# handle range lists in DoAutoOutline (patch from dtardon) 2009-06-11 15:07:05 +0200 nn r272874 : #i86943# GetNextPos: skip overlapped cells 2009-06-11 11:17:37 +0200 nn r272856 : #i97726# EnterData: get text from EditTextObject for repeat string of undo action 2009-06-10 20:45:07 +0200 nn r272839 : #i102566# minimum amount of code between updates of calculation progress (patch by cmc) 2009-06-10 20:22:02 +0200 nn r272838 : #i69524# PasteFile: specify target for SID_OPENDOC 2009-06-09 17:33:08 +0200 nn r272789 : #i16615# absolute/relative reference conversion for cell ranges (patch by gaojingmei)
2009-07-28 10:04:47 +00:00
{
if (pResultMatrix->GetDouble( nCol, nRow))
CWS-TOOLING: integrate CWS calc51 2009-07-17 15:47:46 +0200 er r274098 : #i101544# more thorough reference checking in chart data ranges; also prevent some possible crash if invalid ranges were to be passed to document/cell access. 2009-07-16 14:20:11 +0200 er r274051 : #i101544# let ScRefTokenHelper::compileRangeRepresentation() fail on all possible non-reference occasions 2009-07-07 10:11:40 +0200 nn r273776 : #i35579# don't use long instead of sal_Int32 2009-07-03 16:41:39 +0200 nn r273711 : msvc warnings 2009-07-03 14:18:45 +0200 nn r273698 : msvc warning 2009-07-03 11:30:41 +0200 nn r273685 : #i35579# move new tokens to the end 2009-07-03 10:12:55 +0200 nn r273681 : CWS-TOOLING: rebase CWS calc51 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 17:57:30 +0200 nn r273529 : #i103027# EnterData: if it's a formula, don't pass EditTextObject to undo 2009-06-29 14:31:18 +0200 er r273474 : #i101544# #i101645# #i102388# applied diff from CWS dr68ooo311 2009-06-29 10:30:20 +0200 nn r273457 : #i103161# DeleteCells: always leave list action 2009-06-24 16:16:34 +0200 nn r273353 : gcc warnings 2009-06-17 11:50:28 +0200 tbe r273055 : #i35579# Standard filter requires more options 2009-06-17 11:44:22 +0200 tbe r273054 : #i35579# Standard filter requires more options 2009-06-17 11:22:23 +0200 tbe r273052 : #i35579# Standard filter requires more options 2009-06-15 18:29:32 +0200 nn r273006 : #160063# UseFormulaData: check parenthesis position 2009-06-12 15:41:16 +0200 nn r272923 : #i99250# handle range lists in DoAutoOutline (patch from dtardon) 2009-06-11 15:07:05 +0200 nn r272874 : #i86943# GetNextPos: skip overlapped cells 2009-06-11 11:17:37 +0200 nn r272856 : #i97726# EnterData: get text from EditTextObject for repeat string of undo action 2009-06-10 20:45:07 +0200 nn r272839 : #i102566# minimum amount of code between updates of calculation progress (patch by cmc) 2009-06-10 20:22:02 +0200 nn r272838 : #i69524# PasteFile: specify target for SID_OPENDOC 2009-06-09 17:33:08 +0200 nn r272789 : #i16615# absolute/relative reference conversion for cell ranges (patch by gaojingmei)
2009-07-28 10:04:47 +00:00
{
aAdr.SetCol( nCol + nColDiff);
aAdr.SetRow( nRow + nRowDiff);
CWS-TOOLING: integrate CWS calc51 2009-07-17 15:47:46 +0200 er r274098 : #i101544# more thorough reference checking in chart data ranges; also prevent some possible crash if invalid ranges were to be passed to document/cell access. 2009-07-16 14:20:11 +0200 er r274051 : #i101544# let ScRefTokenHelper::compileRangeRepresentation() fail on all possible non-reference occasions 2009-07-07 10:11:40 +0200 nn r273776 : #i35579# don't use long instead of sal_Int32 2009-07-03 16:41:39 +0200 nn r273711 : msvc warnings 2009-07-03 14:18:45 +0200 nn r273698 : msvc warning 2009-07-03 11:30:41 +0200 nn r273685 : #i35579# move new tokens to the end 2009-07-03 10:12:55 +0200 nn r273681 : CWS-TOOLING: rebase CWS calc51 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 17:57:30 +0200 nn r273529 : #i103027# EnterData: if it's a formula, don't pass EditTextObject to undo 2009-06-29 14:31:18 +0200 er r273474 : #i101544# #i101645# #i102388# applied diff from CWS dr68ooo311 2009-06-29 10:30:20 +0200 nn r273457 : #i103161# DeleteCells: always leave list action 2009-06-24 16:16:34 +0200 nn r273353 : gcc warnings 2009-06-17 11:50:28 +0200 tbe r273055 : #i35579# Standard filter requires more options 2009-06-17 11:44:22 +0200 tbe r273054 : #i35579# Standard filter requires more options 2009-06-17 11:22:23 +0200 tbe r273052 : #i35579# Standard filter requires more options 2009-06-15 18:29:32 +0200 nn r273006 : #160063# UseFormulaData: check parenthesis position 2009-06-12 15:41:16 +0200 nn r272923 : #i99250# handle range lists in DoAutoOutline (patch from dtardon) 2009-06-11 15:07:05 +0200 nn r272874 : #i86943# GetNextPos: skip overlapped cells 2009-06-11 11:17:37 +0200 nn r272856 : #i97726# EnterData: get text from EditTextObject for repeat string of undo action 2009-06-10 20:45:07 +0200 nn r272839 : #i102566# minimum amount of code between updates of calculation progress (patch by cmc) 2009-06-10 20:22:02 +0200 nn r272838 : #i69524# PasteFile: specify target for SID_OPENDOC 2009-06-09 17:33:08 +0200 nn r272789 : #i16615# absolute/relative reference conversion for cell ranges (patch by gaojingmei)
2009-07-28 10:04:47 +00:00
ScBaseCell* pCell = GetCell( aAdr );
if ( HasCellValueData(pCell) )
{
fVal = GetCellValue( aAdr, pCell );
++fCount;
CWS-TOOLING: integrate CWS calc51 2009-07-17 15:47:46 +0200 er r274098 : #i101544# more thorough reference checking in chart data ranges; also prevent some possible crash if invalid ranges were to be passed to document/cell access. 2009-07-16 14:20:11 +0200 er r274051 : #i101544# let ScRefTokenHelper::compileRangeRepresentation() fail on all possible non-reference occasions 2009-07-07 10:11:40 +0200 nn r273776 : #i35579# don't use long instead of sal_Int32 2009-07-03 16:41:39 +0200 nn r273711 : msvc warnings 2009-07-03 14:18:45 +0200 nn r273698 : msvc warning 2009-07-03 11:30:41 +0200 nn r273685 : #i35579# move new tokens to the end 2009-07-03 10:12:55 +0200 nn r273681 : CWS-TOOLING: rebase CWS calc51 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 17:57:30 +0200 nn r273529 : #i103027# EnterData: if it's a formula, don't pass EditTextObject to undo 2009-06-29 14:31:18 +0200 er r273474 : #i101544# #i101645# #i102388# applied diff from CWS dr68ooo311 2009-06-29 10:30:20 +0200 nn r273457 : #i103161# DeleteCells: always leave list action 2009-06-24 16:16:34 +0200 nn r273353 : gcc warnings 2009-06-17 11:50:28 +0200 tbe r273055 : #i35579# Standard filter requires more options 2009-06-17 11:44:22 +0200 tbe r273054 : #i35579# Standard filter requires more options 2009-06-17 11:22:23 +0200 tbe r273052 : #i35579# Standard filter requires more options 2009-06-15 18:29:32 +0200 nn r273006 : #160063# UseFormulaData: check parenthesis position 2009-06-12 15:41:16 +0200 nn r272923 : #i99250# handle range lists in DoAutoOutline (patch from dtardon) 2009-06-11 15:07:05 +0200 nn r272874 : #i86943# GetNextPos: skip overlapped cells 2009-06-11 11:17:37 +0200 nn r272856 : #i97726# EnterData: get text from EditTextObject for repeat string of undo action 2009-06-10 20:45:07 +0200 nn r272839 : #i102566# minimum amount of code between updates of calculation progress (patch by cmc) 2009-06-10 20:22:02 +0200 nn r272838 : #i69524# PasteFile: specify target for SID_OPENDOC 2009-06-09 17:33:08 +0200 nn r272789 : #i16615# absolute/relative reference conversion for cell ranges (patch by gaojingmei)
2009-07-28 10:04:47 +00:00
if ( bNull && fVal != 0.0 )
{
bNull = false;
CWS-TOOLING: integrate CWS calc51 2009-07-17 15:47:46 +0200 er r274098 : #i101544# more thorough reference checking in chart data ranges; also prevent some possible crash if invalid ranges were to be passed to document/cell access. 2009-07-16 14:20:11 +0200 er r274051 : #i101544# let ScRefTokenHelper::compileRangeRepresentation() fail on all possible non-reference occasions 2009-07-07 10:11:40 +0200 nn r273776 : #i35579# don't use long instead of sal_Int32 2009-07-03 16:41:39 +0200 nn r273711 : msvc warnings 2009-07-03 14:18:45 +0200 nn r273698 : msvc warning 2009-07-03 11:30:41 +0200 nn r273685 : #i35579# move new tokens to the end 2009-07-03 10:12:55 +0200 nn r273681 : CWS-TOOLING: rebase CWS calc51 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 17:57:30 +0200 nn r273529 : #i103027# EnterData: if it's a formula, don't pass EditTextObject to undo 2009-06-29 14:31:18 +0200 er r273474 : #i101544# #i101645# #i102388# applied diff from CWS dr68ooo311 2009-06-29 10:30:20 +0200 nn r273457 : #i103161# DeleteCells: always leave list action 2009-06-24 16:16:34 +0200 nn r273353 : gcc warnings 2009-06-17 11:50:28 +0200 tbe r273055 : #i35579# Standard filter requires more options 2009-06-17 11:44:22 +0200 tbe r273054 : #i35579# Standard filter requires more options 2009-06-17 11:22:23 +0200 tbe r273052 : #i35579# Standard filter requires more options 2009-06-15 18:29:32 +0200 nn r273006 : #160063# UseFormulaData: check parenthesis position 2009-06-12 15:41:16 +0200 nn r272923 : #i99250# handle range lists in DoAutoOutline (patch from dtardon) 2009-06-11 15:07:05 +0200 nn r272874 : #i86943# GetNextPos: skip overlapped cells 2009-06-11 11:17:37 +0200 nn r272856 : #i97726# EnterData: get text from EditTextObject for repeat string of undo action 2009-06-10 20:45:07 +0200 nn r272839 : #i102566# minimum amount of code between updates of calculation progress (patch by cmc) 2009-06-10 20:22:02 +0200 nn r272838 : #i69524# PasteFile: specify target for SID_OPENDOC 2009-06-09 17:33:08 +0200 nn r272789 : #i16615# absolute/relative reference conversion for cell ranges (patch by gaojingmei)
2009-07-28 10:04:47 +00:00
fMem = fVal;
}
else
fSum += fVal;
}
}
CWS-TOOLING: integrate CWS calc51 2009-07-17 15:47:46 +0200 er r274098 : #i101544# more thorough reference checking in chart data ranges; also prevent some possible crash if invalid ranges were to be passed to document/cell access. 2009-07-16 14:20:11 +0200 er r274051 : #i101544# let ScRefTokenHelper::compileRangeRepresentation() fail on all possible non-reference occasions 2009-07-07 10:11:40 +0200 nn r273776 : #i35579# don't use long instead of sal_Int32 2009-07-03 16:41:39 +0200 nn r273711 : msvc warnings 2009-07-03 14:18:45 +0200 nn r273698 : msvc warning 2009-07-03 11:30:41 +0200 nn r273685 : #i35579# move new tokens to the end 2009-07-03 10:12:55 +0200 nn r273681 : CWS-TOOLING: rebase CWS calc51 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 17:57:30 +0200 nn r273529 : #i103027# EnterData: if it's a formula, don't pass EditTextObject to undo 2009-06-29 14:31:18 +0200 er r273474 : #i101544# #i101645# #i102388# applied diff from CWS dr68ooo311 2009-06-29 10:30:20 +0200 nn r273457 : #i103161# DeleteCells: always leave list action 2009-06-24 16:16:34 +0200 nn r273353 : gcc warnings 2009-06-17 11:50:28 +0200 tbe r273055 : #i35579# Standard filter requires more options 2009-06-17 11:44:22 +0200 tbe r273054 : #i35579# Standard filter requires more options 2009-06-17 11:22:23 +0200 tbe r273052 : #i35579# Standard filter requires more options 2009-06-15 18:29:32 +0200 nn r273006 : #160063# UseFormulaData: check parenthesis position 2009-06-12 15:41:16 +0200 nn r272923 : #i99250# handle range lists in DoAutoOutline (patch from dtardon) 2009-06-11 15:07:05 +0200 nn r272874 : #i86943# GetNextPos: skip overlapped cells 2009-06-11 11:17:37 +0200 nn r272856 : #i97726# EnterData: get text from EditTextObject for repeat string of undo action 2009-06-10 20:45:07 +0200 nn r272839 : #i102566# minimum amount of code between updates of calculation progress (patch by cmc) 2009-06-10 20:22:02 +0200 nn r272838 : #i69524# PasteFile: specify target for SID_OPENDOC 2009-06-09 17:33:08 +0200 nn r272789 : #i16615# absolute/relative reference conversion for cell ranges (patch by gaojingmei)
2009-07-28 10:04:47 +00:00
}
}
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
}
}
else
{
ScQueryCellIterator aCellIter(pDok, nTab1, rParam, false);
// Increment Entry.nField in iterator when switching to next column.
aCellIter.SetAdvanceQueryParamEntryField( true );
if ( aCellIter.GetFirst() )
{
if (pSumExtraMatrix)
{
do
{
SCSIZE nC = aCellIter.GetCol() + nColDiff;
SCSIZE nR = aCellIter.GetRow() + nRowDiff;
if (pSumExtraMatrix->IsValue( nC, nR))
{
fVal = pSumExtraMatrix->GetDouble( nC, nR);
++fCount;
if ( bNull && fVal != 0.0 )
{
bNull = false;
fMem = fVal;
}
else
fSum += fVal;
}
} while ( aCellIter.GetNext() );
}
else
{
do
{
aAdr.SetCol( aCellIter.GetCol() + nColDiff);
aAdr.SetRow( aCellIter.GetRow() + nRowDiff);
ScBaseCell* pCell = GetCell( aAdr );
if ( HasCellValueData(pCell) )
{
fVal = GetCellValue( aAdr, pCell );
++fCount;
if ( bNull && fVal != 0.0 )
{
bNull = false;
fMem = fVal;
}
else
fSum += fVal;
}
} while ( aCellIter.GetNext() );
}
}
2000-09-18 23:16:46 +00:00
}
}
else
{
SetError( errIllegalParameter);
return 0;
}
2000-09-18 23:16:46 +00:00
}
switch( eFunc )
{
case ifSUMIF: fRes = ::rtl::math::approxAdd( fSum, fMem ); break;
case ifAVERAGEIF: fRes = div( ::rtl::math::approxAdd( fSum, fMem ), fCount); break;
}
return fRes;
}
void ScInterpreter::ScSumIf()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSumIf" );
PushDouble( IterateParametersIf( ifSUMIF));
}
void ScInterpreter::ScAverageIf()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "makkica", "ScInterpreter::ScAverageIf" );
PushDouble( IterateParametersIf( ifAVERAGEIF));
}
void ScInterpreter::ScCountIf()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScCountIf" );
if ( MustHaveParamCount( GetByte(), 2 ) )
{
String aString;
double fVal = 0.0;
bool bIsString = true;
switch ( GetStackType() )
{
case svDoubleRef :
case svSingleRef :
{
ScAddress aAdr;
if ( !PopDoubleRefOrSingleRef( aAdr ) )
{
PushInt(0);
return ;
}
ScBaseCell* pCell = GetCell( aAdr );
switch ( GetCellType( pCell ) )
{
case CELLTYPE_VALUE :
fVal = GetCellValue( aAdr, pCell );
bIsString = false;
break;
case CELLTYPE_FORMULA :
if( ((ScFormulaCell*)pCell)->IsValue() )
{
fVal = GetCellValue( aAdr, pCell );
bIsString = false;
}
else
GetCellString(aString, pCell);
break;
case CELLTYPE_STRING :
case CELLTYPE_EDIT :
GetCellString(aString, pCell);
break;
default:
fVal = 0.0;
bIsString = false;
}
}
break;
case svMatrix:
case svExternalSingleRef:
case svExternalDoubleRef:
{
ScMatValType nType = GetDoubleOrStringFromMatrix( fVal,
aString);
bIsString = ScMatrix::IsNonValueType( nType);
}
break;
case svString:
aString = GetString();
break;
default:
{
fVal = GetDouble();
bIsString = false;
}
}
double fCount = 0.0;
short nParam = 1;
size_t nRefInList = 0;
while (nParam-- > 0)
{
SCCOL nCol1 = 0;
SCROW nRow1 = 0;
SCTAB nTab1 = 0;
SCCOL nCol2 = 0;
SCROW nRow2 = 0;
SCTAB nTab2 = 0;
ScMatrixRef pQueryMatrix;
switch ( GetStackType() )
{
case svDoubleRef :
case svRefList :
{
ScRange aRange;
PopDoubleRef( aRange, nParam, nRefInList);
aRange.GetVars( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2);
}
break;
case svSingleRef :
PopSingleRef( nCol1, nRow1, nTab1 );
nCol2 = nCol1;
nRow2 = nRow1;
nTab2 = nTab1;
break;
case svMatrix:
case svExternalSingleRef:
case svExternalDoubleRef:
{
pQueryMatrix = GetMatrix();
if (!pQueryMatrix)
{
PushIllegalParameter();
return;
}
nCol1 = 0;
nRow1 = 0;
nTab1 = 0;
SCSIZE nC, nR;
pQueryMatrix->GetDimensions( nC, nR);
nCol2 = static_cast<SCCOL>(nC - 1);
nRow2 = static_cast<SCROW>(nR - 1);
nTab2 = 0;
}
break;
default:
PushIllegalParameter();
return ;
}
if ( nTab1 != nTab2 )
{
PushIllegalParameter();
return;
}
if (nCol1 > nCol2)
{
PushIllegalParameter();
return;
}
if (nGlobalError == 0)
{
ScQueryParam rParam;
rParam.nRow1 = nRow1;
rParam.nRow2 = nRow2;
ScQueryEntry& rEntry = rParam.GetEntry(0);
ScQueryEntry::Item& rItem = rEntry.GetQueryItem();
rEntry.bDoQuery = true;
if (!bIsString)
{
rItem.meType = ScQueryEntry::ByValue;
rItem.mfVal = fVal;
rEntry.eOp = SC_EQUAL;
}
else
{
rParam.FillInExcelSyntax(aString, 0);
sal_uInt32 nIndex = 0;
bool bNumber = pFormatter->IsNumberFormat(
rItem.maString, nIndex, rItem.mfVal);
rItem.meType = bNumber ? ScQueryEntry::ByValue : ScQueryEntry::ByString;
if (rItem.meType == ScQueryEntry::ByString)
rParam.bRegExp = MayBeRegExp(rItem.maString, pDok);
}
rParam.nCol1 = nCol1;
rParam.nCol2 = nCol2;
rEntry.nField = nCol1;
if (pQueryMatrix)
{
// Never case-sensitive.
ScCompareOptions aOptions( pDok, rEntry, rParam.bRegExp);
ScMatrixRef pResultMatrix = QueryMat( pQueryMatrix, aOptions);
if (nGlobalError || !pResultMatrix)
{
PushIllegalParameter();
return;
}
SCSIZE nSize = pResultMatrix->GetElementCount();
for (SCSIZE nIndex = 0; nIndex < nSize; ++nIndex)
{
if (pResultMatrix->IsValue( nIndex) &&
pResultMatrix->GetDouble( nIndex))
++fCount;
}
}
else
{
ScQueryCellIterator aCellIter(pDok, nTab1, rParam, false);
// Keep Entry.nField in iterator on column change
aCellIter.SetAdvanceQueryParamEntryField( true );
if ( aCellIter.GetFirst() )
{
do
{
fCount++;
} while ( aCellIter.GetNext() );
}
}
}
else
{
PushIllegalParameter();
return;
}
}
PushDouble(fCount);
}
2000-09-18 23:16:46 +00:00
}
double ScInterpreter::IterateParametersIfs( ScIterFuncIfs eFunc )
{
sal_uInt8 nParamCount = GetByte();
sal_uInt8 nQueryCount = nParamCount / 2;
bool bCheck;
if ( eFunc == ifCOUNTIFS )
bCheck = (nParamCount >= 2) && (nParamCount % 2 == 0);
else
bCheck = (nParamCount >= 3) && (nParamCount % 2 == 1);
if ( !bCheck )
{
SetError( errParameterExpected);
}
else
{
ScMatrixRef pResMat;
double fVal = 0.0;
double fSum = 0.0;
double fMem = 0.0;
double fRes = 0.0;
double fCount = 0.0;
short nParam = 1;
size_t nRefInList = 0;
SCCOL nDimensionCols = 0;
SCROW nDimensionRows = 0;
while (nParamCount > 1 && !nGlobalError)
{
// take criteria
String aString;
fVal = 0.0;
bool bIsString = true;
switch ( GetStackType() )
{
case svDoubleRef :
case svSingleRef :
{
ScAddress aAdr;
if ( !PopDoubleRefOrSingleRef( aAdr ) )
return 0;
ScBaseCell* pCell = GetCell( aAdr );
switch ( GetCellType( pCell ) )
{
case CELLTYPE_VALUE :
fVal = GetCellValue( aAdr, pCell );
bIsString = false;
break;
case CELLTYPE_FORMULA :
if( ((ScFormulaCell*)pCell)->IsValue() )
{
fVal = GetCellValue( aAdr, pCell );
bIsString = false;
}
else
GetCellString(aString, pCell);
break;
case CELLTYPE_STRING :
case CELLTYPE_EDIT :
GetCellString(aString, pCell);
break;
default:
fVal = 0.0;
bIsString = false;
}
}
break;
case svString:
aString = GetString();
break;
case svMatrix :
case svExternalDoubleRef:
{
ScMatValType nType = GetDoubleOrStringFromMatrix( fVal, aString);
bIsString = ScMatrix::IsNonValueType( nType);
}
break;
case svExternalSingleRef:
{
ScExternalRefCache::TokenRef pToken;
PopExternalSingleRef(pToken);
if (pToken)
{
if (pToken->GetType() == svDouble)
{
fVal = pToken->GetDouble();
bIsString = false;
}
else
aString = pToken->GetString();
}
}
break;
default:
{
fVal = GetDouble();
bIsString = false;
}
}
if (nGlobalError)
continue; // and bail out, no need to evaluate other arguments
// take range
nParam = 1;
nRefInList = 0;
SCCOL nCol1 = 0;
SCROW nRow1 = 0;
SCTAB nTab1 = 0;
SCCOL nCol2 = 0;
SCROW nRow2 = 0;
SCTAB nTab2 = 0;
ScMatrixRef pQueryMatrix;
switch ( GetStackType() )
{
case svRefList :
{
ScRange aRange;
PopDoubleRef( aRange, nParam, nRefInList);
aRange.GetVars( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2);
}
break;
case svDoubleRef :
PopDoubleRef( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 );
break;
case svSingleRef :
PopSingleRef( nCol1, nRow1, nTab1 );
nCol2 = nCol1;
nRow2 = nRow1;
nTab2 = nTab1;
break;
case svMatrix:
case svExternalSingleRef:
case svExternalDoubleRef:
{
pQueryMatrix = PopMatrix();
if (!pQueryMatrix)
{
SetError( errIllegalParameter);
}
nCol1 = 0;
nRow1 = 0;
nTab1 = 0;
SCSIZE nC, nR;
pQueryMatrix->GetDimensions( nC, nR);
nCol2 = static_cast<SCCOL>(nC - 1);
nRow2 = static_cast<SCROW>(nR - 1);
nTab2 = 0;
}
break;
default:
SetError( errIllegalParameter);
}
if ( nTab1 != nTab2 )
SetError( errIllegalArgument);
// All reference ranges must be of same dimension and size.
if (!nDimensionCols)
nDimensionCols = nCol2 - nCol1 + 1;
if (!nDimensionRows)
nDimensionRows = nRow2 - nRow1 + 1;
if ((nDimensionCols != (nCol2 - nCol1 + 1)) || (nDimensionRows != (nRow2 - nRow1 + 1)))
SetError ( errIllegalArgument);
// recalculate matrix values
if (nGlobalError == 0)
{
// initialize temporary result matrix
if (!pResMat)
{
SCSIZE nResC, nResR;
nResC = nCol2 - nCol1 + 1;
nResR = nRow2 - nRow1 + 1;
pResMat = GetNewMat(nResC, nResR);
if (!pResMat)
SetError( errIllegalParameter);
else
pResMat->FillDouble( 0.0, 0, 0, nResC-1, nResR-1);
}
ScQueryParam rParam;
rParam.nRow1 = nRow1;
rParam.nRow2 = nRow2;
ScQueryEntry& rEntry = rParam.GetEntry(0);
ScQueryEntry::Item& rItem = rEntry.GetQueryItem();
rEntry.bDoQuery = true;
if (!bIsString)
{
rItem.meType = ScQueryEntry::ByValue;
rItem.mfVal = fVal;
rEntry.eOp = SC_EQUAL;
}
else
{
rParam.FillInExcelSyntax(aString, 0);
sal_uInt32 nIndex = 0;
bool bNumber = pFormatter->IsNumberFormat(
rItem.maString, nIndex, rItem.mfVal);
rItem.meType = bNumber ? ScQueryEntry::ByValue : ScQueryEntry::ByString;
if (rItem.meType == ScQueryEntry::ByString)
rParam.bRegExp = MayBeRegExp(rItem.maString, pDok);
}
ScAddress aAdr;
aAdr.SetTab( nTab1 );
rParam.nCol1 = nCol1;
rParam.nCol2 = nCol2;
rEntry.nField = nCol1;
SCsCOL nColDiff = -nCol1;
SCsROW nRowDiff = -nRow1;
if (pQueryMatrix)
{
// Never case-sensitive.
ScCompareOptions aOptions( pDok, rEntry, rParam.bRegExp);
ScMatrixRef pResultMatrix = QueryMat( pQueryMatrix, aOptions);
if (nGlobalError || !pResultMatrix)
{
SetError( errIllegalParameter);
}
for (SCCOL nCol = nCol1; nCol <= nCol2; ++nCol)
{
for (SCROW nRow = nRow1; nRow <= nRow2; ++nRow)
{
if (pResultMatrix->IsValue( nCol, nRow) &&
pResultMatrix->GetDouble( nCol, nRow))
{
SCSIZE nC = nCol + nColDiff;
SCSIZE nR = nRow + nRowDiff;
pResMat->PutDouble(pResMat->GetDouble(nC, nR)+1.0, nC, nR);
}
}
}
}
else
{
ScQueryCellIterator aCellIter(pDok, nTab1, rParam, false);
// Increment Entry.nField in iterator when switching to next column.
aCellIter.SetAdvanceQueryParamEntryField( true );
if ( aCellIter.GetFirst() )
{
do
{
SCSIZE nC = aCellIter.GetCol() + nColDiff;
SCSIZE nR = aCellIter.GetRow() + nRowDiff;
pResMat->PutDouble(pResMat->GetDouble(nC, nR)+1.0, nC, nR);
} while ( aCellIter.GetNext() );
}
}
}
nParamCount -= 2;
}
if (nGlobalError)
return 0; // bail out
// main range - only for AVERAGEIFS and SUMIFS
if (nParamCount == 1)
{
nParam = 1;
nRefInList = 0;
bool bNull = true;
SCCOL nMainCol1 = 0;
SCROW nMainRow1 = 0;
SCTAB nMainTab1 = 0;
SCCOL nMainCol2 = 0;
SCROW nMainRow2 = 0;
SCTAB nMainTab2 = 0;
ScMatrixRef pMainMatrix;
switch ( GetStackType() )
{
case svRefList :
{
ScRange aRange;
PopDoubleRef( aRange, nParam, nRefInList);
aRange.GetVars( nMainCol1, nMainRow1, nMainTab1, nMainCol2, nMainRow2, nMainTab2);
}
break;
case svDoubleRef :
PopDoubleRef( nMainCol1, nMainRow1, nMainTab1, nMainCol2, nMainRow2, nMainTab2 );
break;
case svSingleRef :
PopSingleRef( nMainCol1, nMainRow1, nMainTab1 );
nMainCol2 = nMainCol1;
nMainRow2 = nMainRow1;
nMainTab2 = nMainTab1;
break;
case svMatrix:
case svExternalSingleRef:
case svExternalDoubleRef:
{
pMainMatrix = PopMatrix();
if (!pMainMatrix)
{
SetError( errIllegalParameter);
}
nMainCol1 = 0;
nMainRow1 = 0;
nMainTab1 = 0;
SCSIZE nC, nR;
pMainMatrix->GetDimensions( nC, nR);
nMainCol2 = static_cast<SCCOL>(nC - 1);
nMainRow2 = static_cast<SCROW>(nR - 1);
nMainTab2 = 0;
}
break;
default:
SetError( errIllegalParameter);
}
if ( nMainTab1 != nMainTab2 )
SetError( errIllegalArgument);
// All reference ranges must be of same dimension and size.
if ((nDimensionCols != (nMainCol2 - nMainCol1 + 1)) || (nDimensionRows != (nMainRow2 - nMainRow1 + 1)))
SetError ( errIllegalArgument);
if (nGlobalError)
return 0; // bail out
// end-result calculation
ScAddress aAdr;
aAdr.SetTab( nMainTab1 );
if (pMainMatrix)
{
SCSIZE nC, nR;
pResMat->GetDimensions(nC, nR);
for (SCSIZE nCol = 0; nCol < nC; ++nCol)
{
for (SCSIZE nRow = 0; nRow < nR; ++nRow)
{
if (pResMat->GetDouble( nCol, nRow) == nQueryCount)
{
if (pMainMatrix->IsValue( nCol, nRow))
{
fVal = pMainMatrix->GetDouble( nCol, nRow);
++fCount;
if ( bNull && fVal != 0.0 )
{
bNull = false;
fMem = fVal;
}
else
fSum += fVal;
}
}
}
}
}
else
{
SCSIZE nC, nR;
pResMat->GetDimensions(nC, nR);
for (SCSIZE nCol = 0; nCol < nC; ++nCol)
{
for (SCSIZE nRow = 0; nRow < nR; ++nRow)
{
if (pResMat->GetDouble( nCol, nRow) == nQueryCount)
{
aAdr.SetCol( static_cast<SCCOL>(nCol) + nMainCol1);
aAdr.SetRow( static_cast<SCROW>(nRow) + nMainRow1);
ScBaseCell* pCell = GetCell( aAdr );
if ( HasCellValueData(pCell) )
{
fVal = GetCellValue( aAdr, pCell );
++fCount;
if ( bNull && fVal != 0.0 )
{
bNull = false;
fMem = fVal;
}
else
fSum += fVal;
}
}
}
}
}
}
else
{
SCSIZE nC, nR;
pResMat->GetDimensions(nC, nR);
for (SCSIZE nCol = 0; nCol < nC; ++nCol)
{
for (SCSIZE nRow = 0; nRow < nR; ++nRow)
if (pResMat->GetDouble( nCol, nRow) == nQueryCount)
++fCount;
}
}
switch( eFunc )
{
case ifSUMIFS: fRes = ::rtl::math::approxAdd( fSum, fMem ); break;
case ifAVERAGEIFS: fRes = div( ::rtl::math::approxAdd( fSum, fMem ), fCount); break;
case ifCOUNTIFS: fRes = fCount; break;
default: ; // nothing
}
return fRes;
}
return 0;
}
void ScInterpreter::ScSumIfs()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "makkica", "ScInterpreter::ScSumIfs" );
PushDouble( IterateParametersIfs( ifSUMIFS));
}
void ScInterpreter::ScAverageIfs()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "makkica", "ScInterpreter::ScAverageIfs" );
PushDouble( IterateParametersIfs( ifAVERAGEIFS));
}
void ScInterpreter::ScCountIfs()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "makkica", "ScInterpreter::ScCountIfs" );
PushDouble( IterateParametersIfs( ifCOUNTIFS));
}
2000-09-18 23:16:46 +00:00
void ScInterpreter::ScLookup()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScLookup" );
sal_uInt8 nParamCount = GetByte();
2000-09-18 23:16:46 +00:00
if ( !MustHaveParamCount( nParamCount, 2, 3 ) )
return ;
ScMatrixRef pDataMat = NULL, pResMat = NULL;
SCCOL nCol1 = 0, nCol2 = 0, nResCol1 = 0, nResCol2 = 0;
SCROW nRow1 = 0, nRow2 = 0, nResRow1 = 0, nResRow2 = 0;
SCTAB nTab1 = 0, nResTab = 0;
SCSIZE nLenMajor = 0; // length of major direction
bool bVertical = true; // whether to lookup vertically or horizontally
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
// The third parameter, result array, for double, string and single reference.
double fResVal = 0.0;
String aResStr;
ScAddress aResAdr;
StackVar eResArrayType = svUnknown;
if (nParamCount == 3)
2000-09-18 23:16:46 +00:00
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
eResArrayType = GetStackType();
switch (eResArrayType)
2000-09-18 23:16:46 +00:00
{
case svDoubleRef:
2000-09-18 23:16:46 +00:00
{
SCTAB nTabJunk;
PopDoubleRef(nResCol1, nResRow1, nResTab,
nResCol2, nResRow2, nTabJunk);
if (nResTab != nTabJunk ||
((nResRow2 - nResRow1) > 0 && (nResCol2 - nResCol1) > 0))
{
// The result array must be a vector.
PushIllegalParameter();
return;
}
2000-09-18 23:16:46 +00:00
}
break;
case svMatrix:
case svExternalSingleRef:
case svExternalDoubleRef:
2000-09-18 23:16:46 +00:00
{
pResMat = GetMatrix();
if (!pResMat)
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalParameter();
2000-09-18 23:16:46 +00:00
return;
}
SCSIZE nC, nR;
pResMat->GetDimensions(nC, nR);
if (nC != 1 && nR != 1)
{
// Result matrix must be a vector.
PushIllegalParameter();
return;
}
2000-09-18 23:16:46 +00:00
}
break;
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
case svDouble:
fResVal = GetDouble();
break;
case svString:
aResStr = GetString();
break;
case svSingleRef:
PopSingleRef( aResAdr );
break;
default:
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalParameter();
2000-09-18 23:16:46 +00:00
return;
}
}
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
// For double, string and single reference.
double fDataVal = 0.0;
String aDataStr;
ScAddress aDataAdr;
bool bValueData = false;
// Get the data-result range and also determine whether this is vertical
// lookup or horizontal lookup.
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
StackVar eDataArrayType = GetStackType();
switch (eDataArrayType)
{
case svDoubleRef:
2000-09-18 23:16:46 +00:00
{
SCTAB nTabJunk;
PopDoubleRef(nCol1, nRow1, nTab1, nCol2, nRow2, nTabJunk);
if (nTab1 != nTabJunk)
{
PushIllegalParameter();
return;
}
bVertical = (nRow2 - nRow1) >= (nCol2 - nCol1);
nLenMajor = bVertical ? nRow2 - nRow1 + 1 : nCol2 - nCol1 + 1;
2000-09-18 23:16:46 +00:00
}
break;
case svMatrix:
case svExternalSingleRef:
case svExternalDoubleRef:
2000-09-18 23:16:46 +00:00
{
pDataMat = GetMatrix();
if (!pDataMat)
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalParameter();
2000-09-18 23:16:46 +00:00
return;
}
SCSIZE nC, nR;
pDataMat->GetDimensions(nC, nR);
bVertical = (nR >= nC);
nLenMajor = bVertical ? nR : nC;
2000-09-18 23:16:46 +00:00
}
break;
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
case svDouble:
{
fDataVal = GetDouble();
bValueData = true;
}
break;
case svString:
{
aDataStr = GetString();
}
break;
case svSingleRef:
{
PopSingleRef( aDataAdr );
const ScBaseCell* pDataCell = GetCell( aDataAdr );
if (HasCellEmptyData( pDataCell))
{
// Empty cells aren't found anywhere, bail out early.
SetError( NOTAVAILABLE);
}
else if (HasCellValueData( pDataCell))
{
fDataVal = GetCellValue( aDataAdr, pDataCell );
bValueData = true;
}
else
GetCellString( aDataStr, pDataCell );
}
break;
default:
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
SetError( errIllegalParameter);
}
if (nGlobalError)
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
PushError( nGlobalError);
return;
}
// Get the lookup value.
ScQueryParam aParam;
ScQueryEntry& rEntry = aParam.GetEntry(0);
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
if ( !FillEntry(rEntry) )
return;
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
if ( eDataArrayType == svDouble || eDataArrayType == svString ||
eDataArrayType == svSingleRef )
{
// Delta position for a single value is always 0.
// Found if data <= query, but not if query is string and found data is
// numeric or vice versa. This is how Excel does it but doesn't
// document it.
bool bFound = false;
ScQueryEntry::Item& rItem = rEntry.GetQueryItem();
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
if ( bValueData )
{
if (rItem.meType == ScQueryEntry::ByString)
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
bFound = false;
else
bFound = (fDataVal <= rItem.mfVal);
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
}
else
{
if (rItem.meType != ScQueryEntry::ByString)
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
bFound = false;
else
bFound = (ScGlobal::GetCollator()->compareString(aDataStr, rItem.maString) <= 0);
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
}
if (!bFound)
{
PushNA();
return;
}
if (pResMat)
{
2010-11-07 00:20:50 -04:00
if (pResMat->IsValue( 0, 0 ))
PushDouble(pResMat->GetDouble( 0, 0 ));
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
else
2010-11-07 00:20:50 -04:00
PushString(pResMat->GetString( 0, 0 ));
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
}
else if (nParamCount == 3)
{
switch (eResArrayType)
{
case svDouble:
PushDouble( fResVal );
break;
case svString:
PushString( aResStr );
break;
case svDoubleRef:
aResAdr.Set( nResCol1, nResRow1, nResTab);
// fallthru
case svSingleRef:
PushCellResultToken( true, aResAdr, NULL, NULL);
break;
default:
OSL_FAIL( "ScInterpreter::ScLookup: unhandled eResArrayType, single value data");
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
}
}
else
{
switch (eDataArrayType)
{
case svDouble:
PushDouble( fDataVal );
break;
case svString:
PushString( aDataStr );
break;
case svSingleRef:
PushCellResultToken( true, aDataAdr, NULL, NULL);
break;
default:
OSL_FAIL( "ScInterpreter::ScLookup: unhandled eDataArrayType, single value data");
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
}
}
return;
}
// Now, perform the search to compute the delta position (nDelta).
if (pDataMat)
{
// Data array is given as a matrix.
rEntry.bDoQuery = true;
rEntry.eOp = SC_LESS_EQUAL;
bool bFound = false;
SCSIZE nC, nR;
pDataMat->GetDimensions(nC, nR);
// In case of non-vector matrix, only search the first row or column.
ScMatrixRef pDataMat2;
if (bVertical)
{
ScMatrixRef pTempMat(new ScMatrix(1, nR, 0.0));
for (SCSIZE i = 0; i < nR; ++i)
if (pDataMat->IsValue(0, i))
pTempMat->PutDouble(pDataMat->GetDouble(0, i), 0, i);
else
pTempMat->PutString(pDataMat->GetString(0, i), 0, i);
pDataMat2 = pTempMat;
2000-09-18 23:16:46 +00:00
}
else
{
ScMatrixRef pTempMat(new ScMatrix(nC, 1, 0.0));
for (SCSIZE i = 0; i < nC; ++i)
if (pDataMat->IsValue(i, 0))
pTempMat->PutDouble(pDataMat->GetDouble(i, 0), i, 0);
else
pTempMat->PutString(pDataMat->GetString(i, 0), i, 0);
pDataMat2 = pTempMat;
}
VectorMatrixAccessor aMatAcc2(*pDataMat2, bVertical);
// binary search for non-equality mode (the source data is
// assumed to be sorted in ascending order).
SCCOLROW nDelta = -1;
SCSIZE nFirst = 0, nLast = nLenMajor-1; //, nHitIndex = 0;
for (SCSIZE nLen = nLast-nFirst; nLen > 0; nLen = nLast-nFirst)
{
SCSIZE nMid = nFirst + nLen/2;
sal_Int32 nCmp = lcl_CompareMatrix2Query( nMid, aMatAcc2, rEntry);
if (nCmp == 0)
2000-09-18 23:16:46 +00:00
{
// exact match. find the last item with the same value.
lcl_GetLastMatch( nMid, aMatAcc2, nLenMajor, false);
nDelta = nMid;
bFound = true;
break;
2000-09-18 23:16:46 +00:00
}
if (nLen == 1) // first and last items are next to each other.
2000-09-18 23:16:46 +00:00
{
nDelta = nCmp < 0 ? nLast - 1 : nFirst - 1;
// If already the 1st item is greater there's nothing found.
bFound = (nDelta >= 0);
break;
2000-09-18 23:16:46 +00:00
}
if (nCmp < 0)
nFirst = nMid;
else
nLast = nMid;
}
if (nDelta == static_cast<SCCOLROW>(nLenMajor-2)) // last item
{
sal_Int32 nCmp = lcl_CompareMatrix2Query(nDelta+1, aMatAcc2, rEntry);
if (nCmp <= 0)
{
// either the last item is an exact match or the real
// hit is beyond the last item.
nDelta += 1;
bFound = true;
}
}
else if (nDelta > 0) // valid hit must be 2nd item or higher
{
// non-exact match
bFound = true;
}
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
// With 0-9 < A-Z, if query is numeric and data found is string, or
// vice versa, the (yet another undocumented) Excel behavior is to
// return #N/A instead.
if (bFound)
{
2010-06-29 23:32:33 -04:00
VectorMatrixAccessor aMatAcc(*pDataMat, bVertical);
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
SCCOLROW i = nDelta;
2010-06-29 23:32:33 -04:00
SCSIZE n = aMatAcc.GetElementCount();
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
if (static_cast<SCSIZE>(i) >= n)
i = static_cast<SCCOLROW>(n);
bool bByString = rEntry.GetQueryItem().meType == ScQueryEntry::ByString;
if (bByString == aMatAcc.IsValue(i))
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
bFound = false;
}
if (!bFound)
{
PushNA();
return;
}
// Now that we've found the delta, push the result back to the cell.
if (pResMat)
{
2010-06-29 23:32:33 -04:00
VectorMatrixAccessor aResMatAcc(*pResMat, bVertical);
// result array is matrix.
2010-06-29 23:32:33 -04:00
if (static_cast<SCSIZE>(nDelta) >= aResMatAcc.GetElementCount())
2000-09-18 23:16:46 +00:00
{
PushNA();
return;
}
2010-06-29 23:32:33 -04:00
if (aResMatAcc.IsValue(nDelta))
PushDouble(aResMatAcc.GetDouble(nDelta));
else
2010-06-29 23:32:33 -04:00
PushString(aResMatAcc.GetString(nDelta));
}
else if (nParamCount == 3)
{
// result array is cell range.
ScAddress aAdr;
aAdr.SetTab(nResTab);
bool bResVertical = (nResRow2 - nResRow1) > 0;
if (bResVertical)
{
SCROW nTempRow = static_cast<SCROW>(nResRow1 + nDelta);
if (nTempRow > MAXROW)
2000-09-18 23:16:46 +00:00
{
PushDouble(0);
return;
}
aAdr.SetCol(nResCol1);
aAdr.SetRow(nTempRow);
}
else
{
SCCOL nTempCol = static_cast<SCCOL>(nResCol1 + nDelta);
if (nTempCol > MAXCOL)
{
PushDouble(0);
return;
}
aAdr.SetCol(nTempCol);
aAdr.SetRow(nResRow1);
}
PushCellResultToken(true, aAdr, NULL, NULL);
}
else
{
// no result array. Use the data array to get the final value from.
if (bVertical)
{
if (pDataMat->IsValue(nC-1, nDelta))
PushDouble(pDataMat->GetDouble(nC-1, nDelta));
else
PushString(pDataMat->GetString(nC-1, nDelta));
}
else
2000-09-18 23:16:46 +00:00
{
if (pDataMat->IsValue(nDelta, nR-1))
PushDouble(pDataMat->GetDouble(nDelta, nR-1));
else
PushString(pDataMat->GetString(nDelta, nR-1));
2000-09-18 23:16:46 +00:00
}
}
return;
}
// Perform cell range search.
aParam.nCol1 = nCol1;
aParam.nRow1 = nRow1;
aParam.nCol2 = bVertical ? nCol1 : nCol2;
aParam.nRow2 = bVertical ? nRow2 : nRow1;
aParam.bByRow = bVertical;
2011-08-14 16:10:05 +02:00
rEntry.bDoQuery = true;
rEntry.eOp = SC_LESS_EQUAL;
rEntry.nField = nCol1;
ScQueryEntry::Item& rItem = rEntry.GetQueryItem();
if (rItem.meType == ScQueryEntry::ByString)
aParam.bRegExp = MayBeRegExp(rItem.maString, pDok);
ScQueryCellIterator aCellIter(pDok, nTab1, aParam, false);
SCCOL nC;
SCROW nR;
// Advance Entry.nField in iterator upon switching columns if
// lookup in row.
aCellIter.SetAdvanceQueryParamEntryField(!bVertical);
if ( !aCellIter.FindEqualOrSortedLastInRange(nC, nR) )
{
PushNA();
return;
}
SCCOLROW nDelta = bVertical ? static_cast<SCSIZE>(nR-nRow1) : static_cast<SCSIZE>(nC-nCol1);
if (pResMat)
{
2010-06-29 23:32:33 -04:00
VectorMatrixAccessor aResMatAcc(*pResMat, bVertical);
// Use the matrix result array.
2010-06-29 23:32:33 -04:00
if (aResMatAcc.IsValue(nDelta))
PushDouble(aResMatAcc.GetDouble(nDelta));
2000-09-18 23:16:46 +00:00
else
2010-06-29 23:32:33 -04:00
PushString(aResMatAcc.GetString(nDelta));
}
else if (nParamCount == 3)
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
switch (eResArrayType)
2000-09-18 23:16:46 +00:00
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
case svDoubleRef:
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
// Use the result array vector. Note that the result array is assumed
// to be a vector (i.e. 1-dimensinoal array).
ScAddress aAdr;
aAdr.SetTab(nResTab);
bool bResVertical = (nResRow2 - nResRow1) > 0;
if (bResVertical)
{
SCROW nTempRow = static_cast<SCROW>(nResRow1 + nDelta);
if (nTempRow > MAXROW)
{
PushDouble(0);
return;
}
aAdr.SetCol(nResCol1);
aAdr.SetRow(nTempRow);
}
else
{
SCCOL nTempCol = static_cast<SCCOL>(nResCol1 + nDelta);
if (nTempCol > MAXCOL)
{
PushDouble(0);
return;
}
aAdr.SetCol(nTempCol);
aAdr.SetRow(nResRow1);
}
PushCellResultToken( true, aAdr, NULL, NULL);
}
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
break;
case svDouble:
case svString:
case svSingleRef:
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
if (nDelta != 0)
PushNA();
else
{
switch (eResArrayType)
{
case svDouble:
PushDouble( fResVal );
break;
case svString:
PushString( aResStr );
break;
case svSingleRef:
PushCellResultToken( true, aResAdr, NULL, NULL);
break;
default:
; // nothing
}
}
}
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
break;
default:
OSL_FAIL( "ScInterpreter::ScLookup: unhandled eResArrayType, range search");
2000-09-18 23:16:46 +00:00
}
}
else
{
// Regardless of whether or not the result array exists, the last
// array is always used as the "result" array.
ScAddress aAdr;
aAdr.SetTab(nTab1);
if (bVertical)
2000-09-18 23:16:46 +00:00
{
SCROW nTempRow = static_cast<SCROW>(nRow1 + nDelta);
if (nTempRow > MAXROW)
2000-09-18 23:16:46 +00:00
{
PushDouble(0);
return;
2000-09-18 23:16:46 +00:00
}
aAdr.SetCol(nCol2);
aAdr.SetRow(nTempRow);
}
else
{
SCCOL nTempCol = static_cast<SCCOL>(nCol1 + nDelta);
if (nTempCol > MAXCOL)
2000-09-18 23:16:46 +00:00
{
PushDouble(0);
return;
2000-09-18 23:16:46 +00:00
}
aAdr.SetCol(nTempCol);
aAdr.SetRow(nRow2);
2000-09-18 23:16:46 +00:00
}
PushCellResultToken(true, aAdr, NULL, NULL);
2000-09-18 23:16:46 +00:00
}
}
void ScInterpreter::ScHLookup()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScHLookup" );
2011-08-14 16:10:05 +02:00
CalculateLookup(true);
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
}
2011-08-14 16:10:05 +02:00
void ScInterpreter::CalculateLookup(bool HLookup)
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::CalculateLookup" );
sal_uInt8 nParamCount = GetByte();
2000-09-18 23:16:46 +00:00
if ( MustHaveParamCount( nParamCount, 3, 4 ) )
{
2011-08-14 16:10:05 +02:00
bool bSorted;
2000-09-18 23:16:46 +00:00
if (nParamCount == 4)
bSorted = GetBool();
else
2011-08-14 16:10:05 +02:00
bSorted = true;
double fIndex = ::rtl::math::approxFloor( GetDouble() ) - 1.0;
ScMatrixRef pMat = NULL;
SCSIZE nC = 0, nR = 0;
SCCOL nCol1 = 0;
SCROW nRow1 = 0;
SCTAB nTab1 = 0;
SCCOL nCol2 = 0;
SCROW nRow2 = 0;
SCTAB nTab2;
StackVar eType = GetStackType();
if (eType == svDoubleRef)
2000-09-18 23:16:46 +00:00
{
PopDoubleRef(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2);
if (nTab1 != nTab2)
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalParameter();
2000-09-18 23:16:46 +00:00
return;
}
}
else if (eType == svSingleRef)
{
PopSingleRef(nCol1, nRow1, nTab1);
nCol2 = nCol1;
nRow2 = nRow1;
}
else if (eType == svMatrix || eType == svExternalDoubleRef || eType == svExternalSingleRef)
2000-09-18 23:16:46 +00:00
{
pMat = GetMatrix();
2000-09-18 23:16:46 +00:00
if (pMat)
pMat->GetDimensions(nC, nR);
else
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalParameter();
2000-09-18 23:16:46 +00:00
return;
}
}
else
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalParameter();
2000-09-18 23:16:46 +00:00
return;
}
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
if ( fIndex < 0.0 || (HLookup ? (pMat ? (fIndex >= nR) : (fIndex+nRow1 > nRow2)) : (pMat ? (fIndex >= nC) : (fIndex+nCol1 > nCol2)) ) )
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalArgument();
2000-09-18 23:16:46 +00:00
return;
}
SCROW nZIndex = static_cast<SCROW>(fIndex);
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
SCCOL nSpIndex = static_cast<SCCOL>(fIndex);
2000-09-18 23:16:46 +00:00
if (!pMat)
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
{
2000-09-18 23:16:46 +00:00
nZIndex += nRow1; // Wertzeile
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
nSpIndex = sal::static_int_cast<SCCOL>( nSpIndex + nCol1 ); // value column
}
2000-09-18 23:16:46 +00:00
if (nGlobalError == 0)
{
ScQueryParam rParam;
rParam.nCol1 = nCol1;
rParam.nRow1 = nRow1;
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
if ( HLookup )
{
rParam.nCol2 = nCol2;
rParam.nRow2 = nRow1; // nur in der ersten Zeile suchen
rParam.bByRow = false;
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
} // if ( HLookup )
else
{
rParam.nCol2 = nCol1; // nur in der ersten Spalte suchen
rParam.nRow2 = nRow2;
rParam.nTab = nTab1;
}
2000-09-18 23:16:46 +00:00
ScQueryEntry& rEntry = rParam.GetEntry(0);
2011-08-14 16:10:05 +02:00
rEntry.bDoQuery = true;
2000-09-18 23:16:46 +00:00
if ( bSorted )
rEntry.eOp = SC_LESS_EQUAL;
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
if ( !FillEntry(rEntry) )
return;
ScQueryEntry::Item& rItem = rEntry.GetQueryItem();
if (rItem.meType == ScQueryEntry::ByString)
rParam.bRegExp = MayBeRegExp(rItem.maString, pDok);
2000-09-18 23:16:46 +00:00
if (pMat)
{
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
SCSIZE nMatCount = HLookup ? nC : nR;
SCSIZE nDelta = SCSIZE_MAX;
if (rItem.meType == ScQueryEntry::ByString)
2000-09-18 23:16:46 +00:00
{
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
//!!!!!!!
//! TODO: enable regex on matrix strings
//!!!!!!!
const rtl::OUString& rParamStr = rItem.maString;
2000-09-18 23:16:46 +00:00
if ( bSorted )
{
CWS-TOOLING: integrate CWS oj18 2009-08-21 15:08:49 +0200 oj r275263 : wrong check 2009-08-21 08:56:01 +0200 oj r275215 : missing not 2009-08-20 07:27:13 +0200 oj r275164 : use new method from global 2009-08-19 10:22:35 +0200 oj r275138 : call GetLocale instead of pLocale 2009-08-18 10:39:32 +0200 oj r275082 : missing header include 2009-08-18 10:09:44 +0200 oj r275081 : new methods at global 2009-08-18 10:09:00 +0200 oj r275080 : unused var 2009-08-18 08:59:04 +0200 oj r275078 : move files from classes to xml 2009-08-17 14:58:16 +0200 oj r275056 : CWS-TOOLING: rebase CWS oj18 to trunk@275001 (milestone: DEV300:m55) 2009-08-17 13:29:44 +0200 oj r275047 : compile error 2009-08-17 13:27:47 +0200 oj r275045 : compile error 2009-08-17 11:44:54 +0200 oj r275040 : add dep 2009-07-22 14:26:05 +0200 oj r274240 : move unused services into fwl 2009-07-22 14:25:35 +0200 oj r274239 : move unused services into fwl 2009-07-22 13:47:45 +0200 oj r274233 : remove some unused code 2009-07-22 09:06:20 +0200 oj r274219 : export dbtoolsclient dbcharsethelper for sc 2009-07-22 08:48:58 +0200 oj r274218 : create NumberFormatter on demand 2009-07-22 08:39:23 +0200 oj r274217 : change char to sal_Char 2009-07-22 07:33:34 +0200 oj r274214 : export dbtoolsclient dbcharsethelper for sc 2009-07-22 07:30:04 +0200 oj r274213 : late init of numberformatter and breakiterator 2009-07-22 07:28:55 +0200 oj r274212 : export dbtoolsclient dbcharsethelper for sc 2009-07-21 13:43:28 +0200 oj r274196 : check if quick start is enbaled 2009-07-21 13:40:09 +0200 oj r274195 : check config entry for UiEventsLogger 2009-07-21 13:37:40 +0200 oj r274194 : code refactoring, remove of duplicate code and some late inits and removale of not needed files 2009-07-21 13:35:38 +0200 oj r274193 : code refactoring, remove of duplicate code and some late inits and removale of not needed files 2009-07-21 13:33:41 +0200 oj r274192 : doc meta data will now be created on demand 2009-07-21 13:13:40 +0200 oj r274187 : load ldap functions on demand 2009-07-21 13:03:17 +0200 oj r274183 : late init of TransliterationImpl 2009-07-21 12:36:10 +0200 oj r274180 : late init of charClass
2009-09-08 04:57:32 +00:00
static CollatorWrapper* pCollator = ScGlobal::GetCollator();
for (SCSIZE i = 0; i < nMatCount; i++)
2000-09-18 23:16:46 +00:00
{
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
if (HLookup ? pMat->IsString(i, 0) : pMat->IsString(0, i))
{
sal_Int32 nRes =
pCollator->compareString( HLookup ? pMat->GetString(i,0) : pMat->GetString(0,i), rParamStr);
if (nRes <= 0)
nDelta = i;
else if (i>0) // #i2168# ignore first mismatch
i = nMatCount+1;
}
2000-09-18 23:16:46 +00:00
else
nDelta = i;
}
}
else
{
for (SCSIZE i = 0; i < nMatCount; i++)
2000-09-18 23:16:46 +00:00
{
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
if (HLookup ? pMat->IsString(i, 0) : pMat->IsString(0, i))
2000-09-18 23:16:46 +00:00
{
CWS-TOOLING: integrate CWS oj18 2009-08-21 15:08:49 +0200 oj r275263 : wrong check 2009-08-21 08:56:01 +0200 oj r275215 : missing not 2009-08-20 07:27:13 +0200 oj r275164 : use new method from global 2009-08-19 10:22:35 +0200 oj r275138 : call GetLocale instead of pLocale 2009-08-18 10:39:32 +0200 oj r275082 : missing header include 2009-08-18 10:09:44 +0200 oj r275081 : new methods at global 2009-08-18 10:09:00 +0200 oj r275080 : unused var 2009-08-18 08:59:04 +0200 oj r275078 : move files from classes to xml 2009-08-17 14:58:16 +0200 oj r275056 : CWS-TOOLING: rebase CWS oj18 to trunk@275001 (milestone: DEV300:m55) 2009-08-17 13:29:44 +0200 oj r275047 : compile error 2009-08-17 13:27:47 +0200 oj r275045 : compile error 2009-08-17 11:44:54 +0200 oj r275040 : add dep 2009-07-22 14:26:05 +0200 oj r274240 : move unused services into fwl 2009-07-22 14:25:35 +0200 oj r274239 : move unused services into fwl 2009-07-22 13:47:45 +0200 oj r274233 : remove some unused code 2009-07-22 09:06:20 +0200 oj r274219 : export dbtoolsclient dbcharsethelper for sc 2009-07-22 08:48:58 +0200 oj r274218 : create NumberFormatter on demand 2009-07-22 08:39:23 +0200 oj r274217 : change char to sal_Char 2009-07-22 07:33:34 +0200 oj r274214 : export dbtoolsclient dbcharsethelper for sc 2009-07-22 07:30:04 +0200 oj r274213 : late init of numberformatter and breakiterator 2009-07-22 07:28:55 +0200 oj r274212 : export dbtoolsclient dbcharsethelper for sc 2009-07-21 13:43:28 +0200 oj r274196 : check if quick start is enbaled 2009-07-21 13:40:09 +0200 oj r274195 : check config entry for UiEventsLogger 2009-07-21 13:37:40 +0200 oj r274194 : code refactoring, remove of duplicate code and some late inits and removale of not needed files 2009-07-21 13:35:38 +0200 oj r274193 : code refactoring, remove of duplicate code and some late inits and removale of not needed files 2009-07-21 13:33:41 +0200 oj r274192 : doc meta data will now be created on demand 2009-07-21 13:13:40 +0200 oj r274187 : load ldap functions on demand 2009-07-21 13:03:17 +0200 oj r274183 : late init of TransliterationImpl 2009-07-21 12:36:10 +0200 oj r274180 : late init of charClass
2009-09-08 04:57:32 +00:00
if ( ScGlobal::GetpTransliteration()->isEqual(
HLookup ? pMat->GetString(i,0) : pMat->GetString(0,i), rParamStr))
{
nDelta = i;
i = nMatCount + 1;
}
2000-09-18 23:16:46 +00:00
}
}
}
}
else
{
if ( bSorted )
{
// #i2168# ignore strings
for (SCSIZE i = 0; i < nMatCount; i++)
2000-09-18 23:16:46 +00:00
{
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
if (!(HLookup ? pMat->IsString(i, 0) : pMat->IsString(0, i)))
{
if ((HLookup ? pMat->GetDouble(i,0) : pMat->GetDouble(0,i)) <= rItem.mfVal)
nDelta = i;
else
i = nMatCount+1;
}
2000-09-18 23:16:46 +00:00
}
}
else
{
for (SCSIZE i = 0; i < nMatCount; i++)
2000-09-18 23:16:46 +00:00
{
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
if (!(HLookup ? pMat->IsString(i, 0) : pMat->IsString(0, i)))
2000-09-18 23:16:46 +00:00
{
if ((HLookup ? pMat->GetDouble(i,0) : pMat->GetDouble(0,i)) == rItem.mfVal)
{
nDelta = i;
i = nMatCount + 1;
}
2000-09-18 23:16:46 +00:00
}
}
}
}
if ( nDelta != SCSIZE_MAX )
2000-09-18 23:16:46 +00:00
{
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
SCSIZE nX = static_cast<SCSIZE>(nSpIndex);
SCSIZE nY = nDelta;
if ( HLookup )
{
nX = nDelta;
nY = static_cast<SCSIZE>(nZIndex);
}
if ( pMat->IsString( nX, nY) )
PushString(pMat->GetString( nX,nY));
2000-09-18 23:16:46 +00:00
else
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
PushDouble(pMat->GetDouble( nX,nY));
2000-09-18 23:16:46 +00:00
}
else
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushNA();
2000-09-18 23:16:46 +00:00
}
else
{
rEntry.nField = nCol1;
2011-08-14 16:10:05 +02:00
bool bFound = false;
SCCOL nCol = 0;
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
SCROW nRow = 0;
if ( bSorted )
rEntry.eOp = SC_LESS_EQUAL;
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
if ( HLookup )
2000-09-18 23:16:46 +00:00
{
ScQueryCellIterator aCellIter(pDok, nTab1, rParam, false);
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
// advance Entry.nField in Iterator upon switching columns
2011-08-14 16:10:05 +02:00
aCellIter.SetAdvanceQueryParamEntryField( true );
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
if ( bSorted )
{
SCROW nRow1_temp;
bFound = aCellIter.FindEqualOrSortedLastInRange( nCol, nRow1_temp );
}
else if ( aCellIter.GetFirst() )
{
2011-08-14 16:10:05 +02:00
bFound = true;
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
nCol = aCellIter.GetCol();
}
nRow = nZIndex;
} // if ( HLookup )
else
{
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
ScAddress aResultPos( nCol1, nRow1, nTab1);
bFound = LookupQueryWithCache( aResultPos, rParam);
nRow = aResultPos.Row();
nCol = nSpIndex;
}
if ( bFound )
{
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
ScAddress aAdr( nCol, nRow, nTab1 );
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushCellResultToken( true, aAdr, NULL, NULL);
2000-09-18 23:16:46 +00:00
}
else
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushNA();
2000-09-18 23:16:46 +00:00
}
}
else
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalParameter();
2000-09-18 23:16:46 +00:00
}
}
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
bool ScInterpreter::FillEntry(ScQueryEntry& rEntry)
2000-09-18 23:16:46 +00:00
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::FillEntry" );
ScQueryEntry::Item& rItem = rEntry.GetQueryItem();
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
switch ( GetStackType() )
2000-09-18 23:16:46 +00:00
{
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
case svDouble:
2000-09-18 23:16:46 +00:00
{
rItem.meType = ScQueryEntry::ByValue;
rItem.mfVal = GetDouble();
2000-09-18 23:16:46 +00:00
}
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
break;
case svString:
2000-09-18 23:16:46 +00:00
{
const String& sStr = GetString();
rItem.meType = ScQueryEntry::ByString;
rItem.maString = sStr;
2000-09-18 23:16:46 +00:00
}
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
break;
case svDoubleRef :
case svSingleRef :
2000-09-18 23:16:46 +00:00
{
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
ScAddress aAdr;
if ( !PopDoubleRefOrSingleRef( aAdr ) )
2000-09-18 23:16:46 +00:00
{
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
PushInt(0);
return false;
2000-09-18 23:16:46 +00:00
}
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
ScBaseCell* pCell = GetCell( aAdr );
if (HasCellValueData(pCell))
2000-09-18 23:16:46 +00:00
{
rItem.meType = ScQueryEntry::ByValue;
rItem.mfVal = GetCellValue(aAdr, pCell);
2000-09-18 23:16:46 +00:00
}
else
{
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
if ( GetCellType( pCell ) == CELLTYPE_NOTE )
{
rItem.meType = ScQueryEntry::ByValue;
rItem.mfVal = 0.0;
2000-09-18 23:16:46 +00:00
}
else
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
{
String sStr;
GetCellString(sStr, pCell);
rItem.meType = ScQueryEntry::ByString;
rItem.maString = sStr;
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
}
2000-09-18 23:16:46 +00:00
}
}
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
break;
case svMatrix :
{
String aStr;
const ScMatValType nType = GetDoubleOrStringFromMatrix(rItem.mfVal, aStr);
rItem.maString = aStr;
rItem.meType = ScMatrix::IsNonValueType(nType) ?
ScQueryEntry::ByString : ScQueryEntry::ByValue;
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
}
break;
default:
{
PushIllegalParameter();
return false;
}
} // switch ( GetStackType() )
return true;
}
void ScInterpreter::ScVLookup()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScVLookup" );
CalculateLookup(false);
2000-09-18 23:16:46 +00:00
}
void ScInterpreter::ScSubTotal()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSubTotal" );
sal_uInt8 nParamCount = GetByte();
2000-09-18 23:16:46 +00:00
if ( MustHaveParamCountMin( nParamCount, 2 ) )
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
// We must fish the 1st parameter deep from the stack! And push it on top.
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
const FormulaToken* p = pStack[ sp - nParamCount ];
2000-09-18 23:16:46 +00:00
PushTempToken( *p );
int nFunc = (int) ::rtl::math::approxFloor( GetDouble() );
bool bIncludeHidden = true;
if (nFunc > 100)
{
// For opcodes 101 through 111, we need to skip hidden cells.
// Other than that these opcodes are identical to 1 through 11.
bIncludeHidden = false;
nFunc -= 100;
}
if (nFunc < 1 || nFunc > 11 || !bIncludeHidden)
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalArgument(); // simulate return on stack, not SetError(...)
2000-09-18 23:16:46 +00:00
else
{
// TODO: Make use of bIncludeHidden flag. Then it's false, we do need to skip hidden cells.
2000-09-18 23:16:46 +00:00
cPar = nParamCount - 1;
2011-08-14 16:10:05 +02:00
glSubTotal = true;
2000-09-18 23:16:46 +00:00
switch( nFunc )
{
case SUBTOTAL_FUNC_AVE : ScAverage(); break;
case SUBTOTAL_FUNC_CNT : ScCount(); break;
case SUBTOTAL_FUNC_CNT2 : ScCount2(); break;
case SUBTOTAL_FUNC_MAX : ScMax(); break;
case SUBTOTAL_FUNC_MIN : ScMin(); break;
case SUBTOTAL_FUNC_PROD : ScProduct(); break;
case SUBTOTAL_FUNC_STD : ScStDev(); break;
case SUBTOTAL_FUNC_STDP : ScStDevP(); break;
case SUBTOTAL_FUNC_SUM : ScSum(); break;
case SUBTOTAL_FUNC_VAR : ScVar(); break;
case SUBTOTAL_FUNC_VARP : ScVarP(); break;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
default : PushIllegalArgument(); break;
2000-09-18 23:16:46 +00:00
}
glSubTotal = false;
2000-09-18 23:16:46 +00:00
}
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
// Get rid of the 1st (fished) parameter.
2000-09-18 23:16:46 +00:00
double nVal = GetDouble();
Pop();
PushDouble( nVal );
}
}
2011-08-14 16:10:05 +02:00
ScDBQueryParamBase* ScInterpreter::GetDBParams( bool& rMissingField )
2000-09-18 23:16:46 +00:00
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::GetDBParams" );
2011-08-14 16:10:05 +02:00
bool bAllowMissingField = false;
if ( rMissingField )
{
2011-08-14 16:10:05 +02:00
bAllowMissingField = true;
rMissingField = false;
}
2000-09-18 23:16:46 +00:00
if ( GetByte() == 3 )
{
// First, get the query criteria range.
SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr<ScDBRangeBase> pQueryRef( PopDBDoubleRef() );
SAL_WNODEPRECATED_DECLARATIONS_POP
if (!pQueryRef.get())
return NULL;
2000-09-18 23:16:46 +00:00
2011-08-14 16:10:05 +02:00
bool bByVal = true;
double nVal = 0.0;
2000-09-18 23:16:46 +00:00
String aStr;
ScRange aMissingRange;
2011-08-14 16:10:05 +02:00
bool bRangeFake = false;
2000-09-18 23:16:46 +00:00
switch (GetStackType())
{
case svDouble :
nVal = ::rtl::math::approxFloor( GetDouble() );
if ( bAllowMissingField && nVal == 0.0 )
2011-08-14 16:10:05 +02:00
rMissingField = true; // fake missing parameter
2000-09-18 23:16:46 +00:00
break;
case svString :
bByVal = false;
2000-09-18 23:16:46 +00:00
aStr = GetString();
break;
case svSingleRef :
{
ScAddress aAdr;
PopSingleRef( aAdr );
ScBaseCell* pCell = GetCell( aAdr );
if (HasCellValueData(pCell))
nVal = GetCellValue( aAdr, pCell );
else
{
bByVal = false;
2000-09-18 23:16:46 +00:00
GetCellString(aStr, pCell);
}
}
break;
case svDoubleRef :
if ( bAllowMissingField )
{ // fake missing parameter for old SO compatibility
2011-08-14 16:10:05 +02:00
bRangeFake = true;
PopDoubleRef( aMissingRange );
}
else
{
PopError();
SetError( errIllegalParameter );
}
break;
case svMissing :
PopError();
if ( bAllowMissingField )
2011-08-14 16:10:05 +02:00
rMissingField = true;
else
SetError( errIllegalParameter );
break;
default:
PopError();
SetError( errIllegalParameter );
2000-09-18 23:16:46 +00:00
}
if (nGlobalError)
return NULL;
SAL_WNODEPRECATED_DECLARATIONS_PUSH
auto_ptr<ScDBRangeBase> pDBRef( PopDBDoubleRef() );
SAL_WNODEPRECATED_DECLARATIONS_POP
2000-09-18 23:16:46 +00:00
if (nGlobalError || !pDBRef.get())
return NULL;
if ( bRangeFake )
{
// range parameter must match entire database range
if (pDBRef->isRangeEqual(aMissingRange))
2011-08-14 16:10:05 +02:00
rMissingField = true;
else
SetError( errIllegalParameter );
}
if (nGlobalError)
return NULL;
SCCOL nField = pDBRef->getFirstFieldColumn();
if (rMissingField)
; // special case
else if (bByVal)
nField = pDBRef->findFieldColumn(static_cast<SCCOL>(nVal));
else
{
sal_uInt16 nErr = 0;
nField = pDBRef->findFieldColumn(aStr, &nErr);
SetError(nErr);
}
if (!ValidCol(nField))
return NULL;
SAL_WNODEPRECATED_DECLARATIONS_PUSH
auto_ptr<ScDBQueryParamBase> pParam( pDBRef->createQueryParam(pQueryRef.get()) );
SAL_WNODEPRECATED_DECLARATIONS_POP
if (pParam.get())
2000-09-18 23:16:46 +00:00
{
// An allowed missing field parameter sets the result field
// to any of the query fields, just to be able to return
// some cell from the iterator.
if ( rMissingField )
nField = static_cast<SCCOL>(pParam->GetEntry(0).nField);
pParam->mnField = nField;
SCSIZE nCount = pParam->GetEntryCount();
for ( SCSIZE i=0; i < nCount; i++ )
2000-09-18 23:16:46 +00:00
{
ScQueryEntry& rEntry = pParam->GetEntry(i);
if (!rEntry.bDoQuery)
break;
ScQueryEntry::Item& rItem = rEntry.GetQueryItem();
sal_uInt32 nIndex = 0;
const rtl::OUString& rQueryStr = rItem.maString;
bool bNumber = pFormatter->IsNumberFormat(
rQueryStr, nIndex, rItem.mfVal);
rItem.meType = bNumber ? ScQueryEntry::ByValue : ScQueryEntry::ByString;
if (!bNumber && !pParam->bRegExp)
pParam->bRegExp = MayBeRegExp(rQueryStr, pDok);
2000-09-18 23:16:46 +00:00
}
return pParam.release();
2000-09-18 23:16:46 +00:00
}
}
return NULL;
2000-09-18 23:16:46 +00:00
}
void ScInterpreter::DBIterator( ScIterFunc eFunc )
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::DBIterator" );
2000-09-18 23:16:46 +00:00
double nErg = 0.0;
double fMem = 0.0;
2011-08-14 16:10:05 +02:00
bool bNull = true;
sal_uLong nCount = 0;
2011-08-14 16:10:05 +02:00
bool bMissingField = false;
SAL_WNODEPRECATED_DECLARATIONS_PUSH
auto_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) );
SAL_WNODEPRECATED_DECLARATIONS_POP
if (pQueryParam.get())
2000-09-18 23:16:46 +00:00
{
if (!pQueryParam->IsValidFieldIndex())
{
SetError(errNoValue);
return;
}
ScDBQueryDataIterator aValIter(pDok, pQueryParam.release());
ScDBQueryDataIterator::Value aValue;
if ( aValIter.GetFirst(aValue) && !aValue.mnError )
2000-09-18 23:16:46 +00:00
{
switch( eFunc )
{
case ifPRODUCT: nErg = 1; break;
case ifMAX: nErg = -MAXDOUBLE; break;
2000-09-18 23:16:46 +00:00
case ifMIN: nErg = MAXDOUBLE; break;
default: ; // nothing
2000-09-18 23:16:46 +00:00
}
do
{
nCount++;
switch( eFunc )
{
case ifAVERAGE:
case ifSUM:
if ( bNull && aValue.mfValue != 0.0 )
2000-09-18 23:16:46 +00:00
{
bNull = false;
fMem = aValue.mfValue;
2000-09-18 23:16:46 +00:00
}
else
nErg += aValue.mfValue;
2000-09-18 23:16:46 +00:00
break;
case ifSUMSQ: nErg += aValue.mfValue * aValue.mfValue; break;
case ifPRODUCT: nErg *= aValue.mfValue; break;
case ifMAX: if( aValue.mfValue > nErg ) nErg = aValue.mfValue; break;
case ifMIN: if( aValue.mfValue < nErg ) nErg = aValue.mfValue; break;
default: ; // nothing
2000-09-18 23:16:46 +00:00
}
}
while ( aValIter.GetNext(aValue) && !aValue.mnError );
2000-09-18 23:16:46 +00:00
}
SetError(aValue.mnError);
2000-09-18 23:16:46 +00:00
}
else
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
SetError( errIllegalParameter);
2000-09-18 23:16:46 +00:00
switch( eFunc )
{
case ifCOUNT: nErg = nCount; break;
case ifSUM: nErg = ::rtl::math::approxAdd( nErg, fMem ); break;
case ifAVERAGE: nErg = ::rtl::math::approxAdd( nErg, fMem ) / nCount; break;
default: ; // nothing
2000-09-18 23:16:46 +00:00
}
PushDouble( nErg );
}
void ScInterpreter::ScDBSum()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScDBSum" );
2000-09-18 23:16:46 +00:00
DBIterator( ifSUM );
}
void ScInterpreter::ScDBCount()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScDBCount" );
2011-08-14 16:10:05 +02:00
bool bMissingField = true;
SAL_WNODEPRECATED_DECLARATIONS_PUSH
auto_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) );
SAL_WNODEPRECATED_DECLARATIONS_POP
if (pQueryParam.get())
{
sal_uLong nCount = 0;
if ( bMissingField && pQueryParam->GetType() == ScDBQueryParamBase::INTERNAL )
{ // count all matching records
// TODO: currently the QueryIterators only return cell pointers of
// existing cells, so if a query matches an empty cell there's
// nothing returned, and therefor not counted!
// Since this has ever been the case and this code here only came
// into existance to fix #i6899 and it never worked before we'll
// have to live with it until we reimplement the iterators to also
// return empty cells, which would mean to adapt all callers of
// iterators.
ScDBQueryParamInternal* p = static_cast<ScDBQueryParamInternal*>(pQueryParam.get());
p->nCol2 = p->nCol1; // Don't forget to select only one column.
SCTAB nTab = p->nTab;
// ScQueryCellIterator doesn't make use of ScDBQueryParamBase::mnField,
// so the source range has to be restricted, like before the introduction
// of ScDBQueryParamBase.
p->nCol1 = p->nCol2 = p->mnField;
ScQueryCellIterator aCellIter( pDok, nTab, *p);
if ( aCellIter.GetFirst() )
{
do
{
nCount++;
} while ( aCellIter.GetNext() );
}
}
else
{ // count only matching records with a value in the "result" field
if (!pQueryParam->IsValidFieldIndex())
{
SetError(errNoValue);
return;
}
ScDBQueryDataIterator aValIter( pDok, pQueryParam.release());
ScDBQueryDataIterator::Value aValue;
if ( aValIter.GetFirst(aValue) && !aValue.mnError )
{
do
{
nCount++;
2009-09-16 15:41:26 -04:00
}
while ( aValIter.GetNext(aValue) && !aValue.mnError );
}
SetError(aValue.mnError);
}
PushDouble( nCount );
}
else
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalParameter();
2000-09-18 23:16:46 +00:00
}
void ScInterpreter::ScDBCount2()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScDBCount2" );
2011-08-14 16:10:05 +02:00
bool bMissingField = true;
SAL_WNODEPRECATED_DECLARATIONS_PUSH
auto_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) );
SAL_WNODEPRECATED_DECLARATIONS_POP
2009-09-16 01:07:24 -04:00
if (pQueryParam.get())
2000-09-18 23:16:46 +00:00
{
if (!pQueryParam->IsValidFieldIndex())
{
SetError(errNoValue);
return;
}
sal_uLong nCount = 0;
pQueryParam->mbSkipString = false;
ScDBQueryDataIterator aValIter( pDok, pQueryParam.release());
ScDBQueryDataIterator::Value aValue;
if ( aValIter.GetFirst(aValue) && !aValue.mnError )
2000-09-18 23:16:46 +00:00
{
do
{
nCount++;
2009-09-16 15:41:26 -04:00
}
while ( aValIter.GetNext(aValue) && !aValue.mnError );
2000-09-18 23:16:46 +00:00
}
SetError(aValue.mnError);
2009-09-16 01:07:24 -04:00
PushDouble( nCount );
2000-09-18 23:16:46 +00:00
}
else
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalParameter();
2000-09-18 23:16:46 +00:00
}
void ScInterpreter::ScDBAverage()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScDBAverage" );
2000-09-18 23:16:46 +00:00
DBIterator( ifAVERAGE );
}
void ScInterpreter::ScDBMax()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScDBMax" );
2000-09-18 23:16:46 +00:00
DBIterator( ifMAX );
}
void ScInterpreter::ScDBMin()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScDBMin" );
2000-09-18 23:16:46 +00:00
DBIterator( ifMIN );
}
void ScInterpreter::ScDBProduct()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScDBProduct" );
2000-09-18 23:16:46 +00:00
DBIterator( ifPRODUCT );
}
void ScInterpreter::GetDBStVarParams( double& rVal, double& rValCount )
2000-09-18 23:16:46 +00:00
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::GetDBStVarParams" );
std::vector<double> values;
double vSum = 0.0;
double vMean = 0.0;
rValCount = 0.0;
double fSum = 0.0;
2011-08-14 16:10:05 +02:00
bool bMissingField = false;
SAL_WNODEPRECATED_DECLARATIONS_PUSH
auto_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) );
SAL_WNODEPRECATED_DECLARATIONS_POP
if (pQueryParam.get())
2000-09-18 23:16:46 +00:00
{
if (!pQueryParam->IsValidFieldIndex())
{
SetError(errNoValue);
return;
}
ScDBQueryDataIterator aValIter(pDok, pQueryParam.release());
ScDBQueryDataIterator::Value aValue;
if (aValIter.GetFirst(aValue) && !aValue.mnError)
2000-09-18 23:16:46 +00:00
{
do
{
rValCount++;
values.push_back(aValue.mfValue);
fSum += aValue.mfValue;
2000-09-18 23:16:46 +00:00
}
while ((aValue.mnError == 0) && aValIter.GetNext(aValue));
2000-09-18 23:16:46 +00:00
}
SetError(aValue.mnError);
2000-09-18 23:16:46 +00:00
}
else
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
SetError( errIllegalParameter);
vMean = fSum / values.size();
for (size_t i = 0; i < values.size(); i++)
vSum += (values[i] - vMean) * (values[i] - vMean);
rVal = vSum;
2000-09-18 23:16:46 +00:00
}
void ScInterpreter::ScDBStdDev()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScDBStdDev" );
double fVal, fCount;
GetDBStVarParams( fVal, fCount );
PushDouble( sqrt(fVal/(fCount-1)));
2000-09-18 23:16:46 +00:00
}
void ScInterpreter::ScDBStdDevP()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScDBStdDevP" );
double fVal, fCount;
GetDBStVarParams( fVal, fCount );
PushDouble( sqrt(fVal/fCount));
2000-09-18 23:16:46 +00:00
}
void ScInterpreter::ScDBVar()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScDBVar" );
double fVal, fCount;
GetDBStVarParams( fVal, fCount );
PushDouble(fVal/(fCount-1));
2000-09-18 23:16:46 +00:00
}
void ScInterpreter::ScDBVarP()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScDBVarP" );
double fVal, fCount;
GetDBStVarParams( fVal, fCount );
PushDouble(fVal/fCount);
2000-09-18 23:16:46 +00:00
}
void ScInterpreter::ScIndirect()
2000-09-18 23:16:46 +00:00
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScIndirect" );
sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 1, 2 ) )
{
// Reference address syntax for INDIRECT is configurable.
FormulaGrammar::AddressConvention eConv = GetGlobalConfig().meStringRefAddressSyntax;
if (eConv == FormulaGrammar::CONV_UNSPECIFIED)
// Use the current address syntax if unspecified.
eConv = pDok->GetAddressConvention();
if (nParamCount == 2 && 0.0 == ::rtl::math::approxFloor( GetDouble()))
CWS-TOOLING: integrate CWS odff05 2008-12-11 04:17:37 +0100 er r265237 : #i94555# AppendIntToken for GAMMADIST, Excel needs 4 parameters; also use AppendIntToken instead of AppendNumToken for POISSON 2008-12-11 04:04:27 +0100 er r265236 : #i96837# make cumulative parameter of POISSON optional; patch from <lvyue> with slight modifications 2008-12-11 03:35:03 +0100 er r265235 : #i96835# make base parameter of LOG() optional also in UI; patch from <lvyue> 2008-12-11 03:15:30 +0100 er r265234 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-10 18:14:16 +0100 er r265214 : DBG_... need semicolon 2008-12-05 00:49:55 +0100 er r264881 : WaE unxlngi6: declaration of 'pFuncInfo' shadows a previous local 2008-12-05 00:26:05 +0100 er r264879 : #i91547# BETADIST with optional density/cumulative parameter and much better precision; patch from <regina> 2008-12-04 22:51:40 +0100 er r264877 : #i91602# add expm1() and log1p() replacements; based on a patch from <regina> 2008-12-01 16:07:35 +0100 dr r264614 : #i93789# import of EUROCONVERT from XLSX/XLSB 2008-11-28 13:15:01 +0100 dr r264543 : #i93789# new sheet function EUROCONVERT + XLS import/export, patch contributed by lvyue 2008-11-26 14:54:23 +0100 er r264397 : CWS-TOOLING: rebase CWS odff05 to trunk@264325 (milestone: DEV300:m36) 2008-11-20 14:23:33 +0100 er r264053 : CWS-TOOLING: rebase CWS odff05 to trunk@263288 (milestone: DEV300:m35) 2008-11-19 18:07:43 +0100 er r264012 : merged from trunk 2008-11-19 17:51:36 +0100 er r264011 : migrate CWS odff05 to SVN
2009-01-06 13:57:48 +00:00
{
// Overwrite the config and try Excel R1C1.
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
eConv = FormulaGrammar::CONV_XL_R1C1;
CWS-TOOLING: integrate CWS odff05 2008-12-11 04:17:37 +0100 er r265237 : #i94555# AppendIntToken for GAMMADIST, Excel needs 4 parameters; also use AppendIntToken instead of AppendNumToken for POISSON 2008-12-11 04:04:27 +0100 er r265236 : #i96837# make cumulative parameter of POISSON optional; patch from <lvyue> with slight modifications 2008-12-11 03:35:03 +0100 er r265235 : #i96835# make base parameter of LOG() optional also in UI; patch from <lvyue> 2008-12-11 03:15:30 +0100 er r265234 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-10 18:14:16 +0100 er r265214 : DBG_... need semicolon 2008-12-05 00:49:55 +0100 er r264881 : WaE unxlngi6: declaration of 'pFuncInfo' shadows a previous local 2008-12-05 00:26:05 +0100 er r264879 : #i91547# BETADIST with optional density/cumulative parameter and much better precision; patch from <regina> 2008-12-04 22:51:40 +0100 er r264877 : #i91602# add expm1() and log1p() replacements; based on a patch from <regina> 2008-12-01 16:07:35 +0100 dr r264614 : #i93789# import of EUROCONVERT from XLSX/XLSB 2008-11-28 13:15:01 +0100 dr r264543 : #i93789# new sheet function EUROCONVERT + XLS import/export, patch contributed by lvyue 2008-11-26 14:54:23 +0100 er r264397 : CWS-TOOLING: rebase CWS odff05 to trunk@264325 (milestone: DEV300:m36) 2008-11-20 14:23:33 +0100 er r264053 : CWS-TOOLING: rebase CWS odff05 to trunk@263288 (milestone: DEV300:m35) 2008-11-19 18:07:43 +0100 er r264012 : merged from trunk 2008-11-19 17:51:36 +0100 er r264011 : migrate CWS odff05 to SVN
2009-01-06 13:57:48 +00:00
}
const ScAddress::Details aDetails( eConv, aPos );
SCTAB nTab = aPos.Tab();
2000-09-18 23:16:46 +00:00
String sRefStr( GetString() );
ScRefAddress aRefAd, aRefAd2;
CWS-TOOLING: integrate CWS calc51 2009-07-17 15:47:46 +0200 er r274098 : #i101544# more thorough reference checking in chart data ranges; also prevent some possible crash if invalid ranges were to be passed to document/cell access. 2009-07-16 14:20:11 +0200 er r274051 : #i101544# let ScRefTokenHelper::compileRangeRepresentation() fail on all possible non-reference occasions 2009-07-07 10:11:40 +0200 nn r273776 : #i35579# don't use long instead of sal_Int32 2009-07-03 16:41:39 +0200 nn r273711 : msvc warnings 2009-07-03 14:18:45 +0200 nn r273698 : msvc warning 2009-07-03 11:30:41 +0200 nn r273685 : #i35579# move new tokens to the end 2009-07-03 10:12:55 +0200 nn r273681 : CWS-TOOLING: rebase CWS calc51 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 17:57:30 +0200 nn r273529 : #i103027# EnterData: if it's a formula, don't pass EditTextObject to undo 2009-06-29 14:31:18 +0200 er r273474 : #i101544# #i101645# #i102388# applied diff from CWS dr68ooo311 2009-06-29 10:30:20 +0200 nn r273457 : #i103161# DeleteCells: always leave list action 2009-06-24 16:16:34 +0200 nn r273353 : gcc warnings 2009-06-17 11:50:28 +0200 tbe r273055 : #i35579# Standard filter requires more options 2009-06-17 11:44:22 +0200 tbe r273054 : #i35579# Standard filter requires more options 2009-06-17 11:22:23 +0200 tbe r273052 : #i35579# Standard filter requires more options 2009-06-15 18:29:32 +0200 nn r273006 : #160063# UseFormulaData: check parenthesis position 2009-06-12 15:41:16 +0200 nn r272923 : #i99250# handle range lists in DoAutoOutline (patch from dtardon) 2009-06-11 15:07:05 +0200 nn r272874 : #i86943# GetNextPos: skip overlapped cells 2009-06-11 11:17:37 +0200 nn r272856 : #i97726# EnterData: get text from EditTextObject for repeat string of undo action 2009-06-10 20:45:07 +0200 nn r272839 : #i102566# minimum amount of code between updates of calculation progress (patch by cmc) 2009-06-10 20:22:02 +0200 nn r272838 : #i69524# PasteFile: specify target for SID_OPENDOC 2009-06-09 17:33:08 +0200 nn r272789 : #i16615# absolute/relative reference conversion for cell ranges (patch by gaojingmei)
2009-07-28 10:04:47 +00:00
ScAddress::ExternalInfo aExtInfo;
if (ConvertDoubleRef(pDok, sRefStr, nTab, aRefAd, aRefAd2, aDetails, &aExtInfo))
CWS-TOOLING: integrate CWS calc51 2009-07-17 15:47:46 +0200 er r274098 : #i101544# more thorough reference checking in chart data ranges; also prevent some possible crash if invalid ranges were to be passed to document/cell access. 2009-07-16 14:20:11 +0200 er r274051 : #i101544# let ScRefTokenHelper::compileRangeRepresentation() fail on all possible non-reference occasions 2009-07-07 10:11:40 +0200 nn r273776 : #i35579# don't use long instead of sal_Int32 2009-07-03 16:41:39 +0200 nn r273711 : msvc warnings 2009-07-03 14:18:45 +0200 nn r273698 : msvc warning 2009-07-03 11:30:41 +0200 nn r273685 : #i35579# move new tokens to the end 2009-07-03 10:12:55 +0200 nn r273681 : CWS-TOOLING: rebase CWS calc51 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 17:57:30 +0200 nn r273529 : #i103027# EnterData: if it's a formula, don't pass EditTextObject to undo 2009-06-29 14:31:18 +0200 er r273474 : #i101544# #i101645# #i102388# applied diff from CWS dr68ooo311 2009-06-29 10:30:20 +0200 nn r273457 : #i103161# DeleteCells: always leave list action 2009-06-24 16:16:34 +0200 nn r273353 : gcc warnings 2009-06-17 11:50:28 +0200 tbe r273055 : #i35579# Standard filter requires more options 2009-06-17 11:44:22 +0200 tbe r273054 : #i35579# Standard filter requires more options 2009-06-17 11:22:23 +0200 tbe r273052 : #i35579# Standard filter requires more options 2009-06-15 18:29:32 +0200 nn r273006 : #160063# UseFormulaData: check parenthesis position 2009-06-12 15:41:16 +0200 nn r272923 : #i99250# handle range lists in DoAutoOutline (patch from dtardon) 2009-06-11 15:07:05 +0200 nn r272874 : #i86943# GetNextPos: skip overlapped cells 2009-06-11 11:17:37 +0200 nn r272856 : #i97726# EnterData: get text from EditTextObject for repeat string of undo action 2009-06-10 20:45:07 +0200 nn r272839 : #i102566# minimum amount of code between updates of calculation progress (patch by cmc) 2009-06-10 20:22:02 +0200 nn r272838 : #i69524# PasteFile: specify target for SID_OPENDOC 2009-06-09 17:33:08 +0200 nn r272789 : #i16615# absolute/relative reference conversion for cell ranges (patch by gaojingmei)
2009-07-28 10:04:47 +00:00
{
if (aExtInfo.mbExternal)
{
PushExternalDoubleRef(
aExtInfo.mnFileId, aExtInfo.maTabName,
aRefAd.Col(), aRefAd.Row(), aRefAd.Tab(),
aRefAd2.Col(), aRefAd2.Row(), aRefAd2.Tab());
CWS-TOOLING: integrate CWS calc51 2009-07-17 15:47:46 +0200 er r274098 : #i101544# more thorough reference checking in chart data ranges; also prevent some possible crash if invalid ranges were to be passed to document/cell access. 2009-07-16 14:20:11 +0200 er r274051 : #i101544# let ScRefTokenHelper::compileRangeRepresentation() fail on all possible non-reference occasions 2009-07-07 10:11:40 +0200 nn r273776 : #i35579# don't use long instead of sal_Int32 2009-07-03 16:41:39 +0200 nn r273711 : msvc warnings 2009-07-03 14:18:45 +0200 nn r273698 : msvc warning 2009-07-03 11:30:41 +0200 nn r273685 : #i35579# move new tokens to the end 2009-07-03 10:12:55 +0200 nn r273681 : CWS-TOOLING: rebase CWS calc51 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 17:57:30 +0200 nn r273529 : #i103027# EnterData: if it's a formula, don't pass EditTextObject to undo 2009-06-29 14:31:18 +0200 er r273474 : #i101544# #i101645# #i102388# applied diff from CWS dr68ooo311 2009-06-29 10:30:20 +0200 nn r273457 : #i103161# DeleteCells: always leave list action 2009-06-24 16:16:34 +0200 nn r273353 : gcc warnings 2009-06-17 11:50:28 +0200 tbe r273055 : #i35579# Standard filter requires more options 2009-06-17 11:44:22 +0200 tbe r273054 : #i35579# Standard filter requires more options 2009-06-17 11:22:23 +0200 tbe r273052 : #i35579# Standard filter requires more options 2009-06-15 18:29:32 +0200 nn r273006 : #160063# UseFormulaData: check parenthesis position 2009-06-12 15:41:16 +0200 nn r272923 : #i99250# handle range lists in DoAutoOutline (patch from dtardon) 2009-06-11 15:07:05 +0200 nn r272874 : #i86943# GetNextPos: skip overlapped cells 2009-06-11 11:17:37 +0200 nn r272856 : #i97726# EnterData: get text from EditTextObject for repeat string of undo action 2009-06-10 20:45:07 +0200 nn r272839 : #i102566# minimum amount of code between updates of calculation progress (patch by cmc) 2009-06-10 20:22:02 +0200 nn r272838 : #i69524# PasteFile: specify target for SID_OPENDOC 2009-06-09 17:33:08 +0200 nn r272789 : #i16615# absolute/relative reference conversion for cell ranges (patch by gaojingmei)
2009-07-28 10:04:47 +00:00
}
else
PushDoubleRef( aRefAd.Col(), aRefAd.Row(), aRefAd.Tab(),
aRefAd2.Col(), aRefAd2.Row(), aRefAd2.Tab() );
}
else if (ConvertSingleRef(pDok, sRefStr, nTab, aRefAd, aDetails, &aExtInfo))
CWS-TOOLING: integrate CWS calc51 2009-07-17 15:47:46 +0200 er r274098 : #i101544# more thorough reference checking in chart data ranges; also prevent some possible crash if invalid ranges were to be passed to document/cell access. 2009-07-16 14:20:11 +0200 er r274051 : #i101544# let ScRefTokenHelper::compileRangeRepresentation() fail on all possible non-reference occasions 2009-07-07 10:11:40 +0200 nn r273776 : #i35579# don't use long instead of sal_Int32 2009-07-03 16:41:39 +0200 nn r273711 : msvc warnings 2009-07-03 14:18:45 +0200 nn r273698 : msvc warning 2009-07-03 11:30:41 +0200 nn r273685 : #i35579# move new tokens to the end 2009-07-03 10:12:55 +0200 nn r273681 : CWS-TOOLING: rebase CWS calc51 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 17:57:30 +0200 nn r273529 : #i103027# EnterData: if it's a formula, don't pass EditTextObject to undo 2009-06-29 14:31:18 +0200 er r273474 : #i101544# #i101645# #i102388# applied diff from CWS dr68ooo311 2009-06-29 10:30:20 +0200 nn r273457 : #i103161# DeleteCells: always leave list action 2009-06-24 16:16:34 +0200 nn r273353 : gcc warnings 2009-06-17 11:50:28 +0200 tbe r273055 : #i35579# Standard filter requires more options 2009-06-17 11:44:22 +0200 tbe r273054 : #i35579# Standard filter requires more options 2009-06-17 11:22:23 +0200 tbe r273052 : #i35579# Standard filter requires more options 2009-06-15 18:29:32 +0200 nn r273006 : #160063# UseFormulaData: check parenthesis position 2009-06-12 15:41:16 +0200 nn r272923 : #i99250# handle range lists in DoAutoOutline (patch from dtardon) 2009-06-11 15:07:05 +0200 nn r272874 : #i86943# GetNextPos: skip overlapped cells 2009-06-11 11:17:37 +0200 nn r272856 : #i97726# EnterData: get text from EditTextObject for repeat string of undo action 2009-06-10 20:45:07 +0200 nn r272839 : #i102566# minimum amount of code between updates of calculation progress (patch by cmc) 2009-06-10 20:22:02 +0200 nn r272838 : #i69524# PasteFile: specify target for SID_OPENDOC 2009-06-09 17:33:08 +0200 nn r272789 : #i16615# absolute/relative reference conversion for cell ranges (patch by gaojingmei)
2009-07-28 10:04:47 +00:00
{
if (aExtInfo.mbExternal)
{
PushExternalSingleRef(
aExtInfo.mnFileId, aExtInfo.maTabName, aRefAd.Col(), aRefAd.Row(), aRefAd.Tab());
CWS-TOOLING: integrate CWS calc51 2009-07-17 15:47:46 +0200 er r274098 : #i101544# more thorough reference checking in chart data ranges; also prevent some possible crash if invalid ranges were to be passed to document/cell access. 2009-07-16 14:20:11 +0200 er r274051 : #i101544# let ScRefTokenHelper::compileRangeRepresentation() fail on all possible non-reference occasions 2009-07-07 10:11:40 +0200 nn r273776 : #i35579# don't use long instead of sal_Int32 2009-07-03 16:41:39 +0200 nn r273711 : msvc warnings 2009-07-03 14:18:45 +0200 nn r273698 : msvc warning 2009-07-03 11:30:41 +0200 nn r273685 : #i35579# move new tokens to the end 2009-07-03 10:12:55 +0200 nn r273681 : CWS-TOOLING: rebase CWS calc51 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 17:57:30 +0200 nn r273529 : #i103027# EnterData: if it's a formula, don't pass EditTextObject to undo 2009-06-29 14:31:18 +0200 er r273474 : #i101544# #i101645# #i102388# applied diff from CWS dr68ooo311 2009-06-29 10:30:20 +0200 nn r273457 : #i103161# DeleteCells: always leave list action 2009-06-24 16:16:34 +0200 nn r273353 : gcc warnings 2009-06-17 11:50:28 +0200 tbe r273055 : #i35579# Standard filter requires more options 2009-06-17 11:44:22 +0200 tbe r273054 : #i35579# Standard filter requires more options 2009-06-17 11:22:23 +0200 tbe r273052 : #i35579# Standard filter requires more options 2009-06-15 18:29:32 +0200 nn r273006 : #160063# UseFormulaData: check parenthesis position 2009-06-12 15:41:16 +0200 nn r272923 : #i99250# handle range lists in DoAutoOutline (patch from dtardon) 2009-06-11 15:07:05 +0200 nn r272874 : #i86943# GetNextPos: skip overlapped cells 2009-06-11 11:17:37 +0200 nn r272856 : #i97726# EnterData: get text from EditTextObject for repeat string of undo action 2009-06-10 20:45:07 +0200 nn r272839 : #i102566# minimum amount of code between updates of calculation progress (patch by cmc) 2009-06-10 20:22:02 +0200 nn r272838 : #i69524# PasteFile: specify target for SID_OPENDOC 2009-06-09 17:33:08 +0200 nn r272789 : #i16615# absolute/relative reference conversion for cell ranges (patch by gaojingmei)
2009-07-28 10:04:47 +00:00
}
else
PushSingleRef( aRefAd.Col(), aRefAd.Row(), aRefAd.Tab() );
}
2000-09-18 23:16:46 +00:00
else
{
do
{
ScRangeData* pData = ScRangeStringConverter::GetRangeDataFromString(sRefStr, nTab, pDok);
if (!pData)
break;
// We need this in order to obtain a good range.
pData->ValidateTabRefs();
ScRange aRange;
2010-10-20 11:21:22 +02:00
// This is the usual way to treat named ranges containing
// relative references.
if (!pData->IsReference( aRange, aPos))
break;
if (aRange.aStart == aRange.aEnd)
PushSingleRef( aRange.aStart.Col(), aRange.aStart.Row(),
aRange.aStart.Tab());
else
PushDoubleRef( aRange.aStart.Col(), aRange.aStart.Row(),
aRange.aStart.Tab(), aRange.aEnd.Col(),
aRange.aEnd.Row(), aRange.aEnd.Tab());
// success!
return;
}
while (false);
PushError( errNoRef);
}
2000-09-18 23:16:46 +00:00
}
}
void ScInterpreter::ScAddressFunc()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScAddressFunc" );
String sTabStr;
sal_uInt8 nParamCount = GetByte();
if( !MustHaveParamCount( nParamCount, 2, 5 ) )
return;
if( nParamCount >= 5 )
sTabStr = GetString();
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
FormulaGrammar::AddressConvention eConv = FormulaGrammar::CONV_OOO; // default
if( nParamCount >= 4 && 0.0 == ::rtl::math::approxFloor( GetDoubleWithDefault( 1.0)))
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
eConv = FormulaGrammar::CONV_XL_R1C1;
sal_uInt16 nFlags = SCA_COL_ABSOLUTE | SCA_ROW_ABSOLUTE; // default
if( nParamCount >= 3 )
{
sal_uInt16 n = (sal_uInt16) ::rtl::math::approxFloor( GetDoubleWithDefault( 1.0));
switch ( n )
{
default :
PushNoValue();
return;
case 5:
case 1 : break; // default
case 6:
case 2 : nFlags = SCA_ROW_ABSOLUTE; break;
case 7:
case 3 : nFlags = SCA_COL_ABSOLUTE; break;
case 8:
case 4 : nFlags = 0; break; // both relative
}
}
nFlags |= SCA_VALID | SCA_VALID_ROW | SCA_VALID_COL;
SCCOL nCol = (SCCOL) ::rtl::math::approxFloor(GetDouble());
SCROW nRow = (SCROW) ::rtl::math::approxFloor(GetDouble());
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
if( eConv == FormulaGrammar::CONV_XL_R1C1 )
{
// YUCK! The XL interface actually treats rel R1C1 refs differently
// than A1
if( !(nFlags & SCA_COL_ABSOLUTE) )
nCol += aPos.Col() + 1;
if( !(nFlags & SCA_ROW_ABSOLUTE) )
nRow += aPos.Row() + 1;
}
--nCol;
--nRow;
if(!ValidCol( nCol) || !ValidRow( nRow))
{
PushIllegalArgument();
return;
}
String aRefStr;
const ScAddress::Details aDetails( eConv, aPos );
const ScAddress aAdr( nCol, nRow, 0);
aAdr.Format( aRefStr, nFlags, pDok, aDetails );
if( nParamCount >= 5 && sTabStr.Len() )
{
String aDoc;
if (eConv == FormulaGrammar::CONV_OOO)
{
// Isolate Tab from 'Doc'#Tab
xub_StrLen nPos = ScCompiler::GetDocTabPos( sTabStr);
if (nPos != STRING_NOTFOUND)
{
if (sTabStr.GetChar(nPos+1) == '$')
++nPos; // also split 'Doc'#$Tab
aDoc = sTabStr.Copy( 0, nPos+1);
sTabStr.Erase( 0, nPos+1);
}
}
/* TODO: yet unsupported external reference in CONV_XL_R1C1 syntax may
* need some extra handling to isolate Tab from Doc. */
if (sTabStr.GetChar(0) != '\'' || sTabStr.GetChar(sTabStr.Len()-1) != '\'')
ScCompiler::CheckTabQuotes( sTabStr, eConv);
if (aDoc.Len())
sTabStr.Insert( aDoc, 0);
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
sTabStr += static_cast<sal_Unicode>(eConv == FormulaGrammar::CONV_XL_R1C1 ? '!' : '.');
sTabStr += aRefStr;
PushString( sTabStr );
}
else
PushString( aRefStr );
}
2000-09-18 23:16:46 +00:00
void ScInterpreter::ScOffset()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScOffset" );
sal_uInt8 nParamCount = GetByte();
2000-09-18 23:16:46 +00:00
if ( MustHaveParamCount( nParamCount, 3, 5 ) )
{
long nColNew = -1, nRowNew = -1, nColPlus, nRowPlus;
2000-09-18 23:16:46 +00:00
if (nParamCount == 5)
nColNew = (long) ::rtl::math::approxFloor(GetDouble());
2000-09-18 23:16:46 +00:00
if (nParamCount >= 4)
nRowNew = (long) ::rtl::math::approxFloor(GetDoubleWithDefault( -1.0 ));
nColPlus = (long) ::rtl::math::approxFloor(GetDouble());
nRowPlus = (long) ::rtl::math::approxFloor(GetDouble());
2011-03-09 11:02:22 +00:00
SCCOL nCol1(0);
SCROW nRow1(0);
SCTAB nTab1(0);
SCCOL nCol2(0);
SCROW nRow2(0);
SCTAB nTab2(0);
if (nColNew == 0 || nRowNew == 0)
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalArgument();
2000-09-18 23:16:46 +00:00
return;
}
re-base on ALv2 code. Includes: Patches contributed by Herbert Duerr i#118735 prevent endless loop if vlookup/hlookup doesn't find anything http://svn.apache.org/viewvc?view=revision&revision=1239673 Patches contributed by Andre Fischer remove lp_solver http://svn.apache.org/viewvc?view=revision&revision=1199180 i#118160: Added external CoinMP library. http://svn.apache.org/viewvc?view=revision&revision=1233909 Patches contributed by Armin Le-Grand i#118485 - Styles for OLEs are not saved. http://svn.apache.org/viewvc?view=revision&revision=1182166 i#118524: apply patch, followup fixes to 118485 http://svn.apache.org/viewvc?view=revision&revision=1186077 Patches contributed by lihuiibm i#108860 - Fix range validation. http://svn.apache.org/viewvc?view=revision&revision=1242846 i#118954 Chart data will lost after copy to different file http://svn.apache.org/viewvc?view=revision&revision=1301345 Patches contributed by Ariel Constenla-Haile Fix Linux build breaker: extra qualification on member http://svn.apache.org/viewvc?view=revision&revision=1301591 i#118696 - i#118697 - Fix some Sheet Tab Color API issues http://svn.apache.org/viewvc?view=revision&revision=1225428 i#118697 - Fix uninitialized variable http://svn.apache.org/viewvc?view=revision&revision=1225859 i#118771 - ScUndoImportTab should preserve tab background color http://svn.apache.org/viewvc?view=revision&revision=1230356 i#118921 - Repaint linked sheet tab background color after updating link http://svn.apache.org/viewvc?view=revision&revision=1245177 i#118927 - Undo/Redo "Update Link" does not reset sheet tab color http://svn.apache.org/viewvc?view=revision&revision=1245241 i#118747 - Copy tab color when transferring sheets across documents http://svn.apache.org/viewvc?view=revision&revision=1230355 Patch contributed by Oliver Rainer-Wittman i#118012 - methods <ScBroadcastAreaSlot::AreaBroadcast(..)> and <ScBroadcastAreaSlot::AreaBroadcastInRange(..)> adapt stl-container iteration in order to avoid destroyed iterators during iteration. http://svn.apache.org/viewvc?view=revision&revision=1297916 Patches contributed by Mathias Bauer gnumake4 work variously http://svn.apache.org/viewvc?view=revision&revision=1394707 http://svn.apache.org/viewvc?view=revision&revision=1394326 http://svn.apache.org/viewvc?view=revision&revision=1396797 http://svn.apache.org/viewvc?view=revision&revision=1397315 Patch contributed by Daniel Rentz calc69: #i116936# fix VBA symbol Cells http://svn.apache.org/viewvc?view=revision&revision=1172135 Patches contributed by leiw: i#118546 CPU 100% on switched off AutoCalculate with Conditional Formatting on date values http://svn.apache.org/viewvc?view=revision&revision=1301380 Re-add new function documentation. Many various cleanups. Add missing calc66: #o11817313# also look at formula result number format, remove redundant binaries.
2012-11-30 12:23:25 +00:00
switch (GetStackType())
{
case svSingleRef:
2000-09-18 23:16:46 +00:00
{
PopSingleRef(nCol1, nRow1, nTab1);
if (nParamCount == 3 || (nColNew < 0 && nRowNew < 0))
2000-09-18 23:16:46 +00:00
{
nCol1 = (SCCOL)((long) nCol1 + nColPlus);
nRow1 = (SCROW)((long) nRow1 + nRowPlus);
if (!ValidCol(nCol1) || !ValidRow(nRow1))
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalArgument();
2000-09-18 23:16:46 +00:00
else
PushSingleRef(nCol1, nRow1, nTab1);
}
else
{
if (nColNew < 0)
2000-09-18 23:16:46 +00:00
nColNew = 1;
if (nRowNew < 0)
nRowNew = 1;
re-base on ALv2 code. Includes: Patches contributed by Herbert Duerr i#118735 prevent endless loop if vlookup/hlookup doesn't find anything http://svn.apache.org/viewvc?view=revision&revision=1239673 Patches contributed by Andre Fischer remove lp_solver http://svn.apache.org/viewvc?view=revision&revision=1199180 i#118160: Added external CoinMP library. http://svn.apache.org/viewvc?view=revision&revision=1233909 Patches contributed by Armin Le-Grand i#118485 - Styles for OLEs are not saved. http://svn.apache.org/viewvc?view=revision&revision=1182166 i#118524: apply patch, followup fixes to 118485 http://svn.apache.org/viewvc?view=revision&revision=1186077 Patches contributed by lihuiibm i#108860 - Fix range validation. http://svn.apache.org/viewvc?view=revision&revision=1242846 i#118954 Chart data will lost after copy to different file http://svn.apache.org/viewvc?view=revision&revision=1301345 Patches contributed by Ariel Constenla-Haile Fix Linux build breaker: extra qualification on member http://svn.apache.org/viewvc?view=revision&revision=1301591 i#118696 - i#118697 - Fix some Sheet Tab Color API issues http://svn.apache.org/viewvc?view=revision&revision=1225428 i#118697 - Fix uninitialized variable http://svn.apache.org/viewvc?view=revision&revision=1225859 i#118771 - ScUndoImportTab should preserve tab background color http://svn.apache.org/viewvc?view=revision&revision=1230356 i#118921 - Repaint linked sheet tab background color after updating link http://svn.apache.org/viewvc?view=revision&revision=1245177 i#118927 - Undo/Redo "Update Link" does not reset sheet tab color http://svn.apache.org/viewvc?view=revision&revision=1245241 i#118747 - Copy tab color when transferring sheets across documents http://svn.apache.org/viewvc?view=revision&revision=1230355 Patch contributed by Oliver Rainer-Wittman i#118012 - methods <ScBroadcastAreaSlot::AreaBroadcast(..)> and <ScBroadcastAreaSlot::AreaBroadcastInRange(..)> adapt stl-container iteration in order to avoid destroyed iterators during iteration. http://svn.apache.org/viewvc?view=revision&revision=1297916 Patches contributed by Mathias Bauer gnumake4 work variously http://svn.apache.org/viewvc?view=revision&revision=1394707 http://svn.apache.org/viewvc?view=revision&revision=1394326 http://svn.apache.org/viewvc?view=revision&revision=1396797 http://svn.apache.org/viewvc?view=revision&revision=1397315 Patch contributed by Daniel Rentz calc69: #i116936# fix VBA symbol Cells http://svn.apache.org/viewvc?view=revision&revision=1172135 Patches contributed by leiw: i#118546 CPU 100% on switched off AutoCalculate with Conditional Formatting on date values http://svn.apache.org/viewvc?view=revision&revision=1301380 Re-add new function documentation. Many various cleanups. Add missing calc66: #o11817313# also look at formula result number format, remove redundant binaries.
2012-11-30 12:23:25 +00:00
nCol1 = (SCCOL)((long)nCol1+nColPlus);
nRow1 = (SCROW)((long)nRow1+nRowPlus);
nCol2 = (SCCOL)((long)nCol1+nColNew-1);
nRow2 = (SCROW)((long)nRow1+nRowNew-1);
if (!ValidCol(nCol1) || !ValidRow(nRow1) ||
!ValidCol(nCol2) || !ValidRow(nRow2))
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalArgument();
2000-09-18 23:16:46 +00:00
else
PushDoubleRef(nCol1, nRow1, nTab1, nCol2, nRow2, nTab1);
}
re-base on ALv2 code. Includes: Patches contributed by Herbert Duerr i#118735 prevent endless loop if vlookup/hlookup doesn't find anything http://svn.apache.org/viewvc?view=revision&revision=1239673 Patches contributed by Andre Fischer remove lp_solver http://svn.apache.org/viewvc?view=revision&revision=1199180 i#118160: Added external CoinMP library. http://svn.apache.org/viewvc?view=revision&revision=1233909 Patches contributed by Armin Le-Grand i#118485 - Styles for OLEs are not saved. http://svn.apache.org/viewvc?view=revision&revision=1182166 i#118524: apply patch, followup fixes to 118485 http://svn.apache.org/viewvc?view=revision&revision=1186077 Patches contributed by lihuiibm i#108860 - Fix range validation. http://svn.apache.org/viewvc?view=revision&revision=1242846 i#118954 Chart data will lost after copy to different file http://svn.apache.org/viewvc?view=revision&revision=1301345 Patches contributed by Ariel Constenla-Haile Fix Linux build breaker: extra qualification on member http://svn.apache.org/viewvc?view=revision&revision=1301591 i#118696 - i#118697 - Fix some Sheet Tab Color API issues http://svn.apache.org/viewvc?view=revision&revision=1225428 i#118697 - Fix uninitialized variable http://svn.apache.org/viewvc?view=revision&revision=1225859 i#118771 - ScUndoImportTab should preserve tab background color http://svn.apache.org/viewvc?view=revision&revision=1230356 i#118921 - Repaint linked sheet tab background color after updating link http://svn.apache.org/viewvc?view=revision&revision=1245177 i#118927 - Undo/Redo "Update Link" does not reset sheet tab color http://svn.apache.org/viewvc?view=revision&revision=1245241 i#118747 - Copy tab color when transferring sheets across documents http://svn.apache.org/viewvc?view=revision&revision=1230355 Patch contributed by Oliver Rainer-Wittman i#118012 - methods <ScBroadcastAreaSlot::AreaBroadcast(..)> and <ScBroadcastAreaSlot::AreaBroadcastInRange(..)> adapt stl-container iteration in order to avoid destroyed iterators during iteration. http://svn.apache.org/viewvc?view=revision&revision=1297916 Patches contributed by Mathias Bauer gnumake4 work variously http://svn.apache.org/viewvc?view=revision&revision=1394707 http://svn.apache.org/viewvc?view=revision&revision=1394326 http://svn.apache.org/viewvc?view=revision&revision=1396797 http://svn.apache.org/viewvc?view=revision&revision=1397315 Patch contributed by Daniel Rentz calc69: #i116936# fix VBA symbol Cells http://svn.apache.org/viewvc?view=revision&revision=1172135 Patches contributed by leiw: i#118546 CPU 100% on switched off AutoCalculate with Conditional Formatting on date values http://svn.apache.org/viewvc?view=revision&revision=1301380 Re-add new function documentation. Many various cleanups. Add missing calc66: #o11817313# also look at formula result number format, remove redundant binaries.
2012-11-30 12:23:25 +00:00
break;
2000-09-18 23:16:46 +00:00
}
re-base on ALv2 code. Includes: Patches contributed by Herbert Duerr i#118735 prevent endless loop if vlookup/hlookup doesn't find anything http://svn.apache.org/viewvc?view=revision&revision=1239673 Patches contributed by Andre Fischer remove lp_solver http://svn.apache.org/viewvc?view=revision&revision=1199180 i#118160: Added external CoinMP library. http://svn.apache.org/viewvc?view=revision&revision=1233909 Patches contributed by Armin Le-Grand i#118485 - Styles for OLEs are not saved. http://svn.apache.org/viewvc?view=revision&revision=1182166 i#118524: apply patch, followup fixes to 118485 http://svn.apache.org/viewvc?view=revision&revision=1186077 Patches contributed by lihuiibm i#108860 - Fix range validation. http://svn.apache.org/viewvc?view=revision&revision=1242846 i#118954 Chart data will lost after copy to different file http://svn.apache.org/viewvc?view=revision&revision=1301345 Patches contributed by Ariel Constenla-Haile Fix Linux build breaker: extra qualification on member http://svn.apache.org/viewvc?view=revision&revision=1301591 i#118696 - i#118697 - Fix some Sheet Tab Color API issues http://svn.apache.org/viewvc?view=revision&revision=1225428 i#118697 - Fix uninitialized variable http://svn.apache.org/viewvc?view=revision&revision=1225859 i#118771 - ScUndoImportTab should preserve tab background color http://svn.apache.org/viewvc?view=revision&revision=1230356 i#118921 - Repaint linked sheet tab background color after updating link http://svn.apache.org/viewvc?view=revision&revision=1245177 i#118927 - Undo/Redo "Update Link" does not reset sheet tab color http://svn.apache.org/viewvc?view=revision&revision=1245241 i#118747 - Copy tab color when transferring sheets across documents http://svn.apache.org/viewvc?view=revision&revision=1230355 Patch contributed by Oliver Rainer-Wittman i#118012 - methods <ScBroadcastAreaSlot::AreaBroadcast(..)> and <ScBroadcastAreaSlot::AreaBroadcastInRange(..)> adapt stl-container iteration in order to avoid destroyed iterators during iteration. http://svn.apache.org/viewvc?view=revision&revision=1297916 Patches contributed by Mathias Bauer gnumake4 work variously http://svn.apache.org/viewvc?view=revision&revision=1394707 http://svn.apache.org/viewvc?view=revision&revision=1394326 http://svn.apache.org/viewvc?view=revision&revision=1396797 http://svn.apache.org/viewvc?view=revision&revision=1397315 Patch contributed by Daniel Rentz calc69: #i116936# fix VBA symbol Cells http://svn.apache.org/viewvc?view=revision&revision=1172135 Patches contributed by leiw: i#118546 CPU 100% on switched off AutoCalculate with Conditional Formatting on date values http://svn.apache.org/viewvc?view=revision&revision=1301380 Re-add new function documentation. Many various cleanups. Add missing calc66: #o11817313# also look at formula result number format, remove redundant binaries.
2012-11-30 12:23:25 +00:00
case svExternalSingleRef:
{
sal_uInt16 nFileId;
String aTabName;
ScSingleRefData aRef;
PopExternalSingleRef(nFileId, aTabName, aRef);
aRef.CalcAbsIfRel(aPos);
nCol1 = aRef.nCol;
nRow1 = aRef.nRow;
nTab1 = aRef.nTab;
if (nParamCount == 3 || (nColNew < 0 && nRowNew < 0))
{
nCol1 = (SCCOL)((long) nCol1 + nColPlus);
nRow1 = (SCROW)((long) nRow1 + nRowPlus);
if (!ValidCol(nCol1) || !ValidRow(nRow1))
PushIllegalArgument();
else
PushExternalSingleRef(nFileId, aTabName, nCol1, nRow1, nTab1);
}
else
{
if (nColNew < 0)
nColNew = 1;
if (nRowNew < 0)
nRowNew = 1;
re-base on ALv2 code. Includes: Patches contributed by Herbert Duerr i#118735 prevent endless loop if vlookup/hlookup doesn't find anything http://svn.apache.org/viewvc?view=revision&revision=1239673 Patches contributed by Andre Fischer remove lp_solver http://svn.apache.org/viewvc?view=revision&revision=1199180 i#118160: Added external CoinMP library. http://svn.apache.org/viewvc?view=revision&revision=1233909 Patches contributed by Armin Le-Grand i#118485 - Styles for OLEs are not saved. http://svn.apache.org/viewvc?view=revision&revision=1182166 i#118524: apply patch, followup fixes to 118485 http://svn.apache.org/viewvc?view=revision&revision=1186077 Patches contributed by lihuiibm i#108860 - Fix range validation. http://svn.apache.org/viewvc?view=revision&revision=1242846 i#118954 Chart data will lost after copy to different file http://svn.apache.org/viewvc?view=revision&revision=1301345 Patches contributed by Ariel Constenla-Haile Fix Linux build breaker: extra qualification on member http://svn.apache.org/viewvc?view=revision&revision=1301591 i#118696 - i#118697 - Fix some Sheet Tab Color API issues http://svn.apache.org/viewvc?view=revision&revision=1225428 i#118697 - Fix uninitialized variable http://svn.apache.org/viewvc?view=revision&revision=1225859 i#118771 - ScUndoImportTab should preserve tab background color http://svn.apache.org/viewvc?view=revision&revision=1230356 i#118921 - Repaint linked sheet tab background color after updating link http://svn.apache.org/viewvc?view=revision&revision=1245177 i#118927 - Undo/Redo "Update Link" does not reset sheet tab color http://svn.apache.org/viewvc?view=revision&revision=1245241 i#118747 - Copy tab color when transferring sheets across documents http://svn.apache.org/viewvc?view=revision&revision=1230355 Patch contributed by Oliver Rainer-Wittman i#118012 - methods <ScBroadcastAreaSlot::AreaBroadcast(..)> and <ScBroadcastAreaSlot::AreaBroadcastInRange(..)> adapt stl-container iteration in order to avoid destroyed iterators during iteration. http://svn.apache.org/viewvc?view=revision&revision=1297916 Patches contributed by Mathias Bauer gnumake4 work variously http://svn.apache.org/viewvc?view=revision&revision=1394707 http://svn.apache.org/viewvc?view=revision&revision=1394326 http://svn.apache.org/viewvc?view=revision&revision=1396797 http://svn.apache.org/viewvc?view=revision&revision=1397315 Patch contributed by Daniel Rentz calc69: #i116936# fix VBA symbol Cells http://svn.apache.org/viewvc?view=revision&revision=1172135 Patches contributed by leiw: i#118546 CPU 100% on switched off AutoCalculate with Conditional Formatting on date values http://svn.apache.org/viewvc?view=revision&revision=1301380 Re-add new function documentation. Many various cleanups. Add missing calc66: #o11817313# also look at formula result number format, remove redundant binaries.
2012-11-30 12:23:25 +00:00
nCol1 = (SCCOL)((long)nCol1+nColPlus);
nRow1 = (SCROW)((long)nRow1+nRowPlus);
nCol2 = (SCCOL)((long)nCol1+nColNew-1);
2011-01-11 21:10:59 +00:00
nTab2 = nTab1;
if (!ValidCol(nCol1) || !ValidRow(nRow1) ||
!ValidCol(nCol2) || !ValidRow(nRow2))
PushIllegalArgument();
else
PushExternalDoubleRef(nFileId, aTabName, nCol1, nRow1, nTab1, nCol2, nRow2, nTab2);
}
re-base on ALv2 code. Includes: Patches contributed by Herbert Duerr i#118735 prevent endless loop if vlookup/hlookup doesn't find anything http://svn.apache.org/viewvc?view=revision&revision=1239673 Patches contributed by Andre Fischer remove lp_solver http://svn.apache.org/viewvc?view=revision&revision=1199180 i#118160: Added external CoinMP library. http://svn.apache.org/viewvc?view=revision&revision=1233909 Patches contributed by Armin Le-Grand i#118485 - Styles for OLEs are not saved. http://svn.apache.org/viewvc?view=revision&revision=1182166 i#118524: apply patch, followup fixes to 118485 http://svn.apache.org/viewvc?view=revision&revision=1186077 Patches contributed by lihuiibm i#108860 - Fix range validation. http://svn.apache.org/viewvc?view=revision&revision=1242846 i#118954 Chart data will lost after copy to different file http://svn.apache.org/viewvc?view=revision&revision=1301345 Patches contributed by Ariel Constenla-Haile Fix Linux build breaker: extra qualification on member http://svn.apache.org/viewvc?view=revision&revision=1301591 i#118696 - i#118697 - Fix some Sheet Tab Color API issues http://svn.apache.org/viewvc?view=revision&revision=1225428 i#118697 - Fix uninitialized variable http://svn.apache.org/viewvc?view=revision&revision=1225859 i#118771 - ScUndoImportTab should preserve tab background color http://svn.apache.org/viewvc?view=revision&revision=1230356 i#118921 - Repaint linked sheet tab background color after updating link http://svn.apache.org/viewvc?view=revision&revision=1245177 i#118927 - Undo/Redo "Update Link" does not reset sheet tab color http://svn.apache.org/viewvc?view=revision&revision=1245241 i#118747 - Copy tab color when transferring sheets across documents http://svn.apache.org/viewvc?view=revision&revision=1230355 Patch contributed by Oliver Rainer-Wittman i#118012 - methods <ScBroadcastAreaSlot::AreaBroadcast(..)> and <ScBroadcastAreaSlot::AreaBroadcastInRange(..)> adapt stl-container iteration in order to avoid destroyed iterators during iteration. http://svn.apache.org/viewvc?view=revision&revision=1297916 Patches contributed by Mathias Bauer gnumake4 work variously http://svn.apache.org/viewvc?view=revision&revision=1394707 http://svn.apache.org/viewvc?view=revision&revision=1394326 http://svn.apache.org/viewvc?view=revision&revision=1396797 http://svn.apache.org/viewvc?view=revision&revision=1397315 Patch contributed by Daniel Rentz calc69: #i116936# fix VBA symbol Cells http://svn.apache.org/viewvc?view=revision&revision=1172135 Patches contributed by leiw: i#118546 CPU 100% on switched off AutoCalculate with Conditional Formatting on date values http://svn.apache.org/viewvc?view=revision&revision=1301380 Re-add new function documentation. Many various cleanups. Add missing calc66: #o11817313# also look at formula result number format, remove redundant binaries.
2012-11-30 12:23:25 +00:00
break;
}
re-base on ALv2 code. Includes: Patches contributed by Herbert Duerr i#118735 prevent endless loop if vlookup/hlookup doesn't find anything http://svn.apache.org/viewvc?view=revision&revision=1239673 Patches contributed by Andre Fischer remove lp_solver http://svn.apache.org/viewvc?view=revision&revision=1199180 i#118160: Added external CoinMP library. http://svn.apache.org/viewvc?view=revision&revision=1233909 Patches contributed by Armin Le-Grand i#118485 - Styles for OLEs are not saved. http://svn.apache.org/viewvc?view=revision&revision=1182166 i#118524: apply patch, followup fixes to 118485 http://svn.apache.org/viewvc?view=revision&revision=1186077 Patches contributed by lihuiibm i#108860 - Fix range validation. http://svn.apache.org/viewvc?view=revision&revision=1242846 i#118954 Chart data will lost after copy to different file http://svn.apache.org/viewvc?view=revision&revision=1301345 Patches contributed by Ariel Constenla-Haile Fix Linux build breaker: extra qualification on member http://svn.apache.org/viewvc?view=revision&revision=1301591 i#118696 - i#118697 - Fix some Sheet Tab Color API issues http://svn.apache.org/viewvc?view=revision&revision=1225428 i#118697 - Fix uninitialized variable http://svn.apache.org/viewvc?view=revision&revision=1225859 i#118771 - ScUndoImportTab should preserve tab background color http://svn.apache.org/viewvc?view=revision&revision=1230356 i#118921 - Repaint linked sheet tab background color after updating link http://svn.apache.org/viewvc?view=revision&revision=1245177 i#118927 - Undo/Redo "Update Link" does not reset sheet tab color http://svn.apache.org/viewvc?view=revision&revision=1245241 i#118747 - Copy tab color when transferring sheets across documents http://svn.apache.org/viewvc?view=revision&revision=1230355 Patch contributed by Oliver Rainer-Wittman i#118012 - methods <ScBroadcastAreaSlot::AreaBroadcast(..)> and <ScBroadcastAreaSlot::AreaBroadcastInRange(..)> adapt stl-container iteration in order to avoid destroyed iterators during iteration. http://svn.apache.org/viewvc?view=revision&revision=1297916 Patches contributed by Mathias Bauer gnumake4 work variously http://svn.apache.org/viewvc?view=revision&revision=1394707 http://svn.apache.org/viewvc?view=revision&revision=1394326 http://svn.apache.org/viewvc?view=revision&revision=1396797 http://svn.apache.org/viewvc?view=revision&revision=1397315 Patch contributed by Daniel Rentz calc69: #i116936# fix VBA symbol Cells http://svn.apache.org/viewvc?view=revision&revision=1172135 Patches contributed by leiw: i#118546 CPU 100% on switched off AutoCalculate with Conditional Formatting on date values http://svn.apache.org/viewvc?view=revision&revision=1301380 Re-add new function documentation. Many various cleanups. Add missing calc66: #o11817313# also look at formula result number format, remove redundant binaries.
2012-11-30 12:23:25 +00:00
case svDoubleRef:
2000-09-18 23:16:46 +00:00
{
PopDoubleRef(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2);
if (nColNew < 0)
2000-09-18 23:16:46 +00:00
nColNew = nCol2 - nCol1 + 1;
if (nRowNew < 0)
2000-09-18 23:16:46 +00:00
nRowNew = nRow2 - nRow1 + 1;
nCol1 = (SCCOL)((long)nCol1+nColPlus);
nRow1 = (SCROW)((long)nRow1+nRowPlus);
nCol2 = (SCCOL)((long)nCol1+nColNew-1);
nRow2 = (SCROW)((long)nRow1+nRowNew-1);
if (!ValidCol(nCol1) || !ValidRow(nRow1) ||
!ValidCol(nCol2) || !ValidRow(nRow2) || nTab1 != nTab2)
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalArgument();
2000-09-18 23:16:46 +00:00
else
PushDoubleRef(nCol1, nRow1, nTab1, nCol2, nRow2, nTab1);
re-base on ALv2 code. Includes: Patches contributed by Herbert Duerr i#118735 prevent endless loop if vlookup/hlookup doesn't find anything http://svn.apache.org/viewvc?view=revision&revision=1239673 Patches contributed by Andre Fischer remove lp_solver http://svn.apache.org/viewvc?view=revision&revision=1199180 i#118160: Added external CoinMP library. http://svn.apache.org/viewvc?view=revision&revision=1233909 Patches contributed by Armin Le-Grand i#118485 - Styles for OLEs are not saved. http://svn.apache.org/viewvc?view=revision&revision=1182166 i#118524: apply patch, followup fixes to 118485 http://svn.apache.org/viewvc?view=revision&revision=1186077 Patches contributed by lihuiibm i#108860 - Fix range validation. http://svn.apache.org/viewvc?view=revision&revision=1242846 i#118954 Chart data will lost after copy to different file http://svn.apache.org/viewvc?view=revision&revision=1301345 Patches contributed by Ariel Constenla-Haile Fix Linux build breaker: extra qualification on member http://svn.apache.org/viewvc?view=revision&revision=1301591 i#118696 - i#118697 - Fix some Sheet Tab Color API issues http://svn.apache.org/viewvc?view=revision&revision=1225428 i#118697 - Fix uninitialized variable http://svn.apache.org/viewvc?view=revision&revision=1225859 i#118771 - ScUndoImportTab should preserve tab background color http://svn.apache.org/viewvc?view=revision&revision=1230356 i#118921 - Repaint linked sheet tab background color after updating link http://svn.apache.org/viewvc?view=revision&revision=1245177 i#118927 - Undo/Redo "Update Link" does not reset sheet tab color http://svn.apache.org/viewvc?view=revision&revision=1245241 i#118747 - Copy tab color when transferring sheets across documents http://svn.apache.org/viewvc?view=revision&revision=1230355 Patch contributed by Oliver Rainer-Wittman i#118012 - methods <ScBroadcastAreaSlot::AreaBroadcast(..)> and <ScBroadcastAreaSlot::AreaBroadcastInRange(..)> adapt stl-container iteration in order to avoid destroyed iterators during iteration. http://svn.apache.org/viewvc?view=revision&revision=1297916 Patches contributed by Mathias Bauer gnumake4 work variously http://svn.apache.org/viewvc?view=revision&revision=1394707 http://svn.apache.org/viewvc?view=revision&revision=1394326 http://svn.apache.org/viewvc?view=revision&revision=1396797 http://svn.apache.org/viewvc?view=revision&revision=1397315 Patch contributed by Daniel Rentz calc69: #i116936# fix VBA symbol Cells http://svn.apache.org/viewvc?view=revision&revision=1172135 Patches contributed by leiw: i#118546 CPU 100% on switched off AutoCalculate with Conditional Formatting on date values http://svn.apache.org/viewvc?view=revision&revision=1301380 Re-add new function documentation. Many various cleanups. Add missing calc66: #o11817313# also look at formula result number format, remove redundant binaries.
2012-11-30 12:23:25 +00:00
break;
2000-09-18 23:16:46 +00:00
}
re-base on ALv2 code. Includes: Patches contributed by Herbert Duerr i#118735 prevent endless loop if vlookup/hlookup doesn't find anything http://svn.apache.org/viewvc?view=revision&revision=1239673 Patches contributed by Andre Fischer remove lp_solver http://svn.apache.org/viewvc?view=revision&revision=1199180 i#118160: Added external CoinMP library. http://svn.apache.org/viewvc?view=revision&revision=1233909 Patches contributed by Armin Le-Grand i#118485 - Styles for OLEs are not saved. http://svn.apache.org/viewvc?view=revision&revision=1182166 i#118524: apply patch, followup fixes to 118485 http://svn.apache.org/viewvc?view=revision&revision=1186077 Patches contributed by lihuiibm i#108860 - Fix range validation. http://svn.apache.org/viewvc?view=revision&revision=1242846 i#118954 Chart data will lost after copy to different file http://svn.apache.org/viewvc?view=revision&revision=1301345 Patches contributed by Ariel Constenla-Haile Fix Linux build breaker: extra qualification on member http://svn.apache.org/viewvc?view=revision&revision=1301591 i#118696 - i#118697 - Fix some Sheet Tab Color API issues http://svn.apache.org/viewvc?view=revision&revision=1225428 i#118697 - Fix uninitialized variable http://svn.apache.org/viewvc?view=revision&revision=1225859 i#118771 - ScUndoImportTab should preserve tab background color http://svn.apache.org/viewvc?view=revision&revision=1230356 i#118921 - Repaint linked sheet tab background color after updating link http://svn.apache.org/viewvc?view=revision&revision=1245177 i#118927 - Undo/Redo "Update Link" does not reset sheet tab color http://svn.apache.org/viewvc?view=revision&revision=1245241 i#118747 - Copy tab color when transferring sheets across documents http://svn.apache.org/viewvc?view=revision&revision=1230355 Patch contributed by Oliver Rainer-Wittman i#118012 - methods <ScBroadcastAreaSlot::AreaBroadcast(..)> and <ScBroadcastAreaSlot::AreaBroadcastInRange(..)> adapt stl-container iteration in order to avoid destroyed iterators during iteration. http://svn.apache.org/viewvc?view=revision&revision=1297916 Patches contributed by Mathias Bauer gnumake4 work variously http://svn.apache.org/viewvc?view=revision&revision=1394707 http://svn.apache.org/viewvc?view=revision&revision=1394326 http://svn.apache.org/viewvc?view=revision&revision=1396797 http://svn.apache.org/viewvc?view=revision&revision=1397315 Patch contributed by Daniel Rentz calc69: #i116936# fix VBA symbol Cells http://svn.apache.org/viewvc?view=revision&revision=1172135 Patches contributed by leiw: i#118546 CPU 100% on switched off AutoCalculate with Conditional Formatting on date values http://svn.apache.org/viewvc?view=revision&revision=1301380 Re-add new function documentation. Many various cleanups. Add missing calc66: #o11817313# also look at formula result number format, remove redundant binaries.
2012-11-30 12:23:25 +00:00
case svExternalDoubleRef:
{
sal_uInt16 nFileId;
String aTabName;
ScComplexRefData aRef;
PopExternalDoubleRef(nFileId, aTabName, aRef);
aRef.CalcAbsIfRel(aPos);
nCol1 = aRef.Ref1.nCol;
nRow1 = aRef.Ref1.nRow;
nTab1 = aRef.Ref1.nTab;
nCol2 = aRef.Ref2.nCol;
nRow2 = aRef.Ref2.nRow;
nTab2 = aRef.Ref2.nTab;
if (nColNew < 0)
nColNew = nCol2 - nCol1 + 1;
if (nRowNew < 0)
nRowNew = nRow2 - nRow1 + 1;
nCol1 = (SCCOL)((long)nCol1+nColPlus);
nRow1 = (SCROW)((long)nRow1+nRowPlus);
nCol2 = (SCCOL)((long)nCol1+nColNew-1);
nRow2 = (SCROW)((long)nRow1+nRowNew-1);
if (!ValidCol(nCol1) || !ValidRow(nRow1) ||
!ValidCol(nCol2) || !ValidRow(nRow2) || nTab1 != nTab2)
PushIllegalArgument();
else
PushExternalDoubleRef(nFileId, aTabName, nCol1, nRow1, nTab1, nCol2, nRow2, nTab2);
re-base on ALv2 code. Includes: Patches contributed by Herbert Duerr i#118735 prevent endless loop if vlookup/hlookup doesn't find anything http://svn.apache.org/viewvc?view=revision&revision=1239673 Patches contributed by Andre Fischer remove lp_solver http://svn.apache.org/viewvc?view=revision&revision=1199180 i#118160: Added external CoinMP library. http://svn.apache.org/viewvc?view=revision&revision=1233909 Patches contributed by Armin Le-Grand i#118485 - Styles for OLEs are not saved. http://svn.apache.org/viewvc?view=revision&revision=1182166 i#118524: apply patch, followup fixes to 118485 http://svn.apache.org/viewvc?view=revision&revision=1186077 Patches contributed by lihuiibm i#108860 - Fix range validation. http://svn.apache.org/viewvc?view=revision&revision=1242846 i#118954 Chart data will lost after copy to different file http://svn.apache.org/viewvc?view=revision&revision=1301345 Patches contributed by Ariel Constenla-Haile Fix Linux build breaker: extra qualification on member http://svn.apache.org/viewvc?view=revision&revision=1301591 i#118696 - i#118697 - Fix some Sheet Tab Color API issues http://svn.apache.org/viewvc?view=revision&revision=1225428 i#118697 - Fix uninitialized variable http://svn.apache.org/viewvc?view=revision&revision=1225859 i#118771 - ScUndoImportTab should preserve tab background color http://svn.apache.org/viewvc?view=revision&revision=1230356 i#118921 - Repaint linked sheet tab background color after updating link http://svn.apache.org/viewvc?view=revision&revision=1245177 i#118927 - Undo/Redo "Update Link" does not reset sheet tab color http://svn.apache.org/viewvc?view=revision&revision=1245241 i#118747 - Copy tab color when transferring sheets across documents http://svn.apache.org/viewvc?view=revision&revision=1230355 Patch contributed by Oliver Rainer-Wittman i#118012 - methods <ScBroadcastAreaSlot::AreaBroadcast(..)> and <ScBroadcastAreaSlot::AreaBroadcastInRange(..)> adapt stl-container iteration in order to avoid destroyed iterators during iteration. http://svn.apache.org/viewvc?view=revision&revision=1297916 Patches contributed by Mathias Bauer gnumake4 work variously http://svn.apache.org/viewvc?view=revision&revision=1394707 http://svn.apache.org/viewvc?view=revision&revision=1394326 http://svn.apache.org/viewvc?view=revision&revision=1396797 http://svn.apache.org/viewvc?view=revision&revision=1397315 Patch contributed by Daniel Rentz calc69: #i116936# fix VBA symbol Cells http://svn.apache.org/viewvc?view=revision&revision=1172135 Patches contributed by leiw: i#118546 CPU 100% on switched off AutoCalculate with Conditional Formatting on date values http://svn.apache.org/viewvc?view=revision&revision=1301380 Re-add new function documentation. Many various cleanups. Add missing calc66: #o11817313# also look at formula result number format, remove redundant binaries.
2012-11-30 12:23:25 +00:00
break;
}
re-base on ALv2 code. Includes: Patches contributed by Herbert Duerr i#118735 prevent endless loop if vlookup/hlookup doesn't find anything http://svn.apache.org/viewvc?view=revision&revision=1239673 Patches contributed by Andre Fischer remove lp_solver http://svn.apache.org/viewvc?view=revision&revision=1199180 i#118160: Added external CoinMP library. http://svn.apache.org/viewvc?view=revision&revision=1233909 Patches contributed by Armin Le-Grand i#118485 - Styles for OLEs are not saved. http://svn.apache.org/viewvc?view=revision&revision=1182166 i#118524: apply patch, followup fixes to 118485 http://svn.apache.org/viewvc?view=revision&revision=1186077 Patches contributed by lihuiibm i#108860 - Fix range validation. http://svn.apache.org/viewvc?view=revision&revision=1242846 i#118954 Chart data will lost after copy to different file http://svn.apache.org/viewvc?view=revision&revision=1301345 Patches contributed by Ariel Constenla-Haile Fix Linux build breaker: extra qualification on member http://svn.apache.org/viewvc?view=revision&revision=1301591 i#118696 - i#118697 - Fix some Sheet Tab Color API issues http://svn.apache.org/viewvc?view=revision&revision=1225428 i#118697 - Fix uninitialized variable http://svn.apache.org/viewvc?view=revision&revision=1225859 i#118771 - ScUndoImportTab should preserve tab background color http://svn.apache.org/viewvc?view=revision&revision=1230356 i#118921 - Repaint linked sheet tab background color after updating link http://svn.apache.org/viewvc?view=revision&revision=1245177 i#118927 - Undo/Redo "Update Link" does not reset sheet tab color http://svn.apache.org/viewvc?view=revision&revision=1245241 i#118747 - Copy tab color when transferring sheets across documents http://svn.apache.org/viewvc?view=revision&revision=1230355 Patch contributed by Oliver Rainer-Wittman i#118012 - methods <ScBroadcastAreaSlot::AreaBroadcast(..)> and <ScBroadcastAreaSlot::AreaBroadcastInRange(..)> adapt stl-container iteration in order to avoid destroyed iterators during iteration. http://svn.apache.org/viewvc?view=revision&revision=1297916 Patches contributed by Mathias Bauer gnumake4 work variously http://svn.apache.org/viewvc?view=revision&revision=1394707 http://svn.apache.org/viewvc?view=revision&revision=1394326 http://svn.apache.org/viewvc?view=revision&revision=1396797 http://svn.apache.org/viewvc?view=revision&revision=1397315 Patch contributed by Daniel Rentz calc69: #i116936# fix VBA symbol Cells http://svn.apache.org/viewvc?view=revision&revision=1172135 Patches contributed by leiw: i#118546 CPU 100% on switched off AutoCalculate with Conditional Formatting on date values http://svn.apache.org/viewvc?view=revision&revision=1301380 Re-add new function documentation. Many various cleanups. Add missing calc66: #o11817313# also look at formula result number format, remove redundant binaries.
2012-11-30 12:23:25 +00:00
default:
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalParameter();
re-base on ALv2 code. Includes: Patches contributed by Herbert Duerr i#118735 prevent endless loop if vlookup/hlookup doesn't find anything http://svn.apache.org/viewvc?view=revision&revision=1239673 Patches contributed by Andre Fischer remove lp_solver http://svn.apache.org/viewvc?view=revision&revision=1199180 i#118160: Added external CoinMP library. http://svn.apache.org/viewvc?view=revision&revision=1233909 Patches contributed by Armin Le-Grand i#118485 - Styles for OLEs are not saved. http://svn.apache.org/viewvc?view=revision&revision=1182166 i#118524: apply patch, followup fixes to 118485 http://svn.apache.org/viewvc?view=revision&revision=1186077 Patches contributed by lihuiibm i#108860 - Fix range validation. http://svn.apache.org/viewvc?view=revision&revision=1242846 i#118954 Chart data will lost after copy to different file http://svn.apache.org/viewvc?view=revision&revision=1301345 Patches contributed by Ariel Constenla-Haile Fix Linux build breaker: extra qualification on member http://svn.apache.org/viewvc?view=revision&revision=1301591 i#118696 - i#118697 - Fix some Sheet Tab Color API issues http://svn.apache.org/viewvc?view=revision&revision=1225428 i#118697 - Fix uninitialized variable http://svn.apache.org/viewvc?view=revision&revision=1225859 i#118771 - ScUndoImportTab should preserve tab background color http://svn.apache.org/viewvc?view=revision&revision=1230356 i#118921 - Repaint linked sheet tab background color after updating link http://svn.apache.org/viewvc?view=revision&revision=1245177 i#118927 - Undo/Redo "Update Link" does not reset sheet tab color http://svn.apache.org/viewvc?view=revision&revision=1245241 i#118747 - Copy tab color when transferring sheets across documents http://svn.apache.org/viewvc?view=revision&revision=1230355 Patch contributed by Oliver Rainer-Wittman i#118012 - methods <ScBroadcastAreaSlot::AreaBroadcast(..)> and <ScBroadcastAreaSlot::AreaBroadcastInRange(..)> adapt stl-container iteration in order to avoid destroyed iterators during iteration. http://svn.apache.org/viewvc?view=revision&revision=1297916 Patches contributed by Mathias Bauer gnumake4 work variously http://svn.apache.org/viewvc?view=revision&revision=1394707 http://svn.apache.org/viewvc?view=revision&revision=1394326 http://svn.apache.org/viewvc?view=revision&revision=1396797 http://svn.apache.org/viewvc?view=revision&revision=1397315 Patch contributed by Daniel Rentz calc69: #i116936# fix VBA symbol Cells http://svn.apache.org/viewvc?view=revision&revision=1172135 Patches contributed by leiw: i#118546 CPU 100% on switched off AutoCalculate with Conditional Formatting on date values http://svn.apache.org/viewvc?view=revision&revision=1301380 Re-add new function documentation. Many various cleanups. Add missing calc66: #o11817313# also look at formula result number format, remove redundant binaries.
2012-11-30 12:23:25 +00:00
break;
} // end switch
2000-09-18 23:16:46 +00:00
}
}
void ScInterpreter::ScIndex()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScIndex" );
sal_uInt8 nParamCount = GetByte();
2000-09-18 23:16:46 +00:00
if ( MustHaveParamCount( nParamCount, 1, 4 ) )
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
long nArea;
size_t nAreaCount;
SCCOL nCol;
SCROW nRow;
2000-09-18 23:16:46 +00:00
if (nParamCount == 4)
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
nArea = (long) ::rtl::math::approxFloor(GetDouble());
2000-09-18 23:16:46 +00:00
else
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
nArea = 1;
2000-09-18 23:16:46 +00:00
if (nParamCount >= 3)
nCol = (SCCOL) ::rtl::math::approxFloor(GetDouble());
2000-09-18 23:16:46 +00:00
else
nCol = 0;
if (nParamCount >= 2)
nRow = (SCROW) ::rtl::math::approxFloor(GetDouble());
2000-09-18 23:16:46 +00:00
else
nRow = 0;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
if (GetStackType() == svRefList)
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
nAreaCount = (sp ? static_cast<ScToken*>(pStack[sp-1])->GetRefList()->size() : 0);
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
else
nAreaCount = 1; // one reference or array or whatever
if (nAreaCount == 0 || (size_t)nArea > nAreaCount)
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushError( errNoRef);
2000-09-18 23:16:46 +00:00
return;
}
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
else if (nArea < 1 || nCol < 0 || nRow < 0)
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalArgument();
return;
}
switch (GetStackType())
{
case svMatrix:
case svExternalSingleRef:
case svExternalDoubleRef:
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
if (nArea != 1)
SetError(errIllegalArgument);
sal_uInt16 nOldSp = sp;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
ScMatrixRef pMat = GetMatrix();
if (pMat)
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
SCSIZE nC, nR;
pMat->GetDimensions(nC, nR);
// Access one element of a vector independent of col/row
// orientation?
bool bVector = ((nCol == 0 || nRow == 0) && (nC == 1 || nR == 1));
SCSIZE nElement = ::std::max( static_cast<SCSIZE>(nCol),
static_cast<SCSIZE>(nRow));
if (nC == 0 || nR == 0 ||
(!bVector && (static_cast<SCSIZE>(nCol) > nC ||
static_cast<SCSIZE>(nRow) > nR)) ||
(bVector && nElement > nC * nR))
PushIllegalArgument();
else if (nCol == 0 && nRow == 0)
sp = nOldSp;
else if (bVector)
{
--nElement;
if (pMat->IsString( nElement))
PushString( pMat->GetString( nElement));
2000-09-18 23:16:46 +00:00
else
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushDouble( pMat->GetDouble( nElement));
}
else if (nCol == 0)
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
{
ScMatrixRef pResMat = GetNewMat(nC, 1);
if (pResMat)
{
SCSIZE nRowMinus1 = static_cast<SCSIZE>(nRow - 1);
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
for (SCSIZE i = 0; i < nC; i++)
if (!pMat->IsString(i, nRowMinus1))
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
pResMat->PutDouble(pMat->GetDouble(i,
nRowMinus1), i, 0);
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
else
pResMat->PutString(pMat->GetString(i,
nRowMinus1), i, 0);
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushMatrix(pResMat);
}
else
PushIllegalArgument();
}
else if (nRow == 0)
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
{
ScMatrixRef pResMat = GetNewMat(1, nR);
if (pResMat)
{
SCSIZE nColMinus1 = static_cast<SCSIZE>(nCol - 1);
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
for (SCSIZE i = 0; i < nR; i++)
if (!pMat->IsString(nColMinus1, i))
pResMat->PutDouble(pMat->GetDouble(nColMinus1,
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
i), i);
else
pResMat->PutString(pMat->GetString(nColMinus1,
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
i), i);
PushMatrix(pResMat);
}
2000-09-18 23:16:46 +00:00
else
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalArgument();
}
else
{
if (!pMat->IsString( static_cast<SCSIZE>(nCol-1),
static_cast<SCSIZE>(nRow-1)))
PushDouble( pMat->GetDouble(
static_cast<SCSIZE>(nCol-1),
static_cast<SCSIZE>(nRow-1)));
else
PushString( pMat->GetString(
static_cast<SCSIZE>(nCol-1),
static_cast<SCSIZE>(nRow-1)));
}
2000-09-18 23:16:46 +00:00
}
}
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
break;
case svSingleRef:
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
SCCOL nCol1 = 0;
SCROW nRow1 = 0;
SCTAB nTab1 = 0;
PopSingleRef( nCol1, nRow1, nTab1);
if (nCol > 1 || nRow > 1)
PushIllegalArgument();
2000-09-18 23:16:46 +00:00
else
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushSingleRef( nCol1, nRow1, nTab1);
2000-09-18 23:16:46 +00:00
}
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
break;
case svDoubleRef:
case svRefList:
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
SCCOL nCol1 = 0;
SCROW nRow1 = 0;
SCTAB nTab1 = 0;
SCCOL nCol2 = 0;
SCROW nRow2 = 0;
SCTAB nTab2 = 0;
2011-08-14 16:10:05 +02:00
bool bRowArray = false;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
if (GetStackType() == svRefList)
{
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
FormulaTokenRef xRef = PopToken();
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
if (nGlobalError || !xRef)
{
PushIllegalParameter();
return;
}
ScRange aRange( ScAddress::UNINITIALIZED);
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
DoubleRefToRange( (*(static_cast<ScToken*>(xRef.get())->GetRefList()))[nArea-1], aRange);
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
aRange.GetVars( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2);
if ( nParamCount == 2 && nRow1 == nRow2 )
2011-08-14 16:10:05 +02:00
bRowArray = true;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
}
2000-09-18 23:16:46 +00:00
else
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PopDoubleRef( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2);
if ( nParamCount == 2 && nRow1 == nRow2 )
2011-08-14 16:10:05 +02:00
bRowArray = true;
}
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
if ( nTab1 != nTab2 ||
(nCol > 0 && nCol1+nCol-1 > nCol2) ||
(nRow > 0 && nRow1+nRow-1 > nRow2 && !bRowArray ) ||
( nRow > nCol2 - nCol1 + 1 && bRowArray ))
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalArgument();
else if (nCol == 0 && nRow == 0)
{
if ( nCol1 == nCol2 && nRow1 == nRow2 )
PushSingleRef( nCol1, nRow1, nTab1 );
else
PushDoubleRef( nCol1, nRow1, nTab1, nCol2, nRow2, nTab1 );
}
else if (nRow == 0)
{
if ( nRow1 == nRow2 )
PushSingleRef( nCol1+nCol-1, nRow1, nTab1 );
else
PushDoubleRef( nCol1+nCol-1, nRow1, nTab1,
nCol1+nCol-1, nRow2, nTab1 );
}
else if (nCol == 0)
{
if ( nCol1 == nCol2 )
PushSingleRef( nCol1, nRow1+nRow-1, nTab1 );
else if ( bRowArray )
{
nCol =(SCCOL) nRow;
nRow = 1;
PushSingleRef( nCol1+nCol-1, nRow1+nRow-1, nTab1);
}
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
else
PushDoubleRef( nCol1, nRow1+nRow-1, nTab1,
nCol2, nRow1+nRow-1, nTab1);
}
2000-09-18 23:16:46 +00:00
else
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushSingleRef( nCol1+nCol-1, nRow1+nRow-1, nTab1);
2000-09-18 23:16:46 +00:00
}
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
break;
default:
PushIllegalParameter();
2000-09-18 23:16:46 +00:00
}
}
}
void ScInterpreter::ScMultiArea()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScMultiArea" );
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
// Legacy support, convert to RefList
sal_uInt8 nParamCount = GetByte();
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
if (MustHaveParamCountMin( nParamCount, 1))
{
while (!nGlobalError && nParamCount-- > 1)
{
ScUnionFunc();
}
}
2000-09-18 23:16:46 +00:00
}
void ScInterpreter::ScAreas()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScAreas" );
sal_uInt8 nParamCount = GetByte();
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
if (MustHaveParamCount( nParamCount, 1))
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
size_t nCount = 0;
switch (GetStackType())
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
case svSingleRef:
{
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
FormulaTokenRef xT = PopToken();
ValidateRef( static_cast<ScToken*>(xT.get())->GetSingleRef());
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
++nCount;
}
break;
case svDoubleRef:
{
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
FormulaTokenRef xT = PopToken();
ValidateRef( static_cast<ScToken*>(xT.get())->GetDoubleRef());
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
++nCount;
}
break;
case svRefList:
{
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
FormulaTokenRef xT = PopToken();
ValidateRef( *(static_cast<ScToken*>(xT.get())->GetRefList()));
nCount += static_cast<ScToken*>(xT.get())->GetRefList()->size();
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
}
break;
default:
SetError( errIllegalParameter);
2000-09-18 23:16:46 +00:00
}
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushDouble( double(nCount));
2000-09-18 23:16:46 +00:00
}
}
void ScInterpreter::ScCurrency()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScCurrency" );
sal_uInt8 nParamCount = GetByte();
2000-09-18 23:16:46 +00:00
if ( MustHaveParamCount( nParamCount, 1, 2 ) )
{
OUString aStr;
2000-09-18 23:16:46 +00:00
double fDec;
if (nParamCount == 2)
{
fDec = ::rtl::math::approxFloor(GetDouble());
2000-09-18 23:16:46 +00:00
if (fDec < -15.0 || fDec > 15.0)
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalArgument();
2000-09-18 23:16:46 +00:00
return;
}
}
else
fDec = 2.0;
double fVal = GetDouble();
double fFac;
if ( fDec != 0.0 )
fFac = pow( (double)10, fDec );
else
fFac = 1.0;
if (fVal < 0.0)
fVal = ceil(fVal*fFac-0.5)/fFac;
else
fVal = floor(fVal*fFac+0.5)/fFac;
Color* pColor = NULL;
if ( fDec < 0.0 )
fDec = 0.0;
sal_uLong nIndex = pFormatter->GetStandardFormat(
2000-09-18 23:16:46 +00:00
NUMBERFORMAT_CURRENCY,
ScGlobal::eLnge);
if ( (sal_uInt16) fDec != pFormatter->GetFormatPrecision( nIndex ) )
2000-09-18 23:16:46 +00:00
{
OUString sFormatString = pFormatter->GenerateFormat(
2000-09-18 23:16:46 +00:00
nIndex,
ScGlobal::eLnge,
2011-08-14 16:10:05 +02:00
true, // mit Tausenderpunkt
false, // nicht rot
(sal_uInt16) fDec,// Nachkommastellen
2000-09-18 23:16:46 +00:00
1); // 1 Vorkommanull
if (!pFormatter->GetPreviewString(sFormatString,
fVal,
aStr,
&pColor,
ScGlobal::eLnge))
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
SetError(errIllegalArgument);
2000-09-18 23:16:46 +00:00
}
else
{
2001-02-21 17:39:37 +00:00
pFormatter->GetOutputString(fVal, nIndex, aStr, &pColor);
2000-09-18 23:16:46 +00:00
}
2001-02-21 17:39:37 +00:00
PushString(aStr);
2000-09-18 23:16:46 +00:00
}
}
void ScInterpreter::ScReplace()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScReplace" );
2000-09-18 23:16:46 +00:00
if ( MustHaveParamCount( GetByte(), 4 ) )
{
String aNewStr( GetString() );
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
double fCount = ::rtl::math::approxFloor( GetDouble());
double fPos = ::rtl::math::approxFloor( GetDouble());
2000-09-18 23:16:46 +00:00
String aOldStr( GetString() );
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
if (fPos < 1.0 || fPos > static_cast<double>(STRING_MAXLEN)
|| fCount < 0.0 || fCount > static_cast<double>(STRING_MAXLEN))
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalArgument();
2000-09-18 23:16:46 +00:00
else
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
xub_StrLen nCount = static_cast<xub_StrLen>(fCount);
xub_StrLen nPos = static_cast<xub_StrLen>(fPos);
xub_StrLen nLen = aOldStr.Len();
if (nPos > nLen + 1)
nPos = nLen + 1;
if (nCount > nLen - nPos + 1)
nCount = nLen - nPos + 1;
2000-09-18 23:16:46 +00:00
aOldStr.Erase( nPos-1, nCount );
2001-02-21 17:39:37 +00:00
if ( CheckStringResultLen( aOldStr, aNewStr ) )
aOldStr.Insert( aNewStr, nPos-1 );
PushString( aOldStr );
2000-09-18 23:16:46 +00:00
}
}
}
void ScInterpreter::ScFixed()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScFixed" );
sal_uInt8 nParamCount = GetByte();
2000-09-18 23:16:46 +00:00
if ( MustHaveParamCount( nParamCount, 1, 3 ) )
{
OUString aStr;
2000-09-18 23:16:46 +00:00
double fDec;
2011-08-14 16:10:05 +02:00
bool bThousand;
2000-09-18 23:16:46 +00:00
if (nParamCount == 3)
bThousand = !GetBool(); // Param TRUE: keine Tausenderpunkte
else
2011-08-14 16:10:05 +02:00
bThousand = true;
2000-09-18 23:16:46 +00:00
if (nParamCount >= 2)
{
fDec = ::rtl::math::approxFloor(GetDoubleWithDefault( 2.0 ));
2000-09-18 23:16:46 +00:00
if (fDec < -15.0 || fDec > 15.0)
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalArgument();
2000-09-18 23:16:46 +00:00
return;
}
}
else
fDec = 2.0;
double fVal = GetDouble();
double fFac;
if ( fDec != 0.0 )
fFac = pow( (double)10, fDec );
else
fFac = 1.0;
if (fVal < 0.0)
fVal = ceil(fVal*fFac-0.5)/fFac;
else
fVal = floor(fVal*fFac+0.5)/fFac;
Color* pColor = NULL;
if (fDec < 0.0)
fDec = 0.0;
sal_uLong nIndex = pFormatter->GetStandardFormat(
2000-09-18 23:16:46 +00:00
NUMBERFORMAT_NUMBER,
ScGlobal::eLnge);
OUString sFormatString = pFormatter->GenerateFormat(
2000-09-18 23:16:46 +00:00
nIndex,
ScGlobal::eLnge,
bThousand, // mit Tausenderpunkt
false, // nicht rot
(sal_uInt16) fDec,// Nachkommastellen
2000-09-18 23:16:46 +00:00
1); // 1 Vorkommanull
if (!pFormatter->GetPreviewString(sFormatString,
fVal,
2001-02-21 17:39:37 +00:00
aStr,
2000-09-18 23:16:46 +00:00
&pColor,
ScGlobal::eLnge))
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalArgument();
2000-09-18 23:16:46 +00:00
else
2001-02-21 17:39:37 +00:00
PushString(aStr);
2000-09-18 23:16:46 +00:00
}
}
void ScInterpreter::ScFind()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScFind" );
sal_uInt8 nParamCount = GetByte();
2000-09-18 23:16:46 +00:00
if ( MustHaveParamCount( nParamCount, 2, 3 ) )
{
double fAnz;
if (nParamCount == 3)
fAnz = GetDouble();
else
fAnz = 1.0;
String sStr = GetString();
if( fAnz < 1.0 || fAnz > (double) sStr.Len() )
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushNoValue();
2000-09-18 23:16:46 +00:00
else
{
xub_StrLen nPos = sStr.Search( GetString(), (xub_StrLen) fAnz - 1 );
if (nPos == STRING_NOTFOUND)
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushNoValue();
2000-09-18 23:16:46 +00:00
else
PushDouble((double)(nPos + 1));
}
}
}
void ScInterpreter::ScExact()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScExact" );
2000-09-18 23:16:46 +00:00
nFuncFmtType = NUMBERFORMAT_LOGICAL;
if ( MustHaveParamCount( GetByte(), 2 ) )
{
String s1( GetString() );
String s2( GetString() );
PushInt( s1 == s2 );
}
}
void ScInterpreter::ScLeft()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScLeft" );
sal_uInt8 nParamCount = GetByte();
2000-09-18 23:16:46 +00:00
if ( MustHaveParamCount( nParamCount, 1, 2 ) )
{
xub_StrLen n;
if (nParamCount == 2)
{
double nVal = ::rtl::math::approxFloor(GetDouble());
2001-02-21 17:39:37 +00:00
if ( nVal < 0.0 || nVal > STRING_MAXLEN )
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalArgument();
2000-09-18 23:16:46 +00:00
return ;
}
else
n = (xub_StrLen) nVal;
}
else
n = 1;
String aStr( GetString() );
aStr.Erase( n );
2001-02-21 17:39:37 +00:00
PushString( aStr );
2000-09-18 23:16:46 +00:00
}
}
void ScInterpreter::ScRight()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScRight" );
sal_uInt8 nParamCount = GetByte();
2000-09-18 23:16:46 +00:00
if ( MustHaveParamCount( nParamCount, 1, 2 ) )
{
xub_StrLen n;
if (nParamCount == 2)
{
double nVal = ::rtl::math::approxFloor(GetDouble());
2001-02-21 17:39:37 +00:00
if ( nVal < 0.0 || nVal > STRING_MAXLEN )
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalArgument();
2000-09-18 23:16:46 +00:00
return ;
}
else
n = (xub_StrLen) nVal;
}
else
n = 1;
String aStr( GetString() );
if( n < aStr.Len() )
aStr.Erase( 0, aStr.Len() - n );
2001-02-21 17:39:37 +00:00
PushString( aStr );
2000-09-18 23:16:46 +00:00
}
}
void ScInterpreter::ScSearch()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSearch" );
sal_uInt8 nParamCount = GetByte();
2000-09-18 23:16:46 +00:00
if ( MustHaveParamCount( nParamCount, 2, 3 ) )
{
double fAnz;
2000-09-18 23:16:46 +00:00
if (nParamCount == 3)
{
fAnz = ::rtl::math::approxFloor(GetDouble());
2000-09-18 23:16:46 +00:00
if (fAnz > double(STRING_MAXLEN))
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalArgument();
2000-09-18 23:16:46 +00:00
return;
}
}
else
fAnz = 1.0;
String sStr = GetString();
OUString SearchStr = GetString();
2000-09-18 23:16:46 +00:00
xub_StrLen nPos = (xub_StrLen) fAnz - 1;
xub_StrLen nEndPos = sStr.Len();
if( nPos >= nEndPos )
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushNoValue();
2000-09-18 23:16:46 +00:00
else
{
utl::SearchParam::SearchType eSearchType =
(MayBeRegExp( SearchStr, pDok ) ?
utl::SearchParam::SRCH_REGEXP : utl::SearchParam::SRCH_NORMAL);
utl::SearchParam sPar(SearchStr, eSearchType, false, false, false);
utl::TextSearch sT( sPar, *ScGlobal::pCharClass );
2000-09-18 23:16:46 +00:00
int nBool = sT.SearchFrwrd(sStr, &nPos, &nEndPos);
if (!nBool)
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushNoValue();
2000-09-18 23:16:46 +00:00
else
PushDouble((double)(nPos) + 1);
}
}
}
void ScInterpreter::ScMid()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScMid" );
2000-09-18 23:16:46 +00:00
if ( MustHaveParamCount( GetByte(), 3 ) )
{
double fAnz = ::rtl::math::approxFloor(GetDouble());
double fAnfang = ::rtl::math::approxFloor(GetDouble());
2001-02-21 17:39:37 +00:00
const String& rStr = GetString();
2000-09-18 23:16:46 +00:00
if (fAnfang < 1.0 || fAnz < 0.0 || fAnfang > double(STRING_MAXLEN) || fAnz > double(STRING_MAXLEN))
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalArgument();
2000-09-18 23:16:46 +00:00
else
2001-02-21 17:39:37 +00:00
PushString(rStr.Copy( (xub_StrLen) fAnfang - 1, (xub_StrLen) fAnz ));
2000-09-18 23:16:46 +00:00
}
}
void ScInterpreter::ScText()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScText" );
2000-09-18 23:16:46 +00:00
if ( MustHaveParamCount( GetByte(), 2 ) )
{
OUString sFormatString = GetString();
OUString aStr;
bool bString = false;
double fVal = 0.0;
switch (GetStackType())
{
case svError:
PopError();
break;
case svDouble:
fVal = PopDouble();
break;
default:
{
FormulaTokenRef xTok( PopToken());
if (!nGlobalError)
{
PushTempToken( xTok.get());
// Temporarily override the ConvertStringToValue()
// error for GetCellValue() / GetCellValueOrZero()
sal_uInt16 nSErr = mnStringNoValueError;
mnStringNoValueError = errNotNumericString;
fVal = GetDouble();
mnStringNoValueError = nSErr;
if (nGlobalError == errNotNumericString)
{
// Not numeric.
nGlobalError = 0;
PushTempToken( xTok.get());
aStr = GetString();
bString = true;
}
}
}
}
if (nGlobalError)
PushError( nGlobalError);
2000-09-18 23:16:46 +00:00
else
{
OUString aResult;
Color* pColor = NULL;
LanguageType eCellLang;
const ScPatternAttr* pPattern = pDok->GetPattern(
aPos.Col(), aPos.Row(), aPos.Tab() );
if ( pPattern )
eCellLang = ((const SvxLanguageItem&)
pPattern->GetItem( ATTR_LANGUAGE_FORMAT )).GetValue();
else
eCellLang = ScGlobal::eLnge;
if (bString)
{
if (!pFormatter->GetPreviewString( sFormatString, aStr,
aResult, &pColor, eCellLang))
PushIllegalArgument();
else
PushString( aResult);
}
else
{
if (!pFormatter->GetPreviewStringGuess( sFormatString, fVal,
aResult, &pColor, eCellLang))
PushIllegalArgument();
else
PushString( aResult);
}
}
2000-09-18 23:16:46 +00:00
}
}
void ScInterpreter::ScSubstitute()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSubstitute" );
sal_uInt8 nParamCount = GetByte();
2000-09-18 23:16:46 +00:00
if ( MustHaveParamCount( nParamCount, 3, 4 ) )
{
xub_StrLen nAnz;
if (nParamCount == 4)
{
double fAnz = ::rtl::math::approxFloor(GetDouble());
2001-02-21 17:39:37 +00:00
if( fAnz < 1 || fAnz > STRING_MAXLEN )
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalArgument();
2000-09-18 23:16:46 +00:00
return;
}
else
nAnz = (xub_StrLen) fAnz;
}
else
nAnz = 0;
String sNewStr = GetString();
String sOldStr = GetString();
String sStr = GetString();
xub_StrLen nPos = 0;
xub_StrLen nCount = 0;
xub_StrLen nNewLen = sNewStr.Len();
xub_StrLen nOldLen = sOldStr.Len();
2011-08-14 16:10:05 +02:00
while( true )
2000-09-18 23:16:46 +00:00
{
nPos = sStr.Search( sOldStr, nPos );
if (nPos != STRING_NOTFOUND)
{
nCount++;
if( !nAnz || nCount == nAnz )
{
sStr.Erase(nPos,nOldLen);
2001-02-21 17:39:37 +00:00
if ( CheckStringResultLen( sStr, sNewStr ) )
{
sStr.Insert(sNewStr,nPos);
nPos = sal::static_int_cast<xub_StrLen>( nPos + nNewLen );
2001-02-21 17:39:37 +00:00
}
else
2000-09-18 23:16:46 +00:00
break;
}
else
nPos++;
}
else
break;
}
2001-02-21 17:39:37 +00:00
PushString( sStr );
2000-09-18 23:16:46 +00:00
}
}
void ScInterpreter::ScRept()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScRept" );
2000-09-18 23:16:46 +00:00
if ( MustHaveParamCount( GetByte(), 2 ) )
{
double fAnz = ::rtl::math::approxFloor(GetDouble());
2001-02-21 17:39:37 +00:00
String aStr( GetString() );
if ( fAnz < 0.0 )
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushIllegalArgument();
2001-02-21 17:39:37 +00:00
else if ( fAnz * aStr.Len() > STRING_MAXLEN )
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushError( errStringOverflow );
}
else if ( fAnz == 0.0 )
2001-02-21 17:39:37 +00:00
PushString( EMPTY_STRING );
2000-09-18 23:16:46 +00:00
else
{
2001-02-21 17:39:37 +00:00
const xub_StrLen nLen = aStr.Len();
xub_StrLen n = (xub_StrLen) fAnz;
rtl::OUStringBuffer aRes(n*nLen);
2000-09-18 23:16:46 +00:00
while( n-- )
aRes.append(aStr);
PushString( aRes.makeStringAndClear() );
2000-09-18 23:16:46 +00:00
}
}
}
void ScInterpreter::ScConcat()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScConcat" );
sal_uInt8 nParamCount = GetByte();
2000-09-18 23:16:46 +00:00
String aRes;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
while( nParamCount-- > 0)
2000-09-18 23:16:46 +00:00
{
2001-02-21 17:39:37 +00:00
const String& rStr = GetString();
aRes.Insert( rStr, 0 );
2000-09-18 23:16:46 +00:00
}
2001-02-21 17:39:37 +00:00
PushString( aRes );
2000-09-18 23:16:46 +00:00
}
void ScInterpreter::ScErrorType()
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScErrorType" );
sal_uInt16 nErr;
sal_uInt16 nOldError = nGlobalError;
2000-09-18 23:16:46 +00:00
nGlobalError = 0;
switch ( GetStackType() )
{
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
case svRefList :
{
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
FormulaTokenRef x = PopToken();
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
if (nGlobalError)
nErr = nGlobalError;
else
{
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
const ScRefList* pRefList = static_cast<ScToken*>(x.get())->GetRefList();
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
size_t n = pRefList->size();
if (!n)
nErr = errNoRef;
else if (n > 1)
nErr = errNoValue;
else
{
ScRange aRange;
DoubleRefToRange( (*pRefList)[0], aRange);
if (nGlobalError)
nErr = nGlobalError;
else
{
ScAddress aAdr;
if ( DoubleRefToPosSingleRef( aRange, aAdr ) )
nErr = pDok->GetErrCode( aAdr );
else
nErr = nGlobalError;
}
}
}
}
break;
2000-09-18 23:16:46 +00:00
case svDoubleRef :
{
ScRange aRange;
PopDoubleRef( aRange );
if ( nGlobalError )
nErr = nGlobalError;
else
{
ScAddress aAdr;
if ( DoubleRefToPosSingleRef( aRange, aAdr ) )
nErr = pDok->GetErrCode( aAdr );
else
nErr = nGlobalError;
}
}
break;
case svSingleRef :
{
ScAddress aAdr;
PopSingleRef( aAdr );
if ( nGlobalError )
nErr = nGlobalError;
else
nErr = pDok->GetErrCode( aAdr );
}
break;
default:
PopError();
nErr = nGlobalError;
}
if ( nErr )
{
nGlobalError = 0;
PushDouble( nErr );
}
else
{
nGlobalError = nOldError;
INTEGRATION: CWS odff (1.51.38); FILE MERGED 2008/02/27 18:32:38 er 1.51.38.21: RESYNC: (1.53-1.55); FILE MERGED 2008/02/20 16:41:50 er 1.51.38.20: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell 2008/02/13 15:50:10 dr 1.51.38.19: 'warnings' 2008/02/12 11:21:12 er 1.51.38.18: #i77280# make CHOOSE() select an endpoint path in case of error so ISERROR(CHOOSE()) yields TRUE 2008/02/07 13:10:02 er 1.51.38.17: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future. 2008/02/06 22:27:46 er 1.51.38.16: #i8947# MATCH with array/matrix as lookup parameter; applied patch from <kohei> 2008/02/06 10:16:22 er 1.51.38.15: for clarity and safety on signed types, comparison on >0 2008/01/31 22:15:16 er 1.51.38.14: more consistent error codes, IllegalArgument vs. IllegalParameter 2008/01/31 20:05:32 er 1.51.38.13: now that we have error token: some PopError() instead of Pop() and some PushError(...) instead of SetError(...) 2008/01/31 15:34:23 er 1.51.38.12: #i32340# ScFormulaResult, third wave 2008/01/21 18:51:17 er 1.51.38.11: RESYNC: (1.51-1.53); FILE MERGED 2008/01/11 19:54:56 er 1.51.38.10: ScErrorToken matrix cases 2008/01/10 16:54:27 er 1.51.38.9: introduce ScErrorToken, get rid of secondary error stack 2008/01/08 15:39:30 er 1.51.38.8: #i38759# ScMin/ScMax: for MS-Excel interoperability the result of an empty set (no value at all in the arguments given) is zero instead of error; even if that could be regarded as mathematical nonsense..; patch from Lv Yue <lvyue>, slightly modified 2008/01/07 19:42:01 er 1.51.38.7: #i85000# shrinking the source range is the better approach 2008/01/07 13:11:42 er 1.51.38.6: #i85000# ScSumIf: Xcl silent cutaway style ignoring out-of-sheet-bounds 2008/01/07 11:37:32 er 1.51.38.5: #i85000# ScSumIf: if 3rd parameter use only upper left and take geometry from 1st parameter; patch from Kohei 2008/01/04 18:43:15 er 1.51.38.4: #i32341# make AREAS() handle RefList 2008/01/04 16:45:15 er 1.51.38.3: #i32341# get rid of INDEX() special treatment and use RefList instead 2007/12/19 20:15:02 er 1.51.38.2: #i32341# ocUnion: functions handling svRefList 2007/12/17 15:59:34 er 1.51.38.1: #i32341# union / range list operator ocUnion; first wave
2008-03-06 14:32:04 +00:00
PushNA();
2000-09-18 23:16:46 +00:00
}
}
bool ScInterpreter::MayBeRegExp( const OUString& rStr, const ScDocument* pDoc )
2000-09-18 23:16:46 +00:00
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::MayBeRegExp" );
if ( pDoc && !pDoc->GetDocOptions().IsFormulaRegexEnabled() )
return false;
if ( rStr.isEmpty() || (rStr.getLength() == 1 && rStr[0] != '.') )
return false; // single meta characters can not be a regexp
2001-02-22 14:50:23 +00:00
static const sal_Unicode cre[] = { '.','*','+','?','[',']','^','$','\\','<','>','(',')','|', 0 };
const sal_Unicode* p1 = rStr.getStr();
2000-09-18 23:16:46 +00:00
sal_Unicode c1;
while ( ( c1 = *p1++ ) != 0 )
2000-09-18 23:16:46 +00:00
{
const sal_Unicode* p2 = cre;
while ( *p2 )
{
if ( c1 == *p2++ )
2011-08-14 16:10:05 +02:00
return true;
2000-09-18 23:16:46 +00:00
}
}
return false;
2000-09-18 23:16:46 +00:00
}
static bool lcl_LookupQuery( ScAddress & o_rResultPos, ScDocument * pDoc,
const ScQueryParam & rParam, const ScQueryEntry & rEntry )
{
bool bFound = false;
ScQueryCellIterator aCellIter( pDoc, rParam.nTab, rParam, false);
if (rEntry.eOp != SC_EQUAL)
{
// range lookup <= or >=
SCCOL nCol;
SCROW nRow;
bFound = aCellIter.FindEqualOrSortedLastInRange( nCol, nRow);
if (bFound)
{
o_rResultPos.SetCol( nCol);
o_rResultPos.SetRow( nRow);
}
}
else if (aCellIter.GetFirst())
{
// EQUAL
bFound = true;
o_rResultPos.SetCol( aCellIter.GetCol());
o_rResultPos.SetRow( aCellIter.GetRow());
}
return bFound;
}
bool ScInterpreter::LookupQueryWithCache( ScAddress & o_rResultPos,
const ScQueryParam & rParam ) const
{
CWS-TOOLING: integrate CWS odff06 2009-09-10 18:58:49 +0200 dr r276042 : #i104954# excel export: fixed broken handling of unary operators 2009-09-06 19:30:43 +0200 er r275861 : warnings 2009-09-05 19:48:41 +0200 er r275849 : warnings; wntmsci12 tries to be too smart 2009-09-05 19:37:47 +0200 er r275848 : warnings 2009-09-03 22:45:42 +0200 er r275776 : #i5658# GetCellValueOrZero: missed the formula cell case 2009-09-03 14:28:41 +0200 er r275752 : #i90759# better description of ZTEST 2009-09-03 03:34:03 +0200 er r275739 : warnings 2009-09-03 03:31:19 +0200 er r275738 : warnings 2009-09-03 03:16:46 +0200 er r275737 : warnings 2009-09-03 03:11:42 +0200 er r275736 : CELLTYPE_DESTROYED only if DBG_UTIL 2009-09-03 03:06:31 +0200 er r275735 : warnings 2009-09-03 03:00:30 +0200 er r275734 : warnings 2009-09-03 02:32:35 +0200 er r275733 : fix broken rebase merge 2009-09-02 22:27:53 +0200 er r275730 : CWS-TOOLING: rebase CWS odff06 to trunk@275331 (milestone: DEV300:m56) 2009-09-02 14:45:05 +0200 er r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value 2009-08-29 22:05:31 +0200 er r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed 2009-08-25 13:23:59 +0200 er r275349 : #i90759# rewording of ZTEST description 2009-08-21 00:10:22 +0200 er r275204 : #i82007# correct description of POWER and parameters; patch from <regina> 2009-08-20 23:58:20 +0200 er r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina> 2009-08-20 22:58:57 +0200 er r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma 2009-08-14 17:55:45 +0200 er r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue> 2009-08-11 00:47:48 +0200 er r274845 : unxlngi6 compiler warnings 2009-08-11 00:43:06 +0200 er r274844 : unxlngi6 compiler warnings 2009-08-10 23:59:05 +0200 er r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors 2009-07-08 18:46:00 +0200 dr r273846 : #i102022# export 3D refs to cond. formats and data validation 2009-07-02 17:59:40 +0200 dr r273667 : #i102702# adapt changes from sc/source/filter/excel 2009-07-02 15:20:37 +0200 dr r273656 : #i102702# reimplementation of formula token class export 2009-07-02 14:41:02 +0200 er r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff 2009-07-01 00:10:16 +0200 er r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character. 2009-07-01 00:03:57 +0200 er r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao> 2009-06-15 16:42:06 +0200 er r272999 : merge patch from #i102701 2009-06-15 11:15:16 +0200 dr r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token 2009-06-11 13:27:46 +0200 er r272867 : CWS-TOOLING: rebase CWS odff06 to trunk@272827 (milestone: DEV300:m50) 2009-04-30 18:28:02 +0200 er r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei> 2009-04-30 13:58:44 +0200 er r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ... 2009-04-30 12:32:44 +0200 er r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions 2009-04-30 01:32:38 +0200 er r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina> 2009-04-30 01:18:54 +0200 er r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina> 2009-04-30 00:46:00 +0200 er r271397 : #i59153# improve accuracy of MOD; patch from <regina> 2009-04-30 00:29:43 +0200 er r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina> 2009-04-29 23:53:28 +0200 er r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina> 2009-04-28 18:22:07 +0200 er r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified 2009-03-24 17:29:36 +0100 er r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it
2009-09-11 18:55:06 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::LookupQueryWithCache" );
bool bFound = false;
const ScQueryEntry& rEntry = rParam.GetEntry(0);
bool bColumnsMatch = (rParam.nCol1 == rEntry.nField);
OSL_ENSURE( bColumnsMatch, "ScInterpreter::LookupQueryWithCache: columns don't match");
if (!bColumnsMatch)
bFound = lcl_LookupQuery( o_rResultPos, pDok, rParam, rEntry);
else
{
ScRange aLookupRange( rParam.nCol1, rParam.nRow1, rParam.nTab,
rParam.nCol2, rParam.nRow2, rParam.nTab);
ScLookupCache& rCache = pDok->GetLookupCache( aLookupRange);
ScLookupCache::QueryCriteria aCriteria( rEntry);
ScLookupCache::Result eCacheResult = rCache.lookup( o_rResultPos,
aCriteria, aPos);
switch (eCacheResult)
{
case ScLookupCache::NOT_CACHED :
case ScLookupCache::CRITERIA_DIFFERENT :
bFound = lcl_LookupQuery( o_rResultPos, pDok, rParam, rEntry);
if (eCacheResult == ScLookupCache::NOT_CACHED)
rCache.insert( o_rResultPos, aCriteria, aPos, bFound);
break;
case ScLookupCache::FOUND :
bFound = true;
break;
case ScLookupCache::NOT_AVAILABLE :
; // nothing, bFound remains FALSE
break;
}
}
return bFound;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */