Commit Graph

93 Commits

Author SHA1 Message Date
Noel Grandin
87a9979c89 overload std::hash for OUString and OString
no need to explicitly specify it anymore

Change-Id: I6ad9259cce77201fdd75152533f5151aae83e9ec
Reviewed-on: https://gerrit.libreoffice.org/43567
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-23 08:15:35 +02:00
Michael Stahl
5581ab4a13 bridges: [loplugin:stringconstant]
Change-Id: I07501ac3593cd5df713b74e04ea64d22365958b9
2017-09-18 13:35:45 +02:00
brainbreaker
a1aa4f84cf Supress unused variable warning in gcc arm bridge
Change-Id: I78c9d6b5e6af73965cb422dfdbaec5a7f9b57fac
Reviewed-on: https://gerrit.libreoffice.org/39829
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-12 08:46:43 +02:00
Miklos Vajna
eccca2010b bridges: fix Linux/arm for the non-Android case
Change-Id: I8adf22c65515ae23b95e6745c24c41814192811b
Reviewed-on: https://gerrit.libreoffice.org/39173
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-06-23 20:39:42 +02:00
brainbreaker
3bb8ec7cc5 android: Fix bridges/ module for building with Clang
Change-Id: If8bcda3aa8c3a3e46cd98e5ae797486f32db9822
Reviewed-on: https://gerrit.libreoffice.org/39050
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-06-23 15:22:40 +02:00
Jochen Nitschke
a5dba7dbec remove unused osl/mutex.hxx includes
Change-Id: I3b50e45fdb99e9cd8bfda07356ee3ddb4dd0f8bb
Reviewed-on: https://gerrit.libreoffice.org/38905
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-06-18 13:38:25 +02:00
brainbreaker
e88584fed0 Clean up declaration of __cxa_get_globals in linux_arm bridge
This is the Linux/arm version of commit
5ba3d1740b, which did the same for the
Linux/x86_64 bridge.
Clang rejects the incompatible declarations of the
same extern "C" function in different namespaces.
This commit redeclares __cxa_get_globals so as to support
clang for building Android in future.

Change-Id: I4d733d3835d0dea5784701143f4ea1bc5d5ff363
Reviewed-on: https://gerrit.libreoffice.org/38735
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-06-14 22:12:24 +02:00
Tor Lillqvist
013d9789c7 Drop :: prefix from std in [a-b]*/
Change-Id: I0422aaf39bbce889c95ed9a81a0784cb03a1badd
Reviewed-on: https://gerrit.libreoffice.org/34320
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2017-02-15 21:50:23 +00:00
Stephan Bergmann
61396df4f4 LEAK_STATIC_DATA is only ever defined for WNT
Change-Id: I1aa7b56b44e5efc8ad407c8d0fe09927f622b5e7
2017-02-11 18:32:05 +01:00
Michael Stahl
b647996a9b replace sal_Size with std::size_t (or sal_uInt64 for SvStream pos)
... except in include/rtl, include/sal, include/uno, where sal_Size is
retained for compatibility, and where callers of rtl functions pass in
pointers that are incompatible on MSVC.

Change-Id: I8344453780689f5120ba0870e44965b6d292450c
2016-09-15 12:01:11 +02:00
Tor Lillqvist
e0849330bc Get rid of unnecessary directory levels $D/inc/$D
Change-Id: Ibf313b8948a493043006ebf3a8281487c1f67b48
Reviewed-on: https://gerrit.libreoffice.org/25532
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2016-05-27 17:10:45 +00:00
Stephan Bergmann
6ff2d84ade Various #include <sal/log.hxx> fixups
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx>
(and don't make use of it themselves), but many other files happen to depend on
it.  Cleaned up some, but something like

  grep -FwL sal/log.hxx $(git grep -Elw \
    'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF') -- \*.cxx)

shows lots more files that potentially need fixing before the include can be
removed from rtl/string.hxx and rtl/ustring.hxx.

Change-Id: Ibf033363e83d37851776f392dc0b077381cd8b90
2015-04-22 09:57:47 +02:00
Noel Grandin
71b809959b remove unnecessary use of void in function declarations
ie.
    void f(void);
becomes
    void f();

I used the following command to make the changes:

  git grep -lP '\(\s*void\s*\)' -- *.cxx \
    | xargs perl -pi -w -e 's/(\w+)\s*\(\s*void\s*\)/$1\(\)/g;'

