Commit Graph
108 Commits
Author SHA1 Message Date
Michael Weghorn f26084217a weld: Move weld::Button to own header/Rename weld.hxx
In the past, weld.hxx used to contain the class
definitions for weld::Widget and all subclasses.

By now, weld::Widget and almost all subclasses have
been moved to separate headers, to make it easier
to keep the overview and to avoid having to
recompile ~all UI code when one class changes.

By now, only weld::Button is left in weld.hxx.
Rename the header to Button.hxx.
Drop weld.hxx includes and instead add Button.hxx
includes (or weld::Button forward declarations) where
weld::Button is used.
(Don't simply replace all weld.hxx includes with
Button.hxx ones, since many of them were for the
use of other widgets that have since been moved
to their own headers.)

Add further includes where needed now that the
(direct or transitive) includes of weld.hxx were removed.

Change-Id: I8ea6201446a418d5e38b46337059dcd517ee29d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205937
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-05 07:58:07 +02:00
Michael Weghorn ab3635b2f3 weld: Move weld::MessageDialog to own header
Move the class out of weld.hxx into its own header, in
order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.

Change-Id: I5b23b02151c75bb49831a2bbf8d515eb0b54415e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199068
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-02-11 07:32:45 +01:00
Gabor Kelemen 495fa42afa tdf#146619 Use more forward declarations in include/vcl/weld/
after recent split of these headers

This shaves off another 150M input

Change-Id: Ia4e42781cdc6fd6e795c9fb55c6c24dd641b8f0d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197339
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
Tested-by: Jenkins
2026-01-31 11:06:42 +01:00
Michael Weghorn 93787a0aac weld: Move weld::Builder to its own header
Change-Id: I89270c89f65e55fea6ad67e74f87d29fbf50c1e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195844
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2025-12-18 19:44:51 +01:00
Michael Weghorn 5b16b3acc6 weld: Move weld.hxx and weldutils.hxx to new include/vcl/weld subdir
This is in preparation of moving code out of weld.hxx
to separate headers/source files, in order to make it
easier to keep an overview and to avoid having to
recompile ~all UI code when anything changes.

Also move weldutils.cxx to a new vcl/source/weld
directory.

Change-Id: Ia75b42f21e560dd248307282a522f186a64cd742
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195777
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-12-17 18:20:13 +01:00
Mike Kaganski cccb93cba8 tdf#163485: do not report javaldx failure immediately
Transfer the warning from oosplash to soffice.bin in an environment
variable, and show it in JavaVMCreationFailureException handler.

Change-Id: Ia3a6a94b2723c74000b7da54d59f4e19576e2692
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186115
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-06-02 06:13:38 +02:00
Mike Kaganski 4f400eecc1 Move variable declarations to where they are used
Makes it much more clear, which exception is handled there

Change-Id: I0b9fb5d5f356af85e9904f12e038246abea7c8ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186112
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-06-01 20:34:19 +02:00
Noel Grandin 16a9092595 loplugin:ostr in svtools
Change-Id: If00c16527fb861a86f5dde195ab612bbab3a53c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167594
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-05-13 19:13:53 +02:00
Stephan Bergmann 10d29c390d throw() -> noexcept, part 2/3: Automatic loplugin:noexcept rewrite
Change-Id: I076f16d0536b534abf0ced4d76051eadb4c0e033
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114949
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-05-02 17:02:28 +02:00
Henry Castro 81ff0857a7 lok: disable java interaction handler
Unfortunately, when the client side shows
the "Macro Selector" dialog, it tries to show
a java interaction message box to locate the
files of the JVM, even if the code explicitly
option to not enable "DontEnableJava"

Change-Id: I2ef4373f58c3ba23a5b86c5dc984caf6c10821ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108421
Tested-by: Jenkins
Reviewed-by: Henry Castro <hcastro@collabora.com>
2021-01-05 12:24:46 +01:00
Bryan Gazali 2048a5afc9 tdf#125379 updated javainteractionhandler.cxx to add a link for the JRE missing warning
Change-Id: Iac940b24a9fbe914af46fe928b758ad962d3d3e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103881
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-10-28 19:08:05 +01:00
Stephan Bergmann 770ca016b9 Upcoming improved loplugin:staticanonymous -> redundantstatic: svtools
Change-Id: I947b8def12bf27093dc9ad95077c0718dec959a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97696
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-07-02 08:46:13 +02:00
Gabor Kelemen 71ef762f21 tdf#42949 Fix IWYU warnings in svtools/
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: Ifc70900022efcd089c0874bd46e0aacaef0efb72
Reviewed-on: https://gerrit.libreoffice.org/78767
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-09-19 09:24:01 +02:00
Noel Grandin 7b4f643f4f loplugin:sequenceloop in svtools..svx
Change-Id: I81b54f6db69491492b2bc16f48b2296ad96e137d
Reviewed-on: https://gerrit.libreoffice.org/77529
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-15 20:23:20 +02:00
Arkadiy Illarionov 579b5bcd04 Simplify Sequence iterations in svtools
Use range-based loops, STL and comphelper functions

