Commit Graph

1720 Commits

Author SHA1 Message Date
d3cd290491 coverity#1233508 Uncaught exception
Change-Id: Ia77a94a486b8e5203617eb00cb5189359798482f
2014-09-02 12:14:46 +01:00
37b9ea92ba convert SBX flag bits to type-safe enum
Change-Id: I18d5d6a27f06ee60a5cb3dc393bf05b51bba4817
Reviewed-on: https://gerrit.libreoffice.org/11070
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-08-26 04:30:03 -05:00
30ae83c268 fdo#82577: Handle KeyCode
Put the VCL KeyCode class in the vcl namespace. Avoids clash with the X11
KeyCode typedef.

Change-Id: I624c9d937f7c5f5986d313b6c5f060bd8bb7e028
2014-08-23 22:33:30 +03:00
a107bdfdfc ErrorBox->MessageDialog
Change-Id: I57d4e43460e40d3aff54873280eddbb18c12446b
2014-08-18 10:57:21 +01:00
ae7ca8b957 fdo#46037: remove unused comphelper/configurationhelper.hxx
Change-Id: I66f9d2912202ba1393d0c65189f8a945bca4fcaa
Reviewed-on: https://gerrit.libreoffice.org/10603
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2014-07-29 15:40:41 +00:00
ea5ef0a72e Drop unused #includes
Change-Id: I77ca957204bacee95e32a7f2a54c9311002aeef9
2014-07-24 01:06:15 +09:00
e1840cf944 Resolves fdo#80906: Delete any control on Dialog editing window crashes LO
Quick fix for this bt:
3  0x00002aaaab2935d2 in __GI___assert_fail (assertion=0x2aaae1f2806a "_pInterface != 0",
    file=0x2aaae1f28018 "/home/julien/compile-libreoffice/libreoffice/include/com/sun/star/uno/Reference.h", line=402,
    function=0x2aaae1f28480 <com::sun::uno::Reference<com::sun::resource::XStringResourceManager>::operator->() const::__PRETTY_FUNCTION__> "interface_type* com::sun::uno::Reference< <template-parameter-1-1> >::operator->() const [with interface_type = com::sun::resource::XStringResourceManager]") at assert.c:101
4  0x00002aaae1e2963b in com::sun::uno::Reference<com::sun::resource::XStringResourceManager>::operator-> (this=0x7fffffff2d00)
    at /home/julien/compile-libreoffice/libreoffice/include/com/sun/star/uno/Reference.h:402
5  0x00002aaae1eb5c87 in basctl::LocalizationMgr::implHandleControlResourceProperties (aControlAny=
    uno::Any {<com::sun::uno::XInterface> = {_vptr.XInterface = 0x8935ea8}, <No data fields>}, aDialogName="Dialog1", aCtrlName="TextField1",
    xStringResourceManager=empty uno::Reference, xSourceStringResolver=empty uno::Reference, eMode=basctl::LocalizationMgr::REMOVE_IDS_FROM_RESOURCE)
    at /home/julien/compile-libreoffice/libreoffice/basctl/source/basicide/localizationmgr.cxx:202
6  0x00002aaae1eb92a0 in basctl::LocalizationMgr::deleteControlResourceIDsForDeletedEditorObject (pEditor=0x919d820, aControlAny=
    uno::Any {<com::sun::uno::XInterface> = {_vptr.XInterface = 0x8935ea8}, <No data fields>}, aCtrlName="TextField1")
    at /home/julien/compile-libreoffice/libreoffice/basctl/source/basicide/localizationmgr.cxx:896
Indeed, LocalizationMgr::setControlResourceIDsForNewEditorObject just returns if !xStringResourceManager.is()
So let's do the same when trying to delete ControlResources
See http://opengrok.libreoffice.org/xref/core/basctl/source/basicide/localizationmgr.cxx#835

Change-Id: I4be49503cd2464f97a25840dfdc29877e5fb2b93
2014-07-21 23:32:12 +02:00
dac4ca5f68 new loplugin: externalandnotdefined
Find "missing headers," where a function is declared directly in the
.cxx (as extern) and not defined, and should arguably instead be declared
in an include file.

