Commit Graph

39 Commits

Author SHA1 Message Date
Eike Rathke
f41257dc99 simplify the ReplaceToken() offset logic to absolute offsets
Change-Id: I8d02fb63bc0c5cb48aabaf7a8800f5f9ac95cbf5
2016-04-23 15:52:35 +02:00
Eike Rathke
7756822206 alignment
Change-Id: If7dbdcd93a43d4e14f853b7d3436fa31c0091403
2016-04-23 15:52:33 +02:00
Noel Grandin
4ff5a55584 loplugin:unusedmethods
Change-Id: Ib2dc804f55d1a96ae01f2cf31b7d55956040a72e
Reviewed-on: https://gerrit.libreoffice.org/21603
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-20 08:13:51 +00:00
Noel Grandin
0078512eda loplugin:unusedmethods unused return value in include/formula
Change-Id: Ic5d6c11d955ef5ef53dea0bb4e5bec8167874a91
2016-01-12 10:37:20 +02:00
Eike Rathke
4ae7b66286 use new'ed FormulaToken and FormulaTokenArray::Add()
... instead of a temporary instance and AddToken() that just clones it
again.

Add function comment describing the difference.

Change-Id: I3f089965d394b33d7bbbb9a1c3f69dc1c4182fd2
2016-01-05 23:42:07 +01:00
Eike Rathke
2f79244cb3 tdf#96198 detect old ISO/WEEKNUM usage with two arguments, tdf#50950 follow-up
5.0 and earlier implemented WEEKNUM(date,mode) with mode!=1 such that
effectively an ISO 8601 week number was calculated. WEEKNUM was wrongly
saved as ISOWEEKNUM (even with two parameters though it is defined to
have only one) so that when reading it we can try to detect a literal
double argument for mode and if it is not 1 remove it to keep
ISOWEEKNUM(date) instead of calling WEEKNUM(date,mode) which wouldn't
match.

A further change to 5.0 to accept also only one parameter in
WEEKNUM(date) and for this default the mode to not 1 for ISO week will
yield forward compatibility.

Change-Id: I88de7dd809d69b6826a190505d2a1dd3fe79c90b
2016-01-05 12:10:02 +01:00
Eike Rathke
dad412e07f Resolves: tdf#95440 SharedString are interned per document, re-intern
... if literal strings are copied with formula expression tokens.

Change-Id: I13526907bb6c2c605c6ed9584fa6e3f2b18623b8
2015-12-15 17:50:21 +01:00
Markus Mohrhard
bf3dd18cf8 no need to allocate that vector on the heap
This seems to give about 10% performance improvements in some calc cell
calculations.

