525 Commits

Author SHA1 Message Date
Noel Grandin
7acbf45fcc use actual UNO enums in editeng
Change-Id: I58e794f161f3c4dd103985f575bc25202d4989b3
Reviewed-on: https://gerrit.libreoffice.org/35907
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-31 06:58:55 +00:00
Miklos Vajna
a5a571307f tdf#82580 tools: rename Rectangle to tools::Rectangle
Mostly generated using

make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle"

Except some modules have their own foo::tools namespace, so there have
to use ::tools::Rectangle. This commit just moves the class from the
global namespace, it does not update pre/postwin.h yet.

Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2
Reviewed-on: https://gerrit.libreoffice.org/35923
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-03-31 06:27:11 +00:00
Jens Carl
5aaaa9408a tdf#39468 Translate German comments
Translate German comments and terms in editeng/

Change-Id: I9bd15ca0914b34839d83751f530dd212d91e029e
Reviewed-on: https://gerrit.libreoffice.org/35884
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-03-30 10:14:53 +00:00
Andrea Gelmini
55cc79f33f Fix typos
Change-Id: Ic823a46019138b8bbcacd7b52b48d7d7ead2fde2
Reviewed-on: https://gerrit.libreoffice.org/35629
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-25 09:27:18 +00:00
Noel Grandin
ed76d1d350 loplugins:redundantcast teach it about c-style typedef casts
Change-Id: I1ac11a2481c0f4d8be1e1fd7c7637ac0ece3d65c
Reviewed-on: https://gerrit.libreoffice.org/35558
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-23 09:48:10 +00:00
Andrea Gelmini
47a9523f3f Fix typos + some German translations
Change-Id: I1c5bb725ffdf72363279436ad9bbb88064228253
Reviewed-on: https://gerrit.libreoffice.org/35406
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-19 10:05:45 +00:00
Bjoern Michaelsen
c16a4380fe remove EE_RESSTR preprocessor abuse
Change-Id: I83b35c4e2d4275ac76a36bec03807be69a605c58
Reviewed-on: https://gerrit.libreoffice.org/35370
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2017-03-18 00:35:05 +00:00
Noel Grandin
f645294d39 remove unused RID constants
found with the attached bin/find-unused-rid.py script

Change-Id: I1cf79caa6cafedb8bc642f394dc7e7da889d6fdf
Reviewed-on: https://gerrit.libreoffice.org/35136
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-14 08:37:44 +00:00
Andrea Gelmini
fba66b325c Fix typos
Change-Id: I19d30a1ef4236dbe0a0053dad67a5ba7b1586fc8
Reviewed-on: https://gerrit.libreoffice.org/35054
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Johnny_M <klasse@partyheld.de>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-11 05:04:40 +00:00
Stephan Bergmann
e46c717b0b loplugin:loopvartoosmall
Change-Id: I7c962d91f5c54fa188594174c14ab1d0b1bc6963
2017-03-07 19:50:51 +01:00
Stephan Bergmann
6cb9e6dad7 Remove redundant 'inline' keyword
...from function definitions occurring within class definitions.  Done with
a rewriting Clang plugin (to be pushed later).

Change-Id: I9c6f2818a57ccdb361548895a7743107cbacdff8
Reviewed-on: https://gerrit.libreoffice.org/34874
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-03 20:55:50 +00:00
Noel Grandin
4c09fc48e9 typesafe wrappers for css::i18nutil::TransliterationModules
and related css::util::SearchOptions2

The TransliterationModules enum has it's constants spread over multiple
UNO enum/constant-collections - TransliterationModules and
TransliterationModulesExtra, which means that most code simply uses
sal_Int32.

Wrap them up into a better bundle so that only the lowest layer needs to
deal directly with the UNO constants.

