229 Commits

Author SHA1 Message Date
Andrea Gelmini
7668d4e616 Fix typos
Change-Id: I56e429ff1b8ee55ccb8df16002b509770762172c
Reviewed-on: https://gerrit.libreoffice.org/35618
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-25 16:17:21 +00:00
Andrea Gelmini
0f0ebddb81 Fix typos
Change-Id: Ic54e808956e5cf4e8079942c0ff799f802cd4b6c
Reviewed-on: https://gerrit.libreoffice.org/35053
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-11 05:08:01 +00:00
Noel Grandin
198c41c4fe new loplugin unoany
Change-Id: I5d6c4a67cb2a09e7cd5bd620c6b262d188701b89
Reviewed-on: https://gerrit.libreoffice.org/34714
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-28 10:17:47 +00:00
Noel Grandin
48e83f7be2 makeAny->Any in cppuhelper..cui
Change-Id: Ia54e6e9b71df68bd04c304a0bb02da8ebac74420
Reviewed-on: https://gerrit.libreoffice.org/34603
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-24 09:17:34 +00:00
Stephan Bergmann
06f1b8d46e loplugin:subtlezeroinit: cpputools
Change-Id: Ib4a04395f067a3a288a57547daa734c4c9768eb8
2017-02-21 07:35:09 +01:00
Stephan Bergmann
93732de5c1 Some simplifications, using UNO_QUERY_THROW
Change-Id: Icefafed29c9702730181f61bb03296b5b474bfa6
Reviewed-on: https://gerrit.libreoffice.org/34269
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-02-15 14:18:54 +00:00
Stephan Bergmann
e57ca02849 Remove dynamic exception specifications
...(for now, from LIBO_INTERNAL_CODE only).  See the mail thread starting at
<https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html>
"Dynamic Exception Specifications" for details.

Most changes have been done automatically by the rewriting loplugin:dynexcspec
(after enabling the rewriting mode, to be committed shortly).  The way it only
removes exception specs from declarations if it also sees a definition, it
identified some dead declarations-w/o-definitions (that have been removed
manually) and some cases where a definition appeared in multiple include files
(which have also been cleaned up manually).  There's also been cases of macro
paramters (that were used to abstract over exception specs) that have become
unused now (and been removed).

Furthermore, some code needed to be cleaned up manually
(avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no
configurations available that would actually build that code.  Missing @throws
documentation has not been applied in such manual clean-up.

Change-Id: I3408691256c9b0c12bc5332de976743626e13960
Reviewed-on: https://gerrit.libreoffice.org/33574
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-01-26 12:54:43 +00:00
Stephan Bergmann
693b00a6b2 New loplugin:dynexcspec: Add @throws documentation, cpputools
Change-Id: I7a9ac7cdc3d5e19dc63a4711a0ce2c23054367e1
2017-01-19 18:03:23 +01:00
Rohan Kumar
2e0c1e03e8 tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals
I replaced OSL_DEBUG_LEVEL > 1 with OSL_DEBUG_LEVEL > 0
and made sure that it doesn't break the build

Change-Id: I9febeed949a24d7bc5afb13dedde03fd812b5b20
Reviewed-on: https://gerrit.libreoffice.org/23077
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2016-03-11 14:01:07 +00:00
Chris Sherlock
a238b1f8d3 Remove excess newlines
A ridiculously fast way of doing this is:

for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \
  --exclude-dir=workdir --exclude-dir=instdir '^
{3,}' .)
do
    perl -0777 -i -pe 's/^
{3,}/

/gm' $i
done

Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c
Reviewed-on: https://gerrit.libreoffice.org/22224
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-09 08:18:05 +00:00
Stephan Bergmann
5185569e50 loplugin:nullptr (automatic rewrite)
Change-Id: I65186f574c8bbc4004eb40a95a33aea1ea3f4e96
2015-11-10 10:31:21 +01:00
Noel Grandin
6c80a8fe89 new loplugin: oncevar
Change-Id: If57390510dde4d166be3141b9f658a7453755d3f
Reviewed-on: https://gerrit.libreoffice.org/19815
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-09 08:34:40 +00:00
Stephan Bergmann
0167885e0a loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)
Change-Id: Iefb181010ad8514227dfe617379eeaccb8d70152
2015-11-06 09:35:12 +01:00
Noel Grandin
cb4fa1d1e2 use uno::Reference::set method instead of assignment
Change-Id: I080668f86f0ab8b3bba857ee21411f907ae285c4
2015-10-30 11:08:36 +02:00
Stephan Bergmann
b36963c0a6 Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY code
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12 17:52:29 +02:00
Takeshi Abe
a175788dcd tdf#88206 replace cppu::WeakImplHelper* etc.
with the variadic variants, in cppcanvas / cpputools / cui.

