summaryrefslogtreecommitdiff
path: root/desktop
AgeCommit message (Collapse)Author
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>
2018-11-23Use the correct DPI scaling factor in LibreOfficeKit for iOS, tooTor Lillqvist
Fixes the rendering of spreadsheets in the iOS app. (The cell area was rendered at half the scale of the row and column headers.) Actual code change only in desktop/source/lib/init.cxx, but update related comments elsewhere to mention CoreGraphics, too, and not just cairo. Change-Id: Ife99c6a2d58e592cfea3b4ed1ab09c19fba77e72
2018-11-21weld SwCondCollPageCaolán McNamara
and put back original SvTreeListBox a11y factory use Change-Id: I4ad8ce29d8fed6ec5d44e9a1d641919a89226b79 Reviewed-on: https://gerrit.libreoffice.org/63501 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-11-21loplugin:redundantfcast improvementsNoel Grandin
check for calls to constructors, and extend the list of types we check for unnecessary temporary creation Change-Id: Ia2c1f202b41ed6866779fff5343c821128033eec Reviewed-on: https://gerrit.libreoffice.org/63472 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-21tdf#42949 Fix IWYU warnings in include/vcl/[B-E]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Iabe571aa8f00492902c499094bea8365a3e17fca Reviewed-on: https://gerrit.libreoffice.org/63623 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-11-21tdf#112536 related: make soffice.bin a proper console application on WinMike Kaganski
Being a GUI application on Windows (with related flag in the executable header - see https://blogs.msdn.microsoft.com/oldnewthing/20090101-00/?p=19643/), OS would detect the subsystem before launching the application, and won't attach the parent console or redirected output handles from it to the application. Also, different hacks to reattach the GUI application to the console later are unreliable on different Windows versions, and work improperly (the output goes to the console after the launch command has already returned, which is wrong in batch files). This makes it extremily difficult to do CLI operations with LibreOffice on Windows, with error codes/warnings/messages/output missing or going to wrong consoles. Making an executable for CUI subsystem, on the other hand, makes Windows to allocate a console before starting it when the program is run by itself. This makes the console window to appear on screen unconditionally, even if it's hidden later when the program has started. This flashing is undesirable. But we use a wrapper executable on Windows, called soffice.exe, which is what actually launched by user, and which runs soffice.bin. This allows us to make soffice.bin the proper console application, and thus make it capable to behave properly in CLI scenarios, while avoid the console flashing when run from the soffice.exe (which would suppress the console creation using DETACHED_PROCESS creation flag to CreateProcessW). Also creating a new wrapper for console (soffice.com) allows to use command lines which omit explicit executable extension (no ".bin"), like this: "C:\Program Files\LibreOffice\program\soffice" --help which allows to continue using multiple available help resources unchanged, since .com extension is tried prior to .exe by Windows' cmd.exe. Change-Id: I089d0f30f860da6cfc781b4383f6598a08a4d238 Reviewed-on: https://gerrit.libreoffice.org/63572 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-11-20Tidy up the --help text to properly fit into standard 80-ch terminalMike Kaganski
Change-Id: I5b7f503e32c10b5a844817c040ab0dde27bf48f7 Reviewed-on: https://gerrit.libreoffice.org/63666 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-11-19tdf#121498: also process --help/--version before VCL init on WinMike Kaganski
Otherwise they would be passed to the other running instance, and processed there, without outputting the data to the callng console Change-Id: I5cd9d11b567dfed06e19e9a2c4c29bc82868c064 Reviewed-on: https://gerrit.libreoffice.org/63577 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-11-19weld TreeViewCaolán McNamara
a) use GtkTreeStores for GtkTreeViews b) ironically can't store GtkTreeStore contents in .ui apparently c) set show_expanders for all non-trees and unconverted cases d) on-demand subtrees Change-Id: I3c1036a222daba2c129b1a22ffeb3fe35005ae31 Reviewed-on: https://gerrit.libreoffice.org/63336 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-11-19tdf#42949 Fix IWYU warnings in include/vcl/[ab]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: If18c80fc64e55d797953e24e40e5d5e62bd9c625 Reviewed-on: https://gerrit.libreoffice.org/63453 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-11-18cppcheck: unreadVariable dp_gui_extensioncmdqueueJulien Nabet
Change-Id: I0bf922c5f0135d32f66a756c9e6af0bb22575a75 Reviewed-on: https://gerrit.libreoffice.org/63532 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-11-17Adapt to C++2a char_tStephan Bergmann
u8 literals incompatibly change their type (as implemented by recent Clang trunk) Change-Id: Ia4f7b91f5d86656a056303d2754981ab2093a739 Reviewed-on: https://gerrit.libreoffice.org/63494 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-11-16Fix typosAndrea Gelmini
Change-Id: I25660634dcb9ebb31292275e31ed7a047e4ddd25 Reviewed-on: https://gerrit.libreoffice.org/63474 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-11-13LOK: desktop: use correct size when initializing LibreOfficeKitDocumentAshod Nakashian
Change-Id: I0aecc459cf448c03dd8c17a486cc66f541f6868d Reviewed-on: https://gerrit.libreoffice.org/63322 Tested-by: Jenkins Reviewed-by: Jan Holesovsky <kendy@collabora.com>