Commit Graph

42 Commits

Author SHA1 Message Date
Stephan Bergmann
3daadac6c9 loplugin:includeform: extensions
Change-Id: I2f9001ddae6cbcef51ba2c0415baa727f211261d
2017-10-23 22:46:08 +02:00
Caolán McNamara
00657aef09 migrate to boost::gettext
* all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl
* all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string")
* ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching
  MODULE .mo files
* UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui
  goes from l10n target to normal one, so the res/lang.zips of UI files go away
* translation via Translation::get(hrc-define-key, imbued-std::locale)
* python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there
  to keep finding the .hrc file uniform) so magic numbers can go away there
* java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation
  mechanism
* en-US res files go away, their strings are now the .hrc keys in the source code
* remaining .res files are replaced by .mo files
* in .res/.ui-lang-zip files, the old scheme missing translations of strings
  results in inserting the english original so something can be found, now the
  standard fallback of using the english original from the source key is used, so
  partial translations shrink dramatically in size
* extract .hrc strings with hrcex which backs onto
   xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap
* extract .ui strings with uiex which backs onto
   xgettext --add-comments --no-wrap
* qtz for gettext translations is generated at runtime as ascii-ified crc32 of
   content + "|" + msgid
* [API CHANGE] remove deprecated binary .res resouce loader related uno apis
      com::sun::resource::OfficeResourceLoader
      com::sun::resource::XResourceBundleLoader
      com::sun::resource::XResourceBundle
    when translating strings via uno apis
      com.sun.star.resource.StringResourceWithLocation
    can continue to be used

Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
2017-07-21 08:20:50 +01:00
Andrea Gelmini
3063d55b8b Fix typos
Change-Id: I338dacd3cfe915714a9038e1dea4a60d586e9394
Reviewed-on: https://gerrit.libreoffice.org/34806
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-03 07:05:43 +00:00
Noel Grandin
1c3e84d819 teach lolugin:stringconstant about calling constructors
so we can remove unnecessary calls to the OUString(literal) constructor
when calling constructors like this:
   Foo(OUString("xxx"), 1)

Change-Id: I1de60ef561437c86b27dc9cb095a5deb2e103b36
Reviewed-on: https://gerrit.libreoffice.org/33698
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-31 08:56:20 +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
Noel Grandin
1b277a37c5 loplugin:expandablemethods in extensions
Change-Id: I93a770933de86146de1d25db9d596615916c3e28
Reviewed-on: https://gerrit.libreoffice.org/30689
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-08 11:11:52 +00:00
Caolán McNamara
170cf525e4 remove (yet yet another) StringListResource implementation
Change-Id: Ifaf89badfc339f8253a629c6960df8a943b8cce5
2016-10-13 09:36:51 +01:00
Stephan Bergmann
2ee796ba49 loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: Ief96e7038461f514d8fe5bf16b7181b122715775
2016-04-20 17:25:40 +02:00
Jochen Nitschke
150ac9cf05 clean-up: unused using declarations and includes
Searched source for using declarations.
Checked if those symbols reappear in the source file,
even in comments or dead code but not in #include statements.
If they don't reappear, remove the declaration.
Remove includes whose symbol got removed.

Change-Id: Ibb77163f63c1120070e9518e3dc0a78c6c59fab0
Reviewed-on: https://gerrit.libreoffice.org/24148
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-18 07:25:24 +00:00
Jochen Nitschke
4c7ec9f112 cleanup: remove unused com/sun/star/uno includes
Sequence.h(xx), Any.h(xx) and Type.h(xx)
and remove unused using-declarations from these files.

Add a few missing includes provided by them.

Change-Id: I6b91b6d1fdf9d0496dd546c0aab9bdcc6831a5d4
Reviewed-on: https://gerrit.libreoffice.org/23805
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-12 06:38:26 +00:00
Noel Grandin
59b072e22b yyyyy
Change-Id: I9a947beefd2dfe21da8239e841ea3fb416bd1548
2015-11-04 14:10:44 +02:00
Noel Grandin
0e8a40e8b8 calling IsSet() before Call() on Link<> is unnecessary
the Call() already does a check

