3181 Commits

Author SHA1 Message Date
Noel Grandin
abde31a2bc Revert "Simplify sfx2 removing SfxModuleArr_Impl and dummy SfxModule flag"
This reverts commit e319ef1171dab61fff2201f5c1470ca09894c395.

Apparently, at some point, someone added a 'bool bDummy' param to
SfxModule, but only updated 2 of the 5 callsites. Since we're
passing in pointers here, at the other call sites, the bDummy
param evaluated to 'true'.
2016-06-06 10:16:23 +02:00
Mark Page
e319ef1171 Simplify sfx2 removing SfxModuleArr_Impl and dummy SfxModule flag
The SfxModuleArr_Impl is a static container of SfxModule, since
this is private to the SfxModule class it does not require
wrapping.

The bDummy flag is unused, and complicates the class

Change-Id: Ib03b215543a0c37d4edf20b2d0fc141a783e115e
Reviewed-on: https://gerrit.libreoffice.org/25859
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-06 07:40:25 +00:00
Noel Grandin
9f138ffe9d remove unused constants in HRC files
Change-Id: Ia034fb16ce75caeb69fd746d4a602cd5fcfef6d1
Reviewed-on: https://gerrit.libreoffice.org/25817
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-06 07:01:43 +00:00
Noel Grandin
52225a3b7f Convert ComplexTextLayoutMode to scoped enum
Change-Id: I257f8e15fec92f0701235a6fe4b6a2272498c4f1
Reviewed-on: https://gerrit.libreoffice.org/25667
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-03 11:34:23 +00:00
Takeshi Abe
013f9d5aaa Null pointer dereferences must not happen
This is a follow-up of 09981cd6383ecb99e4b6c83b98b03af5cf3ff59b.
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
53bc542093 STREAM_STD_READ already includes StreamMode::NOCREATE
Change-Id: Ib8c81056619a383cedc828b945c1802ff1ce42ca
Reviewed-on: https://gerrit.libreoffice.org/25802
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-06-02 10:52:45 +00:00
Takeshi Abe
b6056eabfa Passing its const ref is sufficient
Change-Id: I85db4fcc3698d02ac6a7660042152092e6eeb99e
Reviewed-on: https://gerrit.libreoffice.org/25752
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mark Page <aptitude@btconnect.com>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-06-02 05:15:20 +00: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
e71ab23aa3 starmath: Drop redundant IsFormulaArranged() check
as ArrangeFormula() itself checks bIsFormulaArranged,
and does nothing if it's on.

Change-Id: Icc76208f6881d4de99e88feae5f19d7e8890e4e9
Reviewed-on: https://gerrit.libreoffice.org/25570
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-05-30 01:44:47 +00:00
Takeshi Abe
3afac0812b starmath: Make some functions of SmDocShell public
so that SmModel is no longer required to be a friend of SmDocShell.

Change-Id: I7153a9ef13ae829710acf580ff0a9c30705aeb25
Reviewed-on: https://gerrit.libreoffice.org/25528
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-05-28 00:06:52 +00:00
Takeshi Abe
79e247d657 starmath: Prefix members of SmSetSelectionVisitor
Change-Id: I3a5d195d65fe3a9b7b7859e3ad4c1d051628f44d
Reviewed-on: https://gerrit.libreoffice.org/25491
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-05-27 02:08:46 +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
Caolán McNamara
07f1a39509 (nearly) nothing uses GetUniqueId anymore, so remove it.
The odd one out is the usage in Formula, which attempts
to restore focus to a particular window identified by
an unique id. In this case restore focus by keeping a VclPtr
to the desired window.

Change-Id: I1dc335325c109d75745c6bba2e12662e6ae50638
2016-05-25 14:24:20 +01: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
Regina Henschel
66a953bf3a tdf#99984 render inferred mrow as group {}
In case an element has no content, but has got an SmXMLRowContext,
an empty group {} is inserted. The result is, that empty table
cells are rendered without error, so that files, which use a
mtable element to arrange things, no longer break on import.

Change-Id: Iae158226e6478f2f9f397b8485044860ee8767c2
Reviewed-on: https://gerrit.libreoffice.org/25273
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-05-23 06:29:18 +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
Takeshi Abe
31cfb24237 starmath: These functions are used in local only
Change-Id: I603be0a0890844019700f402ae79203ddc86c952
Reviewed-on: https://gerrit.libreoffice.org/25186
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-05-21 00:34:53 +00:00
Takeshi Abe
ab25d7cfec starmath: Assign the proper token to SmTableNode
... for a similar motivation with b43b79648f4fbcd815092268d1b7a5af9e278f52.

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
Noel Grandin
b3ff2f450f loplugin:unusedmethods in slideshow to svtools
Change-Id: Icf0056e13c88d7d347e668adaeddd4ed72af85cf
Reviewed-on: https://gerrit.libreoffice.org/25141
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-19 08:33:21 +00:00
Takeshi Abe
70aa579933 starmath: Remove obsolete TG::Discarded
which was originally TGDISCARDED until cc1a0ba927ad6f85103059aa8e6108017f436304,
and its usage was gone with 9adcd261054a0e99ae032be5e7428e28a6663975.

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
Takeshi Abe
378576a908 Convert ATTR_* to scoped enum
Change-Id: Icbf19ca281c260ba0795c7a8e5745d1e603ac8a5
Reviewed-on: https://gerrit.libreoffice.org/25050
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-05-18 02:08:00 +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
Jan Iversen
e265ea36df tdf#98238, tdf#99591 reverted old commit
Revert "tdf#53472 Integral Symbols too small for some integrands"