Change-Id: I1edeab79fcc7817a4a97c933ef84ab7015bb849b
Reviewed-on: https://gerrit.libreoffice.org/34582
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-01 07:28:03 +00:00
Stephan Bergmann
f407666ec9 loplugin:subtlezeroinit: editeng
Change-Id: I2fb3700f00ad76096d048747c8333337d5ffce8f
2017-02-21 07:35:07 +01:00
Tor Lillqvist
b57d51e32f Drop :: prefix from std in [de]*/
Change-Id: I3247894fe022dce7f0aa351bd85fefcd7c545dd4
Reviewed-on: https://gerrit.libreoffice.org/34377
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2017-02-17 18:41:19 +00:00
Michael Stahl
653e181fb8 Revert "remove ugly operator* in DynamicErrorInfo"
This reverts commit b5e3f8a5fa98a249ecd50021c33cf2a5c7a3b4fc.

The problem is this:

==24217== Conditional jump or move depends on uninitialised value(s)
==24217==    at 0x29A25FCE: SfxObjectShell::SetError(unsigned int, rtl::OUString const&) (objmisc.cxx:220)
==24217==    by 0x29A35E6E: SfxObjectShell::ImportFrom(SfxMedium&, com::sun::uno::Reference<com::sun::text::XTextRange> const&) (objstor.cxx:2300)
==24217==    by 0x29A3705C: SfxObjectShell::DoLoad(SfxMedium*) (objstor.cxx:765)
==24217==    by 0x29A6BC48:
SfxBaseModel::load(com::sun::uno::Sequence<com::sun:🫘:PropertyValue> const&) (sfxbasemodel.cxx:1802)

The commit is bogus because it introduces a
DynamicErrorInfo::GetErrorCode(), which overloads
ErrorInfo::GetErrorCode(), which is used at least in
DynamicErrorInfo_Impl::RegisterEDcr() and used to return a constructor
argument of DynamicErrorInfo but now returns pImpl->lErrId,
which is what this statement is trying to initialize.

Ultimately this causes my clang+ASAN build to fail because the
uninitialized error code happens to be detected as a mere Warning:

Test name: testMathMalformedXml::Import
assertion failed
- Expression: !xComponent.is()
- loading succeeded: sw/qa/extras/ooxmlimport/data/math-malformed_xml.docx

Change-Id: I9141144e0bc356ee54279948f2fce036d1831a86
2017-02-07 23:02:57 +01:00
Stephan Bergmann
7edbe65298 Clean up some OUString creation
Change-Id: I62d312436432939d28aced7cfc4a018adbd94c8c
2017-02-07 13:03:13 +01:00
Noel Grandin
b5e3f8a5fa remove ugly operator* in DynamicErrorInfo
I can see why you'd want to hide this horrible tunnelling of
information with objects registering themselves in a global list.
Urrgh.

Change-Id: Ib151a0d2d5a4508dc456e52883e488ce56d9a095
Reviewed-on: https://gerrit.libreoffice.org/33984
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-07 09:12:58 +00:00
Stephan Bergmann
6dce9c6757 Add missing #includes
...and remove some unncessary using directives/declarations, in preparation of
removing now-unnecessary #includes from cppumaker-generated files, post
e57ca02849c3d87142ff5ff9099a212e72b8139c "Remove dynamic exception
specifications".

Change-Id: Iaf1f268871e2ee1d1c76cf90f03557527ebc9067
2017-02-06 17:21:16 +01:00
Noel Grandin
4978328534 convert method names in tools::SvRef to be more like our other..
reference classes, uno::Reference and rtl::Reference.

Specifically rename Is()->is() and Clear()->clear().

Change-Id: Icb7e05e2d09cb9977121508b837ba0961dabb4ae
Reviewed-on: https://gerrit.libreoffice.org/33576
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-02 08:02:54 +00:00
Noel Grandin
1c3e84d819 teach lolugin:stringconstant about calling constructors
so we can remove unnecessary calls to the OUString(literal) constructor
when calling constructors like this:
   Foo(OUString("xxx"), 1)

