Commit Graph

1314 Commits

Author SHA1 Message Date
ba0a57702c remove OUString wrap for string literals
For some functions and all kinds of Exceptions.

CannotConvertException
CloseVetoException
DisposedException
EmptyUndoStackException
ErrorCodeIOException
Exception
GridInvalidDataException
GridInvalidModelException
IOException
IllegalAccessException
IllegalArgumentException
IllegalTypeException
IndexOutOfBoundsException
NoMasterException
NoSuchElementException
NoSupportException
PropertyVetoException
RuntimeException
SAXException
ScannerException
StorageWrappedTargetException
UnsupportedFlavorException
VetoException
WrappedTargetException
ZipIOException
throwGenericSQLException
throwIllegallArgumentException

createInstance
createInstanceWithContext
forName
getByName
getPackageManager
getPropertyValue
getUnpackedValueOrDefault
getValueByName
hasPropertyByName
openKey
setName
setPropertyValue
supportsService

bash command:

for i in `cat list`; do git grep "$i\s*(\s*OUString(\s*\"" -- '*.[hc]xx'
	| cut -d ':' -f1 | sort -u
	| xargs sed -i
		-e "s/\(\<$i\s*(\)\s*OUString(\s*\(\"[^\")\\]*\"\)\s*)\s*/\1\2/g"
		-e "s/\($i.*\)\"+ /\1\" + /g";
done

Change-Id: Iaf8e641b0abf28c082906014f87a183517630535
Reviewed-on: https://gerrit.libreoffice.org/4624
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-06-29 21:52:54 +00:00
0291994f13 fix debug build on s390x
Change-Id: Ic1d5e98f371727f0c452495d5f9cb40ec73ffe9d
2013-06-22 15:23:27 +02:00
c17f01753c ...and similarly for __cxa_allocate_exception and __cxa_throw
Change-Id: I87ae299aac97180f0587c553d85b051decca155c
2013-06-20 15:59:09 +02:00
5ba3d1740b Clean up declaration of __cxa_get_globals
At least Clang trunk towards 3.4 now rejects incompatible declarations of the
same extern "C" function in different namespaces, so that trick of getting at
the function that is exported by libstdc++ but only rudimentarily if at all
exposed in cxxabi.h no longer worked.

TODO: This change should be reflected in any other bridges where it is relevant,
too.

Change-Id: Ie3ccbdb7d75cc98636d02c0435958532620724f2
2013-06-20 14:02:48 +02:00
e17ab68dbd fix debug build on s390
... by removing obsolete OSL_ENSURE. nVtableCall was renamed to
nFunctionIndex and the same check is done a couple of lines above.

Change-Id: Id52b69adceb337049c50a599aefc718498d688c0
2013-06-16 07:52:31 +02:00
ec2512209d the header file new.h is obsolete on our platforms
(cherry picked from commit 94e277e997d396ae44e4c13c806fa0f461dafd83)

Conflicts:
	sw/source/core/text/portxt.hxx

Change-Id: Ia785878f2b96704fcf858599afba2535b53d6b6f
2013-06-08 16:36:20 +01:00
6b83934749 fix gcc inline assembler operands usage
Apparently whoever did these didn't get the gcc docs and specified
every operand only as input, and then added volatile, explicit
initialization and what not until it worked. Specify output operands
correctly instead.
I couldn't verify all assembler variants, as I don't know them,
but the ones I don't know had at least some proper usage of output
operands, so I'll assume those are all correct.

Change-Id: I2910308b5e00cce8db756496df50ed26cfe35bb6
2013-06-05 16:01:43 +02:00
211544a5f2 Compiling but not working mingw_x86-64 bridges
Change-Id: I5ea6edf367dd18e60a86d12c523b7732a8ac44d4
2013-06-04 15:15:21 +02:00
5bf53717ec Some configury and non-working stubs to start to compiler for Win64 with MinGW
Change-Id: I907c3ea083e8d7f9e48fc62dd6d5b783639438cb
2013-06-04 14:22:03 +02:00
c759d349f2 optimization fix to UNO bridge's callVirtualMethod() for generic x86_64
if the pCallStack variable is optimized out then any assumptions of the
method's inlined assembler about stack layout collapse. Adding a pseudo
dependency to the pCallStack variable solves that problem

