summaryrefslogtreecommitdiff
path: root/desktop/inc/app.hxx
AgeCommit message (Collapse)AuthorFilesLines
2024-04-01lok preinit: don't re-synchronize extensions on each child start.Michael Meeks1-1/+1
We should sort out our extensions, if at all, at pre-init time. This should save ~4% of CPU in a week-long profile of a COOL server. From Desktop::Main's SynchronizeExtensionRepositories. Change-Id: I2760de26635723492dfa5a52005ee90623337bee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165622 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-08-02tdf#129713 Output message when using "--cat" with other LO instances runningMatt K1-1/+2
This change modifies the code that determines whether a 2nd LibreOffice instance is running during the startup of the new soffice.bin process. In that section of code, we simply write a new error message to console and pop-up a message box via FatalError. The message tells the user that they should close other LibreOffice processes if they want to use the "--cat" or "--script-cat" command line options. Change-Id: I2c2a00c07d733e2f0ed6c0632f0f0d115188b116 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154909 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-07do not pass XComponentContext to officecfg::...::get() callsLuboš Luňák1-2/+1
It's used only for the ConfigurationWrapper singleton, so it's used only the first time and then ignored. It also causes calls to comphelper::getProcessComponentContext() for every single invocation despite the value not being needed, and the calls may not be cheap (it's ~5% CPU during ODS save because relatively frequent calls to officecfg::Office::Common::Save::ODF::DefaultVersion::get()). Change-Id: I02c17a1a9cb498aeef220ddd5a0bde5523cb0ffb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131056 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-12-29loplugin:stringviewparam: operator +Stephan Bergmann1-1/+2
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-09-13tdf#124176 Use #pragma once in desktopGeorge Bateman1-4/+1
This commit was carried out by a Python script, source of which is at https://bugs.documentfoundation.org/show_bug.cgi?id=124176#c97. Change-Id: I26f01467d2a572a51c7ace76628d4a8f96f249a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102553 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-05-08compact namespace in dbaccess..dtransNoel Grandin1-3/+1
Change-Id: Ie4b619dd19cc4d12d240759abea9c3ffdedd5c7e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93718 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-22tdf#127205 split Desktop::terminate processJan-Marek Glogowski1-0/+1
Trying to somehow keep stuff correctly alive, truned out to be rather futile. Originally I tried the same way Caolan did in the attached patch to tdf#88985, when he finally settled on adding a special terminate listener. But this is not enough to handle in-process scripted extensions, like Java, Python or even Basic macros themself. So this separates the module shutdown and SfxApplication cleanup from the rest of the terminate call. Change-Id: Ice59816080c922a17511b68afe59348a662600c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88835 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2020-02-21Drop o3tl::optional wrapperStephan Bergmann1-2/+2
...now that macOS builds are guaranteed to have std::optional since 358146bbbd1b9775c12770fb5e497b6ec5adfc51 "Bump macOS build baseline to Xcode 11.3 and macOS 10.14.4". The change is done mostly mechanically with > for i in $(git grep -Fl optional); do > sed -i -e 's:<o3tl/optional\.hxx>\|\"o3tl/optional\.hxx\":<optional>:' \ > -e 's/\<o3tl::optional\>/std::optional/g' \ > -e 's/\<o3tl::make_optional\>/std::make_optional/g' "$i" > done > for i in $(git grep -Flw o3tl::nullopt); do > sed -i -e 's/\<o3tl::nullopt\>/std::nullopt/g' "$i" > done (though that causes some of the resulting #include <optional> to appear at different places relative to other includes than if they had been added manually), plus a few manual modifications: * adapt bin/find-unneeded-includes * adapt desktop/IwyuFilter_desktop.yaml * remove include/o3tl/optional.hxx * quote resulting "<"/">" as "&lt;"/"&gt;" in officecfg/registry/cppheader.xsl * and then solenv/clang-format/reformat-formatted-files Change-Id: I68833d9f7945e57aa2bc703349cbc5a56b342273 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89165 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-24tdf#42949 Fix IWYU warnings in desktop/Gabor Kelemen1-2/+0
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: If72377cb352be71050a5b0a471bbe3b02d9c0f74 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87117 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-01-14loplugin:finalclasses in basic..emfioNoel Grandin1-1/+1
Change-Id: I1b0df1a6cb5b8db9db09cb1d55d932459ab16d81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86741 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-01Introduce o3tl::optional as an alias for std::optionalStephan Bergmann1-2/+2
...with a boost::optional fallback for Xcode < 10 (as std::optional is only available starting with Xcode 10 according to <https://en.cppreference.com/w/cpp/compiler_support>, and our baseline for iOS and macOS is still Xcode 9.3 according to README.md). And mechanically rewrite all code to use o3tl::optional instead of boost::optional. One immediate benefit is that disabling -Wmaybe-uninitialized for GCC as per fed7c3deb3f4ec81f78967c2d7f3c4554398cb9d "Slience bogus -Werror=maybe-uninitialized" should no longer be necessary (and whose check happened to no longer trigger for GCC 10 trunk, even though that compiler would still emit bogus -Wmaybe-uninitialized for uses of boost::optional under --enable-optimized, which made me ponder whether this switch from boost::optional to std::optional would be a useful thing to do; I keep that configure.ac check for now, though, and will only remove it in a follow up commit). Another longer-term benefit is that the code is now already in good shape for an eventual switch to std::optional (a switch we would have done anyway once we no longer need to support Xcode < 10). Only desktop/qa/desktop_lib/test_desktop_lib.cxx heavily uses boost::property_tree::ptree::get_child_optional returning boost::optional, so let it keep using boost::optional for now. After a number of preceding commits have paved the way for this change, this commit is completely mechanical, done with > git ls-files -z | grep -vz -e '^bin/find-unneeded-includes$' -e '^configure.ac$' -e '^desktop/qa/desktop_lib/test_desktop_lib.cxx$' -e '^dictionaries$' -e '^external/' -e '^helpcontent2$' -e '^include/IwyuFilter_include.yaml$' -e '^sc/IwyuFilter_sc.yaml$' -e '^solenv/gdb/boost/optional.py$' -e '^solenv/vs/LibreOffice.natvis$' -e '^translations$' -e '\.svg$' | xargs -0 sed -i -E -e 's|\<boost(/optional)?/optional\.hpp\>|o3tl/optional.hxx|g' -e 's/\<boost(\s*)::(\s*)(make_)?optional\>/o3tl\1::\2\3optional/g' -e 's/\<boost(\s*)::(\s*)none\>/o3tl\1::\2nullopt/g' (before committing include/o3tl/optional.hxx, and relying on some GNU features). It excludes some files where mention of boost::optional et al should apparently not be changed (and the sub-repo directory stubs). It turned out that all uses of boost::none across the code base were in combination with boost::optional, so had all to be rewritten as o3tl::nullopt. Change-Id: Ibfd9f4b3d5a8aee6e6eed310b988c4e5ffd8b11b Reviewed-on: https://gerrit.libreoffice.org/84128 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-05-12Fix typoAndrea Gelmini1-1/+1
Change-Id: I5782a3968485c919728f0db70088e3727f0b18fb Reviewed-on: https://gerrit.libreoffice.org/72182 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-03-26Consolidate declarations of {fire,reap}_glxtest_process in single include fileStephan Bergmann1-5/+0
Change-Id: I7f25cba311d42a7e8751cf3651f684b88d1fb8ac Reviewed-on: https://gerrit.libreoffice.org/69711 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-04-19tdf#95843: Wait for fire_glxtest_process also in --headless modeStephan Bergmann1-0/+1
Discussed with mmeeks on IRC that fire_glxtest_process is probably called as early as possible so that its reuslt is ready by the time it is needed in the non-headless case. So best fix for headless is probably to just wait for the sub-process at an opportune point, instead of redesigning the whole mess so that fire_glxtest_process would only be called once its result is actually needed. Change-Id: I4ea9c9d54b83c9695a3b72317e68fed0c410da0e Reviewed-on: https://gerrit.libreoffice.org/53154 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-04-03lok: Make the bundled dictionaries work.Tamás Zolnai1-1/+1
Create the user directory temporary in the temp directory and use that to load the dictionaries (bundled extensions). Co-author; Jan Holesovsky <kendy@collabora.com> Change-Id: I5c7c824b68571048ce870fd5218cb47a333f3ad8 Reviewed-on: https://gerrit.libreoffice.org/49495 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2018-03-14Allow lok to re-set temporary paths on second init.Michael Meeks1-0/+2
Change-Id: I40cd0538b573c2d090f56424e1110b938981a878 Reviewed-on: https://gerrit.libreoffice.org/51292 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2017-10-22oss-fuzz: drop our own afl related hackeryCaolán McNamara1-5/+0
Change-Id: Ia6a498c07fffd1790ad433287ef4d1cf82085887 Reviewed-on: https://gerrit.libreoffice.org/43695 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-08-01move resmgr to unotoolsCaolán McNamara1-1/+1
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-07-21migrate to boost::gettextCaolán McNamara1-3/+0
* 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-06-18remove unused osl/mutex.hxx includesJochen Nitschke1-1/+0
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-05-19improve update checker and update downloader codeMarkus Mohrhard1-0/+3
2016-11-09loplugin:expandablemethods in dbaccessNoel Grandin1-9/+1
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-10-05Remove _TYPED suffix from tools/link.hxx macrosStephan Bergmann1-4/+4
...which was introduced with 3ead3ad52f9bb2f9d1d6cf8dfc73a0a25e6778ed "Gradually typed Link" to distinguish the new, typed versions from the old, untyped ones, but is no longer necessary since 382eb1a23c390154619c385414bdbe6f6e461173 "remove untyped Link<>" removed the old versions. Change-Id: I494025df486a16a45861fcd8192dfe0275b1103c
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann1-1/+1
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark overriding destructors as 'virtual'" appears to no longer be a problem with MSVC 2013. (The little change in the rewriting code of compilerplugins/clang/override.cxx was necessary to prevent an endless loop when adding "override" to OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager(); in chart2/source/inc/LifeTime.hxx, getting stuck in the leading OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.) Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-07-12desktop: validate OpenCL drivers before use.Michael Meeks1-0/+1
OpenCL validation needs to happen before drivers are used in anger. This should isolate any crashes, and/or mis-behavior to We use app version, CL driver version and file time-stamp to trigger re-testing the device. If anything fails: hard disable OpenCL. We use an opencl validation sheet (cl-test.ods) and install it. It is a minimal CL set - it requires a very short formula group length, and combines several CL functions into few formulae to test more. The sheet structure, in particular the manual squaring / SQRT is necessary to stick within the default CL subset, and ensure that formulae are CL enabled from the root of the dependency tree up. Change-Id: I18682dbdf9a8ba9c16d52bad4447e9acce97f0a3 Reviewed-on: https://gerrit.libreoffice.org/27131 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2016-05-13convert EXCEPTION_ to scoped enumNoel Grandin1-1/+1
- simplify VCLExceptionSignal_impl - drop "minor" part of error code, nobody passes it in, and nobody checks it - rename Display to UserInterface, to prevent -Werror=shadow Change-Id: I503fd8a50ded30d59c30fb388796f6b1a0c058de Reviewed-on: https://gerrit.libreoffice.org/24892 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-29Remove undocumented perftune.ini QuickstartPreloadConfigurationStephan Bergmann1-3/+0
...originally added to OOo in 2005 with 8a9d865b32b760804adf53b0d68fd74785890915 "INTEGRATION: CWS cov2src: #126234# Join MWS COV680 m4 into SRC680". Change-Id: I7167c99e28b56c9048de32576e793e2eaa1fc6a6
2016-01-21loplugin: unused return valuesNoel Grandin1-2/+2
Change-Id: I4eb1f0c9245c04058fd5e47046f043f8840a79c7 Reviewed-on: https://gerrit.libreoffice.org/21628 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-02afl-eventtesting: can simplify this now we use QueryExitCaolán McNamara1-2/+1
Change-Id: Iddb96f51ed2fd2d7861e9448a7aa221d998ad2a5
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann1-8/+8
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-09loplugin:staticmethodsStephan Bergmann1-2/+2
Change-Id: Ice121a65e38d47b4a26f7ed81fc3037e031ae7c4
2015-10-09afl-eventtesting: provide a way to pseudo-restartCaolán McNamara1-0/+7
i.e. to reset to the initial post-startup state performance still isn't great unfortunately, 0.7 cycles per second before this, 2.6 after this Change-Id: Ib9d83b70f0cf052af36a49ed5bacef295fe9ed11 Reviewed-on: https://gerrit.libreoffice.org/19269 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-09-22convert Link<> to typedNoel Grandin1-1/+1
Change-Id: I92df586295c11bc9e9276770656901c2e4e714b9
2015-09-17boost->stdCaolán McNamara1-2/+2
Change-Id: Ifde84627578283bd057d7393eb7e5578ef5c029a
2015-08-28make PostUserEvent Link<> typedNoel Grandin1-2/+2
Change-Id: I13f10bda985d55d419a5bff481130a456ae2db8a
2015-07-17loplugin:unusedmethods desktopNoel Grandin1-4/+0
Change-Id: I78d4cd362bebde05e5bec55eff5e38603cb3f813
2015-05-22loplugin:constantfunctionNoel Grandin1-1/+0
Change-Id: I7cb5b0c2cf9ade557173ca596ea5d42d853ff448
2015-05-08lopluign:staticmethods: Handle DECL_LINKStephan Bergmann1-2/+2
Change-Id: Ib27854a8470f3ff5b208cb949a7bd02f2a86c969
2015-05-05loplugin:staticmethodsNoel Grandin1-1/+1
Change-Id: I4d19f868a618cb135aa7a949222972dc35b47d2a
2015-05-05Use typed Timer::SetTimeoutHdl LinkStephan Bergmann1-1/+1
Change-Id: Iaaf0c93e5b28c0f7dbe4f02eda8beeae30708100
2015-04-22Various #include <sal/log.hxx> fixupsStephan Bergmann1-0/+1
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it. Cleaned up some, but something like grep -FwL sal/log.hxx $(git grep -Elw \ 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF') -- \*.cxx) shows lots more files that potentially need fixing before the include can be removed from rtl/string.hxx and rtl/ustring.hxx. Change-Id: Ibf033363e83d37851776f392dc0b077381cd8b90
2015-04-09loplugin:staticmethodsNoel Grandin1-11/+11
Change-Id: Ie348778ea666c24e95e048386547f301083a0017
2015-02-07Fixup --without-x buildRiccardo Magliocchetti1-1/+1
Accept gl linkage in hope of future offscreen mesa support. Avoid linking with GLX though. Change-Id: I4e666f60e74fe34075a8da9eeba95807cf8fe38c Signed-off-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/13452 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2014-12-04Add a SAL_INFOTor Lillqvist1-0/+1
The "bootstrap" errors tend to end up being displayed in some error dialog attempt which of course does nothing on mobile platforms, and that crack seems to crash on Android even, so this should give us some chance to get some idea at least what the code thinks is wrong... Change-Id: I070b017baf042ff692766d1efd1511e1addb6ecf
2014-11-20WaE: work around loplugin:unreffun and loplugin:externandnotdefinedTor Lillqvist1-0/+4
Change-Id: I5192ad1f068746da257f3e1d9340325956b1e69d
2014-07-26fdo#75757: remove inheritance to std::mapTakeshi Abe1-4/+0
Typedef'ing AcceptorMap in appinit.cxx is enough. Change-Id: Ia26e119562c87b11d8dd81f49b72d825739162b2 Reviewed-on: https://gerrit.libreoffice.org/10555 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2014-07-11new loplugin: externalandnotdefinedNoel Grandin1-0/+2
Find "missing headers," where a function is declared directly in the .cxx (as extern) and not defined, and should arguably instead be declared in an include file. Change-Id: I6d83ee432b2ab0cd050aec2b27c3658d32ac02a2
2014-05-09Revert font initialization fooCaolán McNamara1-1/+0
this reverts 081a0854635f4bc9f6f743ef4e2675c208405f74 because the heights and widths of the non .ui-converted dialogs are all too low and everything is squished in them Change-Id: I103eda4b3d43365c02ecedb6f37b995a682b2cf9
2014-05-08desktop: sal_Bool->boolNoel Grandin1-6/+6
Change-Id: I3462a9d4c23c9bc858c1a9d91caa58d87b204ee0
2014-05-07Move ImplInitAppFontData from Window to Application (take 2)Chris Sherlock1-0/+1
I have renamed ImplInitAppFontData to InitAppFontData and moved it from Window to Application. This is because this is something that sets *application* global variables, it just so happens it gets it from a Window parameter. But it should be set when the application starts, so I have moved it to Main(). This was previously reverted, but I have since located what was causing unit tests to fail and the font dropdowns to stop loading in writer: see commit c6d7ba5f33c3 where Application::SetSettings() was setting pImplSVData->maGDIData.mnAppFontX to zero. Change-Id: I5da7073b0d8541f1a71a09b0a8337d012fc4134b