2406 Commits

Author SHA1 Message Date
Noel Grandin
0371a63365 remove unnecessary 'using namespace rtl' declarations
It turns out that almost none of them were necessary.

Change-Id: I1311ed28409c682b57ea8d149bcbaf2c49133e83
Reviewed-on: https://gerrit.libreoffice.org/12133
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-29 11:28:54 +00:00
Matúš Kukan
d45607c4be Revert recent changes to comphelper::OSequenceOutputStream
Some of the changes could be wrong and we don't need them.

This reverts commit 784d4bea86d8cbb3a855e557c465ce50a049cefc.
This reverts commit 8524d5aba59148eef94859289f00ab6477e0e821.
This reverts commit 018f1deae884febbbe639c7ee46b45ce4807e9d3.
This reverts commit 8124fddc5803b4e104d4fc2456cb92cb030d9436.

We use our own helper cache class in FastSaxSerializer
since f736eba5a9df8645849a37b08d2764a5f495ab45.

Change-Id: Iaca6b5b11cb32595db4420a02fa72b0007cf6286
2014-10-23 11:53:19 +02:00
Matúš Kukan
20538c2512 FastSerializer: Avoid sequences where possible
Change-Id: I359ca9d3b766b71904e4199ebfbdbd5b203775cc
2014-10-23 11:53:17 +02:00
Matúš Kukan
cc3ac382a2 FastSerializer: Do not keep whole sequence in memory; write in chunks
Change-Id: Ibca65a2b8397358ac4013c8e5b53389ac6949e4d
2014-10-23 11:53:15 +02:00
Matúš Kukan
8cc5b621aa Remove mutex from OSequenceOutputStream; it's intended to be fast
Make the caller responsible for using it wisely.
AFAICS it's used only in FastSaxSerializer, so far.

Change-Id: I50d48fd7f3e6cdeb9e4637868da213b8171e542b
2014-10-23 11:53:15 +02:00
Stephan Bergmann
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
Caolán McNamara
9b92b4239e coverity#706285 Uncaught exception
Change-Id: I6d7227a0614042f7a65520fc79b31afa3d7ca744
2014-10-10 18:14:35 +01:00
Caolán McNamara
0e06dbd3a0 coverity#706284 Uncaught exception
Change-Id: I748d34fd7f56b1c9c739f15fbb596932484195a4
2014-10-10 18:14:34 +01:00
Caolán McNamara
e263abafa0 coverity#706275 Uncaught exception
Change-Id: I538cca9505411e8984ba821807c0072c0ce40e7b
2014-10-10 12:50:24 +01:00
Caolán McNamara
edaee2352b coverity#1242878 Unused value
Change-Id: I85bc3fffb2d350a13aeb30c75f0c2d0a7bc5e7a3
2014-10-10 12:50:21 +01:00
Stephan Bergmann
52028d4632 Revert "coverity#1224993 Uncaught exception"
This reverts commit b66a96d792e9ef8022547f835ed4633c8e7f4c10,
follow-up commit will fix w/o breaking JunitTest_framework_unoapi.

Change-Id: Iac12d52c2eb9a1e4ab09d24910cee1838cc7d883
2014-10-09 08:37:36 +02:00
Caolán McNamara
b66a96d792 coverity#1224993 Uncaught exception
Change-Id: If5dcb4bbd728f7396e19382f85bdf2a3d77a6db6
2014-10-08 20:45:13 +01:00
Caolán McNamara
b4895186c3 coverity#706283 Uncaught exception
Change-Id: I2c3f10894ffe514dbc71cd1dd672685aa8f09a0d
2014-10-08 20:45:11 +01:00
Caolán McNamara
fb6d3b883b disambiguate uniform_int_distribution
Change-Id: Ifa0c1b1983d1cc7f22d55b15dee88b7f709dbcf8
2014-10-07 14:21:16 +01:00
Tor Lillqvist
d1fbbb04f9 I shouldn't be shy, just assert()
Stephan dislikes "defensive programming" and I trust him.