(cherry picked from commit 254359b9ed96152091b8f7a74a3442cf6c553e04)

Conflicts:
	bridges/source/cpp_uno/gcc3_freebsd_x86-64/uno2cpp.cxx
	bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx

Change-Id: I5ba7713c2630bb3ecc4343632e796c38541bcd0e
2013-05-29 10:03:27 +01:00
c95999782e Bypass the type_info generation when using libc++ for gcc3_macosx_intel, too
(It causes linker errors, type_info destructor not found and a few
others. Possibly this is a bug in Apple's libc++abi?)

Change-Id: I50bc97c8e061ff47d4ff16f31d37cfe3b4f5a010
2013-05-28 19:10:21 +03:00
b0a1666f75 Bypass dynamic type_info generation for now when using libc++
The type_info crack is even harder in the libc++ (with Clang, on OS X)
case, sigh. Punt for now and let's see what happens...

Change-Id: I17c3a4d9d933acfbf554649c9ec8b6fb5213f2f0
2013-05-28 17:04:59 +03:00
d77d01b84a add some documentation links to the assembler needed for the UNO bridges
ceterum censeo: good old C-linkage interoperability would be much more robust,
reliable and easier to maintain compared to the current UNO-bridges approach
of emulating the behaviour of the individual compiler, linker, dylib, unwind, etc.
environments and thus being extremely platform specific. What an incredible waste
of energy for little (if any) gain. SCNR.
(cherry picked from commit c9fe5d026f2081d493a198a33cf3b1d558166965)

Conflicts:
	bridges/source/cpp_uno/gcc3_freebsd_x86-64/call.s

Change-Id: I728bce449e8e56572f31b50fb1452d1c2f9d7fea
2013-05-09 15:54:23 +01:00
62badf3828 Move to MPLv2 license headers, with ESC decision and author's permission. 2013-04-22 09:37:38 +01:00
eeaa2ecd1e remove unused component_canUnload functions
Change-Id: Id3f41e2a620c47bb848718d0fc994739be2d64fc
2013-04-19 16:52:03 +02:00
06f53420f6 fdo#60724 convertable -> convertible
Change-Id: I6a742f41305c2b4bd9a60aa3a574f6c02fec4752
2013-04-15 05:41:26 +02:00
79fb6e785e bridges: remove unused .map file
Change-Id: Id6e11cef2bdffd6726ac00f9a30e84cf44efe71e
2013-04-10 21:32:31 +02:00
1946794ae0 mass removal of rtl:: prefixes for O(U)String*
Modules sal, salhelper, cppu, cppuhelper, codemaker (selectively) and odk
have kept them, in order not to break external API (the automatic using declaration
is LO-internal).

Change-Id: I588fc9e0c45b914f824f91c0376980621d730f09
2013-04-07 14:23:11 +02:00
9e6afcf162 Pre-cache type_info for com::sun::ucb::InteractiveAugmentedIOException
It seems to be the type_info most commonly looked up dynamically, even
the only one in an initial test. I think it is a good idea to avoid
dlsym() if possible.

Change-Id: I0379c534e10efefafdd253ee651f6c74e4aa47d5
2013-04-07 01:13:36 +03:00
7aa6f1b014 Remove Mac OS X for PowerPC support
Change-Id: I10b15141e6a5f93365e1cfa6fbc0c7cc3ea49b15
2013-04-03 21:13:17 +03:00
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
aa753f01ba -Wunused-macros
Change-Id: Ifaa1637122d6f9cae1e29b77ac36ca5d1f220aed
2013-03-27 09:36:53 +01:00
013b13fd16 WaE: '__LP64__' is not defined, evaluates to 0
Change-Id: Ie3b740818b6f705b24e2c718dd47f43ebdb2a3e1
2013-03-20 23:05:58 +02:00
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
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
a1fbebff26 Cleanup bridges module
Reduce excessive copy-pasting
Remove bridges for C50 and C52 compilers which aren't in configure any
more
Prevent LTO from being used in the bridges module because it causes
crashes

Change-Id: I7ff85c2e8d6ff89c5acd48aea415e0960b3ef812
Reviewed-on: https://gerrit.libreoffice.org/2765
Reviewed-by: Tor Lillqvist <tml@iki.fi>
Tested-by: Tor Lillqvist <tml@iki.fi>
2013-03-18 07:53:21 +00:00
6dddefc6e7 fdo#43460: use isEmpty()
Change-Id: Ia768e684d3cf255239c04d024b35488830cc9fe6
2013-03-09 21:47:31 +01:00
f6edfefd53 RTL_CONSTASCII_USTRINGPARAM removals
Change-Id: Ib483f271d3c826a2b7192b22a174ff9f7b18c3f8
Reviewed-on: https://gerrit.libreoffice.org/2241
Reviewed-by: Olivier Hallot <olivier.hallot@alta.org.br>
Tested-by: Olivier Hallot <olivier.hallot@alta.org.br>
2013-02-19 22:11:16 +00:00
97eb8a6e0e Removed several useless macros: A2OU, A2S, C2U, C2S, OUSTR, OUSTRING
Change-Id: Ie859cb2dfdc7103c379fce56be88eef8fe390afd
Reviewed-on: https://gerrit.libreoffice.org/1924
Tested-by: Luboš Luňák <l.lunak@suse.cz>
Reviewed-by: Luboš Luňák <l.lunak@suse.cz>
2013-01-30 12:54:40 +00:00
3207c85fc9 Another lacking parenthesis
Change-Id: If5944101688b0219d2476e5c3b29f704634c3bcc
2013-01-20 15:23:12 +01:00
0ff470cff6 iOS C++/UNO bridge fixes
As the inline asm statement stores parameters into r0-r3 we need to
include those registers in the clobber list. Clang happened to store
pMethod in r2 as input to the asm snippet.

iOS uses the basic calling convention, but __ARM_EABI__ is not defined
so amend some ifdefs.

Change-Id: If3d66c5f3baa4dfa13f82a2b5c2ef1ab559ce31b
2013-01-19 23:58:41 +02:00
806535be2b Use SAL logging instead of printfs
Change-Id: I6221e686fa36cd9061a2a0342a48aaadef903acf
2013-01-19 23:58:41 +02:00
9c5bb99403 More snippets, and cosmetics
Change-Id: I150981237dc642e46751f0824aeda53dbdb59e5c
2013-01-19 23:58:41 +02:00
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
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
66a175834c c++ API: use css alias in generated headers, adds global css decl
This changes all generated API headers (.hpp and .hdl) to use a
namespace alias 'css' instead of the pointlessly long com::sun::star

Makes the change in cppumaker & associated tools, adds a global
namespace alias definition in sal/types.h, and removes a kiloton
of local, now pointless-to-harmful versions of that alias from all
over the code.

Change-Id: Ice5a644a6b971a981f01dc0589d48f5add31cc0f
2012-11-30 14:36:36 +01:00
a3ce60eb3c We only support MSVC 2008 (_MSC_VER 1500) or later
We can drop or simplify many conditionals.

Change-Id: I37e820e515cc09845c30b62c89ddb3b6ff370f97
2012-11-28 20:53:40 +02:00
e5e8136c6a re-factor lifecycle issues in FormattedFieldWrapper.
XAggregation.idl has some rather helpful comments on how this
should work.
2012-11-27 12:55:11 +00:00
1d095efaf9 Some ::rtl::OUString -> OUString in bridges
Change-Id: I5412773f9cebc633a78ee5733b62f64b6d1599d4
Reviewed-on: https://gerrit.libreoffice.org/1068
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2012-11-26 22:15:08 +00:00
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 21d97438e2944861e26e4984195f959a0cce1e41.
remove obsolete FreeBSD visibility special case.
retain consolidated BSD bridge code, remove OS/2 pieces.
2012-11-15 16:06:08 +00:00
10511acd08 Revert "sb140: #i117295# use rtl::Static"
This reverts commit d3794d2d8ab2ee3f8118d61538bb753335b37f23.

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
6e67ad64ef rtl::OUString -> OUString in bridges
Change-Id: I292f2007771ab12a30de6cd5a6a1ed436adcff66
Reviewed-on: https://gerrit.libreoffice.org/1057
Reviewed-by: Tor Lillqvist <tml@iki.fi>
Tested-by: Tor Lillqvist <tml@iki.fi>
2012-11-14 11:09:40 +00:00
9a745cbf54 Introdude SAL_JNI_EXPORT and use that instead of JNIEXPORT
Use it in the cases where I yesterday changed SAL_DLLPUBLIC_EXPORT to
JNIEXPORT. It turns out that on Linux JNIEXPORT does not enforce
"default" visibility, but expands to empty.

Change-Id: I033b3cf538715fb596e965e17f3da12fb987df63
2012-11-09 10:51:00 +02:00
031b9d7d86 Use JNIEXPORT to really export these for Android
Now with DISABLE_DYNLOADING, SAL_DLLPUBLIC_EXPORT actually means
hidden visibilty. Which is OK in general as with a single DSO (or a
single executable, for iOS), none of our "normal" entry points need to
be visible froom the outside.

So for the JNI entry points use JNIEXPORT. On "normal" platforms it
should be equivalent to SAL_DLLPUBLIC_EXPORT.

Change-Id: Iad634950e635ac03a0e90cae6d00afd9fb4eeb64
2012-11-09 09:54:12 +02:00
595771d00d More ::rtl::OUString -> OUString in bridges
Change-Id: Ibd29c68077dd8f27c95cd4cb62cd8dad0e18aacf
Reviewed-on: https://gerrit.libreoffice.org/976
Reviewed-by: Radek Doulík <rodo@novell.com>
Tested-by: Radek Doulík <rodo@novell.com>
2012-11-07 12:09:31 +00:00
da67a17d2d ::rtl::OUString -> OUString in bridges
Change-Id: I3a4fa7b108c58f100d2c8a586ec6c76af902e138
Reviewed-on: https://gerrit.libreoffice.org/974
Reviewed-by: Radek Doulík <rodo@novell.com>
Tested-by: Radek Doulík <rodo@novell.com>
2012-11-07 12:06:45 +00:00
bef4daee66 WaE: unused parameter
Change-Id: I3bc0896d1bb8c281e535d8a55ced1dec707b1d76
2012-11-03 09:32:54 +02:00
e9a09f9e4a dummy_can_throw_anything reportedly needed at least with GCC 4.5.1, too
...see
<http://lists.freedesktop.org/archives/libreoffice/2012-October/039995.html>
"RuntimeException while building"

Change-Id: I038806d4ca1d7a2a2518106ba722509fbe3a7843
2012-10-22 13:42:54 +02:00
36a2db3722 Replace usage of rtl_*Memory with equivalent from string.h
Change-Id: I50ffc10f007f03c3252ef0196b59b881429cc159
Reviewed-on: https://gerrit.libreoffice.org/734
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2012-10-01 18:48:05 +00:00
9f5227d66b Make exceptions work better in the x86-64 MacOSX C++-UNO bridge
Putting the privateSnippetExecutor() assembly code as inline asm
inside an otherwise empty C++ function helps, for some reason.

Use the actual _Unwnd_Exception and __cxa_exception definitions as
used by Apple (from opensource.apple.com libunwind and libcppabi
sources) instead of guessing.

Change-Id: I1ef22a9c0c664d3a357b9a6474406141f53cc490
2012-09-27 23:52:22 +03:00