Change-Id: I6d83ee432b2ab0cd050aec2b27c3658d32ac02a2
2014-07-11 14:12:25 +02:00
4228f08d60 use assert when followed by deref
Change-Id: I8405e4d8f9fa1de3ef6ee474321b4ac2b4ce1624
2014-07-03 12:49:38 +01:00
5ace3f3b4f clang scan-build: various warnings
Change-Id: I4bdfb074b3cf6fcb49765322308dfa4b9ed67713
2014-07-01 10:56:14 +01:00
d92aa2f445 remove SFX_APP() macro that was a mer wrapper for SfxGetApp()
Change-Id: I480a789c767dd671775c9d70d96bf71908f21f5b
2014-06-27 17:08:04 +02:00
3e82897353 improve the inlinesimplememberfunctions clang plugin
Change-Id: I6d5a952901648e01904ef5c37f953c517304d31e
2014-06-17 10:55:17 +02:00
0e44fb66e5 loplugin:staticcall
Change-Id: Ida2e09b88c9df0d70c8298020d768e6386714edd
2014-06-13 17:54:22 +02:00
9a1298cf86 coverity#1213488 Uncaught exception
Change-Id: Iee4e5dd2936979a9bcb8bd5db781e51551270a7f
2014-06-13 09:50:53 +01:00
184a00b962 loplugin: inlinesimplememberfunctions
Change-Id: I42119f656ca528286fb25d2d36c0af54b7d04a6b
2014-06-09 10:10:13 +02:00
0e507ae031 various: remove SAL_THROW macro
Change-Id: I9464179a736b91f5bc32eb5e5e89b3b4e3da3494
2014-06-05 08:17:52 +02:00
b32ee04731 Avoid possible memory leaks in case of exceptions
Change-Id: I1988d2766d8bdeb5f8a22a5673dcff9b898dd637
2014-05-31 22:30:40 +09:00
92b447876d css already means ::com::sun::star
Change-Id: I48d7b746d7cc49246743c62480b0d225d2519342
2014-05-27 14:00:28 +02:00
e7bc3cab01 remove boilerplate in UNO Exception constructor calls
Now that we have default values for Exception constructor params,
remove lots of boilerplate code.

Change-Id: I620bd641eecfed38e6123873b3b94aaf47922e74
2014-05-23 15:06:00 +02:00
b09b5f8f7c Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part19
Change-Id: Iab50c52a132c90389992ef68c2d31df95a193ab9
2014-05-22 23:21:18 +02:00
7aa79223d7 bnc#467278: Introduce a warning that changes to VBA macros cannot be saved.
As an InfoBar, so hopefully not annoying...

Change-Id: I5d4e79273edc03829fdab2d6d5a291576c954e4b
2014-05-22 17:31:27 +02:00
c9f3c508bb Resolves: #i76558# jump by Enter key on the Object catalog
(cherry picked from commit 7bc75c1a7b05d81631ebccf05bf022636d1a3a14)

Conflicts:
	basctl/source/basicide/objdlg.cxx
	basctl/source/basicide/objdlg.hxx

Change-Id: Id3fa3686fd60df192c02cc8137c9bc59e68c1d49
2014-05-19 08:57:45 +01:00
70895b691e remove legacy svheader.hxx
none of the corresponding headers is included...

Change-Id: I85061dc159ace0fd727e3d32e52b14c123690584
2014-05-15 17:47:39 +02:00
248145f99e Find places where uno::Sequence is passed by value.
Implement a clang plugin to find them, and clean up existing code
to pass them by reference.

Change-Id: If642d87407c73346d9c0164b9fc77c5c3c4354b8
Reviewed-on: https://gerrit.libreoffice.org/9351
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-05-14 08:10:22 +00:00
13c01aac25 coverity#1209811 Dereference before null check
Change-Id: I7e3778e5203438bc5db942c813a03896d7df895b
2014-05-09 09:43:15 +01:00
148b9a23fa coverity#1209554 Explicit null dereferenced
Change-Id: Iacf4373221b93a97e030b09501cc91589f2fdff7
2014-05-07 15:47:24 +01:00
4f9b21248f simplify ternary conditions "xxx ? yyy : false"
Look for code like:
   xxx ? yyy : false;
Which can be simplified to:
   xxx && yyy

Change-Id: Ia33c0e452aa28af3f0658a5382895aaad0246b4d
2014-05-05 12:47:48 +02:00
883481fd20 Improve TabBar return types
DeactivatePage() goes from returning long to returning bool.
StartRenaming goes from returning long to returning bool.
AllowRenaming goes from returning long to returning a
constant from a new enum.

Change-Id: Ib87e8d7ceb4e23846547257b358ca4dfd41eb6ca
Reviewed-on: https://gerrit.libreoffice.org/9161
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-04-28 11:37:37 +00:00
7f49f4227b coverity#736992 Uncaught exception
Change-Id: Ia074dc867cc068fccb2d4eb613d04b945b8711e7
2014-04-25 20:19:11 +01:00
2d4c90e82e coverity#736990 Uncaught exception
Change-Id: I3b7f4c732a5a3369c05c75ede1580b32837be671
2014-04-25 20:19:11 +01:00
702f9c5176 huge hrc and src file cleanup
* mostly fallout from ui conversion
* some completely unused defines from src files
* lots of unused HID ids