Change-Id: Ic4864de98a5155129179eb89873f3ffdc8921614
2014-10-07 10:42:20 +03:00
Tor Lillqvist
4bb67e666b Handle incorrect usage of uniform_real_distribution()
uniform_real_distribution(a,b) should be called with a < b, otherwise
the result is undefined. Currently, when called with both zero, it
gets stuck in a loop. Not sure if a blunt assert() would be the right
thing here, so I just return a if a >= b.

Change-Id: I769688c7192bd02bad24ad597948984db56dd4fc
2014-10-07 10:13:36 +03:00
Caolán McNamara
de78b2ca3c when size_t == unsigned int
Change-Id: If8cd3632d69f6456b0e1351efac0e428e0093e3b
2014-10-06 15:28:27 +01:00
Caolán McNamara
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
Caolán McNamara
cde0a09137 coverity#1242878 Unused value
Change-Id: I123855003be3eb5ef6494cda8f42b4daeba1c272
2014-10-02 14:48:53 +01:00
Stephan Bergmann
c91dec0dad comphelper: std::auto_ptr -> std::unique_ptr
Change-Id: I364d6252f470dcc6d71a191f1249e95ca1f284ce
2014-09-25 08:40:11 +02:00
Noel Grandin
5139fad429 loplugin: cstylecast
Change-Id: I84873c9f84651dc8a1337f37c63020b461314e1b
2014-09-22 12:24:23 +02:00
Caolán McNamara
ed00d0ddd6 create a master document template type
of application/vnd.oasis.opendocument.text-master-template with
suffic otm

https://lists.oasis-open.org/archives/office-comment/201002/msg00042.html

desktop/icons/oasis-master-document-template.icns is just a copy
of
desktop/icons/oasis-master-document.icns
because I can't draw

Change-Id: I0d18c79c4c893e97505052884ee8be97d0f117a1
Reviewed-on: https://gerrit.libreoffice.org/11350
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-09-11 09:38:21 +00:00
Caolán McNamara
2602a41f76 coverity#706466 Uncaught exception
and

coverity#706463 Uncaught exception

Change-Id: I77cb09054f00d86cd3e206e44ef4942ddf148a7f
2014-08-30 18:16:49 +01:00
Thomas Arnhold
cb347ddc5c stario -> css::io
Change-Id: Iad96e0a2bfd6c126c696f14919dbfd8e072dd230
2014-08-21 09:03:23 +02:00
Thomas Arnhold
edda7dbad7 starcontainer -> css::container
Change-Id: Ie6e75483aa4262a5f66a4c557015af8b3c02d592
2014-08-21 09:03:22 +02:00
Thomas Arnhold
123c64ab00 starawt -> css::awt
Change-Id: I76dd16aa2c42a649162ea2e37c824af30cdd557b
2014-08-21 09:03:21 +02:00
Thomas Arnhold
78b2d82111 comphelper: starbeans -> css::beans
Change-Id: Iedfc4460194f179b20d734cb7671894213c77008
2014-08-21 09:03:20 +02:00
Thomas Arnhold
f133857cc6 comphelper: starutil -> css::util
Change-Id: If4c0d404b0f7027837dcc245b5b7d21b1f749347
2014-08-21 09:03:20 +02:00
Thomas Arnhold
32093237b3 comphelper: starlang -> css::lang
Change-Id: Ie8adb5b81df51fd973cbb786f27ea3ef1462679c
2014-08-21 09:03:19 +02:00
Thomas Arnhold
007099ea32 comphelper: staruno -> css::uno
Change-Id: I21991280c5b7e4c6d0c200f4489c89a9f4fbc385
2014-08-21 09:03:18 +02:00
Noel Grandin
8c9fdc4a96 java: remove modifiers implied by the context
found by PMD

Change-Id: I04cbf986ddbcffff987784f381b8a9f52f1b3f31
2014-08-20 11:45:28 +02:00
Noel Grandin
3f210b0e75 java: remove unnecessary return statements
found by PMD

