Commit Graph

212 Commits

Author SHA1 Message Date
Caolán McNamara
c02c1c2eee cid#1453991 Wrapper object use after free
Change-Id: I6476c765589cbb3996ad8832a0e159aa4d965d32
Reviewed-on: https://gerrit.libreoffice.org/81173
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-20 21:15:37 +02:00
Caolán McNamara
4dde0d06bd cid#1453991 Wrapper object use after free
Change-Id: I4ea3ed40deaf20e91e1a0a42ee115cf761853875
Reviewed-on: https://gerrit.libreoffice.org/81170
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-20 19:16:47 +02:00
Caolán McNamara
deb37c44ec now drop TabPageParent intermediate
Change-Id: I47328f76342ac023628d9042bdfa8213a1c93d0c
Reviewed-on: https://gerrit.libreoffice.org/79469
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-09-26 09:54:49 +02:00
Caolán McNamara
a37e559ed1 disinherit OWizardPage and SfxTabPage from vcl TabPage
Now that there's no need to support weld/unwelded mixes of
pages in dialog any more.

inherit from a BuilderPage which contains a Builder and
Toplevel container

BuilderPage Activate and Deactivate replace TabPage ActivatePage and
DeactivatePage, allowing disambiguation wrt SfxTabPage ActivatePage and
DeactivatePage.

Change-Id: I5706e50fd92f712a25328ee9791e054bb9ad9812
Reviewed-on: https://gerrit.libreoffice.org/79317
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-09-26 09:54:18 +02:00
Caolán McNamara
df809481d4 inherit from one class
Change-Id: Ia3cb14429a42e445c14cecc20728d59d985f4b5d
Reviewed-on: https://gerrit.libreoffice.org/78837
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-09-14 06:51:30 +02:00
Caolán McNamara
693d9ff29e weld SwMailMergeWizard
Change-Id: I03a7fd1f7676792387155db986d710a001887c8d
Reviewed-on: https://gerrit.libreoffice.org/77977
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-08-23 16:28:12 +02:00
Caolán McNamara
8d71f19550 don't call Show on the SfxTabPage
it causes spurious toplevels in the welded case

Change-Id: I321dfaf1d9df1d4a0b80435814e844d8fa29847b
Reviewed-on: https://gerrit.libreoffice.org/78004
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-08-23 13:44:21 +02:00
Caolán McNamara
d661cb1761 weld chart CreationWizard
Change-Id: I7ee88c1e1b0eca5c2510a4bbba8b60c0d8a4e3e8
Reviewed-on: https://gerrit.libreoffice.org/77954
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-08-22 18:26:41 +02:00
Caolán McNamara
69057064d8 weld ODbTypeWizDialogSetup
split up RoadmapWizard to sit its wizard logic on top of a a native GtkAssistant

a) awkwardly GtkAssistant is not a GtkDialog, but derives directly from
GtkWindow so some shuffling around required due to that

b) hidden/unused pages are shuffled to the end of the list of pages and
their titles turned off in order to hide them from the roadmap

c) some nonstandard hackery required to get the gtk roadmap titles to wrap

Change-Id: I0d2346c489fef744136a2785f33c846d97bd8dc6
Reviewed-on: https://gerrit.libreoffice.org/76876
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-08-22 16:37:16 +02:00
Caolán McNamara
07083030e3 move RoadmapWizard to vcl
Change-Id: Iae2f5e0ac52dcf862035508db3a22cfd86d02d8f
Reviewed-on: https://gerrit.libreoffice.org/76903
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-08-17 16:31:30 +02:00
Caolán McNamara
4d450704d6 move WizardMachine to vcl
Change-Id: I55cc4a6c1ad111a22a43fd66a3cd01b5b02fb7cb
Reviewed-on: https://gerrit.libreoffice.org/76902
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-08-16 22:32:42 +02:00
Xisco Fauli
77ef0a92b3 tdf#121599, tdf#123099: ignore migration dialog when
1. a new HSQLDB database is created
2. the HSQLDB database is not opened interactively

