Commit Graph

228 Commits

Author SHA1 Message Date
Noel Grandin
501233bf55 loplugin:virtualdead unused param in OTableRowView
Change-Id: Ice8d68284800e12af3e334722cc6109a1614e335
Reviewed-on: https://gerrit.libreoffice.org/81243
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-21 19:31:47 +02:00
Noel Grandin
6c9917c7a7 loplugin:constmethod in dbaccess
Change-Id: I3bb4784e1a2d828eca30f255a9c9bb4248309b81
Reviewed-on: https://gerrit.libreoffice.org/78603
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-05 08:27:23 +02:00
Andrea Gelmini
0a79b18cac Fix typo
Change-Id: I89f281b85a735847572e10f0622eb115f8615b24
Reviewed-on: https://gerrit.libreoffice.org/72176
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-12 09:03:07 +02:00
Gabor Kelemen
80aec8ef2a tdf#42949 Fix IWYU warnings in include/connectivity/*
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: I02f75be483529ba1f7a6e460e34c4752b4265221
Reviewed-on: https://gerrit.libreoffice.org/68893
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-12 10:14:54 +01:00
Arkadiy Illarionov
435b64ecb6 Simplify containers iterations in dbaccess
Use range-based loop or replace with STL functions

Change-Id: I01b4d97fa77ef8daf88e8e006b9523a6b71786cf
Reviewed-on: https://gerrit.libreoffice.org/68286
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-25 08:06:57 +01:00
Noel Grandin
347571a687 loplugin:indentation in dbaccess..drawinglayer
Change-Id: I05de6c01e827e596c9802c04964f43508dfd4d64
Reviewed-on: https://gerrit.libreoffice.org/67537
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-08 13:39:15 +01:00
Gabor Kelemen
16ee4d4346 tdf#42949 Fix IWYU warnings in include/svtools/*
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: I937ed12f2a96943664087ddcdd035f1347e84a57
Reviewed-on: https://gerrit.libreoffice.org/67102
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-05 09:15:25 +01:00
Gabor Kelemen
979aed6b38 o3tl::make_unique -> std::make_unique in dbaccess...framework
Since it is now possible to use C++14, it's time to replace
the temporary solution with the standard one

Change-Id: Iad5a422bc5a7da43d905edc91d1c46793332ec5e
Reviewed-on: https://gerrit.libreoffice.org/66545
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-21 07:36:04 +01:00
Gabor Kelemen
40710c488d tdf#42949 Fix IWYU warnings in include/vcl/[B-E]*
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: Iabe571aa8f00492902c499094bea8365a3e17fca
Reviewed-on: https://gerrit.libreoffice.org/63623
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-11-21 11:02:04 +01:00
Noel Grandin
32ca870833 clang-tidy performance-unnecessary-copy-init in dbaccess..drawinglayer
Change-Id: I49a152b2aea93d30b16192260f4f659c7e5fcaee
Reviewed-on: https://gerrit.libreoffice.org/62215
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-23 14:34:59 +02:00
Lionel Elie Mamane
d143e211b1 clean up column pos vs column id
everywhere GetColumnAtXPosPixel is used;
see also tdf#119564 fix

Change-Id: Ibab57c7305bf4dce9ea9f3df66e6214b0d1585b2
Reviewed-on: https://gerrit.libreoffice.org/61390
Tested-by: Jenkins
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
2018-10-10 14:51:12 +02:00
Noel Grandin
f7ce839c78 use unique_ptr in SfxUndoManager::AddUndoAction
Change-Id: I11483e3cece12a7373f4276972b4c899edf1ce15
Reviewed-on: https://gerrit.libreoffice.org/61566
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-09 12:09:55 +02:00
Muhammet Kara
66ed9797ba Simplify calls to Menu::CheckItem
in cui, dbaccess, vcl, sc, sd

Change-Id: I328d81cf6cd5a7e31fb21a758e4b2670e7df1b91
Reviewed-on: https://gerrit.libreoffice.org/52797
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-04-17 09:59:42 +02:00
Noel Grandin
0973e1f4e7 follow on for tdf#116981
the previous commit 235d61890512894e27f4f81e38a325eee3c67b30, fixed just
exactly the problem reported in tdf#116981.

