Commit Graph

90 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
56dc79822d i#108348 sax::Converter: support negative date and dateTime
Change-Id: Ie2726c7ec941a5690e053d39212d7f516e2c27ba
2013-06-29 18:31:25 +02:00
830cc95abb sax: FastSaxSerializer: add well-formedness assertions
In an --enable-dbgutil build, assert on the following XML
well-formedness violations:

* Element Type Match (-> start/end tag mismatch)
* Unique Att Spec (-> duplicate attributes)

Change-Id: I1d5c405b4316ba941be1db7df6cacf00b5837261
2013-06-05 16:55:51 +02:00
cb6d67c21f Spelling "separate" (etc) correctly is hard 2013-05-15 11:14:28 +03: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
f32677968a Remove RTL_CONSTASCII_(U)STRINGPARAM in scaddins/sax
Change-Id: Ic4f9bef02cc4bdc74b9a6d81e3317e10b9c79bd4
2013-04-01 22:12:22 +02:00
aa753f01ba -Wunused-macros
Change-Id: Ifaa1637122d6f9cae1e29b77ac36ca5d1f220aed
2013-03-27 09:36:53 +01: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
2c17beb796 Wundef, fix various more or less broken debug code
Change-Id: I347495f7960da099afdfbf3db608e0347b832f99
2013-03-18 17:15:57 +01:00
1f2c079dd2 sax: add methods to duplicate current top marker and reapply it later
The need for this is ooxml: we need to have a duplicate entry (rPr)
like this:
<p>
  <pPr>
     <rPr>...</rPr>
  </pPr>
  <r>
     <rPr>...</rPR>
  </r>
</p>
This patch allows to do that by setting aside a copy of the <rPr> line,
and then merging the copy when needed.

Change-Id: I3868a822aa9e5210f3d814c68398a38f95072cd5
Reviewed-on: https://gerrit.libreoffice.org/1648
Reviewed-by: Noel Power <noel.power@suse.com>
Tested-by: Noel Power <noel.power@suse.com>
2013-01-14 15:51:14 +00:00
612981fc8f callcatcher: update and remove newly unused code
Change-Id: Iff3ce7c3a44010b3bc81fc0d2156216ee13948dc
2013-01-13 23:02:37 +00:00
b3a1909a79 added Converter::convertColor with opacity parameter
Change-Id: I0f3759d8f75f2739b2815c37e8c81bc97e097ec8
2013-01-07 19:39:46 +01:00
9c17f2b24b wrap vararg sax functions in typesafe overloads
Now automatic conversions can take place (no getStr() needed),
and there are compile errors when used improperly. The FSEND terminator
is also no longer needed, but it's better to dump it only after
forgetting it no longer silently breaks backports.

Change-Id: Ib47e6eda2d5e12ce889b69bf2affbda3679c2d3f
2012-12-19 12:20:00 +01:00
9decde005b sax: FastSaxSerializer: cannot do anything without a stream
Change-Id: If2fbfe776039fe1a3104d541279ab52f219f45bf
2012-11-11 17:00:42 +01:00
b7c41f1d1f unusedcode: FastSaxSerializer is not used through UNO
Change-Id: I07d7b78be200f5f4a0674361237ef45b2bd1e3e1
Reviewed-on: https://gerrit.libreoffice.org/651
Reviewed-by: Miklos Vajna <vmiklos@suse.cz>
Tested-by: Miklos Vajna <vmiklos@suse.cz>
2012-09-20 08:32:39 +00:00
2ecd5b0372 sax: com.sun.star.xml.sax.FastSerializer seems to be unused
Change-Id: I826da00c83589f468c499879d86546d60b2aa515
Reviewed-on: https://gerrit.libreoffice.org/480
Reviewed-by: Michael Meeks <michael.meeks@suse.com>
Tested-by: Kohei Yoshida <kohei.yoshida@gmail.com>
2012-09-08 03:17:27 +00:00
5b57402ac4 sax: avoid pointless linking expwrap against sax
..only to share one class with fastsax in sax, where it's not used.
The link dependency is ugly, mostly for libmerged.
Use static library.
Another option would be to link fastsax against expwrap.

