Commit graph

611 commits

Author SHA1 Message Date
August Sodora
a0ebf6ee3f Revert "callcatcher: Remove unused code"
This reverts commit bbad7057b2.
2011-12-22 20:29:18 -05:00
August Sodora
bbad7057b2 callcatcher: Remove unused code 2011-12-22 19:55:53 -05:00
Caolán McNamara
c1d49234e5 tweak for pre language-defect #77 2011-12-21 13:44:52 +00:00
Caolán McNamara
5c24789ca3 disentangle Read/WriteByteString OUString variants
The ones which use a definite 8-bit encoding read/write pascal-style
strings with a 16bit length prefix.

The ones which use a definite 16-bit encoding read/write pascal-style
UTF-16 strings with a 32bit length prefix, i.e. not ByteStrings at all

The "I dunno" ones might be UTF-16 strings or 8-bit strings, depending
on the charset. Rename to ReadUniOrByteString like the other
similar horrors to flag this misery
2011-12-21 13:44:52 +00:00
Caolán McNamara
c4f0efc237 convert ReadByteString/WriteByteString from ByteString to OString
Nobody ever used the return values anyway, so for reading just
return the string and for writing the number of bytes written

Doesn't need to be members, make standalone functions

Rename  to
read_lenPrefixed_uInt8s_ToO[U]String and
write_lenPrefixed_uInt8s_FromO[U]String, lengthy,
but much less unambiguous, seeing as a lot of users of it don't
seem to be aware that they read/write pascal-style length
prefixed strings, which isn't surprising given the
apparent simplicity of their original name.

added a unit test
2011-12-21 13:44:52 +00:00
Caolán McNamara
6708977331 needs more work first
This reverts commit 92f396733e.
2011-12-21 10:30:10 +00:00
Caolán McNamara
fffae28952 bah, need to tweak for pre c++0x
This reverts commit d00fc0e293.
2011-12-21 10:29:33 +00:00
Caolán McNamara
d00fc0e293 disentangle Read/WriteByteString OUString variants
The ones which use a definite 8-bit encoding read/write pascal-style
strings with a 16bit length prefix.

The ones which use a definite 16-bit encoding read/write pascal-style
UTF-16 strings with a 32bit length prefix, i.e. not ByteStrings at all

The "I dunno" ones might be UTF-16 strings or 8-bit strings, depending
on the charset. Rename to ReadUniOrByteString like the other
similar horrors to flag this misery
2011-12-21 10:10:58 +00:00
Caolán McNamara
92f396733e convert ReadByteString/WriteByteString from ByteString to OString
Nobody ever used the return values anyway, so for reading just
return the string and for writing the number of bytes written

Doesn't need to be members, make standalone functions

Rename  to
read_lenPrefixed_uInt8s_ToO[U]String and
write_lenPrefixed_uInt8s_FromO[U]String, lengthy,
but much less unambiguous, seeing as a lot of users of it don't
seem to be aware that they read/write pascal-style length
prefixed strings, which isn't surprising given the
apparent simplicity of their original name.

added a unit test
2011-12-21 10:10:58 +00:00
Matteo Casalin
864bc59e66 Removed COMPRESSMODE_FULL support from SvStream 2011-12-19 21:56:53 +01:00
Matúš Kukan
f958657cc5 gcc-trunk: fix error: unable to find string literal operator 'operator"" FOO' 2011-12-16 21:20:08 +01:00
Caolán McNamara
5c1490fa4b add some comments 2011-12-15 12:22:50 +00:00
Caolán McNamara
66c3655a07 convert ReadCString from ByteString to OString
Nobody ever checked the return value anyway, so just return the string
and use the stream state bits if necessary to find failures.

Doesn't need to be a member, make a standalone function

Rename it to read_zeroTerminated_uInt8s_AsO[U]String, stupid perhaps,
but *shrug*, unambiguous.

Drop misleading overloaded String variants use:
read_zeroTerminated_uInt8s_AsOString or
read_zeroTerminated_uInt8s_AsOUString

added a unit test, valgrinded it, found and fixed invalid read
in original implementation.
2011-12-15 12:22:49 +00:00
Caolán McNamara
ace8398c57 drop unused ReadCString with hidden StreamCharSet monstrosity 2011-12-15 12:22:49 +00:00
Caolán McNamara
f356303302 strip ByteClass down some more 2011-12-14 13:40:07 +00:00
Rafael Dominguez
37785dde4b Remove unused macros. 2011-12-12 12:28:59 +00:00
Caolán McNamara
87ec1f8857 callcatcher: remove unused code post automation removal 2011-12-09 13:57:16 +00:00
August Sodora
2ef7f7efbf Remove testtoolloader 2011-12-07 14:57:24 -05:00
Marcel Metz
072b137387 Remove unused tools/stack.hxx 2011-12-05 22:54:55 +01:00
Stephan Bergmann
98aa853504 Also demote DBG_ASSERTWARNING to SAL_INFO, to reduce output clutter. 2011-12-02 11:28:17 +01:00
Eike Rathke
86adb5cacb get rid of class Date and Time default ctor with system time penalty 2011-12-01 21:04:29 +01:00
Eike Rathke
2b2f6abfcc introduced Date::IsValidDate() and Date::Normalize()
+ IsValidDate() checks only day and month regarding the year, not Gregorian
  cut-off date as now does IsValidAndGregorian().
+ Normalize() carries over invalid day and month values to next months and
  years.
