summaryrefslogtreecommitdiff
path: root/sfx2
AgeCommit message (Collapse)Author
2019-10-29remove unnecessary includesCaolán McNamara
Change-Id: Ia4a622b34ff3f71963cff7a1aa8658a4df12f04f Reviewed-on: https://gerrit.libreoffice.org/81676 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-29this help case doesn't arise anymoreCaolán McNamara
Change-Id: I844f3b310e74652e3b310053a1254e06045c4506 Reviewed-on: https://gerrit.libreoffice.org/80334 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-28loplugin:stringadd improve detectionNoel Grandin
if one side of the expression is a compile-time-constant, we don't need to worry about side-effects on the other side Change-Id: Iee71ea51b327ef244bf39f128f921ac325d74e2b Reviewed-on: https://gerrit.libreoffice.org/81589 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-26size some stringbuffer to prevent re-allocNoel Grandin
I started with 32 and kept doubling the size until the site did not need re-alloc, but clamped it at 512 (e.g. in emfio/). Change-Id: Ib7caf35a1b7e42b0e4ed8aa812493449e3eefc8f Reviewed-on: https://gerrit.libreoffice.org/81540 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-25tdf#42949 Fix IWYU warning in include/vcl/window.hxxGabor Kelemen
The boost/property_tree/ptree.hpp added in commit 75b8db7fa7344a679d3c5dbdc8c5bd4228cdbc7c turns out to be rather expensive: it adds about 900 kB per compilation unit and window.hxx is included in about 2600 compilation units Replacing it with forward declaration header has reduced total includebloat from 26.1 Gb to about 22.7 Change-Id: I797608b54a62a5838c7a5d47355fb6bd736ad36c Reviewed-on: https://gerrit.libreoffice.org/81500 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-10-24Manually clean up some string concatenationStephan Bergmann
(that loplugin:stringadd didn't flag because of its conservative isSideEffectFree check) Change-Id: I109b1680a14540d8438eee82b45518e07611fdcd Reviewed-on: https://gerrit.libreoffice.org/81464 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-24sfx2: enable save againThorsten Behrens
This is a fixup for e37b70442ebf9e1628e7da16b7b6acf498897dee Change-Id: Ib360c196aa0571d035231cdf4410ab1db134480c Reviewed-on: https://gerrit.libreoffice.org/81454 Reviewed-by: Serge Krot (CIB) <Serge.Krot@cib.de> Tested-by: Serge Krot (CIB) <Serge.Krot@cib.de>
2019-10-24Only define ShutdownIcon::getShortcutName for _WIN32Stephan Bergmann
...where sfx2/Library_sfx.mk only defines ENABLE_QUICKSTART_APPLET for WNT and MACOSX anyway, and compiling ShutdownIcon::getShortcutName on any other platform would have lead to a non-void function without a return statement Change-Id: I78726fb50ba58571b5397e83a0c1b44f808b2d1e Reviewed-on: https://gerrit.libreoffice.org/81430 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-24tdf#128077 crash with calc dialogs and multiple windowsNoel Grandin
regression from commit bf359d01ac8b1e0292e8a92c38e58c03e6c17d8b add a Dialog::runAsync for the non-controller case we end up destroying the dialog controller while the controller is in it's own method, so keep it alive for the duration. Change-Id: I0f26b4d40351ad62378f58c560f1a6d69d57a88e Reviewed-on: https://gerrit.libreoffice.org/81425 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-23loplugin:stringadd (clang-cl)Stephan Bergmann
Change-Id: I324496ff7c61d87a83b6b378810aa5c78cd7dba3 Reviewed-on: https://gerrit.libreoffice.org/81405 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-23Add document-level option to lock down saveSamuel Mehrbrodt
Change-Id: I40b5e8c780894645e467e3891062c499707d69c7 Reviewed-on: https://gerrit.libreoffice.org/81359 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-10-23Add document-level option to lock down printingSamuel Mehrbrodt
Change-Id: I85694021d74be79293079d04d5ba1d9b48cfa557 Reviewed-on: https://gerrit.libreoffice.org/81340 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-10-23Add test for LockExport propertySamuel Mehrbrodt
Change-Id: I81533ccd34ac517b31afa1e7e6b818b74c42bc1d Reviewed-on: https://gerrit.libreoffice.org/81376 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-10-23Add document-level option to lock down file exportSamuel Mehrbrodt
Setting this option will disable any export command (File->Export*, File->Send*, graphic/chart export context menu, save as, mailmerge wizard, ...) Change-Id: I07a2a3b9179b494ac839e7d1e407194600679aa1 Reviewed-on: https://gerrit.libreoffice.org/81316 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-10-23loplugin:unusedmethodsNoel Grandin
Change-Id: I5fd081780d46fd30864830eea2956bad6dc3e222 Reviewed-on: https://gerrit.libreoffice.org/81360 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-23remove hardcoded alignment elements from addtargetdialogandreas kainz
Change-Id: I0c4536a61859e1f0ca3948c58407bdb28dd3bc66 Reviewed-on: https://gerrit.libreoffice.org/81351 Tested-by: Jenkins Reviewed-by: andreas_kainz <kainz.a@gmail.com>
2019-10-22loplugin:constantparamNoel Grandin
Change-Id: Ibfe70492683ff3ec208cee95d8a11155ec54f690 Reviewed-on: https://gerrit.libreoffice.org/81314 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-22tdf#128230 Require password if the Unprotect button is visibleGabor Kelemen
Regression from commit a2279bb2f52ee5bbe8d38433aac55aa1a16661fb Before that requiring password depended on the current text of the Protect/Unprotect button, which was changed dynamically. This commit changed that logic and introduced two buttons in the new .ui file that are hidden/shown dynamically. The password condition however was changed to check the visibility of the new Protect button instead of the Unprotect button. Change-Id: Ie24e1b2d45fa92a375a29b7bc71689f9b83ae9dc Reviewed-on: https://gerrit.libreoffice.org/81283 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-21loplugin:virtualdead unused param in SfxObjectShell::FillClassNoel Grandin
and since I notice that the two call sites also don't care about pShortTypeName, remove that too Change-Id: I4649fc4c134c1113555b9dedb53499ce39d17132 Reviewed-on: https://gerrit.libreoffice.org/81213 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-21loplugin:virtualdead unused param in SfxStatusListener::StateChangedNoel Grandin
Change-Id: Ic467490ddd1b0762bfa61878c4026afb53b02743 Reviewed-on: https://gerrit.libreoffice.org/81212 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-21loplugin:deadvirtual unused param in ItemUpdateReceiverInterfaceNoel Grandin
Change-Id: I3db5a456a259a97dc9bdf6be0d478177bac05215 Reviewed-on: https://gerrit.libreoffice.org/81186 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-21loplugin:virtualdead unused param in TitleBar::PaintDecorationNoel Grandin
Change-Id: I3dd8ee6492be1a4b3d1032c4d50cc01111d748cb Reviewed-on: https://gerrit.libreoffice.org/81185 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-21Fix parameter nameSamuel Mehrbrodt
Change-Id: Ic82e0806c4654dedf615e12ddbd000cc709527e8 Reviewed-on: https://gerrit.libreoffice.org/81199 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-10-21Don't create unnecessary tempfiles for opened docSamuel Mehrbrodt
A copy of the doc was created for each opened file as a temp file. Try to avoid that. Change-Id: I11db2a9c8d77b954de56a6e977b1555c8f876416 Reviewed-on: https://gerrit.libreoffice.org/81031 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-10-21loplugin:virtualdead unused param in ThumbnailViewItem::calculateItemsPositionNoel Grandin
Change-Id: I8db99a3672e3603a25ee1f6ca4741a02b73c9516 Reviewed-on: https://gerrit.libreoffice.org/81184 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-18make bin/update_pch.s always include code in trivial #if'sLuboš Luňák
E.g. #ifdef LIBO_INTERNAL_ONLY is always true for code that builds with our PCHs. Change-Id: I3cf311ea3621b909105754cfea2cb0116b8b67f5 Reviewed-on: https://gerrit.libreoffice.org/80961 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-10-17loplugin:buffereadd find stuff involving adding *StringBufferNoel Grandin
and create conversion methods on *StringBuffer to make this work Change-Id: I3cf5ee3e139826168894b46eff8ee4bcde00cb7e Reviewed-on: https://gerrit.libreoffice.org/80949 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-17Remove some memset callsMike Kaganski
Replace them with default initialization or calloc Change-Id: I747f53c2ced2d0473fd5a5ede4f8520a0633dcc1 Reviewed-on: https://gerrit.libreoffice.org/80805 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-17Rename OUStringLiteral1 to OUStringCharStephan Bergmann
It started out as a wrapper around character literals, but has by now become a wrapper around arbitrary single characters. Besides updating the documentation, this change is a mechanical for i in $(git grep -Fl OUStringLiteral1); do sed -i -e s/OUStringLiteral1/OUStringChar/g "$i"; done Change-Id: I1b9eaa4b3fbc9025ce4a4bffea3db1c16188b76f Reviewed-on: https://gerrit.libreoffice.org/80892 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-17Don't send false 'INPLACE' messagesSzymon Kłos
Change-Id: I8eb9a77c7e6b9242f18ac5f0634091c88bf40ec0 Reviewed-on: https://gerrit.libreoffice.org/80695 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-10-16tdf#42316 handle saving to template filtersJan-Marek Glogowski
This extends the filter comparison from commit c3a1c83ff5af ("tdf#42316 preserve macro signature of templates"). The original patch just stripped "_template" from the source filter to find equal document types, which just enables the "template => document" case. This patch also strips the "_template" from the target filter, which fixes the "document or template => template" cases. This also extends the signing save tests: * OTT 1.2 => OTT 1.2 - preserve * ODT 1.2 => OTT 1.2 - preserve * OTT 1.0 => OTT 1.0 - preserve * ODT 1.0 => OTT 1.0 - preserve * OTT 1.0 => OTT 1.2 - drop Change-Id: Ie297258a4d9f9aa4beb25786c6ba240b6f16f49b Reviewed-on: https://gerrit.libreoffice.org/80654 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-10-16Send 'INPLACE EXIT' on inplace deactivationSzymon Kłos
Change-Id: Ieb44fb356966df0eb92141a5f22f1df13683f6fc Reviewed-on: https://gerrit.libreoffice.org/80694 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2019-10-16tdf#106843 DOCX: export/import change tracking protectionLászló Németh
Now change tracking protection from Writer or from ODT files is exported to DOCX. In Writer it's always possible to disable change tracking protection without password in File->Properties->Security page-> Record Changes after confirmation. Now Writer uses the same confirmation to remove change tracking protection imported from DOCX, for example clicking on Record Track Changes. Disabled protection removes the export of the grab-bagged change tracking protection, too, to avoid of creating bad DOCX with enabled change tracking protection and disabled Record change tracking. See also commit d416250f4f1766e2d596ea3feef6a94b7adf29f4 "tdf#106843 DOCX: forbid disabling protected Record Changes" Change-Id: Ida4d72c57dbe5450ea22028bbed69d413f5a786d Reviewed-on: https://gerrit.libreoffice.org/80784 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-10-16loplugin:bufferadd loosen some constraintsNoel Grandin
and extend O*StringView to have a constructor that takes a pointer and a length Change-Id: I6120e96280f030757e855a6596efdae438b7e1e8 Reviewed-on: https://gerrit.libreoffice.org/80872 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-16loplugin:stringadd look through a couple more known-good methodsNoel Grandin
Change-Id: Ifbdb3e41eae665f7dcaf5301aaba2b6e4662cf48 Reviewed-on: https://gerrit.libreoffice.org/80855 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-15new loplugin:bufferaddNoel Grandin
look for OUStringBuffer append sequences that can be turned into creating an OUString with + operations Change-Id: Ica840dc096000307b4a105fb4d9ec7588a15ade6 Reviewed-on: https://gerrit.libreoffice.org/80809 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-15move HAVE_FEATURE_DESKTOP/OPENCL to their dedicated headersLuboš Luňák
HAVE_FEATURE_OPENCL is included by a common Calc header and HAVE_FEATURE_DESKTOP is included by a common Writer header, causing pretty much their full rebuilds if any feature changes. Change-Id: If29bf78bd4fd70b37981e0826a577777fd255c89 Reviewed-on: https://gerrit.libreoffice.org/80776 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2019-10-14loplugin:stringadd look for unnecessary temporariesNoel Grandin
which defeat the *StringConcat optimisation. Also make StringConcat conversions treat a nullptr as an empty string, to match the O*String(char*) constructors. Change-Id: If45f5b4b6a535c97bfeeacd9ec472a7603a52e5b Reviewed-on: https://gerrit.libreoffice.org/80724 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-14Add document-level option to lock down content extractionSamuel Mehrbrodt
Setting this option will prevent copying/dragging any content from LO to another program or even another LO window. Change-Id: Ifbc032a4fa69ac1a17d4b500f5a30f5399d84ed7 Reviewed-on: https://gerrit.libreoffice.org/80586 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-10-12All occurrences of WriteOStringBuffer(b) can easily be replaced...Stephan Bergmann
...with WriteOString(b.makeStringAndClear()) Change-Id: I46be4f80d6633b5c51a2c3d99f9faf0db5764d3f Reviewed-on: https://gerrit.libreoffice.org/80704 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-11lok: ensure that dialog windows are focused before emitting events.Michael Meeks
Otherwise, we can emit events on a different view's window, causing problems, and cross-user interference. Also emit the key-event on the focused sub-window so event bubbling works. Change-Id: I9dd16c2a256bae58d754f94c6d94a1f3fcdb800b Reviewed-on: https://gerrit.libreoffice.org/80659 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-10-11lok: Disable autocorrect dialog from native context menu.Michael Meeks
Change-Id: I973057c91be6704b5db7d9054679e0ddc8abf429 Reviewed-on: https://gerrit.libreoffice.org/80658 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-10-11simplify "a = a +" to "a +="Noel Grandin
mostly so that my stringadd loplugin can point out places to improve Change-Id: I9920ee1c99cdb6b811ba67ff9d8e32aa261884b5 Reviewed-on: https://gerrit.libreoffice.org/80618 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-10jsdialogs: emit JSON at idle to avoid repeated emission.Michael Meeks
Change-Id: If8ddfaf9097f706d82117e102a56b4a8b2a41cdd Reviewed-on: https://gerrit.libreoffice.org/80616 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-10-10jsdialogs: set LOKNotifier in DeckSzymon Kłos
Change-Id: I845e5f06694372c614972a09e9ab9db89006df16 Reviewed-on: https://gerrit.libreoffice.org/79718 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/80615 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2019-10-10sfx2: LOK: route the parent sidebar window instead of the deckAshod Nakashian
Correct, correction of previous mis-merge. (cherry picked from commit a4142984c4d8dc00fea438bd71bf2af4917c359a) Change-Id: Id3457474bdc4de8bab7a70361ff0e2db1b813476 Reviewed-on: https://gerrit.libreoffice.org/80614 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2019-10-10convert WriteCharPtr..getStr to WriteOStringNoel Grandin
and improve the WriteOString method, we can avoid the strlen here, we already have the length One change in behaviour to be noted - if the string contains trailing zero bytes, which ARE INCLUDED IN THE STRING LENGTH, i.e. I'm not talking about the normal terminating zero, then this patch changes behaviour because we will now write those zeros to the stream. Change-Id: I4668b9b9eb877f820b1dc70d6cd10ba2623bc0a2 Reviewed-on: https://gerrit.libreoffice.org/80597 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-10tdf#127525 Replaces hotkeys for "Don't Save" button from "D" to "n".shameempk
Change-Id: I23455e7feb9effafa20722545196f19eb8b34d7b Reviewed-on: https://gerrit.libreoffice.org/80558 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2019-10-09name all Notebooks 'tabcontrol'Caolán McNamara
Change-Id: I5159ed77c2b3ba2f06e381a738a49dbe17a6a4dd Reviewed-on: https://gerrit.libreoffice.org/80542 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-09screenshot each page separatelyCaolán McNamara
Change-Id: I48a0882162075133597ecdd5512a310f8e0bf0d0 Reviewed-on: https://gerrit.libreoffice.org/80533 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>