Change-Id: Ia85b01150959e2472d1ac04013b8b9a27232a070
2012-08-24 23:22:42 +02:00
e18655e475 re-base on ALv2 code. 2012-06-27 19:30:33 +01:00
3be786451b gbuildification of sax
Change-Id: I6e8220e88566e04b20687d54181205d31ec68e13
2012-06-16 06:58:09 -05:00
017b1c5d0a Targeted string re-work in padmin and sax 2012-06-01 17:07:47 +02:00
df34ccb01d remove unneeded include of boost/bind.hpp
Change-Id: I5a254459a491b9547530d8e312260dceed21f25c
2012-05-16 15:05:36 +01:00
62a0b24057 fdo#48969: GetConversionFactor: add inch as source unit
Also, add whole bunch of missing cases while at it.
2012-04-20 20:54:28 +02:00
84aeb737c7 fdo#48969: switch units in Converter::convertDouble
The factor here is used to divide, so the parameters have to be
switched; this has always been broken but probably before
3ca2bef76886450058d1667703aeafe4c2e456c3 nothing called this.
This also reverts 7bf1fa3757133f12cf6ca624f8cee6ba5363e7d8 because
that was a workaround for the problem in the wrong place.
2012-04-20 20:54:16 +02:00
1018d69bda escape \n and \r too in escapeXml() 2012-04-12 17:11:36 +02:00
15f14ec794 reorganize trickier statics 2012-04-02 14:53:48 +01:00
3c993bd0c3 Correctly calculate leap year.
With the old code, year 2000 would not be a leap year, but it actually
is.  With this, Calc correctly loads cell with date value of 2000-2-29.

(regression from CWS sw33bf02 8786083eb9dabb0d7b328a217ba99a1d71493ad7)

Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
Signed-off-by: Eike Rathke <erack@redhat.com>
Signed-off-by: Michael Stahl <mstahl@redhat.com>
2012-02-29 14:09:18 +01:00
99b2adf721 Removed unused code 2012-02-10 14:20:52 +00:00
e7e0455b02 Prefer equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("...")) to equalsAscii("...") 2012-02-10 01:59:26 +09:00
849a2471bd update unused list 2012-02-08 09:12:27 +00:00
0d7e73ac44 Removing unused code 2012-01-16 22:46:57 +00:00
f1e54cdd36 sax_fastparser::FastSerializerHelper::write(float) 2012-01-16 10:18:55 +00:00
fffd541c3e Fix for fdo43460 Part XXIX getLength() to isEmpty()
Part XXIX
Modules
sax, scaddins, sccomp, scripting
2012-01-05 22:05:45 -02:00
f80d462331 callcatcher: drop some unused methods 2012-01-05 09:18:15 +00: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
adf84183d4 fix conversions from cm 2011-11-28 18:25:55 +01:00
f970963fd7 added conversion from MeasureUnit::CM 2011-11-28 17:51:02 +01:00
ca85f280e2 Fix overflow in smoketest, promotion from sal_Int32 to sal_Int64 doesn't happen before assign 2011-10-15 12:18:48 +01:00
8666469d7b #i108468#: clean up xmluconv code duplication, measured approach:
modify sax::Converter::convertMeasure to use sal_Int64 instead of BigInt:
  should be sufficient, since the largest number is SAL_INT32_MAX * 10^7.
 remove duplicate methods from SvXMLUnitConverter:
  convertMeasurePx, convertMeasure (static variants)
 remove entirely duplicative class SvXMLExportHelper:
  GetConversionFactor, GetUnitFromString, AddLength
 change SvXMLUnitConverter interface from MapUnit to css::util::MeasureUnit.
 change SvXMLExport constructor params from MapUnit to css::util::MeasureUnit.
 rename some methods to turn compiler into merge conflict detector :)
2011-10-11 17:57:01 +02:00
ae3e2f1700 #i108468#: clean up xmluconv code duplication, DateTime edition:
remove duplicate methods from SvXMLUnitConverter:
  convertTime (all variants), convertDateTime (DateTime variants),
  convertTimeDuration.
 move convertAny from SvXMLUnitConverter to sax::converter.