and ran it for both .cxx and .hxx files.

Change-Id: I314a1b56e9c14d10726e32841736b0ad5eef8ddd
2015-04-15 11:47:12 +02:00
Stephan Bergmann
fb088cdd8d Replace remaining getCppuType et al with cppu::UnoType
Change-Id: I37d1a939c1a98f77152ed90dfb201446101f3157
2015-04-01 08:35:33 +02:00
Stephan Bergmann
96f5b780f0 Use OUString::unacquired
found with

  git grep -E '\* *\<reinterpret_cast\>[^>]+\<OUString\>'

Change-Id: I9306d4ad8e3b1664f54cb7df86f2d79bfd3c6cb9
2015-03-31 17:45:27 +02:00
Stephan Bergmann
063a511583 Revert "Revert "boost::unordered_map->std::unordered_map""
This reverts commit 3976739f23,
the problem mentioned there was caused by a different commit, and
has meanwhile been fixed.
2015-01-07 14:41:11 +01:00
Caolán McNamara
3976739f23 Revert "boost::unordered_map->std::unordered_map"
as an experiment to see if that's somehow the cause of

NEXT    An uncaught exception of type com.sun.star.sdbc.SQLException
NEXT    - General error: java.lang.UnsatisfiedLinkError: com.sun.star.sdbcx.comp.hsqldb.StorageFileAccess.isStreamElement(Ljava/lang/String;Ljava/lang/String;)Z

NEXT    ##Failure Location unknown## : Error
        Test name: HSQLDBTest::testEmptyDBConnection
NEXT    An uncaught exception of type com.sun.star.sdbc.SQLException
NEXT    - General error: java.lang.UnsatisfiedLinkError: com.sun.star.sdbcx.comp.hsqldb.StorageFileAccess.isStreamElement(Ljava/lang/String;Ljava/lang/String;)Z

under clang

This reverts commit ce7f442bd0.

Change-Id: Ieed0be5721953b9644e4be411173e0ea73f33ed8
2015-01-06 09:15:14 +00:00
Caolán McNamara
ce7f442bd0 boost::unordered_map->std::unordered_map
Change-Id: I3a16703727f1a421e0ed18079e14219a4feeb8c8
2015-01-05 12:37:48 +00:00
Miklos Vajna
7a4a9d3d42 bridges: fix gcc3_linux_arm build
Change-Id: I3bfaeab9dd9f2d8cd603c655ec3aa7c4f508c673
2014-12-11 11:16:45 +01:00
Michael Weghorn
0e55feea6a reduce scope of local variables
This addresses some cppcheck warnings.

Change-Id: I1122494e295af756ef3cc32717fe204505aeb9e3
Reviewed-on: https://gerrit.libreoffice.org/13335
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-12-11 06:15:26 +00:00
Michael Stahl
04a7e55b48 bridges: oops some semicolons got lost
Change-Id: I5c2f9286067237ec1a9df6a47009e25e82ea7f63
2014-11-21 18:39:39 +01:00
Michael Stahl
1276076ac8 ibridges: convert all legacy osl/diagnose.h assertions in source/cppu_uno
Change-Id: I4e78fac76b6bb4923e3b680d910afe5bb9640c33
2014-11-21 17:32:26 +01:00
Tor Lillqvist
d388ef0b3b Blind fix attempt: include <osl/diagnose.h>
Change-Id: Ic734b56852212d4cee352fc3669dbb16838be8ae
2014-11-17 17:50:56 +02:00
Matúš Kukan
d743004ac4 missing include
Change-Id: Iac01fc756a74cbaeebd1d9a01ddea74bbaf18f4b
2014-11-17 15:40:58 +01:00
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
Stephan Bergmann
67a9ae4dd8 Improve debug output
Change-Id: Iba0c35a5bc07ac7b67186c3eeae1a2c926a6bc69
2014-09-29 23:18:26 +02:00
Stephan Bergmann
9c9f0ea2c3 Include RTTI in generated vtables for ubsan's vptr-based checks
...though only on gcc3_linux_x86-64 for now.