Change-Id: I7287e467e06be5eec1e5c661123e1332cdaeef9b
Reviewed-on: https://gerrit.libreoffice.org/75643
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2019-07-31 03:49:17 +02:00
Noel Grandin
880af0672c loplugin:unusedfields in dbaccess
Change-Id: I858fd3d0bbd91b0ee7e02969b26d80e262c63b7d
Reviewed-on: https://gerrit.libreoffice.org/68279
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-25 08:06:07 +01:00
Caolán McNamara
f6f53264d9 rename DBOConnectionTabPageSetup back to OConnectionTabPageSetup
Change-Id: I3d5c90e51922350ca3bb6f59fc94bf5768c995f1
Reviewed-on: https://gerrit.libreoffice.org/62326
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-25 09:58:00 +02:00
Caolán McNamara
a8c1835911 drop unused stuff
Change-Id: Icd92801dc88c603c369bfb6c85bf4278ea609ea9
Reviewed-on: https://gerrit.libreoffice.org/62324
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-25 09:57:16 +02:00
Caolán McNamara
f8e06f7b77 weld AdvancedSettingsDialog
make run virtual and fold executes into it, so GenericUnoDialog
can call run on tabdialogs to do the right thing, and allows
Start_Impl to be private again

Change-Id: Ic457edfbdc7457f4c49d4e8ad679903f38ad9b42
Reviewed-on: https://gerrit.libreoffice.org/62227
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-24 11:55:01 +02:00
Noel Grandin
d8c41e6fe5 DSID_DATASOURCE_UNO is dead
ever since it's introduction in
    commit 1519f106ca
    Date:   Mon Feb 5 12:57:41 2001 +0000
    #83430# +DSID_DATASOURCE_UNO

Change-Id: If9573e259c8897c6cd5cce649bfde7ff3aef7f77
Reviewed-on: https://gerrit.libreoffice.org/62230
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-24 08:35:09 +02: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
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
07e87211c2 loplugin:simplifyconstruct in dbaccess..drawinglayer
Change-Id: I83624d8bc787aaaaf6071171c882a6e5bde70a0d
Reviewed-on: https://gerrit.libreoffice.org/60075
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-06 14:37:11 +02:00
Jochen Nitschke
8ddca0648a tdf#42949 remove unused compheler includes ..
and fix the fallout

Change-Id: I15bc5d626f4d157cbc69a87392078b41e621d14e
Reviewed-on: https://gerrit.libreoffice.org/54882
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-06-05 10:56:36 +02:00
Noel Grandin
c9f120a424 loplugin:useuniqueptr in ODbTypeWizDialogSetup
Change-Id: I5d1e737510d423f9caa44ad5b498ef5e781c24d0
Reviewed-on: https://gerrit.libreoffice.org/54856
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-29 08:21:33 +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
Noel Grandin
4450b2a166 pass area param to DBG_UNHANDLED_EXCEPTION
and update sallogareas plugin to enforce this

Change-Id: Id0782c8a1f619372e10d931aec3c6a4743a4c86a
Reviewed-on: https://gerrit.libreoffice.org/52249
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-03 08:38:50 +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
Julien Nabet
5b2fc10f0c Modernize a bit more dbaccess
mainly by using for-range loops
but also by simplifying some simple algo

Change-Id: If04cd78e62f80f9575e24f3d50ff1e427454da79
Reviewed-on: https://gerrit.libreoffice.org/51019
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-03-10 09:44:56 +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
Stephan Bergmann
6d03c1367f sal_Bool -> bool
Change-Id: If2e527d915d07b3b44d2a36e10704665ab8c7320
Reviewed-on: https://gerrit.libreoffice.org/46502
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-15 11:13:55 +01:00
Michael Stahl
11d2f3d6e1 vcl: make MapMode constructor explicit
Insert constructor everywhere, except a couple places that apparently
want to compare GetMapUnit().

