Commit Graph

295 Commits

Author SHA1 Message Date
Eike Rathke
2caa9d7ddc Resolves: tdf#127873 accept ',' comma group separator in number entities again
Existing documents unwittingly may have used that as decimal
separator in such locales (though it never was as this is always
the en-US locale).

"Regression" from

commit 9336286a7ea5385541344f444e6f8702c85bdacb
CommitDate: Fri Nov 30 22:15:22 2018 +0100

    [API CHANGE] Resolves: tdf#42518 new KParseTokens::GROUP_SEPARATOR_IN_NUMBER

Change-Id: I0ffc1b8ec7c1820fccd8277036c64093dddf82fe
Reviewed-on: https://gerrit.libreoffice.org/80023
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
2019-10-02 17:21:04 +02:00
Andrea Gelmini
3db23609d3 Fix typos
Split from
https://gerrit.libreoffice.org/#/c/76764/

Change-Id: I19f11f80f08ce0d5b4ffda20449f1cddea980b7d
Reviewed-on: https://gerrit.libreoffice.org/77596
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-16 19:16:10 +02:00
Noel Grandin
4583911575 improve loplugin:simplifyconstruct
Change-Id: If863d28c6db470faa0d22273020888d4219e069e
Reviewed-on: https://gerrit.libreoffice.org/74559
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-25 13:53:21 +02:00
Takeshi Abe
93eeaf0ad9 tdf#120047 Support attribute harpoon/wideharpoon in Math
... for an alternative style of vectors.

They are vec/widevec analogs but with COMBINING RIGHT HARPOON ABOVE
(U+20D1).  The new attribute names are deliberately long in order to
make fewer accidental collisions with variable names in formulae of
exising documents.

This also adds a glyph uni20D1 to OpenSymbol.

Change-Id: I31666e57808aa0e0327500916d3b862549891886
Reviewed-on: https://gerrit.libreoffice.org/72987
Tested-by: Jenkins
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2019-06-13 05:11:25 +02:00
Gabor Kelemen
4e8a15ca22 o3tl::make_unique -> std::make_unique in sax...svtools (except sc)
Since it is now possible to use C++14, it's time to replace
the temporary solution with the standard one

Change-Id: I6eea0877eaa1886b64c0cce06a43b8088cbccd8e
Reviewed-on: https://gerrit.libreoffice.org/66751
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-01-28 09:52:28 +01:00
Gabor Kelemen
9ec128f837 tdf#42949 Fix IWYU warnings in starmath/inc/*hxx & starmath/source/*hxx
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: If1a597f4c2241dc1ad5687d81199bbc5745e711f
Reviewed-on: https://gerrit.libreoffice.org/65624
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-01-04 10:23:49 +01:00
Noel Grandin
9bdc1118c7 use unique_ptr in SmStructureNode::SetSubNodes
Change-Id: I1dafb03f72a3a662eeae3bb23fb0a8b7ba4e6d95
Reviewed-on: https://gerrit.libreoffice.org/65734
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-30 11:41:41 +01:00
Stephan Bergmann
ab9b67bbb0 Remove obsolete SAL_FALLTHROUGH completely
...after 7ffdd830d5
"HAVE_CPP_ATTRIBUTE_FALLTHROUGH is always true now"

Change-Id: I54e5ff4e036a6bb3e5774d1c0524158aae18e937
Reviewed-on: https://gerrit.libreoffice.org/64800
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-08 13:28:16 +01:00
Stephan Bergmann
6896184167 HAVE_CXX_CWG1579_FIX is always true now
...(according to
<http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1579> it is fixed
in C++14), but for safety, leave the configure.ac check in for some longer.

