Commit Graph

1904 Commits

Author SHA1 Message Date
Stephan Bergmann
7d66d3ae9f loplugin:includeform: reportdesign
Change-Id: Ie531677be09c264ed1536ad2512e76f29ab46881
2017-10-23 22:45:58 +02:00
Noel Grandin
87a9979c89 overload std::hash for OUString and OString
no need to explicitly specify it anymore

Change-Id: I6ad9259cce77201fdd75152533f5151aae83e9ec
Reviewed-on: https://gerrit.libreoffice.org/43567
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-23 08:15:35 +02:00
Noel Grandin
32eb4d56a4 use rtl::Reference for SvXMLGraphicHelper
Change-Id: I0052b29660fb6157f7e98c4e124f030ba439d304
Reviewed-on: https://gerrit.libreoffice.org/43417
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-16 13:39:33 +02:00
Noel Grandin
3035a8066f use rtl::Reference in SvXMLEmbeddedObjectHelper
instead of manual ref-counting

Change-Id: I559ebb3871dd3dd4a160bd83a259e36dd2f7b4d6
Reviewed-on: https://gerrit.libreoffice.org/43200
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-06 16:12:44 +02:00
Maxim Monastirsky
ecc3d43d2f Related: tdf#107569 Remove useless slots
With the current implementation of MenuBarManager, there is
no need to have sdi slots for menu items with submenus, and
moreover they have no effect at all.

Note that SID_PICKLIST was also (mis)used as an argument
to avoid adding a document to the recent list (which isn't
related to its mapping to .uno:PickList). But there seem to
be only read attempts, nothing actually sets it, so I think
this usage can be removed too. (For information, at least in
OOo 1.0.3 sources, there were 2 places where it was used as
an argument for SID_SAVEASDOC, although it was not present
there in the SID_SAVEASDOC def. in sfx.sdi.)

Change-Id: I18b0afe106f858406e13188bbc004ac99a3a0246
Reviewed-on: https://gerrit.libreoffice.org/43184
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2017-10-06 12:08:33 +02:00
Noel Grandin
2c05d758b2 add << operator for css::uno::Exception
Change-Id: Ia23dafd07133779144965682df3b7125a3214235
Reviewed-on: https://gerrit.libreoffice.org/43046
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
2017-10-04 15:18:00 +02:00
Noel Grandin
8481019c8c tdf#112848 Assert when clicking on report wizard or design view
the StartListening call here is unnecessary because OSectionView
inherits from SdrMarkView which calls StartListening unconditionally in
it's constructor.

Change-Id: I0191fce12e0600cc8fc6b9cc20e7e3bf39b386d3
Reviewed-on: https://gerrit.libreoffice.org/43070
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-03 14:03:57 +02:00
Noel Grandin
d3971ec256 new loplugin:blockblock
Change-Id: I7b68b70fa4c7234e8882f7627026959a596968fd
Reviewed-on: https://gerrit.libreoffice.org/43025
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-03 08:41:11 +02:00
Noel Grandin
20bae560c0 throw more useful uno::Exception's
if we're going to throw the base class of the exception hierarchy,
we can at least put a useful message in there to make the source a little
bit easier to locate.

Change-Id: I2f3106c99ba25125eacef8fa77e2f3a2c89f2566
Reviewed-on: https://gerrit.libreoffice.org/42968
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-10-01 18:17:11 +02:00
Stephan Bergmann
dbb5a5a2f4 Replace fancy Unicode in exception message
...with something more prosaic and ASCII