* All methods that return or internally use a day count now internally
  normalize the date values, without modifying the actual Date instance. So,
  if the date is not valid you may get unexpected results.
  * Previously, a date with month>12 would had accessed the days-of-month
    array out of bounds on all such methods. So you would had gotten
    unexpected results anyway..
  * Affected methods are:
    GetDayOfYear()
    GetWeekOfYear()
    GetDaysInMonth()
    static DateToDays()
2011-11-30 02:46:55 +01:00
Eike Rathke
dca69d5bb2 renamed Date::IsValid() to IsValidAndGregorian() to prevent misassumptions
Once smaller than 1582-10-15 decrementing a Date will not produce a valid date.
2011-11-30 02:05:22 +01:00
Norbert Thiebaud
c0bed9c72e remove precompiled_xxx.hxx/cxx 2011-11-27 18:07:55 -06:00
Norbert Thiebaud
5f7649aead remove include of pch header from tools 2011-11-27 13:25:56 -06:00
Korrawit Pruegsanusak
c3dc018984 typos fixing 2011-11-27 15:12:07 +07:00
Caolán McNamara
6312367fb8 ByteString->rtl::OString 2011-11-25 09:56:38 +00:00
Stephan Bergmann
360043b30e demoted plentiful DBG_WARNING etc. to SAL_INFO 2011-11-25 10:51:13 +01:00
David Tardon
fba911fea7 gsl_getSystemTextEncoding -> osl_getThreadTextEncoding 2011-11-25 09:07:49 +01:00
Caolán McNamara
56d168cc59 strip down old string class some more 2011-11-24 15:29:52 +00:00
Caolán McNamara
2dba28faae add string::strip, can replace EraseLeadingAndTrailingChars 2011-11-23 23:16:44 +00:00
Stephan Bergmann
0c7bff0271 Changed sal/log.h -> sal/log.hxx, drop _S from C++ streaming log macros.
A compile time check ensures the common case of streaming just a plain
C-style string literal still produces reasonably compact call-site code.
The format-string variants are still available in sal/detail/log.h, but
only to be used in obsolete osl/diagnose.h etc., and going to be removed
again eventually.
2011-11-23 15:50:58 +01:00
Caolán McNamara
d05f4d3a7e convert inlines as well 2011-11-23 10:10:08 +00:00
Caolán McNamara
20153742d2 add a stripStart, can replace EraseLeadingChars 2011-11-23 10:10:08 +00:00
Stephan Bergmann
70a6b9ffbd New sal/log.h obsoletes osl/diagnose.h and tools/debug.hxx.
* New SAL_INFO..., SAL_WARN... macros.
* New SAL_STREAM supersedes OSL_FORMAT.
* oustringostreaminserter.hxx moved from unotest to rtl (and always UTF-8 now).
* TODO to enable GCC __attribute__((format)) in sal/log.h (requires call-site
  cleanup).
* Further functionality in tools/debug.hxx (DBG_MEMTEST, DBG_CTOR, etc.) not yet
  addressed.
* Some replacements tools String -> rtl::OUString.
2011-11-22 09:41:47 +01:00
Caolán McNamara
2a2fbbecc0 ByteString->rtl::OString 2011-11-21 15:54:39 +00:00
Caolán McNamara
e4d90aef94 ditch last ENABLE_STRING_STREAM_OPERATORS 2011-11-21 09:17:11 +00:00
Caolán McNamara
445065d113 ByteString->rtl::OString[Buffer] 2011-11-19 21:11:03 +00:00
Caolán McNamara
4e7fff380a remove ENABLE_BYTESTRING_STREAM_OPERATORS 2011-11-19 21:11:02 +00:00
Caolán McNamara
ca02d72808 remove [Byte]String::EraseAllChars 2011-11-19 21:11:02 +00:00
Norbert Thiebaud
993f9f7c89 Re-do Removed tools/dynarray.hxx , now that binfitler is ready for it 2011-11-19 12:43:33 -06:00
Norbert Thiebaud
6db8af3e8b Revert "Removed tools/dynarray.hxx", break binfilter
This reverts commit 89a783cde0.
2011-11-19 10:14:18 -06:00
August Sodora
89a783cde0 Removed tools/dynarray.hxx 2011-11-18 23:24:34 -05:00
Caolán McNamara
c4927a1b76 ByteString->rtl::OString[Buffer] 2011-11-17 23:04:10 +00:00
Caolán McNamara
f24268cae3 we can drop unqid.hxx entirely post move to binfilter 2011-11-16 13:24:06 +00:00
Ivan Timofeev
a47a5ed0a5 always explicitly handle empty string of ranges 2011-10-24 00:16:18 +04:00
Ivan Timofeev
3d5caa7ce3 StringRangeEnumerator cleanup
* do not allow default unbounded min and max, syntax of the input string
  requires them
* simplify logic, remove unused methods, make the class immutable, actualize
  documentation
2011-10-24 00:10:33 +04:00
Ivan Timofeev
d72701bba6 bye-bye old range parser 2011-10-20 23:11:17 +04:00
Ivan Timofeev
9cbc1c3253 no need to return size_t instead of sal_Int32 2011-10-08 22:24:21 +04:00
Ivan Timofeev
6dcfa9d2ae allow parsing of joined ranges
i.e. "1-4-2" means "1,2,3,4,3,2" now. This is for eliminating ambiguity,
it is doubtful whether users will find this useful.
2011-10-08 22:20:42 +04:00