122 Commits

Author SHA1 Message Date
Stephan Bergmann
6dce9c6757 Add missing #includes
...and remove some unncessary using directives/declarations, in preparation of
removing now-unnecessary #includes from cppumaker-generated files, post
e57ca02849c3d87142ff5ff9099a212e72b8139c "Remove dynamic exception
specifications".

Change-Id: Iaf1f268871e2ee1d1c76cf90f03557527ebc9067
2017-02-06 17:21:16 +01: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
0c59e2ddd6 loplugin:unnecessaryoverride (dtors) in comphelper
Change-Id: I13ebc4efa7f8bd0d3732ed65e397c710ae65d14e
2016-11-28 14:14:04 +01:00
Stephan Bergmann
91dd2db17b loplugin:override: No more need for the "MSVC dtor override" workaround
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark
overriding destructors as 'virtual'" appears to no longer be a problem with
MSVC 2013.

(The little change in the rewriting code of compilerplugins/clang/override.cxx
was necessary to prevent an endless loop when adding "override" to

  OOO_DLLPUBLIC_CHARTTOOLS    virtual ~CloseableLifeTimeManager();

in chart2/source/inc/LifeTime.hxx, getting stuck in the leading
OOO_DLLPUBLIC_CHARTTOOLS macro.  Can't remember what that
isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.)

Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-09-13 13:19:22 +02:00
Matúš Kukan
e0192c0908 Implement XServiceInfo for com.sun.star.comp.MemoryStream
Change-Id: Ie5499d2ac4aac67dc73fdc58958443b8060c4139
2016-07-09 12:15:51 +02:00
Yeliz Taneroğlu
5f37f56088 tdf#74608 Constructor function for MemoryStream
Change-Id: I5b0667c4c2808913cde686afa7315ef2319b4d49
2016-07-09 12:15:50 +02:00
Stephan Bergmann
4aa7d9e63a loplugin:redundantcast: redundant static_casts in comphelper
Change-Id: I6112c3cc40383d00ea134bdc650e457f942e0dcf
2016-07-08 16:47:31 +02:00
Stephan Bergmann
82da3d95c1 loplugin:salbool: Implicit conversions from non-Boolean fundamental types
Change-Id: I67eac95686678e6f5a2d60798535b2c65a9ba5d7
2016-06-19 21:29:43 +02:00
Jochen Nitschke
f781997ee1 tdf#94306 replace boost::noncopyable in c...
comphelper, connectivity and cppcanvas.

Replace with C++11 delete copy-constructur
and copy-assignment.
Removed unused boost/noncopyable.hpp includes from
some source files in cppcanvas.

Change-Id: I90780820e21fbfd291ac10c266e7d16616e3a81b
Reviewed-on: https://gerrit.libreoffice.org/23905
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-04-08 09:58:36 +00:00
Yeliz Taneroğlu
0ea748be9c tdf#74608 Constructor function for SequenceOutputStreamService
Change-Id: I0f162bd0ec61262a182ebab8cea1cfe27419a54e
Reviewed-on: https://gerrit.libreoffice.org/23610
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-04-05 10:25:00 +00:00
Noel Grandin
b9372f0e90 loplugin:constantparam in comphelper
Change-Id: I81e6af1ee869caa3b40d2d00604e8e22517d92d7
Reviewed-on: https://gerrit.libreoffice.org/23808
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-05 06:26:22 +00:00
Steven Guo
e81ad8c8ed tdf#74608 Constructor function for SequenceInputStreamService
Added ctor funtion for SequenceInputStream(Service) in comphelper.

Change-Id: I043e46aa283709f316e7ad794e15438f6b2d955f
Reviewed-on: https://gerrit.libreoffice.org/23564
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-03-29 08:51:59 +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
Noel Grandin
25aec383f9 use initialiser for Sequence<OUString>
replaced using:
git grep -lP 'Sequence.*OUString.*\(\s*1\s*\)'
| xargs perl -0777 -pi -e
"s/Sequence<\s*OUString\s*> (\w+)\(\s*1\s*\);
.*\[0\] = (\S+);/Sequence<OUString> \1 { \2 };/g"

Change-Id: I20ad0489da887a9712982531c3b127339bb8b3b9
Reviewed-on: https://gerrit.libreoffice.org/19969
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-15 12:18:55 +00:00
Noel Grandin
8e234c5b7d use initialiser syntax for Sequence<OUString>
replaced using the script:

