Commit Graph

178 Commits

Author SHA1 Message Date
Stephan Bergmann
7340b6a951 loplugin:includeform: forms
Change-Id: I770fe656a390045e850e967074545bf5dac7f335
2017-10-23 22:46:08 +02:00
Caolán McNamara
182a74d937 de-hrc various things
e.g.  helpid[s].hrc -> helpids.h
and insert include guards where missing

move "ordinary" defines into .hxx files

remove .hrc entries that are used as arguments to dialog factory
when a dedicated method can be added instead

Change-Id: I792fb8eb0adfaa63cf354e6e57401fc943e9196e
2017-07-21 08:20:51 +01: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
Noel Grandin
ab9b38a406 use more begin()/end() for Sequence
Change-Id: I399be6b6ef7a6ce01e883569a177c0969bc29c69
2017-07-06 08:35:23 +02:00
Stephan Bergmann
ef7d2da6aa loplugin:casttovoid: forms
Change-Id: Ib3f4eaa68566665b9d6eec324cef593411b1aa7b
2017-07-02 22:32:12 +02:00
Lionel Elie Mamane
521d8d91cd janitorial; not useful; is actually used below
Change-Id: I87484b04d9f3feecdac3c53bc7eb3a5ec05e7af7
2017-06-24 15:24:39 +02:00
Caolán McNamara
95b25532d2 loplugin: simplifybool
Change-Id: I72579aa32157fb0deec85f28f7ceb4592bcaee4d
2017-05-09 15:10:36 +01:00
Lionel Elie Mamane
24e05b48cb tdf#107720 Bound Control initFromField: consider the case of the insert row
Change-Id: If18e161c994c926fd86453ab5736df1e89bb61de
2017-05-09 13:17:20 +02:00
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
e57ca02849 "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
Noel Grandin
bbf6c51717 loplugin:expandablemethods in forms..formula
Change-Id: Idc948ad06913def28cb642c3a4e5ea9322b9fb3b
Reviewed-on: https://gerrit.libreoffice.org/30688
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-08 09:49:48 +00:00
Caolán McNamara
0b069a35d3 coverity#1374272 Uncaught exception
Change-Id: Iea7cb5d35e78b89398e8aca7bbdbd17015cb7120
2016-10-26 09:56:30 +01:00
Caolán McNamara
ae68c27457 coverity#1374269 Uncaught exception
Change-Id: Ib3a876ea6463396784062bd53bfedff177818498
2016-10-26 09:56:30 +01:00
Caolán McNamara
a6bc2ace5f coverity#1372386 Uncaught exception
Change-Id: Ic1fd5486e6b26718086d2f062459f11c00f244d2
2016-09-01 10:40:14 +01:00
Stephan Bergmann
9741e7a437 Clean up uses of Any::getValue() in forms
Change-Id: I335aabc92ecb5de107dad3ecdfa6e025ec0d1b0f
2016-06-10 18:55:13 +02:00
Lionel Elie Mamane
51c8d22ec5 tdf#93403 check for changed DataSource on all Controls on form reload
1) OBoundControlModel: when reload() asks us to connect to database column,
   redo it even if it was previously done.

2) FmXGridPeer: when getting Reloaded event that we subscribed to
   (and specifically from frm::ODatabaseFrom), pass along the event
   to all columns before we treat it. The columns (controls) are
   themselves subscribed to it, but they may get the event after us,
   which means our treatment still uses stale data, which we continue
   to display.

   The column controls should continue to subscribe by themselves for
   the case that they are not in a grid, but direct children of the
   form.

Change-Id: I0cbcf2dc792e8650157a69ddc414d755de0e549a
2016-05-27 15:48:50 +02:00
Noel Grandin
2c8fe2e737 update unusedmethods plugin to deal with constructors
and fix the operator< implementations in some of the other
plugins too.

Change-Id: Ie5631e0cdc8d2a994ad2af2533cdb558a6cfc035
Reviewed-on: https://gerrit.libreoffice.org/25057
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-18 10:03:44 +00:00
Stephan Bergmann
1f7a31a461 Missing break in switch
Apparently forgotten when introducing the case PROPERTY_ID_GENERATEVBAEVENTS in
4fae740db7 "Disable fake VBA events for the
old-style form controls."

