Commit Graph

27 Commits

Author SHA1 Message Date
Stephan Bergmann
7eaf8b17dd clang-tidy performance-implicit-cast-in-loop
...where the first component of the pair returned by the iterator would be
const, so an implicit conversion would be required.

Change-Id: I62b6ddd799261e1dd63ea5c42a85d8b071f8b8b7
2016-07-06 18:05:06 +02:00
Noel Grandin
19ebfdbadc loplugin:singlevalfields in codemaker
Change-Id: I77e6ed891f4712aadb9085549d7699435c2da558
2016-06-24 11:30:28 +02:00
Stephan Bergmann
14cd5182c5 Replace fallthrough comments with new SAL_FALLTHROUGH macro
...which (in LIBO_INTERNAL_ONLY) for Clang expands to [[clang::fallthrough]] in
preparation of enabling -Wimplicit-fallthrough.  (This is only relevant for
C++11, as neither C nor old C++ has a way to annotate intended fallthroughs.)

Could use BOOST_FALLTHROUGH instead of introducing our own SAL_FALLTHROUGH, but
that would require adding back in dependencies on boost_headers to many
libraries where we carefully removed any remaining Boost dependencies only
recently.  (At least make SAL_FALLTHROUGH strictly LIBO_INTERNAL_ONLY, so its
future evolution will not have any impact on the stable URE interface.)  C++17
will have a proper [[fallthroug]], eventually removing the need for a macro
altogether.

Change-Id: I342a7610a107db7d7a344ea9cbddfd9714d7e9ca
2016-05-10 16:42:16 +02:00
Noel Grandin
cd1bbdf0a4 convert codemaker::UnoType::Sort to scoped enum
Change-Id: I70a84f777e714bcc20c2d7b06b918e3be0f3ce4a
2016-02-24 11:48:38 +02:00
Noel Grandin
555ee51b77 convert to range-based for loops in codemaker/
Change-Id: Ifa521f34a8d9565bb61743c4a996bcba37e95ec2
2016-02-09 16:14:30 +02:00
Stephan Bergmann
87a9abf351 loplugin:nullptr (automatic rewrite)
Change-Id: Ic33cbe3feed8aec9f7578aea2cbd809169d9b8c8
2015-11-10 10:31:18 +01:00
Stephan Bergmann
0bc89aac4c cppumaker: Allow UNO interface functions to throw std::exception
...so that exceptions like std::bad_alloc need not be treated in C++
implementations of UNO interfaces to not cause std::unexpected.  Of course, this
requires implementations to be adapted and actually mention std::exception in
their exception specifications.

Change-Id: Ie7f91e7ca47d8a81e3d0ba817e65d83c7823af75
2013-10-20 16:10:53 +02:00
Mark Wielaard
e39e9e4cd8 Source files shouldn't have executable bit set.
Change-Id: Iafad6249a7998d7c749c1ca2979a606078cfcb5e
Reviewed-on: https://gerrit.libreoffice.org/4070
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-05-28 12:09:27 +00:00
Stephan Bergmann
02a8e8acd1 [API CHANGE] WIP: Experimental new binary type.rdb format
Make cppumaker work on top of unoidl/ instead of registry/, as a first step to
change all the various codemakers.

* API CHANGE: cppumaker no longer supports the -B switch, as that is meaningless
  with the new format.  When reading from an old-format .rdb file, /UCR is
  hard-coded as the prefix now.

* TODO: The new format does not yet support deprecation annotations, so the
  generated .hdl/.hpp files lack any SAL_DEPRECATED_INTERNALs for now.

* codemaker/typemanager.hxx is extended with access to unoidl/ functionality, so
  the various codemakers can use registry/ and unoidl/ in parallel for now.
  The access to registry/ functionality will be removed.  (Added small throwaway
  helper functions u2b/b2u to easily map between OString and OUString at the
  remaining seams for now.)

* Includes a selective revert of ba044b1e96
  "remove needless forward rtl::OUString declarations" in those parts of
  codemaker, unodevtools, unoidl that were covered by this local
  work-in-progress patch; I would otherwise have hard a hard time re-applying
  it.

* The generated .hdl/.hpp files are mostly unchanged, except for a few minor
  things:

** Any SAL_DEPRECATED_INTERNALs are missing (see above).

** In comprehensive getCppuType definitions, some members were erroneously
   classified as TypeCalss_UNKNOWN.

** In comprehensive getCppuType definitions, some unnecessary calls like

     ::cppu::UnoType< ::sal_Int32 >::get();

   can be removed.

** For typedef sequence<X>, the .hdl file need not include X.hdl, but only needs
   to forward-declare it.

** Unnecessary includes for optional bases of interfaces can be removed.

** Some numbering of local variable names (sMethodName1, ...) has changed.

