Commit Graph

172 Commits

Author SHA1 Message Date
d701a1a6df Move virtual ScToken members up to FormulaToken
Change-Id: I20eb3b44d540f459cd1902a7a3b6a5c867e5bc07
2014-10-23 09:30:09 +02:00
d9f303a030 Remove unused FormulaToken::Is3DRef
Change-Id: Ib720bc4b3bfff8e428d14d65ff73144db82c60e0
2014-10-22 10:58:21 +02:00
08d93506c2 Make these methods non-inline again.
Change-Id: I30c7969ab386f4cba2f0b44cbebe306ce6430b15
2014-10-03 15:31:20 -04:00
1df1c5eed9 formula: std::auto_ptr -> std::unique_ptr
Change-Id: I7b4784abf5177e22a9df33c5d4faccfd39801b11
2014-09-26 15:47:03 +02:00
234fba5b45 convert OSL_FAIL to SAL_WARN
Change-Id: I001f29dca5f2a01d70115bb309c99c64c4a65efb
2014-08-22 19:50:52 +02:00
5021f29841 Remove some unused code
Change-Id: Ib1fb5108a858c35a5bbe8ba865e15660639725e3
Reviewed-on: https://gerrit.libreoffice.org/10593
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2014-07-29 14:20:36 +00:00
ce4e7a830d fdo#81038 Fixed FormulaTokenIterator to use std::vector instead of linked list
Change-Id: I09f9adfa52b64732cc6200a0dbeb6263435c7c07
Reviewed-on: https://gerrit.libreoffice.org/10565
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
Tested-by: Kohei Yoshida <libreoffice@kohei.us>
2014-07-27 04:03:07 +00:00
08e3e6c223 fdo#73148 add options to Calc function AGGREGATE
matrix-ranges not supported

Change-Id: I902c78da6d9c7a4a5f8c5e4a7e1678b69d49a6fe
Reviewed-on: https://gerrit.libreoffice.org/9449
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2014-07-08 10:23:03 +00:00
c9d037e5e8 resolved fdo#79957 propagate ForceArray through jump tokens
ForceArray parameters weren't propagated and enforced to array arguments
on svJump tokens (FormulaJumpToken), namely IF, CHOOSE, IFERROR and
IFNA.

Change-Id: Icf9074f11b826655a52858d778d9a0122d207aa4
2014-06-13 14:21:34 +02:00
184a00b962 loplugin: inlinesimplememberfunctions
Change-Id: I42119f656ca528286fb25d2d36c0af54b7d04a6b
2014-06-09 10:10:13 +02:00
f824604b5c fix spelling
Change-Id: I1a4d66a78549ea49649a6bed92acb44dbd8b13e2
2014-05-21 13:14:11 +02:00
636581bf87 most certainly == was meant
Change-Id: I1b0833daa576cd8603421e1036b8773badc8c775
2014-05-21 12:45:24 +02:00
c07b8dedf7 ODS load perf: transfer ownership of the ScTokenArray to save cycles.
Add API to wnsure we don't end up allocating 32k bytes of tokens
for each ScFormulaToken, as happens when you Add a token to a new
empty ScTokenArray.

Change-Id: Ib12a3065eb513243a2146ebb009fbaa650385dd9
2014-05-21 10:03:36 +01:00
b6b0b95bae Bail out of group calculation in case the array fetching fails.
Change-Id: Ibb7575eeb025fc025d05b147629113796185c5d3
2014-05-14 16:25:38 -04:00
a921d38ad4 No more SetCompileForFAP(). Use respective flag setting methods instead.
Change-Id: Ib2256ebac8a7e63e7e24fb35d13d47b811bd8e19
2014-05-14 13:15:11 -04:00
69a7e7440c Use "stop on error" concept rather than "ignore error if true".
Just to keep the pattern of "true" -> "action", "false" -> "no action".

Change-Id: I6303bc779cd7048eef2fdc3c2abba8be8f15da6d
2014-05-14 13:15:11 -04:00
5db9391c06 Introduce a new boolean flag and use it in lieu of bCompileForFAP.
To make it sound more general than "compile for FAP".

