Commit Graph

161 Commits

Author SHA1 Message Date
Noel Grandin
cb9bcae7ba clang-tidy performance-unnecessary-value-param in formula
Change-Id: I9f90c55f74216c2f3452e5b30d85b304668330b3
2016-04-11 11:38:58 +02:00
Eike Rathke
cf56d2449c adjust other-sheet-local relative sheet references, tdf#96915
... so they still point to the same sheet as if used on the original
local sheet.

Change-Id: Id40378deaf70c1645bfa52ea28aa39775d16aec5
2016-03-18 14:36:28 +01:00
Eike Rathke
64e5424138 Resolves: tdf#96915 implement other-sheet-local named expressions
Change-Id: I0d62536caa6eb455473a755067abc585662cd9a5
2016-03-18 10:37:40 +01:00
Noel Grandin
9704207c38 loplugin:constantparam in formula
Change-Id: I3adeed435b62ae60b5d0d4b763dceced5675cd85
Reviewed-on: https://gerrit.libreoffice.org/23330
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-18 06:01:25 +00:00
Noel Grandin
fecfd9c498 loplugin:unuseddefaultparams in sc (part2)
Change-Id: I356a86bfca20cbf2c52185697042dce5237e847d
2016-03-03 08:11:02 +02:00
Noel Grandin
05eda0dc19 loplugin:unusedfields in sc
Change-Id: If5123e676a27302f3e11475309bc748977c6f430
2015-11-23 08:55:53 +02:00
Eike Rathke
270f8ea48b rename FormulaToken HasForceArray to IsInForceArray
... to name it was it does and to distinguish from
ScParameterClassification::HasForceArray(OpCode) which IS about a
function having ForceArray parameters.

Change-Id: I8af4e1d0353cdb5ad0a9b837ae0763dc77242734
2015-11-18 21:02:06 +01:00
Stephan Bergmann
6edc492efd -Werror,-Winconsistent-missing-override
Change-Id: I3bb2764b625d44f6e0cecbdde3363440faef63b5
2015-11-16 15:26:50 +01:00
Eike Rathke
49257e1da7 Resolves: tdf#95670 propagate ForceArray per parameter
Regression of b5cd11b4b0

It was always wrong to propagate ForceArray already if a function had a
ForceArray parameter *somewhere*, we need to do this per parameter
instead.

Change-Id: If188d45366279d9a7bf641edc7e4dd7095d6d035
2015-11-16 13:25:49 +01:00
Noel Grandin
16246ed7b2 com::sun::star->css in sc
Change-Id: I7774890f46f9343e944e34db27af8bce3b1d0915
2015-10-28 09:22:34 +02:00
Stephan Bergmann
b36963c0a6 Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY code
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12 17:52:29 +02:00
Noel Grandin
90e8ad7ab7 loplugin:unusedmethods scripting,sc
Change-Id: I0016aefce1aad3a89bd23dcec6fbab58a7c844d7
Reviewed-on: https://gerrit.libreoffice.org/17263
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-22 07:02:34 +00: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
Winfried Donkers
bf95b81a5d remove unused code; bMapDupToInternal in struct AddInMap
is not used apart from getting a value.

Conflicts:
	sc/source/core/tool/odffmap.cxx

Change-Id: I26e942f6357970c6d9de27b5d5cf00b451193732
Reviewed-on: https://gerrit.libreoffice.org/15658
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-05-07 15:55:59 +00:00
Eike Rathke
6f25c21eb5 const all CreateString... FormulaToken*
Change-Id: I0e0f064357543e5dc86b178ce30ee005e5483e04
2015-04-18 00:46:08 +02:00
Eike Rathke
d6398719ab TableRef: correct GetToken() logic
Ensure that only desired tokens are obtained and the resulting new token
is actually the current one upon return.