Change-Id: Icad98f248ac15177337f1b4ab709a755a8af6238
2013-04-09 09:44:33 +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
bb1f0c667f Clean up codemaker/typemanager.hxx
Change-Id: I650efd6780070410eaf34993dd41ed1b8ada7c9a
2013-03-27 09:36:54 +01:00
Stephan Bergmann
f1bca26afc Remove redundant braces around for loops
...that had once been workarounds for compilers that did not yet support the
C++98 scoping rules for declarations in for-init-statements.

Change-Id: I51dc42982b30bf3adea6de1a10a91c0b4b4acfbe
2013-01-26 16:36:09 +01:00
Stephan Bergmann
543158edba Require XComponentContext.getServiceManager to throw instead of returning null
This is such a fatal error that there is probably no point in trying to handle
it, so allow to simplify client code by removing the requirement to check for a
null return value.

Simplified some client code accordingly (modules configmgr and ure, and the code
generated by cppumaker and javamaker).

Change-Id: I51c0b270ec73409374f7439a47ee061407a46e31
2012-09-17 16:59:53 +02:00
Michael Meeks
c91e2cae54 re-base on ALv2 code. 2012-06-12 22:24:54 +01:00
Olivier Hallot
fd866ac8f1 Fix for fdo43460 Part VI getLength() to isEmpty()
Part VI
Module
codemaker
2011-12-13 00:40:14 +04:00
Norbert Thiebaud
d8ed87481c remove include of pch header in codemaker 2011-11-27 12:59:38 -06:00
Caolán McNamara
7a69e30f96 use rtl_Instance for the auto-generated local statics 2011-06-01 15:35:09 +01:00
Sebastian Spaeth
a715e1b3d0 Add vim/emacs modelines to all source files
Fixes #fdo30794
Based on bin/add-modelines script (originally posted in mail
1286706307.1871.1399280959@webmail.messagingengine.com)

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2010-10-14 17:04:31 +02:00
Jens-Heiner Rechtien
7c80db2eb3 changefileheader2: #i109125#: change source file copyright notice from Sun Microsystems to Oracle; remove CVS style keywords (RCSfile, Revision) 2010-02-12 15:01:35 +01:00
Rüdiger Timm
b6c218dfc1 INTEGRATION: CWS jsc21 (1.7.34); FILE MERGED
2008/04/23 09:48:24 jsc 1.7.34.2: RESYNC: (1.7-1.8); FILE MERGED
2008/02/13 08:54:57 jsc 1.7.34.1: #i72964# remove external header guards
2008-07-11 12:28:48 +00:00
Rüdiger Timm
7d1f7a2647 INTEGRATION: CWS changefileheader (1.7.38); FILE MERGED
2008/04/01 21:05:33 thb 1.7.38.2: #i85987# Remove external guard generation from cppumaker (to have idl-generated header clean as well)
2008/03/31 07:22:53 rt 1.7.38.1: #i87441# Change license header to LPGL v3.
2008-04-11 11:09:37 +00:00
Oliver Bolte
05dd40f963 INTEGRATION: CWS pchfix02 (1.6.8); FILE MERGED
2006/09/01 17:19:22 kaib 1.6.8.1: #i68856# Added header markers and pch files
2006-09-17 02:37:21 +00:00
Jens-Heiner Rechtien
6c95220ccb INTEGRATION: CWS warnings01 (1.5.4); FILE MERGED
2006/04/20 08:10:11 sb 1.5.4.1: #i53898# Made code warning-free again after resync to SRC680m162.
2006-06-20 01:24:44 +00:00
Vladimir Glazounov
fa462b186e INTEGRATION: CWS jsc3 (1.4.4); FILE MERGED
2006/02/17 16:00:08 jsc 1.4.4.1: #i56247# refactoring and cosmetics
2006-03-15 08:14:58 +00:00
Rüdiger Timm
22a36fdb5c INTEGRATION: CWS sb41 (1.3.12); FILE MERGED
2005/11/24 08:21:09 sb 1.3.12.1: #i57855# Replaced getCppuType (which is still there for backwards compatibility) with new cppu::UnoType and helper cppu::getTypeFavourUnsigned, as GCC 4.1 started to complain about non-conforming uses of getCppuType in template code.
2006-01-10 14:47:12 +00:00
Rüdiger Timm
f4dcd3fa3d INTEGRATION: CWS ooo19126 (1.2.40); FILE MERGED
2005/09/05 17:28:02 rt 1.2.40.1: #i54170# Change license header: remove SISSL
2005-09-08 01:13:38 +00:00
Oliver Bolte
a30af74cbc INTEGRATION: CWS sb18 (1.1.2); FILE ADDED
2004/05/14 16:44:54 sb 1.1.2.4: #i21150# Make the inclusion of header files look nicer in generated header files.
2004/05/14 15:08:03 sb 1.1.2.3: #i21150# Always include sal/config.h at the start of each generated header file.
2004/04/28 09:03:00 sb 1.1.2.2: #i21150# Adapted to new Dependencies class.
2004/04/22 08:25:10 sb 1.1.2.1: #i21150# Improved include handling over what class TypeDependency offers.
2004-06-04 02:12:48 +00:00