Commit Graph

113 Commits

Author SHA1 Message Date
Stephan Bergmann
ff77d83afd loplugin:includeform: starmath
Change-Id: Ic5d81bdeb98024f41f9dfca260eca0359b27b809
2017-10-23 22:45:52 +02:00
Noel Grandin
24817c26b3 loplugin:constparams in starmath
Change-Id: Iac470b572311241216622f22bc543c0bd10a28f6
Reviewed-on: https://gerrit.libreoffice.org/40714
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-03 15:27:37 +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
Noel Grandin
3dcf6dfcee remove unnecessary use of 'this->'
Change-Id: I5c115389af7d24c18ddaf5fbec8c00f35017a5b4
Reviewed-on: https://gerrit.libreoffice.org/40671
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-02 13:45:36 +02:00
Noel Grandin
8dca2d5ac7 loplugin:oncevar in starmath..svl
Change-Id: I20e3796407c7e429a88d2811673929ac1141a41c
Reviewed-on: https://gerrit.libreoffice.org/39280
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-27 08:42:53 +02:00
Noel Grandin
4c05834a36 loplugin:unusedmethods
Change-Id: I1c50d176e793397a1f9625f797a3750cf191a61c
Reviewed-on: https://gerrit.libreoffice.org/37679
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-18 09:17:43 +02:00
Caolán McNamara
34f7e618dd untranslated strings are just strings
removes starmaths InsertCommand in favour of InsertCommandText

Change-Id: I5659adcaa28e5b5861d1a1cc5d2afa84009490f6
Reviewed-on: https://gerrit.libreoffice.org/37113
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-05-02 13:18:57 +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
d52d230fc2 starmath: Convert SmNodeType to scoped enum
Change-Id: I30921f9426e0e50ab8c6dfb1e86400847176b707
Reviewed-on: https://gerrit.libreoffice.org/36613
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2017-04-18 12:47:25 +02:00
Takeshi Abe
222cf76001 starmath: size() > 0 -> !empty()
Change-Id: Id7c73870f58ebf04c2703cdf8b3d0ffe258b2c0d
Reviewed-on: https://gerrit.libreoffice.org/36545
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2017-04-14 06:20:15 +02:00
Andrea Gelmini
25e0872da6 Fix typos
Change-Id: I4eda687db6ad8d41e6a28430c76b288510da605d
Reviewed-on: https://gerrit.libreoffice.org/35645
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-25 12:25:17 +00:00
Stephan Bergmann
c5e7e3bad7 loplugin:subtlezeroinit: starmath
Change-Id: Ifc6f4788bb285e28451df9c98a72b454b7685160
2017-02-21 07:34:59 +01:00
Noel Grandin
dfd5510a7a convert SmBracketType to scoped enum
and drop unused enumerators

Change-Id: Icda3ff510331f9f0adb97d6dac56edf325d0d1a7
2017-02-15 08:33:37 +02:00
Takeshi Abe
d6a7f7fe98 starmath: Prefix n to SmCaretPos's Index
Change-Id: Ie1647d8143c4c38ebcf5111bffc291c26704c4c0
Reviewed-on: https://gerrit.libreoffice.org/32428
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-12-26 12:17:13 +00:00
Takeshi Abe
074f0ab1d7 tdf#76296 Import MathML's <mspace>
as possibly multiple "~" and/or "`" by honoring its width attribute.

Change-Id: I17e361c3f8f5d061c856b72266332369497d16b9
Reviewed-on: https://gerrit.libreoffice.org/30809
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-11-15 00:27:30 +00:00
Takeshi Abe
c966bac490 starmath: Drop unused 1st argument of SmErrorNode's ctor
Change-Id: I01d8fa4bcfbfd4757230ff54902967f709216111
Reviewed-on: https://gerrit.libreoffice.org/28678
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-09-06 07:32:24 +00:00
Takeshi Abe
ecafca50e9 Replace use of our own SmNodeIterator with range-based for loop
in starmath/source/cursor.cxx and starmath/qa/cppunit/mock-visitor.hxx.

Change-Id: I7733d5d17bb03532d6c4f1d6967c69d65bc3bede
Reviewed-on: https://gerrit.libreoffice.org/28538
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-08-31 09:41:15 +00:00
Takeshi Abe
e04bea2bad SmCursor::FindTopMostNodeInLine() requires non-null argument
Change-Id: I3643c8a299276d7f3568747e6428ced4c8a6e2bf
Reviewed-on: https://gerrit.libreoffice.org/28345
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-08-24 06:57:54 +00:00
Takeshi Abe
8a5c2586dc starmath: Do SmCursor::MoveTo() more simply
... without unnecessary copy and re-calculation of squared distances.