Change-Id: I4197b5083327998169a39389b968e1ff99f13339
Reviewed-on: https://gerrit.libreoffice.org/75440
Tested-by: Jenkins
Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
2019-07-15 18:56:33 +02:00
Gabor Kelemen 663fd3d6e1 tdf#42949 Remove unnecessary localization headers of svtools
Found by searching for the header names and the localization function:
git grep -l -e \<svtools/svtresid.hxx\> -e \<svtools/strings.hrc\> | xargs grep -c SvtResId | grep :0$ | grep -v /pch

Change-Id: I861fed778660412dc73616da29503538b3fe9ccb
Reviewed-on: https://gerrit.libreoffice.org/53136
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-20 09:00:44 +02: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
Mike Kaganski 0f8be9de7e Guard read access of static data
Change-Id: I257bf0a1efb36b5d2c4cd7d932cc400dfafa0846
Reviewed-on: https://gerrit.libreoffice.org/48821
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
2018-01-29 15:21:00 +01:00
Mike Kaganski 1710f23e21 Make handled flags for Java interaction handler static
In commit 5785e4f4ab, initial work to only
show Java error dialogs once had been done. Still, in some cases, multiple
such dialogs can still be shown.

JavaInteractionHandler instances can be created in at least two contexts:
in JavaContext::getValueByName, and in DesktopContext::getValueByName.
Additionally, in the latter, it is not kept for subsequent reuse, but re-
created anew each time. So, it is possible that "Java Missing" (and friends)
dialogs will be shown multiple times per session. E.g., specific installed
extensions (not using Java, but rather Python) can trigger said behavior
in Desktop::doShutdown inside BackupFileHelper::tryPushExtensionInfo.

This patch makes the "already handled" flags static, thus sharing the
status among different handler instances.

Also, unchanged-after-const-initializing m_bShowErrorsOnce is removed.

Change-Id: I79d40639caa9764a04af9201c7e1a6fa624f03e5
Reviewed-on: https://gerrit.libreoffice.org/48678
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-01-26 19:33:41 +01:00
tagezi 506e1396c3 tdf#115002 Including of bitness information into Java message on Windows
Change-Id: Id5235360110cf9838a38f8063448b06a5de1f82c
Reviewed-on: https://gerrit.libreoffice.org/48272
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-01-22 06:41:39 +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::star::resource::OfficeResourceLoader
      com::sun::star::resource::XResourceBundleLoader
      com::sun::star::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
Jochen Nitschke a5dba7dbec remove unused osl/mutex.hxx includes
Change-Id: I3b50e45fdb99e9cd8bfda07356ee3ddb4dd0f8bb
Reviewed-on: https://gerrit.libreoffice.org/38905
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-06-18 13:38:25 +02:00
Noel Grandin 198c41c4fe new loplugin unoany
Change-Id: I5d6c4a67cb2a09e7cd5bd620c6b262d188701b89
Reviewed-on: https://gerrit.libreoffice.org/34714
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-28 10:17:47 +00: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
Yousuf Philips 967436ba7c tdf#103259 Add java not found error for mac
Change-Id: Ia52316b8868c8124dcb322b44e9600a33a13df28
Reviewed-on: https://gerrit.libreoffice.org/29920
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2016-10-24 08:41:58 +00: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
Noel Grandin 24ca187b63 loplugin:singlevalfields in svtools
Change-Id: I80fe1d4646af2b8d8e6362a25f6cda4b7ac29eab
Reviewed-on: https://gerrit.libreoffice.org/26603
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-24 06:45:07 +00:00
Noel Grandin b860b73f2b Convert VCL_MESSAGE to scoped enum
Change-Id: I976536849fa5585c96cee23b660c56d3d0116933
Reviewed-on: https://gerrit.libreoffice.org/25720
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-01 06:46:29 +00:00
Noel Grandin ce66911720 loplugin:constantparam in svtools
Change-Id: I1a3c4a36e29a6712c589ffd3aaada593880d978d
Reviewed-on: https://gerrit.libreoffice.org/23304
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-17 10:28:09 +00:00
Stephan Bergmann 8471ba7b97 No need for extern "C" here
...and fix resulting loplugin:salbool fallout

