Commit Graph

61 Commits

Author SHA1 Message Date
fa2045807a Improve output in case of test failure
Change-Id: If094349998d41972f50e12363a5a223ee87fdcec
2014-02-12 08:07:47 +01:00
71eb27376a css.xml.sax service ctor clean-up
Change-Id: I556904861e93a145cfe65f61218926851e4e8eb0
2013-12-19 13:35:39 +01:00
0b2bc82f3c Improve CPPUNIT_ASSERTs
Change-Id: I971602ce562ae0e11be5ac7b4d1eefbd342b625c
2013-12-17 16:56:35 +01:00
cc407e50e8 sax, xmloff: fix ODF import/export of text:time/text:time-value
The value written for an Impress time field is something like
text:time-value="0000-00-00T23:28:07" (in LO 3.5+) or
text:time-value="0-00-00T23:28:07" (in OOo 3.3) which contains an
invalid all-zero date.  Such values are actually rejected by the
ODF import since commit ae3e2f170045a1525f67e9f3e9b7e03d94f2b56b.

Actually there was no real support to read the RelaxNG type
timeOrDateTime before.

So fix that by:
- adding convertTimeOrDateTime/parseTimeOrDateTime functions to
  sax::Converter
- recognizing and ignoring the 2 invalid all-zero values written by
  LO 3.5 and historic OOo respectively
- writing a bare "time" in text:time-value if the DateTime struct
  contains zero Date members
  (Older OOo versions and AOO cannot actually read that, but everything
  they _can_ read is invalid ODF...)

Change-Id: I754076caee74a5163ed3f972af0f23796aa14f9f
2013-12-10 15:28:53 +01:00
6cc508aec4 Remove comphelper::ComponentContext
Change-Id: Idc5974e5a2ec68e8f1b2312a88fab15092c82788
2013-10-21 23:30:59 +02:00
b13c8de265 FastTokenHandler service should apparently have a default constructor
Change-Id: Iad5c4e05832128b5f41860cc4ae96f0472c37491
2013-10-21 22:57:10 +02:00
b9c9874853 sax: fix build: needs explicit type
Change-Id: I5a5c52215b0177d663f0694515240c3f95a3ab40
2013-10-17 21:57:21 +02:00
86501dd6e0 sax: add unit test for FastAttributeList
Change-Id: Ie87c80383991dca84b4f6e2074c5c53567ded0b6
2013-10-17 21:38:34 +02:00
dffb0782bb sax: add unit test for FastSaxParser
Adapt FastSaxParser so that it does not require XFastDocumentHandler.

Change-Id: I7af49752dfbb4b55b8dde094fe6b762bd179be78
2013-10-17 21:38:33 +02:00
aa5683e18d fixup SAL_INFO macros to actually print the strings
Change-Id: I26bf8376d27f7fcbf8a83b7356d252dce9061fcb
2013-08-04 01:58:44 +02:00
68a4d1f755 sax converter unittest: test accept trailing zeros in fractional seconds
Change-Id: I3b6080df1cf8c13b5c0781c34c7806ac3c2cfbc7
2013-08-04 01:56:36 +02:00
20cbf5bd30 i#108348: support DateTimeWithTimezone in user defined Document Properties
- fix interface of sax::Converter to allow passing time zones
  (rename the parsing methods while at it to reduce pointless overloading)
- SfxDocumentMetaData supports DateWithTimezone and DateTimeWithTimezone
  in user-defined properties
- add some ugly hacks to SfxCustomPropertiesPage to preserve existing
  time zones (which are not displayed in UI currently)

Change-Id: Ice94112b9d79c285f80b5beda15f0ace91db97f3
2013-07-15 15:23:25 +02:00
652ccbdf31 i#108348 API CHANGE: add IsUTC to css.util.DateTime etc.
Add IsUTC member to:

com.sun.star.util.DateTime
com.sun.star.util.DateTimeRange
com.sun.star.util.Time

Add new stucts with explicit time zones:

com.sun.star.util.DateTimeWithTimezone
com.sun.star.util.DateWithTimezone
com.sun.star.util.TimeWithTimezone

Adapt the sax::Converter to read/write timezones, and fix the unit test.

Everything else just uses default (no time zone), this commit is just
to fix the API.

STRUCT: /UCR/com/sun/star/util/DateTime
    nFields1 = 7  !=  nFields2 = 8
    Registry2 contains 1 more fields
STRUCT: /UCR/com/sun/star/util/DateTimeRange
    nFields1 = 14  !=  nFields2 = 15
    Registry2 contains 1 more fields
STRUCT: /UCR/com/sun/star/util/Time
    nFields1 = 4  !=  nFields2 = 5
    Registry2 contains 1 more fields

Conflicts:
	sc/source/filter/oox/unitconverter.cxx

Change-Id: I01f7a6d082a6b090c8efe71d2de137474c495c18
Reviewed-on: https://gerrit.libreoffice.org/4833
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2013-07-15 11:46:41 +00:00
56dc79822d i#108348 sax::Converter: support negative date and dateTime
Change-Id: Ie2726c7ec941a5690e053d39212d7f516e2c27ba
2013-06-29 18:31:25 +02:00
9830fd36db date/time IDL datatypes incompatible change
- nanosecond precision
 - signed (allowed negative) year

Also: assorted improvements / bugfixes in date/time handling code.
Some factorisation of copy/pasted code.

Change-Id: I761a1b0b8731c82f19a0c37acbcf43d3c06d6cd6
2013-04-18 21:34:46 +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
ef1d096ddc fdo#43157 - Clean up OSL_ASSERT, DBG_ASSERT
- replaced osl_trace with sal_info
 - added new log areas to log-area.dox