Change-Id: Ibd2f0cac228117e35ac299e2fe74207394c900cd
Reviewed-on: https://gerrit.libreoffice.org/64773
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-07 22:48:12 +01:00
Noel Grandin
0dbb5f09e0 use binary search for starmath token
Change-Id: I187a5471f0e733007e3a56d8bb4972ee71f7cf17
Reviewed-on: https://gerrit.libreoffice.org/63882
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-23 17:55:10 +01:00
Gabor Kelemen
492ea7e085 tdf#42949 Fix IWYU warnings in include/vcl/[ab]*
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: If18c80fc64e55d797953e24e40e5d5e62bd9c625
Reviewed-on: https://gerrit.libreoffice.org/63453
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-11-19 09:38:53 +01:00
Mike Kaganski
dc1858783e tdf#120703 (PVS): V519 The variable is assigned values twice successively
Change-Id: I9265425a215609ef6bf4298ba39c8399f215ce27
Reviewed-on: https://gerrit.libreoffice.org/62406
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-27 09:23:52 +02:00
Gabor Kelemen
33623f3117 tdf#42949 Fix IWYU warnings in include/unotools/*
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: I444c43b9d549977039f25bec2b5bf666c3e15e0e
Reviewed-on: https://gerrit.libreoffice.org/62041
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-10-26 15:08:18 +02:00
Noel Grandin
3e15dd2915 use more unique_ptr in SmParser
Change-Id: I132598f5829e02664040dff745011a59c6a19c1d
Reviewed-on: https://gerrit.libreoffice.org/61401
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-07 18:08:51 +02:00
Stephan Bergmann
f41cbea9a4 More -Werror=redundant-move
...similar to dc06c8f498 "-Werror=redundant-move
(GCC 9), take two"

Change-Id: I53c181887e254aa3d924c134c77d7d0230717d5c
Reviewed-on: https://gerrit.libreoffice.org/59750
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-08-29 12:32:59 +02:00
Gabor Kelemen
b5867945d6 Add missing sal/log.hxx headers
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it.
This is a continuation of commit 6ff2d84ade to be able to remove those unneeded includes.

This commit adds missing headers to every file found by:
grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG')
to directories from sfx2 to starmath

Change-Id: I40ee7bfae6efdadd862319b7b693ad22c648e1c4
Reviewed-on: https://gerrit.libreoffice.org/58222
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-31 16:45:58 +02:00
Caolán McNamara
68f182066a ofz#8490 stack exhaustion
a linear loop builds a recursive structure, if it gets too deep then later
processing, e.g. releasing the tree, can exhaust stack

Change-Id: I4421b9bae62ac2b6ffe32531d1167a482103bfde
Reviewed-on: https://gerrit.libreoffice.org/54762
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-05-24 15:54:52 +02:00
Takeshi Abe
3c913c3844 starmath: Omit SmParser::GetError()'s argument
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-14 01:13:51 +01:00
Takeshi Abe
609888f3c8 starmath: Make SmParser::DoAttribut() etc. return std::unique_ptr
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-08 01:27:52 +01:00
Takeshi Abe
f0c171a1dd starmath: Make SmParser::DoLine() etc. return std::unique_ptr
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-07 01:36:57 +01:00
Takeshi Abe
715114595e starmath: Make DoAlign() return std::unique_ptr
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-06 00:30:25 +01:00
Takeshi Abe
f3d1b2e58c starmath: Make SmParser::Parse() return std::unique_ptr
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-22 06:26:00 +01:00
Takeshi Abe
5306ae7ecd starmath: Make SmParser::ParseExpression() return std::unique_ptr
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-17 07:45:05 +01:00
Caolán McNamara
0e0936da29 ofz#4677 Indirect-leak
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-17 21:18:41 +01:00
Caolán McNamara
deba726824 ofz#4643 Direct-leak
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-15 18:39:42 +01:00
Caolán McNamara
d6e97bd242 ofz#4641 fix leaks with exceptions
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-14 21:27:47 +01:00
Caolán McNamara
a8d2cea0a1 more leaks with exceptions
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-14 21:27:03 +01:00
Caolán McNamara
5c3317897b ofz: fix leaks by exceptions
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-13 09:08:39 +01:00
Caolán McNamara
6ff9b5a63f ofz#4571 more Direct-leaks
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>
2017-12-10 16:26:36 +01:00
Stephan Bergmann
19f9a7e298 Remove unused #include <vcl/metaact.hxx> from vcl/outdev.hxx
...and fix the fallout