Change-Id: I4a927cec15abb7c00f39a6a298a13f192f34c631
2017-09-28 11:29:09 +02:00
Stephan Bergmann
c9f3277ea7 loplugin:stringconstant: Simplify construction of non-ASCII OUString
Change-Id: If80c53978106789824e6154db396baeecc1969dd
Reviewed-on: https://gerrit.libreoffice.org/42876
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-09-28 08:27:11 +02:00
Samuel Mehrbrodt
b9a8ac48d7 Rename GetSelectEntryData -> GetSelectedEntryData
Change-Id: Ia6402f6d2c978cbd5557052a43e9728ca9e11173
Reviewed-on: https://gerrit.libreoffice.org/42285
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-09-25 10:54:53 +02:00
Maxim Monastirsky
e867b19754 tdf#106762 Base SvxColorToolBoxControl on svt::PopupWindowController
This allows us to support tearoff without breaking gtk3/wayland.
SvxColorWindow no longer inherits from FloatingWindow, so several
call sites need also to be changed to use DockingManager.

Change-Id: I5d0bc611bbd2a8b9bfd4335212d0ae7e8fc10593
2017-09-24 15:37:28 +03:00
Maxim Monastirsky
8bd418a6b8 rptui::OToolboxController becomes unused, tdf#106762 related
It was a wrapper around the color controller, because the latter
used sfx2 registration. This will no longer be an issue, as we're
moving to officecfg based registration.

Change-Id: I45e1d8aeefdb62f5bd9b3dfac29910c77f0cd103
2017-09-24 15:37:28 +03:00
Noel Grandin
2684aefcf5 new loplugin unnecessarycatchthrow
Change-Id: Iabab71ee076227bc38447ec109afaea1e53a86a6
Reviewed-on: https://gerrit.libreoffice.org/42643
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-23 09:01:46 +02:00
Noel Grandin
a7ce8404be loplugin:flatten in pyuno..sc
Change-Id: I7ddc0b76532d26910f78642200750459508c2861
Reviewed-on: https://gerrit.libreoffice.org/42617
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-22 13:48:25 +02:00
Caolán McNamara
442df6cf83 ofz: don't leak in face of exceptions
Change-Id: Ic15590a13bd3770ee5dd7db76b21c830a4fe73e2
Reviewed-on: https://gerrit.libreoffice.org/42587
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-22 11:01:53 +02:00
Samuel Mehrbrodt
d99b65c864 Rename GetSelectEntryPos -> GetSelectedEntryPos
Change-Id: I0bd4cb463575af843c72d9c8aaf91742203532a4
Reviewed-on: https://gerrit.libreoffice.org/42283
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-09-21 12:45:38 +02:00
Samuel Mehrbrodt
b649e5bf1d Rename GetSelectEntry -> GetSelectedEntry
Change-Id: Ibb7d8c59c0e61b0e87455bd78f241d8691dd9dce
Reviewed-on: https://gerrit.libreoffice.org/42282
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-09-21 12:44:00 +02:00
Noel Grandin
1b1afc10f4 Fraction: make conversion operators and constructor explicit
and simplify some of the calculations that needed to be changed.

Which resulted in one unit test needing to change by one pixel,
let's hope not an indication of a real problem.

Change-Id: Ie56434f35f4e58d21ee6f671392e93dc7542fca3
Reviewed-on: https://gerrit.libreoffice.org/42240
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-13 15:46:47 +02:00
Caolán McNamara
e609ac1e5f coverity#1078469 silence Unchecked return value
Change-Id: I5c7c6328deb1c71f3a1214a4847ea97ef853c0d5
2017-09-12 09:32:24 +01:00
Noel Grandin
65e293f524 clang-tidy modernize-use-emplace in package..sax
Change-Id: Ibc0258fd79df987a0e295552bcc5bf89ee12007a
Reviewed-on: https://gerrit.libreoffice.org/42173
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-12 08:03:09 +02:00
Jochen Nitschke
2cd664b3d6 cppcheck: knownConditionTrueFalse 'bRet' is always false
regression of commit 528632660b
Date:   Thu Feb 9 08:52:13 2017 +0200
    convert ErrCode to strong typedef