Change-Id: Ib47c4b4c9604bca1f8a635dd01bb89702b47b591
Reviewed-on: https://gerrit.libreoffice.org/2010
Reviewed-by: Thorsten Behrens <tbehrens@suse.com>
Tested-by: Thorsten Behrens <tbehrens@suse.com>
2013-02-19 16:02:40 +00:00
5e6ba595f3 warning C4310: cast truncates constant value
Change-Id: I3ebaec3953f86e8f42937e29fad54bafe87900fa
2012-08-15 14:58:33 +02:00
426f4c8dd1 sigh.. MSVC warning C4146: unary minus applied to unsigned type?
Change-Id: Ic2bbde637fd0a074f89b5ffa7af6e87d7cb408c5
2012-08-15 14:56:39 +02:00
8ea65d9f89 oops forgot #include limits
Change-Id: I49161e270eda68d693181c3fff578ba5511bc6d4
2012-08-15 14:40:12 +02:00
85ebb3d85e overflow in implicit constant conversion [-Werror=overflow]
Change-Id: I4fa1168a06118066c72a66801d911a49653f425f
2012-08-15 13:59:01 +02:00
0456089759 decodeBase64 test is done and working
Change-Id: I4dfc20e0e577f986c626d4c4bab5b4e3214e4567
2012-08-15 13:42:19 +02:00
57cac07a4d encodeBase64 test is working
Change-Id: I598ea47ff02b15fdb1d7ff3992d2c660f5a41c95
2012-08-15 13:42:19 +02:00
9f2a303b99 added some extreme values in string-to-measure test
Change-Id: I8fd9029f42159444e7bb56f89eeb83fdb3745732
2012-08-15 13:42:18 +02:00
36955a6e1e 'string to number' test covered
Change-Id: Ib8a81edce168be5babd1bcd62746199de77c2ade
2012-08-15 13:42:18 +02:00
daae18fd8f 'number to string' test covered
Change-Id: Ic6bdc9448509e6f8251709c22576cc10cf9b8eb2
2012-08-15 13:42:18 +02:00
ecb8115340 'string to color' test covered
Change-Id: I024296d1f71bd06837547cd8af3adc2cf2830b95
2012-08-15 13:42:17 +02:00
1edec50b9d 'color to string' test covered
Change-Id: Ia65d1bef19ec02efbb5d7dd784d4cc48c3dd51f2
2012-08-15 13:42:17 +02:00
d2ab20971b 'percent to string' test covered
Change-Id: I6966191a3adde0af318021ce8eec910763c42585
2012-08-15 13:42:17 +02:00
d54174970b 'string to percent' test covered
Change-Id: Ib18e28cba03c7032e8a446449b2839e7b7534133
2012-08-15 13:42:16 +02:00
d2bffadb60 'bool to string' test covered
Change-Id: I8ee1142b2a68799a650f501e2fe491a5ed8d7a5e
2012-08-15 13:42:16 +02:00
764a1245ec 'string to bool' test covered
Change-Id: I6613167703974d802d17d7fd8cdf0f552721c33c
2012-08-15 13:42:15 +02:00
63cd59d691 'measure to string' test covered in test_converter.cxx
Change-Id: If764eb4d87db93dc2907bc21fb1b9f10687a7ee4
2012-08-15 13:42:15 +02:00
7200187987 Added testing 'measure to string' function
Change-Id: I36de98025ec72230cd960191ab47ab39ce965cc5
2012-08-15 13:42:15 +02:00
978c6b87a3 All the MeasureUnit values are covered in converter test
Change-Id: I6c447bb3948566ad10d9935397089ed1fceac1da
2012-08-15 13:42:14 +02:00
22f295551c Started testing measures in converter test, first: string to measure
Change-Id: I96296b75d7c1f131a96add9dd17dfbffa079e343
2012-08-15 13:42:14 +02:00
60cfa64345 Bin no longer used iOS cppunit stuff that even breaks the build
Change-Id: I459f7fd097a81ef5977974f52b0cc2c2f155a810
2012-08-02 19:16:53 +03:00
6736ca4bb9 another unit test issue 2012-06-29 13:01:14 +01:00
e18655e475 re-base on ALv2 code. 2012-06-27 19:30:33 +01:00
328e2263fb targetted re-work of cppunit pieces. 2012-06-27 19:13:11 +01:00
ee376102be fdo#48969: add unit test for Converter::convertDouble 2012-04-20 20:54:29 +02:00
0d9757e432 sax: ConverterTest: add leap year tests 2012-02-29 14:09:18 +01:00
a97a5310f9 we are W3C XMLSchema here, not ISO 8601 2011-12-01 23:00:37 +01:00
7613359985 handle dates with year < 1000
* Read dates with years consisting of less than 4 digits.
  ISO 8601 specifies that years are to be written with a minimum of 4 digits.
  However, be lenient in what we accept.
* Write years < 1000 with leading zeros to comply with ISO 8601 YYYY.
2011-11-30 02:05:25 +01:00
6671fa81db Removed uses of rtl::O[U]String[Buffer]::operator sal_{char|Unicode} const *(). 2011-09-27 20:22:03 +02:00
be6a8677a6 OSL_TRACE: Remove trailing newlines
Done with perl regex:
s/(\n\s*OSL_TRACE\(\s*\"[^\n]+?)\s*(\\n)+(\"[^\n]*\)\;\n)/$1$3/gs;

- removed trailing whitespaces and (multiple) newlines
2011-09-21 09:28:39 +02:00
9cff65d6dd Removed leftover makefile.mk after gbuildization. 2011-09-16 11:25:22 +02:00
d996328cd5 sb140: #i113503# mixing system CppUnit and OOo STLport does not work, backed out a6913c9677c2
For LibO, that just means replacing sal/cppunit.h with sal/precppunit.hxx.
2011-09-12 22:47:50 +02:00
30ad5e9d87 sb140: #i117694# some CppUnit related cleanup 2011-09-12 22:47:48 +02:00
3f07bf808c Add static sax cppunittester for iOS 2011-08-02 22:25:23 +03:00