Commit Graph

636 Commits

Author SHA1 Message Date
Stephan Bergmann
d526bd7dd5 Fix StringAdd::isCompileTimeConstant
...to find StringLiteral on the RHS of +=.  Which revealed that the
VisitCompoundStmt/checkForCompoundAssign logic needed to be fixed, too, so that

  s += side_effect();
  s += "literal";
  s += side_effect();

only gets combined to

  s += side_effect() + "literal";
  s += side_effect();

and not all the way to

  s += side_effect() + "literal" + side_effect();

Change-Id: I432e3458b933a7d0ad6141c747b675cc8b0f0ba4
Reviewed-on: https://gerrit.libreoffice.org/81804
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-31 09:14:39 +01:00
Caolán McNamara
48595c805d Related: tdf#127935 set default activate handler to toggle row expansion
Change-Id: I2bbfb1445b8d2e748f642cdf4723d41b7f072e2b
Reviewed-on: https://gerrit.libreoffice.org/80305
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-06 22:14:17 +02:00
Noel Grandin
9b3643820b loplugin:stringadd in extensions..framework
Change-Id: I0a0788cdbde292cae582982b0000ee6d5a2056d7
Reviewed-on: https://gerrit.libreoffice.org/79888
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-01 08:26:43 +02:00
Noel Grandin
7d7a7862a7 new loplugin:sequenceloop
look for places we should be using std::as_const on for-range
loops over uno::Sequence, to avoid triggering a copy

Change-Id: I7efb641bf09d37c87946f03428ee4eec90298c8a
Reviewed-on: https://gerrit.libreoffice.org/77441
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-16 09:04:51 +02:00
Stephan Bergmann
5f28debd41 Improved loplugin:stringconstant (now that GCC 7 supports it): filter
Change-Id: I469205ac250bb78c626c8d237b6eea9445617f04
Reviewed-on: https://gerrit.libreoffice.org/76677
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-31 12:58:46 +02:00
Caolán McNamara
3f4f42ed9b cid#703960 Unchecked return value
Change-Id: I679e9e91261d468f2f2ee08f840ac3043d87817c
Reviewed-on: https://gerrit.libreoffice.org/75839
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-07-18 14:46:09 +02:00
Mike Kaganski
cb28e48bfd Drop INetURLObject::GetName and INetURLObject::GetExtension
They are just synonyms for GetLastName and GetFileExtension resp.

Change-Id: Ic498c7025cc421b830394ed94d64529fd74fe7dd
Reviewed-on: https://gerrit.libreoffice.org/74448
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-06-21 00:47:22 +02:00
Noel Grandin
04112bce50 loplugin:sequentialassign in filter..fpicker
Change-Id: I4ba0e1e982897bd570612f6cda8ba1e6a9fa5dbd
Reviewed-on: https://gerrit.libreoffice.org/70700
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-13 14:46:53 +02:00
Caolán McNamara
b2fafc5d73 drop some unneeded includes
Change-Id: I8e41e28313a22148033c566edce50f5bfa58d065
Reviewed-on: https://gerrit.libreoffice.org/70452
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-04-09 12:15:09 +02:00
Caolán McNamara
0812763874 weld XMLFilterSettingsDialog
Change-Id: Ia027fa0b5e99651988f2447bf29f6f5653dd0c48
Reviewed-on: https://gerrit.libreoffice.org/70139
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-04-02 17:11:56 +02:00
Caolán McNamara
5f9368a35d weld ODocumentLinkDialog
Change-Id: I9dd3a25e68da00acff24f5ccfafbfc97d9efcf54
Reviewed-on: https://gerrit.libreoffice.org/69058
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-03-11 22:23:21 +01:00
Arkadiy Illarionov
44841a6778 Simplify containers iterations in [f-l]*
Use range-based loop or replace with STL functions

Change-Id: Ib3fab47318d1bfbb4df8f886a8cd9596525a420f
Reviewed-on: https://gerrit.libreoffice.org/67914
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-18 07:41:05 +01:00
Mike Kaganski
b143e7642f tdf#120703 PVS: V560 A part of conditional expression is always true/false
Change-Id: Ib9ad5b874a210ef3862c668158fcc5d18eeab363
Reviewed-on: https://gerrit.libreoffice.org/67579
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-02-11 07:09:11 +01:00
Noel Grandin
9eed3b4a18 loplugin:indentation in filter
Change-Id: If0574f34effb82bf718958692a44fd422b71abd4
Reviewed-on: https://gerrit.libreoffice.org/67555
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-09 17:07:13 +01:00
Caolán McNamara
e94dc6f63a Resolves: tdf#122404 unlock just the toplevels that were locked
push what toplevels got locked to just unlock those ones. otherwise the just
dismissed toplevel may still be present in the Application toplevel list.

