2625 Commits

Author SHA1 Message Date
Julien Nabet
18be4782ad tdf#105386: crash with macro organizer
bt part:
0  SvTreeList::GetParent (this=0x560670dd2e40, pEntry=pEntry@entry=0x0) at /home/julien/lo/libreoffice/svtools/source/contnr/treelist.cxx:1693
1  0x00007fd90573298c in SvTreeListBox::GetParent (this=this@entry=0x560670dd0d60, pEntry=pEntry@entry=0x0)
    at /home/julien/lo/libreoffice/svtools/source/contnr/treelistbox.cxx:779
2  0x00007fd8dfc3b4d8 in basctl::ExtTreeListBox::NotifyAcceptDrop (this=0x560670dd0d60, pEntry=0x560670e90b20)
    at /home/julien/lo/libreoffice/basctl/source/basicide/moduldlg.cxx:180

Change-Id: I033440c1fcc50e2c7a0bb1eed0efa4559c514126
Reviewed-on: https://gerrit.libreoffice.org/34280
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-02-15 06:07:05 +00:00
Noel Grandin
d198a8221d convert InsertOperation to scoped enum
and drop unused LINK enumerator

Change-Id: I6c42424ae5a7503b3e14e5f04fcf7a49b595b416
2017-02-10 08:08:45 +02: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
3211dbd1b6 loplugin:unusedenumconstants in basctl
drop UNKNOWN constant and convert to scoped enum

Change-Id: Iffeb27193cd0df47c781f2b84144d6f85a6b49e0
Reviewed-on: https://gerrit.libreoffice.org/33888
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-06 05:48:26 +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
83721f4365 makeAny->Any in basctl..chart2
Change-Id: Ief1cdffbfc59ab4e35ac945d020772ff84c50d61
Reviewed-on: https://gerrit.libreoffice.org/33867
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-03 08:50:50 +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
Maxim Monastirsky
f3ba0c5d4d Convert RID_POPUP_TABBAR to xml
Change-Id: Ic4587b8e244c52089692908fe0d10e363b5ed4fb
2017-02-01 01:36:11 +02:00
Caolán McNamara
65f41e210f convert RID_POPUP_BRKPROPS menu to .ui
Change-Id: I2f55f4959249ac45de4a852089256a33e0f24d91
2017-01-30 15:59:57 +00:00
Stephan Bergmann
111d9033b6 Just pass in OUString directly
Change-Id: Iba5289abf96b15e833cb85e96d4e60b2285271be
2017-01-27 17:08:03 +01: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
5145f60cc9 loplugin: unnecessary destructor: basctl..codemaker
Change-Id: Iadcfa9bc4fe9efb8d24d6d6afaf2b9b3def0bc3c
Reviewed-on: https://gerrit.libreoffice.org/33452
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-24 04:59:44 +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
Stephan Bergmann
ff46e53358 New loplugin:dynexcspec: Add @throws documentation, basctl
Change-Id: I34a1b868176f26c1bab841547b97bca56113e47e
2017-01-19 18:03:25 +01:00
Caolán McNamara
484658f9df missed a conversion here
Change-Id: I7c422c9700b960248450181c950394f72504e7ea
2017-01-19 15:13:32 +00: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
Caolán McNamara
74b92741b8 b*, c*: load BitmapEx resources instead of Image ones
Change-Id: Idbf99de17e5349712ef7c3da3ce8bb8b5f879ef7
2017-01-16 11:45:35 +00:00
Markus Mohrhard
ad915fafd5 tdf#104830, need an own termination listener for lib objects
The destruction of the SwDLL object happens already through the normal
termination listener but the other termination listeners might still
depend on it. Also the outstanding events might need the SwDLL instance
to be still around.

This makes the destruction of the instance explicit and at a time when
it should be safe. We should use the same code for calc, impress, math
and base as well.

Change-Id: I50b8f30426f5a4a54e362e748fe962839abca73e
Reviewed-on: https://gerrit.libreoffice.org/32856
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-01-10 13:23:43 +00:00
Stephan Bergmann
1426eb8a9a Clean up a usage of OUStringBuffer
Change-Id: I05205763502fb20e056cc80f50a37b93232e5743
2017-01-06 09:38:06 +01:00
Stephan Bergmann
c03d803a72 Replace side-effect--only uses of makeStringAndClear() with setLength(0)
Change-Id: Iaf8011f1bd6a10b324653899b7f51458f7d0b68a
2017-01-05 13:52:17 +01:00
Markus Mohrhard
2be139d76b tdf#105069, store the VBA module info for new modules as well
This was never a problem until we started to export the VBA stream
instead of just writing back the imported stream.

