Commit Graph

3504 Commits

Author SHA1 Message Date
d4ca0cc293 loplugin: cstylecast
Change-Id: I0eaeebad6be75a1c0cccdf90955fde1a2909bdba
2014-10-23 12:36:14 +02:00
9ecac3874d Replace DISABLE_SCRIPTING with HAVE_FEATURE_SCRIPTING
Feature test macros that govern conditional compilation should be
defined in config_*.h include files, not on the compilation command
line.

Change-Id: I40575a4762fd2564f10927b6f38a112dd9f9a3d7
2014-10-22 09:30:23 +03:00
16591b8ef7 SAL_WARN about unsupported dispatch requests
Change-Id: I3ee646258ed1419245a0766c79214102b08bbca1
2014-10-21 17:22:55 +02:00
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
124a29f0f8 move the removeTree function from desktop to unotools
Change-Id: I98d3f4a68abfee42dac987633878b850134671d3
2014-10-11 00:28:48 +02:00
47a2d7642d fdo#81356: convert Fraction to boost::rational<long> - wip
* Added rational util functions used by Fraction class not
  available in the boost::rational class.
* Replaced usage of Fraction by boost::rational<long>
* Removed code that relies on:
  1. fraction.IsValid() -- rational only allow valid values, ie
     denominator() != 0
  2. rational.denominator() == 0 -- always false
  3. rational.denominator() < 0 -- always false but implementation
     detail: http://www.boost.org/doc/libs/release/libs/rational/rational.html#Internal%20representation
* Simplified code that relies on:
  1. rational.denominator() != 0 -- always true
* BUGS EXIST because Fraction allows the creation of invalid values but
  boost::rational throws the exception boost::bad_rational

Change-Id: I84970a4956afb3f91ac0c8f726547466319420f9
Reviewed-on: https://gerrit.libreoffice.org/11551
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2014-10-09 11:33:33 +00:00
9a35c05ac5 desktop: let --convert-to dump its exception message on stderr
Change-Id: Ic906740ddeab04a9acfee997a31a2249f23de65f
2014-10-08 21:42:58 +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
0a4d780413 No extension cache to clean unless HAVE_FEATURE_EXTENSIONS
Change-Id: Id19a93b0b428849a3590e2e28e081154c443e949
2014-09-29 19:39:00 +03:00
b85c779595 android: use JNI direct memory allocator from Fennec
Change-Id: I95a9ab54222150a1f9cde30df820f3cd6915f641
2014-09-24 20:43:01 +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
18c052d6d6 LOKit: add "destroy" and "saveAs" to android JNI
Change-Id: I08542b736e49cb9262323e9fe6188b1976d47935
2014-09-22 22:40:07 +02: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
ea733ab5b6 Turn SfxItemState into a C++11 scoped enumeration
...to gain further confidence in the claim "that none of the existing
code tries to uses combinations of these enum values"
(d92602c5b13d0a60439d86c5a033d124178726ca "more fixes for SfxItemState")

Change-Id: I987922d945e8738e38adfde83b869adf3ff35b13
Reviewed-on: https://gerrit.libreoffice.org/11384
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2014-09-12 06:08:32 +00:00
db9cfa672c fdo#55380 replaced use of obsolete interfaces
Change-Id: I94fed6a9361f21457b3e631efffc0db833068aef
Reviewed-on: https://gerrit.libreoffice.org/11256
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2014-09-10 11:48:43 +00:00
40f164a2b8 microoptimisation: no need to compute string length to test emptiness
Change-Id: If5093bca0e16e0f631c8cd1a7f4dde8bbf7da077
2014-09-07 06:54:01 +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
1014371783 Make OOO_EXIT_POST_STARTUP behave more nicely when blank
Change-Id: I28bc8027908225d78c9543f3813d3bfe3818451d
Reviewed-on: https://gerrit.libreoffice.org/11264
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2014-09-06 15:31:55 -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
70724fc7e0 QueryBox QBX_USERDATALOCKED -> MessageDialog + string
Change-Id: If9256bc2ea23a31a902590ca5379abbaec80f080
2014-08-25 16:45:24 +01:00
57a4337e25 set names on a bunch more threads...
Change-Id: I4c2f2f0bcce52839033876ec991529721e06a3c8
2014-08-25 13:21:59 +02:00
b70fb7d704 everything is independent from vos these days...
Change-Id: Iccb94dcc31d6de8c9e4e7a31b3c2e36d4198b295
2014-08-25 13:21:55 +02: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
9df3a83c30 Base the convert-to detection on the actual service
There is no need to run a type detection on the input
file (for a second time!), just to get the document service.

This also simplifies the conversion of some generic formats
like HTML and RTF, using Calc export filters. Previously
setting both input and output filters was required. Now it's
enough to set the input filter, or simply use --calc.

Change-Id: I825e0fe3e7368d6649acb434b13de53a4523064a
2014-08-22 00:02:06 +03:00
cebfcbd456 Better to use an instance with a doc service specified
...to avoid detection of filter from other services, and to
additionally check for filters other than the preferred
by the type (see SfxFilterMatcher::GetFilterForProps).

Change-Id: I64609b32f6aac7553b4b6b96db88acfcad0ce000
2014-08-22 00:00:07 +03:00
495fe3bc22 queryTypeByURL returns type name not filter name
Change-Id: Iad8f2b718af0c947d151f4bbfdcb575440396ff2
2014-08-21 18:28:40 +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
b00ce3241e fix for PtylTestEncryptionAndExport (on sofficemain.cxx)
Change-Id: I2857dae2df3b3e7e89b5bd56b35a4b8f3868920e
2014-08-19 13:14:10 +03:00
a107bdfdfc ErrorBox->MessageDialog
Change-Id: I57d4e43460e40d3aff54873280eddbb18c12446b
2014-08-18 10:57:21 +01:00
3b6091ca42 document the swap-on-free idiom usage
Effective C++, item 17

Change-Id: I5c6f20c9631f1ca86b481a56ef08d578a7addbad
2014-08-18 11:07:31 +02:00
58e6fbe1a8 remove unused WarningBoxes
Change-Id: I07c457a49646703af5d13f83ba033340309ee655
2014-08-18 05:23:52 +02:00
bf866b0ad6 WARNINGBOX -> WarningBox
Change-Id: Id39add923b94bcf43e64ffbf4940625efe4d35a0
2014-08-18 04:22:28 +02:00
36efd0f9c7 try that ErrorBox removal again
Change-Id: I1d2f24def771651d36f06432c20e80429379c9fe
2014-08-16 12:13:38 +01:00
b8cf71937f Revert "ErrorBox EBX_ERR_PRINTDISABLED to String"
This reverts commit 90aecb31139a6743fd00c87585a82406e7d9f075.
2014-08-16 00:42:53 +02:00
90aecb3113 ErrorBox EBX_ERR_PRINTDISABLED to String
Change-Id: I7f59091a595a8e8a832b779da56bb53de810f22b
2014-08-15 23:30:21 +02:00
3d318e6cf4 fdo#70625 Add --cat parameter to make git diffs pretty
Change-Id: I309ca3e718a11ca97991686c229c79ab20e8c3d9
Reviewed-on: https://gerrit.libreoffice.org/10623
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2014-08-15 01:37:14 -05:00