Change-Id: I3d150421948d17eaed34fac2b1a212da34288d1a
2014-08-20 10:35:54 +02:00
Noel Grandin
0764292c5d java: use 'Short.valueOf' instead of 'new Short'
Change-Id: Icef19ef61ee0af2dd3bda527263934006271f219
2014-08-19 14:57:18 +02:00
Noel Grandin
8a2c6c29af java: use 'Long.valueOf' instead of 'new Long'
Change-Id: If4fff3dd37326fbcdd01b743355a16591d71fa69
2014-08-19 14:57:17 +02:00
Noel Grandin
ff0ad0493e java: use 'Integer.valueOf' instead of 'new Integer'
Change-Id: Ia8befb8d69914ce971174fc5f2ffc0e2f506a940
2014-08-19 14:57:17 +02:00
Noel Grandin
be1bb7b1cc java: use Boolean.valueOf instead of instantiating Boolean objects
Change-Id: Ie41d6b0170a035a694dd270c311a137fd1810e74
2014-08-19 14:57:16 +02:00
Caolán McNamara
7a54951fbb coverity#1231667 Unchecked return value
Change-Id: I40d8fc61b1e488955faa61c868877c7b6487c529
2014-08-17 16:39:22 +01:00
Armin Le Grand
d005acae3a Resolves: #i125386# secured user request and changed some bools to bitfield
(cherry picked from commit 5e3cbe056c19bea5018dbf1fd4b2bc8f8b030ff3)

Conflicts:
	comphelper/inc/comphelper/embeddedobjectcontainer.hxx
	comphelper/source/container/embeddedobjectcontainer.cxx
	sfx2/source/appl/linkmgr2.cxx
	svtools/source/misc/embedhlp.cxx

Change-Id: I7e9b20a87ca6afe8cb91c577860a6c6b72368ee9
2014-08-09 14:13:08 +01:00
Noel Grandin
0c5f51ebbc java: remove commented out code
Change-Id: I44e2043e5da23bc9421c03e550ef1d8b7ebaad36
2014-08-05 11:31:50 +02:00
Tor Lillqvist
eeeef4e83c Include <algorithm> for std::min
Change-Id: If2bf31494f1354ff3856ad8b32f6799042e23b18
2014-07-29 18:21:00 +03:00
Caolán McNamara
136fa5432d coverity#706282 Uncaught exception
Change-Id: Icca233fdc6d841d1bf51f918b83f3eef2cd5952e
2014-07-13 20:10:49 +01:00
Caolán McNamara
b03675889d coverity#706281 Uncaught exception
Change-Id: I469b812c666801db5e3a6fac1d6152afd80cf39a
2014-07-13 20:10:49 +01:00
Kohei Yoshida
d5dd121680 Use OUStringHash here.
Change-Id: I37625fb421e5b20f299fccccbc9d5ac74c31de3c
2014-07-10 20:09:55 -04:00
Kohei Yoshida
f8226e87b4 Pass a useful exception message.
Change-Id: Idde024a7b6896571d159c3983ef1985fa12d0c5a
2014-07-09 12:15:40 -04:00
Noel Grandin
f692c88e60 use SimpleReferenceObject in comphelper module
to replace hand-rolled version

Change-Id: Ie4e66d2f1f893c04be589877ef53f470ca74c9eb
2014-07-08 15:16:48 +02:00
Caolán McNamara
0d78ad871e DBG_ASSERT->assert when followed by dereference
Change-Id: Ic1c999ffdc391ea01be5711721e7c9e63179473e
2014-07-07 10:48:25 +01:00
Stephan Bergmann
2134c9653e comphelper: sal_Bool -> bool
Change-Id: I7d7ae1f5ddff0cf7d11a407b190256f37a71d48a
2014-07-03 11:51:01 +02:00
Stephan Bergmann
37b1835972 Revert "comphelper: sal_Bool -> bool"
Oops, this reverts commit c95ff75df274e3d84458e928ee96870bc8b663b3.
2014-07-02 18:54:32 +02:00
Stephan Bergmann
c95ff75df2 comphelper: sal_Bool -> bool
Change-Id: Icde90101b6adfa766c8abbeb55c518725e6596e1
2014-07-02 18:49:31 +02:00
Julien Nabet
4ddf6c7a70 Typo: conteiner->container
Change-Id: Idf1294c7da00621900d41c16473b862ee8fc502d
2014-06-29 00:12:55 +02:00