This commit fixes similar issues that may exist elsewhere.

To recap, this started as a regression from
        commit  433fc2214c (patch)
        sal_uIntPtr->sal_Int32 in MultiSelection

Previously, MultiSelection stored it's values internally as sal_uIntPtr,
but returned them as long in FirstSelected(), NextSelected(),
and SFX_ENDOFSELECTION was defined to be ULONG_MAX.
On 64-bit Linux, sal_uIntPtr is typedefed to sal_uInt64, and ULONG_MAX
is 2^64, which means that previously, the SFX_ENDOFSELECTION value was
being converted from 2^64 to -2^63 when it was returned, which was why
these loop worked.

So convert SFX_ENDOFSELECTION to SAL_MIN_INT32, so we get a large
negative value which can never be a valid index, and which works more
like it did before the regression.
Also fix as many loops as I can find, to check against
SFX_ENDOFSELECTION explicitly.

Change-Id: I947d43dbe23a08105be3d849e33d7e774a8a19fa
Reviewed-on: https://gerrit.libreoffice.org/52934
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-16 10:42:01 +02:00
Gabor Kelemen
83d247b991 tdf#42949 Remove unnecessary localization headers from dbaccess
Found by searching for the header names and the localization function:
git grep -l -e \<core_resource.hxx\> -e \<strings.hrc\> dbaccess | xargs grep -c -e "loadString" -e "DBA_RES" | grep :0$ | grep -v /pch

Since certain files use the strings with other functions as well
the above command still gives some false positives.

Change-Id: Ib41c5d8d18f3a00729fcf2c4cd8203a2047ef0df
Reviewed-on: https://gerrit.libreoffice.org/52480
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-04-13 16:39:14 +02:00
Jochen Nitschke
9401c7c28a remove unused processfactory.hxx includes
and fix fallout

Change-Id: Id06bf31f2075111e426ba40c84c885ae70697bee
Reviewed-on: https://gerrit.libreoffice.org/52206
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2018-04-01 12:11:26 +02:00
Caolán McNamara
e3bd5ebf67 drop msgbox include
Change-Id: Ic7872adf8a7e8e4a8e1503dd21e22ec69509efaf
Reviewed-on: https://gerrit.libreoffice.org/51652
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-20 18:11:20 +01:00
Noel Grandin
a9ca38bdf7 loplugin:changetoolsgen in dbaccess..desktop
Change-Id: I713a320e46f93dedd11266ac12e52110d13f451a
Reviewed-on: https://gerrit.libreoffice.org/49655
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-14 07:27:38 +01:00
Stephan Bergmann
d597bb77b2 More loplugin:cstylecast: dbaccess
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable
loplugin:cstylecast for some more cases" plus
solenv/clang-format/reformat-formatted-files

Change-Id: I96df8923f7791288bbd350d75582a9220006ece6
2018-01-12 20:25:56 +01:00
Julien Nabet
4cb3e1c05a Use for-range loops in dbaccess (part2)
Change-Id: I7a247584a88fa516c7d28068b3d860499f090c92
Reviewed-on: https://gerrit.libreoffice.org/47189
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-11 09:39:27 +01:00
Stephan Bergmann
4b27653a12 loplugin:includeform: dbaccess
Change-Id: I15aee966012612033ab7e2ee03ac1a553802f540
2017-10-23 22:46:10 +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
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
55ff9d3e2d loplugin:unusedfields in dbaccess
Change-Id: I3f32573f25b4861799124905cefb3d9166570989
Reviewed-on: https://gerrit.libreoffice.org/39135
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-23 09:00:40 +02:00
Jochen Nitschke
febbad7263 cleanup unused css/frame/* includes
Change-Id: I173a29fd1ee889127369d2bc2fce8e010b89ca65
Reviewed-on: https://gerrit.libreoffice.org/38633
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-12 13:05:38 +02:00
Caolán McNamara
1807db242a DBACORE_RESSTRING can go now
Change-Id: I0d1f5372dc6a29af62d3d85c5f771e1e8884626e
2017-05-18 10:08:43 +01:00
Noel Grandin
389da66dfc remove unused uno::Reference vars
found by temporarily marking Reference as SAL_WARN_UNUSED.

Change-Id: I18809b62654467f890016adcc92576980ced393b
Reviewed-on: https://gerrit.libreoffice.org/37511
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-12 09:56:01 +02:00
Jochen Nitschke
b3eb843766 cleanup tools/debug.hxx includes
with command
> git grep -l tools/debug.hxx |
  xargs grep -L DBG_ |
  xargs sed -i '/#include *\(<\|\"\)tools\/debug.hxx.*/d'

