2409 Commits

Author SHA1 Message Date
Andrea Gelmini
3063d55b8b Fix typos
Change-Id: I338dacd3cfe915714a9038e1dea4a60d586e9394
Reviewed-on: https://gerrit.libreoffice.org/34806
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-03 07:05:43 +00:00
Noel Grandin
afa675469c use SvxExtNumType in SvxNumberType
and follow the rabbit trail, fixing various other types in the process

Change-Id: I8fc7df3b585df21578ffb28fdd7e5e427b3bfd9d
Reviewed-on: https://gerrit.libreoffice.org/34814
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-03 06:45:05 +00:00
Noel Grandin
f091259ad2 convert SfxEnumItem to type-safe template class
and drop the SvxChartTextOrientItem class, unused.

Change-Id: I99100837d1beb953450f57b2cda47d165df1620c
Reviewed-on: https://gerrit.libreoffice.org/34747
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-03 06:44:41 +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
Noel Grandin
198c41c4fe new loplugin unoany
Change-Id: I5d6c4a67cb2a09e7cd5bd620c6b262d188701b89
Reviewed-on: https://gerrit.libreoffice.org/34714
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-28 10:17:47 +00:00
Caolán McNamara
71a84b69ae Resolves: tdf#106123 store and restore the PaM around the menu Execute
because the loss of focus in the current editeng causes writer annotations to
save their contents, making the pContent of the current EditMaps invalid

Change-Id: Ic01379291fa66dd58246d33287b18801f5da49c0
2017-02-24 13:58:48 +00:00
Marco Cecchetti
288d694ff6 LOK - Calc: Text is not visible in cell when entering numerical input
Problem
The issue occurs when you double click and enter a numerical input in
a cell which belongs to one of the front colums.

Findings
After a bit of investigation I detected that the problem shows up when
the spreedsheet width is increased by invoking
ScViewData::SetMaxTiledCol.
Indeed the problem occurs whenever the spreadsheet width is larger
than 2^16 twips.

Solution
By changing the type of some variables from sal_uInt16 to long in all
involved contexts, the problem disappeared.

Change-Id: Ia6c6c258b0644f03c897e7b4bcaded967f21537c
Reviewed-on: https://gerrit.libreoffice.org/34597
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2017-02-24 10:25:22 +00:00
Stephan Bergmann
f407666ec9 loplugin:subtlezeroinit: editeng
Change-Id: I2fb3700f00ad76096d048747c8333337d5ffce8f
2017-02-21 07:35:07 +01:00
Jochen Nitschke
673dddaf9d this can't be nullptr
Change-Id: I33a18fe4c03a921e834ac6ea4234ddaf42a390e2
Reviewed-on: https://gerrit.libreoffice.org/34435
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-20 06:02:14 +00:00
Justin Luth
a189b27ebe revert tdf#101815 editeng SetMustRepaint when InsertText
It wasn't targetted enough at the specific problem, and caused paint
problems. This fixes tdf#106056.

Change-Id: I2d87bc78627a558c62cb0efc24e49c7656662976
Reviewed-on: https://gerrit.libreoffice.org/34403
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
2017-02-18 16:26:57 +00: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
Caolán McNamara
5d6a605a69 convert editeng spell menu to .ui format
Change-Id: Iaae8e6d6ee3c9cafad343fefb4f357b080df3a08
2017-02-17 15:34:09 +00:00
Noel Grandin
fd2ffceefc convert EESpellState to scoped enum
and drop unused EE_SPELL_NOLANGUAGE enumerator

Change-Id: I74a5f89335883a13d77b39f78b7de55bddb1f107
2017-02-16 12:44:34 +02:00
Noel Grandin
4e19742382 convert EditEngineAttribs to scoped enum
and drop unused EditEngineAttribs_HardAndPara enumerator

Change-Id: Ic1fcddc6adeb5317f96bcef9b6f715b26d901a8d
2017-02-16 12:42:04 +02:00
Noel Grandin
1c3de19e98 remove unused NONE from ScrollRangeCheck enum
Change-Id: I9d83cc38a9fa477a61ec7e2ec3d9786318187085
2017-02-16 12:42:04 +02:00
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