summaryrefslogtreecommitdiff
path: root/sc/source/core/tool/compiler.cxx
AgeCommit message (Collapse)AuthorFilesLines
2015-09-07TableRef: finally support header-less table structured referencesEike Rathke1-23/+26
Change-Id: Ifd6928bafc59abc252f29af81f26f6362e9fc933
2015-09-07TableRef: SAL_WARN only if the fallback to cell lookup was successfulEike Rathke1-1/+4
... which means the internal column names should already had it. An unsuccessful cell lookup fallback doesn't necessarily fulfill a warning condition. Change-Id: I973b8edff83fcb47a34cc35fd9bf5163882f7742
2015-09-07TableRef: prefer internal table column name over header cell contentEike Rathke1-35/+37
Now that table column names are refreshed we can prefer them over header cell content during formula compilation and string creation of a tokenized formula. Change-Id: I0755404883af78c52c8d27a777acd7300bc2af75
2015-09-02TableRef: introduce ScDBDataPortion enumEike Rathke1-1/+1
... to replace * bool bStartonly=false with ScDBDataPortion::AREA * bool bStartonly=true with ScDBDataPortion::TOP_LEFT and provide means to look at header row only with ScDBDataPortion::HEADER as needed for TableRef. Change-Id: I9f6affd04c15a6204193687b2379160eb975f56e
2015-09-01TableRef: anywhere in ScDBData area, geez..Eike Rathke1-1/+1
... bStartOnly is not the header row but only the top left cell. Change-Id: I8d93aeafa8d55b59defd4476b5bcc19b0e026e70
2015-09-01TableRef: of course ScDBData at the referenced pos, not the formula posEike Rathke1-2/+2
Change-Id: I6166293cfa0704ef96df917b7af1940d5efbdb14
2015-09-01TableRef: fall back to stored table column name if header cell is emptyEike Rathke1-0/+7
... during token string creation, as an empty column specifier is the last thing we want to see.. which still can happen though if the stored name was synced with the existing cell data and copying the older original name was not possible, for example due to name clashes. Change-Id: I6a0d313a02efafc092f0bbf7725fb3b3e77e486f
2015-08-14loplugin: defaultparamsNoel Grandin1-1/+1
Change-Id: I0d4b901b6678f3344ed62018d871e1630195aef0
2015-08-12rename confusing classesWinfried Donkers1-2/+2
In module sc classes FuncData and FuncCollection are used for legacy binary AddIn functions. In module scaddins also exist classes FuncData. This can be confusing, so the classes and relevant members/variables have been renamed in module sc. Change-Id: Ib0700ed1177b760a4d46312b8578ca8b55882c53 Reviewed-on: https://gerrit.libreoffice.org/17670 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2015-07-23TableRef: generate error for header-less column references, tdf#91278 relatedEike Rathke1-30/+48
... instead of using an arbitray first data record's string as column name. We don't support header-less tables properly yet, so don't pretend to. Change-Id: Ia42619ec800291b6617a61c8a89a2d54ef231cec
2015-07-21Resolves: tdf#92448 check for numeric '.' only if sheet separator is '.'Eike Rathke1-1/+1
Change-Id: I427da08eed3fc5daed2bac4d588b66a3f03fd28c
2015-07-08remove ScRange::Justify() and replace calls with PutInOrder()Eike Rathke1-1/+1
Change-Id: I350050ac085b1f220d5288d33c253ba0c9a5fd2c
2015-06-26use ScComplexRefData::IsEntireCol() and IsEntireRow()Eike Rathke1-4/+4
Change-Id: I4287019f5492825f6d295c4e364405f0d7329eb7
2015-06-26tdf#44419 display entire column/row references as A:A/1:1Eike Rathke1-23/+65
... if both anchors of the other axis are absolute. Now that we can parse them as of commit 0c8778ce1df92ca3bc2a8dd2f64568fb257e9e39 (and follow-up 4091b4fbdce40262eba46ab94653287b1fd928e8). Change-Id: Ie67127fe2d7546e7e598ee1a4d89133c08222262
2015-06-25tdf#44419 in second reference part stop number parsing at separatorEike Rathke1-0/+12
Change-Id: I70218bc41df0d56ab42d652aa7ac51733dc06f4b
2015-06-25TableRef: ScCompiler::IsTableRefColumn() lookup column name in ScDBDataEike Rathke1-0/+16
... as a fallback for named expressions during document import when cell content isn't available yet. Change-Id: I134ac2aaeb5f336703edbadfd6664d916d2c5885
2015-06-25loplugin:stringconstant: Flag more inefficienciesStephan Bergmann1-2/+2
Change-Id: Icdd850336caf998e62cdb5a90fc3683eddd04a3e
2015-06-24Get rid of comphelper::string::is*Ascii functionsStephan Bergmann1-1/+1
Change-Id: I99912112e5b009d7a143f9816d757cdf6ebb1783
2015-06-23in OOXML save references of named expressions with col,row=0,0 base positionEike Rathke1-13/+45
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-22TableRef: inherit RelName in generated reference if named expressionEike Rathke1-0/+13
Change-Id: I67621e59c6e20e7f3b5101772b5d274d8c745ce9
2015-06-21TableRef: make ThisRow work in named expressionsEike Rathke1-6/+31
... including reference update as named expressions don't hold RPN. Change-Id: Ieea19e24f1dcf71d489ff0249bc7d3644e4f0d2b
2015-06-21TableRef: sheet reference always absolute and 3DEike Rathke1-13/+2
Change-Id: I17a2889c21efe9943b348049a1e9384df167435d
2015-06-21TableRef: generated reference's column relativity follows column specifierEike Rathke1-3/+7
Change-Id: Ie0781bf5ebeb4cec0e3bb96f8c471e469b1b223a
2015-06-21TableRef: column specifier is an absolute referenceEike Rathke1-3/+7
Change-Id: Ia7de5dc101a410aa1c25f36e64627fa3461ee772
2015-06-15prepare ReplaceToken() to replace also in RPNEike Rathke1-1/+2
Change-Id: I98fbcb9849f2c2b1f26109a54ecbf5347cdd8b4e
2015-06-12copypasta error, tdf#69552 follow-upEike Rathke1-1/+1
Change-Id: I3388a75bb8aa23d8a8998671f25b5297352efca8
2015-06-11tdf#69552 [part 2] support all ODFF1.2 and Excel2013 variationsWinfried Donkers1-5/+9
of CEILING and FLOOR Change-Id: I9537d9bd8dbca2eac769e74e9d3d5b298b76f594 Reviewed-on: https://gerrit.libreoffice.org/16016 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2015-06-02fdo#39468 Translate German Comments - sc/source/core/tool/ #1Christian M. Heller1-21/+21
Change-Id: I95c6669cfbdcbc81c5a173a6687fca14bed255fb Reviewed-on: https://gerrit.libreoffice.org/16003 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-05-22Remove include stdio (part5)Julien Nabet1-1/+0
Change-Id: Iea3eb02b5ae54de1de14b5357726d1073e54e1af Reviewed-on: https://gerrit.libreoffice.org/15851 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2015-05-05loplugin:staticmethodsNoel Grandin1-9/+9
Change-Id: I912187d6c481a2ba61fed9c01998bf6f3c08a6a0
2015-04-30simplify logic and less comparisons, fdo#69552 follow-upEike Rathke1-14/+11
Change-Id: Id1150b53a57a6b7d9a6c623637c123e4f37a0876
2015-04-29fdo#69552 [part 1] make calc functions CEILING comply with ODF1.2Winfried Donkers1-8/+15
Also, add support for CEILING.MATH and fix small deficiencies with CEILING functions, as most are interwoven. Change-Id: I0d9a46fb17e982ccf1e9d9e403b58926172c1a7a Reviewed-on: https://gerrit.libreoffice.org/7088 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2015-04-29tdf#56036: allow calc compiler treat tabs and newlines as spacersMike Kaganski1-0/+9
Currently these characters are illegal in input formulas. This is inconsistent with ODF spec, and brings incompatibility with other ODF implementations, as well as with OOXML. This patch fixes this by providing corresponding character flags for these chars (tab, cr and lf). This effectively converts these characters to spaces. Keeping the original whitespace characters should be done in another patch. Change-Id: Id9362de9138ec7cd7b23c6d999181e15d5b71d5b Reviewed-on: https://gerrit.libreoffice.org/15566 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2015-04-24TableRef: centralized FormulaCompiler::NeedsTableRefTransformation()Eike Rathke1-1/+1
... and include OOXML until we actually write Table. Change-Id: I95fa65bd593c72af409728cea1ec599481beaaab
2015-04-23ensure pArr existsEike Rathke1-1/+1
Chart converts single tokens to string without token array, even creating a compiler instance for each token.. which is less than suboptimal. Change-Id: I4472260457010dedf51891dbe1caa70ad4d792cc
2015-04-23TableRef: doubleref is not possible as one column specifierEike Rathke1-6/+1
Change-Id: Id29e6c8903979ef238c684d96fc47f72699b948a
2015-04-23TableRef: proper unescapeTableRefColumnSpecifier()Eike Rathke1-2/+31
Change-Id: Id3b0a776f85b36c399a818ec1575a63ba250e318
2015-04-23TableRef: create column specifier string from singlerefEike Rathke1-0/+35
Change-Id: Iac842f7a44240bf3da3fd2658f1ae05cac85ad7d
2015-04-23loplugin:staticmethodsNoel Grandin1-3/+1
Change-Id: Ib0c0841e48814d1a6e13bcd4575725d86ffa5e5e
2015-04-21TableRef: relative sheet reference if table is on same sheetEike Rathke1-0/+9
Change-Id: I823b3495938d29242dabf88fc262f9d7d720434a
2015-04-18TableRef: set 3D flag if table is on different sheetEike Rathke1-0/+4
Change-Id: I1a25d603333b78dc89534e45fa23f99c18bd0ee6
2015-04-18TableRef: transform to reference if not supported, i.e. for ODFFEike Rathke1-1/+40
Change-Id: I64f751455fbba901bb41f91daaf64ee4878a19b4
2015-04-18const all CreateString... FormulaToken*Eike Rathke1-7/+6
Change-Id: I0e0f064357543e5dc86b178ce30ee005e5483e04
2015-04-18TableRef: scan any column specifierEike Rathke1-1/+27
Change-Id: I9eb51741d8c5ace52cff70b1954ebde678e6b338
2015-04-18TableRef: activate for OOXML importEike Rathke1-24/+14
Change-Id: I7ebe365c81af5ee9ea70b2efad8908b360a51a7c
2015-04-17TableRef: handle unresolved column specifiersEike Rathke1-10/+18
Change-Id: I8b4fa10da0a39df941f92b8bb074b9031f81fb8e
2015-04-17TableRef: use relative references where appropriateEike Rathke1-0/+12
Change-Id: I1c680186271f20b6c01c06dbcc642bc1cf90865a
2015-04-17TableRef: differentiate between cell and range referenceEike Rathke1-4/+14
Change-Id: I1243f8407e8301e0e4662b8839ab53d29dcfe5ed
2015-04-17TableRef: use errNoRef error token instead of setting compiler errorEike Rathke1-2/+2
So the ScTableRefToken always holds some RPN "reference". Change-Id: I69aa485b9b85286a3b272617781bb07198ea52c8
2015-04-17TableRef: add the resulting area to ScTableRefTokenEike Rathke1-1/+1
Change-Id: I142c0c39ab4bb3c1d099cba42491cc9928ab300c