Commit Graph

1628 Commits

Author SHA1 Message Date
ad9498f8b8 More -Werror,-Wunused-private-field
...detected with a modified trunk Clang with

> Index: lib/Sema/SemaDeclCXX.cpp
> ===================================================================
> --- lib/Sema/SemaDeclCXX.cpp	(revision 219190)
> +++ lib/Sema/SemaDeclCXX.cpp	(working copy)
> @@ -1917,9 +1917,10 @@
>    const Type *T = FD.getType()->getBaseElementTypeUnsafe();
>    // FIXME: Destruction of ObjC lifetime types has side-effects.
>    if (const CXXRecordDecl *RD = T->getAsCXXRecordDecl())
> -    return !RD->isCompleteDefinition() ||
> -           !RD->hasTrivialDefaultConstructor() ||
> -           !RD->hasTrivialDestructor();
> +    return !RD->hasAttr<WarnUnusedAttr>() &&
> +           (!RD->isCompleteDefinition() ||
> +            !RD->hasTrivialDefaultConstructor() ||
> +            !RD->hasTrivialDestructor());
>    return false;
>  }
>
> @@ -3517,9 +3518,11 @@
>    bool addFieldInitializer(CXXCtorInitializer *Init) {
>      AllToInit.push_back(Init);
>
> +#if 0
>      // Check whether this initializer makes the field "used".
>      if (Init->getInit()->HasSideEffects(S.Context))
>        S.UnusedPrivateFields.remove(Init->getAnyMember());
> +#endif
>
>      return false;
>    }

to warn about members of SAL_WARN_UNUSED-annotated class types, and warn about
initializations with side effects (cf.
<http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-October/039602.html>
"-Wunused-private-field distracted by side effects").

Change-Id: I3f3181c4eb8180ca28e1fa3dffc9dbe1002c6628
2014-10-15 15:58:56 +02:00
8f436d3de7 use comphelper::rng::uniform_*_distribution everywhere
and automatically seed from time on first use

coverity#1242393 Don't call rand
coverity#1242404 Don't call rand
coverity#1242410 Don't call rand and additionally allow 0xFF as a value
coverity#1242409 Don't call rand
coverity#1242399 Don't call rand
coverity#1242372 Don't call rand
coverity#1242377 Don't call rand
coverity#1242378 Don't call rand
coverity#1242379 Don't call rand
coverity#1242382 Don't call rand
coverity#1242383 Don't call rand
coverity#1242402 Don't call rand
coverity#1242397 Don't call rand
coverity#1242390 Don't call rand
coverity#1242389 Don't call rand
coverity#1242388 Don't call rand
coverity#1242386 Don't call rand
coverity#1242384 Don't call rand
coverity#1242394 Don't call rand

Change-Id: I241feab9cb370e091fd6ccaba2af941eb95bc7cf
2014-10-06 14:13:27 +01:00
fddabddb0a desktop: std::auto_ptr -> std::unique_ptr
Change-Id: I450ee7134454321365d9d153522b8942a3d7d811
2014-09-30 12:28:51 +02:00
827c46e7d7 fdo#82577: Handle Window
Put the VCL Window class in the vcl namespace. Avoids clash with the X11
Window typedef.

Change-Id: Ib1beb7ab4ad75562a42aeb252732a073d25eff1a
2014-09-23 14:11:39 +03:00
60e78fbb80 fdo#82577: Handle Font
Put the VCL Font class in the vcl namespace. Avoids clash with the X11
Font typedef.

Change-Id: I1a84f7cad8b31697b9860a3418f7dff794ff6537
2014-09-18 08:54:37 +02:00
a0a5f76953 Use SAL_INFO
Change-Id: Ie84aa24fc7b2d58dbb4f22ef063dfd055f32ae85
2014-09-17 00:24:35 +02:00
76e04aef4b Rename LO-specific uno ini-file (Linux: program/unorc) to "louno"
...to avoid confusion with the URE uno ini-file (Linux: ure/lib/unorc).

It might even work to get rid of the louno ini-file altogether and fold its
contents into the fundamental ini-file, but at least
desktop/source/deployment/misc/dp_misc.cxx accesses the louno ini-file directly,
so would need some inspection to avoid potential regressions.

Change-Id: Ib49bbc4c814d677c22e68d2dd0f11af6d8423bb6
2014-09-16 16:08:05 +02:00
b9b8aa8232 desktop: sal_Bool -> bool
Change-Id: Ib9ca807c8fc27eda6d584a5b4696887dd044410c
2014-09-12 11:40:58 +02:00
5bce329040 SfxHint: convert home-grown RTTI to normal C++ RTTI
Also note that I fixed a bug in SvxFontMenuControl::Notify
where the if statement had the check the wrong way around.

