3868 Commits

Author SHA1 Message Date
Noel Grandin
8c00536d87 Convert WindowType to scoped enum
Change-Id: I85cfe02f28729e13f2c0dd3d91cd89e6f3e3b6a9
Reviewed-on: https://gerrit.libreoffice.org/34219
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-14 10:44:08 +00: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
8aff36d87f Various typos about property
Change-Id: I7585a1346fb19a886240db8dd393554efee862cc
Reviewed-on: https://gerrit.libreoffice.org/34174
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-02-12 16:06:46 +00: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
Noel Grandin
aef704d807 convert SvtSaveOptions::EOption to scoped enum
and remove unused
E_SAVEUNPACKED, E_USESHA1INODF12, E_USEBLOWFISHINODF12
enumerators

Change-Id: I7c384e0c30af5091a22beeda1c77e4b71fdde55e
2017-02-10 08:08:45 +02:00
Noel Grandin
a4d0ec84da convert SvtSecurityOptions::EOption to scoped enum
and drop unused E_MACRO_DISABLE enumerator

Change-Id: I0bd706d4d4e1d8b9004e68c9e77c11410c62a64a
Reviewed-on: https://gerrit.libreoffice.org/34067
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-10 06:05:54 +00:00
Noel Grandin
29eb1ceeae convert SvtSysLocaleOptions::EOption to scoped enum
and drop unused E_UILOCALE enumerator

Change-Id: Ic9bdac91fab15af45e7dbd613e6e44b73b5cf9de
Reviewed-on: https://gerrit.libreoffice.org/34066
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-10 06:05:32 +00:00
Michael Stahl
d22377ab55 tdf#98993 cui: Paragraph dialog: decimals in Line Spacing spinbox
For whatever reason, this also makes the +/- buttons increment by 1pt
instead of the previous 10pt, which is also an improvement.

(presumably regression from 324141f21bf2280d7613c4056ee8cd997ea345f9)

Change-Id: If47dd768b2faea760d9967a73453d3f714c65fe3
2017-02-09 23:07:40 +01: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
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
c9c3cb5446 loplugin:unusedenumconstants in connectivity..cui
Convert ExpressionFunct to scoped enum and drop FUNC_CONST value.
Convert MQueryExpressionBase::node_type to scoped enum and drop Unknown
value.
Dop PageType::Color value

Change-Id: Icb1f5503c230fb91329acc7d9e1da665fa28d95e
Reviewed-on: https://gerrit.libreoffice.org/33948
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-06 09:13:25 +00:00
Matteo Casalin
c6f32df907 sal_uIntPtr to sal_uInt16
Change-Id: If463ae457f53a0a8b12cc0748afbc654f54ae3c3
2017-02-05 21:44:49 +01:00
Julien Nabet
b4fe924e17 Typo: progess->progress
Change-Id: Ic13529f4bc9ac49059a59067c50d5f2c0f569822
Reviewed-on: https://gerrit.libreoffice.org/33902
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-02-03 21:10:43 +00:00
Noel Grandin
f4826959c1 new loplugin:unusedenumconstants
These are the simple removals, where it is obviously safe,
the more complex ones will come in separate commits

Change-Id: I7211945a6a5576354b60d9c709940ce9b674f308
Reviewed-on: https://gerrit.libreoffice.org/33828
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-03 08:59:39 +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
Tor Lillqvist
a5c20f649d Need <config_features.h> here, too
Change-Id: I8bd752814994fedac17fe0d002b415902c276b20
2017-02-01 16:21:54 +02: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
Caolán McNamara
4bd53cd880 Resolves: tdf#100438 focus trapped in disabled toolbar
lets just leave the toolbar active the whole time, seems
to make more sense anyway wrt being allowed to keyboard
into it to paste/insert special character

