Commit graph

4551 commits

Author SHA1 Message Date
Tor Lillqvist
128749140f More hacking on static linking (iOS) support 2012-03-21 00:00:05 +02:00
Tor Lillqvist
4066e061b4 Need the weird vnd.sun.star.pathname: prefix 2012-03-21 00:00:03 +02:00
Tor Lillqvist
3c5fa6f532 Simply hardcode the inifile as "rc" in the app bundle directory on iOS 2012-03-21 00:00:00 +02:00
Tor Lillqvist
0fbceef557 Clean up OSL_TRACE output a little bit 2012-03-21 00:00:00 +02:00
Luboš Luňák
eb1ffc1a21 sal_osl_module depends on Module_DLL (uses the library) 2012-03-18 12:19:30 +01:00
Michael Stahl
00eebf6403 sal: fix warnings 2012-03-16 22:18:42 +01:00
Jonathan Adams
7b37265b8e sal: remove unx implementation of osl_sendResourcePipe/osl_receiveResourcePipe
These are deprecated and not used in LO.
2012-03-16 22:18:42 +01:00
Stephan Bergmann
6e67c03dc0 Enable -Wnon-virtual-dtor for GCC 4.6
...which has the necessary features to support it.

Change a lot of classes to either contain a protected non-virtual dtor
(which is backwards compatible, so even works for cppumaker-generated
UNO headers) or a public virtual one.

cppuhelper/propertysetmixin.hxx still needs to disable the warning, as
the relevant class has a non-virtual dtor but friends, which would still
cause GCC to warn.

Includes a patch for libcmis, intended to be upstreamed.
2012-03-14 13:32:02 +01:00
Luboš Luňák
01baa9e0c8 checked that we do not use OString ctor with literals with \0's
Except in some unittests, which are sometimes rather silly and
broken about it, which might explain why they're disabled.
2012-03-13 16:21:05 +01:00
Luboš Luňák
3d9f5c856a make OString work even with old gcc that has SFINAE broken
Since OString already has a ctor accepting const char*, I cannot
find out a way to distinguish string literals other than using
a template, otherwise const char* somehow takes precedence
(all of gcc, clang, msvc). But the template requires
the Substitution Is Not A Failure Idiom to actually create
only wanted instances. And the compiler can try evaluate
the OString ctor as a possibility when comparing an int to
an anonymous enum, and anonymous enum as a type without linkage
cannot be a template argument before C++11. SFINAE should still
work, but not with gcc older than 4.0.2 (which we right now
use only on macs). So for that case disable the string literal
ctors, which means macs will have one extra strlen call,
and also that embedded \0's in string literals will be
inconsistent. The tiny performance problem shouldn't matter that
much and will eventually go away, the \0 problem should not
matter, since before string literal ctors were introduced
\0's had not been included anyway unless RTL_CONSTASCII_STRINGPARAM
was used. So we should be safe and when removing the CONSTASCII
macros \0 cases should be handled by explicitly mentioning
the length.
2012-03-13 16:21:04 +01:00
Josh Heidenreich
bde32dc95d Removed FileStatus::isFile. Use ::isRegular instead.
See:
https://bugs.freedesktop.org/show_bug.cgi?id=44982#c6
https://bugs.freedesktop.org/show_bug.cgi?id=44982#c7

