summaryrefslogtreecommitdiff
path: root/sfx2
AgeCommit message (Collapse)Author
2022-05-31these can be stack allocatedNoel Grandin
Change-Id: Idd2e5e49ba4fcef2e80fd9c569f374a6a69f380e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135175 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-28use the new SfxWhichIter::GetItemState featureNoel Grandin
to speed up other places that are iterating over SfxItemSets Change-Id: I646bae12420d15e67effdd279e071cdf8a8afffd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135075 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-27tdf#149170 framework,sfx2: don't add ReadOnly=falseMichael Stahl
There is a non-obvious difference in error handling when opening the file read/write for type-detection fails in utl::MediaDescriptor::impl_openStreamWithURL() - if ReadOnly=false is given, it will abort the file loading, whereas without any ReadOnly it will fall-back to a read-only opening of the file for type detection. At this point a StillReadWriteInteraction is used, so the user is never notified of the failure. (regression from commit 404c51f3664ffd4f7e2c1c8bb8a12ac70954fec2) Change-Id: I8c06fe23cc0bc0767df83f680a1a59e3700bbbbb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135045 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-05-25directly instantiate IndexedPropertyValuesContainerNoel Grandin
without the overhead of the UNO service engine Change-Id: I4a02fda2b3c92a897634374bf72cfffee4f531f8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134923 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-25Resolves tdf#119447 - Improve sidebar height in start centerHeiko Tietze
Reduced the font size multiplier from 1.4 to 1.2 to fit the window into 768px height and added the branding image to the height calculation Change-Id: I05473155f0068880298a461fe8491468b07079b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134867 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2022-05-24tdf#149170 sfx2: store IsOriginallyLoadedReadOnly() for recent filesMichael Stahl
This flag stores the user's intent. (regression from commit 404c51f3664ffd4f7e2c1c8bb8a12ac70954fec2) Change-Id: I825eaf1323b613e131d058cb9b9ab86363d5f694 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134880 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-05-24Use o3tl::make_unsigned in some placesStephan Bergmann
...where a signed and an unsigned value are compared, and the signed value has just been proven to be non-negative here Change-Id: I20600d61a5d59d739bc1bee838c0038e4611aec2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134875 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-24Resolves tdf#148815 - Make SAL_NO_QUERYSAVE work for SID_RELOADHeiko Tietze
Change-Id: Ic23fd7294d1ec8b06f415ea6744190cf2ffe3ae2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134858 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2022-05-23use std::move to avoid some object allocationNoel Grandin
Change-Id: Id37b54810e7755bd7a4e354c777e0cfdf069080f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134801 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-22tdf#84502 related: Show keyboard shortcut in sidebar tab bar tab buttonJim Raykowski
tooltip Change-Id: Ia0d48ac437c6a18c4e1624dd9b154ee7a8514f1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134594 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2022-05-21cheaper to check for null return rather than catch exceptionNoel Grandin
Change-Id: Ifdbcbacc3d1340c77529ccacf4aaebf3dd250350 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134698 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-21cheaper to loop over Sequence than construct SequenceAsHashMapNoel Grandin
Change-Id: Idbf9a104677bd0934e56803d96e233f52fc763e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134700 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-20new loplugin:unnecessary lockingNoel Grandin
off by default, since each warning needs careful inspection Change-Id: I805c1d1cdde531a1afdc76e87b22f879fc3c9753 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134641 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-20sfx2: use natural string sort for sorting in object inspectorTomaž Vajngerl
Use a natural string sort for all strings in the object inspector tree view. This is more useful for properties as those can have indices, which are shown as numbers, so having them in natural order makes the tree view easier to digest. Change-Id: I7d036cd755f6595fa302c7a28a005684897f2963 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134541 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-05-19tdf#50400 show an explanatory label if ascii-only password is requiredCaolán McNamara
Change-Id: Ib0e3d07e29d56e9782b4b9d215eab4d743158a71 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134526 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-19add a static role to minlenft messageCaolán McNamara
Change-Id: I175c2f13908dd0e4fa40f73f8ef4349cfd9737d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134525 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-18resave with latest gladeCaolán McNamara
Change-Id: Ib6b221a9264d4563e0cdd41246871c7c96cc0e01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134524 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-18Related: tdf#50400 restrict "confirm" to same rules as "password"Caolán McNamara
Change-Id: Idb8946e3d737557d2c05941dcf2be001a04cca2d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134522 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-17elide some OUString allocationNoel Grandin
Change-Id: Iadd73477bf3b0edaa0fb7db10f9ffca88fe737e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134476 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-14optimise SfxFilterMatcher::GetFilterForProps a littleNoel Grandin
- avoid repeated construction of SequenceAsHashMap - avoid construction of OUString Change-Id: I62560dad26d3433e7c379669da437261b5fe0238 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134323 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-14bypass some unnecessary wrapping in Any in SfxEvents_ImplNoel Grandin
Change-Id: I96d1194253207642e7abe83b0b18c82eb3782824 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134316 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-14less OUString construction in SfxDocumentMetaDataNoel Grandin
rather than calling createFromAscii all over the places, just start out with the values as OUString Change-Id: I7f051fcf9fcbd9555462fa721c76dc867a84a706 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134279 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-13add SvStream::ReadLine(OStringBuffer... to reduce OString allocationNoel Grandin
and use it where possible Change-Id: I3efc7a642f73661ce606c917c0323ba9948521c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134265 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-12speed up simple use of NamedValueCollectionNoel Grandin
where instantiating and allocating a whole map just to extract a single key is way inefficient Change-Id: I55248bc71a9e8826cab9b76fa6916bfa888efa0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134226 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-12avoid cost of NamedValueCollection in SfxBaseModel::attachResourceNoel Grandin
which wants to construct a whole map just to extract some properties Change-Id: I79ea0e2d53c2b4aa8182b0622fe0cda2eaacef0f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134224 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-11in SetGlobalUNOConstant, only retrieve old value if we need itNoel Grandin
removes some unnecessary Find() work Change-Id: I6af9c4d9a043d4361fcca1a034b2025fe7c10c28 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134200 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-11elide temporary OUString in GetFilter4FilterNameNoel Grandin
Change-Id: Idd51eb5f86b5d8148fe31ff69e17ce2d5724e6fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134150 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-11avoid some OUString construction on some hot pathsNoel Grandin
Change-Id: I098b017d22b7a4502998a0901ddcfca08a57ee43 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134115 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-10tdf#108188, tdf#131190 - Verify that the page style is actually usedAndreas Heinisch
Change-Id: I007d26c6fcaf60d2a2378cc00e630da447f95a8a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134022 Tested-by: Andreas Heinisch <andreas.heinisch@yahoo.de> Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2022-05-10sfx2: add config warning in UndoManager complex testMichael Stahl
... and remove obsolete comment, that problem was fixed a decade ago. Change-Id: I06e122128ff009778da87891739016ecc8975895 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134110 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-05-10tdf#121740 reduce cost of SfxDocumentMetaData::InitNoel Grandin
XPath is a little heavyweight for such a simple thing. Shaves 5% off the load time for me Change-Id: I109f68fa1dfc228b42740000a95a2e7a3de7e320 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133927 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-10tdf#147590 update OLE object after document refreshJuergen Funk
Regression from b099da78a6f0b3e120f706714003b05d84d11e70 we didn't update linked OLE document after document reload Change-Id: I8e52f6430f454b276cb43449c6f7a3b0e07e909f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130692 Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> Tested-by: Jenkins
2022-05-08osl::Mutex->std::mutex in sfx2::PreventDuplicateInteractionNoel Grandin
Change-Id: I4abc1462b4d691dc699a9716573d23824897176b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134015 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-06remove unnecessary sequenceToContainerNoel Grandin
If we are not going to manipulate the resulting vector, then it is actually slower, since we have to allocate more storage for the vector Change-Id: I65677007d105f4783603df74113ebed6db0b551b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133963 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-06tdf#128744 sw DOCX: unprotect change tracking with verificationLászló Németh
Unprotect change tracking only by password verification instead of 1) unprotecting without the password or 2) rejecting the correct password. I.e. now 1) clicking on Record changes icon of Track Changes toolbar or Edit->Track Changes->Record asks for a password, and 2) Unprotect Record changes on Security page of File->Properties... accepts the correct password with disabling record changes. Show also "Invalid password!" dialog disabling Record Changes by its icon or menu option, like Properties... dialog window does, if the password is invalid. Note: Still allow to unprotect OpenDocument export of a protected OOXML import document, because that doesn't contain the original password info, only a dummy RedlinePassword. (OpenDocument exports protect Track Changes with the simple RedlineProtectionKey configuration setting, so it's not possible to map the OOXML password info to OpenDocument without extending this.) Follow-up to commit d416250f4f1766e2d596ea3feef6a94b7adf29f4 "tdf#106843 DOCX: forbid disabling protected Record Changes". See also commit bfd7730f4cf002a79dc9c02c23286850fee3f12a "tdf#89383 DOCX import: fix permission for editing". Change-Id: Iafcf4a6b551a7e8485d4311aee889c2522526d71 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133894 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2022-05-05loplugin:unusedvariableplusNoel Grandin
Change-Id: Id93086be1224b6f6bf0bdaa1d50b4f289099027e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133876 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-05use more o3tl::getTokenNoel Grandin
found by inspecting call sites of OUString::getToken Change-Id: I4269c7476c7aa46fac39528227e350568f0eb34a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132644 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-05sfx2: remove misplaced try-catchMichael Stahl
The exception is actually caught in an inner catch block; it was like this already when added in commit b4576f3da4d90139fc5140962d13cb91dab98797. Change-Id: I054c59493efe7d2d69877559b048bcf3c1f173e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133837 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-05-05use more string_viewNoel Grandin
found by examining the call sites of OString::getToken which means I needed to add a new o3tl::equalsAscii function Change-Id: I7dc0ea1cf5ce8090a708d44f2cf7c938fa200c5f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133826 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-04Just use Any ctor instead of makeAny in sfx2Stephan Bergmann
Change-Id: Ie707881d6f4cd4a2f92f4f5a89aa9e0b051db8a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133783 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-02loplugin:stringviewparamStephan Bergmann
Change-Id: I30fddefcc0dc95f98a34ca45bd667f0900ec2044 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133687 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-01lok: reset ui mode state when switch to notebookbar cancelledSzymon Kłos
We have to keep state in the register in sync with the view. When we cancelled notebookbar usage we need to revert Default state so next time we will be able to activate notebookbar. Change-Id: Ie5f7d0160c9c22c6621aca73b2cdd7197f86ff78 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133325 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133654 Tested-by: Jenkins
2022-05-01use more string_view in variousNoel Grandin
found by examining uses of OUString::copy() for likely places Change-Id: I6ff20e7b273ad6005410b82719183c1122f8c018 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133617 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-30split comphelper::string::strip functions into String and view versionNoel Grandin
which is more obvious, from the perspective of the caller, and lets us avoid creating a new String if nothing needs to be stripped Change-Id: I66a980eaf4aa818251bec49bdb16c2dddb0745e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133657 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-29use more string_view in INetURLObjectNoel Grandin
Change-Id: I4462f7cf4740fa4d1b129d76a0775f4250f41bbd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133555 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-27tdf#131760 change category of Styles commandSeth Chaiklin
"Format" -> "View" Change-Id: Ia702a28fd7eacf52bf02964e9dad7a3b69390241 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133413 Tested-by: Jenkins Reviewed-by: Seth Chaiklin <sdc.blanco@youmail.dk>
2022-04-26add o3tl::toUInt32Noel Grandin
Change-Id: I07f11bf12fbe1d1c2d812fa0965d6e632e1e1aba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133437 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-26tdf#125931: Enable sidebar in MathMike Kaganski
No panels yet, only one default deck (PropertyDeck). It is needed to have the uniform default deck like in all other modules (see commit c09f59eb6173a4a53a2d40ed80aebed18e3882ac); the panels for formula properties might appear later. Change-Id: If1785dc780111fe496638418f43e7b90a250ffce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133334 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-04-26officecfg,unotools,framework,sfx2: store ReadOnly for recent docsMichael Stahl
Add Office::Histories::HistoryItem::ReadOnly flag to configuration so that a document that was opened read-only isn't opened as editable from recent documents. Change-Id: I6985da287d3337a53a7e41e8e500421038eedb91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133385 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-04-21Drop special-casing for Chart's sidebar property deckMike Kaganski
Introduced in commit b33b2afe6a8b4224450da7c686beb81dbf5cd24a Author Markus Mohrhard <markus.mohrhard@googlemail.com> Date Thu Jul 09 20:39:06 2015 +0200 big step towards real chart sidebar later in commit da57c32c5cb27eee38e32d10232b31d459c399df Author Tor Lillqvist <tml@collabora.com> Date Fri Feb 28 17:02:30 2020 +0200 tdf#130348: Add special case for ChartDeck, too and then in commit ff23d87cb00388095a94b90e061564fc179e1823 Author Mert Tumer <mert.tumer@collabora.com> Date Fri May 08 17:23:12 2020 +0300 mobile: fix calc chart wizard properties is not shown The normal PropertyDeck can host all the chart-specific panels, and the other decks that had "all" application context, but are not needed for charts, have their context fixed. This cleanup is needed for a following introduction of sidebar in Math. Change-Id: I5bb24d52b8dec2133213d7dddfeb91359ed4cb4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133262 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>