summaryrefslogtreecommitdiff
path: root/desktop
AgeCommit message (Collapse)Author
2023-05-25desktop: check getDialog()Xisco Fauli
it might return nullptr See https://crashreport.libreoffice.org/stats/signature/dp_gui::TheExtensionManager::ToTop() Change-Id: I4023529aec0ba2c72b4e7db5449d235c208ee30b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152268 Tested-by: Jenkins Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-05-23[API CHANGE] Add createShortCutManager function to uiconfigurationmanager.Gökay Şatır
We need to have different accelerator classes for differnt languages. This PR creates a new accelerator class for different languages. Since current code uses single instance for accelerators, i needed to add a create function. Also we now have an unordered map for different languages and modules. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147157 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148680 Tested-by: Miklos Vajna <vmiklos@collabora.com> Change-Id: Ia646f20b3206f430ece614fc127e8b748044e4c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151798 Tested-by: Jenkins
2023-05-10desktop : remove useless using namespaceArnaud VERSINI
Change-Id: I23a2932402120d9097ab6bd9793d4b4e92be03e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151538 Tested-by: Jenkins Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2023-05-07use AlphaMask for variables when calling GetAlphaMaskNoel Grandin
Right now this doesn't make any difference, since Bitmap is the superclass of AlphaMask. But when I switch to using alpha instead of transparency, passing AlphaMask around is going to mean something different to passing plain Bitmap around. Change-Id: Ic1541e5f0a3b97331793cd23e23115faa7f382b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151463 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-04tdf#119931 Fix accessibility warningsRasenkai
Signed-off-by: Rasenkai <rasenkai99@gmail.com> Change-Id: Id211c56f0090516ec0118110038be70f003ff80f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150706 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-04-27Bin the unused paintTileToCGContext special thing for iOSTor Lillqvist
It was used by "LibreOfficeLight" which died years ago. Change-Id: I71a1315448baa4f1ec7a22b20cb3dd39c88cda78 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151066 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2023-04-26Bin leftover dead codeTor Lillqvist
Change-Id: Ie0583d52b01bba92e6fc41f0fee3fd4732f1d479 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151054 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2023-04-25loplugin:unnecessarygetstrStephan Bergmann
Change-Id: I36eaac02a9779ee8e1f69930ffeafedc8641301f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150961 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-04-24loplugin:unnecessarygetstr extend to more std::string checkingNoel Grandin
suggested by mike kaganski Change-Id: I5f5f254142767aca45a6101abdd84a0163ca6a34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150936 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-24loplugin:unnecessarygetstr extend to createFromAsciiNoel Grandin
idea from mike kaganski Change-Id: I0ecb9cad091d7a048d2ddae73165bf22748f3872 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150907 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-21CppunitTest_desktop_lib: disable 3 useless doc sign testsMiklos Vajna
These would test how LOK APIs for signing editable documents would work. In practice, this is already broken, because the tests are disabled in the MPL subset builds but binaries tuned for LOK API users at distro-configs/CPLinux-LOKit.conf already use --enable-mpl-subset. Additionally these tests pass with an upcoming libxmlsec-1.3 for me locally, but not in a RHEL7 environment. So just disable the 3 tests till we have the time to fix them up in MPL subset builds, where they would be useful. PDF signing is a different story, that still works to some extent. Change-Id: Idcfda4c8c72353e710a65c5b0ee68d28e30a351b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150700 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-04-20WASM: don't run gfx tests on startupThorsten Behrens
Change-Id: Ibc04b5c1bb3972544fa605447c635b4af84f7584 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150668 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-04-14-Werror,-Wunused-variableStephan Bergmann
Unused ever since it got introduced in 62b337a3d6650b8b3045dd98f59a8c0188f0a6fa "Unit test for removeTextContext." (Found with an experimental Clang build supporting __attribute__((warn_unused)) on individual ctors rather than just whole class types, and the corresponding css::uno::Reference ctor marked accordingly.) Change-Id: Id80b031625134ea6b4d679bfb774fc253206ae18 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150374 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-04-13lok: trim glibc allocator's pending heap when called.Michael Meeks
Change-Id: I8d1bda01a0e6ccff0fa868013c67c0fbbf78a836 Signed-off-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150299 Tested-by: Jenkins
2023-04-12lok: capture and publish the modified status in save resultAshod Nakashian
This is necessary to flag to the storage whether or not the contents of the file being uploaded has any user modifications or not. This is typically used to optimize the versioning and storage utilization. We also add the time when saving started and the duration it took. The timestamp is to figure out if there has been subsequent activity/commands that could have modified the document. The duration is to help Online throttle saving if too frequent. Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk> Change-Id: Id6d8e629ef9b6e723d1d8b84d64fc7741b997bc5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149985 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-04-11loplugin:stringaddStephan Bergmann
Change-Id: I2dec226b3fb17f5ea361673139f2511ce7c3fe89 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150214 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-04-10Drop SvStream::WriteCharPtrMike Kaganski
WriteOString is a better replacement Change-Id: Ic431b9aeb98d19fe61cff71360eee555105cc2bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150192 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-10Use more *string_viewMike Kaganski
Change-Id: I1172febd45da4dba006f8495427fe45c6d9b9fa6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150187 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-09new loplugin:unnecessarygetstrNoel Grandin
which prevents constructing unnecessary temporaries via getStr() Change-Id: I9ca70893a10e954b5ee0e6ad6098660ee24c2bef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150170 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-07move using the vcl file dialog in headless mode to the point of creationCaolán McNamara
instead of setting and unsetting the config option at start and exit because a document that crashes in headless mode leaves my config in an unwanted built-in file dialog state. Change-Id: Ib5fcc5994a08c78bffdf57cb5b252dc469167ba2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150126 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-04-07drop unused eventtesting stuffCaolán McNamara
eventtesting with input of fuzzed keystroke was a fairly nifty idea, but I never did anything with it beyond an initial experimental run and its cluttering up things so drop it now Change-Id: I44571e3e33124f522374d7c6772b7a7e7721aa1d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150125 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-04-05fix leaks when using tools::JsonWriterNoel Grandin
Specifically in sd/source/core/annotations/Annotation.cxx We seem to end up fixing leaks here often. The current tools::JsonWriter API is just very hard to use correctly. So rather return an OString, which is cheap to copy, and push that down into the LOK code. AFAIK that seems to end up requiring less code and less adhoc copying of data (specifically the queueing code in init.cxx was creating copies when converting to std::string). Ideally, we could have some special API to avoid the new strdup() calls in init.cxx, but not sure how to prevent other people from accidentally using that. Change-Id: Ia33437c1bfd9cc2d54dfb99914d1b72db20335f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149963 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-02Avoid conversions between OUString and OString in VCLMike Kaganski
Standardize on OUString, which is the main internal string class. Convert from/to OUString only when communicating with respective external APIs. Removes about 200 conversions from the code. Change-Id: I96ecee7c6fd271bb76639220e96d69d2964bed26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149930 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-03-25loplugin:stringadd in d*Noel Grandin
after my patch to merge the bufferadd loplugin into stringadd Change-Id: I625a0adf89f54ea25f0377a266c37acf9a37d723 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149550 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-23rtl::Static to thread-safe-staticNoel Grandin
Change-Id: Ife02e6d2be3ebfbb08522ab0183ef4aa31a99e19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149415 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-22m_aBootsrapError will always be BE_OK here nowStephan Bergmann
...since a1faf14f74a62ea76141115538d7d30d90c9eeb6 "rhbz#2171265 Report fatal InitApplicationServiceManager failures more reliably" Change-Id: I36771aeb8d13f08558f323e713de5cbe3972b82e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149329 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-03-22rhbz#2171265 Report fatal InitApplicationServiceManager failures more reliablyStephan Bergmann
For example, when initialization of the UNO type manager failed, any code run between this SetBootstrapError and the HandleBootstrapErrors in Desktop::Main which would need the type manager (e.g., to set a css::uno::Any) would have caused a crash, so would have failed to print to std::cerr the sought-after css::uno::Exception message. The mis-initialized process would most definitely crash sooner or later anyway, so there's no harm in a controlled std::abort() here (if that is even reached, and the process doesn't already crash in HandleBootstrapErrors, after it has printed the relevant information to std::cerr). Change-Id: Ic5889aedec0908fa4b1e2966eb188508d0f92d26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149323 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-03-17tdf#153683: Refactor fixBaole Fang
Change-Id: I3358c99425edae92bde120eda4fd905552444eba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149034 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-03-16Add uno command that changes the themeParis Oplopoios
Add an uno command that changes the theme to the one specified in the first parameter Change-Id: Ia0fef2ca698415e07f1943cf80ab667fb5c37238 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148942 Tested-by: Jenkins Reviewed-by: Paris Oplopoios <parisoplop@gmail.com>
2023-03-16tdf#153683: Show the used module in --convert-toBaole Fang
Implements getName that returns the module name. When outputs the convert-to message, module name is included. Change-Id: Ic18d8899d160e9c1afa8801dc07120f5ef822d07 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148905 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-15Use officecfg instead of SvxDeeplOptionsNoel Grandin
Change-Id: I977d9be45fa17b960cccb0915c5f2762bf11288f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148885 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-15Use officecfg instead of SvtTabAppearanceCfgNoel Grandin
but we need to keep a small chunk of logic which is used by two different classes Change-Id: I57390144eae2ecdb49b5b2ca3f4ce1fbc3d69420 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148884 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-14elide some temporary OStringsNoel Grandin
where we can pass a string_view into OStringToOUString Change-Id: If7803ba49aa15f6e9c7bd386d32fb84003155390 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148844 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-11lok: add trimMemory capability, and expand dumpState to caches.Michael Meeks
Being able to trigger some more aggressive memory saving is useful in for both online and mobile. Change-Id: I9b91c9fe9eecec06c75112595deac0bfeb94c144 Signed-off-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148624 Tested-by: Jenkins
2023-03-09Use officecfg instead of SvxLanguageToolOptionsMike Kaganski
Change-Id: Ia9add4ff3ebe20ba491e33de1e9a2644a48ef7a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148548 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-03-08Make error message more usefulTor Lillqvist
Change-Id: I3c6efcbd2a2759385912aa352d0c250963e5f004 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148464 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2023-03-08osl::Mutex->std::mutex in ExtMgrDialogNoel Grandin
Change-Id: I6e0997b1f4fb49459637ce82178c33460eed1188 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148437 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-08osl::Mutex->std::mutex in PackageManagerImplNoel Grandin
Change-Id: I613a8846270f4b42125f24d9a7b99ecc12e2edb7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148434 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-08osl::Mutex->std::mutex in ExtensionManagerNoel Grandin
Change-Id: I33c39076093dc0c23b5e7c85cbdf0a88e6231d2e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148435 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-08osl::Mutex->std::mutex in UpdateRequiredDialogNoel Grandin
Change-Id: Ic4161d946190f74d016dd81aca44a7623a4e2dcc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148436 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-07no need to allocate these separatelyNoel Grandin
they are all one or two words in size Change-Id: I86611e14a32dda3ae2226bbfa775ad0234513888 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148425 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-07Drop the LibreOfficeKit paintThumbnail() APITor Lillqvist
It turns out that Mert's original idea is actually the simplest and it is known to work. And in that, the separate paintThumbnail() is rather pointless, as all paintThumbnail() did was to call paintTile(). The caller (in Collabora Online) knows when a file is opened specifically for thumbnailing, and can call paintTile() itself with the appropriate parameters. My misguided idea would have had paintThumbnail() somehow figure out the physical Twip coordinates of the current location (for text documents, the insertion caret location) in the document. (Or, as LibreOfficeKit for some reason calls them, "logical" coordinates, even if a Twip is a very physical length unit.) Then it would have called paintTile() with those coordinates. But it turned out to be rather hard to figure out the Twip coordinates of the current location in the document. Mert's idea was that when a document is opened for thumbnailing, only Online actually needs to know that. From LibreOfficeKit's and core's point of view it is a normal document load operation. Then Online performs the .uno:OpenHyperlink magic, which makes core move the current position to the requested "target" or "mark" (the terminology varies) location. And then a "cursor" callback is used by Online to get the Twip coordinates of the target. It is a bit unclear to me whether .uno:HyperLink causes the document to be opened an extra time, but whatever, this way is said to work. So let's do it like that. This reverts the paintThumbnail part of 1aa37ca99112c0760552600d7774ba7224581c5b. Change-Id: I8f3d9917ee362c1518834fc10a57c57ebc4a6edb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148390 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2023-03-07Avoid running graphics tests when in lok mode.Michael Meeks
Best to avoid allocating and freeing 64Mb of RAM, and burning lots of CPU doing CPU rendering on an invisible for each document loaded through lok API. Change-Id: I656b400159b9d6a7a9f2c79d188e3aec9b3dd0e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148258 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2023-03-01Improve the LibreOfficeKit Document::paintThumbnail() APITor Lillqvist
No implementation yet. Change-Id: Ie1dc955bc8b589bd336af0545a2270cbe84a8b9c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148028 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2023-02-28Fix iOS build breakagePatrick Luby
There were a few remaining DeviceFormat::DEFAULTS in remaining in IOS blocks after commit 00659bcdbbb167596e6fd18e283a54819dd6fe91 Change-Id: I29e1f2bd6d4ce20dea7a45ce17bc6f3b929859c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148008 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@neooffice.org>
2023-02-27no need to hold CollatorWrapper by std::unique_ptrNoel Grandin
allocate it inline, it is only one pointer in size Change-Id: Idb6217e6c9c37da92427aa6c497223a84015c553 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147742 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-25Remove duplicated includeAndrea Gelmini
Change-Id: I3848788410525b36a1ece56b125e75a2281fafe6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147474 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-02-22Extend LOKit API with functionality to extract a request and paint thumbnailsTor Lillqvist
Original author was Mert Tümer. Change-Id: I181a9955bcce1d5ee4c81e2a52445ef318dc4823 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147396 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2023-02-21qa: call ProcessEventsToIdle inside dispatchCommandXisco Fauli
Change-Id: I909e6f334f4a659282141a97ccb3ffdea6ecc364 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147397 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-02-21qa: use dispatchCommand from macroTestXisco Fauli
Change-Id: I135bdcf6b93a38d7ee746234462736b0868c9017 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147395 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>