Change-Id: Ia6916b6f3579a290be7d5074f809666be2bd2473
2014-05-14 13:15:10 -04:00
90c644a862 coverity#707866 Uninitialized pointer field
Change-Id: Ia80922b1819d41e4963689fda87750f0f507fd57
2014-05-10 21:13:04 +01:00
50d100f4ac Make a separate method to detemine if an opcode is a jump command.
Jump to make it a bit more pleasant to follow the code...

Change-Id: Ie9bef122e8bb63a2d8cc54acc9c8ddc9ac9a2e8a
2014-05-01 15:29:24 -04:00
eb4c43aa61 Avoid possible memory leaks in case of exceptions
Change-Id: Ie07c6c9989da444eb6052691696e95b808c23fb0
2014-04-15 16:12:31 +09:00
625c595fc3 fdo#76294: Intern strings in AddFormulaToken() as well.
And a whole bunch of changes needed to make that happen.

Change-Id: Idd98fbc99322c0d72fb0a7848d89cb1a6abc88b6
2014-04-14 18:34:20 -04:00
b09426b83c fdo#76294: Properly intern string literals in formula on xls import.
Change-Id: Ib3a442cbb68c23294762561f2911101a087a795e
2014-04-14 17:00:40 -04:00
355baf5734 fdo#75741: Re-implement CompileNameFormula for formula groups.
Change-Id: I57e1e464ac5f7abc10ce5ea5752e036ddb6cf6d7
2014-04-07 14:43:16 -04:00
4b060ce51a Remove remaining DBG_CTOR etc. remnants from formula
Change-Id: I36740cd276d2047552298606f24b2696ed61b36b
2014-03-28 15:34:01 +01:00
0ca7ab6ea0 Make these non inline.
Change-Id: Ib139850380b039382565e3de3666eebb5750f32d
2014-03-06 20:50:02 -05:00
e4def6edaa fdo#72197 Add Excel 2010 functions
MODE.SNGL, MODE.MULT, NEGBINOM.DIST, Z.TEST

Change-Id: I55eb05e1ebdb9dbc3ce9ae84e3cdacfdfa112091
Reviewed-on: https://gerrit.libreoffice.org/7776
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2014-03-05 05:53:24 -06:00
41f5dda746 remove unused code in formula/FormulaTokenArray
formula::FormulaTokenArray::AddString(unsigned short const*)

Change-Id: I6c014f6ada3b75398112e81f9c8e7de7dd776c7d
2014-03-05 09:17:42 +02:00
d7f1f91b19 remove unused code in formula/vectortoken
Remove these methods:.
formula::DoubleVectorRefToken::GetRequestedArrayLength()
formula::SingleVectorRefToken::GetRequestedArrayLength()
formula::SingleVectorRefToken::SingleVectorRefToken(
    double const*, unsigned long, unsigned long)

and optimise some accessor methods.

Change-Id: I04f53593894a59dbefdd1cbc9505c6eb7cd8610b
2014-03-05 09:17:42 +02:00
6ef6dd0122 Store the length of originally requested array size prior to trimming.
This change adds GetRequestedArrayLength() method to both single and double
vector ref tokens, which returns the length of the requested array size prior
to trimming of the trailing empty cell region.

Change-Id: Iaba96fa2ea4ff3c8bccb0bc86fa4f1525e2f45fb
2014-02-27 21:19:36 -05:00
224f6c17f7 Remove visual noise from formula
Change-Id: Ie7503623ad9bec1806345f65b435c7bd94a08c2b
Reviewed-on: https://gerrit.libreoffice.org/8263
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-26 14:50:17 -06:00
5e21a413c7 cppuhelper: retrofit std::exception into overriding exception specs
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
2014-02-26 18:22:20 +01:00
0ce0c369aa Remove unneccessary comments
Change-Id: I939160ae72fecbe3d4a60ce755730bd4c38497fb
Reviewed-on: https://gerrit.libreoffice.org/8182
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-23 03:38:49 +00:00
2b9fe0c75e cid#707865 Uninitialized pointer field
Change-Id: I86c90a95093d6c90cbc733164a3b773468575b5b
2014-02-21 11:59:09 +02:00
9c09211bce Add internal cell function __DEBUG_VAR to sniff arbitrary internal state.
Useful for debugging in a more flashy way.  But never ever document this
for end users.  If you are an end user reading this, use this at your
own risk.  You have been warned.

