2344 Commits

Author SHA1 Message Date
Noel Grandin
52305b6620 convert SvParserState to scoped enum
and drop unused WAITFORDATA enumerator

Change-Id: I658802d88a19dcc2d378456375810454e7426447
2017-02-14 14:22:24 +02:00
Michael Stahl
6ed7a9759f editeng: presumed copypasta in 048e30c1f8231e6cd144a9251061f6fa127b353e
Doesn't make sense to check for RTF twice in a row.

Change-Id: I15a384adb4d9e65770d81c414b6f24cc0a2b75e8
2017-02-14 12:12:40 +01:00
Noel Grandin
b8d977c017 convert CharCompressType to scoped enum
and move it to svl, where it belongs

Change-Id: Ic4d846419dfe2dd85de5ade8ed1a041867bbf1dc
2017-02-13 08:17:42 +02:00
Julien Nabet
2b21ac16c2 Various typos on accessible
Change-Id: Id28a4a2cbbcec10a7cc9cb40ad208d575352039b
Reviewed-on: https://gerrit.libreoffice.org/34161
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-02-12 07:43:23 +00:00
Stephan Bergmann
8646ab97dc Remove MinGW support
In OOo times, there'd originally been efforts to allow building on Windows with
MinGW.  Later, in LO times, this has been shifted to an attempt of cross-
compiling for Windows on Linux.  That attempt can be considered abandoned, and
the relevant code rotting.

Due to this heritage, there are now three kinds of MinGW-specific code in LO:

* Code from the original OOo native Windows effort that is no longer relevant
  for the LO cross-compilation effort, but has never been removed properly.

* Code from the original OOo native Windows effort that is re-purposed for the
  LO cross-compilation effort.

* Code that has been added specifially for the LO cross-compilation effort.

All three kinds of code are removed.

(An unrelated, remaining use of MinGW is for --enable-build-unowinreg, utilizing
--with-mingw-cross-compiler, MINGWCXX, and MINGWSTRIP.)

Change-Id: I49daad8669b4cbe49fa923050c4a4a6ff7dda568
Reviewed-on: https://gerrit.libreoffice.org/34127
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-02-10 18:01:27 +00:00
Noel Grandin
65b7b6322b loplugin:unusedenumconstants read-only constants in vcl
Change-Id: I8c81444cbecdc103cc47d9a4133b0b4d9010e0c2
Reviewed-on: https://gerrit.libreoffice.org/34018
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-08 12:42:52 +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
Tor Lillqvist
e1e4efdc71 Typo: s/dependend/dependent/i
Change-Id: If02798894ad6f0e0442ed60aaec6eca40e6dcb61
2017-02-06 16:03:34 +02:00
Jochen Nitschke
3f6643b927 default ctor is fine here
this was hiding a Wunused-variable warning

Change-Id: I32bd853846bc6f56c082541109eedfdab2402c3d
Reviewed-on: https://gerrit.libreoffice.org/33942
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-06 04:38:01 +00: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
2489000d3f loplugin:useuniqueptr extend to check local vars
just the simple and obvious case for now, of a local var being allocated
and deleted inside a single local block, and the delete happening at the
end of the block

Change-Id: I3a7a094da543debdcd2374737c2ecff91d644625
Reviewed-on: https://gerrit.libreoffice.org/33749
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-01 12:15:22 +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
Kohei Yoshida
f2f6d11e35 tdf#102688: let's purge it here just in case...
In theory it would still leak without this if the map mode is set
multiple times.

Change-Id: Ie862f4d59e45b92ff75dffb787ef256337f47f84
Reviewed-on: https://gerrit.libreoffice.org/33602
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
2017-01-27 20:43:51 +00:00
Kohei Yoshida
fab2f546d1 tdf#102688: prevent leaking of VirtualDevice instances.
Change-Id: I6fb8e5b7fc5c0cef8f7ab1f93f5096ad588d57c7
Reviewed-on: https://gerrit.libreoffice.org/33601
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
2017-01-27 04:37:22 +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
Kohei Yoshida
b41186a2fc tdf#103927: Share single standard VirtualDevice instance.
To avoid creating excessive amounts of VirtualDevice instances. Also,
since we now have VclPtr, we shouldn't need this bOwnerOfRefDev flag.

Change-Id: I97a6f553a178b32bc173b83a6716185d126f97e1
Reviewed-on: https://gerrit.libreoffice.org/33508
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
2017-01-26 01:50:46 +00:00
Noel Grandin
fe2164949b teach unusedvariablecheck plugin about SfxPoolItem subclasses
which can all be treated as SAL_WARN_UNUSED