Change-Id: I4e20e717bebd3dc649efcf1b9c18b6e5053303d9
Reviewed-on: https://gerrit.libreoffice.org/32741
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-01-05 01:10:36 +00:00
Regina Henschel
2ab040f5ed tdf#105005 Breakpoint has wrong image in BASIC IDE
Breakpoint, inactive breakpoint, step marker and error marker
have got wrong images in 96d0506fceb8064c5ae156dfaf12d5b45623c557

Change-Id: I7c03595dfa41e03b5b4a23d36c514a6c782281a3
Reviewed-on: https://gerrit.libreoffice.org/32590
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-01-02 14:48:38 +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
Caolán McNamara
8ae20343bb make IOS hack a DISABLE_DYNLOADING hack and extend for basctl+starmath
Change-Id: I07057dec477051ddc96600f467ffbb0c8bd1da5f
Reviewed-on: https://gerrit.libreoffice.org/32144
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-12-19 08:53:21 +00:00
Caolán McNamara
96d0506fce unwind RID_IMGLST_LAYOUT imagelist
Change-Id: I17146905c93162977effe9179c844ba691320d35
2016-12-12 12:33:31 +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
Noel Grandin
2d48f5fc0a convert VCLEVENT constants to scoped enum
Change-Id: Ic8ccb0a9715ec05182dacddab2c015b0de6a0fba
Reviewed-on: https://gerrit.libreoffice.org/31675
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-07 07:10:39 +00:00
Noel Grandin
bfde4866e0 convert DecodeMechanism to scoped enum
Change-Id: I5c56634b1bca8e37fa73d02d2428645301b6c547
2016-12-05 12:49:02 +02:00
Noel Grandin
803215142e convert INetURLObject::EncodeMechanism to scoped enum
Change-Id: I50ea17c7779c7b5cacddf548f1773fd7d6c8bade
2016-12-05 12:49:02 +02:00
Niklas Johansson
1453bc4ab3 tdf#93592 Make it possible to add default language resource to dialogeditor
During the conversion of uno services a few lines where removed that
probably should not have been removed. This caused the dialog editor
to crash if you tried to add a new language resource to a document
fdo#93077. The fix for that bug fixed the crash but also made it
imposible to add a language resource to a dialog that isn't previously
translated.

With this patch the functionality should be back on track, adding/removing
language resources without problems at least as far as my testing goes.

Change-Id: Ie6e083837894a219bf8e9c75dec6bf7652d51615
Reviewed-on: https://gerrit.libreoffice.org/30462
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-12-02 09:07:35 +00:00
Pierre Lepage
0d9a7d03e3 tdf#96717: The macro name desired by the user is now took into account.
Change-Id: I3949ffed6dcf85e01bc5fc24a27a04265e54fe44
Reviewed-on: https://gerrit.libreoffice.org/30592
Reviewed-by: jan iversen <jani@documentfoundation.org>
Tested-by: jan iversen <jani@documentfoundation.org>
2016-11-29 18:01:45 +00:00
Noel Grandin
e6ffb539ee loplugin:vclwidgets check for assigning from VclPt<T> to T*
Inspired by a recent bug report where we were assigning the result
of VclPtr<T>::Create to a raw pointer.

As a consequence, we also need to change various methods that were
returning newly created Window subclasses via raw pointer, to
instead return those via VclPtr

Change-Id: I8118e0195a5b2b4780e646cfb0e151692e54ae2b
Reviewed-on: https://gerrit.libreoffice.org/31318
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-29 06:45:42 +00:00
Michael Stahl
6bb20609a2 vcl: rename Window::Notify to EventNotify
There is annoying overloading between Window::Notify and
SfxListener::Notify, and the Window one has apparently fewer
implementations, so rename that and remove lots of disambiguating
"using Notify" in multiply inheriting classes.

Change-Id: I8b597fd9e70cf2e7103b9dfa7cc666e79e7aff49
2016-11-24 22:56:34 +01:00
Caolán McNamara
6f71fa11c0 vcl makes no use of menu Get/Set DefaultItem
this is exposed through uno however, so move it into VCLXMenu to continue to
support it doing nothing of great value there