Change-Id: I1de60ef561437c86b27dc9cb095a5deb2e103b36
Reviewed-on: https://gerrit.libreoffice.org/33698
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-31 08:56:20 +00:00
Stephan Bergmann
e57ca02849 Remove dynamic exception specifications
...(for now, from LIBO_INTERNAL_CODE only).  See the mail thread starting at
<https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html>
"Dynamic Exception Specifications" for details.

Most changes have been done automatically by the rewriting loplugin:dynexcspec
(after enabling the rewriting mode, to be committed shortly).  The way it only
removes exception specs from declarations if it also sees a definition, it
identified some dead declarations-w/o-definitions (that have been removed
manually) and some cases where a definition appeared in multiple include files
(which have also been cleaned up manually).  There's also been cases of macro
paramters (that were used to abstract over exception specs) that have become
unused now (and been removed).

Furthermore, some code needed to be cleaned up manually
(avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no
configurations available that would actually build that code.  Missing @throws
documentation has not been applied in such manual clean-up.

Change-Id: I3408691256c9b0c12bc5332de976743626e13960
Reviewed-on: https://gerrit.libreoffice.org/33574
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-01-26 12:54:43 +00:00
Noel Grandin
1d7c589d50 loplugin: unnecessary destructor cppcanvas..filter
Change-Id: I009cdd60869a67d210edf879ddb451663a7b8676
Reviewed-on: https://gerrit.libreoffice.org/33491
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-24 11:02:35 +00:00
Noel Grandin
cd8fdb46fd new loplugin: useuniqueptr: editeng
Change-Id: I6df65eab882780d996ee996b5fef8020186b6d98
Reviewed-on: https://gerrit.libreoffice.org/32958
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-13 13:08:52 +00:00
Noel Grandin
6b8ee3c9ba convert VclButtonsType to scoped enum
Change-Id: I9b91108c18e190060dc71546977aa8a3c11f06e1
Reviewed-on: https://gerrit.libreoffice.org/32285
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
2016-12-21 16:19:37 +00:00
Noel Grandin
f573de2a95 no need to wrap calls to SAL_INFO in #ifdef DBG_UTIL
Change-Id: Ic373a8f145f3f78c3f109e36a9c1dd9156f0dd75
Reviewed-on: https://gerrit.libreoffice.org/32034
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-19 08:29:01 +00:00
Noel Grandin
bfde4866e0 convert DecodeMechanism to scoped enum
Change-Id: I5c56634b1bca8e37fa73d02d2428645301b6c547
2016-12-05 12:49:02 +02:00
Yossi Zahn
c6db0e0649 tdf#96354 correct broken autocorrect INitial CApitals
Change-Id: If65ec7814c3aed5e4c17294ae57c34550373469d
Reviewed-on: https://gerrit.libreoffice.org/31317
Reviewed-by: jan iversen <jani@documentfoundation.org>
Tested-by: jan iversen <jani@documentfoundation.org>
2016-12-05 08:20:01 +00:00
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
Takeshi Abe
b589c4cd87 Omit comparator which is the same as default std::less<key_type>
Change-Id: I72a0b618577caececaaf3eb4df53d4cb192251da
Reviewed-on: https://gerrit.libreoffice.org/30369
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-10-31 03:48:49 +00:00
Caolán McNamara
117fc49c97 ScopedVclPtr vs std::unique_ptr for VclAbstractDialog derivatives
Change-Id: I5e43312b6f42ce0c63946f366eaf1e6dcb9629b2
Reviewed-on: https://gerrit.libreoffice.org/30344
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-10-28 09:08:50 +00:00
Noel Grandin
eca5ea9f79 make the AbstractDialog stuff extend from VclReferenceBase
Because some stuff wants to multiple-inherit from VclAbstractDialog and
OutputDevice-subclasses, and we'd prefer to keep all the lifetime
management through a single smart pointer class (VclPtr)

The change in msgbox.cxx and window.cxx is to workaround a bug in
VS2013 to do with virtual inheritance and delegating constructors.

Change-Id: I178e8983b7d20a7d2790aa283be838dca5d14773
Reviewed-on: https://gerrit.libreoffice.org/29140
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-27 06:08:30 +00:00
Noel Grandin
6f96e86dae loplugin:expandablemethodds in editeng..extensions
Change-Id: Ibe1929d74ff460955e39f2ccce3056b2051ddf08
Reviewed-on: https://gerrit.libreoffice.org/30013
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-19 06:31:43 +00:00
Stephan Bergmann
106ea87205 Remove _TYPED suffix from tools/link.hxx macros
...which was introduced with 3ead3ad52f9bb2f9d1d6cf8dfc73a0a25e6778ed "Gradually
typed Link" to distinguish the new, typed versions from the old, untyped ones,
but is no longer necessary since 382eb1a23c390154619c385414bdbe6f6e461173
"remove untyped Link<>" removed the old versions.

Change-Id: I494025df486a16a45861fcd8192dfe0275b1103c
2016-10-05 07:56:12 +02:00
Caolán McNamara
dd691312a3 we shouldn't need explicit lt_rtl_OUString, etc things anymore
Change-Id: Ibeec3fcc353e07e61fb2c838b318e0a04081ce2c
2016-09-24 12:15:13 +01: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
Stephan Bergmann
91dd2db17b loplugin:override: No more need for the "MSVC dtor override" workaround
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark
overriding destructors as 'virtual'" appears to no longer be a problem with
MSVC 2013.

(The little change in the rewriting code of compilerplugins/clang/override.cxx
was necessary to prevent an endless loop when adding "override" to

  OOO_DLLPUBLIC_CHARTTOOLS    virtual ~CloseableLifeTimeManager();

in chart2/source/inc/LifeTime.hxx, getting stuck in the leading
OOO_DLLPUBLIC_CHARTTOOLS macro.  Can't remember what that
isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.)

Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-09-13 13:19:22 +02: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 a07425892205ff8951027ea20459b97370d01de6)

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 17e6b8fd05af8fff86847c0ef1e8cc9ad013a1bd
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
6810f00d09 loplugin:staticaccess: Extend loplugin:staticcall to cover all access...
to static members (data, in addition to function) via class member access
syntax.  Also covers the (somewhat obscure) access to enumerator members.