Change-Id: I174fb707c4c7fd21d95461cc93323eb6d8970818
2017-02-01 10:30:25 +00:00
Noel Grandin
dce867e8c4 loplugin:stringconstant handle calls to constructors with one arg
Change-Id: Ide9148a908bef46ba14640dfa6f556beaf6e3f60
Reviewed-on: https://gerrit.libreoffice.org/33772
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-01 07:57:16 +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
Caolán McNamara
4649a2c6b3 convert toolbar config context menu to .ui
Change-Id: I8f8a9517680f02cb8efa3e6e46d3d4ebf7da1510
2017-01-30 20:58:20 +00:00
Caolán McNamara
cfdfe1be91 crash on exit from undisposed insert special character dialog
right click on style combobox in writer toolbar, insert character, esc,
ctrl+f4 and crash

Change-Id: I83c88584c6d772bf629121a2bcdc16076bee8003
2017-01-30 14:48:18 +00:00
Arnold Dumas
c7e1c9dc63 tdf#103654: Make git hash clickable in the About dialog
This doesn't affect the About Dialog if the build id is not
a valid git hash.

Change-Id: Ie44f455dbfd0191cf6953091f28a42bccb67a4cb
Reviewed-on: https://gerrit.libreoffice.org/33652
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2017-01-30 09:46:58 +00:00
Jochen Nitschke
70dee11c2e use a define for invalid SfxPoolItem
and use helper function IsInvalidItem() more

Change-Id: Ifd651a336a7bd4ef4f945219d765afb827465438
Reviewed-on: https://gerrit.libreoffice.org/33611
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-01-27 15:58:28 +00:00
Vitaliy Anderson
91ccb4dbf7 Compatibility options refactoring. Part 1
It relate to reduce the nubmer of copy-paste the same code
and simplify adding compability options.
Also using enum class instead enum can eliminate to occurrence
an error relate to access to out of range an array.

Change-Id: I07b862aac5f88da4a98e2273cb14daa09e70eacb
Reviewed-on: https://gerrit.libreoffice.org/33543
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-27 07:35:47 +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
Caolán McNamara
e9c17354d3 move Image ctor variant with mask color to callers
Change-Id: I81a52aeb855edca823881360831b26e252780053
2017-01-25 16:56:08 +00:00
Caolán McNamara
e2eaaa8a57 Resolves: tdf#104552 table properties dialog drops previous border color
Change-Id: Ie39ea17fe56cc88efc65f6916aaeb1bd1b77c51f
2017-01-24 16:12:08 +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
Noel Grandin
a90a4810ae loplugin: unnecessary destructor: comphelper..desktop
Change-Id: I9df4cb6a4b1734dac6141d6b0ee7a09e3e05f92e
Reviewed-on: https://gerrit.libreoffice.org/33453
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-01-23 16:59:48 +00:00
Caolán McNamara
c17b739bad coverity#704601 Dereference after null check
Change-Id: Icfef8f4ded311790a90b61b37c08254592d979ab
2017-01-21 17:05:43 +00:00
Caolán McNamara
bf48d61f87 coverity#704602 Dereference after null check
Change-Id: I069716ad675a217ecd97aee6b07346cf838fd653
2017-01-21 17:05:43 +00:00
Caolán McNamara
bda662488c coverity#1399015 Logically dead code
Change-Id: I4d5e2c7d2bbd4eba3eeb790d51a4a93c7ef40577
2017-01-21 17:05:25 +00:00
Caolán McNamara
0b90c4a285 fix build
Change-Id: I501edaf90794df2ba776241e73c8b844e205ca3c
2017-01-21 17:03:21 +00:00
Caolán McNamara
370613e591 warn about unused Images
Change-Id: I5502b28411282354019af51a09c860099c652006
Reviewed-on: https://gerrit.libreoffice.org/33348
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-01-20 18:56:09 +00:00
Caolán McNamara
e2805decab restore missing RID_SVXBMP_LOCK graphic
wrong removed by

commit fa3d5ca1f99fe253689004a45ec2888ebbe85fd3
Author: abdulmajeed ahmed <aalabdulrazzaq@kacst.edu.sa>
Date:   Thu May 30 12:33:32 2013 +0200

    Convert Languages tab page to .ui

    Deleted the readonly images too,it was not used any where else and was just confusing.