Change-Id: I624c324b861d8658accf3285cad2cfc5a598b450
2015-04-09 18:19:02 +02:00
Eike Rathke
d5e1b41330 TableRef: lookup column specifier
Change-Id: I73109e5a862b2f4bc456dff512bddf5d23586a6d
2015-04-09 18:19:02 +02:00
Eike Rathke
1714dd654e TableRef: parse item specifiers
Change-Id: If1419844544be08fa14b6c78c755abba35fff353
2015-03-12 02:47:17 +01:00
Eike Rathke
519d2f6e5e add TableRef stack
Change-Id: If781e6ab13eb5ad175352e330379776d6ca4fcd8
2015-03-11 14:32:36 +01:00
Eike Rathke
967f609cb7 add Item enum to ScTableRefToken
Change-Id: Ie35d717fd55e6bbde958d3f2be4dac5f489467f9
2015-03-05 11:45:01 +01:00
Eike Rathke
338d006c9d use ScTableRefToken in ScRawToken::CreateToken()
Change-Id: I895f142667a593bc5fc4f33f2417cbee991e503a
2015-03-05 11:45:00 +01:00
Eike Rathke
eaf5a24b1e add HandleTableRef()
Change-Id: I95e80bfa11177e1a52f3215d27448f4642091bad
2015-03-05 11:44:59 +01:00
Eike Rathke
8d78888a0c rename confusing HandleSingleRef() to more appropriate HandleColRowName()
Change-Id: Ib2e6d5cd9863ac1f9b0ba9b192f5d17d489ed19f
2015-03-05 11:44:52 +01:00
Jan Kantert
0a9e7293a5 tdf#89330 preserve file name case in an unresolvable external named range
Change-Id: Ib8728a4a9c793b162de07a0cef66e242879f2aa1
Reviewed-on: https://gerrit.libreoffice.org/14474
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2015-02-13 16:29:23 +00:00
Caolán McNamara
2ab73c3817 callcatcher: update unused code
pleasing cleanup of whacky ScRawToken::sbyteOffset, etc.

Change-Id: I5ad97f8dab7c5dc9d5f0286bf606b619126c22c9
2014-11-16 15:19:04 +00:00
Noel Grandin
1866d90d81 remove unused code in ScRawToken
Change-Id: I8f644ac7f7bbdd2c9cb6f5a41709e41efa737885
Reviewed-on: https://gerrit.libreoffice.org/12423
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-11-15 16:04:01 +00:00
Andrea Gelmini
da40cac540 Fix common typos. No automatic tools. Handmade…
Change-Id: I1ab4e23b0539f8d39974787f226e57a21f96e959
Reviewed-on: https://gerrit.libreoffice.org/12164
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-11-12 11:04:11 +00:00
Andrea Gelmini
0c0e3e7539 Fixed typos. No automatic tools (sed, and so on).
Change-Id: Ia43976d84eede6f699381bc4f3daf89b95e4cb4f
Reviewed-on: https://gerrit.libreoffice.org/12150
Reviewed-by: Bryan Quigley <gquigs@gmail.com>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2014-10-30 17:16:02 +00:00
Eike Rathke
8c23a767d9 write OOXML externalReferences, externalLinks, fdo#45286
This for the first time writes external references (hopefully) correctly
and adds the necessary relationship streams and the externalLink streams
with sheetData. At least Excel 2013 loaded the result without
complaining, so do we.

Change-Id: I3d615490a60c5420ae13c0bfc6297642d86a07b9
2014-08-11 20:06:45 +02:00
Kohei Yoshida
27a84e9600 Avoid unnecessary cloning of ScRawToken during token check.
Change-Id: Ia980054437394ef48f7df655411f81d20b9cfa32
2014-05-21 13:25:39 -04:00
Michael Meeks
34f0e4f425 ODS load perf: 7% of the time re-creating sheet name strings.
No need to create cached versions of stringified sheet tokens for
a given grammar at great for every formula that we compile; defer
until use. Is this a large cost on save ?

Change-Id: I8058ed564dbdc00ff45c02cb483c1a20a48af272
2014-05-21 16:55:41 +01:00
Kohei Yoshida
ffa18f5651 Update the method comment and add assertion per what the comment says.
Change-Id: I751e33a8bba732e3b7935fc41385ea5e1f8c8704
2014-05-14 13:15:11 -04:00
Kohei Yoshida
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
Thomas Arnhold
2bac61013e fix-includes.pl: sc
Change-Id: Iade3fedac5d2f8e978b7dd9c30f001d7d1564946
2014-05-11 01:55:39 +02:00
Thomas Arnhold
2dfd639916 fixincludeguards.sh: sc
sorry, huge one...
2014-04-19 11:10:10 +02:00
Stephan Bergmann
567ef6d578 Second batch of adding SAL_OVERRIDE to overriding function declarations
...mostly done with a rewriting Clang plugin, with just some manual tweaking
necessary to fix poor macro usage.

Change-Id: Ie656f9d653fc716f72ac175925272696d509038f
2014-03-27 18:12:18 +01:00
Kohei Yoshida
4917cebdb9 fdo#75304: Set external reference info to ScCompiler.
And remove this excessive const fetish which was unfortunately necessary to
get this to compile.  Setting the container const is good enough.