Change-Id: Ibbdb45f576287f707106327704754ffaec27ba3c
2013-12-20 20:09:51 -05:00
b55259eeb5 typo fixes
Change-Id: Ia5f104bfd707bcf4e159c78ca2764c861fb0b6d9
2013-12-20 15:55:00 +01:00
610b2b94b3 remove unnecessary use of OUString constructor when assigning
change code like
   aStr = OUString("xxxx");
to
   aStr = "xxxx";

Change-Id: Ib981a5cc735677ec5dba76ef9279a107d22e99d4
2013-11-19 10:29:31 +02:00
3f5987421e Fix indentation.
Change-Id: I260649aca445e03c52423d8f0a63eb4681d2a876
2013-11-18 17:25:39 -05:00
8819e69095 Remove unused member.
Change-Id: I8331251f77fb202375370a425e01862aa0f6310d
2013-11-14 23:53:52 -05:00
d9a914fe5b Identify methods that don't modify internal state and mark them const.
Change-Id: Ie63d93d51640bfb80dc02bb226d742c2f9be96d8
2013-11-14 23:53:51 -05:00
d366c9b20e remove unnecessary sal_Unicode casts in various places
Change-Id: Ibf04062ca86ed866202d748c3b62a210d30ed6ec
2013-11-14 08:17:32 +02:00
10515c6c6f fixed file format mappings always have RESOURCE_BASE separators
Change-Id: I7ac93f742b469156cd8eb3f8171c7e05a98598ad
2013-11-13 18:38:52 +01:00
e59cc6448c c++11 we love you
Change-Id: I6ff8610f6b31481334d609a0e150285e6eef6096
2013-11-13 16:48:01 +00:00
debe0835ca introduced FormulaGrammar::GRAM_OOXML with FormulaLanguage::OOXML
FormulaLanguage::XL_ENGLISH is not OOXML, unconditionally using
SymbolsEnglishXL with RID_STRLIST_FUNCTION_NAMES_ENGLISH_OOXML spoils
the grammars of FormulaLanguage::XL_ENGLISH that are not OOXML.

Change-Id: Id885d1c033cd15dc7b11c6490be3a98500027d37
2013-11-13 17:15:59 +01:00
01ea75c0f0 Add separate list of function names for OOXML import.
Change-Id: Id6bb9ed65f94a56e82c0c4a6fee241dec4eb9138
2013-11-11 16:17:30 -05:00
3ac4277ba1 Thread-safe way to check for presence of references in formula tokens.
Change-Id: I995668d1e183dc0dae4f354889bc13053e858723
2013-11-11 16:17:28 -05:00
e52779d2f8 remove unnecessary use of OUString constructor
Change-Id: Ifb220af71857ddacd64e8204fb6d3e4aad8eef71
2013-11-11 11:21:26 +02:00
4efc5fa376 Protect those global symbols containers with mutex during initialization.
Change-Id: Id15b3e1a2bfebd2ea795fd412a259f125f5d9bab
2013-11-06 20:40:25 -05:00
2b01553fa5 fdo#54938: Convert svx to use cppu::supportsService
Change-Id: I3ab178924cb1c4240511f08625f244dac54e3913
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2013-10-30 18:17:11 +01:00
3629a512b5 New constructor that takes both numeric and string arrays.
Change-Id: I9c48f340a0349e5f1ba772fcd783924c79b07616
2013-10-18 23:22:40 -04:00
c30a2c4baf More eye-pleasing way of checking for valid vector array...
Change-Id: If2f47a7d98a4cbc9e09dc98c1bb0e11f8f889265
2013-10-18 23:22:39 -04:00