summaryrefslogtreecommitdiff
path: root/framework
AgeCommit message (Collapse)Author
2020-04-08loplugin:flatten in frameworkNoel Grandin
Change-Id: I2a74a7543b5edd853396efa31a3e2568e6607778 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91848 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-07new loplugin:unusedvariableplusNoel Grandin
a particularly aggressive checker, which is why it is off by default Change-Id: Id5a0faa50b3ecc75e01f4aedc6579c5209e585da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91643 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-23make more classes private in mergedlibs modeNoel Grandin
Change-Id: I486922d0652f26fa7ee56f5fe308e19fe5ff137e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90856 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-17tdf#127205 call shutdown in terminate, if not execJan-Marek Glogowski
When generating a new profile, LO shuts down the desktop without even running the main loop via Application::Execute, so this won't call Application::Shutdown() at the end of Application::Execute. So detect this case and call shutdown() directly, if LO doesn't run the main loop. Change-Id: Iae39a4122577b05caa787fc74c1fa7e3f71bf390 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90612 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2020-03-12comparison operators should be constNoel Grandin
Change-Id: Ifa76e004128223460945d58d1c59c4e23db0f108 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90370 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-02Fix typoAndrea Gelmini
Change-Id: Ib03d068389d70866490456372cea1038366bfa2e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89831 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-03-02tdf#129096: Document Recovery: Use TypeDetection on loadVasily Melenchuk
Loading of recovered document happend before via XFilter::filter is not updating media descriptor of document. But this is important for password protected documents to store entered password and used encryption type. To avoid this problem let's use TypeDetection which during its work will ask user for password and store all the info in modified media descriptor before actual recovery attempt. Change-Id: Ide2ebf0955e0937cdc7c9d7165593b71f904649b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88844 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Jenkins
2020-02-24tdf#130163 Show undock or dock menu item in toolbar menuJim Raykowski
This patch removes toolbar menu item 'Dock Toolbar' enable state and shows 'Undock Toolbar' menu item when toolbar is docked and 'Dock Toolbar' menu item when toolbar is undocked. It also sets the accelerator key displayed for these items to Shift+Ctrl+F10 Change-Id: I0e4673529438c42452026602785857066ea7874a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85673 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-22tdf#127205 split Desktop::terminate processJan-Marek Glogowski
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 Bergmann
...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-02-17Drop needless junit and python make conditionalsJan-Marek Glogowski
JunitTest and PythonTest modules check for these themself. Change-Id: Ia453bc99571738b01cc8f161f346cb6c37b2e429 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88832 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2020-02-16clang-format f*,h* with under 5-percent lines of changeMuhammet Kara
Files which could become clang-format conformant with under 5-percent lines of change relative to the total count of lines in the file are found by using bin/find-clang-format.py, and fixed with /opt/lo/bin/clang-format -i <path-of-the-file> There will be follow-up patches to fix all 'under-5-percent' files. Change-Id: I702c09bcd3a9a113b3d66c30edb6cf3b7e6a6593 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88776 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2020-02-12tdf#126700 allow replacing the default documentsJan-Marek Glogowski
Per default, a document opened by a user action will always open in a new frame. For tdf#83722, this behaviour was extended to documents created from templates. But this currently also affects the default factory templates, if these are replaced by a config setting with a real template, which was not intentional. So this patch introduces a new MediaDescriptor property, which allows to mark a document as replaceable and automatically sets it for factory default documents. If this property is set to true, a document just acts as a placeholder while it's unmodified. I.e. the next opened document from its frame will close and replace it. Change-Id: I45ffa8709f7cdda949fac78f3b363f120f0c4a03 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88257 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-02-10Revert "tdf#129096 Don't autosave encrypted documents"Thorsten Behrens
This reverts commit 15664830235fd3d34dc633affa87824e5c10cb79. Reason for revert: this was fixed meanwhile via https://gerrit.libreoffice.org/c/core/+/86201 Change-Id: Id264bc09445cc00e059a243b8ccc53d9364c3ca9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88287 Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-02-08tdf#129096 Don't autosave encrypted documentsThorsten Behrens
As we cannot generally make sure they stay encrypted. Change-Id: I15ed41fabcc553608e418608ad1166a951daa4b6 (cherry picked from commit aaf91e7c4833689dc11d0b7f3e9f707a9ce206d5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88209 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-02-08replace some more copy/clear with swapNoel Grandin
Change-Id: I6501dd59682d2605e9b9856c2deaa02a873ce641 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88239 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-08Fix typoAndrea Gelmini
Change-Id: I935579ee9df56cda1a87816603b23a0562bb1b97 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88256 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-02-08move some headers inside frameworkNoel Grandin
Change-Id: Ia005938c6a3a954eba910981dde5010a1f977fca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88201 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-07Fix typoAndrea Gelmini
Change-Id: I372f5b8fe3d2b1db8e9b672e67709f68b22735b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88253 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2020-02-07test: move component context from subclasses to BootstrapFixtureMiklos Vajna
To avoid duplication. Change-Id: I0ee7c26d5d55bd868ead04c77e7f4ef2582f90e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88138 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-02-01make update_pch also consider files in <module>/src/**/incLuboš Luňák
With --enable-pch=full there's not much difference between a "public" header in <module>/inc and a private one in <module>/src/somewhere/inc . And since the script searches recursively, this apparently helps to find even more headers for lower pch levels. Change-Id: I8483d0aa5b4fea5a59107c20a8aa5f1ef694af0a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87799 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-01-30loplugin:unusedfieldsNoel Grandin
Change-Id: Ifb9c91b3e8d6c2dd3a639a239fa41e7d5c7a4ee6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87735 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-28remove some unused local varsNoel Grandin
found by my new loplugin:unusedvariableplus Change-Id: Ic3f55f492d43a53d8850a97d44059ff127fd69a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87573 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-28New loplugin:unsignedcompareStephan Bergmann
"Find explicit casts from signed to unsigned integer in comparison against unsigned integer, where the cast is presumably used to avoid warnings about signed vs. unsigned comparisons, and could thus be replaced with o3tl::make_unsigned for clairty." (compilerplugins/clang/unsignedcompare.cxx) o3tl::make_unsigned requires its argument to be non-negative, and there is a chance that some original code like static_cast<sal_uInt32>(n) >= c used the explicit cast to actually force a (potentially negative) value of sal_Int32 to be interpreted as an unsigned sal_uInt32, rather than using the cast to avoid a false "signed vs. unsigned comparison" warning in a case where n is known to be non-negative. It appears that restricting this plugin to non- equality comparisons (<, >, <=, >=) and excluding equality comparisons (==, !=) is a useful heuristic to avoid such false positives. The only remainging false positive I found was 0288c8ffecff4956a52b9147d441979941e8b87f "Rephrase cast from sal_Int32 to sal_uInt32". But which of course does not mean that there were no further false positivies that I missed. So this commit may accidentally introduce some false hits of the assert in o3tl::make_unsigned. At least, it passed a full (Linux ASan+UBSan --enable-dbgutil) `make check && make screenshot`. It is by design that o3tl::make_unsigned only accepts signed integer parameter types (and is not defined as a nop for unsigned ones), to avoid unnecessary uses which would in general be suspicious. But the STATIC_ARRAY_SELECT macro in include/oox/helper/helper.hxx is used with both signed and unsigned types, so needs a little oox::detail::make_unsigned helper function for now. (The ultimate fix being to get rid of the macro in the first place.) Change-Id: Ia4adc9f44c70ad1dfd608784cac39ee922c32175 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87556 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-27Use properly typed variables for iterationStephan Bergmann
Change-Id: I3c8a8adc20fe404befa360e49ab42f2ffd93d27f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87489 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-26rename some local variablesNoel Grandin
mostly to make the job of my very aggressive unused local vars plugin easier Change-Id: Ifc21a920841f8589f8b7e10de39dba6622a5d501 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87399 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-25lok: status update - avoid SIGFPE on zero range.Michael Meeks
Change-Id: I75597696b529f833bbc699f66f5a4bcdc06748d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87368 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-01-24tdf#130096 Wrap Sidebar update use common .uno commands and layoutandreas kainz
Change-Id: Ie8185169582616179fd96850283836f4e3d60ad1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87309 Tested-by: Jenkins Reviewed-by: andreas_kainz <kainz.a@gmail.com>
2020-01-21remove unused GSOC 2005 "Tabbed Document Windows for OOo"Caolán McNamara
this was #i54847# Change-Id: I312e3ea9b123976e9929f6601a931ff8a108d7b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87113 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-20loplugin:unusedfieldsNoel Grandin
Change-Id: If130c8a4861998d7eafd2e9525592f3c811ec21c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87069 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-17m_aListenerContainer is effectively unused hereNoel Grandin
ever since initial commit Change-Id: Ia4cde1696edd26b8ddac3d093e043064d1cf87d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86976 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-15hold SolarMutex on calling vcl toolbox enable itemCaolán McNamara
Change-Id: I35bbe90fbda6c46c1ad173746171b3ede1b2105c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86850 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-15tdf#125089 Fix shoowing a separator in View-User interfaces submenusRoman Kuznetsov
for non EN GUI Change-Id: I8761560e48f781ed516494984fc5a86c72019ad0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86619 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Roman Kuznetsov <antilibreoffice@gmail.com>
2020-01-14loplugin:finalclasses in frameworkNoel Grandin
Change-Id: I5405a123e887173fe4b90d66dab6225bf43883ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86740 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-13loplugin:unusedfieldsNoel Grandin
Change-Id: Iaf188bfd43396eeec31e62ac3de3fbc76da4331a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86653 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-09tdf#129600 Delete "Formula bar" item from View-ToolbarsRoman Kuznetsov
Change-Id: Iec6c6c998a12aafdbf63bc1e5083cf577aefb437 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86354 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2020-01-08Fix typo/grammarAndrea Gelmini
Change-Id: I8e7320224a9cb4ff9317b842a2c1c0b1a3ddcd17 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86390 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2020-01-07Fix typoAndrea Gelmini
Change-Id: I0cf1ab7a86fd3b9323f1b5d219b6943b2f61884c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86300 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-01-07Fix typoAndrea Gelmini
Change-Id: Ic26a634c3f7cb089743f6d6d2a67e38f8104f724 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86302 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-01-07Fix typoAndrea Gelmini
Change-Id: I0c62fbf27986f20388d6fb7f44f4e998657d791f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86301 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-01-06weld AreaPropertyPanelCaolán McNamara
Change-Id: I5f4c4b43067b99cd57f8ea941002481ef5977e09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86144 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2020-01-06Don't crash on exiting print preview with NotebookbarMike Kaganski
Crash caused by this sequence (tested in Writer): 1. Closing print preview, frame is attached to controller; 2. This calls SfxNotebookBar::StateMethod 3. There notebookbar's listener is added to list of the controller's context change event listeners 4. Then in SwPagePreview::~SwPagePreview, notebookbar's listener is added to that list again 5. ContextChangeEventMultiplexer::addContextChangeEventListener detects second addition, and throws an unhandled exception. I don't know why starting listening is needed in SwPagePreview dtor; unfortunately commit d05b7b32d9ecb6fcb4a268eb68cdcee09bafa6dd doesn't say much about context and reasons. ControlListener is renamed to ControlListenerForCurrentController to emphasize that it operates on the current controller of notebookbar's frame; and its bListen parameter meaning was reverted: previously its "true" value awkwardly meant "stop listening". All direct operations with listener of notebookbar are replaced with calls to notebookbar's methods. In ContextChangeEventMultiplexer::addContextChangeEventListener, uno::UNO_QUERY_THROW was replaced with uno::UNO_QUERY, because not only chart controller may appear here, and it's not an error: e.g. SfxBaseController doesn't implement lang::XServiceInfo. Regression after commit d05b7b32d9ecb6fcb4a268eb68cdcee09bafa6dd. Change-Id: Ief1aed188d8f02a6cfe3ea25f4d082dfdf449f32 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86257 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-01-06Display menu item keyboard shortcuts in toolbar menuJim Raykowski
Change-Id: I288d4850f9a8e9ac51dfefddff7a2a7d359178c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85832 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2019-12-28Fix typoAndrea Gelmini
Change-Id: Iebf4da702da03d9888bad314eb401cff6a26bd2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85903 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-12-23tdf#46037: remove configurationhelper in framework/helponstartupJulien Nabet
Change-Id: I56b3e0351255e2b73871d69189338fdf3a97e9be Reviewed-on: https://gerrit.libreoffice.org/85716 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-23tdf#46037: use officecfg/SetupJulien Nabet
+ replace define OFFICEFACTORY_PROPNAME_ASCII_WINDOWATTRIBUTES used once Change-Id: I0930dc8a2d8df76b93e634a594cbfdf4a4cd634b Reviewed-on: https://gerrit.libreoffice.org/85706 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-19sal_Char->char in forms..frameworkNoel Grandin
Change-Id: I756c1f54d50403aa9b4f03dbbc2a387556f07084 Reviewed-on: https://gerrit.libreoffice.org/85475 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-17Elide use of rtl_Instance (which is obsoleted by C++11 thread-safe statics)Stephan Bergmann
Change-Id: I9ee0d2ecbb75afe5a341eac308bb6718e5830749 Reviewed-on: https://gerrit.libreoffice.org/85262 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-12-12Remove redundant member clear() from dtorStephan Bergmann
...and then remove newly-redundant user-provided dtor completely, similar to <https://gerrit.libreoffice.org/#/c/85032/> "Remove some redundant user-provided dtors" Change-Id: I185d3aa7c16b5d4e6e64345c7fa221b9ed0cde6e Reviewed-on: https://gerrit.libreoffice.org/85038 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-12-04-Werror=maybe-uninitializedStephan Bergmann
And /org.openoffice.Office.Recovery/RecoveryEntry/DocumentState is nillable, so xItem->getPropertyValue(CFG_ENTRY_PROP_DOCUMENTSTATE) >>= tmp; can presumably fail. Change-Id: I08c38aec13b2ceda512925b18aefd5981cf85bcd Reviewed-on: https://gerrit.libreoffice.org/84422 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>