summaryrefslogtreecommitdiff
path: root/desktop
AgeCommit message (Collapse)Author
2019-01-13Reduce OUString operationsMatteo Casalin
Change-Id: I11f9205e82dff9df5b235860df1b36d266d17334 Reviewed-on: https://gerrit.libreoffice.org/66221 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-01-11Replace OUStringBuffer::appendCopy with append(std::u16string_view)Stephan Bergmann
...which is more general Change-Id: I94f28f8eda887120cf5f143b4549e0339b60e6a7 Reviewed-on: https://gerrit.libreoffice.org/66155 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-11Resolves: tdf#122404 unlock just the toplevels that were lockedCaolán McNamara
push what toplevels got locked to just unlock those ones. otherwise the just dismissed toplevel may still be present in the Application toplevel list. merge all the similar examples of this. Change-Id: I77c0d55d1e4b3bcc3b8d88fef00ba289edd1e831 Reviewed-on: https://gerrit.libreoffice.org/66076 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-01-08convert "*xxx.get()" to "*xxx"Noel Grandin
Change-Id: Ic307226591ff9702957ccdec486ccf70357eb6d9 Reviewed-on: https://gerrit.libreoffice.org/65951 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-08use unique_ptr in desktop::IpcThreadNoel Grandin
Change-Id: I7f67b4c9a157d7a1a5992174397c061b14c8a674 Reviewed-on: https://gerrit.libreoffice.org/65952 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-07tdf#42949 Fix IWYU warnings in include/vcl/[v-x]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I98f49765c6b74808dcbd692e0f375dd2848fcfd4 Reviewed-on: https://gerrit.libreoffice.org/65614 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-01-06tdf#82504 writer table cell background color SvxColorItem uno functionJim Raykowski
Current background color function only sets table cell background when multiple table cells are selected. Paragraph background is otherwise set. This gives expected results for use in sidebar Paragraph panel when multiple table cells are not selected but unexpected results when multiple table cells are selected. For background setting from the table tool bar unexpected paragraph background color is set when multiple cells are not selected. This fix creates a table cell background color uno command specific for setting table cell background color. Change-Id: Ic56723b635252415d932c5499f996c3e46eee13b Reviewed-on: https://gerrit.libreoffice.org/65591 Tested-by: Jenkins Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com>
2019-01-01lok: add signDocument to "Office" iface - to sign not opened docs.Tomaž Vajngerl
LOKit function "signDocument" can sign document without the need to open them. This is useful to sign PDF documents after they are created from a currently opened (ODF, DOCX) document. This adds DocumentDigner to sfx2, which could also be used in desktop LibreOffice without opening them and in further tests. Change-Id: Id6f242e817f594aa672f94f9c6f9b34e4035d46a Reviewed-on: https://gerrit.libreoffice.org/65767 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-12-29Fix typo in codeAndrea Gelmini
Change-Id: I1e6d483e7cc7f03149fbd0a0f5f49a62677faecd Reviewed-on: https://gerrit.libreoffice.org/65695 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-12-27lok: add test signing DOCX -> testInsertCertificate_PEM_DOCXTomaž Vajngerl
Change-Id: I1918041793935b012e60fe64073480ed4b9581d5 Reviewed-on: https://gerrit.libreoffice.org/65630 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-12-27lok: simplify and cleanup testInsertCertificate_{PEM,DER}_ODTTomaž Vajngerl
Change-Id: I61891d1295a342e546cab56ef80315c9f5018f90 Reviewed-on: https://gerrit.libreoffice.org/65629 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-12-26Use vector<PropertyValue> and containerToSequence to simplify thingsMike Kaganski
This makes creating a sequence of initially unknown size more readable and straightforward. Change-Id: I2c42aea7cc69efd0b53b7a35b72c4ae1a6ed4e87 Reviewed-on: https://gerrit.libreoffice.org/65612 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-12-26Remove redundant ClearableMutexGuard::clear() callMike Kaganski
It's already called just before the condition check. Change-Id: I67e718a52476b334b8521ce129f4a21a8bf53797 Reviewed-on: https://gerrit.libreoffice.org/65611 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-12-25tdf#120676: don't send "processing done" when refused to processMike Kaganski
After commit cf333a878ceed18d0343520a2c65be69fc433b1f, condition RequestHandler::cProcessed is set regardless if the request was processed in RequestHandler::ExecuteCmdLineRequests. This allows PipeIpcThread::execute to avoid infinite wait for the condition object that is never signaled. But this makes the latter function to send PROCESSING_DONE to the calling process. So the secondary process gets no hint that the request actually failed. This change adds a boolean field to signal if the request really was processed. In the case of refused processing (i.e., when pGlobal.is() is false, or when !pGlobal->AreRequestsEnabled() is true, like when shutting down), the secondary process would get empty response to its request in PipeIpcThread::enable, instead of expected PROCESSING_DONE, and thus the process will eventually exit with non-0 error code, which would allow to detect this in scripts. Change-Id: Id91ea28025e3f3ab60c7049f02ed9fc226d2a654 Reviewed-on: https://gerrit.libreoffice.org/65610 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-12-24Fix signing empty Configurations2/accelerator/current.xmlTomaž Vajngerl
When determining if a file is an XML file for siging, we need to read the manifest file to get an accurate detection. In case when we were signing in the GUI the manifest file was read when the storage was set. When we didn't sign over the GUI, the manifest was never read: the code was only present in the GUI code - "documentsignaturesdialog.cxx" so the detection was wrong and isXML returned "true" for current.xml. With this we move the manifest reading to DigitalSignatureManager, where the manifest is read when needed. Change-Id: If45a32af6410bc5f7c5afdb976b182bd69ab7d6b Reviewed-on: https://gerrit.libreoffice.org/65600 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-12-23tdf#122269 don't prompt to restart if we're exiting the application anywayCaolán McNamara
Change-Id: I6272ae92b7e948680fb7241c387eb205adbbea01 Reviewed-on: https://gerrit.libreoffice.org/65588 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-12-20missing test dependenciesStephan Bergmann
Change-Id: I6dd52a9116d7d6f692e6f1a080c7169a92b265ea Reviewed-on: https://gerrit.libreoffice.org/65463 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-20Enable --help=html for flatpakStephan Bergmann
To not increase the size of the main org.libreoffice.LibreOffice app further, the plan was to realize this as an org.libreoffice.LibreOffice.Help extension. Ideally, this would be a localized extension, so that, by default, only a relevant subset of the extension would be downloaded and installed. (But see below.) There are multiple technical problems, as discussed at <https://github.com/ flathub/org.libreoffice.LibreOffice/issues/35#issuecomment-447295308> "Add integrated LibreOffice Help offline": * LO can't pass a file URL with query part to xdg-open, so uses a temporary wrapper .html file that redirects to the target URL. But for the flatpak case this wrapper can't be in /tmp (which isn't visible from outside the flatpak sandbox), but is instead stored in a new temp dir under $XDG_CACHE_HOME (which is always set for flatpaks and /is/ visible form the outside) that is removed on LO exit. * The file URL stored in the temp file must be rewritten from the internal path (/app/libreoffice/help/...) to the path as seen outside the flatpak sandbox. While the path for the org.libreoffice.LibreOffice /app is stored in /.flatpak-info, the external path for the org.libreoffice.LibreOffice.Help extension is different and not stored there. So use a hack trying to construct that path from what information is available in /.flatpak-info. * But the help content consists of locale-specific and shared files, and those reference each other with relative links. But a localized flatpak extension cannot contain shared files, it can only contain per-language sub-dirs. And if the shared help files were kept out of the extension, as part of the app itself, the relative paths among these files inside the flatpak sandbox would differ from those outside of it, so would be broken when viewing the content in the external browser. A solution would either (a) need to somehow rewrite the content of all the help files being served from LO to the external browser, or (b) replicate the shared help files in all the extension's per- language sub-dirs (and if some localization uses en-US content as a fallback for only part of its translated content, e.g., in the case of media files, would need to also replicate that en-US content), or (c) use a non-localized extension that always contains the content for all localizations. For now, I chose the third approach. This makes the org.libreoffice.LibreOffice.Help extension relatively large (the current /app/libreoffice/help tree has a size of ca. 100MB), so that I decided to not have it downloaded and installed automatically ("no-autodownload": true in solenv/flatpak-manifest.in). (I checked with Flatpak 1.0.6 that if the extension should be changed to a localized one with the same name in the future, updating from an older version would work. If the old extension was not installed, just the relevant localizations of the new version will be downloaded and installed. If the old extension was installed, the full set of localizations of the new version will be downloaded and installed.) (As also mentioned at <https://github.com/flathub/org.libreoffice.LibreOffice/ issues/35#issuecomment-447295308>: "A second, minor, nuisance is that, for security reasons, an `xdg-open file:///...html` call from a flatpak leads to an intermediate popup dialog letting the user chose which application to use to open the URI, while e.g. an `xdg-open http:///...html` is allowed to go directly to the user's preferred browser. So accessing help content from LO flatpak would present that popup dialog first, forcing the user to select a browser to proceed.") Change-Id: I35f5a23947dd551dc1b9bff1dd2abd6710073b5f Reviewed-on: https://gerrit.libreoffice.org/65451 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-15lok: Implement SVG export for Calc (SelectionOnly mode)Tamás Zolnai
Change-Id: Ic305e5305890fd1efa3a3130e5216f9c672870e5 Reviewed-on: https://gerrit.libreoffice.org/65175 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2018-12-14lok: Handle Special character menu item's state correctly in onlineTamás Zolnai
Change-Id: Iaa962fe5a590ef16e710fdd49d02d564f10f0f9f Reviewed-on: https://gerrit.libreoffice.org/65188 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2018-12-14lok: Implement SVG export for Writer (SelectionOnly mode)Tamás Zolnai
Separate generic code from Impress / Draw specific code and implement shape selection handling in case of Writer. This is an internal filter, so it can be called only from the code. Change-Id: I807e04a0949530d6029037bb964c10c80197ff33 Reviewed-on: https://gerrit.libreoffice.org/65174 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2018-12-14Fix Extension_test-{active,passive}Stephan Bergmann
...by reverting part of 6f50961e69406a17d6ec998956a6b33208b1001b "remove more rtl::OUString and OString prefixes" Change-Id: I50d37f437bb6f760c0d3990faaf71084913520f0 Reviewed-on: https://gerrit.libreoffice.org/65169 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-13Un-revert the addition of more ABI checks for LibreOfficeKitClassTor Lillqvist
Change-Id: Idf2ebb552065fa600a4010e83a24a0f13651c029
2018-12-13Revert adding the tanslateGet() and translateNGet() API to LibreOfficeKitTor Lillqvist
Will handle it another way instead that isn't so visible and annoying. This reverts commit 5f0dda8e9f2e35e1fdb5750089a70543478fa8a1. This reverts commit 4f1a341bc312673b8d92e4474cc39bc3ab69aa5b. Change-Id: If456d2792a5f2793ee6337898aaa4a55637f8522
2018-12-13loplugin:unusedfields in variousNoel Grandin
Change-Id: I4021ba6090bd3f42b0eb5ea1ec9bbf05d1594b35 Reviewed-on: https://gerrit.libreoffice.org/65054 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-13loplugin:useuniqueptr in desktop::BackendImplNoel Grandin
Change-Id: I3efea7e47ad18a1dd39e81929aac319fe46357f0 Reviewed-on: https://gerrit.libreoffice.org/65032 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-12use std::<some_container>::swap, instead of copy and clearNoel Grandin
Change-Id: If49c33e271426ff5c2d0c6cc4010670f797bdd38 Reviewed-on: https://gerrit.libreoffice.org/65001 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-11Expand warning (mention file path)Samuel Mehrbrodt
Change-Id: Ib97d0da4c52215009dd2142908168c68ea0aebcb Reviewed-on: https://gerrit.libreoffice.org/64939 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-12-10missing include (--enable-breakpad)Stephan Bergmann
Change-Id: I9c720c109893fac671006ad7b3b2c58b397cc744
2018-12-10Add a localisation API to LibreOfficeKitClassTor Lillqvist
Combines the LanguageTag::Create() and Translate::get() (or nget()) functionality. Also add an ABI test for the Kit class in the LibreOfficeKit unit test, and a test for the translation function. Change-Id: I78c48a8bbb434d6f204869290822830288022a53 Reviewed-on: https://gerrit.libreoffice.org/64882 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-12-10tdf#42949 Fix IWYU warnings in include/vcl/s*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ie87d27dd2c385a63349e0b322fd067ba03d2d152 Reviewed-on: https://gerrit.libreoffice.org/64479 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-12-08use Image(OUString) instead of Image(Bitmap(OUString))Noel Grandin
which benefits LOOL since we can delay creating the image until we know the dpi setting of the display we are going to write to. Achieved by perl -pi -w -e "s/\bImage\s*\(\s*BitmapEx\s*\((\w+)\s*\)\s*\)/Image\(\1\)/g" $( git grep -lw "BitmapEx" ) followed by git grep -nP '\bImage\s*\(\s*BitmapEx\s*\(' followed by commenting out the BitmapEx(OUString) constructor and seeing what needed adjusting. Change-Id: I3224e11937d720fa484b0d659d25673a9e809267 Reviewed-on: https://gerrit.libreoffice.org/64760 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2018-12-08Remove obsolete SAL_FALLTHROUGH completelyStephan Bergmann
...after 7ffdd830d5fb52f2ca25aa80277d22ea6d89970b "HAVE_CPP_ATTRIBUTE_FALLTHROUGH is always true now" Change-Id: I54e5ff4e036a6bb3e5774d1c0524158aae18e937 Reviewed-on: https://gerrit.libreoffice.org/64800 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-07LOK: Fix API for renderShapeSelectionAshod Nakashian
Unlike C++, C doesn't allow reference-to-pointer types, and we do have C code that wouldn't compile with ref-to-ptr. Had to change to ptr-to-ptr, which is the proper way of having output arrays. For the same reason, we cannot use new/delete, rather we must use malloc/free. Another (lesser) issue was that we used the renderShapeSelection API to echo back an array we give it as prefix. This made the API unecessarily complex (in undocumented ways) and forced the implementation to both worry about user-data and managing the input memory. This logic is best moved to the client and the API simply returns the output data. Speaking of returning data, the API now returns the size of the array it allocated and wrote to, so the client can do a simple check on the return value directly. Change-Id: Ida216c10d5b37efd1e0861e26b72cabb25c568e6
2018-12-07Remove cout lineTamás Zolnai
Change-Id: Ic1b30a89ae513b3b3ec71853830ef7600801dee0
2018-12-07Introduce client-server message for requesting the selected shape as SVGTamás Zolnai
It works for Impress only now. Change-Id: I95e3e37ae7df49b567108f6d6467038b715e886d
2018-12-05loplugin:unnecessaryparen include more assignmentsNoel Grandin
Change-Id: I9fb8366634b31230b732dd38a98f800075529714 Reviewed-on: https://gerrit.libreoffice.org/64510 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-01test signing with certificate chain and private key in PEM formatTomaž Vajngerl
Change-Id: If3b121e44ceec8be668820a7e8a9e35c15d547ff Reviewed-on: https://gerrit.libreoffice.org/64295 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-12-01Add SolarMutexGuard where neededTomaž Vajngerl
When triggering rechecking of signature status, an assert fails and brings down the program because we don't hold a SolarMutex. The rechecking of signature status needs to broadcasts. Change-Id: Ib500b06d2e191465df1e0da2097ddb1b6b06725a Reviewed-on: https://gerrit.libreoffice.org/64292 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-12-01lokit: convert PEM certificate to DER if it is detected as suchTomaž Vajngerl
Change-Id: I1ae105067c109a32f4acc34749b425d9e4e26514 Reviewed-on: https://gerrit.libreoffice.org/64291 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-11-29Rename Mac OS X to official name macOS in comments and documentationBartosz Kosiorek
Change-Id: I651b7f202fa52ff5f5357a11aa72c43eb7dc7f95 Reviewed-on: https://gerrit.libreoffice.org/64102 Tested-by: Jenkins Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2018-11-29Revert "Simplify code"Samuel Mehrbrodt
This reverts commit 7eaaf96e17c14ac49f98da9722a06c0c95f0c5c0. Change-Id: I559b8817db6f04b44d225346914ef385f7e5048c Reviewed-on: https://gerrit.libreoffice.org/64251 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-11-29tdf#42949 Fix IWYU warnings in include/vcl/[i-m]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: If1b2e04872eb0dd6725802c1709a9085f4cd8c91 Reviewed-on: https://gerrit.libreoffice.org/64141 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-11-29loplugin:stringconstant look for unnecessary OString constructor useNoel Grandin
and tweak the methods in check.hxx to make them more flexible when called with dc.Class(xxx ? "foo" : "bar") Change-Id: I881fe628f22121ced4d8849715d6b1c92b092da1 Reviewed-on: https://gerrit.libreoffice.org/64207 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-29Simplify codeSamuel Mehrbrodt
Change-Id: Ib22c4f628042458cab937c27224505489c67da2e Reviewed-on: https://gerrit.libreoffice.org/64024 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-11-29remove unnecessary "if (!empty()" checks before loopsNoel Grandin
found with git grep -n -A4 'if.*!.*empty' | grep -B3 -P '(\bfor)|(\bwhile)|(\bdo)' Change-Id: I582235b7cf977a0f9fb4099eb306fdb4a07b5334 Reviewed-on: https://gerrit.libreoffice.org/64169 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-28make unopkg gui not ask to 'restart' on extension changesCaolán McNamara
Change-Id: I185527fcc4481ab2bd97ad81849ee38c6fa50919 Reviewed-on: https://gerrit.libreoffice.org/64167 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-11-28Resolves: tdf#121746 block toplevels from closing...Caolán McNamara
while the extension manager is querying via a dialog. Reuse the isBusy for this. Change-Id: I97572404ae296e87fd44711bf1e978bd5bad6280 Reviewed-on: https://gerrit.libreoffice.org/64155 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-11-27tdf#42949 Fix IWYU warnings in include/vcl/[f-h]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ice2eb8c5994bf2ccb88972332ca4a1d3ed41752a Reviewed-on: https://gerrit.libreoffice.org/63826 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-11-26tdf#120703 PVS: V560 A part of conditional expression is always true/falseMike Kaganski
Change-Id: I1ac4c52ea51503373644bc58dcd4395c69f1a675 Reviewed-on: https://gerrit.libreoffice.org/64007 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>