don't change files in includes/ and */pch

Change-Id: Ie429d6a7dca5dfa1073e0f5ba037f7c84bdbec08
Reviewed-on: https://gerrit.libreoffice.org/37349
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-08 08:33:01 +02:00
Noel Grandin
0dbf528c29 loplugin:checkunusedparams in cppcanvas and dbaccess
Change-Id: Ia66e6326f3d1750b4e46a3f9f7127e7ed4aa99ca
Reviewed-on: https://gerrit.libreoffice.org/37068
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-02 08:19:37 +02:00
Caolán McNamara
9714e7460c convert table design row menu to .ui
Change-Id: I8a6be28ccd7cbd2b8f18255e3da01df2dfe13fb8
2017-04-18 10:39:11 +01:00
Caolán McNamara
3e1977abc6 convert RID_QUERYCOLPOPUPMENU to .ui format
Change-Id: Idcf8566db964c475a0b9049f215af6fc57f0978b
2017-04-07 18:36:59 +01:00
Miklos Vajna
a5a571307f tdf#82580 tools: rename Rectangle to tools::Rectangle
Mostly generated using

make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle"

Except some modules have their own foo::tools namespace, so there have
to use ::tools::Rectangle. This commit just moves the class from the
global namespace, it does not update pre/postwin.h yet.

Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2
Reviewed-on: https://gerrit.libreoffice.org/35923
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-03-31 06:27:11 +00:00
Andrea Gelmini
3c8efc29d6 Fix typos
Change-Id: If350d22ed9365fa8924dc049f23d7f5cd92b9872
Reviewed-on: https://gerrit.libreoffice.org/35625
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-25 16:54:57 +00:00
Noel Grandin
7916487cf4 convert ViewShellId to o3tl::strong_int
Change-Id: I45553d11d56aa8c4432aec126ca51f24bd3ead09
Reviewed-on: https://gerrit.libreoffice.org/35421
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-24 06:14:17 +00:00
Tor Lillqvist
b57d51e32f Drop :: prefix from std in [de]*/
Change-Id: I3247894fe022dce7f0aa351bd85fefcd7c545dd4
Reviewed-on: https://gerrit.libreoffice.org/34377
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2017-02-17 18:41:19 +00:00
Noel Grandin
4978328534 convert method names in tools::SvRef to be more like our other..
reference classes, uno::Reference and rtl::Reference.

Specifically rename Is()->is() and Clear()->clear().

Change-Id: Icb7e05e2d09cb9977121508b837ba0961dabb4ae
Reviewed-on: https://gerrit.libreoffice.org/33576
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-02 08:02:54 +00:00
Jan-Marek Glogowski
bf110d40ef Change all Idle* LINKs to be Timer*
Seem UBSAN doesn't like my forced reinterpret_cast to set the Idles
Link in the Timer class. Now there are two possible solution:

  1. convert all (DECL|IMPL).*_LINK call sites to use a Timer* or
  2. split the inheritance of Idle from Timer again to maintain
     different Link<>s and move all common code into a TimerBase.

While the 1st is more correct, the 2nd has a better indicator for
Idles. This implements the first solution.

And while at it, this also converts all call sites of SetTimeoutHdl
and SetIdleHdl to SetInvokeHandler and gets rid of some local Link
objects, which are just passed to the SetInvokeHandler call.