Change-Id: I1910deb60562e5e949203435e827057f70a3f988
2017-10-26 23:17:45 +02:00
Stephan Bergmann
4b27653a12 loplugin:includeform: dbaccess
Change-Id: I15aee966012612033ab7e2ee03ac1a553802f540
2017-10-23 22:46:10 +02:00
Noel Grandin
56be2245bf loplugin:constparams in dbaccess
Change-Id: I4994c4f0ae614c8f98466f440412f28380ddd6a6
Reviewed-on: https://gerrit.libreoffice.org/40589
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-31 14:23:39 +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
Miklos Vajna
36f2df84fc dbaccess: introduce DATASOURCE_TYPE::DST_WRITER
By mostly reusing the spreadsheet code. This way the UI allows creating
a data source where the backend is a Writer document (containing at
least one Writer table).

Change-Id: I42186d46aaa86fa96ebae0807c97306d6d00d6d4
Reviewed-on: https://gerrit.libreoffice.org/40146
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-18 20:08:05 +02: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
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
bfde4866e0 convert DecodeMechanism to scoped enum
Change-Id: I5c56634b1bca8e37fa73d02d2428645301b6c547
2016-12-05 12:49:02 +02:00
Noel Grandin
a71d6a2a84 loplugin:expandablemethods in dbaccess
Change-Id: I6087a3eff46926646ac1637615a0af30b38956a4
Reviewed-on: https://gerrit.libreoffice.org/30712
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-09 11:13:34 +00:00
Caolán McNamara
170cf525e4 remove (yet yet another) StringListResource implementation
Change-Id: Ifaf89badfc339f8253a629c6960df8a943b8cce5
2016-10-13 09:36:51 +01:00
Noel Grandin
954f752cf1 convert MapUnit to scoped enum
I left a prefix on the names "Map" so that I would not have to re-arrange
each name too much, since I can't start identifiers with digits like "100thMM"

And remove RSC_EXTRAMAPUNIT, which doesn't seem to be doing anything anymore.

Change-Id: I5187824aa87e30caf5357b51b5384b5ab919d224
Reviewed-on: https://gerrit.libreoffice.org/29096
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-05 06:51:20 +00: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
c3c3e5b055 loplugin:constantparam in svtools
Change-Id: I04caae0c9ae621c55e16d3bdc014a4729617feb3
Reviewed-on: https://gerrit.libreoffice.org/28757
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-09-09 08:49:59 +00:00
Maxim Monastirsky
de4c5283ac tdf#100286 Fix deactivate flags
regression of 11b4a6ddce

Change-Id: I4981fee4264c833cd3166491d3812c40c78e3d67
2016-06-09 21:58:38 +03:00
Noel Grandin
11b4a6ddce Convert DeactivePage return code to scoped enum
Change-Id: Idd5372ad20fc6676864b31b3796f8b9bc0ad73dd
Reviewed-on: https://gerrit.libreoffice.org/25918
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-06 07:02:20 +00:00
Caolán McNamara
07f1a39509 (nearly) nothing uses GetUniqueId anymore, so remove it.
The odd one out is the usage in Formula, which attempts
to restore focus to a particular window identified by
an unique id. In this case restore focus by keeping a VclPtr
to the desired window.

Change-Id: I1dc335325c109d75745c6bba2e12662e6ae50638
2016-05-25 14:24:20 +01:00
Noel Grandin
1342818790 convert SFXWB file dialog flags to scoped enum
Change-Id: I1ab5191dc582c46785da58d50b2e68c30b5cbc9b
Reviewed-on: https://gerrit.libreoffice.org/24881
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-12 06:57:19 +00:00
Stephan Bergmann
eda2f38dd5 Avoid reserved identifiers
Change-Id: I56a0bbecf64b6f9a268a8c4b93aeab0acf54931f
2016-04-22 10:14:36 +02:00
Noel Grandin
b0c0a074a2 clang-tidy clang-analyzer-deadcode.DeadStores
suspect that some of these may reveal latent bugs....

Change-Id: I9de9aabbda9c8952715631577c29c1830df1eb71
Reviewed-on: https://gerrit.libreoffice.org/24200
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-20 11:02:45 +00:00