Change-Id: Ie514bd95d5a9f990a887566619031e9844c40b92
Reviewed-on: https://gerrit.libreoffice.org/45195
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-06 20:25:51 +01:00
Caolán McNamara
1a658831d8 ofz#4539 depth protect mathtype parser
Change-Id: I46e12f52d56e7802b676309207904b4d1894d236
Reviewed-on: https://gerrit.libreoffice.org/45928
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-06 17:48:30 +01:00
Caolán McNamara
5505667cda survive without config for fuzzing
Change-Id: I7fd64d984c7796c5260ec94c50b158278f55763d
2017-12-03 20:20:23 +00:00
Stephan Bergmann
72ef2b5d98 Make loplugin:unnecessaryparen warn about (x) ? ... : ... after all
...which had been left out because "lots of our code uses this style, which I'm
loathe to bulk-fix as yet", but now in
<https://gerrit.libreoffice.org/#/c/45060/1/> "use std::unique_ptr" would have
caused an otherwise innocent-looking code change to trigger a
loplugin:unnecessaryparen warning for

  pFormat = (pGrfObj)
      ? ...

(barring a change to ignoreAllImplicit in
compilerplugins/clang/unnecessaryparen.cxx similar to that in
<https://gerrit.libreoffice.org/#/c/45083/2> "Make not warning about !! in
loplugin:simplifybool consistent", which should also have caused the warning to
disappear for the modified code, IIUC).

Change-Id: I8bff0cc11bbb839ef06d07b8d9237f150804fec2
Reviewed-on: https://gerrit.libreoffice.org/45088
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-22 19:16:52 +01:00
Stephan Bergmann
ff77d83afd loplugin:includeform: starmath
Change-Id: Ic5d81bdeb98024f41f9dfca260eca0359b27b809
2017-10-23 22:45:52 +02:00
Noel Grandin
ff1f6a5fc2 remove UL/L suffixes from integer constants in initialiser/call expressions
Change-Id: Iae081567c4fa5b88edbd12cf2fbafd2b8f31b300
Reviewed-on: https://gerrit.libreoffice.org/41214
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-17 08:14:31 +02:00
Jochen Nitschke
1a68c13518 starmath: cleanup includes with iwyu
Change-Id: I6de145f8b59d3ebcbc0cb32df3f955c9ee738eeb
Reviewed-on: https://gerrit.libreoffice.org/40666
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-03 09:18:44 +02:00
Caolán McNamara
00657aef09 migrate to boost::gettext
* all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl
* all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string")
* ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching
  MODULE .mo files
* UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui
  goes from l10n target to normal one, so the res/lang.zips of UI files go away
* translation via Translation::get(hrc-define-key, imbued-std::locale)
* python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there
  to keep finding the .hrc file uniform) so magic numbers can go away there
* java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation
  mechanism
* en-US res files go away, their strings are now the .hrc keys in the source code
* remaining .res files are replaced by .mo files
* in .res/.ui-lang-zip files, the old scheme missing translations of strings
  results in inserting the english original so something can be found, now the
  standard fallback of using the english original from the source key is used, so
  partial translations shrink dramatically in size
* extract .hrc strings with hrcex which backs onto
   xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap
* extract .ui strings with uiex which backs onto
   xgettext --add-comments --no-wrap
* qtz for gettext translations is generated at runtime as ascii-ified crc32 of
   content + "|" + msgid