Change-Id: I976561205798db3d06ee139de6223f638e58f47a
Reviewed-on: https://gerrit.libreoffice.org/9142
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
2014-04-23 22:49:57 +00:00
5973c2d34a fixincludeguards.sh: basctl 2014-04-19 11:10:07 +02:00
29d5ce2d88 sfx2: Move InitInterface_Impl() out of SFX_DECL_INTERFACE too.
Change-Id: Ib737e0d1b5888986b308aa60d4140f65e4e90243
2014-04-18 22:51:06 +02:00
b731d71c67 sfx2: Move InitInterface_Impl() method out of SFX_IMPL_INTERFACE.
SFX_IMPL_INTERFACE previously looked like a function; where in fact it is
several methods defined at once, and only the last one has a body.

This is extremely confusing and hard to read; let's kill that nonsense.

Change-Id: Ia4ae22eb58b1260c9c827c894f5345693bad49e7
2014-04-18 22:51:06 +02:00
8c3ab6093a sfx2: Kill SFX_STATUSBAR_REGISTRATION macro.
Change-Id: Iff0ffdb955892117a767e1f31c1f854a93feb560
2014-04-18 22:51:06 +02:00
72d8c94dfa sfx2: Kill SFX_FEATURED_CHILDWINDOW_REGISTRATION macro.
Change-Id: I9bf1c2404eeb6c59525061157e91b8777f2da540
2014-04-18 22:51:05 +02:00
f4d61eca61 sfx2: Kill SFX_CHILDWINDOW_REGISTRATION macro.
Change-Id: Icd56e0cee1ce0283e8a1cbaafc81ecca25469185
2014-04-18 22:51:04 +02:00
9f83ea4bc6 sfx2: Kill SFX_POPUPMENU_REGISTRATION macro.
Change-Id: Ie68ccbe5874ec7c7e1bb73cb2937e06bb4910cd0
2014-04-18 22:49:27 +02:00
0424163d03 no temporary instance of SvtLanguageTable necessary here
Change-Id: Iabb3aadf35eb6b3575d916f2400f606264572537
2014-04-17 23:15:02 +02:00
23dc4e1a00 basctl: sal_Bool->bool
Change-Id: I85e1e94557a238f629151d9ce46a502efed3696d
2014-04-15 15:23:28 +02:00
380d4600d7 use TriState instead of sal_Bool as there's three possibilities
Change-Id: If24d4cec9ef4369f20419fe70de7392614a35316
2014-04-08 09:18:33 +01:00
362d4f0cd4 Explicitly mark overriding destructors as "virtual"
It appears that the C++ standard allows overriding destructors to be marked
"override," but at least some MSVC versions complain about it, so at least make
sure such destructors are explicitly marked "virtual."

Change-Id: I0e1cafa7584fd16ebdce61f569eae2373a71b0a1
2014-04-01 19:22:54 +02:00
6ef2df7b9b Remove remaining DBG_NAME* uses
...that had been used for DBG_CTOR, DBG_PROF, etc.

Change-Id: I8eac38e24b7110511feb7813aaf5a20ab82bdbe0
2014-03-28 17:26:09 +01:00
1714f4d3e8 Remove remaining DBG_CTOR etc. remnants from basctl
Change-Id: I383021580f69ac51ca65f3464bf863b800ccd931
2014-03-28 15:02:18 +01:00
567ef6d578 Second batch of adding SAL_OVERRIDE to overriding function declarations
...mostly done with a rewriting Clang plugin, with just some manual tweaking
necessary to fix poor macro usage.

Change-Id: Ie656f9d653fc716f72ac175925272696d509038f
2014-03-27 18:12:18 +01:00
5fb78604c1 Split TYPEINFO into plain and TYPEINFO_OVERRIDE
...where the latter contains SAL_OVERRIDE annotations

Change-Id: Id64794b388d83dfe7026440e8b20a5b5efd412d1
2014-03-26 11:54:55 +01:00
436cd90095 svtools: sal_Bool->bool
Change-Id: Ifd3e643dbc6755839ad4af73ae141fd115ddb4f4
2014-03-25 14:32:56 +02:00
9278df2c21 sfx2: sal_Bool->bool
Change-Id: I73acb3a150b01114d32274a6842f6db9654b3e63
2014-03-19 09:21:24 +02:00
c3e3f46657 sfx2: sal_Bool->bool
Change-Id: I375a72c34e46778385a9fdc24c9ebd0f0a3f3c9b
2014-03-18 11:27:39 +02:00
7e8af4b249 basct: prefer passing OUString by reference
Change-Id: Ide803f793e829767fad89ab2aef776ef24fedb37
2014-03-17 13:30:51 +02:00