Commit Graph

233 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
96ee9884b7 sax: SaxWriter: 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: I1e32a9fd096463a418a197fcdb3174df79f7a785
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
5bb4a2ba1d further OUString cleanup
Change-Id: I19954ee5976cb881a5fe73a889c8e04a19b14eb6
2013-03-19 14:18:10 +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
ce33f85ffd sal_Bool to bool
Change-Id: I8c554fb3faead41c974af9c2a89728bd0bdf5eb6
2013-03-04 23:14:41 +09:00
f5ca04caca Related to fdo#60724: correct spelling
Using the autocorrect list of LibreOffice
extras/source/autotext/lang/en-US/acor/DocumentList.xml

Change-Id: I8b93969bc0742c2e95b8b7db3c4c37691e8d3657
Script: http://pastebin.ca/2327716
2013-03-03 17:14:16 +01:00
fb79d2001a Fix typo, "charcter" -> "character"
Change-Id: Idde59a616b16c52b7369dd67e7a06eab52b334c8
2013-02-23 14:40:45 +01:00
fcb1e4d843 fdo#60471: svgio, sax: enable internal entity declarations for SVG
Change-Id: I147acac61dfe0b626268fe1e600dcf641ca63a0c
2013-02-13 16:31:56 +01:00
4db5b17c78 sax: convert some legacy assertions
Change-Id: I3b4f1caa2c2d7a0fd88ea53bf05d01b2c7cc115a
2013-02-13 16:31:55 +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
273a60af9a cppCheck: clarifyCondition
Remove some warnings about:
   Boolean result is used in bitwise operation
   Suspicious condition (assignment + comparison)

Also reduce scope of a variable.

Change-Id: I553e5a09ed1d6276be61efbbb2c28d165a69af39
Signed-off-by: jailletc36 <christophe.jaillet@wanadoo.fr>
Reviewed-on: https://gerrit.libreoffice.org/1031
Reviewed-by: Tor Lillqvist <tml@iki.fi>
Tested-by: Tor Lillqvist <tml@iki.fi>
2012-11-12 10:58:57 +00:00
9decde005b sax: FastSaxSerializer: cannot do anything without a stream
Change-Id: If2fbfe776039fe1a3104d541279ab52f219f45bf
2012-11-11 17:00:42 +01:00
fb741b5e1e fdo#46808, Adapt xml::sax::XWriter UNO service to new style
Create a merged XWriter interface for the service.
The xml.sax.Writer service already existed, it just did not have
an IDL file.

Change-Id: I4e6d3f3c68f9282a55fc7aa19778f97632fd8ad5
2012-10-22 17:01:11 +02:00
1cb0443ccd sal_Bool -> bool
Change-Id: I92e5f4f52ab19b607b5ed0314ee0d6c2334998c6
2012-09-26 11:20:35 +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
23e2875473 XML_Parse returns enum XML_Status
Change-Id: Ie4dde5aa412dae05d2629ce5675356db70b2529b
2012-07-12 22:08:10 +02:00
e18655e475 re-base on ALv2 code. 2012-06-27 19:30:33 +01:00
2c757293b8 reduce static_initialization_and_destruction chain
Change-Id: I0c1b2f2d908c31d1510662880c13504d81445a6a
2012-06-25 14:19:03 +01:00
ecf943247f re-base on ALv2 code.
Change-Id: I8018d9b5fa01d1720c0392dc5fdc4a0656f25a35
2012-06-22 09:51:05 +01:00
b9042fad7c re-base on ALv2 code.
Change-Id: I6c145e984c885c7e06caa1c27bfb354ea49ad9ce
2012-06-21 15:00:05 +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
31cc01a5ff targeted string re-work
Change-Id: Ifd6b90778725d94a9338a53a4cdc514cdb595052
2012-05-31 21:35:45 -05:00
cad9839949 stop parsing on encountering internal entities in fastparser.cxx 2012-05-25 13:24:50 +02:00
fe226fd8b1 stop parsing on encountering internal entities in sax_expat.cxx
The XML_UnparsedEntityDeclHandler is apparently deprecated anyway, so
replace it with the newfangled XML_EntityDeclHandler.
2012-05-25 13:24:50 +02:00
df34ccb01d remove unneeded include of boost/bind.hpp
Change-Id: I5a254459a491b9547530d8e312260dceed21f25c
2012-05-16 15:05:36 +01:00
135c63c8f9 fdo#48253 Expand SAL_STATIC_CAST and SAL_CONST_CAST
Change-Id: I50f0887ceb4517d7ef234f970ca2ba679d533382
2012-05-04 15:52:57 +02: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
8a01ee6243 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 14:30:05 +02:00
15f14ec794 reorganize trickier statics 2012-04-02 14:53:48 +01:00
53f661b314 sax: no matching function for call to 'max(int, sal_Int32&)' 2012-03-12 22:26:05 +04:00
b7c79fc2ef sax: replace Min/Max macros with std::max 2012-03-12 18:30:37 +01:00
5122196acc Avoid temporary rtl::OUString 2012-03-03 15:05:28 +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