Commit Graph

275 Commits

Author SHA1 Message Date
Stephan Bergmann
bffac17a82 Rewrite some (trivial) assignments inside if/while conditions: editeng
Change-Id: I374fcd08bdeb37ff542447142b1b164886e0e5db
2016-11-29 17:21:18 +01:00
TiagoSantos
6bfe94a631 extend markup support (/italic/ and -strikeout-)
* adds to LibreOffice markup support for /italics/ and -strikeout-
* TODO update strings in the Options dialog (they only refer *bold* and
_underline_)
* TODO update documentation with new feature

Change-Id: I6fd7bbd036bf406a9e24500d316e7f28a848faab
Reviewed-on: https://gerrit.libreoffice.org/31076
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-24 07:31:29 +00:00
Noel Grandin
2dfc4c0845 loplugin:oncevar in desktop..filter
Change-Id: I21c47cacbcd68f06eea7ccbbfa6d04fc65e2b7ee
Reviewed-on: https://gerrit.libreoffice.org/30564
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-04 13:15:29 +00:00
Noel Grandin
a1720f3a01 convert C_ constants to typed_flags
Change-Id: Ia80cef26edce3e0a664044f3ca65d33998546d0f
2016-09-22 09:25:49 +02:00
Caolán McNamara
0bfefc0b39 Resolves: tdf#83037 <--> corrected into ← → instead of ↔
don't use - as a word separator except for breaking up
a compound word for the purposes of tdf#55693, e.g.
TEst-TEst autocorrected to Test-Test)

Change-Id: Ie52a16af0b5838d1ba0de9c5f9c30dcab05c3bc7
2016-09-21 20:37:13 +01:00
Michael Stahl
9670f0d17f editeng: don't let wild-card auto-correct leave current word
If a paragraph has e.g. multiple -> in it then auto-correct of the first
one will create via the .*->.* rule a new auto-correct entry that has as
long-word the word that contains the first -> until the last -> and
everything in between.  This will be somewhat irritating when it is
eventually applied.  Avoid it by limiting the wild-card loop to the
current word, which is apparently the intent anyway.

(regression from a074258922)

Change-Id: I294bae863c44eb460627b61b4383133131fe4b3a
Reviewed-on: https://gerrit.libreoffice.org/28608
Reviewed-by: László Németh <nemeth@numbertext.org>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-09-02 21:00:10 +00:00
Stephan Bergmann
0c9a71a7b2 loplugin:stringconstant: adapt to improved OUStringLiteral1 (editeng)
Change-Id: If8d2eb5e02a107cc1805e349a70df54160fed02a
2016-08-30 15:27:48 +02:00
Stephan Bergmann
88c80411cb loplugin:implicitboolconversion
Change-Id: Ia50bd6ecc6a4b5efc2de81282a16203e89087314
2016-08-30 14:38:24 +02:00
Caolán McNamara
776e2e2635 Resolves: tdf#96369 don't superscript ordinals for mixed text and numbers
e.g. 5th is ok, but foo5th is not

this is basically a regression from

commit 17e6b8fd05
Date:   Thu Apr 7 13:33:48 2011 +0200

where the older code would only do the conversion if the string
before the number was comprised of non-letters, so go back
to that logic.

Change-Id: I928c365eb11891e78331bbd165dbdb9541ac0361
2016-08-30 12:47:44 +01:00
Jochen Nitschke
33b38082ca put StreamMode masks in scope of enum class
Change-Id: I77682f7e289a59b986bb84edf014029a20266470
Reviewed-on: https://gerrit.libreoffice.org/28420
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-27 12:06:15 +00:00
Stephan Bergmann
435be8e8e1 Remove redundant SvxGet* wrappers around LinguMgr functions
Change-Id: Ic431ce4880d0c1277ddb411ca59b3c8e8ca36518
2016-07-10 22:08:12 +02:00
Caolán McNamara
6752590fec don't autocapitalize words that follow a field mark
Change-Id: Ia8efa88aaf47edba9a590c858d0ea30d7bfe2977
2016-07-01 14:49:03 +01:00
Gökhan Gurbetoğlu
ea5a5b1dbb tdf#99589 - tolower / toupper - dangerous to Turks ...
Change-Id: Id3b9abd557f2b8dfc942589362452cbdb0232da9
Reviewed-on: https://gerrit.libreoffice.org/26546
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-06-23 10:01:18 +00:00
Noel Grandin
0b23eec200 teach refcounting clang plugin about uno::Reference
uno::Reference is only allowed to used with classes that have a
::static_type member.
So convert all those places to rtl::Reference.