Change-Id: Id2783fd4f087669bd200a9c33eaad2bb6b7b50cd
2016-05-10 10:08:35 +02:00
Stephan Bergmann
bfb185c408 loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: I74cf43df85a878ee9af69901b2535f63461cb61e
2016-04-20 17:25:41 +02:00
Noel Grandin
929eab2164 sequence->vector in forms
Change-Id: Iea09367a51af8d0003a3ae58f8e7e0e825906367
Reviewed-on: https://gerrit.libreoffice.org/23691
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-01 07:33:50 +00:00
Noel Grandin
752cd07d08 InterfaceContainer2 with vector instead of Sequence
create an InterfaceContainer2 class to replace InterfaceContainer.
It uses a std::vector instead of a Sequence for the mutable listener
list, which provides far better performance.

Switch all our internal use-sites to the new class.

Change-Id: I6b56cfa511ded2395faa22e68fab3b2f16c3cb88
2016-01-25 08:52:03 +02:00
Noel Grandin
aa4dc89352 loplugin:unusedmethods unused return value in forms
Change-Id: I9da3e72ca12e040e7fb5bea7ccaa071edfd34f27
2016-01-11 13:14:08 +02:00
Andrea Gelmini
64d624b651 Fix typos
Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86
Reviewed-on: https://gerrit.libreoffice.org/21209
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-10 14:17:20 +00:00
Noel Grandin
d2df035740 loplugin:unusedfields
Change-Id: Ife94d488ead512abc6d137a0df74298bac67185d
2015-11-30 10:34:38 +02:00
Noel Grandin
fafac0d248 loplugin:unusedfields forms,formula,fpicker,framework
Change-Id: Ic7af56ac801c1e5b3fcf3c4e8413656e96220279
2015-11-20 15:07:05 +02:00
Noel Grandin
96c26b0d9d use initialiser for Sequence<OUString>
using variations of:
git grep -lP 'Sequence.*OUString.*\(\s*1\s*\)' | xargs perl -0777 -pi -e "s/Sequence<OUString> (\w+)\(1\)\;
\s*OUString\* pArray.*;
.*\[0\]\s*=\s*(\S+)\;/Sequence<OUString> \1 { \2 };/g"

Change-Id: I03c64334ff30ee14dce0d17b67f5122a3893bbe3
Reviewed-on: https://gerrit.libreoffice.org/19971
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-15 12:20:39 +00:00
Stephan Bergmann
11d3652418 loplugin:nullptr (automatic rewrite)
Change-Id: Ic67c3138ca66c6b6d6fcf76b09d4581e23f51f8d
2015-11-10 10:31:26 +01:00
Noel Grandin
1b41208608 use uno::Reference::set method instead of assignment
Change-Id: I3d94c94a9829161663a7ed18421ace38ce95a659
Reviewed-on: https://gerrit.libreoffice.org/19733
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-02 06:17:21 +00:00
Caolán McNamara
7ba7a974f6 cppcheck: noExplicitConstructor
Change-Id: I32c6728ce7423fd997cdbec66feb8a6ba39948d2
2015-10-07 15:11:03 +01:00
Noel Grandin
de020fc9c3 com::sun::star->css in forms/
Change-Id: I1c09e88f839bdf11c6ff809ec95769e8f729c7cd
2015-10-02 08:20:11 +02:00
Stephan Bergmann
d21260cdb6 Remove two silly typedefs
Change-Id: Ia7de1cebf6009e770ca1b96bab6d5e121573ccc1
2015-08-19 13:34:43 +02:00
Stephan Bergmann
891c80e172 loplugin:simplifybool
Change-Id: I8b704401233fa865c8ec4d4663d720a3d7d8de69
2015-07-16 14:00:17 +02:00
Caolán McNamara
5d39063581 coverity#1308583 Uncaught exception
Change-Id: Ibc6a8e437d81769b9a77d0a52e98f71b1c7e7d51
2015-06-29 09:43:35 +01:00
Andrea Gelmini
ca9de688c2 Fix typos
Change-Id: I549635318f46718042e50c8f89ce3c620cade990
Reviewed-on: https://gerrit.libreoffice.org/16281
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2015-06-16 11:10:51 +00:00
Stephan Bergmann
3a05a08ba7 loplugin:redundantcast: const_cast to same type
Change-Id: I5fe081bc2edfe14c81372ae0fd407e493d80d689
2015-05-29 12:04:32 +02:00
Stephan Bergmann
e19cd844be Rephrase comparisons between bool and sal_Bool
...to cater for forthcoming loplugin:implicitboolconversion improvements

