Noel Grandin
40fc2c1a0d
loplugin:expandablemethodds in sfx2..starmath
...
Change-Id: Ia4c411f5a9a68c2f344188ce6b6bc1815c89f993
Reviewed-on: https://gerrit.libreoffice.org/30055
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk >
2016-10-20 06:12:24 +00:00
Takeshi Abe
33c57f1550
starmath: Simplify code with std::unique_ptr
...
Change-Id: I2f6f993b92ae7f2f89b2d9d6c89b51d827226a3d
Reviewed-on: https://gerrit.libreoffice.org/29554
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp >
Tested-by: Takeshi Abe <tabe@fixedpoint.jp >
2016-10-07 04:10:23 +00:00
Takeshi Abe
36efdec23b
starmath: Assert the precondition for OUString#replaceAt()
...
Change-Id: I56ee95f9196eb2b2b3cc71203251b98ff1dba951
Reviewed-on: https://gerrit.libreoffice.org/29464
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp >
Tested-by: Takeshi Abe <tabe@fixedpoint.jp >
2016-10-05 01:18:35 +00:00
Takeshi Abe
4514d7032b
starmath: Prefix members of SmParser
...
Change-Id: Ib39bf2a9b8c37d9f2ac4ed3db602c3b0a82a506b
Reviewed-on: https://gerrit.libreoffice.org/29397
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp >
2016-10-02 08:17:59 +00:00
Gulsah Kose
8e466c431e
tdf#97164 Add text for visualition of percent symbol.
...
Change-Id: I31dc1a7a4ed0bc0e760e10c1a2ff52660a258e12
Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com >
Reviewed-on: https://gerrit.libreoffice.org/29299
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp >
Tested-by: Takeshi Abe <tabe@fixedpoint.jp >
2016-09-30 05:06:34 +00:00
Takeshi Abe
663e26f24f
tdf#53472, tdf#102268: Reimplement "intd"
...
This reverts its original implementation introduced with
93e6291c29
partially, and
improves the patch proposed at 746633bd03
(but reverted at e265ea36df
).
Change-Id: If0aa5b985cac45a1cd9ea87bae293243af9d12b2
Reviewed-on: https://gerrit.libreoffice.org/29271
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org >
2016-09-29 20:13:26 +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
93eb0896bc
starmath: Avoid temporary arrays
...
Change-Id: I5ebb0acd1e6a808f3341d9b18a4a8e87b0679c5d
Reviewed-on: https://gerrit.libreoffice.org/28068
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp >
2016-08-15 04:50:13 +00:00
Takeshi Abe
dd612a61f9
starmath: complete SmAttributNode has just 2 subnodes
...
Change-Id: Ifbecef188b314d599d7e97717934143b2aac8c09
Reviewed-on: https://gerrit.libreoffice.org/27912
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp >
2016-08-07 03:36:37 +00:00
Takeshi Abe
a323172a92
starmath: no need to create temporary string for comparison
...
Change-Id: I906ef285ec6164284924ca4771a6da758bd23fd6
Reviewed-on: https://gerrit.libreoffice.org/27140
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2016-07-12 14:07:19 +00:00
Takeshi Abe
68585e3045
starmath: Remove a couple of unused error codes
...
Change-Id: Iae3118150cf9119e48b1740ea630dea0ebef895a
Reviewed-on: https://gerrit.libreoffice.org/26998
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2016-07-07 11:56:46 +00:00
Takeshi Abe
048f298d9c
starmath: Drop useless PE_BINOPER_EXPECTED
...
as no code generates the error.
Change-Id: I86f2db28030090e0a9284e7771f26821468bb685
Reviewed-on: https://gerrit.libreoffice.org/26974
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp >
2016-07-07 06:52:48 +00:00
Takeshi Abe
d5b05cafde
starmath: Replace OSL_ENSURE with assert
...
as negative n would be undefined for OUString::copy(..., n).
Change-Id: I950ec60656142450a5d5f6804324f6080c9c4c2a
Reviewed-on: https://gerrit.libreoffice.org/26753
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2016-06-29 14:45:46 +00:00
Takeshi Abe
f07aa1136e
starmath: This condition must be met
...
Otherwise, the following static_cast would be broken.
Change-Id: Iad4738292ed6903eed78d5af98f77194d5a1d8fe
Reviewed-on: https://gerrit.libreoffice.org/26696
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp >
2016-06-28 00:55:32 +00:00
Takeshi Abe
2fb88cb41e
This can be an assert()
...
Change-Id: I2b0a8f50359e5b12fa27bf48c355f736e2b05033
Reviewed-on: https://gerrit.libreoffice.org/26491
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp >
2016-06-21 05:39:31 +00:00
Takeshi Abe
ef54bbc95b
starmath: Possible cases are exhausted
...
Change-Id: Icc48aa8ffa6a56f804c4d01f2fb3bcdf7de838d4
Reviewed-on: https://gerrit.libreoffice.org/26397
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp >
2016-06-20 00:49:45 +00:00
Takeshi Abe
fca1c92a2b
starmath: more assertions hold
...
Change-Id: I9a7fb2f4d45c5b34c0ea1d186dd90353fedc8a6d
Reviewed-on: https://gerrit.libreoffice.org/26299
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp >
2016-06-16 03:10:43 +00:00
Stephan Bergmann
8336037238
tdf#94205: Some remaining new+std::move -> o3tl::make_unique
...
Change-Id: I6a9a46d37bf09f6b497d591498c40103f4c96f59
2016-06-14 18:19:26 +02:00
Takeshi Abe
261f734b3c
starmath: The formula tree must be of type SmTableNode
...
This also omits the last push & pop on m_aNodeStack at the end
of parsing.
Change-Id: Iefff8fa801ea7cb9015d6cba0d5a972dee675cb7
Reviewed-on: https://gerrit.libreoffice.org/26003
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp >
2016-06-08 06:26:48 +00:00
Takeshi Abe
ab25d7cfec
starmath: Assign the proper token to SmTableNode
...
... for a similar motivation with b43b79648f
.
Change-Id: I9fc42fc8e34958295eeec5759c072c8259fc38b6
Reviewed-on: https://gerrit.libreoffice.org/25122
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2016-05-19 14:50:06 +00:00
Takeshi Abe
70aa579933
starmath: Remove obsolete TG::Discarded
...
which was originally TGDISCARDED until cc1a0ba927
,
and its usage was gone with 9adcd26105
.
Change-Id: Idb01f30b7b140b17deead7c5a83128fa1f3bdf4c
Reviewed-on: https://gerrit.libreoffice.org/25074
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: David Tardon <dtardon@redhat.com >
2016-05-18 06:08:06 +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
b43b79648f
starmath: SmMatrixNode should have the node TMATRIX
...
... rather than the one after its closing brace.
So far having an arbitrary node is OK for SmMatrixNode
because existing code does not refer to it, but it is
saner to keep relevant nodes in the syntax tree.
Change-Id: Ia5412454c996eedde1545cd8a2f323eb95593eb9
Reviewed-on: https://gerrit.libreoffice.org/24909
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp >
2016-05-13 01:40:50 +00:00
Stephan Bergmann
14cd5182c5
Replace fallthrough comments with new SAL_FALLTHROUGH macro
...
...which (in LIBO_INTERNAL_ONLY) for Clang expands to [[clang::fallthrough]] in
preparation of enabling -Wimplicit-fallthrough. (This is only relevant for
C++11, as neither C nor old C++ has a way to annotate intended fallthroughs.)
Could use BOOST_FALLTHROUGH instead of introducing our own SAL_FALLTHROUGH, but
that would require adding back in dependencies on boost_headers to many
libraries where we carefully removed any remaining Boost dependencies only
recently. (At least make SAL_FALLTHROUGH strictly LIBO_INTERNAL_ONLY, so its
future evolution will not have any impact on the stable URE interface.) C++17
will have a proper [[fallthroug]], eventually removing the need for a macro
altogether.
Change-Id: I342a7610a107db7d7a344ea9cbddfd9714d7e9ca
2016-05-10 16:42:16 +02:00
Jochen Nitschke
116cf0b298
modernize loops
...
use one style (reverse_iterators) for reverse loops and
use range base loops if possible
Change-Id: I231572bc5923e450d7a54bb88c7d8ef63d04f41d
Reviewed-on: https://gerrit.libreoffice.org/24758
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: David Tardon <dtardon@redhat.com >
2016-05-09 07:17:58 +00:00
Takeshi Abe
6cd6236891
starmath: Drop useless last entry of aTokenTable
...
Change-Id: I3189c875cc8b2046f5a0353fb641a7d6ea9fdd9a
Reviewed-on: https://gerrit.libreoffice.org/24692
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp >
2016-05-08 10:34:05 +00:00
Takeshi Abe
07a641b110
Reduce scope of variables
...
Change-Id: I0018a6601f48f32736d10fd1eab58e926d97f91b
Reviewed-on: https://gerrit.libreoffice.org/24458
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp >
2016-05-02 01:19:04 +00:00
Takeshi Abe
615e3502c5
Resolves: tdf#88320 parsing fails with a subscript number
...
... ending with comma and followed by non-space.
Change-Id: Ia00c662e31940270690c64e1840417436565a6c7
Reviewed-on: https://gerrit.libreoffice.org/24260
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp >
2016-04-27 23:40:37 +00:00
Takeshi Abe
ebc76403c4
starmath: Simplify SmParser::DoTable()
...
yet doing the same.
Change-Id: I2ebdcb96179830eb02af8ed12dd27c69a78ed276
Reviewed-on: https://gerrit.libreoffice.org/24240
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp >
2016-04-22 01:40:33 +00:00
Takeshi Abe
11f13f55b7
starmath: Drop member variable set but not used
...
Its usage was gone with 9adcd26105
.
Change-Id: Ibd322531365c2e0ccad85d553781611dfe96d54e
Reviewed-on: https://gerrit.libreoffice.org/24277
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp >
2016-04-22 01:37:09 +00:00
Takeshi Abe
cd6ec105eb
starmath: Make coUserDefinedCharContFlags more readable
...
No bits changed because:
((KParseTokens::ANY_LETTER_OR_NUMBER | KParseTokens::IGNORE_LEADING_WS | KParseTokens::ASC_DOT)
& ~KParseTokens::IGNORE_LEADING_WS)
== KParseTokens::ANY_LETTER_OR_NUMBER | KParseTokens::ASC_DOT
Change-Id: I1e00d0cdb07a1450f98655ec3cc8483e4d348b74
Reviewed-on: https://gerrit.libreoffice.org/24122
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp >
2016-04-22 01:36:41 +00:00
Takeshi Abe
a3569e9687
starmath: Fix bounds checking
...
Change-Id: I6b7eae01838eaf8138f777c0a9e84a3ad9f97082
Reviewed-on: https://gerrit.libreoffice.org/24078
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Michael Stahl <mstahl@redhat.com >
2016-04-15 10:53:02 +00:00
Stephan Bergmann
71c21660a7
Make aDelimiterTable a local var
...
Change-Id: Ie551a52310d4723643433973bf7ecf024068e4d5
2016-03-21 18:12:53 +01:00
Stephan Bergmann
ffe2e46470
loplugin:staticmethods
...
Change-Id: Id40b00234f78afc238d6b3af1283e0429587ee49
2016-03-21 18:10:04 +01:00
Rohan Kumar
28aaa27438
tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals
...
I removed all the OSL_DEBUG_LEVEL > 1 conditionals and also
made SAL_WARN open to production code which was earlier under
OSL_DEBUG_LEVEL > 0
Change-Id: Ibe71defed9a7191ec8e4a934e746ef0f3ebd8b3a
Reviewed-on: https://gerrit.libreoffice.org/23065
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
Tested-by: Stephan Bergmann <sbergman@redhat.com >
2016-03-21 17:01:53 +00:00
Takeshi Abe
d2f33d2283
starmath: Avoid C-style cast
...
Change-Id: Id54997718a61b1b5a488922f05374c559f1e4454
Reviewed-on: https://gerrit.libreoffice.org/22460
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2016-02-18 09:38:12 +00:00
Chris Sherlock
a238b1f8d3
Remove excess newlines
...
A ridiculously fast way of doing this is:
for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \
--exclude-dir=workdir --exclude-dir=instdir '^
{3,}' .)
do
perl -0777 -i -pe 's/^
{3,}/
/gm' $i
done
Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c
Reviewed-on: https://gerrit.libreoffice.org/22224
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com >
2016-02-09 08:18:05 +00:00
Takeshi Abe
ae8913f596
starmath: Stop using unnecessary namespace
...
Change-Id: I3848e61eac69a2b3cacc3cf1f66534f4508151cd
Reviewed-on: https://gerrit.libreoffice.org/21837
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: David Tardon <dtardon@redhat.com >
2016-01-27 12:28:45 +00:00
Noel Grandin
5669ea31dd
loplugin:unusedmethods unused return value in starmath
...
Change-Id: Ic70c3d727ecadd082f7e5d293fc2b279b1287b8f
2016-01-14 11:45:21 +02:00
Andrea Gelmini
64d624b651
Fix typos
...
Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86
Reviewed-on: https://gerrit.libreoffice.org/21209
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com >
2016-01-10 14:17:20 +00:00
Takeshi Abe
186f365a2c
starmath: Use std::unique_ptr for exception safety
...
Change-Id: Idc71dc410000b88463440dd18f41ff945b7616d7
2015-11-20 09:09:35 +09:00
Stephan Bergmann
374b4f349f
loplugin:nullptr (automatic rewrite)
...
Change-Id: Ife1eef04d905f12308b64b971176c2f045a1b268
2015-11-10 10:31:41 +01:00
Michael Stahl
9ed9f30f22
starmath: replace boost::ptr_deque with std::deque<std::unique_ptr>
...
Change-Id: I1d2671a0b355bd4dbb195d69af2c432c50df904e
2015-11-09 17:12:21 +01:00
Noel Grandin
95b22704e8
com::sun::star->css in starmath,stoc,svgio,svl
...
Change-Id: If4308b358a55351f6e951ebf055df076ce4ad4ce
Reviewed-on: https://gerrit.libreoffice.org/19667
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
Tested-by: Noel Grandin <noelgrandin@gmail.com >
2015-10-29 11:18:10 +00:00
Takeshi Abe
57c1b07d24
starmath: Simply add elements to the end of the vector
...
No logic changed.
Change-Id: I5df80d6c31f1c103c49ac4310a7d06da57d1a05f
Reviewed-on: https://gerrit.libreoffice.org/19142
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
Tested-by: Noel Grandin <noelgrandin@gmail.com >
2015-10-05 06:22:11 +00:00
Takeshi Abe
3128b9c6f6
starmath: it is just a stack that is needed here
...
Change-Id: I5b929a462f8084105ba6254e53e9d5bfa0a96c79
Reviewed-on: https://gerrit.libreoffice.org/19096
Reviewed-by: Michael Stahl <mstahl@redhat.com >
Tested-by: Michael Stahl <mstahl@redhat.com >
2015-10-02 19:09:51 +00:00
Takeshi Abe
2fb9c1abbd
starmath: SmAlignNode has only one child
...
So, do not bother to extend its children array.
Change-Id: I9550501469aec5c4420f127ab64003c5ab14f9c1
Reviewed-on: https://gerrit.libreoffice.org/19089
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
Tested-by: Noel Grandin <noelgrandin@gmail.com >
2015-10-02 06:25:19 +00:00
Takeshi Abe
ce3c818e89
starmath: tdf#93240 replace boost::ptr_vector
...
with std::vector<std::unique_ptr>
Change-Id: I72f96b08273c73cbd11c7796c34a45b262325209
Reviewed-on: https://gerrit.libreoffice.org/18820
Reviewed-by: Michael Stahl <mstahl@redhat.com >
Tested-by: Michael Stahl <mstahl@redhat.com >
2015-09-29 11:05:22 +00:00
Takeshi Abe
6e7f5c5fce
starmath: Use member initialization lists for SmToken
...
Change-Id: I3c5389135054ee866ebac3122edc71ec8c163124
Reviewed-on: https://gerrit.libreoffice.org/18785
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
2015-09-23 13:13:15 +00:00
Takeshi Abe
5ca4acf877
starmath: Prefix members of SmErrorDesc
...
Change-Id: I4910561e3671f546f2e36344016e2b50fd2a70eb
Reviewed-on: https://gerrit.libreoffice.org/18788
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk >
2015-09-23 05:38:53 +00:00