Found with:
git grep -A 1 -w 'IsSet()'
    | grep -B 1 '.Call('
    | grep ':'
    | cut -d ':' -f 1

Change-Id: Ia7248f5d62640b75f705e539c3d1183e39c0d847
2015-10-15 12:29:01 +02:00
Noel Grandin
bd1da37163 convert Link<> to typed
Change-Id: I1ce46ea4784ecbd30a47d749d863173e0fe86fe6
2015-09-17 12:22:47 +02:00
Stephan Bergmann
3ead3ad52f Gradually typed Link
Turn the Link class into a template abstracting over the link's argument and
return types, but provide default template arguments that keep the generic,
unsafe "void* in, sal_IntPtr out" behvior.  That way, individual uses of the
Link class can be updated over time.

All the related macros are duplicated with ..._TYPED counterparts, that
additionally take the RetType (except for LINK_TYPED, which manages to infer the
relevant types from the supplied Member).

(It would have been attractive to change the "untyped" LinkStubs from taking a
void* to a properly typed ArgType parameter, too, but that would cause
-fsanitize=function to flag uses of "untyped" Link::Call.)

Change-Id: I3b0140378bad99abbf240140ebb4a46a05d2d2f8
2015-04-30 10:20:00 +02:00
Stephan Bergmann
2c4494df10 loplugin:staticcall
Change-Id: Ib8bbba8d6e3364f7474643ddb60a469497437616
2014-06-13 17:54:26 +02:00
Noel Grandin
7ae4102f17 extensions: sal_Bool->bool
Change-Id: I1730f99c08690138e9aa7aba54304fd7bc51491d
2014-05-02 08:49:22 +02:00
Tor Lillqvist
6835d9f307 It's "its", not "it's"
Change-Id: Ieaa787afd7cc622b4750a2ee8f17f6dad934ba63
2014-04-10 20:22:50 +03:00
Alexander Wilms
15246c959a Remove visual noise from extensions
Change-Id: I0397d0d0e5343b7ed192a790664b068ac6955bd3
Reviewed-on: https://gerrit.libreoffice.org/8259
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2014-02-27 07:34:29 -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
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
Caolán McNamara
5efc15f000 reduce use of UniString from ResID ctor
Change-Id: I8d7619e7807ff2d400ec5c7fd181375130245728
2013-07-28 16:45:48 +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
2b7ee1db28 remove boilerplate comments
Change-Id: I44a476a9843816f70a7a4d84b8c35edeecd5daaf
2013-04-01 22:45:36 +02: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
Noel Grandin
bb121c864c fdo#46808, Convert frame::Desktop to new style service.
I had to drop XEventBroadcaster from the merged interface
because it introduced method name conflicts (addEventListener).

Shouldn't be an issue since it was scheduled to be dropped anyhow,
and the service implementation still implements it, so existing clients
will be fine.

I dropped the interface XPropertySet from the combined IDL because nobody
seems to be using it, and it's primary purpose appears to be to set weird
flags.

I dropped the optional interfaces
   XStatusIndicatorFactory
   XDispatchInformationProvider
from the combined IDL because the service does not implement them, and
nobody seems to be using them. I suspect they were mistakenly copied
from XFrame.

I also did not convert the Title, UserDefinedAttributes and LayoutManager
properties to attributes, again because no-one is using them.

