summaryrefslogtreecommitdiff
path: root/starmath
AgeCommit message (Collapse)AuthorFilesLines
2018-02-15starmath: Prefer moving subnodes to copying themTakeshi Abe5-18/+23
Change-Id: Id92dd0715daf43a63d09529f01a6583c23de7c7d Reviewed-on: https://gerrit.libreoffice.org/49725 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2018-02-14starmath: Omit SmParser::GetError()'s argumentTakeshi Abe3-9/+5
as it was always 0. Change-Id: I59570967deb139f258e7aeaab17619f714bc7bb5 Reviewed-on: https://gerrit.libreoffice.org/49640 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2018-02-12Fix typosAndrea Gelmini1-1/+1
Change-Id: I9ecf648960ddd131aa3d961bf86c2f1d3389355f Reviewed-on: https://gerrit.libreoffice.org/49584 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-02-08starmath: Make SmParser::DoAttribut() etc. return std::unique_ptrTakeshi Abe2-21/+31
Change-Id: I9693cf15abf202657f5be478bfebd1272dc261dd Reviewed-on: https://gerrit.libreoffice.org/49339 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2018-02-07starmath: Make SmParser::DoLine() etc. return std::unique_ptrTakeshi Abe2-47/+47
Change-Id: Ia85f66d3490471d7e0c2ce8a1947051be129acf9 Reviewed-on: https://gerrit.libreoffice.org/49276 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2018-02-06starmath: Make DoAlign() return std::unique_ptrTakeshi Abe2-12/+12
to take advantage of copy elision and simplify client code. Change-Id: I9e08bc2b9743563f483657c7348abca05dd34c85 Reviewed-on: https://gerrit.libreoffice.org/49222 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2018-02-02Replace some front/pop_front by for-range loops+clearJulien Nabet1-3/+3
Change-Id: I8a9239667b0d80ee2fa6ebbc8a19ba4c0076c2fb Reviewed-on: https://gerrit.libreoffice.org/49107 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-02-01starmath: Put GetDefaultFontName() in an unnamed namespaceTakeshi Abe3-67/+70
Change-Id: I877e1c9b33ae240a2e8ac9972a6bc45e0848ee28 Reviewed-on: https://gerrit.libreoffice.org/49027 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2018-01-24tdf#115030 Formula use "dot" instead of "acute" math command.ekuiitr2-0/+4
Change-Id: I5a382f73a786f45ce0b83864b21e5e6ae357fad4 Reviewed-on: https://gerrit.libreoffice.org/48440 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-01-24loplugin:unused-returns in drawinglayer..svxNoel Grandin2-4/+3
Change-Id: I033a78cc7fe7d8e5086f1c855c4aa371cc98dc7c Reviewed-on: https://gerrit.libreoffice.org/48400 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-22ofz#5575 call cleanup while its still a SmXMLImportCaolán McNamara1-0/+1
Change-Id: Ib80010410bd729e2356fe63f96809dd35fb26a73 Reviewed-on: https://gerrit.libreoffice.org/48320 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-22starmath: Make SmParser::Parse() return std::unique_ptrTakeshi Abe11-52/+39
Change-Id: I6c8811f71ab40398043cdcfa3334eee4381b4c7e Reviewed-on: https://gerrit.libreoffice.org/48098 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2018-01-22ofz#5526 restrict mml parsing depthCaolán McNamara2-4/+25
Change-Id: Ib74787137112fb8402a2f6400ab4313d43c103dc Reviewed-on: https://gerrit.libreoffice.org/48277 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-19ofz#5475 Integer-overflowCaolán McNamara1-2/+2
Change-Id: I11d706c544698d57b75231e33e3d49f1ac1d4d73 Reviewed-on: https://gerrit.libreoffice.org/48159 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-19loplugin:unusedmethods also check for functions returning boolNoel Grandin3-8/+3
we were previously excluding them Change-Id: I48a68799b0de60b4995fae541eb363e043d4dd11 Reviewed-on: https://gerrit.libreoffice.org/48167 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-17Fix typosAndrea Gelmini1-1/+1
Change-Id: Id1c7ddf6c49ec709e38947a82731fe31a64aad04 Reviewed-on: https://gerrit.libreoffice.org/48076 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-17starmath: Make SmParser::ParseExpression() return std::unique_ptrTakeshi Abe5-33/+25
Change-Id: Ib8b65dced2af3ac7dca3fe9dd02e70f02c865f79 Reviewed-on: https://gerrit.libreoffice.org/47974 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-16Fix typosAndrea Gelmini1-1/+1
Change-Id: I078626eaa3155cc429320cc8c1532003b382b22a Reviewed-on: https://gerrit.libreoffice.org/47855 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-15convert a<b?a:b to std::min(a,b)Noel Grandin2-2/+2
with something like git grep -nP '(.*)\s*<\s*(.*)\s*\?\s*\g1\s*:\s*\g2' -- *.?xx Change-Id: Id5078b35961847feb78a66204fdb7598ee63fd23 Note: we also convert a>b?b:a Reviewed-on: https://gerrit.libreoffice.org/47736 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-11ofz#5244 tighten depth checkCaolán McNamara3-3/+3
Change-Id: Ia841f3419ebe14d8f73d09a6fc089973252725ff Reviewed-on: https://gerrit.libreoffice.org/47770 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-11starmath: getLength() > 0 -> !isEmpty()Takeshi Abe3-8/+8
Change-Id: I72e56e8e8cad77084bf771df8d85cb7d85712437 Reviewed-on: https://gerrit.libreoffice.org/47640 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2018-01-11convert (a>b?a:b) to std::max(a,b)Noel Grandin2-2/+2
with something like: git grep -nP '(.*)\s*>\s*(.*)\s*\?\s*\g1\s*:\s*\g2' Change-Id: I60b9a3a2a09162bc0de4c13fdde2c209696e5413 Reviewed-on: https://gerrit.libreoffice.org/47602 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-10ofz#5221 depth protect PrepareCaolán McNamara7-50/+53
Change-Id: I49804a8c65b3af204bfd79d6ff5b3280ab876ec4 Reviewed-on: https://gerrit.libreoffice.org/47693 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-08starmath: Replace confusing sal_uIntPtr with sal_Int32Takeshi Abe1-2/+2
Change-Id: If823398b75217f4a5a5bb5c83106d4d9d2e5f6be Reviewed-on: https://gerrit.libreoffice.org/47527 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-01-06ofz#4765 TimeoutCaolán McNamara3-11/+7
Change-Id: I15400165c5233277a171b19e69db7497ce525e7f Reviewed-on: https://gerrit.libreoffice.org/47482 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-05lokdialog: Allow language switching in SfxModule(s).Jan Holesovsky1-1/+1
Change-Id: Icef0b3610c3bfa858cdd61de6ef3f5edc1e3c96b Reviewed-on: https://gerrit.libreoffice.org/47385 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2018-01-04tdf#42949 Fix some more Include What You Use warningsMiklos Vajna1-1/+0
Change-Id: I2040315707674dc99a37aedb96ac61dca274c13a Reviewed-on: https://gerrit.libreoffice.org/47348 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2018-01-04de-duplicate some defines in hrc filesNoel Grandin6-8/+8
and rename SID_INSERTSYMBOL -> SID_INSERTSPECIAL in starmath to make it unique Change-Id: I0eeefe25e0e9374871c73793a31cb3e6cc445f73 Reviewed-on: https://gerrit.libreoffice.org/47369 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-31ofz#4845 avoid oomCaolán McNamara1-1/+5
Change-Id: I816e2a2e2c21bf999c261e59c860fd142ba59f76
2017-12-28ofz#4765: Conditional jump or move depends on uninitialised valueCaolán McNamara1-0/+4
Change-Id: Ic8a4fd6cc62c7257f714e2ce2f155f60aa04aa2f Reviewed-on: https://gerrit.libreoffice.org/47157 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-28ofz#4733: align size typesCaolán McNamara1-5/+4
Change-Id: I43d136b131ba43401871a6afa455386f050d6c1e
2017-12-24coverity#1426873 Unintended sign extensionCaolán McNamara4-16/+20
and a bunch of others Change-Id: I110545b74bfc71b17e2e10edc95bc4bb5aa5651c Reviewed-on: https://gerrit.libreoffice.org/46957 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-22Revert "unused SID command in starmath"Noel Grandin5-0/+90
This reverts commit b9c6f2de8bdcdcb95fb4f0457ee2fd0e1c42eb5b. Change-Id: Ice33baa738c025de72ceb11cf6746e017fb27484 Reviewed-on: https://gerrit.libreoffice.org/46964 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-22tdf#42949 Fix some Include What You Use warningsMiklos Vajna4-3/+13
Change-Id: I30121764303579a7cb4ded0f0f48cc1f8fff6c33 Reviewed-on: https://gerrit.libreoffice.org/46946 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-12-21unused SID command in starmathNoel Grandin5-90/+0
Change-Id: I08c09814a6a29286342fd7dc6a30ca0b6395463e Reviewed-on: https://gerrit.libreoffice.org/46909 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-21ofz#4703 Direct-leakCaolán McNamara12-107/+124
Change-Id: I5f3385d87aa5a48a8df3b6774dd1166cec60ebf8 Reviewed-on: https://gerrit.libreoffice.org/46893 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-19ofz: recognize invalid and negative fractionsCaolán McNamara1-6/+3
Change-Id: Ie00a608a60a35bf333d63be54f21085ecf44347b Reviewed-on: https://gerrit.libreoffice.org/46725 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-17ofz#4677 Indirect-leakCaolán McNamara1-84/+83
Change-Id: Ifffcd229db10de933f34367f3b283227634a358a Reviewed-on: https://gerrit.libreoffice.org/46640 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-15ofz#4649 don't care about exceptions for testingCaolán McNamara1-1/+7
Change-Id: I955460276c3bf98457eff6bc9503edd238a5650c Reviewed-on: https://gerrit.libreoffice.org/46506 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-15ofz#4643 Direct-leakCaolán McNamara1-7/+7
Change-Id: Ie4fff1a113916c7a3344959cfb4ee14c3fda2073 Reviewed-on: https://gerrit.libreoffice.org/46512 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-14Related: tdf#114434 Enable ExtLeading by default for starmath edit windowCaolán McNamara1-0/+2
Change-Id: Icfeed667ce23b4b2ecac2c3ff67e95b4e2714442 Reviewed-on: https://gerrit.libreoffice.org/46410 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-14ofz#4641 fix leaks with exceptionsCaolán McNamara1-18/+18
Change-Id: I5326240fe79a5752e19d4be3032c5ced70845437 Reviewed-on: https://gerrit.libreoffice.org/46459 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-14more leaks with exceptionsCaolán McNamara1-23/+23
Change-Id: I9ace65832d4f8b9a531fddb45a6cea4ad83153ea Reviewed-on: https://gerrit.libreoffice.org/46464 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-14No need to keep these whitelisted functions decorated with SAL_CALLStephan Bergmann2-2/+2
The only effect SAL_CALL effectively has on LO-internal code is to change non- static member functions from __thiscall to __cdecl in MSVC (where all other functions are __cdecl by default, anyway). (For 3rd-party code, it could be argued that SAL_CALL is useful on function declarations in the URE stable interface other than non-static member functions, too, in case 3rd-party code uses a compiler switch to change the default calling convention to something other than __cdecl. But loplugin:salcall exempts the URE stable interface, anyway.) One could argue that SAL_CALL, even if today it effectively only affects non- static member functions in MSVC, could be extended in the future to affect more functions on more platforms. However, the current code would already not support that. For example, 3af500580b1c82eabd60335c9ebc458a3f68850c "loplugin:salcall fix functions" changed FrameControl_createInstance in UnoControls/source/base/registercontrols.cxx to no longer be SAL_CALL, even though its address (in ctl_component_getFacrory, in the same file) is passed to cppuhelper::createSingleFactory as an argument of type cppu::ComponentInstantiation, which is a pointer to SAL_CALL function. Change-Id: I3acbf7314a3d7868ed70e35bb5c47bc11a0b7ff6 Reviewed-on: https://gerrit.libreoffice.org/46436 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-13tools: remove unused #include from solar.hMichael Stahl4-0/+5
Change-Id: I214e13add371380701ae39403d90a574a63e495d
2017-12-13ofz: fix leaks by exceptionsCaolán McNamara1-44/+59
Change-Id: Iad0987e9935ff02c80fea9dd7ebd4fdbe9fe2a9c Reviewed-on: https://gerrit.libreoffice.org/46317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-11ofz#4594 Integer-overflowCaolán McNamara3-64/+27
Change-Id: I6d73f514536e5b3e69573e24fd8b9f4b84e315c5 Reviewed-on: https://gerrit.libreoffice.org/46248 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-11loplugin:salcall fix functionsNoel Grandin8-35/+35
since cdecl is the default calling convention on Windows for such functions, the annotation is redundant. Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d Reviewed-on: https://gerrit.libreoffice.org/46164 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-10ofz#4578 Integer-overflowCaolán McNamara1-2/+6
Change-Id: I2fcd530b3217c72385301b8f3456557c8c8cec13 Reviewed-on: https://gerrit.libreoffice.org/46183 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-10ofz#4571 more Direct-leaksCaolán McNamara1-14/+14
Change-Id: If845238c3c107a9edc95dc3663bf4c178e65ebc7 Reviewed-on: https://gerrit.libreoffice.org/46180 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>