Change-Id: I2900f8ef690cae750be036dcb3c4270c82286a4c
2016-08-22 11:14:43 +09:00
Takeshi Abe
ddeb13b497 starmath: Use SmCaretPos::GetPosAfter()
Change-Id: Ie05354f9e359b9dbc10f9d8ee8a9579c67ec5e5f
Reviewed-on: https://gerrit.libreoffice.org/28185
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-08-18 07:34:02 +00:00
Takeshi Abe
f36406bf44 starmath: Avoid assigned but unused value
Change-Id: I3d8ede40e2231e3b88c43b17e353ea962e02acc7
2016-08-17 14:45:07 +09:00
Noel Grandin
938821fb08 new loplugin overrideparam
verify that parameters on override methods have the same set of default
values for their params as their parent/super-methods do.

Change-Id: Ibdbc1c6e417fbaa680ea025a6bbf5ba9c2e5bcd2
Reviewed-on: https://gerrit.libreoffice.org/27437
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-25 06:09:17 +00:00
Takeshi Abe
f045d14791 starmath: Return early if the cursor locates after a text node
No longer create unnecessary copy of nodes.

Change-Id: Icf8cdd3ce0f9ebbf7159e9e7eaea7abe52c05060
Reviewed-on: https://gerrit.libreoffice.org/27366
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-07-22 00:47:25 +00:00
Takeshi Abe
1eb533a045 starmath: Make AdjustFontDesc() precede Prepare()
because what Prepare() does depends on both nFontDesc and token
of the SmTextNode.

Change-Id: Ib7f8c408eb8f95a10f27ccbd3d80cdd0d6ea6d56
Reviewed-on: https://gerrit.libreoffice.org/27210
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-07-15 07:56:39 +00:00
Takeshi Abe
a9d273ed8e starmath: Prefer assert to SAL_WARN here
as defined enum cases are exhausted.

Change-Id: I6564cc0cd64d593f6aa02f0651ecb490bf7845bd
Reviewed-on: https://gerrit.libreoffice.org/27081
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-07-11 09:59:38 +00:00
Takeshi Abe
1fc4af8695 Pass it by const ref
Change-Id: I0c2b48a503e2501210af690f02858dade994a733
Reviewed-on: https://gerrit.libreoffice.org/26048
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-06-10 03:34:52 +00:00
Takeshi Abe
013f9d5aaa Null pointer dereferences must not happen
This is a follow-up of 09981cd638.
Inspired by coverity#1362478 etc.

Change-Id: If5507c52552393cccbb255cbf4b7e9f4b80db917
Reviewed-on: https://gerrit.libreoffice.org/25840
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-06-03 11:01:09 +00:00
Caolán McNamara
31038459b5 coverity#1362478 Explicit null dereferenced
and

coverity#1362479, coverity#1362480, coverity#1362481,
coverity#1362482, coverity#1362483, coverity#1362485

Change-Id: Ia3a32b69bcbe5ac3e7cc50dacfa02e8bf1aab787
2016-06-02 15:24:57 +01:00
Takeshi Abe
09981cd638 Use std::vector for SmCaretPosGraph
instead of employing ad hoc linked list and its iterator.

Change-Id: Ibc4709a2e67aa805cf54117303c47d9a8a5eede9
Reviewed-on: https://gerrit.libreoffice.org/25699
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-05-31 16:15:30 +00:00
Takeshi Abe
27ae0020d7 Prefix SmDocShell's members
as well as remaning aInterpreter to maParser.

Change-Id: I5f86737ffe05be981477e9dc65d433de0e1d5378
Reviewed-on: https://gerrit.libreoffice.org/25650
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-05-31 01:14:40 +00:00
Takeshi Abe
f5ea7c09c8 starmath: nodes in the clipboard are owened by SmClipboard
This also omits the bIsOnlyIfSelected parameter for former
CloneLineToList(), which was true at its sole call site.

Change-Id: Idb71323f68f13ecc90d430ec8e18e0eef766ae4b
Reviewed-on: https://gerrit.libreoffice.org/25444
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-05-26 02:22:54 +00:00
Takeshi Abe
4ab3149381 starmath: Fix missing call of AnnotationSelection() for SmCursor::Copy
... with unit tests of Copy/Cut/Paste.