2011-10-11 17:57:00 +02:00
3ca2bef768 #i108468#: clean up xmluconv code duplication, part 1:
move convertNumber64 from SvXMLUnitConverter to sax::converter.
 remove duplicate methods from SvXMLUnitConverter:
  convertBool, convertPercent, convertColor, convertNumber, convertDouble,
  indexOfComma, encodeBase64, decodeBase64, decodeBase64SomeChars,
  clearUndefinedChars
2011-10-11 17:57:00 +02:00
02c32e0f0e partially revert 849a713ffd29a58ae79e48f80835c28bbd9d5a72 2011-10-11 17:56:59 +02:00
6671fa81db Removed uses of rtl::O[U]String[Buffer]::operator sal_{char|Unicode} const *(). 2011-09-27 20:22:03 +02:00
941020379b Merge branch 'master' into feature/gnumake4
Conflicts:
	basebmp/prj/d.lst
	basebmp/test/basictest.cxx
	basebmp/test/makefile.mk
	basegfx/inc/basegfx/basegfxdllapi.h
	basegfx/inc/basegfx/tools/debugplotter.hxx
	basegfx/inc/basegfx/tuple/b2ituple.hxx
	basegfx/prj/d.lst
	basegfx/source/numeric/makefile.mk
	basegfx/source/polygon/makefile.mk
	basegfx/source/range/makefile.mk
	basegfx/source/raster/makefile.mk
	basegfx/source/tuple/makefile.mk
	basegfx/source/vector/makefile.mk
	basegfx/test/basegfx1d.cxx
	basegfx/test/makefile.mk
	basegfx/util/makefile.mk
	canvas/Library_canvasfactory.mk
	canvas/Module_canvas.mk
	canvas/prj/build.lst
	canvas/prj/d.lst
	canvas/source/cairo/cairo_canvashelper_texturefill.cxx
	canvas/source/cairo/makefile.mk
	canvas/source/tools/makefile.mk
	comphelper/qa/string/makefile.mk
	cppcanvas/Module_cppcanvas.mk
	cppcanvas/inc/cppcanvas/cppcanvasdllapi.h
	cppcanvas/prj/build.lst
	cppcanvas/prj/d.lst
	cppcanvas/source/mtfrenderer/makefile.mk
	cppcanvas/util/makefile.mk
	i18npool/source/search/makefile.mk
	regexp/Library_regexp.mk
	regexp/prj/d.lst
	sax/CppunitTest_sax.mk
	sax/Library_sax.mk
	sax/prj/d.lst
	sax/qa/cppunit/test_converter.cxx
	sax/source/expatwrap/attrlistimpl.hxx
	sax/util/makefile.mk
	svtools/Library_svt.mk
	tools/Executable_sspretty.mk
	ucbhelper/prj/d.lst
	ucbhelper/source/provider/configureucb.cxx
	ucbhelper/source/provider/provconf.cxx
	ucbhelper/util/makefile.mk
	unotools/Library_utl.mk
	unotools/Module_unotools.mk
	unotools/Package_inc.mk
	unotools/prj/build.lst
	vcl/Library_desktop_detector.mk
	vcl/Library_vcl.mk
	vcl/Library_vclplug_gtk.mk
	vcl/aqua/source/gdi/salprn.cxx
	vcl/inc/aqua/saldata.hxx
	vcl/unx/generic/gdi/salgdi3.cxx
2011-06-19 12:47:44 +02:00
fa4ec3c338 CWS gnumake4: convert sax to new build system [hg:389d236eb6b2] 2011-06-17 01:01:10 +02:00
55076cad2d Replace cstdio with iostream in fastserializer.cxx 2011-05-28 13:45:34 +01:00
7ec24fbe56 Fix build breakage with debug enabled. 2011-05-27 21:01:54 +01:00
cab6466023 small bug, "%d" instead of "%ld" in a printf 2011-04-11 21:46:23 +02:00