git grep -lP 'Sequence.*OUString.*\(1\)'
  | xargs perl -0777 -pi
    -e "s/Sequence< OUString > (\w+)\(1\);
.*\[0\] = (\S+);/Sequence< OUString > \1 { \2 };/g"

Change-Id: I23688a91562051a8eed11fc2a85599545c285c34
Reviewed-on: https://gerrit.libreoffice.org/19967
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-15 10:13:08 +00:00
Stephan Bergmann
fb4ce444c2 loplugin:nullptr (automatic rewrite)
Change-Id: Ibd0e6ae5e3243464b2484a009f2b4781bdaac471
2015-11-10 10:31:19 +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
Noel Grandin
d74436fb86 com::sun::star->css in comphelper
Change-Id: I4aa0b2d15f2a06cbbbf63a363f403ca6435ffbcd
Reviewed-on: https://gerrit.libreoffice.org/17365
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-27 11:01:04 +00:00
Takeshi Abe
a890a7696f tdf#88206 replace cppu::WeakImplHelper* etc.
with the variadic variants, for comphelper.
This also includes extra changes in other modules
required accordingly.

Change-Id: Id1537f46f1c90f760a0d8987a6dafa0e1da03b8f
Reviewed-on: https://gerrit.libreoffice.org/16929
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-20 07:06:22 +00:00
Stephan Bergmann
66a0a3726a loplugin:cstylecast: deal with remaining pointer casts
Change-Id: I1ceb4359188b61e15a31750a496021c4394e1a3f
2015-06-08 16:23:52 +02:00
Michael Stahl
6a0fe37dec sal: clean up public headers with include-what-you-use
Sadly cannot forward declare "struct {...} TimeValue;".

rtl/(u)?string.hxx still include sal/log.hxx but removing osl/diagnose.h
was painful enough for now...

Change-Id: Id41e17f3870c4f24c53ce7b11f2c40a3d14d1f05
2014-11-17 11:06:53 +01:00
Matúš Kukan
d45607c4be Revert recent changes to comphelper::OSequenceOutputStream
Some of the changes could be wrong and we don't need them.

This reverts commit 784d4bea86d8cbb3a855e557c465ce50a049cefc.
This reverts commit 8524d5aba59148eef94859289f00ab6477e0e821.
This reverts commit 018f1deae884febbbe639c7ee46b45ce4807e9d3.
This reverts commit 8124fddc5803b4e104d4fc2456cb92cb030d9436.

We use our own helper cache class in FastSaxSerializer
since f736eba5a9df8645849a37b08d2764a5f495ab45.

Change-Id: Iaca6b5b11cb32595db4420a02fa72b0007cf6286
2014-10-23 11:53:19 +02:00
Matúš Kukan
20538c2512 FastSerializer: Avoid sequences where possible
Change-Id: I359ca9d3b766b71904e4199ebfbdbd5b203775cc
2014-10-23 11:53:17 +02:00
Matúš Kukan
cc3ac382a2 FastSerializer: Do not keep whole sequence in memory; write in chunks
Change-Id: Ibca65a2b8397358ac4013c8e5b53389ac6949e4d
2014-10-23 11:53:15 +02:00
Matúš Kukan
8cc5b621aa Remove mutex from OSequenceOutputStream; it's intended to be fast
Make the caller responsible for using it wisely.
AFAICS it's used only in FastSaxSerializer, so far.

Change-Id: I50d48fd7f3e6cdeb9e4637868da213b8171e542b
2014-10-23 11:53:15 +02:00
Thomas Arnhold
cb347ddc5c stario -> css::io
Change-Id: Iad96e0a2bfd6c126c696f14919dbfd8e072dd230
2014-08-21 09:03:23 +02:00
Thomas Arnhold
123c64ab00 starawt -> css::awt
Change-Id: I76dd16aa2c42a649162ea2e37c824af30cdd557b
2014-08-21 09:03:21 +02:00
Thomas Arnhold
007099ea32 comphelper: staruno -> css::uno
Change-Id: I21991280c5b7e4c6d0c200f4489c89a9f4fbc385
2014-08-21 09:03:18 +02:00
Tor Lillqvist
eeeef4e83c Include <algorithm> for std::min
Change-Id: If2bf31494f1354ff3856ad8b32f6799042e23b18
2014-07-29 18:21:00 +03:00
Noel Grandin
9af0abebfd remove unnecessary use of Reference constructor in throw
Convert code like this:
  throw IOException("xx",
     Reference< XInterface >(static_cast<OWeakObject*>(this)) );
