summaryrefslogtreecommitdiff
path: root/sfx2/source/doc
AgeCommit message (Collapse)Author
2022-03-01Recheck modules s[f-t]* with IWYUGabor Kelemen
See tdf#42949 for motivation Change-Id: I1f520aad1b1c942ad5616d96851016fc366ac58f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130203 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-03-01use SfxItemSet::GetItemIfSet in sfx2Noel Grandin
Change-Id: I241b038953f61228b6667014a4096bfe8dcc9c2d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130709 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-25renames in template manager creates xml file in wrong locationNoel Grandin
revert part of commit dd42f133f604ee2f7e0ffbca6a8d94fb8f95dfe5 Author: Noel Grandin <noelgrandin@gmail.com> Date: Mon Jan 10 19:37:05 2022 +0200 tdf#146375 Cannot rename user-defined categories in template manager specifically, revert the > Simplify the UCB usage to just write the contents of the tempfile and also call SvStream::Flush() in utl::TempFile::GetURL(), so that the data actually hits the disk, so that when UCB attempts to read the data using a separate file handle, it sees the data. (Otherwise the temporary file data only exists in the operating system buffers, and can only be read by the same file handle that created it) Change-Id: I17798c53e49d65484605f2dcd96b45babd70054d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130499 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-18Revert "Related tdf#143578 - Rename SAL_NO_QUERYSAVE to NO_QUERYSAVE"Heiko Tietze
This reverts commit 75ac604292e92dc08bb8ba5b9cc30799d643090a. Reason for revert: Decision was made to have some prefix, either SAL_ or LO_ Change-Id: I42c7ad8a8b8a83161db568895d1ec98dcdc0838f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130026 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2022-02-16Related tdf#143578 - Rename SAL_NO_QUERYSAVE to NO_QUERYSAVEHeiko Tietze
Change-Id: Iccec99ba55a1a99a71c685489890e0695a6d6d5d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129992 Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2022-02-16Resolves tdf#143578 - Environment variable SAL_NO_QUERYSAVE to not show the ↵Heiko Tietze
dialog on changes Candy for the QA team Change-Id: I00094872e0c2e6113a7136fa5fd7fd5cb91ba3ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129967 Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2022-02-10Fixed function nameAndrea Gelmini
It passed "make check" Change-Id: I0828ea2c2531cb970f32581333776f02a46a8d5e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129314 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-02-09tdf#146937 Remove "refresh" command from Template ManagerJeff Huang
Change-Id: I12b43c10cca455a6885101909327b81940dafb07 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129584 Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Tested-by: Jenkins
2022-02-06Simplify sequence in sfx2Julien Nabet
Change-Id: If7a22560280eae15dc0c82e3a4521b2c28d65e9c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129567 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-02-05lok: render image preview with lower resolutionSzymon Kłos
renderShapeSelection callback is used to render image previews which are later used during eg. rotation. Do not render preview with original size which slows down app a lot. Use 1280x720 max. Change-Id: Ia8365a67d87cea869ef74cb70ce4830439a523b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129376 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129497 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2022-02-04add toId/fromId to tidy up some ugly castingCaolán McNamara
Change-Id: I70f34ac5e9b5d2f2d6c0375e823908eaa2e540b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129487 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-01-31SID_COPY_STREAM_IF_POSSIBLE is a SfxBoolItemNoel Grandin
The cast in appuno.cxx has been wrong since this constant was introduced in commit ecccc429183b999f2e488e991ef41bbee17604b6 Author: Oliver Bolte <obo@openoffice.org> Date: Mon Mar 27 08:33:39 2006 +0000 INTEGRATION: CWS fwk36 (1.113.44); FILE MERGED 2006/03/16 15:44:13 cd 1.113.44.2: #i46895# Fixed typos 2006/03/16 14:55:24 mav 1.113.44.1: #i46895# allow to create a copy of the document if possible and I looked that cast when I added the TypedWhichId annotation. Change-Id: I1d541094e08633e5aced2423c30904506ca68368 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129202 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-24tdf#131327 Add double clicked event on auto-redact tableVerne-Lai
Change-Id: Id927244fcd7e985edadb2b9f9cfdd61ba93066e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123570 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2022-01-24jsdialog: enable Digital Signatures dialogSzymon Kłos
In LOK case run it in the readonly mode. In readonly mode we can run it asynchronously. Change-Id: I721dd14fa23d4e30255dd976e0cc2a4f30470a3b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124058 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128838 Tested-by: Jenkins
2022-01-19WASM setup as non-multiuser, desktop buildJan-Marek Glogowski
Change-Id: I2ee6e006554cf1e5e5e42c2f4f73d8788bff8f4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128585 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-01-14make comphelper::OInterfaceContainerHelper4 more threadsafeNoel Grandin
(*) make all the methods that require an external mutex take a std::unique_lock as a parameter, so that call sites cannot forget (*) make the forEach method drop the lock when firing listener methods, to reduce the odds of deadlock Change-Id: I0a80e3b3d1c1c03b7de4a658d31fcc2847690903 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128415 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-11tdf#146375 Cannot rename user-defined categories in template managerNoel Grandin
Regression from commit 3624a703361b108d22448bd60a97733f05e37820 tdf#135316 remove OTempFileService pessimisation So fix two things here (1) make it so the tempfile service flushes the SvStream buffer and resets the file position, so we can read the data after writing it. (2) Simplify the UCB usage to just write the contents of the tempfile via the tempfile InputStream, which is simpler and safer Change-Id: I15ed3b02c2d6415d10a9579f66374e6268188d5c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128195 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-10use less SvStream::Flush()Noel Grandin
Flush() turns into a sync() on the device, which is pretty slow. Most of the time all we actually want to do is to flush the internal buffers from the SvStream. So expose the FlushBuffer method and use that where possible. And also means we don't need the mbDontFlushOnClose flag on SvStream any more. Change-Id: Ibe089b88b325f0fdc565200a97ce72cd26b7fcfb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128214 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-09Simplify some TempFile service codeNoel Grandin
Change-Id: Id39be33dcc5aa9378e29c850cb71d3662093ab25 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128189 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-03osl::Mutex->std::mutex in SfxPrintHelperNoel Grandin
Change-Id: I8a88af7e177f6737e683d398531c914d1766266c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127902 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-21filter: try to detect 0-byte DOC files based on extensionMiklos Vajna
Commit ae1f51b4888a3aa14837ac6e4083f33b2176ca45 (tdf#123476 filter: try to detect 0-byte files based on extension, 2020-10-28), already implemented this UNO-based import filters, do the same for built-in filters as well. Another problem in filter/ was to pick the WW6 filter for .doc -- require export+preferred support in the filter to get WW8 instead. An additional filter that may kick in is MS Word 2003 XML: this is avoided by requiring "preferred". Change-Id: I46e280beb5341213b0fe7a09a549b52c0c1ea3f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127219 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-12-17sd theme: add a "theme" palette to the color pickerMiklos Vajna
This implements listing the current theme colors (which depend on what is the master page of the current slide) in the color picker and also allows picking those colors. The colors are picked as-is for now, not yet setting the color theme index in the document model. Change-Id: I2553725c29c2a9f9de80f86b38d22a06bf9c0364 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126994 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-12-16crashtesting: assert on 0 scaling on creating thumbnail for moz392233-9.svgCaolán McNamara
seen since: commit 1ceb4f36a7cabe7a0fb2b0c2e36079389d6a69b2 Date: Sun Dec 5 11:35:57 2021 +0100 generate a thumbnail to save without a metafile This is similar to 59cca1a28df4cdc94450d68cc1e247a8fb5ff6f3, if the wanted result is a bitmap, there's not much point first converting to metafile and then to a bitmap. Change-Id: I44bea7c8c301f12ff53295eba5be190239337ab6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126897 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-12-05increase maximum document thumbnail size from 256 to 512Luboš Luňák
It's 2021. Something's telling me people now care more about document previews not being blurry than an insignificant size increase of documents. See e.g. comments #21,#25 in the HiDPI bugreport tdf#144214. It also doesn't make much sense for the thumbnail creation to try hard to make the image smooth and then downscale it too much. Change-Id: I8df778dda05cf42cd27adf8f7757097fc7650acb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126376 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-12-05generate a thumbnail to save without a metafileLuboš Luňák
This is similar to 59cca1a28df4cdc94450d68cc1e247a8fb5ff6f3, if the wanted result is a bitmap, there's not much point first converting to metafile and then to a bitmap. Change-Id: I594e1e47bc499acf42f6a551f4114091dcf75b15 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126375 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-11-29A small simplificationMike Kaganski
Change-Id: I222cb2cfcbd9d82c78fc17936f35ced0b21691b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126089 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-29tdf#117280: fix multiple Macro execution when triggered by Document print eventJulien Nabet
Change-Id: Ibfebcc1a31464b2610afea2035e3d723a0c79167 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126018 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-28use more OInterfaceContainerHelper3 in sfx2Noel Grandin
Change-Id: Ia14f70bf4b09109e987fd7b432dcc1a5a9b10ad2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125972 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-26loplugin:stringliteraldefine in sfx2Noel Grandin
Change-Id: I45ccf6b1841024db7406b910a28dff054f67464d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125862 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-24loplugin:stringliteraldefine in comphelperNoel Grandin
Change-Id: I60ccd6049db65fef2397798ab916b0d1e24c0fdc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125531 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-23O[U]String::replaceAt overloads that take string_viewNoel Grandin
which results in lots of nice string_view improvements picked up by the plugins Change-Id: Ib0ec3887816b3d4436d003b739d9814f83e244b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125657 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-18rtl::Static->thread-safe static in sfx2Noel Grandin
Change-Id: I8074494094f561c5ff21d13c68430798dc242604 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125423 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-11-08use more OUStringLiteral in MediaDescriptorNoel Grandin
Change-Id: I0567d103db8db401c737fed98483912a39352929 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124835 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-04elide unnecessary UNO_QUERY_THROW callsNoel Grandin
Change-Id: I0d0fc57f352e9717e721416c8941cfcf48af24c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124650 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-03put the message into static_assertCaolán McNamara
and use more static_assert where its obviously possible Change-Id: I9466130809acab12505f0760f970793991564165 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124633 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-02Resolves: tdf#119206 run properties sync when launched during saveCaolán McNamara
use (abuse?) a SynchronMode of true, which will become SfxRequest::IsSynchronCall of true in SfxObjectShell::ExecFile_Impl to request that we do not want the properties dialog to be run async. It looks impractical to rearrange all the post-dialog-call close code to be part of some callback executed when the dialog completes. Change-Id: Id2bde24986204dea3d312c0b4a91bf5c0a6f7916 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124606 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-02Revert "tdf#117895: "Edit document properties before saving"..."Caolán McNamara
This reverts commit 3add3e5b70ad991c8351a54b0da62d05e977458f to try and alternative approach Change-Id: Ieb36b78246586cc7f1977c67eab130d2ae025988 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124605 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-02Revert "tdf#120343 show pdf in async pdf export dialog callback"Caolán McNamara
This reverts commit 9df8a2eb8c216b16927aac2182b881b21d8b2d14 to try an alternative approach. Change-Id: I2f1e2cd28cbaee5ab3d7a3cec808ec5bb7777cb2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124604 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-01Related: tdf#145464 pass an explicit DocFrame for SID_SIGNATURECaolán McNamara
Change-Id: I352e0d92720cd002cbe3f25d4fa0c07b69c88cf2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124535 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-01Resolves: tdf#145464 ensure the SfxViewFrame is activatedCaolán McNamara
before dispatching SID_SIGNATURE, its normally activated on getting focus, but its possible to move focus into the button of the infobar without the frame getting focus. Change-Id: Id353e23b595e14614361c0c25976c788940c67eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124534 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-10-31add o3tl::span ctor from std::vectorLuboš Luňák
Makes code simpler, and std::span can be constructed from std::vector too. Change-Id: Iae26b53c52148c19d9068a63126a7393d098d654 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124507 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Tested-by: Jenkins
2021-10-31Prepare for removal of non-const operator[] from Sequence in sfx2Mike Kaganski
Change-Id: I0cdce64983901a6cc3b50dc9873a370ff08b9eb2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124387 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-29simplify framework::TitleHelperNoel Grandin
Every callsite (bar one) calls setOwner and connectWithUntitledNumbers after construction, so just pass them in the constructor. And for that lone callsite we can just nullptr as an argument. Change-Id: If838e068bb59a407225d853a0f67983be400f2f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124426 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-29pass DX array around using o3tl::span instead of pointerNoel Grandin
so we get bounds checking in debug mode Note that I cannot just pass around the std::vectors involved because there is a place in editeng which calls with a subset of a vector. Change-Id: I5088a139593c27bf9cbe5d843ab4b0048ac6d508 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124330 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-21loplugin:flattenNoel Grandin
Change-Id: I3b4226a9d089ec9aedab95d96e50a068f57a76c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123991 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-21tdf#144650 crash after opening of read-only fileNoel Grandin
Change-Id: Ia888ae79940cbc618b2e693d0e658c152346e926 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123948 Reviewed-by: Kevin Suo <suokunlong@126.com> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2021-10-16Simplify vector initialization in sfx2Julien Nabet
Change-Id: Ibff7203a86b42c58738d8b4836a61bf1c5806962 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123698 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-15Remove non-const Sequence::begin()/end() in internal codeMike Kaganski
... to avoid hidden cost of multiple COW checks, because they call getArray() internally. This obsoletes [loplugin:sequenceloop]. Also rename toNonConstRange to asNonConstRange, to reflect that the result is a view of the sequence, not an independent object. TODO: also drop non-const operator[], but introduce operator[] in SequenceRange. Change-Id: Idd5fd7a3400fe65274d2a6343025e2ef8911635d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123518 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
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>