Change-Id: I678a00006ed2cca2d6c37c4e39465811442c33af
2012-12-21 10:57:09 +02:00
Norbert Thiebaud
750fc20611 replace remaining InterlockedCount() with inlined version
Change-Id: Ifcfa48fc87f905a91470a5b0fd597b02f220784c
Reviewed-on: https://gerrit.libreoffice.org/671
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2012-09-25 01:55:38 +00:00
Thomas Arnhold
57154616f0 Remove UNO includes comments
Change-Id: I48e193322967fb75e93eaf81e9e2110d3056f92a
2012-06-29 09:25:09 +02:00
Michael Meeks
b9042fad7c re-base on ALv2 code.
Change-Id: I6c145e984c885c7e06caa1c27bfb354ea49ad9ce
2012-06-21 15:00:05 +01:00
Norbert Thiebaud
0a96c1f4f4 remove include of pch header in extensions 2011-11-27 13:08:28 -06:00
Sebastian Spaeth
ead7290449 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-13 10:57:23 +02:00
Petr Mladek
e2039c054c remove include guards using fixguard.py 2010-10-05 18:08:01 +02:00
Jens-Heiner Rechtien
36de66bdf0 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
dcdb19590a INTEGRATION: CWS changefileheader (1.8.70); FILE MERGED
2008/04/01 15:15:21 thb 1.8.70.3: #i85898# Stripping all external header guards
2008/04/01 12:29:54 thb 1.8.70.2: #i85898# Stripping all external header guards
2008/03/31 12:31:55 rt 1.8.70.1: #i87441# Change license header to LPGL v3.
2008-04-11 11:19:38 +00:00
Kurt Zenker
28f2b307ea INTEGRATION: CWS titles02 (1.8.14); FILE MERGED
2007/12/17 15:35:48 oj 1.8.14.1: #i45617# remove set title prop
2008-04-04 13:06:33 +00:00
Ivo Hinkelmann
21a1cfe996 INTEGRATION: CWS dba24c (1.7.36); FILE MERGED
2007/09/13 11:59:31 fs 1.7.36.3: some QueryDesign init param names changed during #i49183#
2007/09/12 09:07:26 fs 1.7.36.2: #i77492# the SQL command designer now also allows the user to change the 'Direct SQL' setting, and exposes this as EscapeProcessing property.
2007/09/05 13:12:49 fs 1.7.36.1: #i66624# SQLCommandDesigner also for ListSource property
2007-11-21 15:22:32 +00:00
Rüdiger Timm
ec536c1ee8 INTEGRATION: CWS oj14 (1.3.48); FILE MERGED
2007/06/04 20:26:29 oj 1.3.48.4: RESYNC: (1.4-1.6); FILE MERGED
2007/02/20 15:48:27 oj 1.3.48.3: RESYNC: (1.3-1.4); FILE MERGED
2006/12/20 14:12:42 oj 1.3.48.2: using was missing
2006/12/19 14:18:33 oj 1.3.48.1: some adjustments
2007-07-06 07:53:46 +00:00
Kurt Zenker
bc769e2a2b INTEGRATION: CWS dba23a (1.4.10); FILE MERGED
2007/05/09 11:34:00 fs 1.4.10.2: RESYNC: (1.4-1.5); FILE MERGED
2007/03/14 11:07:51 fs 1.4.10.1: changes as suggested by code reviews
2007-05-10 09:49:49 +00:00
Rüdiger Timm
ded1994cbf INTEGRATION: CWS residcleanup (1.4.20); FILE MERGED
2007/02/28 20:46:12 pl 1.4.20.1: #i74635# no more ResMgr fallback
2007-04-26 07:08:39 +00:00
Vladimir Glazounov
e98166565e INTEGRATION: CWS dba22b (1.3.70); FILE MERGED
2006/12/09 22:14:55 fs 1.3.70.1: impl_doOpenDesignerFrame_nothrow: reset m_xDesigner in case of an exception
2007-01-15 13:40:49 +00:00
Oliver Bolte
9e2f23b27f INTEGRATION: CWS pchfix02 (1.2.94); FILE MERGED
2006/09/01 17:26:44 kaib 1.2.94.1: #i68856# Added header markers and pch files
2006-09-16 12:23:28 +00:00
Vladimir Glazounov
5e86ffd3d3 INTEGRATION: CWS pbrwuno (1.1.2); FILE ADDED
2005/10/24 08:42:06 fs 1.1.2.3: start making the handlers full-fledged components, with using a new infrastructure replacing extensions/source/inc/componentmodule.*
2005/10/13 13:01:11 fs 1.1.2.2: #i53095# introduce an XObjectInspector/Model
2005/08/12 16:30:15 fs 1.1.2.1: - more fine-grained control in the IPropertyBrowserUI which elements
  to enable or disable
- moved designing the SQL command into a dedicated handler
- some more reactions on actuating properties move to dedicated handlers
- *nearly* completed implementation of the "composed browser UI", which
  collects and combines UI change requests (IPropertyBrowserUI)
  (still missing: proper auto-firing)
2006-03-14 10:32:32 +00:00