Change-Id: I611e8929c65818191e36bd80f2b985820ada4411
Reviewed-on: https://gerrit.libreoffice.org/11147
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2014-09-06 15:47:44 -05:00
32ffdd367f coverity#706495 Uncaught exception
Change-Id: I36a48a72e9ce305c62d9a82c8d1fbfc2ad403068
2014-09-05 15:55:34 +01:00
962f01c375 coverity#983652 Uncaught exception
Change-Id: I72f298c5cd0476d6e0cbf3ffaf5fdf5cd143a21c
2014-09-05 15:53:29 +01:00
b1a5a7e2be coverity#706497 Uncaught exception
Change-Id: I6c2acde8c47f6f2c0b65b228737950a1d8972f8a
2014-09-05 15:50:24 +01:00
3f026077dc coverity#706498 Uncaught exception
Change-Id: I99a5ccd930d231324b5a35fedd70320e02e358af
2014-09-05 15:47:59 +01:00
316a5574ed coverity#706501 Uncaught exception
Change-Id: Ic5d95b87428284113f543427b417453dd361b354
2014-09-02 12:14:50 +01:00
235fa0334e Linux AArch64 port
Change-Id: I37044a37348b203944a8eb9d2204e619055f069d
2014-08-29 17:17:42 +02:00
70946992d4 Fix some *_component_getFactory function types
Change-Id: I912f9d1454c049419e9ead6f0ff8d7fa7d8cd6c5
2014-08-28 16:11:33 +02:00
57488f2a10 convert RID_WARNINGBOX_* to MessageDialog + string
Change-Id: Ic6031faa475e22ee23a6c8888987127b3caf92de
2014-08-25 16:45:29 +01:00
e932500e23 convert RID_QUERYBOX_INSTALL_FOR_ALL with custom buttons to .ui
Change-Id: If7ac491cb6f256af22b48f681590adb1484350d0
2014-08-25 16:45:26 +01:00
32ce5ae15a Avoid possible memory leaks in case of exceptions
Change-Id: Icc073be041ae0b0c690e869a0edaff3515d1d601
2014-08-25 10:27:10 +09: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
170109708e Related: rhbz#1125588 first steps for ppc64le
almost certainly won't get us too far, but a start

Change-Id: Ic20b97a97b6d506c32322173bd8332d15c3a4555
2014-08-21 08:54:16 +01:00
4b339818bb add a VclViewport
like GtkViewport so that the scrolled region will be clipped,
which also has the side-effect of stopping glade clobbering
the non view-port scrolled .ui files on editing

Change-Id: Ic64174b3a35b77f068e0085cdc7721aeb33f1d82
2014-08-20 14:00:58 +01:00
a107bdfdfc ErrorBox->MessageDialog
Change-Id: I57d4e43460e40d3aff54873280eddbb18c12446b
2014-08-18 10:57:21 +01:00
bf866b0ad6 WARNINGBOX -> WarningBox
Change-Id: Id39add923b94bcf43e64ffbf4940625efe4d35a0
2014-08-18 04:22:28 +02:00
59ddf7216d Don't do the annoying restart thing when sandboxed on OS X, ignore risks...
So far we have just displayed a hugely annoying dialog "sorry, but we
suck, you need to start LibreOffice again". But that sucks. So just
try to do without restart then, and let's see what happens. At least
in trivial testing, no crash.

Change-Id: I475fe49a0fdb8086bb33a165a08b32ac46548857
2014-08-15 01:55:29 +03:00
df64b892f5 remove RID_DLG_DEPENDENCIES resources
unused since 8c0bd0deee50a5f54926afe87d849411757c2f18

Change-Id: If720d7022e291db870fd196cf2ea0a3bc44f3ad2
2014-08-09 18:12:04 +02:00
c55d5ef51a Fix *_component_getFactory function type
Change-Id: I354cf9cfa5f1a749b01d16c93dbe7b86784a7d34
2014-08-05 11:05:34 +02:00
8c0bd0deee Convert RID_DLG_DEPENDENCIES to .ui
Change-Id: I45779ac7dd88608e0f46b468cc51641b386e8a1a
Reviewed-on: https://gerrit.libreoffice.org/10712
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2014-08-04 10:43:20 +00:00
c3beba871b coverity#706501 Uncaught exception
Change-Id: I435d189e6194d8d255ec88c4edad73d19a9bb5be
2014-07-19 21:26:01 +01:00
8416a65af1 fix spelling structur -> structure
Change-Id: I7aa4a9bf72732db95a67cee368f3a83a0d71bb9c
2014-07-17 14:49:41 +02:00
3e82897353 improve the inlinesimplememberfunctions clang plugin
Change-Id: I6d5a952901648e01904ef5c37f953c517304d31e
2014-06-17 10:55:17 +02:00
8d373129e9 callcatcher: update unused code
and strip away some stuff in rsc that should now be dead