Change-Id: Ice8e59cffc3b3001216c7499da5cbefe74ce8d88
2017-01-20 10:11:51 +00:00
Stephan Bergmann
d770875770 New loplugin:dynexcspec: Add @throws documentation, cui
Change-Id: Ib4db87e67f39504f49b795e12476edbea5166800
2017-01-19 18:03:23 +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
Muhammet Kara
ce0f9962d1 tdf#105014: Disable related buttons when there is no menu to edit
Clicking the "Add Separator" or the "Add Submenu" button, when there is
no menu edit, causes LibreOffice to crash. So disable them properly.

Change-Id: Ibf685145a87c9e4343d83e1bb5ef6f08136c8f31
Reviewed-on: https://gerrit.libreoffice.org/32987
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2017-01-17 13:08:15 +00:00
Maxim Monastirsky
535f2b2b0a Convert RID_MENU_NOTEBOOKBAR to xml
Brings a lot of features (icons, keyboard shortcuts,
customization, context menu interception etc.)

Other changes:

- Make SfxDispatcher::ExecutePopup take PopupMenuFlags
  arg, to be able to pass NoMouseUpClose, so that the
  menu won't close on mouse-up under anything != gtk3.
- Make .uno:OpenFromWriter and .uno:OpenFromCalc async
  slots, to avoid crash under gtk3 when recycling the
  current frame.
- Don't show the menu in customization dialog, if
  experimental mode disabled.

Change-Id: Ieea2f73f6b48fbaf4bdfc4acf1a33d25422357cb
Reviewed-on: https://gerrit.libreoffice.org/33101
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2017-01-16 13:07:58 +00:00
Caolán McNamara
1c7e010fa4 SfxConfigGroupListBox leaks its resource container
Change-Id: I02cf44bdc9032fdba9237083ef08da71b817e3af
2017-01-16 11:45:38 +00:00
Caolán McNamara
4dd0f57bcd drop an unused resource
Change-Id: I062859bf5c03f2bf1ad7306b0ce2ab4164eae3bf
2017-01-16 11:45:38 +00:00
Caolán McNamara
02975b8ff9 unwind resource
Change-Id: I7a951548204745035bd69e4311e5fa1fe91b2d32
2017-01-16 11:45:37 +00:00
Caolán McNamara
8dda567746 drop unused define
Change-Id: I2c3bd011f91e79d3aed43a78e54f149f19909cc3
2017-01-16 11:45:36 +00:00
Caolán McNamara
74b92741b8 b*, c*: load BitmapEx resources instead of Image ones
Change-Id: Idbf99de17e5349712ef7c3da3ce8bb8b5f879ef7
2017-01-16 11:45:35 +00:00
Noel Grandin
4883355c31 new loplugin: useuniqueptr: cui
Change-Id: I9a72b0d3ca999e2f84c615515fafa90bc7f8f2b6
Reviewed-on: https://gerrit.libreoffice.org/33150
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-16 08:55:56 +00:00
Caolán McNamara
6faba77920 these bitmaps all have alpha channels, not replaceable magenta hack
Change-Id: I5e4a433262f17cf4b7e7966687561202960bafa4
2017-01-14 14:35:19 +00:00
Tomaž Vajngerl
e6d7d73752 tdf#105259 calculate sizes of all area tab pages on construction
When we open dialog that contains the area tab, we need to
calculate the size of area tab pages (that are triggered by
clicking on a button) and set the page area to the appropriate
combined size. Otherwise we don't account for the needed space
correctly and some page will be squished or have overlapping
controls.

This change creates all pages at dialog construction, gets
all the optimal sizes and sets the size of the page container box
to the combined (minimal) size.

Change-Id: Ie04a121810b96973f6e4502a52af675b2baacf25
Reviewed-on: https://gerrit.libreoffice.org/33040
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2017-01-13 13:05:31 +00:00