Change-Id: Id90554425e78b38a5a97149f2a7d3ac04cbe0c9b
2014-08-07 18:21:19 +02:00
Noel Grandin
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
Noel Grandin
14ab8c3f1d bridges: remove SAL_THROW macro
Change-Id: I2daafd711aedab17b6c13fde95c8af5f49d38a7c
2014-06-05 08:17:49 +02:00
Noel Grandin
ebc0a15515 remove more unnecesary OUString constructor use
when throwing exceptions

Change-Id: I6edfb6b6745499f802b0e3c0e096a36fb7c32aac
2014-05-29 09:01:40 +02:00
Noel Grandin
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
Thomas Arnhold
2bd7767d01 Resolves fdo#70681: fixincludeguards.pl: all that's left
Change-Id: I3e51a62710bb46c8255fd228d41d9300c90a1fb5
Reviewed-on: https://gerrit.libreoffice.org/9360
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2014-05-15 12:50:46 +00:00
Alexander Wilms
6660b9d2c5 Remove visual noise from bridges
Change-Id: I53fa23d335ff62795f09f9838d4064cea71aeb65
Reviewed-on: https://gerrit.libreoffice.org/8237
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-03-01 05:21:45 -06:00
Alexander Wilms
0ce0c369aa Remove unneccessary comments
Change-Id: I939160ae72fecbe3d4a60ce755730bd4c38497fb
Reviewed-on: https://gerrit.libreoffice.org/8182
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-23 03:38:49 +00:00
Noel Grandin
82625bb98e remove unnecessary sal_Unicode casts in OUStringBuffer::append calls
Convert code like:
    buf.append( static_cast<sal_Unicode>('!') );
to:
    buf.append( '!' );