for why.
2012-03-13 16:03:32 +10:30
Tor Lillqvist
2b2804b956 Use _NSGetExecutablePath also on iOS 2012-03-13 02:44:00 +02:00
Luboš Luňák
36627af621 SAL_DLLPUBLIC_TEMPLATE
On Linux, public templates should not be hidden at the linker level.
But on Windows, dllimport causes trouble. So create a new macro
to be used specifically with templates that does the right thing
on both platforms.
(http://lists.freedesktop.org/archives/libreoffice/2012-March/028041.html
and followups)
2012-03-12 19:12:49 +01:00
Luboš Luňák
9fabd6c078 handle msvc not even compiling a test that should fail
but that is fine, because outside the unittest it should fail
everywhere
2012-03-12 16:36:59 +01:00
Tor Lillqvist
9895690965 Fix Android compilation error 2012-03-12 15:59:12 +02:00
Luboš Luňák
4f5bc49954 @since 3.6 -> @since LibreOffice 3.6
To help distinguish between OOo derivatives.
2012-03-12 13:35:59 +01:00
Luboš Luňák
814cb6a3d6 implement OUString::endsWithIgnoreAsciiCase()
match() has matchIgnoreAsciiCase(), so it makes sense that endsWith()
also has the IgnoreAsciiCase variant, especially given there already is
endsWithIgnoreAsciiCaseAsciiL()
2012-03-12 13:35:58 +01:00
Luboš Luňák
91752ecd4e also check that string literals do not actually trigger OUString ctors 2012-03-12 13:35:58 +01:00
Luboš Luňák
61327c9948 forgot to disable mixed char and const char overloads
the comment was wrong, char gets converted to const char, not the
other way around
2012-03-12 13:35:58 +01:00
Luboš Luňák
06a6b0ad1e unittest checking basic string literals OUString functions functionality 2012-03-12 13:35:58 +01:00
Luboš Luňák
8bdc0e9c23 unittests for some possible OUString string literal handling problems 2012-03-12 13:35:57 +01:00
Luboš Luňák
3f765e5bb2 replace usage of OUString::replace*AsciiL() with string literal overloads 2012-03-12 13:35:57 +01:00
Luboš Luňák
56e4153e2c replace replace*AsciiL() OUString methods with string literal ones
The AsciiL variants are new for 3.6 anyway, so there's no need to keep
new functions that'd be obsolete before their first release.
2012-03-12 13:35:57 +01:00
Luboš Luňák
46ddefe25d string literal overloads for some OUString methods 2012-03-12 13:35:57 +01:00
Luboš Luňák
a1de256637 some fixes for OUString docs 2012-03-12 13:35:57 +01:00
Luboš Luňák
8c5e68b0f6 make the OUString unittest ctor contain garbage
this will make it easier to detect errors, rather than making it empty
2012-03-12 13:35:56 +01:00
Luboš Luňák
715bdfdd8f prevent using RTL_CONSTASCII_* macros with string literal functions
This is to prevent things like by mistake doing match( RTL_CONSTASCII_STRINGPARAM("foo")),
which will call match(const char(&)[N], int=0), where the second argument is the fromIndex
argument.
2012-03-12 13:35:56 +01:00
Luboš Luňák
53fb5f774e OString ctor for string literals without RTL_CONSTASCII stuff 2012-03-12 13:35:56 +01:00
Luboš Luňák
2f5f802bcf rtl_uString_newFromLiteral() for string literals
Drop the recently introduced rtl_uString_newFromAscii_WithLength()
and replace it with this one. The name fits better and it'll be also
a distinct function that specifically includes embedded \0's
(because that's what OUString supports and if a string literal
explicitly includes it, it makes sense to copy it as such).
2012-03-12 13:35:56 +01:00
Stephan Bergmann
73c9b3c59e osl_loadModuleRelativeAscii was erroneously not exported 2012-03-12 12:18:00 +01:00
Stephan Bergmann
25292b154e module.c -> module.cxx, use sal/log.hxx 2012-03-12 11:54:26 +01:00
Luboš Luňák
820c23d397 sal_Bool to bool in SAL_LOG if possible
otherwise clang warns about things like 1 && 1
2012-03-11 09:57:05 +01:00
Matúš Kukan
84b3f7b345 gbuild: get rid of realpath in gb_Foo_set_include 2012-03-10 21:23:20 +01:00
Luboš Luňák
a680eba9a0 SAL_DLLPUBLIC_IMPORT with gcc should not be empty
Otherwise when using a template from another module, an instance
of it may end up being non-exported even though it's used by
something exported.
2012-03-10 16:39:22 +01:00
Stephan Bergmann
608fe962cc Let osl::FileStatus getters assert programming errors
...instead of arbitrarily returning certain values when the requested
information is not available.

This reveals a problem in strmunx.cxx that is apparently a regression introduced
with 4a086fca7b "fix SvStream to not require a
custom open or lstat method."
2012-03-09 11:56:10 +01:00
Stephan Bergmann
8840765e29 Fixed @since tags 2012-03-09 09:23:08 +01:00
Josh Heidenreich
af5cc38cac sal file.hxx documentation 2012-03-09 08:49:55 +10:30
Josh Heidenreich
b64352905f Added FileStatus methods isFile, isDirectory, isRegular, isLink 2012-03-09 08:49:54 +10:30
Stephan Bergmann
d5cb0636dc In osl::Thread::create, do not access members after starting the thread
...as the Thread may already have been destroyed by that time.
Also, no need to programmatically check fro programming errors when they
have already been addressed by assert.
2012-03-08 14:11:56 +01:00
Luboš Luňák
5420d7092f use the new license header, this file has been written by me 2012-03-07 15:20:37 +01:00
David Tardon
e319053190 probable intent 2012-03-07 14:01:34 +01:00
David Tardon
bed1173cfe WaE: missing braces around initializer 2012-03-07 14:01:34 +01:00
David Tardon
7daafe70db suppress compiler error when building with -Werror
Return value of the function is set by the inline assembler code.
2012-03-07 14:01:33 +01:00
David Tardon
48b419ceb6 WaE: comparison between signed and unsigned integer expressions 2012-03-07 14:01:33 +01:00
David Tardon
c06ec2fdc2 WaE: comparison between signed and unsigned integer expressions 2012-03-07 14:01:33 +01:00
David Tardon
5e259549cb WaE: redefined macro
SD_RECEIVE, SD_SEND and SD_BOTH have been defined in mingw-w64 headers
since the very beginning. I suppose this was only relevant for mingw32,
which we do not support anymore.
2012-03-07 14:01:32 +01:00
David Tardon
7399447c8a WaE: format '%u' expects argument of type 'unsigned int' 2012-03-07 14:01:32 +01:00
David Tardon
e1eae3267b WaE: declaration of '...' shadows a global declaration
pfn_ADDEREXCLUDEDAPPLICATIONW has been defined in mingw-w64 headers
since the very beginning. I suppose this was only relevant for mingw32,
which we do not support anymore.
2012-03-07 14:01:31 +01:00
David Tardon
5c1e188a55 WaE: suggest parentheses around '&&' within '||' 2012-03-07 14:01:31 +01:00
David Tardon
2a9517575d WaE: comparison between signed and unsigned integer expressions 2012-03-07 14:01:31 +01:00