Change-Id: Ic28d0830ab86555494004c27b1468de2ea6825dc
Reviewed-on: https://gerrit.libreoffice.org/17119
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-17 07:14:22 +00:00
Noel Grandin
e0b2e6e3f7 loplugin:loopvartoosmall
Change-Id: Icbe68b31d4ab04ca3cd9f572e3598413946a75c7
2015-05-29 08:48:41 +02:00
Stephan Bergmann
a52cf476e7 Clean up template-parameter-dependent C-style casts
Change-Id: Ia1ab134a0afbeeb3ae40264bd4233a47df26b734
2015-03-29 15:13:45 +02:00
Stephan Bergmann
dbe8aaa9b9 cpputools: Use appropriate OUString functions on string constants
Change-Id: Iea0f7b4ee3ef867a061c159d90efb5d210ae92a4
2014-12-12 10:22:56 +01:00
Caolán McNamara
12bcfec04f markup with event type not checker type
Change-Id: I14c0c5d90b67000cb4fe9e6be647854abfe784da
2014-11-05 14:58:00 +00:00
Caolán McNamara
aa0499cefd coverity#982593 experiment with silencing Infinite loop
etc.

Change-Id: I1548d60280ab4f74fe023d026435a05f7865b516
2014-10-28 15:06:36 +00:00
Noel Grandin
ebc0a15515 remove more unnecesary OUString constructor use
when throwing exceptions

Change-Id: I6edfb6b6745499f802b0e3c0e096a36fb7c32aac
2014-05-29 09:01:40 +02:00
Noel Grandin
9b791f9c31 remove unnecessary use of OUString constructor when throwing
Change-Id: I4a3f3f911dcfbf88696053215a2fb7a94678244c
2014-05-27 08:20:11 +02:00
Noel Grandin
e7bc3cab01 remove boilerplate in UNO Exception constructor calls
Now that we have default values for Exception constructor params,
remove lots of boilerplate code.

Change-Id: I620bd641eecfed38e6123873b3b94aaf47922e74
2014-05-23 15:06:00 +02:00
Noel Grandin
c5d47c327a add default value for Context param in uno::Exception constructors
and all it's subtypes, which is almost never used, so this allows us to
simplify lots of call sites.

Change-Id: I0b05793ea2bdd1027679f63252d42ce4af89433b
2014-05-23 15:05:59 +02:00
Noel Grandin
78b9537b6a various: sal_Bool->bool
Change-Id: I30fa5227f30373f95060148f269450d2945c1bb9
2014-05-08 11:48:14 +02:00
Stephan Bergmann
70cc2b191b First batch of adding SAL_OVERRRIDE to overriding function declarations
...mostly done with a rewriting Clang plugin, with just some manual tweaking
necessary to fix poor macro usage.

Change-Id: I71fa20213e86be10de332ece0aa273239df7b61a
2014-03-26 16:39:26 +01:00
Stephan Bergmann
5e21a413c7 cppuhelper: retrofit std::exception into overriding exception specs
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
2014-02-26 18:22:20 +01:00
Noel Grandin
071c3f3e93 remove unnecessary use of OUString constructor in equalsIgnoreAsciiCase
Convert code like:
    sType.equalsIgnoreAsciiCase(OUString("VIEW"));
to:
    sType.equalsIgnoreAsciiCase("VIEW");

Change-Id: I6fb47e6a83b561c7e5a25da76b63606a3174858d
2013-11-22 08:07:18 +02:00
Noel Grandin
fcd1637d51 convert OUString compareToAscii == 0 to equalsAscii
Convert code like
   aStr.compareToAscii("XXX") == 0
to
  aStr.equalsAscii("XXX")
which is both easier to read and faster.

Change-Id: I448abf58f2fa0e7715dba53f8e8825ca0587c83f
2013-11-11 12:58:13 +02:00
Noel Grandin
e2451bd729 Convert indexOf->startsWith and lastIndexOf->endsWith
This is both an optimisation and a cleanup.

This converts code like
   aStr.indexOf("XX") == 0
to
  aStr.startsWith("XX")
and converts code like
  aStr.lastIndexOf("XXX") == aStr.getLength() - 3