Change-Id: I5ae1497608d31c20b0d10676450a7673dee1c651
2016-03-10 21:41:22 +01:00
Stephan Bergmann 220d9c24d0 include/jvmfwk/*.h -> .hxx (only ever included from C++ code)
Change-Id: Ia912e937d5a48afb6f8f5345b20bb7bd517fc4f1
2016-03-09 19:08:29 +01:00
Stephan Bergmann 28f4bee7bd loplugin:nullptr (automatic rewrite)
Change-Id: I7fc4b4d5c895f241cfb052b009e943e073f3befe
2015-11-10 10:31:48 +01:00
Noel Grandin 3d96f1ef55 use uno::Reference::set method instead of assignment
Change-Id: I2f8c9cb71a06f7796576509f605796624e654422
2015-11-05 09:59:30 +02:00
Noel Grandin 669b9cd5b8 com::sun::star->css in svtools
Change-Id: I95fd8317ab1142068e0c7b50fc62643fe9f95dc2
Reviewed-on: https://gerrit.libreoffice.org/19683
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-30 09:58:16 +00:00
Michael Meeks 8a65284fe3 Automated conversion of VclPtr construction to use Instance template.
Change-Id: I8be9141b9653e73ebd23a5a3d810f240c376f97e
2015-04-10 13:40:25 +01:00
Michael Meeks d46e0d9656 second half of non-scriptable, Instance constructor conversion.
Change-Id: I616c8c28255e0d90ae90033a128bd34d7570530c
2015-04-10 13:28:52 +01:00
Noel Grandin 61b224f392 vclwidget: fixup locally allocated vcl::Window objects
They need to be wrapped in ScopedVclPtr in order to be disposed properly.

Change-Id: Ib64dba353774f54711e4de7f5d15d859c6a4dc7e
2015-04-10 12:37:44 +01:00
Noel Grandin 00f2787a4a vclwidgets: wrap all vcl::Window subclasses allocated on stack in VclPtr
Change-Id: Ia8b0d84bbf69f9d8f85505d019acdded14e25133

Conflicts:
	sw/qa/tiledrendering/tiledrendering.cxx
2015-04-09 22:17:00 +01:00
Stephan Bergmann e965798caf svtools: Use appropriate OUString functions on string constants
Change-Id: I8799033322d345b2f146c3577d3d264448252816
2014-12-12 12:23:11 +01:00
Caolán McNamara 0696e59045 convert WARNINGBOX_* to MessageDialog + string
Change-Id: Icdd1cbd4660ebcc156d1a406bd853fce3b5cf1e1
2014-08-25 16:45:31 +01:00
Caolán McNamara 7cf74a8e8e convert STR_QUESTION_JAVADISABLED with custom buttons to .ui
Change-Id: I6f806f27232865ab871576e18a33fae08c20ed31
2014-08-25 16:45:27 +01:00
Caolán McNamara e159d0bb53 ErrorBox resources -> MessageDialog + strings
Change-Id: I0e4e8e0393a5a86dc3125f6dccc9e4e7b47973a9
2014-08-15 09:09:36 +01:00
Julien Nabet 227af32d8c Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part18
Change-Id: Ibf958dbfbf7cdbe6ad31d390138be8d4d468c225
2014-05-20 23:29:53 +02:00
Thomas Arnhold 3db8d606d5 hrc and src files: squeeze multiple newlines
for i in `find . -name *.src -or -name *.hrc`; do FILE=$(cat -s "$i"); echo "$FILE" > "$i"; done

Change-Id: I2bac5ad3e1eb3c566e5c867ccf45893a19e1561e
2014-05-19 20:04:22 +02:00
Thomas Arnhold a325ce63db fix-includes.pl: svtools
Change-Id: I509299306ab6cd97c96e9a26d4674f983bbffbec
2014-05-11 01:55:40 +02:00
Stephan Bergmann 5e21a413c7 cppuhelper: retrofit std::exception into overriding exception specs
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
2014-02-26 18:22:20 +01:00
Noel Grandin 0a9ef5a18e convert OUString 0==compareToAscii to equalsAscii
Convert code like:
   0 == aStr.compareToAscii("XXX")
to
   aStr.equalsAscii("XXX")
which is both clearer and faster.

Change-Id: I2e906d7d38494db38eb292702fadb781b1251e07
2013-11-11 12:58:12 +02:00
Caolán McNamara b1404ef4e5 drop tools/string.hxx from a bunch of places
Change-Id: Id6d22b71f2b552ea7872e8a3da6afe207e856561
2013-09-12 13:09:03 +01:00
Luboš Luňák 1946794ae0 mass removal of rtl:: prefixes for O(U)String*
Modules sal, salhelper, cppu, cppuhelper, codemaker (selectively) and odk
have kept them, in order not to break external API (the automatic using declaration
is LO-internal).

Change-Id: I588fc9e0c45b914f824f91c0376980621d730f09
2013-04-07 14:23:11 +02:00
Andras Timar 33a87b9339 fdo#61379 Java options are under Options - LibreOffice - Advanced
Change-Id: Ic7b262f4b75e7f2069f88f753cea5ff8f59610b7
2013-03-23 12:03:00 +01:00