to this:
  throw IOException("xx",
     static_cast<OWeakObject*>(this) );

Change-Id: Ife9f645f0f1810a8e80219126193015502c43dbb
2014-05-27 08:20:11 +02:00
Noel Grandin
9b791f9c31 remove unnecessary use of OUString constructor when throwing
Change-Id: I4a3f3f911dcfbf88696053215a2fb7a94678244c
2014-05-27 08:20:11 +02:00
Stephan Bergmann
b8757ee8c7 Clean up function declarations and some unused functions
Change-Id: I5817a5ad3966918cfb1920be568b7401dd6f948c
2014-04-07 13:48:53 +02:00
Noel Grandin
5babf1b903 remove unnecessary scope qualifier from sal_Bool uses
i.e. convert "::sal_Bool" to "sal_Bool"

Change-Id: Ie5943aee4fee617bf2670655558927ed25b7e067
2014-04-03 13:54:02 +02:00
Thomas Arnhold
02c83db00a typo: enoungh -> enough 2014-03-29 19:16:21 +01: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
Alexander Wilms
a67c2a12bc Remove visual noise from comphelper
Change-Id: I7e5512b43240beee05404cff9d49a87d0217ea89
Reviewed-on: https://gerrit.libreoffice.org/8242
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-27 06:42:45 -06:00
Stephan Bergmann
5e21a413c7 cppuhelper: retrofit std::exception into overriding exception specs
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
2014-02-26 18:22:20 +01:00
Alexander Wilms
0ce0c369aa Remove unneccessary comments
Change-Id: I939160ae72fecbe3d4a60ce755730bd4c38497fb
Reviewed-on: https://gerrit.libreoffice.org/8182
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-23 03:38:49 +00:00
Stephan Bergmann
05f742d28b comphelper: sal_Bool -> bool
Change-Id: I6fc331ae0706f4bb193543011c8d4ae0a385fcc0
2014-02-17 17:55:19 +01:00
Tor Lillqvist
a7724966ab Bin comments that claim to say why some header is included
They are practically always useless, often misleading or obsolete.

Change-Id: I2d32182a31349c9fb3b982498fd22d93e84c0c0c
2013-10-22 16:56:28 +03:00
Marcos Paulo de Souza
3d3293144b fdo#54938: Adapt svtools and comphelper module ...
to  use cppu::supportsService and other pieces.

Change-Id: I16893b3d31a8055acd214ff23d01e63d38fe0826
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2013-10-17 14:43:28 +02:00
Stephan Bergmann
15cbc3e54a Unwind useless comphelper::ByteSequence typedef
Change-Id: I59317a0d591eac188fa01636031e907357038c29
2013-10-16 15:42:59 +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
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
Chr. Rossmanith
be9d9fee66 RTL_CONSTASCII_(U)STRINGPARAM removed in comphelper
Change-Id: Ib068c06956bc9f04bb7c468375aacd2e6e9db77d
2013-01-31 10:21:07 +01:00
Noel Grandin
4970e292fb fdo#46808, convert comphelper::ConfigurationHelper to XComponentContext
Convert the helper methods to take an XComponentContext parameter,
instead of XMultiServiceFactory

Change-Id: Id662d674c6d3c4ddfd35be5fc2e802b73bc6de90
2012-10-24 16:49:49 +02:00
Stephan Bergmann
03a9f139bd ComponentContext::getUnoContext -> getComponentContext simplification
...and some further clean-up.

Change-Id: If5dce53e382b56390c502d0d0d93fc06cbfe33ea
2012-09-19 13:16:38 +02:00
Noel Grandin
206c70eef3 fdo#46808, Adapt TempFile UNO service to new style
Change-Id: Ia448d6d74201e2be487c6d8317f94be3745808aa
2012-08-27 15:40:08 +02:00
Michael Meeks
2005a34318 re-base on ALv2 code. 2012-06-29 15:51:49 +01:00