merge all the similar examples of this.

Change-Id: I77c0d55d1e4b3bcc3b8d88fef00ba289edd1e831
Reviewed-on: https://gerrit.libreoffice.org/66076
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-01-11 11:57:24 +01:00
Gabor Kelemen
6256797dac tdf#42949 Fix IWYU warnings in include/vcl/[v-x]*
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: I98f49765c6b74808dcbd692e0f375dd2848fcfd4
Reviewed-on: https://gerrit.libreoffice.org/65614
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-01-07 09:13:14 +01:00
Noel Grandin
93d1d7b0b6 use unique_ptr in XMLFilterJarHelper
Change-Id: I6c04c6d79334e36063e40b7eafe1d0c02be33d75
Reviewed-on: https://gerrit.libreoffice.org/65520
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-21 12:22:08 +01:00
Caolán McNamara
ec61f9c97f Resolves: tdf#122219 base form writer-window doesn't honour CloseVeto properly
just hit this with the same all-modal hammer we now use in the extension manager,
a modeless dialog, with modal subdialogs run by a normal non-async subloop, turns
into a modal dialog for all other toplevels

Change-Id: Ia35fad7a1be2ec493011c7e4354b70231b78a7fc
Reviewed-on: https://gerrit.libreoffice.org/65503
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-12-20 22:12:49 +01:00
Caolán McNamara
422b12bc13 tdf#122171 block closing final window while xslt filter dialog is modal
Change-Id: Ic40d4074bad7c06d1c1e395de74442f2a3bca5cd
Reviewed-on: https://gerrit.libreoffice.org/65419
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-12-19 15:16:28 +01:00
Caolán McNamara
cabc14a343 Resolves: tdf#122153 keep Execute for modal dialogs
and not modeless ones

cause you get one main loop running inside another, and everything
is running inside the modeless dialog main loop until it exits.

Change-Id: I45e92380288727669e287b62e84b815d5dc1960c
Reviewed-on: https://gerrit.libreoffice.org/65281
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-12-17 22:06:09 +01:00
Noel Grandin
799f159ac0 remove unused HeaderBarItemBits enum values
Change-Id: I84752cb9d683cb22c96d91cc54d7c4dc474603fc
Reviewed-on: https://gerrit.libreoffice.org/64269
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-30 08:40:08 +01:00
Gabor Kelemen
8067be0721 tdf#42949 Fix IWYU warnings in include/vcl/[f-h]*
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: Ice2eb8c5994bf2ccb88972332ca4a1d3ed41752a
Reviewed-on: https://gerrit.libreoffice.org/63826
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-11-27 10:35:30 +01:00
Noel Grandin
2e6a38b7f0 improve function-local statics in dbaccess..filter
Change-Id: I64939ad4b6c53696e33300114db384abfe73f13f
Reviewed-on: https://gerrit.libreoffice.org/63702
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-22 07:33:56 +01:00
Caolán McNamara
47897fdd93 weld SwCondCollPage
and put back original SvTreeListBox a11y factory use

Change-Id: I4ad8ce29d8fed6ec5d44e9a1d641919a89226b79
Reviewed-on: https://gerrit.libreoffice.org/63501
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-11-21 22:08:04 +01:00
Gabor Kelemen
492ea7e085 tdf#42949 Fix IWYU warnings in include/vcl/[ab]*
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: If18c80fc64e55d797953e24e40e5d5e62bd9c625
Reviewed-on: https://gerrit.libreoffice.org/63453
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-11-19 09:38:53 +01:00
Mike Kaganski
065edb4c8e tdf#120703 PVS: V547 Expression is always true/false
Change-Id: I0b3c407331bfa1fa0c5003250d327d4f26de3643
Reviewed-on: https://gerrit.libreoffice.org/63235
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-11-10 12:23:42 +01:00
Caolán McNamara
6311f7ffce move SvTreeListBox to vcl
Change-Id: I04a146d3d8a428ac1678827dc883525c40240a44
Reviewed-on: https://gerrit.libreoffice.org/62787
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-11-07 22:01:02 +01:00
Caolán McNamara
76c7cabc42 rename to weld::ComboBox are they are not text only now
Change-Id: Ice26d1fd2ad97a6959c6916fef428777efea9c2d
Reviewed-on: https://gerrit.libreoffice.org/60500
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-09-17 15:11:47 +02:00
Stephan Bergmann
206b5b2661 New loplugin:external
...warning about (for now only) functions and variables with external linkage
that likely don't need it.