Change-Id: Iacb03a61de65a895540940953b49620677b3d051
2014-01-07 09:43:37 +02:00
Tor Lillqvist
e036d4b706 Spell "indices" correctly
Change-Id: I63b1de195bf2f3f8bfd185181f48b1520cdd849f
2013-10-02 21:57:42 +03:00
Chr. Rossmanith
7dac241ca0 Remove RTL_CONSTASCII_(U)STRINGPARAM in bridges
Change-Id: Id8777ee7f587846399e95cf3b1b37d669a76bae5
Reviewed-on: https://gerrit.libreoffice.org/3139
Reviewed-by: Christina Roßmanith <ChrRossmanith@web.de>
Tested-by: Christina Roßmanith <ChrRossmanith@web.de>
2013-04-02 20:25:44 +00:00
Thomas Arnhold
39d45390f4 removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStrings declarations
s/(OUString\s+[a-zA-Z_][A-Za-z0-9_]*\s*)\(\s*RTL_CONSTASCII_USTRINGPARAM\s*\((\s*"[^")]*?"\s*)\)\s*\)/$1\($2\)/gms

Change-Id: Iad20f242c80c4bdc69df17e2d7a69d58ea53654b
Reviewed-on: https://gerrit.libreoffice.org/2835
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-03-19 10:48:30 +00:00
Thomas Arnhold
8b27d78b4a automated removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStrings
Done with a perl regex:

s/OUString\s*\(\s*RTL_CONSTASCII_USTRINGPARAM\s*\((\s*"[^")]*?"\s*)\)\s*\)/OUString\($1\)/gms

Change-Id: Idf28320817cdcbea6d0f7ec06a9bf51bd2c3b3ec
Reviewed-on: https://gerrit.libreoffice.org/2832
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-03-19 09:00:26 +00:00
Tor Lillqvist
a477138dfa Work on the iOS C++/UNO bridge
Split uno2cpp.cxx and cpp2uno.cxx into separate files for the emulator
(i386) and device (ARM). Much cleaner like that.

Try harder to get the ARM stuff to actually work.

Add the rtti.h and unwind-cxx.h files from libcppabi as such instead
of cherry-picking stuff from them.

Change-Id: Ia238a9ce048116ad796dfb168fd4e5d3b9712ad5
2013-01-19 23:58:40 +02:00
Tor Lillqvist
b3aad50859 Be truthful to the compiler about registers clobbered by asm snippet
The asm code loads values into parameter-passing registers r0-r3.
(That is one of the very purposes of the asm snippet.) We need to tell
the compiler that. The compiler does not analyze the asm snippet and
has no idea by itself what it does.

Otherwise the compiler might well put one of the input values to the
asm snippet, like the "pmethod" (the value of the pMethod variable)
into one of those registers, so that when that value then is used in
the asm snippet, *after* r0-r3 have already been modified, it
obviously is totally unrelated to pMethod any more, and the result is
that the code jumps into hyperspace.

Apparently this has worked purely by luck, or thanks to GCC
conservatively avoiding using the r0-r3 parameter-passing registers in
this way. The problem was noticed when using the same code with Clang.

The above analysis tentatively confirmed by Caolán and Jani Monoses,
who wrote the code.

Change-Id: I3018c2e2ccb83e7a71144425fa404ad28bb955d6
2013-01-10 09:22:16 +02:00
Michael Meeks
17ff7b41d1 re-base on ALv2 code. Includes:
Patches contributed by: Armin Le Grand.
    #118558# Correcting OLE attributes of LO3.4 at load time by loading as OOo3.3, details see task.
    http://svn.apache.org/viewvc?view=revision&revision=1195906
    #118485# - Styles for OLEs are not saved.
    http://svn.apache.org/viewvc?view=revision&revision=1182166
    #118898# Adapted ImpGraphic::ImplGetBitmap to correctly convert metafiles
    http://svn.apache.org/viewvc?view=revision&revision=1293316
    #119337# Solves the wrong get/setPropertyValue calls in
    SvxShapeText (and thus in SvxOle2Shape)
    http://svn.apache.org/viewvc?view=revision&revision=1344156

    Patches contributed by Mathias Bauer (and others)
    gnumake4 work variously
    http://svn.apache.org/viewvc?view=revision&revision=1394707
    http://svn.apache.org/viewvc?view=revision&revision=1394326
    cws mba34issues01: #i117717#: remove wrong assertion
    http://svn.apache.org/viewvc?view=revision&revision=1172349

    Patch contributed by Herbert Duerr
    goodbye Registration and License dialogs, don't let the door hit you
    http://svn.apache.org/viewvc?view=revision&revision=1172613
    help gcc 4.6.0 on 32bit ubuntu 11.10"
    http://svn.apache.org/viewvc?view=revision&revision=1245357

    Do not add targets for junit tests when junit is disabled.
    Patch contributed by Andre Fischer
    http://svn.apache.org/viewvc?view=revision&revision=1241508

Revert "sb140: #i117082# avoid unncessary static class data members
    commit 21d97438e2.
remove obsolete FreeBSD visibility special case.
retain consolidated BSD bridge code, remove OS/2 pieces.
2012-11-15 16:06:08 +00:00
Michael Meeks
10511acd08 Revert "sb140: #i117295# use rtl::Static"
This reverts commit d3794d2d8a.

Conflicts:
	bridges/source/cpp_uno/cc50_solaris_intel/except.cxx
	bridges/source/cpp_uno/cc50_solaris_sparc/except.cxx
	bridges/source/cpp_uno/gcc3_ios_arm/except.cxx
	bridges/source/cpp_uno/gcc3_linux_arm/except.cxx
	bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx
2012-11-15 16:06:07 +00:00
David Tardon
99cfb6724b Revert "add forgotten asm file to build"
This reverts commit 492f9139c1.
2012-09-23 11:14:52 +02:00
David Tardon
492f9139c1 add forgotten asm file to build
Change-Id: I5c86e369649e71d785af06437b2af633d6805b8d
2012-09-23 08:40:15 +02:00
David Tardon
61c0a3a63d switch bridges to gbuild
Change-Id: Ia19ff61f1f7fb446298472acd6722b57ddaeddec
2012-09-22 08:15:30 +02:00
Tor Lillqvist
7b72d933f9 WaE: format '%lx' expects 'long unsigned int', argument is 'void*'
Change-Id: Id14a7be627502cb8aa2173f0206c84cd27fab2e6
2012-09-21 10:55:37 +03:00
Caolán McNamara
ac6833f979 remove "TODO: add test" which is now done
since 99bf0c318b

Change-Id: I0fbd88d842f750d101e3eec5a6b18f7e8bc062be
2012-05-17 14:43:29 +01:00
Jani Monoses
e13dc26e39 ARM bridge: fixes for passing double arguments on the stack 2012-02-21 01:15:02 +02:00
Rene Engelhard
3dfae9e2e6 fix armel/armv4t build 2012-02-17 11:23:55 +01:00