Change-Id: I2c6cc55a88643a68e065c4518cdf069c247f4f02
2014-02-24 16:05:07 -05:00
Kohei Yoshida
295a55b647 Use CompileFormulaContext in CompileDBFormula() and CalcAfterLoad().
Also make some adjustment in order to handle formula cell's "temp grammar"
correctly.

Change-Id: I6fdd5c67bb95e4de90ea71db624c9610c1e2febf
2014-02-04 13:49:09 -05:00
Kohei Yoshida
9c15f4e484 More places to cover pre-compiled sheet names.
Change-Id: I9dead89e990297abee185a8a64b0d2f4a86f5c70
2014-02-04 11:28:11 -05:00
Kohei Yoshida
059f43f575 Pre-compile all compiler-ready sheet names to avoid doing it repeatedly.
This reduces the lag after updating range names especially with a large
number of range names.

Change-Id: Idbfa3b6447b693a566192828e7137b2aeaa0d1f5
2014-02-04 10:22:27 -05:00
Norbert Thiebaud
3cbfcee36d xub_StrLen and tools/string.hxx final straw
Thre is still some 0xffff limit left and possibly some
less than gracefully handled overflow/error cases

Change-Id: I00957ee3a30b02f73918ea49d7353056263dc638
Reviewed-on: https://gerrit.libreoffice.org/7787
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2014-02-03 07:44:28 +00:00
Tor Lillqvist
92bede3900 Avoid some global statics that drag in lots of code in the static linking case
When doing static linking, i.e. when building the single executable
for an iOS app, or the single DSO for an Android app, we list all our
libraries (which all are static archives) on the linker command
line. Static initializers in any library always get linked in, so it
is a good idea to avoid such in the cases where they drag in a large
amount of code. Which was the case here.

Change-Id: Idef9aec1c10686c86f517ad10cf540a313d9c829
2014-01-17 17:47:42 +02:00
Kohei Yoshida
6adf0ba4c8 Avoid passing the external ref manager pointer to make it re-entrant.
Change-Id: I67a0df1dcd0635ea82bfc397041a9c43dedbe75d
2013-11-18 17:25:40 -05:00
Kohei Yoshida
ccc32f4c4f Try not to pass ScCompiler as a parameter.
Change-Id: I7ef58f0455f11a3eb2ac88ec76e9436fb48a74e2
2013-11-18 17:25:40 -05:00
Kohei Yoshida
066d33c7bd EncodeUrlMode always set to "by grammer". Remove it.
Change-Id: I7de308bbdaacc1fc60a142497acc2301c080e5dc
2013-11-18 17:25:40 -05:00
Kohei Yoshida
0df2c02d4f Let's have makeRefStr() take individual parameters again.
And remove use of TokenStringContext from ScCompiler.

Change-Id: Ib0636e2437a64edd372623a7176dab462eed831b
2013-11-18 17:25:39 -05:00
Kohei Yoshida
f79537242c Have makeRefStr() accept a context object rather than individual params.
Change-Id: Id52e02aa29d85d207420c80a95ada2f8487f165f
2013-11-18 17:25:37 -05:00
Kohei Yoshida
07f8216e57 Create string from token array directly from ScTokenArray. Still WIP.
And make it re-entrant for thread safety. This method should not modify
the internal state of the token array object. The one with ScCompiler
is not re-entrant. Still some way to go.

Change-Id: I06de3637341727aef0963dddfb98527f415bf7fa
2013-11-14 23:53:52 -05:00
Kohei Yoshida
d9a914fe5b Identify methods that don't modify internal state and mark them const.
Change-Id: Ie63d93d51640bfb80dc02bb226d742c2f9be96d8
2013-11-14 23:53:51 -05:00
Noel Grandin
a18a92b1b0 convert STRING_NOTFOUND in sc module
ScGlobal::FindUnquoted
  - return -1 instead of STRING_NOTFOUND
  - change return type from xub_StrLen to sal_Int32
  - remove last two parameters because noone was using them

ScCompiler::GetDocTabPos
  - return -1 instead of STRING_NOTFOUND
  - change return type from xub_StrLen to sal_Int32

inputhdl.cxx/lcl_MatchParenthesis
  - return -1 instead of STRING_NOTFOUND
  - change return type from xub_StrLen to sal_Int32
  - make function static, no-one outside this module is using it

Change-Id: I141ab082db180ff2da5a7ca6813cd3607b9ea7f7
2013-11-11 13:41:44 +02:00