The problems with moving entities into unnamed namespacs and breaking ADL
(as alluded to in comments in compilerplugins/clang/external.cxx) are
illustrated by the fact that while

  struct S1 { int f() { return 0; } };
  int f(S1 s) { return s.f(); }
  namespace N {
    struct S2: S1 { int f() { return 1; } };
    int f(S2 s) { return s.f(); }
  }
  int main() { return f(N::S2()); }

returns 1, both moving just the struct S2 into an nunnamed namespace,

  struct S1 { int f() { return 0; } };
  int f(S1 s) { return s.f(); }
  namespace N {
    namespace { struct S2: S1 { int f() { return 1; } }; }
    int f(S2 s) { return s.f(); }
  }
  int main() { return f(N::S2()); }

as well as moving just the function f overload into an unnamed namespace,

  struct S1 { int f() { return 0; } };
  int f(S1 s) { return s.f(); }
  namespace N {
    struct S2: S1 { int f() { return 1; } };
    namespace { int f(S2 s) { return s.f(); } }
  }
  int main() { return f(N::S2()); }

would each change the program to return 0 instead.

Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c
Reviewed-on: https://gerrit.libreoffice.org/60539
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-17 09:05:38 +02:00
Noel Grandin
8dc6c96a80 loplugin:simplifyconstruct in filter..framework
Change-Id: Ida4307a92dfb1dbd14da5a30b6ee1f0fd6a9455e
Reviewed-on: https://gerrit.libreoffice.org/60194
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-08 19:28:19 +02:00
Noel Grandin
4d20ec5ad7 loplugin:stringloop in filter
Change-Id: Icb2df9854975544ae3e164b5d25a6628824027e5
Reviewed-on: https://gerrit.libreoffice.org/58212
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-28 17:23:06 +02:00
Noel Grandin
af66cd6e08 loplugin:useuniqueptr in XMLFilterTestDialog
Change-Id: Id31ea8cae066dab5715c90a3c280fccdaf06fe59
Reviewed-on: https://gerrit.libreoffice.org/55522
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-12 08:23:48 +02:00
Noel Grandin
0f0542d55b loplugin:useuniqueptr in XMLFilterSettingsDialog
Change-Id: I1a72613661d40a7de468a47c09e91c37d9d3dede
Reviewed-on: https://gerrit.libreoffice.org/55523
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-11 08:26:42 +02:00
Noel Grandin
f2f9d43158 loplugin:useuniqueptr in XMLFilterTabDialog
Change-Id: Ic4bc1441802df3b62c1e8da69379f2677f243508
Reviewed-on: https://gerrit.libreoffice.org/55521
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-11 08:26:32 +02:00
Noel Grandin
8a6722f645 loplugin:useuniqueptr in TypeDetectionImporter
Change-Id: I0bb696ccf8555fe597aaff1cb6ab74bf16d81731
Reviewed-on: https://gerrit.libreoffice.org/55520
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-11 08:26:23 +02:00
Tomaž Vajngerl
45f20a893a [API CHANGE] deprecate XGraphicObjectResolver
XGraphicObjectResolver was used to get the GraphicObject URL from
an storage (package) URL. This isn't possible anymore in LO 6.1
since creating GraphicObject from uniqueID was removed for its
lifecycle issues. XGraphicObjectResolver is now deprecated and
when the "resolveGraphicObjectURL" is called, it throws a
RuntimeExeption.

In places where XGraphicObjectResolver was used, we now use the
XGraphicStorageHandler as the alternative. Both share a common
implementation so previously we could cast one to the other at
any time. Now only XGraphicStorageHandler is used.

GraphicObjectResolver was removed and replaced by the alternative
GraphicStorageHandler for instance creation - where needed.