Change-Id: I6888e61cbec85faa2d1fcca8731ab42023e594c6
2016-11-24 14:56:13 +00:00
Noel Grandin
04a84913ea use o3tl::typed_flags in ConfigurationListener::ConfigurationChanged
Change-Id: I0ad7c02953aa53168dc242f1f374ab871728c84e
2016-11-24 11:27:51 +02:00
Noel Grandin
06dd5b9c9e convert SbDEBUG constants to o3tl::typed_flags
Change-Id: Ifcada5684bacae46ec90c5ce3e58980860fee29f
2016-11-24 08:05:55 +02:00
Stephan Bergmann
5d06df27ad loplugin:unnecessaryoverride (dtors) in basctl
Change-Id: Ib2754450cd7caa2675b872c8c9f3d41cec950770
2016-11-23 18:36:45 +01:00
Noel Grandin
beb8cfcf32 convert inventorId to scoped enum
SW_DRAWLAYER had the same value as SC_DRAWLAYER, so I merged it into the
ScOrSwDraw enum constant

Change-Id: I5c45d378c00364d11cc960c9e48a6e3f10928724
Reviewed-on: https://gerrit.libreoffice.org/31037
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-21 12:09:09 +00:00
Mike Kaganski
450762b224 tdf#68118: Pass current document frame to SvxScriptSelectorDialog
... through MacroChooser
Without this, current document's macros library is unavailable in
"Assign" dialog

Change-Id: I83baa3b98858260eab61e8f4fefde3f9979c6d83
Reviewed-on: https://gerrit.libreoffice.org/30600
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-11-14 08:56:42 +00:00
Caolán McNamara
aa3f954222 coverity#703927 Unchecked return value
make these less odd and simply return the thing they selected, rather than a
bool that indicates that the rpObj arg was successfully set to non-null, so
there's one flag to check not two which both mean the same thing.

Change-Id: If70e412f98dea8b7114fb77f26a9c59aab93be50
Reviewed-on: https://gerrit.libreoffice.org/30794
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-11-14 08:52:21 +00:00
Noel Grandin
f31d98f63c loplugin:expandablemethods in avmedia..canvas
Change-Id: Ic230f1ef6b1dbe796ac7862a1a7e6a718f9e4e54
Reviewed-on: https://gerrit.libreoffice.org/30753
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-11 07:00:18 +00:00
Noel Grandin
78b4a1fb01 update vclwidget loplugin to find ref-dropping assigment
Look for places where we are accidentally assigning a returned-by-value
VclPtr<T> to a T*, which generally ends up in a use-after-free.

Change-Id: I4f361eaca88820cdb7aa3b8340212db61580fdd9
Reviewed-on: https://gerrit.libreoffice.org/30749
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-11 06:55:41 +00:00
Noel Grandin
f606a6b248 loplugin:unnecessaryvirtual in basctl..chart2
Change-Id: Id4eeb12792c3a66b68a907cb459ab437e3d64e4c
Reviewed-on: https://gerrit.libreoffice.org/30680
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-08 08:57:05 +00:00
Noel Grandin
8955c3fde6 loplugin:oncevar
Change-Id: I44fb6858eeff14fcbd9fdfbbb0aabd1433b6a27d
Reviewed-on: https://gerrit.libreoffice.org/30668
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-08 06:11:51 +00:00
melikeyurtoglu
10197c094b tdf#91222 VclBuilder constructor cleanup
Change-Id: Ief4a9dfc0e0a2dad04c3ac9f1840b823fd9357de
Signed-off-by: melikeyurtoglu <aysemelikeyurtoglu@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/30507
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-03 06:36:27 +00:00
Takeshi Abe
cb90f0976d Omit the default comparator
Change-Id: Idea8ea8dab6a86d7be6394aef1cf7f25b75009e0
Reviewed-on: https://gerrit.libreoffice.org/30319
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-11-01 04:11:44 +00:00
Takeshi Abe
799a3a7915 tdf#103209 Apply application color settings to Basic IDE
This makes the text and background colors in the editor window
follow the custom colors "Font color" and "Document background"
respectively in Options > LibreOffice > Applications Colors.

... for those who think BASIC looks cooler when written in green
text on black background.

Change-Id: I82647865f7c2915341249c2fd5ebc9bd8d617bd1
Reviewed-on: https://gerrit.libreoffice.org/29815
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
Tested-by: jan iversen <jani@documentfoundation.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-10-25 11:27:03 +00:00
Noel Grandin
f019ee7cf9 loplugin:expandablemethodds in basctl..chart2
Change-Id: I96f565a974fe3e316ae2ab04f8731b8bbfb87993
Reviewed-on: https://gerrit.libreoffice.org/29998
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-19 08:07:04 +00:00
Noel Grandin
292560a957 loplugin:unusedmethods
Change-Id: Icf773925c37dde8b7404edac9864e7b10fe113b4
Reviewed-on: https://gerrit.libreoffice.org/29968
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-18 06:15:55 +00:00