Change-Id: I74dd6f235b52ef2c1388ea0d15d32af0fb30b2c8
Reviewed-on: https://gerrit.libreoffice.org/25362
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-05-24 00:40:36 +00:00
Takeshi Abe
da68f03bb6 starmath: This should be an assert()
Change-Id: Ia8dd75512168fd0775a8019fc514627a7353b056
Reviewed-on: https://gerrit.libreoffice.org/25231
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-05-23 04:38:04 +00:00
Noel Grandin
cc1a0ba927 convert TG constants to scoped enum
Change-Id: Ide719e8bb0d5aacc8d5da18f385b6373c7e48184
Reviewed-on: https://gerrit.libreoffice.org/24973
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-05-17 02:28:25 +00:00
Takeshi Abe
c6883d467c Fix typo
Change-Id: Ib8e891f3af7a9de87c54bc65be98d94a16545d71
2016-05-02 15:49:47 +09:00
Takeshi Abe
1ef1ed40cb starmath: Drop unnecessary cast
Change-Id: Ia892100507de7365bcecfa0708f76931f84d797b
Reviewed-on: https://gerrit.libreoffice.org/24389
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-04-27 02:58:02 +00:00
Noel Grandin
e8fd5a07ec update loplugin stylepolice to check local pointers vars
are actually pointer vars.

Also convert from regex to normal code, so we can enable this
plugin all the time.

Change-Id: Ie36a25ecba61c18f99c77c77646d6459a443cbd1
Reviewed-on: https://gerrit.libreoffice.org/24391
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-26 10:55:58 +00:00
Noel Grandin
b4e3f5e9a7 loplugin:constantparam in starmath
Change-Id: I7a1b83ec51565f56b07ae77177e064c04f703d5f
2016-03-23 09:13:13 +02:00
Takeshi Abe
1de73e4ddf starmath: Drop SmNode::FindIndex
Its sole usage can be replaced with SmNode::IndexOfSubNode.

Change-Id: Icfd4a3fe846b585c5fa3f47e0768729aba66d73e
Reviewed-on: https://gerrit.libreoffice.org/23064
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-03-09 16:22:17 +00:00
Noel Grandin
08e14eb270 loplugin:unuseddefaultparam in starmath
Change-Id: I740d931c0236c1a4d40013b458f249692695d6e5
2016-03-01 12:48:50 +02:00
Takeshi Abe
4753d78cf9 starmath: Assert that a parent always finds its child
Change-Id: I6cb75e0d62141dba2809aaec62761cedd8c3257a
Reviewed-on: https://gerrit.libreoffice.org/20733
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
2015-12-23 00:39:56 +00:00
Stephan Bergmann
374b4f349f loplugin:nullptr (automatic rewrite)
Change-Id: Ife1eef04d905f12308b64b971176c2f045a1b268
2015-11-10 10:31:41 +01:00
Takeshi Abe
ce924d97aa starmath: Represent ownership by std::unique_ptr
Change-Id: I7ce39cbdc0199d3508e7d16d1ce0b78f8d8ca620
Reviewed-on: https://gerrit.libreoffice.org/19230
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-08 06:21:15 +00:00
Takeshi Abe
867fcf48d5 starmath: Prefix members of SmCursor
Change-Id: Ib3407b5457f4d69294c95879455553dc013cc340
Reviewed-on: https://gerrit.libreoffice.org/19186
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-07 06:39:04 +00:00
Andrea Gelmini
7319f5facc Fix typos
Change-Id: Ic3d2171521e308261c354d8f699b44b26c95f1ea
Reviewed-on: https://gerrit.libreoffice.org/18978
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-09-30 10:45:48 +00:00
Noel Grandin
7d769f9df5 loplugin: defaultparams
Change-Id: Ibf0ea539d2a95073a12f84964759d9c7a94baa7b
2015-08-20 13:52:17 +02:00
Andrea Gelmini
1a8915ef83 Fix typos
Change-Id: I1c5e4970d4e90bdea68a901294594104de5e189e
Reviewed-on: https://gerrit.libreoffice.org/16582
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2015-06-30 15:57:12 +00:00
Andrea Gelmini
9b7e1bf43d Fix typos
Change-Id: Ieaf67cf597e05dbae5affa153af907fda4462a41
Reviewed-on: https://gerrit.libreoffice.org/16295
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2015-06-16 10:59:53 +00:00
Noel Grandin
89dd3f8068 convert SfxObjectCreateMode to scoped enum
and fix some dodgy usage in /sc in the process

Change-Id: Ia2bee267df31aba431fc8cb81195bb83e5b64deb
2015-04-10 09:48:06 +02:00