Change-Id: Ibd91558b3c107e4c8e1401345c9332f97645453e
2015-10-03 10:01:51 +02:00
Noel Grandin
82b896f1f8 loplugin:unusedmethods formula
Change-Id: I62ff278679638dda7e10c86c49b1966641418e8b
Reviewed-on: https://gerrit.libreoffice.org/17223
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-21 06:50:30 +00:00
Stephan Bergmann
3a68a7dcf4 Remove workarounds for no longer supported GCC 4.6
In bridges/source/cpp_uno/gcc3_macosx_x86-64/share.hxx, the #if also covered
Clang, which actually needs these declarations (for now; the right fix will
probably be to #include <cxxabi.h>).

Change-Id: I1eebd59e2371f3498d740ab78244927358c4f23f
2015-06-26 17:31:14 +02:00
Eike Rathke
80aafaf793 in OOXML save references of named expressions with col,row=0,0 base position
Saving relative references of named expressions to OOXML never worked,
upon reload they pointed to a different position offset by the value of
the original base position. This at least saves positive relative
references correctly, while generating #REF! for negative offsets which
is slightly better than having them point to a wrong location and
silently calculate different values..

Also, this is a prerequisite for TableRef ThisRow references in named
expressions to be saved correctly in A1 notation, which results in a
relative row 0 value.

Change-Id: I3734f910794ceab4b9224b214ad11c64d1d18e67
2015-06-23 13:19:25 +02:00
Stephan Bergmann
f96313d161 Fix previous commit
Change-Id: I56b5212595f7750965a7620498fb063422f2eae0
2015-06-15 18:34:00 +02:00
Stephan Bergmann
dbd093176e Make ReplaceMode accessible from ScCompiler::CompileString
Change-Id: If25443f27ff09aca8b38d00ab80ecfdc00ab2642
2015-06-15 18:30:52 +02:00
Eike Rathke
1d463600f4 prepare ReplaceToken() to replace also in RPN
Change-Id: I98fbcb9849f2c2b1f26109a54ecbf5347cdd8b4e
2015-06-15 17:52:16 +02:00
Noel Grandin
f304a7a14a loplugin:staticmethods
Change-Id: I384a5e60f4b7b2f479c89ef97630519059ab720f
2015-05-05 09:30:39 +02:00
Noel Grandin
216fdcbdb4 convert RECALCMODE_ constants to scoped enum
Change-Id: Ice2e45a3db59adc34a160b4b410cc51c750835f2
2015-04-08 09:07:08 +02:00
Eike Rathke
40c9a46b78 add FormulaTokenArray::ReplaceToken()
Change-Id: I42c893677c1b8a35ee502a9ae438d4c0f19867d3
2015-03-07 00:24:45 +01:00
Laurent Charrière
1f56cbf8cc sc: rename ocChose et al. to ocChoose et al.
Change-Id: I1aa8ee6c827a6d6a6c6beb190bdc9c3c91d82b22
Reviewed-on: https://gerrit.libreoffice.org/13889
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2015-01-14 19:52:07 +00:00
Stephan Bergmann
1fa6ce352d include is unused again
Change-Id: I921c631545be6da66639709642e423c44e82c5af
2015-01-09 15:45:44 +01:00
Stephan Bergmann
a1ecce3ad7 One more place to work around missing std::underlying_type for GCC 4.6
Change-Id: I46225e30f6326e0af5a8ac3bebe9847f4dbe50d0
2015-01-09 15:44:29 +01:00
Caolán McNamara
05fb5e871e type_traits for std::underlying_type
Change-Id: Iad41da9294c9a38e501e5bcd1b3185f2e3b26ff2
2015-01-09 14:31:26 +00:00
Michael Stahl
2f69e16c72 override the overloading of "overload" to decrease cognitive (over-)load
Change-Id: I4d0e1de89d0bbdbea23bc5a46bf75ae0ce4e2796
2015-01-09 00:00:47 +01:00
Caolán McNamara
dfeb898b53 boost::unordered_set->std::unordered_set
Change-Id: I0a8ecc3aa26ffc56f216a6a0e078e158b03a4a02
2015-01-04 18:48:41 +00:00
Tor Lillqvist
9adb00cf4d The value of the nRefs field is not used anywhere
Change-Id: I9116611d04846af7f00cb366e9174fd99e741d5c
2014-12-19 18:33:35 +02:00
Eike Rathke
14aabee5a7 simplify RewriteMissing() and switch in Add...(), fdo#81596 related
Change-Id: If2ca37e1fda87ce56282fc2d2fc57a0784851139
2014-11-28 02:04:22 +01:00
Winfried Donkers
4feaf96f50 fdo#81596 export to OOXML that need argument changes
Change-Id: I3a99e416be9f3f04175939e4560f8f7c55497185
Reviewed-on: https://gerrit.libreoffice.org/10831
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2014-11-27 20:09:26 +00:00
Marcos Paulo de Souza
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
Jeffrey Stedfast
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
Michael Meeks
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
Kohei Yoshida
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
Kohei Yoshida
b09426b83c fdo#76294: Properly intern string literals in formula on xls import.
Change-Id: Ib3a442cbb68c23294762561f2911101a087a795e
2014-04-14 17:00:40 -04:00
Kohei Yoshida
355baf5734 fdo#75741: Re-implement CompileNameFormula for formula groups.
Change-Id: I57e1e464ac5f7abc10ce5ea5752e036ddb6cf6d7
2014-04-07 14:43:16 -04:00
Noel Grandin
41f5dda746 remove unused code in formula/FormulaTokenArray
formula::FormulaTokenArray::AddString(unsigned short const*)

Change-Id: I6c014f6ada3b75398112e81f9c8e7de7dd776c7d
2014-03-05 09:17:42 +02:00
Alexandre Vicenzi
53ba2eefb0 fdo#63154 Removed unused solar.h ref. in basic and formula
Change-Id: Ibf30f29653568929e65ebd897cef474a6838d5cc
Reviewed-on: https://gerrit.libreoffice.org/7735
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-01-30 11:31:13 +00:00
Kohei Yoshida
3ac4277ba1 Thread-safe way to check for presence of references in formula tokens.
Change-Id: I995668d1e183dc0dae4f354889bc13053e858723
2013-11-11 16:17:28 -05:00
Norbert Thiebaud
38016f9d22 fdo#65108 inter-module includes <>
Change-Id: I6d9f67e26a213d14aa9114e612781fbd8c223637
2013-11-09 18:48:37 -06:00
Thomas Arnhold
1130a359cb fixincludeguards.sh: include - the rest
Change-Id: If1ee11da444a7f96f2d8668b277540da0bb4dbe9
2013-10-23 23:22:31 +02:00
Markus Mohrhard
801a657ea6 iString to OUString in some calc core code
Change-Id: I25fc70cfd01f5ad25f7362157796d3ddf06139e1
2013-09-07 12:55:45 +02:00
Bjoern Michaelsen
b9337e22ce execute move of global headers
see https://gerrit.libreoffice.org/#/c/3367/
and Change-Id: I00c96fa77d04b33a6f8c8cd3490dfcd9bdc9e84a for details

Change-Id: I199a75bc4042af20817265d5ef85b1134a96ff5a
2013-04-23 22:20:31 +02:00