Change-Id: I5ce2b7d38c8d71ec40cc8de7c13e8aec637476b7
Reviewed-on: https://gerrit.libreoffice.org/42139
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-10 21:04:58 +02:00
Caolán McNamara
1af5f6e8d1 set parent for file dialog helper
Change-Id: I3994ee48dcb5b2732cb27cb9ccb54926abf0828a
Reviewed-on: https://gerrit.libreoffice.org/42048
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-08 11:27:18 +02:00
Noel Grandin
dccd1633a1 loplugin:unnecessaryparen include case statements
Change-Id: I79fb3eec0d5d466e33b2e18621a7169695edf82f
Reviewed-on: https://gerrit.libreoffice.org/41920
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-06 08:43:33 +02:00
Julien Nabet
0dc237953c Typos for "available"
Change-Id: I8050b1f2ea5414b6e6da3392e8e22d330c794ff5
Reviewed-on: https://gerrit.libreoffice.org/41836
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-09-02 16:05:01 +02:00
Andrea Gelmini
5aafb3db7e Fix typos
Change-Id: I4496faa9ce7cad393bf06ca789099b045aea2741
Reviewed-on: https://gerrit.libreoffice.org/41785
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-09-01 17:15:14 +02:00
Johnny_M
06c07c0dc1 Translate German comments/debug strings (leftovers in dirs starmath to sysui)
Translates leftovers found using a custom regex.