The eehtml.cxx change probably fixes some CJK/CTL bug somewhere

Change-Id: I6852129540f316075aee907971ac19418d71dd9a
2017-01-24 13:19:39 +02: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
Jan-Marek Glogowski
bf110d40ef Change all Idle* LINKs to be Timer*
Seem UBSAN doesn't like my forced reinterpret_cast to set the Idles
Link in the Timer class. Now there are two possible solution:

  1. convert all (DECL|IMPL).*_LINK call sites to use a Timer* or
  2. split the inheritance of Idle from Timer again to maintain
     different Link<>s and move all common code into a TimerBase.

While the 1st is more correct, the 2nd has a better indicator for
Idles. This implements the first solution.

And while at it, this also converts all call sites of SetTimeoutHdl
and SetIdleHdl to SetInvokeHandler and gets rid of some local Link
objects, which are just passed to the SetInvokeHandler call.

It also introduces ClearInvokeHandler() and replaces the respective
call sites of SetInvokeHandler( Link<Timer *, void>() ).

Change-Id: I40c4167b1493997b7f136add4dad2f4ff5504b69
2017-01-23 20:49:05 +01:00
Jochen Nitschke
dd891ec422 cppcheck: memleak (false positive)
but manage ownership from start

Change-Id: Ia9d29cc0e0676173c231c8b68b7681cc1b3dff86
Reviewed-on: https://gerrit.libreoffice.org/33392
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-23 07:27:58 +00:00
Stephan Bergmann
72828a34e7 New loplugin:dynexcspec: Add @throws documentation, editeng
Change-Id: I4d93bf348b7b6a91aa37f8ce79b0b52a1a7d41ee
2017-01-19 18:03:22 +01:00
Noel Grandin
e5634d4e3b use rtl::Reference in AccessibleStaticTextBase_Impl
instead of storing both a raw pointer and an uno::Reference

Change-Id: I03da766787c3ac0273db50b7a79fd7a1d1d7bcbd
2017-01-18 10:59:59 +02:00
Noel Grandin
08d063eefe manage pField with tools::SvRef
since it is a SvRefBase subclass

Change-Id: Ib7d1e22336d673405d7455d40464df29f547d351
2017-01-18 10:59:59 +02:00
Jan-Marek Glogowski
59b84bc78d Change Idle to be a Timer subclass
Drops a lot of duplicated code, as Idle is just a convenience
class for instant, mostly low priority timers.

Change-Id: I847592e92e86d15ab1cab168bf0e667322e48048
2017-01-17 16:22:57 +01:00
Jan-Marek Glogowski
fdc612619c Refactor Scheduler to add Task class
Moves all the "task-specific" stuff into a Task class and just
keeps the "real" static Scheduler functions in the original
Scheduler class.

Change-Id: I9eb02d46e2bcf1abb06af5bab1fa0ee734d1984c
2017-01-17 16:08:47 +01:00
Jan-Marek Glogowski
9e51007039 tdf#97087 GDB pretty print the Scheduler task list
In addition to the GDB pretty printer, this annotates a lot more
Timers and Idles.

Change-Id: I5b93fab02161b23bb753e65ef92643a04fb0789c
2017-01-17 16:08:46 +01:00
Caolán McNamara
2eb035adf7 coverity#1371287 don't need to copy and then overwrite
Change-Id: Ica30e4bed463e8e42cbf54f4b81491149a8de8ab
2017-01-13 13:40:31 +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
Stephan Bergmann
88d0a86014 New loplugin:externvar: editeng
Change-Id: I1668a58f478c63b981c57e68795413f2aab87967
2017-01-09 15:43:44 +01:00
Oliver Specht
048e30c1f8 tdf#101828 handle rtf/richtext correctly
Change-Id: Id894f62a918bd6e6fa59f8d546307343bf2bd4b0
Reviewed-on: https://gerrit.libreoffice.org/32682
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-01-09 00:34:30 +00:00
Michael Stahl
141c27de8a editeng: convert more DBG_ASSERT to assert
Change-Id: I55aa17c9c900f927735d530550d5a660b6c2148a
2017-01-05 13:18:20 +01:00
Michael Stahl
460f2034cf editeng: convert some DBG_ASSERT to assert
Change-Id: Iec89de279adf1c1cea3ecf84380d4b8b820714a4
2017-01-05 13:18:20 +01:00
Jochen Nitschke
a29bd2dabb cleanup tailing backslashes
Change-Id: Idb4bfc97e7d758c58118742affd9a9345c7a99f2
Reviewed-on: https://gerrit.libreoffice.org/32491
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-30 18:48:24 +00:00
Noel Grandin
833e6ca9d2 use std::vector instead of naked array in SfxItemPool
Change-Id: I2d4ac010ff5818e673567cee05700872588918e4
Reviewed-on: https://gerrit.libreoffice.org/32384
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-12-26 18:35:59 +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
Stephan Bergmann
10bf49c18d loplugin:unnecessaryoverride
Change-Id: I24a0e495b64a1db8b7c45f3c68e06ad3301bd9c4
2016-12-16 10:37:26 +01:00
Michael Stahl
5a3b211117 tdf#104488 editeng,svx: throw less Accessible exceptions
For some of these functions it doesn't make sense to throw
DisposedException as they can return a sensible default value.

