Commit Graph

244 Commits

Author SHA1 Message Date
Julien Nabet
7da92fdcb0 cppcheck: Possible inefficient checking for <var> emptiness
Change-Id: I6ca0e477a4429e762c48c721951b9876db3a5c6c
2015-01-04 19:11:13 +01:00
Caolán McNamara
ca8787a981 boost::unordered_map->std::unordered_map
Change-Id: I5d458f43616edc395faa8c27edaddc7d515166db
2015-01-04 12:51:09 +00:00
Stephan Bergmann
b9def20cea scripting: Use appropriate OUString functions on string constants
Change-Id: Iacb434225e779de4911e9acc8431662f5eabcee3
2014-12-18 14:12:30 +01:00
Stephan Bergmann
fe17eb9448 scripting: Use appropriate OUString functions on string constants
Change-Id: I8ee8eb92ac95937893c894e67882e9df2c16a67d
2014-12-15 10:15:16 +01: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
Caolán McNamara
5652f529b5 coverity#1237350 use our double-locking templates for this
Change-Id: I589468e9663ffd01a237a1684345985396bc4eac
2014-10-24 13:43:09 +01:00
Stephan Bergmann
a01ef1978c Improve logging
Change-Id: I9c879cc16de0d5353a5ab8ce4c8a8cd7f000a170
2014-09-17 11:48:20 +02:00
Caolán McNamara
2f1eed4839 createNonDocMSPs->ensureNonDocMSPs
put the double-lockery into ensureNonDocMSPs and
the contents into a new createNonDocMSPs

Change-Id: Id09c933396e1a6ae1c45be79131a75729b16932b
2014-09-02 12:14:50 +01:00
Stephan Bergmann
bf640ba048 Fix *_component_getFactory function type
Change-Id: Id16c653554f5573dc862e0798747b7337ff74d44
2014-08-21 17:44:40 +02:00
Noel Grandin
184a00b962 loplugin: inlinesimplememberfunctions
Change-Id: I42119f656ca528286fb25d2d36c0af54b7d04a6b
2014-06-09 10:10:13 +02:00
Noel Grandin
db246b491c scripting: remove SAL_THROW macro
Change-Id: I535a57d043ac51926ae6f640d721d0dd1571c3fa
2014-06-05 08:17:52 +02:00
Jens Carl
f3e1f476e9 fdo#68849: Add header guards to all include files
Added header guards to files in directories sal/, sal/, and scripting/

Change-Id: Ieb7f224f2d27bd671618c516f47f5b7f08c1d294
Reviewed-on: https://gerrit.libreoffice.org/9582
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2014-06-01 16:07:41 +00: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
Julien Nabet
e3d01ad336 Fix previous commit (scripting part)
Change-Id: Ib451642924909c11db4252e81d0c6db690c0e838
2014-05-11 10:37:30 +02:00
Julien Nabet
bd59628620 Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part10
Change-Id: I67acda35fa127547dcea0cd18c9dc16db7c00294
2014-05-11 10:16:42 +02:00
Noel Grandin
2ff8ae7c9e scripting: sal_Bool->bool
Change-Id: I1550c49cce2ad64f9d62b06ec20512a750f83b84
2014-04-24 10:53:16 +02:00
Thomas Arnhold
8bb2ce61c0 fixincludeguards.sh: some smaller dirs
Change-Id: Ic25bd678dc299627299b22145efd7bebcf2b39d0
2014-04-19 11:10:13 +02:00
Stephan Bergmann
5e3c993155 Clean up function declarations
Change-Id: Ie204bb9dc1fb4ded416087f5a3d962924b3dec82
2014-04-14 15:51:53 +02:00
Stephan Bergmann
362d4f0cd4 Explicitly mark overriding destructors as "virtual"
It appears that the C++ standard allows overriding destructors to be marked
"override," but at least some MSVC versions complain about it, so at least make
sure such destructors are explicitly marked "virtual."

Change-Id: I0e1cafa7584fd16ebdce61f569eae2373a71b0a1
2014-04-01 19:22:54 +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
55461af2bd scripting: simplify deprecated XTypeProvider.getImplementationId
Change-Id: If0d9a6f1c56dc560df078eb59313aaba393ee372
2014-03-10 17:39:57 +01:00
Marcos Paulo de Souza
4d6560f506 fdo#54938: Convert some places to use cppu::supportsService
The last cases are non obvious, so it's pratically done

Change-Id: Icae1da8e238f516eaed0f7fbdf96fff778eac547
Reviewed-on: https://gerrit.libreoffice.org/8445
Reviewed-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Tested-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
2014-03-04 07:30:02 -06:00
Stephan Bergmann
5133b44601 Remove unused ScriptingContext
Unused and not even built since 11ddfdb8563901bf515fa2eb07fa27244cc58ced/
4516589f91 "INTEGRATION: CWS scriptingf2 (1.7.2);
FILE MERGED."

Change-Id: I06eec282877a91955b3f20109c3c1189b660f2da
2014-02-27 11:09:54 +01: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
b0308236d2 Remove visual noise from scripting
Change-Id: Id9f177a20d911ce1e041407aa556c9cf13f0efc8
Reviewed-on: https://gerrit.libreoffice.org/8305
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-26 08:37:40 -06: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
Alexandre Vicenzi
93ef9a43a5 fdo#54938 Convert bridges, editeng and others to cppu::supportsService
Change-Id: I7ff5189473c3e0831c2f1e95264d1a04f3b716a9
Reviewed-on: https://gerrit.libreoffice.org/7761
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Marcos Souza <marcos.souza.org@gmail.com>
Tested-by: Marcos Souza <marcos.souza.org@gmail.com>
2014-02-02 17:38:09 +00:00
Stephan Bergmann
dbac5ccaf8 bool improvements
Change-Id: I0ef2adc0bd4a4764c38094b2b7d27c3453ecc117
2014-01-28 20:26:23 +01:00
Stephan Bergmann
e3133ae237 Let C++ inline functions return bool instead of sal_Bool
...to improve diagnosing misuses of boolean expressions in client code (cf.
compilerplugins/clang/implicitboolconversion.cxx).  This change should be
transparent to client code.

