Commit graph

4623 commits

Author SHA1 Message Date
Michael Stahl
4c50f23f87 LinkTarget.mk: remove gb_LinkTarget_add_package_headers 2012-04-08 01:05:53 +02:00
Michael Stahl
c923f7d2c2 gbuild: "use" vs. "add":
Naming convention for gbuild methods:
- "add" is used for stuff that is logically a part of the target
  (i.e. not registered at the Module, but defined in the target's makefile)
- "use" is used for stuff that is logically a different target
  (i.e. it is registered at the Module, has it's own makefile, may be
  in a different module than the target)
2012-04-08 01:05:52 +02:00
Caolán McNamara
63de3197af WaE: msvc, unreachable code 2012-04-07 20:06:38 +01:00
Szabolcs Dezsi
d6bc02f8c4 Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operator 2012-04-06 20:03:42 +02:00
Szabolcs Dezsi
27cea710fd Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operator
Pattern used:

find . -name "*.cxx" -exec sed -i 's/\( *\)\(else if\|if\) *( *\([^!()|&]*\)\.equalsAsciiL( *RTL_CONSTASCII_STRINGPARAM *( *\([^)]*\)) *) *) *{$/\1\2 ( \3 == \4 ) {/' \{\} \;
2012-04-06 20:03:42 +02:00
Luboš Luňák
2dde3c3ebb reset the flag before checking it it will be set again 2012-04-06 16:15:09 +02:00
Luboš Luňák
d91d98a536 fix gcc-4.0.1 and/or 32bit build for string literals
Plain 0 is ambiguous to convert to either long or const char*,
and just adding an overload next to sal_Int32 would be a dupe if
they actually are the same type, so just go with plain int, which
is the sensible thing to do anyway.
2012-04-06 15:10:06 +02:00
Szabolcs Dezsi
743f22045c Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operator
Pattern used:

find . -name "*.cxx" -exec sed -i 's/\( *\)\(else if\|if\) *( *\([^!()|&]*\)\.equalsAsciiL( *RTL_CONSTASCII_STRINGPARAM *( *\([^)]*\)) *) *)$/\1\2 ( \3 == \4 )/' \{\} \;
2012-04-06 15:07:41 +02:00
Luboš Luňák
066dbfd197 string literal O(U)StringBuffer ctors too, after all 2012-04-06 13:46:21 +02:00
Tor Lillqvist
0d5f437bf7 Catch attempts to open /assets files read-write. Improve debugging output 2012-04-05 20:46:28 +03:00
Mark Wolf
8307fe9f65 Translated German comments to English in folder 'sal'.
sal/qa/rtl_strings/rtl_old_testostring.cxx contains some German comments still
but the code itself uses test strings in German. When the test strings appear
in the comments, they were left unchanged to maintain consistency.

Mark Wolf
2012-04-05 12:33:59 +02:00
Stephan Bergmann
09be30729e Minor tweakings 2012-04-04 15:25:38 +02:00
Tor Lillqvist
9b9f70737e SAL_REINTERPRET_CAST returns, for API stability (for 3rd-party extensions) 2012-04-03 20:37:03 +03:00
Luboš Luňák
2ac5b08361 try including the ostream<<OUString operator directly with OUString
The theory is that

- the operator is suboptimal, because it always uses utf-8 as the encoding,
  which might possibly lead to some encoding problem somewhere

but

- the SAL_LOG macros need it anyway, or they are otherwise cumbersome
  with OUString
- as people learn to use the macros more, rtl/oustringostreaminserter.hxx
  will be included in more and more places, eventually possibly triggering
  the above problem anyway
- people probably should not just blindly do ostream << oustring if they
  have special encoding requirements

So let's try to simply always have the operator available and see how
it works out.
2012-04-03 18:16:38 +02:00
Luboš Luňák
f46775a206 SAL_DEBUG(), instead of those temporary debug printf's 2012-04-03 18:16:38 +02:00
Tor Lillqvist
61c5883f4c Simplify SAL_CONST_CAST and SAL_STATIC_CAST defns, mention they are obsolete 2012-04-03 18:30:39 +03:00
Luboš Luňák
c813c00947 don't skip first cmdline argument
It looks like this one is also meant to be called manually or something,
and the original version didn't skip the first argument either.
2012-04-03 14:06:12 +02:00
Luboš Luňák
d5c5800bff I'm dumb, fromAscii() stops at \0. 2012-04-03 07:41:55 +02:00
Luboš Luňák
a7eb227cfc fix crude command line arguments handling 2012-04-02 19:06:47 +02:00
Luboš Luňák
174a1d3c3d fix very ... uhm ... inventive and confusing use of empty string 2012-04-02 19:06:46 +02:00
Luboš Luňák
60b596665f warn on \0 embedded in string literals, after all
Seeing 791f276833 I've changed my mind,
some embedded \0 can be actually well hidden:
struct foo { const char txt[3]; };
const foos[] = { { "a" }, { "bb" }};
If somebody wants an embedded \0 in a string literal, they need to
say it explicitly by specifying the size.
2012-04-02 16:58:13 +02:00
Michael Meeks
54bc030517 sal: reduce allocation thrash in URI encode / decode
This saves 1% of string allocation / destruction on startup.
2012-04-02 14:50:41 +01:00
Michael Meeks
1426d4432c sal: expose more stringbuffer related instrumentation points
Avoid ref/unref pair in makeStringAndClear, hook into the
stringbuffer-like 'String' class to expose it's conversion to
immutable strings, and fixup misc. missing instrumentation.
2012-04-02 13:51:55 +01:00
Tor Lillqvist
a9a50cd9ff Refactor where patch_libgnustl_shared() and extract_files() are called 2012-04-02 12:39:52 +03:00
Tor Lillqvist
d975f4aab2 Add a JNI_OnLoad() to store the JavaVM* also from non-NativeActivity apps 2012-04-02 12:39:52 +03:00
Matúš Kukan
033cd1d41f sal: rtlbootstrap.mk was empty on cygwin
This needs proper fix. It wasn't noticed because it was created by pipe
before afd5eb1f04 and last command
succeeded, so make continued even if compilation failed.
2012-04-01 00:49:46 +02:00
Matúš Kukan
afd5eb1f04 sal: use CustomTarget makefile 2012-03-31 22:49:29 +02:00
Tor Lillqvist
bef7a8c054 Use correct JNI name mangling of underscores 2012-03-30 19:52:32 +03:00
Luboš Luňák
1b9772c6ed do not just warn on allocation failure, simply abort 2012-03-30 17:34:17 +02:00
Luboš Luňák
d537da41d7 no bad_alloc throwing in string literal O(U)String functions
String literals should be reasonably short, and if memory is so low
that they trigger allocation failure, something else would would
trip over very soon anyway.
2012-03-30 17:34:17 +02:00
Michael Meeks
81a4e4ba99 sal: add a more permanant set of annotations for lifetime tracking.
Having done this on a temporary basis a couple of times before,
it'd be good to avoid having to do the instrumentation again.
2012-03-30 15:15:27 +01:00
Luboš Luňák
8aa60b51a9 (const) char[] (i.e. size unknown) cannot be used with O(U)String
msvc can't handle the necessary template overload (and maybe it's
right, I'm not sure)
2012-03-29 11:12:22 +02:00
Tor Lillqvist
1ea166153b No CppunitTest_sal_osl_process for iOS either 2012-03-29 09:49:46 +03:00
Luboš Luňák
dbf238ba0a (const) char[] is a plain C string type too
and it's size is not known, so it cannot be taken as a string literal
2012-03-29 07:42:20 +02:00
Luboš Luňák
552ba413bc fix SFINAE detection of const char[N] for msvc 2012-03-29 00:50:13 +02:00
Luboš Luňák
bb070c05b6 CPPUNIT_ASSERT_EQUAL() takes expected as the first argument 2012-03-28 23:48:55 +02:00
Luboš Luňák
c9167bac18 gcc-4.0.1 SFINAE workarounds 2012-03-28 23:40:10 +02:00
Luboš Luňák
ef87e804ec string literal overloads for OStringBuffer 2012-03-28 23:00:55 +02:00
Luboš Luňák
b741f7fb1e make unittest check also for invalid conversions with OUStringBuffer 2012-03-28 23:00:55 +02:00
Luboš Luňák
bd577aa7f8 string literal overload for OUStringBuffer::insert() 2012-03-28 23:00:54 +02:00
Luboš Luňák
bf68985627 string literal overload in the right place 2012-03-28 23:00:54 +02:00
Luboš Luňák
60573363d8 clean up string literal overloads in OUStringBuffer 2012-03-28 23:00:54 +02:00
Luboš Luňák
8594c4c52a OUString does not have any non-const char functions, no need to check for it 2012-03-28 23:00:54 +02:00
Luboš Luňák
8a654fe9a5 use SFINAE to remove non-const char[N] OUString overloads 2012-03-28 23:00:54 +02:00
Luboš Luňák
81e7364f52 move string helper types to stringutils.hxx 2012-03-28 23:00:53 +02:00
Luboš Luňák
86a1e6de4f SFINAE workarounds for gcc-4.0.1 2012-03-28 17:51:58 +02:00
Tor Lillqvist
6db50818c1 Add JNI wrapper for InitUCBHelper() and call it 2012-03-28 16:57:59 +03:00
Caolán McNamara
e320d81cd8 stray debugging line 2012-03-28 13:26:25 +01:00
Caolán McNamara
d2ed905c85 when run under memcheck allow SIGUSR2 to dump current memory allocations 2012-03-28 13:08:58 +01:00
Caolán McNamara
f3876e3f4d these VALGRIND allocator annotations never worked for me, just busted memcheck 2012-03-28 13:08:58 +01:00