Change-Id: I6411e706c50dff299099680f1f942bf61c4e79f2
2014-06-15 20:30:39 +01:00
1db81a3e4b loplugin:staticcall
Change-Id: I98f62391ee27c806f89cd8b85a04d67d1bcc78b7
2014-06-13 17:54:25 +02:00
e88c019fba convert extensions update required dialog to .ui
Change-Id: Ia3ad4032f500e95db5db520292e6c8b07b0f5c0b
2014-06-13 09:50:53 +01:00
b534967cac allow extensions to override Access2Base
In particular, this allows users or administrators to upgrade Access2Base by installing the extension version of it.

Change-Id: I1650e5beced0fd168afa029dbac2025e2fa16e1f
Reviewed-on: https://gerrit.libreoffice.org/9756
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
2014-06-12 16:06:26 +00:00
184a00b962 loplugin: inlinesimplememberfunctions
Change-Id: I42119f656ca528286fb25d2d36c0af54b7d04a6b
2014-06-09 10:10:13 +02:00
b312a38797 update_pch: add a bunch of pch files
desktop:    1m51s ->   54s
 framework:  1m55s -> 1m04s
 package:      32s ->   16s
 sdext:      1m31s ->   47s
 svgio:        32s ->   15s
 uui:          49s ->   20s
 vbahelper:  1m44s ->   27s
 xmlscript:    15s ->   10s
 xmlsecurity:  45s ->   23s

Change-Id: Ia437969c091bf877983ababc5ea2d044bbc0bee0
2014-06-04 21:18:37 +02:00
b3843321e9 desktop: fix includes
Change-Id: Ia51cd6fcdb84c049907b0aeda20774558198b575
2014-06-04 10:59:07 +02:00
3ddb928061 fdo#68849: Add header guards to all include files
Added header guards to files in directories desktop/*, and embedserv/*

Change-Id: Idaffcc0539b84962ed7c132cb20078512799d433
Reviewed-on: https://gerrit.libreoffice.org/9556
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-05-30 01:44:03 -05:00
42119194fd coverity#706499 Uncaught exception
also coverity#706500 and coverity#706502 and coverity#706503

Change-Id: If8c76f9fea669f3397a3db65fefaabe101bf9c35
2014-05-27 13:59:53 +01:00
9172ee7293 the stock multilineedit is sufficient IMO
Change-Id: I374c17fcda80c4f821271bf665a41beae100cccf
2014-05-27 12:07:13 +01:00
1908f27da8 desktop: further src file cleanup
Change-Id: I37f83084203fcc4e2f7d68f7c21774573b9281e8
2014-05-27 13:00:20 +02:00
5249cf49ed RID_DLG_UPDATEINSTALL conversion to .ui
Change-Id: I02ead5dc934d0f9ae9e958cbe6592250f1aaf1a4
Reviewed-on: https://gerrit.libreoffice.org/9464
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-05-27 05:44:23 -05:00
9af0abebfd remove unnecessary use of Reference constructor in throw
Convert code like this:
  throw IOException("xx",
     Reference< XInterface >(static_cast<OWeakObject*>(this)) );
to this:
  throw IOException("xx",
     static_cast<OWeakObject*>(this) );

Change-Id: Ife9f645f0f1810a8e80219126193015502c43dbb
2014-05-27 08:20:11 +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
ca4a381947 lets drop the custom DescriptionEdit widget
Change-Id: Id08b364b828ccacd5c54276daf605ec4ff3fdb0a
2014-05-21 13:47:05 +01:00
5690def7c8 RID_DLG_UPDATE conversion to .ui
Conflicts:
	desktop/source/deployment/gui/descedit.hxx

Change-Id: Icf9ee3081b468f99833d1e38182887ad1da6f675
Reviewed-on: https://gerrit.libreoffice.org/9417
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-05-21 07:46:34 -05:00
3db8d606d5 hrc and src files: squeeze multiple newlines
for i in `find . -name *.src -or -name *.hrc`; do FILE=$(cat -s "$i"); echo "$FILE" > "$i"; done

Change-Id: I2bac5ad3e1eb3c566e5c867ccf45893a19e1561e
2014-05-19 20:04:22 +02:00
a699927c56 Elide utl::TempFile_Impl
Change-Id: I8f14cd351c17abaa9d48144cdf8325afc250787b
2014-05-13 19:27:00 +02:00