Missing overloads of insert() for bool have been added to OStringBuffer and
OUStringBuffer (which required dropping one !VALID_CONVERSION check that would
now pick that overload, but would be flagged by
compilerplugins/clang/pointertobool.cxx).

Change-Id: I2d64cd923b8f47bfaa31e753def6515c29a3f8c9
2014-01-23 18:43:53 +01:00
Stephan Bergmann
9e1ec4df0b bool improvements
Change-Id: I75c137c1ed0c6089c5dfa8131ffde76cadda0134
2014-01-22 08:22:33 +01:00
Noel Grandin
8548abbac5 Remove unnecessary use of OUString constructor in OUStringBuffer::append calls
Convert code like
  aStrBuffer.append(OUString(" AS "));
to
  aStrBuffer.append(" AS ");

Change-Id: I8c1884b5a875f40f0b5e511b6ef38c6c8eeee656
2013-12-17 11:49:04 +02:00
Noel Grandin
610b2b94b3 remove unnecessary use of OUString constructor when assigning
change code like
   aStr = OUString("xxxx");
to
   aStr = "xxxx";

Change-Id: Ib981a5cc735677ec5dba76ef9279a107d22e99d4
2013-11-19 10:29:31 +02:00
Stephan Bergmann
24cad6a649 Move MediaDescriptor from comphelper to unotools
...so it will be able to use SvtSecurityOptions internally.

Change-Id: Id7433247e8fc53651935578510bedbcca5aa2ac9
2013-11-14 11:13:24 +01:00
Noel Grandin
2ac50736e4 remove unnecessary use of OUString constructor in SCRIPTING module
Change-Id: I87dd775949d1d3cc2c191e84e57b49cd66ecc750
2013-11-11 08:36:06 +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
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
ee5661ecd3 fdo#54938: Adapt supportsService implementations..
to cppu::supportsService

Change-Id: I0b03d3910f094f2183bf9859db9d5bcaf35d1f14
Reviewed-on: https://gerrit.libreoffice.org/6370
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2013-10-22 10:28:10 +00:00
Takeshi Abe
f4004429d3 Mark as const
Change-Id: Ic81dd60fadecf72f25792903985f2b387df7a7a0
2013-08-19 07:47:34 +09:00
Tor Lillqvist
c6a7300974 Use subfolder names from <config_folders.h>
Change all instances of hardcoded "program", "share" etc subfolder names to
use those from <config_folders.h> instead. In normal builds, the end result
will not change.

Change-Id: I91c95cd8e482818be67307e889ae6df887763f53
2013-08-18 21:11:16 +03:00
Noel Power
92500896a9 fdo#67547 fix access to methods (getScript) of MasterScriptProvider from VB
access to libreoffice objects ( and methods/properties of those objects )
from VB all goes through the ole automation bridge. There has been a long
standing issue where the bridge falls over trying to access methods of the
scripting framework MasterScriptProvider object.

Change-Id: I3b9391286e1030bef2a12d6e546a5c47a4f68edb
2013-07-30 20:19:21 +01:00
Thomas Arnhold
349d3b2bb5 remove an unused header
Change-Id: I2821879670e23e7b1ce9749acab1970098a0a38d
Reviewed-on: https://gerrit.libreoffice.org/4597
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-06-28 09:26:48 +00:00
Noel Grandin
6a043e9c0a Use the new type-checking Reference constructor to reduce code noise
Also create a Clang compiler plugin to detect such cases.

Change-Id: I61ad1a1d6b1c017eeb51f226d2dde0e9bb7f1752
Reviewed-on: https://gerrit.libreoffice.org/4001
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2013-05-22 10:44:29 +00:00
Stephan Bergmann
e8ff469da5 Remove any remaining remnants of unused component_canUnload feature
Change-Id: I635fd006b5ba9f5fb0091748ee2ff9bc3c1a2d2a
2013-04-19 16:52:03 +02: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
Stephan Bergmann
aa753f01ba -Wunused-macros
Change-Id: Ifaa1637122d6f9cae1e29b77ac36ca5d1f220aed
2013-03-27 09:36:53 +01:00
Noel Grandin
a3bb733ec6 fdo#46808, Convert singleton theMasterScriptProviderFactory
Change-Id: I647a02e552acdd354463fc46c13c5a73b1c90d09
2013-03-07 08:23:39 +02:00
Thomas Arnhold
26e37ca4c7 doubled includes
Change-Id: I70ec796188e2388e1e4d699126f7ae817f5ff86e
2013-03-04 13:58:40 +01:00
Radu Ioan
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
Jean-Noël Rouvignac
97eb8a6e0e Removed several useless macros: A2OU, A2S, C2U, C2S, OUSTR, OUSTRING
Change-Id: Ie859cb2dfdc7103c379fce56be88eef8fe390afd
Reviewed-on: https://gerrit.libreoffice.org/1924
Tested-by: Luboš Luňák <l.lunak@suse.cz>
Reviewed-by: Luboš Luňák <l.lunak@suse.cz>
2013-01-30 12:54:40 +00:00
Stephan Bergmann
a9916dabb4 Remove xml2cmp leftovers
Change-Id: I7c0ba8b653b8e0534ae17bd879b93b75c6554893
2012-12-12 10:27:41 +01:00