summaryrefslogtreecommitdiff
path: root/uui
AgeCommit message (Collapse)Author
2024-02-15uui: show what is the unhandled result before assertingMiklos Vajna
online.git unit-bad-doc-load fails here, at least show what is the unhandled return code (-1) before failing. The actual problem is not yet solved. Change-Id: I530058590f176f5c7eee3b6cd9d9a270110613ed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163436 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2024-01-22Fix meaning of warning messageGabor Kelemen
Change-Id: I6421d4f6ec5a79d7f3aea531e9e1361cd12abdc7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162355 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-01-18cid#1545625 COPY_INSTEAD_OF_MOVECaolán McNamara
Change-Id: Ibd32bdb5b1c4fc8220e99d308a21af64e4cad7b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162241 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-16loplugin:unusedfieldsNoel Grandin
Change-Id: Ic53aacfc76cb73902cf5e304153975fa02509da2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162110 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-12-15Fix typo in codeAndrea Gelmini
Change-Id: I78900dfd2314fc9b716ef40397229f24e962865f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160780 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-12-14tdf#158576 Explain why OK btn is disabledSamuel Mehrbrodt
User needs to view (verify) the cert first Change-Id: I52ce64678abc3b9f95a384e4082eaee1abf0549a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160747 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-12-14tdf#158576 This button shows a certificate when only one signature foundSamuel Mehrbrodt
"Show signatures" should only be shown when there are multiple signatures, otherwise the button label must be "Show certificate" Change-Id: Iaed2d10b8e94bf6decad937dafef4795b7ed40dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160596 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-12-14tdf#158576 Allow trusting certificates only onceSamuel Mehrbrodt
Macro mode "high" says that only signed macros from trusted sources can be run. When opening a document with a signed macro from an untrusted certificate, the user can either disable macros, or add the certificate to the list of trusted sources permanently and enable macros. This adds the possibility to trust the certificate only for the current document in the given scenario. Change-Id: Idf272498d930afc8a3f8be7f30889b77bf402d52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160598 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-12-14This dialog is no longer called when MacroTrustedAuthors is readonlySamuel Mehrbrodt
Change-Id: I73bc43cf57f6a1ed3613f2cf30e469ce6d841248 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160591 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-12-14tdf#158576 Show warning when cert is not yet/no longer validSamuel Mehrbrodt
Change-Id: I4f517a5e2b33d508d1a501323c4d97dc025edfbc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160566 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-12-13uui: remove use of org.openoffice.ucb.InteractionHandler/InteractionHandlersMichael Stahl
Since the configuration schema was removed in commit c48e810f1a856d392b2ffce6b343082406644ab8 this can now fail with: com.sun.star.uno.RuntimeException message: "cannot find /org.openoffice.ucb.InteractionHandler/InteractionHandlers at /home/ms/lo/master/configmgr/source/rootaccess.cxx:214" Just remove the code, there has been a better replacement since commit af66a011a47f673a9a0ee2c6a0b27e23b11b6ebf in 2010. Change-Id: I80582f77dfb1f301fa7fe4ccd2d5931e1c8771ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160678 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-12-11Reuse GetContentPart instead of duplicating itSamuel Mehrbrodt
Change-Id: I99790638b2de0df548875c6841c1dd46032894d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160567 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-12-11macrowarnmedium: Save with newer GladeSamuel Mehrbrodt
Change-Id: Ida8f4be081fb3b695a6c87354b2862ec103bd432 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160565 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-12-07tdf#158576 Require viewing the certificateSamuel Mehrbrodt
before adding it to the list of trusted certificates. This prevents certificates from being thoughtlessly added to the list of trusted certificates. Change-Id: Ifd0273df39f13432ebad72f1289ede0e6e7a8d5c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160427 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-11-15tdf#157518: enforce password policy on setmasterpassworddlgSarper Akdemir
Change-Id: I7e7adde8f0d55808d16dc9247954a7645a1d3601 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159384 Tested-by: Jenkins Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-11-15tdf#157518: add password strength meter to setmasterpassworddlgSarper Akdemir
Moves PasswordStrength bits that provide utility functions from cui to svl, merging them with PasswordHelper there. Adds password strength bar for the set master password dialog. (accessible via Tools -> Options -> LibreOffice -> Security -> Passwords for Web Connections) Change-Id: I8dc1090a041f8388c2e139beb1d0d9a0beb8acb0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159370 Tested-by: Jenkins Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-10-12Make NC_ constexpr-friendlyStephan Bergmann
...by moving the char8_t -> char reinterpret_cast out of any potential constexpr paths into a new TranslateId::getId. And demonstrate constexpr'ability by making the aCategories var in OApplicationIconControl::Fill (dbaccess/source/ui/app/AppIconControl.cxx) constexpr. (And there might be more such cases that could now be made constexpr.) Change-Id: I0b4e3292faf8f6b901f9b9e934e1aa6bf0f583ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157862 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-11sfx2: fix typoHenry Castro
Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: I73e4890c024a2ab74ea3d4141c63304c167ba4c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157337 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157751 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-10-09tdf#157650 Unhelpful error when XML in content.xml is malformedNoel Grandin
regression from commit d9e322d60f65ff20631dab87baa5a2c7c71daaa2 replace ErrorInfo with simpler mechanism we need to tunnel the necessary information through the uui stuff, so add a new Exception class to do that. Change-Id: Ie1fde486e8637b802340795348a5e5aad6a54e96 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157732 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-09lok: implement "handleLoadReadOnlyRequest"Henry Castro
Is used for interaction handle to query user decision regarding to open the document read only. Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: Ia945eae7b1627d57d6211ae92a784d50313c2627 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156623 Reviewed-by: Ashod Nakashian <ash@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157703 Tested-by: Jenkins
2023-10-09uui: implement "handleLoadReadOnlyRequest"Henry Castro
Is used for interaction handle to query user decision regarding to open the document read only. Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: Ia6792ca540b5c62f4c9de8a5793ef45de3740484 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156622 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Ashod Nakashian <ash@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157660 Tested-by: Jenkins
2023-10-03replace ErrorInfo with simpler mechanismNoel Grandin
Instead of returning ErrCode class everywhere, return a new class ErrrCodeMsg, which combines an ErrCode with the other parameters that are used to control the error reporting. I do not change everything that uses ErrCode here, I started from SfxBaseController/SfxMedium and worked outwards. This change serves two purposes (1) Replace the extremely whacky ErrorInfo mechanism we were using to smuggle information into the error handler reporting mechanism with a very straightforward approach of just combining it into the error class. (2) Allow us to capture the source location that produced the error, which makes debugging the source of a problem soooo much easier. Change-Id: I978b8f00c9851b41a216c7ebdef2ef94251d5519 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157440 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-02lok: add broken package interaction handlerSzymon Kłos
in case of repair don't use template flag to not make file readonly so we can overwrite it and upload to storage updated version Conflicts: desktop/source/lib/lokinteractionhandler.cxx desktop/source/lib/lokinteractionhandler.hxx sfx2/source/doc/sfxbasemodel.cxx Change-Id: Ia460009fc3b77582dde06dd6f94a85aef3aee11b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157493 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-09-29jsdialog: setup LOKNotifier for interaction handler errorsSzymon Kłos
This allows to show error dialogs on file errors like: "file is write protected". Without that patch it was crashing on assertion that LOKNotifier is not set. Change-Id: I1bc722116142c99613fa0715a49cd847896af170 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157317 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2023-09-10using decls should come after #includeNoel Grandin
Change-Id: I058551e87bca42adede860f6f299b0f7ae2af3b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156798 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-18ignore exception in UUIInteractionHelper::handlerequestNoel Grandin
otherwise I sometimes get a crash during make UITest_sw_options when an exception in configmgr goes up the stack and hits the noexcept lamba in the vcl/ stuff that executes Application::PostUserEvent stuff #1 in configmgr::RootAccess::getNode() #2 in configmgr::Access::isValue() #3 in configmgr::configuration_provider::(anonymous namespace)::Service::createInstanceWithArguments #4 in non-virtual thunk to configmgr::configuration_provider::(anonymous namespace)::Service::createInstanceWithArguments #5 in UUIInteractionHelper::getInteractionHandlerList #6 in UUIInteractionHelper::tryOtherInteractionHandler #6 in UUIInteractionHelper::handleRequest_impl #7 in UUIInteractionHelper::handlerequest Change-Id: Id90b4d27d3886984c64acdfee98d9c4696c3c03f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155766 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-07-24tdf#92620 - Adjust error message about exceeding legacy module sizeAndreas Heinisch
Adjusted the error message about exceeding legacy module size and removed the code for saving image version 11. Modules using image version 11 still can be loaded. Saving modules always result in an image version higher than image version 11 depending on the size of the module. In addition, some minor performance issues (construction of the error message and the correct list of modules) were fixed. Change-Id: I3bde9fcc1596b63446193c836fa7b5cb06eb7d97 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149687 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
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-30loplugin:stringadd in ucbhelper..uuiNoel Grandin
when applying my upcoming patch to also consider O[U]StringBuffer Change-Id: I49549347c1c041cc9ce103aed1fe1cc3bc1a780f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149751 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-15move image into the .ui fileCaolán McNamara
Change-Id: I5dad1bd0bcdbedf20d27109ca08109a1a2a6234b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147085 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-22loplugin:unusedfieldsNoel Grandin
Change-Id: Idaf9742358bcd485d6ac96593844b05bf0972fa7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143014 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-10-17use more string_viewNoel Grandin
Change-Id: Ie826234aa9064b08b8f0647738b57c47ac0ed91a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141369 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-14move ErrCode to comphelper and improve debug output stringNoel Grandin
need to move it, because modules "below" vcl want to use the debug output method Change-Id: Ibcaf4089a1e0b3fcc0b5189c7ebf1aae90f50b48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139791 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-18Move tools/diagnose_ex.h to comphelper/diagnose_ex.hxxStephan Bergmann
...so that its TOOLS_WARN_EXCEPTION can be used in comphelper/source/misc/logging.cxx in a follow-up commit. (And while at it, rename from diangose_ex.h to the more appropriate diagnose_ex.hxx. The comphelper module is sufficiently low-level for this immediate use case, so use that at least for now; o3tl might be even more suitable but doesn't have a Library until now. Also, for the immediate use case it would have sufficed to only break DbgGetCaughtException, exceptionToString, TOOLS_WARN_EXCEPTION, TOOLS_WARN_EXCEPTION_IF, and TOOLS_INFO_EXCEPTION out of include/tools/diagnose_ex.h into an additional new include/comphelper/diagnose_ex.hxx, but its probably easier overall to just move the complete include file as is.) Change-Id: I9f3222d4ccf1a9ac29d7eb9ba1530d53e2affaee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138451 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-07-30tdf#150045 Set secondary/explanatory labels apartAdolfo Jayme Barrientos
Rationale in commit 0ebbe1f0080f474fd583e5912c9605e6fb2e13d5, of which this is a follow-up. Change-Id: If75aa32bf02aeb8761f5b7f4ddbbeaa3bdcaab3f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137618 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-07-13loplugin:unusedmethodsNoel Grandin
Change-Id: Ifa9c3fe86e7bad6d3839fd3fdfdb8c1f7b5053c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137016 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-20tdf#141026 Put user and computer name into collapsed sectionSiddhant Chaudhary
This patch hides away the file name and the name of the user when the user tries to open a locked file. This improves privacy, as discussed in the bug report. The .ui file for the new dialog box is `vcl/uiconfig/ui/openlockedquerybox.ui`. The source files `openlocked.hxx` and `openlocked.cxx` have been changed to implement the new dialog. The old string template `STR_OPENLOCKED_MSG` has been deleted to hide away the private data, and a new string template `STR_OPENLOCKED_HIDDEN_DATA` has been added; the latter will be hidden inside the expander dialog. Finally, corresponding changes in the makefiles have been made to let the makefiles know about the UI file. Change-Id: I3cc9d2f6e2d9bc43857c80662e2a405aacd7fc70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132342 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2022-06-01clang-tidy modernize-pass-by-value in uuiNoel Grandin
Change-Id: I55f55554e325ae67a7b9fa36ee12b14804fe446b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135217 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-31Rework UUIInteractionHelper constructionStephan Bergmann
...to remove the need to construct a fresh m_pImpl in UUIInteractionHandler::initialize Change-Id: Ia3f1b89903448f74242a5fec3dcf87c2b1f5e764 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135187 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-31UUIInteractionRequestStringResolver::m_pImpl can be a plain data memberStephan Bergmann
Change-Id: I1daed58cec87d192118f027ce1843e56b17da19b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135186 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-21flatten UUIInteractionHandlerNoel Grandin
no need to allocate these helpers separately Change-Id: I9a062c689b5c3ecb40e6400cfe9715adcdf3ae31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134702 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-17loplugin:stringviewparam convert methods using copy()Noel Grandin
which converts to std::string_view::substr() Change-Id: I3f42213b41a97e77ddcc79d84d512f49d68ca559 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132729 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-12Recheck modules [uU]* with IWYUGabor Kelemen
See tdf#42949 for motivation Change-Id: If710445176681de8e0a0b6c65f58ecaca19dbccf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132768 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-03-24make hash encoding match decodingCaolán McNamara
Seeing as old versions of the hash may be in the users config, add a StorageVersion field to the office config Passwords section which defaults to 0 to indicate the old hash is in use. Try the old varient when StorageVersion is 0. When a new encoded master password it set write StorageVersion of 1 to indicate a new hash is in use and use the new style when StorageVersion is 1. Change-Id: I3174c37a5891bfc849984e0ec5c2c392b9c6e7b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131947 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-27tdf#145829: typo ERRCODE_UUI_IO_MODULESIZEEXCEEDED ("basic" instead of "BASIC")Julien Nabet
Change-Id: I0dc23d9aadd727efb3a9acb2f5361505afe8233e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130618 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-12-10Generally determine Rdb content from gb_*_set_componentfile callsStephan Bergmann
...instead of by listing the content somewhat redundantly in the Rdb_*.mk files, to avoid duplication of logic for components that are only built conditionally (and thus should only be included conditionally in the corresponding Rdb). To achieve that, add an "rdb" parameter to gb_ComponentTarget_ComponentTarget (and to the gb_*_set_componentfile macros that internally call gb_ComponentTarget_ComponentTarget), which is used to make the appropriate gb_Rdb_add_component call internally from within gb_ComponentTarget_ComponentTarget. (As a special case, gb_CppunitTest_set_componentfile shall not call gb_Rdb_add_component, as that has already been done by the corresponding gb_Library_set_componentfile call, so allow the gb_ComponentTarget_ComponentTarget "rdb" parameter to be empty to support that special case.) Most Rdb_*.mk files are thus mostly empty now. One exception is i18npool/Rdb_saxparser.mk, which duplicates some of the Rdb_services content as needed during the build in CustomTarget_i18npool/localedata. 1c9a40299d328c78c035ca63ccdf22c5c669a03b "gbuild: create services.rdb from built components" had already tried to do something similar (in addition to other things) under a new --enable-services-rdb-from-build option. However, that approach had four drawbacks that this approach here addresses (and which thus partly reverts 1c9a40299d328c78c035ca63ccdf22c5c669a03b): 1 Rdb_services shall not contain the component files of all libraries that are built. While that commit filtered out the component files that go into Rdb_ure/services (ure/Rdb_ure.mk), it failed to filter out the component files that go into others like Rdb_postgresql-sdbc (connectivity/Rdb_postgresql-sdbc.mk). 2 The code added by that commit to Makefile.gbuild codified the knowledge that there is an Rdb_services, which is brittle. 3 The code added by that commit to solenv/gbuild/Rdb.mk codified the knowledge (for gb_Rdb__URECOMPONENTS) that there is an Rdb_ure/services, which is brittle. 4 Introducing an --enable-services-rdb-from-build option needlessly provided two different ways how the content of Rdb_services is assembled. The changes done here would leave --enable-services-rdb-from-build as a misnomer, as it no longer controls how Rdb_services is assembled. I thus renamed it to --enable-customtarget-components, as that is apparently what it still does now. Change-Id: Ia5e8df4b640146c77421fcec6daa11a9cd260265 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126577 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-11-17tdf#143971 Removes pop-up dialog for read-only documentsMatt K
No longer does the user get a pop-up dialog when opening documents that are read-only, asking whether they want to be notified when the document becomes editable. The change removes some of the functionality introduced in commit 95eb088802562b75f8b299908160145c7e88d763 "tdf#47065 Add new file open UI options and implement a new thread". Change-Id: Ic25e8e293e7224fb5086249a9d4814914fa961d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125340 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-31Prepare for removal of non-const operator[] from Sequence in uuiMike Kaganski
Change-Id: I3b4ddb7c371c5a01c561e4b45f3c181b5d9e2a11 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124409 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-14Directly initialize vectors in uuiJulien Nabet
Change-Id: Ifca1362d8ee97640b31ce75b3dc8e819fe32588d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123567 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-14Avoid COW overhead using css::uno::SequenceMike Kaganski
The scenarios are: 1. Calling sequence's begin() and end() in pairs to pass to algorithms (both calls use getArray(), which does the COW checks) 2. In addition to #1, calling end() again when checking result of find algorithms, and/or begin() to calculate result's distance 3. Using non-const sequences in range-based for loops, which internally do #1 4. Assigning sequence to another sequence variable, and then modifying one of them In many cases, the sequences could be made const, or treated as const for the purposes of the algorithms (using std::as_const, std::cbegin, and std::cend). Where algorithm modifies the sequence, it was changed to only call getArray() once. For that, css::uno::toNonConstRange was introduced, which returns a struct (sublclass of std::pair) with two iterators [begin, end], that are calculated using one call to begin() and one call to getLength(). To handle #4, css::uno::Sequence::swap was introduced, that swaps the internal pointer to uno_Sequence. So when a local Sequence variable should be assigned to another variable, and the latter will be modified further, it's now possible to use swap instead, so the two sequences are kept independent. The modified places were found by temporarily removing non-const end(). Change-Id: I8fe2787f200eecb70744e8b77fbdf7a49653f628 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123542 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>