Change-Id: Iec54b8df2fdb423c0caf21a0dd0f9fe8fdf33897
2016-08-25 17:16:14 +02:00
Noel Grandin
6f6024610b convert SvxSpellArea to scoped enum
Change-Id: I91d3caabb667e7d4ff23e603026e072074058712
2016-08-15 13:54:05 +02:00
Caolán McNamara
a860df25dd masses of MessBoxes not being disposed promptly
since...

commit ba81e5c6bd420b41a84ade6ccd774011a8089f7f
Date:   Thu May 28 21:35:43 2015 +0100

    tdf#91702 - fix stack-based MessBox allocation.

There is no special ScopedVclPtr<X>::Create or
ScopedVclPtrInstance<X>::Create just
VclPtr<X>::Create and a raw VclPtr<X>::Create()->foo
doesn't call dispose on the owned X

Change-Id: Ifacc8d5e742820701307c3c37b9b86487667d84f
2016-07-26 11:26:52 +01: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
Stephan Bergmann
435be8e8e1 Remove redundant SvxGet* wrappers around LinguMgr functions
Change-Id: Ic431ce4880d0c1277ddb411ca59b3c8e8ca36518
2016-07-10 22:08:12 +02:00
Stephan Bergmann
aae1018af6 SvxGetOrCreatePosDic parameter is unused
...ever since fd069bee7e57ad529c3c0974559fd2d84ec3151a "initial import", so kill
the equally old "TODO: remove argument or provide SvxGetIgnoreAllList with the
same one" comment for good now

Change-Id: Ie7b64306b8d06fc72d0bb49cc1e5fa3b00f59d6b
2016-07-08 18:20:39 +02:00