Maybe we need some LIBO_INTERNAL_ONLY constructors on rtl::Reference and
uno::Reference to make this a little smoother?

Change-Id: Icdcb35d71ca40a87b1dc474096776412adbfc7e3
Reviewed-on: https://gerrit.libreoffice.org/25516
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-31 06:25:45 +00:00
László Németh
785e530e83 fix bad index/assertion failure with line ending autocorrect patterns
Test case: type "->" and press Enter in a new en-US text document.
Result: crash or missing replacement of the arrow.

Change-Id: I052ae868b6fe0b1e5557c40471d31a20bd1e5ca9
2016-05-21 02:49:27 +02:00
Noel Grandin
58a32075ca use Any constructor instead of temporaries
Change-Id: Iffb82a2cee1a28d89eeea2b905aaa14086ee475a
2016-05-04 12:39:40 +02: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
17c4f7f0bc clang-tidy modernize-loop-convert in e*
Change-Id: If56abefa81b41479e3ea9890dee1c43f006086de
Reviewed-on: https://gerrit.libreoffice.org/24384
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-26 07:43:58 +00:00
Stephan Bergmann
9ad66e5ae9 loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: I626b79e1450d78aec96c206db82bf64a47305d08
2016-04-20 17:25:39 +02:00
Noel Grandin
789055bc2a clang-tidy performance-unnecessary-copy-initialization
probably not much performance benefit, but it sure is good at
identifying leftover intermediate variables from previous
refactorings.

Change-Id: I3ce16fe496ac2733c1cb0a35f74c0fc9193cc657
Reviewed-on: https://gerrit.libreoffice.org/24026
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-18 07:37:31 +00:00
Stephan Bergmann
311167193b Avoid reserved identifiers
Change-Id: I2c83911433a8f89e7366d9f7711ca4879e44bae9
2016-04-06 12:07:30 +02:00
Noel Grandin
9391688f61 loplugin:constantfunction in editeng
Change-Id: I8f8414b4867d3248e6d836ed8037de4da41b97f1
Reviewed-on: https://gerrit.libreoffice.org/23331
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-18 06:02:18 +00:00
Noel Grandin
b76842f63b loplugin:unuseddefaultparams in editeng
Change-Id: I1dc0ba262c06bd69cf92aae20b344fe23f460f55
2016-03-03 09:42:49 +02:00
Noel Grandin
c45d3badc9 new loplugin: commaoperator
Change-Id: I03f24e61f696b7619855e3c7010aa0d874e5a4ff
2016-02-23 08:08:56 +02:00
Chris Sherlock
6858d51757 vcl: include vcl headers via triangular brackets instead of quotes
Change-Id: I311f7db622ce341527fe12a92b516f800b602f92
2016-02-13 00:29:50 +11:00
Chris Sherlock
3187193a61 tools: rename FontUnderline to FontLineStyle
Change-Id: I4750ad8569a1003b2f8c29052f3e25003ee433ca
Reviewed-on: https://gerrit.libreoffice.org/21892
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-31 04:31:13 +00:00
Caolán McNamara
570087e762 coverity#3148472 Unused value
Change-Id: I9acdfe0edf8468c6efb708ca13109abe2be0b826
2016-01-15 20:24:47 +00:00
Michael Stahl
228bccb7bc editeng: coverity#1348472 unused value AddNonBrkSpace
Let's hope that shuts up coverity?