* [API CHANGE] remove deprecated binary .res resouce loader related uno apis
      com::sun::resource::OfficeResourceLoader
      com::sun::resource::XResourceBundleLoader
      com::sun::resource::XResourceBundle
    when translating strings via uno apis
      com.sun.star.resource.StringResourceWithLocation
    can continue to be used

Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
2017-07-21 08:20:50 +01:00
Noel Grandin
4250b25c6a teach unnecessaryparen loplugin about identifiers
Change-Id: I5710b51e53779c222cec0bf08cd34bda330fec4b
Reviewed-on: https://gerrit.libreoffice.org/39737
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-10 09:57:24 +02:00
Stephan Bergmann
c8b19bdd2a loplugin:stringcopy: starmath
Change-Id: I2687b8ce4b20871f50401cbc50746c35b9668eba
2017-05-19 17:17:03 +02:00
Caolán McNamara
2155e04d63 make string translation loading more uniform
change various ResId classes that use conversion operator to OUString to
functions that return a OUString

drop various defines

drop unnecessary toString calls

Change-Id: Ibeccdf2b91a46a2ed5b4b74e6024e301a023bc92
Reviewed-on: https://gerrit.libreoffice.org/37817
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-05-19 15:40:40 +02:00
Stephan Bergmann
52ef15cbdb Revert "Fix typos"
This reverts commit 26a67002fc.  "Iff" is not a
typo, see 2a65bf32ec "Revert 'Typo: iff->if'".
2017-05-18 21:58:31 +02:00
Andrea Gelmini
26a67002fc Fix typos
Only replaced "iff" with "if"

Change-Id: Ib9dfa5c12b05500043147fe3b65f923b1b12a581
Reviewed-on: https://gerrit.libreoffice.org/37782
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
2017-05-18 18:55:17 +02:00
Takeshi Abe
437105b940 starmath: Convert SmScaleMode to scoped enum
Change-Id: I88024e9cc1147cc44a087315968c3462ab5baf73
Reviewed-on: https://gerrit.libreoffice.org/36978
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2017-04-27 02:35:16 +02:00
Chris Sherlock
da64d198ec tools: svstream.hxx needs only errcode.hxx & not errinf.hxx
Change-Id: Ia28e35ae5af4f601e9a586a3deffbcd61702b0ca
Reviewed-on: https://gerrit.libreoffice.org/36896
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-04-25 09:31:31 +02:00
Takeshi Abe
6cd854f8ac starmath: Assert an impossible error in parsing tables
Change-Id: If7b6080504c1c89bc39bf35bdca264c509f09faf
Reviewed-on: https://gerrit.libreoffice.org/36290
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2017-04-10 02:32:08 +02:00
Andrea Gelmini
7d4b68fa47 Fix typos
Change-Id: I9e7f7fa6a8b89304883a843f9fb0b905f5e8a8a4
Reviewed-on: https://gerrit.libreoffice.org/36100
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-06 07:53:19 +00:00
Takeshi Abe
51de452ef6 starmath: Kill newly unused m_aNodeStack
which now has been replaced naturally with the call stack
of SmParser functions.

Change-Id: I970a350aae6927c6d13ed4917aa29bce3888a3fe
Reviewed-on: https://gerrit.libreoffice.org/36136
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2017-04-05 12:55:20 +00:00
Takeshi Abe
1a1d1a86e9 starmath: Simplify code parsing nospace
This also comes with its unit test.

Change-Id: I1478bf48c5522691978e3534c9c8a9c0ddfc1e59
Reviewed-on: https://gerrit.libreoffice.org/35985
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2017-04-04 01:24:31 +00:00
Takeshi Abe
0ba23e36bb starmath: Stop using the stack to parse consective identifiers
and numbers.

Change-Id: I7e898cd437ec314a0d07a16e13d3044480d2e057
Reviewed-on: https://gerrit.libreoffice.org/35903
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2017-03-30 23:58:49 +00:00
Takeshi Abe
eeadfca737 starmath: Hold error nodes as subnodes of SmBracebodyNode
so that the resulting tree aligns them in a straightforward way.

Change-Id: Ica86be557c5d462425f5e88930dbdec29947e5d7
Reviewed-on: https://gerrit.libreoffice.org/35882
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2017-03-30 11:08:39 +00:00