Change-Id: I801b6b73648715448198d582a087cc834f6e20c8
2015-04-28 10:21:01 +02:00
Stephan Bergmann
08a943fc37 Get rid of trivial comphelper::query_interface wrapper
Change-Id: I2b9dafd2a34d055dcd8b8c4d894be30dc821d3be
2015-04-21 08:56:51 +02:00
Stephan Bergmann
4592d27dca Get rid of trivial comphelper::in-/decrement wrappers
Change-Id: Id3a12ef9d56c30719f483e610c8a8b08caf05def
2015-04-21 08:56:51 +02:00
Stephan Bergmann
373a9b9bb6 loplugin:redundantcast: redundant const_cast followed by implicit upcast
Change-Id: I58297ba336d96358eb0683684bbd763870ef56cb
2015-04-13 12:36:36 +02:00
Stephan Bergmann
cf42ba089f Replace remaining getCppuType et al with cppu::UnoType
Change-Id: Ifd082fb63b791441a9af595e02f6ce1732d36ab0
2015-04-01 08:39:17 +02:00
Noel Grandin
d772b9bdc4 loplugin:constantfunction: forms
Change-Id: Icb1b4bb3fd73b54378b77fbaa6c41c3a0f03706a
2015-03-24 10:31:18 +02:00
Stephan Bergmann
3099c70b11 Fix various XServiceInfo implementations
...to match what is recorded in the .component files

Change-Id: Ie548cd37872d3b8540222201afaac73040e65c8f
2015-03-17 12:25:11 +01:00
Lionel Elie Mamane
5cd4ab7f5c janitorial
Change-Id: If0fcad97538556ef7be5fe5f8405ca171696502d
2015-01-13 14:59:03 +01:00
Stephan Bergmann
9e3ced1956 forms: Use appropriate OUString functions on string constants
Change-Id: I1bcd815663c29025da6b3ce50bdf767eef74fe94
2014-12-18 14:12:26 +01:00
Caolán McNamara
275eb9c78e coverity#706540 Uncaught exception
Change-Id: I9dabd74824ec7cffe5371ed8be202ad27fecc80d
2014-11-14 12:02:47 +00:00
Stephan Bergmann
66da64c748 Missing include
...and only use getCaughtException as first statement in catch block.

Change-Id: Idcac073896b84fd2671b52b2315f454651dbf910
2014-10-20 15:42:36 +02:00
Caolán McNamara
9e8a88b6da coverity#706540 Uncaught exception
Change-Id: I175050b5ab66f4eeaa658f0aab1739b175d38d51
2014-10-20 10:57:19 +01:00
Philipp Weissenbacher
0f8ed32913 fdo#39468 Translate German comments, clean some ws
Conflicts:
	forms/source/component/FormComponent.cxx
	forms/source/component/FormattedField.cxx

Change-Id: I76dacfff3aa6f5680a1e81c97281c4f744ec1ceb
Reviewed-on: https://gerrit.libreoffice.org/11622
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-09-25 08:49:03 +00:00
Tobias Madl
0e55cc95df fdo#39468 Translated German to English
Change-Id: I7405b8251b977f8e5c1b95c37fbab6ae6cb120e7
Reviewed-on: https://gerrit.libreoffice.org/11461
Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
Tested-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
2014-09-24 18:02:12 +00:00
Philipp Weissenbacher
778dcbc53e fdo#39468 Translate German comments, clean some ws
Change-Id: I4a9b3b3e0d0fefb18808b0b045ffcf3531f4ea28
Reviewed-on: https://gerrit.libreoffice.org/11524
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-09-19 06:35:35 +00:00