It also introduces ClearInvokeHandler() and replaces the respective
call sites of SetInvokeHandler( Link<Timer *, void>() ).

Change-Id: I40c4167b1493997b7f136add4dad2f4ff5504b69
2017-01-23 20:49:05 +01:00
Stephan Bergmann
106ea87205 Remove _TYPED suffix from tools/link.hxx macros
...which was introduced with 3ead3ad52f "Gradually
typed Link" to distinguish the new, typed versions from the old, untyped ones,
but is no longer necessary since 382eb1a23c
"remove untyped Link<>" removed the old versions.

Change-Id: I494025df486a16a45861fcd8192dfe0275b1103c
2016-10-05 07:56:12 +02:00
Noel Grandin
6dd4905a7a loplugin:constantparam in dbaccess..editeng
Change-Id: I1d0dc3d89933d86cd229e503b350fccc1523dedc
Reviewed-on: https://gerrit.libreoffice.org/28833
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-09-13 06:14:41 +00:00
Miklos Vajna
4cbaa49c0e svl: implement SfxUndoAction::GetViewShellId() interface in SfxListUndoAction
Client code in sw, sd, sc and svx is adapted, the rest is just a
placeholder for now.

With this, e.g. the undo item for Writer's insert comment properly
tracks which window was used for the insertion.

Change-Id: Idad587e6ca07ba69bf59aa7013b251af8bf95bab
Reviewed-on: https://gerrit.libreoffice.org/27781
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-08-01 17:04:45 +00:00
Miklos Vajna
6850f4e845 svl: avoid defaulted parameter in SfxUndoManager::EnterListAction()
It's a virtual function, and defaulted parameters there are problematic.

Change-Id: I3f110c7ac36dfda90811b033620286ad9fce1af1
Reviewed-on: https://gerrit.libreoffice.org/27772
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-08-01 10:32:27 +00:00
Noel Grandin
aa0d0536a4 tdf#97527 - vcl: reference-count Menu
some places are marked with "dodgy"- need to check those to see
what is going on, because they are leaving dangling pointers behind
in the Menu class

Change-Id: I41d5c7c0fec2f70ce9e3ffdc48cd03d26c0a869b
Reviewed-on: https://gerrit.libreoffice.org/26516
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-23 06:28:00 +00:00
Jorenz Paragas
26fa322583 tdf#42949: clean up includes in include/dbaccess with iwyu
Change-Id: I40de14b82b698b927cb461376470dc177c16d58c
Reviewed-on: https://gerrit.libreoffice.org/26345
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-06-16 12:23:15 +00:00
Noel Grandin
d96c114171 clang-tidy modernize-make-shared
Change-Id: I3fa866bfb3093fc876474a9d9db29fe05dc2af3a
Reviewed-on: https://gerrit.libreoffice.org/25056
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-18 06:58:44 +00:00
Matteo Casalin
eb81253a37 Avoid some OUString temporaries and constify
Change-Id: I4789e9c0a4c2978e703ad4f8a088c8d267cd0972
2016-05-10 21:38:37 +02:00
Noel Grandin
a5810faae3 clang-tidy modernize-loop-convert in d*
Change-Id: I0830a41b48e884ef63d32b5873c7007195659bb9
2016-04-25 11:57:07 +02:00
Stephan Bergmann
6009d33823 loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: I5cd8fd979fd4caa3d7cde599096627bfdd0dec7e
2016-04-20 17:25:39 +02:00
Noel Grandin
1aa4df615f use SAL_N_ELEMENTS in for loops
for with
  git grep -n 'for.*sizeof'

Change-Id: I6211024385e03ac5eeeb38690d2c1c699e015c2f
Reviewed-on: https://gerrit.libreoffice.org/23569
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-31 08:00:13 +00:00
Julien Nabet
2b60e64c18 Use const_iterator when possible (whole dbaccess)
Change-Id: I3d10a7914353b384fc7a2195a70398869f675211
Reviewed-on: https://gerrit.libreoffice.org/23570
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2016-03-28 18:39:16 +00:00