Change-Id: I5d3f759c6f95b7dbe2d93688d99c8aa4899ffa84
Reviewed-on: https://gerrit.libreoffice.org/53279
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2018-04-26 18:19:32 +02:00
Noel Grandin
bbf134a2b7 SvTabListBox::SetTabs, pass count explicit
passing count as first element in array, dodgy.

Change-Id: I49905b554b3b4d6cc3fa419a36389cd2e5ded463
2018-04-25 10:14:02 +02:00
Caolán McNamara
a1533910d8 weld XMLFilterTabDialog
Change-Id: I5ef92805690f55913e6366fce1fd4dc5180bb5a6
Reviewed-on: https://gerrit.libreoffice.org/53146
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-04-19 17:57:22 +02:00
Caolán McNamara
0938ab463a weld XMLFilterTestDialog
Change-Id: Iaf2af607af1a6f42ab3156fabbc468d80264b14a
Reviewed-on: https://gerrit.libreoffice.org/53141
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-04-19 15:31:51 +02:00
Caolán McNamara
8ed2fb306f weld linkeditdialog
which enables changing FileDialogHelper over to welded

Change-Id: I988342a6574cb7ed09b2724929e8c7117474a56c
Reviewed-on: https://gerrit.libreoffice.org/52388
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-04-06 16:48:12 +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
Julien Nabet
c772d2234c Modernize a bit filter (part2)
mainly by using for-range loops + some algo simplifications

Change-Id: I25b02676527d551985434e07e7dc5f2927d4955e
Reviewed-on: https://gerrit.libreoffice.org/51377
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-03-16 07:05:11 +01:00
Caolán McNamara
0fad8d3081 convert remaining WarningBox to weld::MessageDialog
Change-Id: I7e3c156a6ad47ac232636ae274280c1cb7556d4a
2018-02-27 09:52:32 +00:00
Caolán McNamara
d75144cf44 convert remaining InfoBox to weld::MessageDialog
Change-Id: I91d828e38d96264cf4a76f30940942556b8f78d8
Reviewed-on: https://gerrit.libreoffice.org/50205
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-25 20:03:26 +01:00
Caolán McNamara
6a4c464b49 weld native message dialogs
just the straight-forward MessageDialog cases first

a) remove border_width from message dialog .ui so as to take
the default border width
b) retain 12 as default message dialog border for vcl widget case
c) remove layour_style from message dialog button boxes so as to
take the default mode (a no-op for vcl widget case)
d) use gtk response ids (vcl builder will converts to vcl ones)

Change-Id: I7de281093a1b64f92f71ca11e7cbba42bb658154
Reviewed-on: https://gerrit.libreoffice.org/50143
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-22 22:07:38 +01:00
Noel Grandin
bf8a6cacd0 loplugin:changetoolsgen in filter..framework
Change-Id: I622da8a0c096c74efd97326451c4576b230f0483
Reviewed-on: https://gerrit.libreoffice.org/49701
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-14 11:38:00 +01:00
Noel Grandin
23885b06b1 loplugin:unnecessaryparen extend to delete statements
Change-Id: Ic4383ea948876a26f791f0e5b0110cef978a26e1
Reviewed-on: https://gerrit.libreoffice.org/48027
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-17 09:32:03 +01:00
Jan Holesovsky
101a79cc4d lokdialog: Allow switching language of some of the ResMgr's.
This way, it is possible to have all the strings translated in dialogs even
when different users use different languages.  [It was already possible
to have different languages previously, but not everything in the dialog has
switched - like the buttons at the bottom of the dialogs etc.]

Change-Id: I29a5ae6d31a370eec60397884200b684ec1bf5b9
Reviewed-on: https://gerrit.libreoffice.org/46417
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/46979
Tested-by: Jenkins <ci@libreoffice.org>
2017-12-22 22:39:39 +01:00
Mike Kaganski
4e144751f1 loplugin:unusedindex
Change-Id: I256a807dd2a4c81126b5a76f3d472e31b8224146
Reviewed-on: https://gerrit.libreoffice.org/46652
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-18 07:36:32 +01:00
Noel Grandin
3af500580b loplugin:salcall fix functions
since cdecl is the default calling convention on Windows for
such functions, the annotation is redundant.

Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d
Reviewed-on: https://gerrit.libreoffice.org/46164
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-11 12:13:46 +01:00