Change-Id: I81f56ce9120c1d9328d5f04b1d1869c01402eca1
2016-01-15 13:03:11 +01:00
Noel Grandin
1f9a610de1 loplugin:unusedmethods unused return value in include/editeng
Change-Id: I1314480950b0d3a3e5ed066d71c175604dd41970
Reviewed-on: https://gerrit.libreoffice.org/21361
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-12 07:39:42 +00: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
Noel Grandin
2e9277c050 use unique_ptr for pImpl in editeng/
Change-Id: I43ae9f706db15594b3a0c5cba41436d009588393
2015-11-18 08:35:34 +02:00
Stephan Bergmann
217f7f236f loplugin:nullptr (automatic rewrite)
Change-Id: I9fe00eef7ddcd4a3c87e497a8d62f98e71a0d6d8
2015-11-10 10:31:24 +01:00
Stephan Bergmann
108ecc45ce loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)
Change-Id: Icf08e69ba327225da816bd57648d4242dcbf3280
2015-11-06 09:35:37 +01:00
Benjamin Ni
be729e7721 tdf#94269: Replace "n" prefix for bool variables with "b"
Change-Id: I178545792c7354a362658ac7ef8b1d4cf0865797
Signed-off-by: Michael Stahl <mstahl@redhat.com>
2015-11-02 23:40:57 +01:00
Caolán McNamara
7076cc68fd get rid of erroneous 0x7ff language mask
Change-Id: I2b3501967fc0088e0bebf6c366e033c61b652921
2015-10-23 20:36:45 +01:00
Caolán McNamara
97893e56e6 more tdf#76964 fall back to primary language via getLanguage
Change-Id: I7718ff6f93f704e37e9a046cb07c497b2d533a2a
2015-10-23 20:27:53 +01:00
Caolán McNamara
a1ff0745cc Resolves: tdf#76964 fall back to primary language via getLanguage
instead of bittwiddling which ends up trying to resolve the
system language

Change-Id: I545bd5e39f99003ddedf3c90031e8b818edc1de2
2015-10-23 09:13:09 +01:00
Stephan Bergmann
ad6e444a31 loplugin:defaultparams
Change-Id: I62e0ec63ff09c200e0b621c8b042a976e8ce630e
2015-10-19 17:49:51 +02:00
Stephan Bergmann
205f85749d Reduce variable scope
Change-Id: I6a8e4b8f132acff5d75859de570a969ad8c3fa4b
2015-10-07 11:32:43 +02:00
Andrea Gelmini
00d2eeebc8 Fix typos
Change-Id: Iaa9dd3f02f21947742643349d3b878126017477d
Reviewed-on: https://gerrit.libreoffice.org/18947
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-09-30 12:25:15 +00:00
Noel Grandin
eb012bf0a8 editeng: com::sun::star->css
Change-Id: Ied65d2de394ce54cb2c35abb152cf58ac3139395
Reviewed-on: https://gerrit.libreoffice.org/18503
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-13 06:21:03 +00:00
Noel Grandin
0f2a9bb213 loplugin: defaultparams
Change-Id: I2a1255c00a051b29381ec57c380eafb08c4900d9
2015-08-11 09:48:17 +02:00
Noel Grandin
2660d24a07 new loplugin: refcounting
This was a feature requested by mmeeks, as a result of
tdf#92611.

It validates that things that extend XInterface are not
directly heap/stack-allocated, but have their lifecycle managed
via css::uno::Reference or rtl::Reference.

Change-Id: I28e3b8b236f6a4a56d0a6d6f26ad54e44b36e692
Reviewed-on: https://gerrit.libreoffice.org/16924
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-03 06:37:16 +00:00
Michael Stahl
22b2381987 editeng: pointless code
Change-Id: Ice4f34ce60b0f4af97a985f4203a705523c0626b
2015-07-17 20:27:00 +02:00
Michael Stahl
9b1e55fe02 editeng: replace boost::ptr_map with std::map<std::unique_ptr>
Change-Id: I343071cc29c2041bc98456954b0aa32fff324d82
2015-07-17 20:26:59 +02:00
Noel Grandin
7ab881a57d loplugin:unusedmethods editeng
Change-Id: I15b2be5a9cd6e72447b674a65eabe9f89cb6ff12
Reviewed-on: https://gerrit.libreoffice.org/17115
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-16 08:37:25 +00:00
Noel Grandin
d16d9f950f remove some unnecessary typedefs to pointer
that were really not helping make the code any clearer.
Found with a search
   git grep -P 'typedef\s+\w+\s*\*\s*\w+\;'
and manual inspection

Change-Id: I6a5c031e9e060ad3623a7586ec8a8cc4fe6252e9
2015-06-30 09:13:24 +02:00
Noel Grandin
39fd37f39d remove custom RTTI from SvxAutoCorrect
unused

Change-Id: I2f4504fdbe88fa83abe6da8a1f733f9ae1c2742d
2015-06-29 10:05:35 +02:00
Noel Grandin
5a2e09989a cppcheck:redundantCondition
Change-Id: Ib8b6342d1da526df6104125ded546b3f053c448b
2015-06-15 11:56:55 +02:00
Noel Grandin
6140ca9f1d loplugin:loopvartoosmall
Change-Id: Icb31e51575f7fffd36be73bbd87a3c5e56c3aa26
2015-05-29 08:48:41 +02:00