This reverts commit 746633bd0315939fd5e0b50c90692d356d2ed678.

Revert on request from regina, since this commit caused 2 new bugs.

The code of the reverted patch is kept in the file for further
investigation, once it has been confirmed that it works.

The file had 3 commits later, these are not affected by this commit

Change-Id: I5b24a9b88ac909c83115e8c8a430dc768c9effd4
Reviewed-on: https://gerrit.libreoffice.org/24898
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-05-16 06:14:35 +00:00
Takeshi Abe
75c10400a6 Avoid C-style cast
Change-Id: I777920cb2e9dcc3f2b20f5a96c88bf48fcb94895
Reviewed-on: https://gerrit.libreoffice.org/25024
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-05-16 05:22:36 +00:00
Takeshi Abe
1dbdc947fc Fix bogus nGroup for SmMatrixNode's token
It was an obvious mistake because TRGROUP's type is SmTokenType.

Change-Id: Ib3b932482c61bd9568aa579d94f742d0dd0b5462
Reviewed-on: https://gerrit.libreoffice.org/24948
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-05-14 10:37:01 +00:00
Caolán McNamara
eb2da27e08 Resolves: tdf#99556 if the num of arguments is not 1 infer a raw
not just if the num of arguments is > 1

Change-Id: If0cae16cc52685315708ac3b2b8456ede7c1a6ce
2016-05-13 13:20:55 +01:00
Noel Grandin
b3d5da663f convert SHOWTRACK to scoped enum
Change-Id: Ibf06f6c79f80d7265ae3239c1ea0088118e92e21
Reviewed-on: https://gerrit.libreoffice.org/24894
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-13 07:52:24 +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
Takeshi Abe
cc63036369 Convert FLG_* to scoped enum
Change-Id: If767fff10a0bb28735578b4ec3dcf7b9e2d326a2
Reviewed-on: https://gerrit.libreoffice.org/24872
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-05-12 00:38:42 +00:00
Noel Grandin
265068d65b clang-tidy modernize-loop-convert in scripting to svtools
Change-Id: I98229d14109cf243839d632feabde1391ea9bad5
Reviewed-on: https://gerrit.libreoffice.org/24847
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-11 06:54:34 +00:00
Takeshi Abe
b871a97d35 starmath: Drop unused non-const variant of GetLeftMost
... resulting in one less const_cast.

Change-Id: I3dad339f25524fc22e7a02b08ee7ec01b341e991
Reviewed-on: https://gerrit.libreoffice.org/24810
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-05-11 00:58:56 +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
Takeshi Abe
65b327b873 Simplify code with ForEachNonNull
Change-Id: Id149ecee4fa7737b529f3a3a19bb4bb9ed778dcd
Reviewed-on: https://gerrit.libreoffice.org/24778
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-05-10 01:00:26 +00: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
Noel Grandin
58a32075ca use Any constructor instead of temporaries
Change-Id: Iffb82a2cee1a28d89eeea2b905aaa14086ee475a
2016-05-04 12:39:40 +02:00
Stephan Bergmann
6e70103da0 While at it, delete Any functions on sal_Bool*
(at least for LIBO_INTERNAL_ONLY), to help further reduce the occurrences of
sal_Bool across the code base

Change-Id: I70654a0cb56655984c717b7b894f26c9ab47536e
2016-05-04 11:59:23 +02:00
Stephan Bergmann
0b1e4a3067 Prevent Any::setValue from reinterpreting bool* as sal_Bool*
...which only happens ot work in environments where sizeof (bool) == 1.  The
simpler alternative is to use the operator <<= template without passing explicit
UNO type information, anyway.

The std::nullptr_t overloads are needed to disambiguate calls with a nullptr
argument.  (Which can at least be meaningful for VOID, but for other types what
it happens to do is store a default value of the given type.)  As std::nullptr_t
is only C++11, this all needs to be LIBO_INTERNAL_ONLY.

Change-Id: Iff06a6ba94250bd4ae4afc937c2a2bfa75f0888f
2016-05-03 15:26:01 +02:00
Takeshi Abe
022b466db1 starmath: Avoid C-style cast
Change-Id: If8fdb9def831ea9720c3cad1379be47aba7dec30
Reviewed-on: https://gerrit.libreoffice.org/24584
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-05-03 09:14:43 +00:00
Noel Grandin
82e9cfc991 use Any constructor for bool values, instead of temporary vars
mostly found with:
   git grep -n 'setValue.*cppu.*UnoType.*bool.*get'

Change-Id: Ie8e5aa6402d25dbe90b0f492031a245bb222c1a5
Reviewed-on: https://gerrit.libreoffice.org/24464
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-03 07:26:26 +00:00
Takeshi Abe
c6883d467c Fix typo
Change-Id: Ib8e891f3af7a9de87c54bc65be98d94a16545d71
2016-05-02 15:49:47 +09: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
Muhammet Kara
376c337d46 tdf#97087 Give comprehensible, unique names to idles
Timers and idles should have programmer comprehensible, unique names

Change-Id: Id0f2c0a77cd28c3ec5473e8432569739b58d2101
Reviewed-on: https://gerrit.libreoffice.org/24388
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2016-04-28 09:34:30 +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
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
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 9adcd261054a0e99ae032be5e7428e28a6663975.

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