Additionally translated:
- One randomly found comment in /reportdesign
- Test strings in /stoc/test (let's see if it works)

Change-Id: I5f893c194c4b56b5365700928a3b8b63936d03e2
Reviewed-on: https://gerrit.libreoffice.org/41583
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2017-08-28 12:03:56 +02:00
Noel Grandin
9881bea8d4 remove unnecessary use of OUString::getStr
Change-Id: I3d13e1c0bb6aa4a7aacc463198747c1368ebc9b4
Reviewed-on: https://gerrit.libreoffice.org/38114
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-17 11:55:13 +02:00
Noel Grandin
2e8acde112 remove UL/L suffixes from integer constants on the RHS of expressions
Change-Id: I899a8126c9d971601fea6c77eca165718aea0ac5
Reviewed-on: https://gerrit.libreoffice.org/41237
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-17 11:25:21 +02:00
Noel Grandin
0b021f89f6 rename some unnecessary contractions, Lft-Left, etc.
Change-Id: Idf4ab2d4d2550a02c0c50a981d94c67b111082a9
Reviewed-on: https://gerrit.libreoffice.org/41204
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-16 11:19:21 +02:00
Noel Grandin
db17a874af convert std::map::insert to std::map::emplace II
Change-Id: Ief8bd59c903625ba65b75114b7b52c3b7ecbd331
Reviewed-on: https://gerrit.libreoffice.org/41019
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-11 13:51:29 +02:00
Noel Grandin
d347c24036 convert std::map::insert to std::map::emplace
which is considerably less verbose

Change-Id: Ifa373e8eb09e39bd6c8d3578641610a6055a187b
Reviewed-on: https://gerrit.libreoffice.org/40978
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-11 12:38:32 +02:00
Jochen Nitschke
7b38559584 cppcheck: variableScope
value unused since commit d5630adf33
     loplugin:checkunusedparams in various

Change-Id: I76c9a89f6fe15fbfce92f0d5578fd533325cb72b
Reviewed-on: https://gerrit.libreoffice.org/40813
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-07 08:51:15 +02:00
Noel Grandin
b9e9dde5ae loplugin:constparams in reportdesign
Change-Id: Ibbaca071e1279a7b5302207fe27e71d2994d6768
Reviewed-on: https://gerrit.libreoffice.org/40713
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-03 15:24:44 +02:00
Noel Grandin
d5630adf33 loplugin:checkunusedparams in various
Change-Id: I4f54940a9ebdcd47776b2a5f7bae6e49b633ee44
Reviewed-on: https://gerrit.libreoffice.org/40706
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-03 13:13:17 +02:00
Caolán McNamara
b1d829e52e move resmgr to unotools
and the vast majority of translations is to the ui language so default
ctor with that arg

and now drop OModuleResourceClient

Change-Id: I3b85a560ffdfe5f019c2271ac56a5fe4a361522b
2017-08-01 13:42:21 +01:00
Noel Grandin
8ce64dbb3d loplugin:constparams in svx
and fix a bug in the plugin itself when calling operator's like the one
on std::function<>

Change-Id: I1617607107eeff06785c1841f69e13ad2926218e
Reviewed-on: https://gerrit.libreoffice.org/40446
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-27 08:03:26 +02:00
Noel Grandin
f74da1315a use more comphelper::InitAnyPropertySequence
Found with:
  git grep -n -A10 'Sequence.*Any' -- *.cxx | grep -B5 -w PropertyValueProvider
and:
  git grep -n 'Sequence.*Any.*( *&'

Change-Id: Icb18c98bdd3f8352817e443ff78de5df042859ad
Reviewed-on: https://gerrit.libreoffice.org/40389
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-25 12:03:17 +02:00
Andrea Gelmini
b66cfdbc1a Removed duplicated includes
Mainly about "core_resource.hxx" and "strings.hrc".
It passed "make check" on Linux.

Change-Id: I994420d5e33d02b64929f8a51c548a7322d88a79
Reviewed-on: https://gerrit.libreoffice.org/40311
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-07-23 13:22:07 +02:00
Noel Grandin
e5ee29737e loplugin:unusedfields in oox,reportdesign
Change-Id: I0201d76cb3d4605bdc00c81cfa9d91f98341c7f3
Reviewed-on: https://gerrit.libreoffice.org/40290
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-22 08:47:34 +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
3697b87b70 use more OUString::operator== in forms..sal
Change-Id: I70d7e50f8c1e019524ccad915f0cca912c5035dc
Reviewed-on: https://gerrit.libreoffice.org/39899
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-13 15:20:58 +02:00
Jan-Marek Glogowski
00aa0892e7 Reorganize Scheduler priority classes
This is based on glibs classification of tasks, but while glib uses
an int for more fine grained priority, we stay with our enum.

1. Timers start with DEFAULT priority, which directly corresponds
   with the previous HIGH priority
2. Idles start with DEFAULT_IDLE priority instead of the previous
   HIGH priority, so idle default becomes "really run when idle".

As RESIZE and REPAINT are special, and the DEFAULTS are set, there
is just one primary decision for the programmer: should my idle
run before paint (AKA HIGH_IDLE)?

If we really need a more fine-grained classification, we can add it
later, or also switch to a real int. As a result, this drops many
classifications from the code and drastically changes behaviour,
AKA a mail merge from KDE is now as fast as Gtk+ again.

Change-Id: I498a73fd02d5fb6f5d7e9f742f3bce972de9b1f9
2017-07-13 12:10:28 +02:00
Eike Rathke
3087b8f5d5 Introduce IFormulaEditorHelper::createCompiler()
For application specific derivatives.

Change-Id: I8af95bd120c642e47ec5d0708ed463c98c471567
2017-07-11 16:42:23 +02:00
Noel Grandin
7de833a626 simplify calls OUString::copy in foo.copy(x, foo.getLength() - x)
Change-Id: I20318c77dcc3bc2a64336541ef5a3f412bfd9483
Reviewed-on: https://gerrit.libreoffice.org/39803
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-11 14:13:03 +02:00
Noel Grandin
20571c4725 use more range-for on uno::Sequence
Change-Id: Ifad32425d79be5a22d33d721bdc5fb993f699759
Reviewed-on: https://gerrit.libreoffice.org/39763
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-11 12:50:55 +02:00
Eike Rathke
4f41e8810d Add missing override
Change-Id: I233c84706916bfe3915e31deb8d41b3b377b7d98
2017-07-11 11:21:48 +02:00
Eike Rathke
741f61d0ca Introduce IFormulaEditorHelper::getCompiler()
Implemented at rptui::FormulaDialog as nullptr and at ScFormulaDlg as ScCompiler*

Change-Id: I0edaca56f5d9e3505ed766d43bc9ee4af80f03ff
2017-07-10 21:15:28 +02:00