summaryrefslogtreecommitdiff
path: root/sc/source/core/tool/compiler.cxx
AgeCommit message (Collapse)Author
2014-11-12Fix common typos. No automatic tools. Handmade…Andrea Gelmini
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-05fdo#38835 strip out OUString globalsNoel Grandin
they are largely unnecessary these days, since our OUString infrastructure gained optimised handling for static char constants. Change-Id: I07f73484f82d0582252cb4324d4107c998432c37
2014-10-29cid#1242749 Unused valueNoel Grandin
Change-Id: I3227a05a4cafdcca23c32a62fdb72245cdf493d6
2014-10-23loplugin: cstylecastNoel Grandin
Change-Id: I8c7cd4c2cdc134556c2c664a22e2048b51a3b98e
2014-10-23Remove ScToken from the formula::FormulaToken hierarchyStephan Bergmann
...to keep UBSan from complaining about illegal downcasts from FormulaToken to ScToken (which were practically harmless, given that ScToken did not add any data members). Change-Id: I8fdc026eec363442cc4b720b71d65c972b4a4446
2014-10-23Make ScToken::GetSingleRef etc. return * instead of &Stephan Bergmann
...so that default implementations can return nullptr without further ado Change-Id: Idc8778fe868efa00b1de597a54aa07a2e6fa3bc0
2014-10-23Turn static ScToken::ExtendRangeReference into free functionStephan Bergmann
...and rename to extendRangeReference to avoid confusion with formula::FormulaCompiler::ExtendRangeReference. Change-Id: Ifcad309c14e04a0e37c80ca44462da587387241d
2014-10-22Replace DISABLE_SCRIPTING with HAVE_FEATURE_SCRIPTINGTor Lillqvist
Feature test macros that govern conditional compilation should be defined in config_*.h include files, not on the compilation command line. Change-Id: I40575a4762fd2564f10927b6f38a112dd9f9a3d7
2014-10-04coverity#1242781 Unused ValueNorbert Thiebaud
if nLen2 is 0 then bNextNum is set and nLen1 is then 0, and the if(nLen1 || nLen2) can only be true if nLen2 is non zero and bNextNum get overriden... so the line bNextNum = !bLastAlp is useless. Change-Id: Ice62562bf321e5389f2118677e72d1b421816858
2014-09-26add a RAII class that tries to acquire the SolarMutex and releases itMichael Stahl
Motivated by ScCompiler::IsMacro() which has an error return that does not release the SolarMutex. Change-Id: I064219bb3c0d68839a133101491d5f8828a26c7a
2014-09-05parseExternalDocName() also for ConventionXL_A1::parseAnyToken(), fdo#83481Eike Rathke
to make 645bccf7a5b91d794d387286deca583ea41f3516 actually work for both, ExcelA1 and ExcelR1C1 address conventions. Change-Id: I5392dfb6a8ec6af784957181c722d519921fc065
2014-08-22out-of-bounds string accessEike Rathke
... when parsing ='foo'# with no character following. Change-Id: Id65fce721cb47a4d3c947c677323bdcaa2ce957f
2014-08-21it's about time to write GOALSEEK as ODFF ORG.OPENOFFICE.GOALSEEKEike Rathke
Change-Id: Ie5a0464b49baae62e217e87f4d0040151f3aa8a5
2014-08-21write COLOR function with extension namespaceEike Rathke
and add to Excel import/export maps so it survives saving in that format Change-Id: I3a8e07fdd1bded77d4bad60eefffeb0b1dbdd734
2014-08-11document this makeExternalNameStr()Eike Rathke
Change-Id: Ifb3c3ada7cc069d8a85717693265476aa95d9aae
2014-08-11write OOXML externalReferences, externalLinks, fdo#45286Eike Rathke
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-06-27remove SFX_APP() macro that was a mer wrapper for SfxGetApp()Norbert Thiebaud
Change-Id: I480a789c767dd671775c9d70d96bf71908f21f5b
2014-06-27loplugin:unreffun: also warn about unused function templatesStephan Bergmann
Change-Id: I4a6280f47ca3c4a77b4e42fe05d79ded7fc30ef1
2014-05-26ODS load/save perf: re-use buffer while exporting tab names.Michael Meeks
Allocating temporary strings just to append a '.' is a tad silly. Change-Id: Ifdbd45bcc4d5e36ebee2b052f64ceeed5686d6cf
2014-05-21Avoid unnecessary cloning of ScRawToken during token check.Kohei Yoshida
Change-Id: Ia980054437394ef48f7df655411f81d20b9cfa32
2014-05-21ODS load perf: 7% of the time re-creating sheet name strings.Michael Meeks
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-14Update the method comment and add assertion per what the comment says.Kohei Yoshida
Change-Id: I751e33a8bba732e3b7935fc41385ea5e1f8c8704
2014-05-14Use "stop on error" concept rather than "ignore error if true".Kohei Yoshida
Just to keep the pattern of "true" -> "action", "false" -> "no action". Change-Id: I6303bc779cd7048eef2fdc3c2abba8be8f15da6d
2014-05-14Introduce a new boolean flag and use it in lieu of bCompileForFAP.Kohei Yoshida
To make it sound more general than "compile for FAP". Change-Id: Ia6916b6f3579a290be7d5074f809666be2bd2473
2014-05-11fix-includes.pl: scThomas Arnhold
Change-Id: Iade3fedac5d2f8e978b7dd9c30f001d7d1564946
2014-04-23coverity#708017 Uninitialized scalar fieldCaolán McNamara
Change-Id: I5dbb5bab307195f6328b5322b35385632f35aa43
2014-04-23coverity#708016 Uninitialized scalar fieldCaolán McNamara
Change-Id: Ibf3bd2befb30222d5a0998dd563ce90855c5fb8a
2014-04-14Clean up function declarations and some unused functionsStephan Bergmann
Change-Id: If2c233a8ced8815b065a72caff907f10ef6166ff
2014-04-01Bin pointless INET_HEX_ESCAPETor Lillqvist
Change-Id: I72238e511c2fca4a4aba0be60b0f2d3b1f46e5c2
2014-03-27Second batch of adding SAL_OVERRIDE to overriding function declarationsStephan Bergmann
...mostly done with a rewriting Clang plugin, with just some manual tweaking necessary to fix poor macro usage. Change-Id: Ie656f9d653fc716f72ac175925272696d509038f
2014-02-28fdo#75053: Adjust reference update on shift for formula groups.Kohei Yoshida
This is similar to my earlier fix for reference update on moving of cells. Change-Id: I592599507bfcab12f611eeae7b56c99da6c31919
2014-02-24fdo#75304: Set external reference info to ScCompiler.Kohei Yoshida
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-23coverity#706826 Uncaught exceptionCaolán McNamara
also coverity#706827 Uncaught exception and probably a gadzillion more Change-Id: Ia924e33b188035e8dcb4f345d6c20d6c7bbcf4ea
2014-02-15fdo#74512: Fix the ODS export as well.Kohei Yoshida
Change-Id: I54a2b2f405f9172d2ec5646346ef4e8a7ae27cb2
2014-02-10coverity#1130442 Dereference before null checkCaolán McNamara
Change-Id: I5c072ffea7c3a712549f9a9dbb8b7145fbab7d38
2014-02-09coverity#1169843 Dereference before null checkCaolán McNamara
Change-Id: I9e13a63ce78f317b35a7a374a2fd1ed699915944
2014-02-08fdo#74512: Generate escaped sheet names after the grammer is set.Kohei Yoshida
Otherwise the single quote characters wouldn't be properly doubled. Change-Id: I864ca8912a35049905e52e002d92d648e1278015
2014-02-04Use CompileFormulaContext in CompileDBFormula() and CalcAfterLoad().Kohei Yoshida
Also make some adjustment in order to handle formula cell's "temp grammar" correctly. Change-Id: I6fdd5c67bb95e4de90ea71db624c9610c1e2febf
2014-02-04More places to cover pre-compiled sheet names.Kohei Yoshida
Change-Id: I9dead89e990297abee185a8a64b0d2f4a86f5c70
2014-02-04Pre-compile all compiler-ready sheet names to avoid doing it repeatedly.Kohei Yoshida
This reduces the lag after updating range names especially with a large number of range names. Change-Id: Idbfa3b6447b693a566192828e7137b2aeaa0d1f5
2014-02-03xub_StrLen and tools/string.hxx final strawNorbert Thiebaud
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-01-28bool improvementsStephan Bergmann
Change-Id: I740c0e18eefc64cb5f1da5b88ceb77289790ec37
2014-01-17Follow-up (micro-?)optimisationTor Lillqvist
Change-Id: Ia49cb02b2374e1c284bb4dee77e333fe6c8839ce
2014-01-17Avoid some global statics that drag in lots of code in the static linking caseTor Lillqvist
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
2013-12-28don't create and destroy SvtMiscOptions here unless its needed.Michael Meeks
Change-Id: I4b6e8136c56c824380c454272d9df4c646ec8e86
2013-12-20We have these _xlfn. and _xlfnodf. internal prefixes. Check for __.Kohei Yoshida
We don't want a name starting with a single underscore to be flagged as function name. Let's do that only for double underscores. Change-Id: If194a53e3f3ebf18a6e8ad38ebb16922f6e6083b
2013-12-20Add internal cell function __DEBUG_VAR to sniff arbitrary internal state.Kohei Yoshida
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-12remove unnecessary castsNoel Grandin
It is no longer necessary to cast to sal_Unicode when calling OUStringBuffer::append Change-Id: Iab3d1e12eef472cfe11f1d0d1969ca404091dd7d
2013-12-02in .xlsx import append a parameter for CEILING, FLOOR and WEEKNUM againEike Rathke
7a3b8b1a5a753627c6518b9a5b8e2a041d4d6331 switched formula parsing from API FormulaParser::importFormula() / ApiParserWrapper::parseFormula() to ScCompiler, which means that also FormulaFinalizer::finalizeTokenArray() is not executed anymore and processTokens() and processParameters() that among others handled appending Calc-only and required parameters. At least implement that parameter part at ScCompiler now. Change-Id: Iaa2804c82ec43dd51f781485b0e2afab8c613638
2013-12-02release SolarMutex after successful tryToAcquire()Eike Rathke
tryToAcquire() locks if successful, so unlock when leaving Change-Id: Ic0bd4b10ccb8419dd40946dbaf393a27e413bf2d