to
  aStr.endsWith("XXX")

Note that in general
  aStr.lastIndexOf("X") == aStr.getLength() - 1
converts to
  aStr.isEmpty() || aStr.endsWith("X")
so I used the surrounding context to determine if aStr could be empty
when modifying the code.

Change-Id: I22cb8ca7c2a4d0288b001f72adb27fd63af87669
2013-10-31 08:34:21 +02:00
Chr. Rossmanith
1ed2c24a6e remove RTL_CONSTASCII_(U)STRINGPARAM
Change-Id: I0bce921bfc7102b9a33b1c87eee3ddec0ebaed7b
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>, with one little typo fix
2013-10-23 10:44:09 +02:00
Stephan Bergmann
02a872cb2c Remove odd "bootstrapping" of acceptor/connector/binaryurp components
...that had effectively been in uno.exe since
c460c0ccb6f389339b2ff9e57a101557c30df676 "initial import," for whatever reason
it was supposed to be good for, but would no longer work anyway at least since
644c33a857c46d540202189228f519946dc33833 "fdo#67313: Use "lo" suffix for private
URE libs."

Change-Id: I98c038a4d9d963eefc542c91247cf263d7d988bb
2013-10-01 01:14:24 +02:00
Thomas Arnhold
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
Matúš Kukan
944f3a6c6e gbuild: allow to use RepositoryFixes also for executables
Helps to kill package in cpputools.
And autoinstall uno executable.

Change-Id: Ib1d546371ec8d2b06381d88eff98dbc5b70da400
2013-06-15 21:32:36 +02:00
Noel Grandin
9db162b604 fdo#46808, Use service constructor for connection::Acceptor
Change-Id: I0e69e43b5e6c6907447d6a8c23c0579b88ceb9a3
2013-06-10 10:20:44 +02:00
Philipp Riemer
928d86d8a2 fdo#62475 - remove ASCII art 2013-05-06 19:21:08 +02:00
Philipp Riemer
e8eab43eeb cleanup whitespaces due to RTL_CONSTASCII_USTRINGPARAM removal
In e2e2cc61144cb22227eebfadff0ea24b51ccfbd0 the method was removed
automatically leaving several line breaks etc. as visual noise.
2013-05-06 19:21:07 +02:00
Luboš Luňák
e2e2cc6114 remove usage of RTL_CONSTASCII_USTRINGPARAM
Mechanical removal of usage together with OUString ctor, done
by compiler plugin.

Change-Id: I554227f76df0dac620b1b46fca32516f78b462c5
2013-05-06 16:51:45 +02:00
Michael Meeks
72e5d0c8fb Move to MPLv2 license headers, with ESC decision and author's permission. 2013-04-30 13:34:06 +01:00
Michael Meeks
62badf3828 Move to MPLv2 license headers, with ESC decision and author's permission. 2013-04-22 09:37:38 +01:00
Luboš Luňák
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
Thomas Arnhold
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
Thomas Arnhold
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
Thomas Arnhold
3991eaf556 reduce whitespaces between include and filename
Change-Id: I15f6ad0a760a28cbac53f99ba4d14ff5c24ce005
2013-03-19 01:26:45 +01:00
Michael Meeks
79b0046ba0 remove legacy build.pl prj/build.lst files. 2013-03-14 17:05:51 +00:00
Michael Stahl
b768611724 remove all d.lst
Change-Id: Icba4218c5f9fe89d183d25ea82a8eae52881f885
2013-02-28 18:40:06 +01:00
Tor Lillqvist
de868f41da Don't print an annoying newline every time even if otherwise silent
Change-Id: If819c60a4d1fb3af2f4f87e0e4acfd00ecad95d3
2013-02-01 14:17:25 +02:00
Michael Stahl
5a61e28378 gbuild: fix silly "expandtabs" in makefile VIM modelines
Change-Id: I54d8923ad315e8041fd3904da3a29f1a7a8c8b16
2013-01-26 22:20:07 +01:00
Stephan Bergmann
5a1d51139c API CHANGE: Remove support for uno executable's -ro/-rw arguments
...and instead require users to specify URE_MORE_SERVICES/TYPES (resp.
UNO_SERVICES/TYPES for invocations from within the build) bootstrap variables.

This removes usage of deprecated bootstrap_InitialComponentContext from the
uno executable's code.

Change-Id: I9af626f47a94c3bea1fb0d3c3efbab54f8db9e40
2012-12-19 18:36:42 +01:00