Particularly AccessibleShape::getAccessibleChildCount() was throwing an
exception that was never caught.

Change-Id: I000149cf9bb0fd13f69650ad8224a8daf26f7bee
2016-12-16 10:20:50 +01:00
Noel Grandin
d15b4e2045 teach sallogareas plugin to catch inconsistencies
Change-Id: I8bcea5ffc74d48148bea78da8c17744e288c069a
Reviewed-on: https://gerrit.libreoffice.org/32004
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-15 06:45:14 +00:00
Noel Grandin
3a705ab405 OSL_TRACE->SAL in avmedia..canvas
Change-Id: Id9077ea29e7028c12f40abfd4c57756c863e3cd9
2016-12-13 08:14:00 +02:00
Noel Grandin
c3586b684c OSL_TRACE->SAL in chart2..oox
Change-Id: I133a6441824bfbefcfcda130119b5c5d706f86b2
Reviewed-on: https://gerrit.libreoffice.org/31907
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-13 06:12:00 +00:00
Julien Nabet
b5ae4ccf46 tdf#104540: AccessibleEventNotifier AccessibleBase (editeng)
See https://bugs.documentfoundation.org/attachment.cgi?id=129537 for bt
For the remind, it follows a replace of OSL_ENSURE by an assert, see:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=8228227168a7eb3ebf14629bec87f01536c23970

Change-Id: Id05eeb6e6669232e9b5cc2ef2989827fef3025d0
Reviewed-on: https://gerrit.libreoffice.org/31918
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2016-12-12 21:40:56 +00:00
Caolán McNamara
510f497f05 coverity#1397045 Unchecked return value
and

coverity#1397044 Unchecked return value

Change-Id: I193bd676e417c35450efa91cb5773c78c998b63f
2016-12-12 09:47:41 +00:00
Khaled Hosny
9db5cfc889 Drop ComplexDisabled flags that does nothing
There is no such thing as simple text layout in this brave new world.

Change-Id: I641b7efa5ec8fdd9839c291e7f2fdb736361ef1e
Reviewed-on: https://gerrit.libreoffice.org/31824
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
2016-12-11 00:26:54 +00:00
Noel Grandin
a66731982e convert SFX_HINT to scoped enum
Notes

(*) In SC, BULK_DATACHANGED was or'ed into the hint id. Replaced with a
dynamic_cast check.

(*) In SC, removed the hint id field from ScIndexHint, no point in
storing the hint id twice

(*) Fold the SfxStyleSheetHintId enum into the new SfxHintId enum, no
point in storing two different hint ids

(*) In some cases, multiple #define's used to map to the same SFX_HINT
value (notably the SFX_HINT_USER* values). I made all of those separate
values.

Change-Id: I990e2fb587335ebc51c9005588c6a44f768d9de5
Reviewed-on: https://gerrit.libreoffice.org/31751
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-08 12:35:09 +00:00
Mike Kaganski
1d74d19a76 Monkey business: Fix typo in comments: et -> ed :)
Change-Id: I91440e8582108b9121ac6525c8ac88ad6f218a60
Reviewed-on: https://gerrit.libreoffice.org/31721
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2016-12-07 11:28:59 +00:00
Jochen Nitschke
dce3d70d26 use initialization list
guess comments in EditSelection ctors were about
calling copy-ctor directly instead of default-ctor + copy assign

Change-Id: I0f849d7e9af3d3b8c6d8688f549b3539a0c67873
Reviewed-on: https://gerrit.libreoffice.org/31632
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-05 19:25:10 +00:00