summaryrefslogtreecommitdiff
path: root/sot
AgeCommit message (Collapse)AuthorFilesLines
2021-01-15Make SotExchange::GetFormat() accept a MIME type with additional parametersTor Lillqvist1-1/+7
For instance, if SotExchange::GetFormat() is passed a flavor with MIME type "application/x-openoffice-objectdescriptor-xml;windows_formatname=\"Star Object Descriptor (XML)\";typename=\"LibreOffice 7.2 Spreadsheet\"" we do want to recognize it as SotClipboardFormatId::OBJECTDESCRIPTOR, even if the MIME type in the entry for it in the array in ImplFormatArray_Impl only has the windows_formatname parameter. This is part of fixing https://github.com/CollaboraOnline/online/issues/849, but it will help for corresponding problems with LibreOffice on macOS, too. Note that on Linux, SotExchange::GetFormat() gets called with a flavor with a MIME type that does *not* have all the extra parameters (classname, typename, displayname, viewaspect, width, height, posx, posy) (See the GitHub issue mentioned above.) This change does not remove any checks for classname, typename, etc. There are/were no such checks in SotExchange::GetFormat(). But, in the (much different) code path for macOS (and iOS), with my work in process in vcl, SotExchange::GetFormat() gets called with a flavor with a MIME type that *does* contain those extra parameters. I don't see the point in introducing checks of the "sanity" of those into SotExchange::GetFormat(). (In this branch, already contains the add-on fix to use the existing OUString::matchAsciiL() instead of requiring a new OUString::startsWithAsciiL().) Change-Id: Ie65ed1ab922cdaa6557eb65d980b9e886d3c6971 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109254 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109352 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2019-11-03loplugin:stringaddNoel Grandin1-6/+3
tweak the plugin to be more permissive, then validate by hand afterwards Change-Id: I40c5c911fe6ff7e45baaca372abf7dac211d9654 Reviewed-on: https://gerrit.libreoffice.org/81942 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-28loplugin:stringadd improve detectionNoel Grandin1-6/+4
if one side of the expression is a compile-time-constant, we don't need to worry about side-effects on the other side Change-Id: Iee71ea51b327ef244bf39f128f921ac325d74e2b Reviewed-on: https://gerrit.libreoffice.org/81589 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-18make bin/update_pch.s always include code in trivial #if'sLuboš Luňák1-16/+5
E.g. #ifdef LIBO_INTERNAL_ONLY is always true for code that builds with our PCHs. Change-Id: I3cf311ea3621b909105754cfea2cb0116b8b67f5 Reviewed-on: https://gerrit.libreoffice.org/80961 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-10-17ofz#18280 remove LinkedFile supportCaolán McNamara2-51/+6
The code to create these "linked files" added by: commit 6f2f7e3091504e8e58d9be603ed3739f6f2cd68e Author: Mathias Bauer <mba@openoffice.org> Date: Fri Jul 6 14:03:59 2001 +0000 #89377#: new StorageMode for creating unpacked files use of creating them then introduced in: commit 53fe2691a3fb65110e7f5aee2919f7d8d559ff02 Author: Mathias Bauer <mba@openoffice.org> Date: Fri Jul 6 13:55:57 2001 +0000 #88062#: some optimizations that use then commented out in: commit 762dd2b15bfd201b2271b460efa72a5b68d6fb2a Author: Kurt Zenker <kz@openoffice.org> Date: Mon Oct 4 19:53:11 2004 +0000 and the unused code to create them removed in: commit 8a91528a3e03fe6e2923c33327b687ecf57adb0b Author: Stephan Bergmann <sbergman@redhat.com> Date: Thu May 7 10:37:27 2015 +0200 StorageMode::CreateUnpacked is never used It seems to me that there is no need to keep support for reading them as they seem to have been temporary files rather than something still existant Change-Id: I783cae63dc078a7e843729d3ca13f45c18168f4c Reviewed-on: https://gerrit.libreoffice.org/80943 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-17Remove some memset callsMike Kaganski4-12/+6
Replace them with default initialization or calloc Change-Id: I747f53c2ced2d0473fd5a5ede4f8520a0633dcc1 Reviewed-on: https://gerrit.libreoffice.org/80805 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-10convert WriteCharPtr..getStr to WriteOStringNoel Grandin2-2/+2
and improve the WriteOString method, we can avoid the strlen here, we already have the length One change in behaviour to be noted - if the string contains trailing zero bytes, which ARE INCLUDED IN THE STRING LENGTH, i.e. I'm not talking about the normal terminating zero, then this patch changes behaviour because we will now write those zeros to the stream. Change-Id: I4668b9b9eb877f820b1dc70d6cd10ba2623bc0a2 Reviewed-on: https://gerrit.libreoffice.org/80597 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-01loplugin:stringadd n sfx2..svlNoel Grandin1-17/+6
Change-Id: Iaf1bbe37449d4e0cfa817909d56d4bffe1e5a184 Reviewed-on: https://gerrit.libreoffice.org/79893 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-27tdf#116685: Make the RICHTEXT take precedence over EMBED_SOURCE.Jan Holesovsky1-0/+1
Before this patch, copy in Calc, Paste in Writer produced an embedded sheet. I suspect is it not what the people usually want; working with the embedded sheets in Writer is non-intuitive, I suspect people will be happier with a normal table which they can style etc. appropriately. OTOH - this is a general change, so it might have some unwanted side-effects; let's see what if we get bugreports :-) tdf#127673 was related; but in my view, we shouldn't create the embedded objects in the first place. Change-Id: I73710168d8924fdd6275d65e20cf55f38971a3f9 Reviewed-on: https://gerrit.libreoffice.org/79606 Tested-by: Jenkins Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2019-09-23do not require $(SRCDIR) in every gb_Library_set_precompiled_headerLuboš Luňák1-1/+1
Change-Id: I7b3a22584bb2e4d501f509ffcd80929feed23a4c Reviewed-on: https://gerrit.libreoffice.org/79360 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-09-01Fix '..'Andrea Gelmini1-1/+1
To complete this: https://gerrit.libreoffice.org/#/c/78312/ This is a massive replace for ".." instead of "..." between words. It passed "make check" on Linux. Change-Id: I144d8061fca9f545c762941551e59dffdd3650e8 Reviewed-on: https://gerrit.libreoffice.org/78357 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2019-08-20loplugin:constvars in solenv..svtoolsNoel Grandin1-1/+1
Change-Id: Ieb0116321bbddd804db6d1789ea3521c5b220840 Reviewed-on: https://gerrit.libreoffice.org/77807 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-15loplugin:sequenceloop in shell..sotNoel Grandin2-2/+2
Change-Id: I40e2a1be0ce7df627d3820192d24821ddd7c3e2f Reviewed-on: https://gerrit.libreoffice.org/77527 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-12Fix typosAndrea Gelmini1-2/+2
Change-Id: Ia44a9dd214b5b09ed6f9c39b8057c41ae03897f1 Reviewed-on: https://gerrit.libreoffice.org/77285 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-31Improved loplugin:stringconstant (now that GCC 7 supports it): sotStephan Bergmann1-1/+1
Change-Id: If50079060effe857d5c4659a82c827ce16548c46 Reviewed-on: https://gerrit.libreoffice.org/76646 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-22Simplify Sequence iterations in shell..svgioArkadiy Illarionov2-12/+8
Use range-based loops, STL and comphelper functions Change-Id: I612d36abcc09a91c60f7212de6747a1a1bdcfc69 Reviewed-on: https://gerrit.libreoffice.org/76056 Tested-by: Jenkins Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
2019-07-21loplugin:referencecasting in variousNoel Grandin1-2/+1
Change-Id: Id4e3d9d1bbfd47181299568afec45e996eb1eed5 Reviewed-on: https://gerrit.libreoffice.org/76071 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-21Fix typoAndrea Gelmini1-1/+1
"an OLE", to complete: https://gerrit.libreoffice.org/#/c/75983/ Change-Id: Idd5b9286348b4fa1e3382983c72b010654a1f4c2 Reviewed-on: https://gerrit.libreoffice.org/76038 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2019-06-21Extend INetURLObject::setName and drop INetURLObject::SetNameMike Kaganski1-1/+1
Change-Id: I488313eeb363d2a9344d6bc801900d5b1f913020 Reviewed-on: https://gerrit.libreoffice.org/74463 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-06-17Fix typoAndrea Gelmini1-1/+1
Change-Id: Ia129c401366d63a588875a84fc7a7cc46f299fba Reviewed-on: https://gerrit.libreoffice.org/74174 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-06-17loplugin:logexceptionnicely in shell..sotNoel Grandin2-8/+10
Change-Id: I2ae0c0ac06f32ef91951aa4f7c98b5706178f841 Reviewed-on: https://gerrit.libreoffice.org/74115 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-28tdf#42949 Fix IWYU warnings in sot/Gabor Kelemen22-60/+32
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I202a98d76a37a564315374893b44ec25ef7798b3 Reviewed-on: https://gerrit.libreoffice.org/73005 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2019-05-09regenerate PCH headers for the 4 new levelsLuboš Luňák1-12/+9
Plus some build fixes triggered by this. Change-Id: I59b21def706598ceffd45ae5b1f0262ec9c1ad50 Reviewed-on: https://gerrit.libreoffice.org/71581 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-04-26cleanup files in SOT, not changeTomaž Vajngerl2-31/+14
Change-Id: Ie3a2390a40214e61b05a57ebd5fbfa5f49a5e1fd Reviewed-on: https://gerrit.libreoffice.org/71351 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-04-26tdf#118977 support PDF documents as a clipboard formatTomaž Vajngerl2-1/+21
On macOS it is possible to copy from a PDF a subset of a document, which will be transported as a new PDF document containing the subset. LibreOffice didn't support PDF as a valid clipboard format and previously it also didn't support showing PDFs inside the document, so in such cases it copy-pasted a low resolution bitmap. The result wasn't good. As we are now able to display PDF documents as Graphic in LO, we can also support this use-case. This adds support for the PDF documents as a clipboard format in general and to the macOS backend. This commit only adds support for Writer. Change-Id: Ib982b55391b390ae06974b4ad836e376dd722a4c Reviewed-on: https://gerrit.libreoffice.org/71364 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-04-08Use osl_atomic_increment/osl_atomic_decrement to change m_refCountMike Kaganski1-1/+1
Change-Id: Ia24441d3671102fdeeb797547396c25ee2a6ffd3 Reviewed-on: https://gerrit.libreoffice.org/70382 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-03-08new loplugin constvarsNoel Grandin1-1/+1
detect static variables that can be made const. Thanks to mike kaganski for suggesting this. Here I introduce a new plugin feature - using markers in nearby comments to disable the plugin for specific vars. Some of this stuff was old debugging code. I removed the stuff that was older than 5 years. Change-Id: I6ec7742a7fdadf28fd128b592fcdf6da8257585c Reviewed-on: https://gerrit.libreoffice.org/68807 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-22loplugin:unusedfields in sotNoel Grandin4-28/+3
and simplify, the ErrorLink functionality in StgIo is actually unused Change-Id: I6fb73ebebce2e1b144bd7a75d37323299fd73581 Reviewed-on: https://gerrit.libreoffice.org/68200 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-10loplugin:indentation in soltools..svlNoel Grandin3-13/+13
Change-Id: I270a12cdb68920b8fa23b82dd933724e30334485 Reviewed-on: https://gerrit.libreoffice.org/67565 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-05loplugin:flatten in sotNoel Grandin5-163/+162
Change-Id: I66ca5113054862f1549a3d7c27da70cf4f5fc308 Reviewed-on: https://gerrit.libreoffice.org/67403 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-05remove unused SotExchangeActionFlags enum valuesNoel Grandin1-125/+125
Change-Id: Iba1e8f24d3ea8f2dbdab0e48b04c7ae57c9c6c8f Reviewed-on: https://gerrit.libreoffice.org/64570 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-05use unique_ptr in UCBStorage_ImplNoel Grandin1-16/+11
Change-Id: Iec07d23087dafd34a6c777a7c1825ebc9cbe7858 Reviewed-on: https://gerrit.libreoffice.org/64525 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-05use unique_ptr in OLESimpleStorageNoel Grandin2-30/+20
Change-Id: I5ef95846640efac00055336435356efdd0a8326d Reviewed-on: https://gerrit.libreoffice.org/64524 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-29Simplify containers iterations in slideshow, sot, starmath, stocArkadiy Illarionov3-37/+21
Use range-based loop or replace with STL functions Change-Id: I94792c28b283a0998bf813317e5beb37d93e0c23 Reviewed-on: https://gerrit.libreoffice.org/64125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-19loplugin:constantparamNoel Grandin1-1/+1
Change-Id: Ifc2a8db82bd8bb508bce7f226e2cb499d1e6f6f8 Reviewed-on: https://gerrit.libreoffice.org/63492 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-16loplugin:staticmethods improvementNoel Grandin2-8/+8
Change-Id: I8889ce8a7d2309b54454cfe4c6421282e1c6e755 Reviewed-on: https://gerrit.libreoffice.org/63434 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-12Fix typosAndrea Gelmini1-1/+1
Change-Id: Ibb94b2b16afbcca84dd55ae51fde6fd27afede3a Reviewed-on: https://gerrit.libreoffice.org/63297 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-11-09Fix many Java subsequentcheck test by using JUHJan-Marek Glogowski1-7/+1
Splits gb_JunitTest_set_unoapi_test_class_and_jars into two separate defines as: - gb_JunitTest_use_unoapi_jars - gb_JunitTest_use_unoapi_test_class Then replaces many of the gb_JunitTest_use_jars lists with the new gb_JunitTest_use_unoapi_jars to fix the JUH dependencies. This probably adds some unneeded JUH dependencies to some Java tests, but that shouldn't be a problem. Change-Id: I0c4fce6b50f7c6eb8d62bfb2c50f056b97584794 Reviewed-on: https://gerrit.libreoffice.org/63119 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2018-11-07tdf#120657 Pie chart saved as DOC doesn't preview in MSONoel Grandin1-3/+7
regression from commit 9ec8bf8f22fe74884185492ef2576ce79b41e4f1 add SvStream::TellEnd the problem is that in this stack trace sot/source/sdstor/stgelem.hxx:130 sot/source/sdstor/stgdir.cxx:300 sot/source/sdstor/stg.cxx:245 sot/source/sdstor/storage.cxx:187 tools/source/stream/stream.cxx:1908 sw/source/filter/ww8/ww8scan.cxx:6267 The StgEntry returns a size of 0. If we do something else to the SotStorageStream first, then it materialises a temporary stream, and that stream returns a valid size. Also implement suggestions from mike kaganski: IMO, it would be more robust to implement this new function as virtual (instead of the remainingSize()), and reimplement the latter as non-virtual one using the new one and doing the necessary correction. Change-Id: Id1462d918570a684ec67099c30181436a27d3c6a Reviewed-on: https://gerrit.libreoffice.org/62984 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-07loplugin:collapseif in sdext..svxNoel Grandin2-8/+4
Change-Id: I188d9e9b53e00acfbae3c7acd54de28f084c4b3f Reviewed-on: https://gerrit.libreoffice.org/62985 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-05tdf#42949 Fix IWYU warnings in include/sot/*Gabor Kelemen3-0/+5
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ic5d0dd8c712e74825ed0d0de6bf366568ca48f25 Reviewed-on: https://gerrit.libreoffice.org/62460 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-11-04coverity#1440843 help coverity out wrt Wrapper object use after freeCaolán McNamara1-4/+3
Change-Id: I2f03cd950d37fc00ab4fe71693e717e82f242254 Reviewed-on: https://gerrit.libreoffice.org/62851 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-11-02loplugin:useuniqueptr in sotNoel Grandin4-39/+27
Change-Id: If4d093079e13cfaebb9d226e39581b0c66e82786 Reviewed-on: https://gerrit.libreoffice.org/62651 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-28tdf#119235 svx,sd: fix drag&drop from ColorBarMichael Stahl1-1/+1
This was using the SfxPoolItem serialisation of XATTR_FILL* items, where only XFillColorItem and XFillStyleItem were actually used; the binary serialisation was removed without being aware of this feature. Fix this by using uno::Any instead, rather than reviving the binary serialisation. Also change the clipboard format strings, just to be safe. (regression from 97b889b8b2b2554ce33fd6b3f0359fc18f39832d) Change-Id: I1828621a9aae606a1ca47835eef608062efe64a0 Reviewed-on: https://gerrit.libreoffice.org/62455 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Tested-by: Michael Stahl <Michael.Stahl@cib.de>
2018-10-19simplify expressionCaolán McNamara1-2/+3
Change-Id: I57c7df50040737656c2a68e5fdc0d069ad21f833 Reviewed-on: https://gerrit.libreoffice.org/61975 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-19clang-tidy readability-container-size-emptyNoel Grandin2-2/+2
Change-Id: I1df70b7dff5ebb6048f7fc618789faa15ca5d422 Reviewed-on: https://gerrit.libreoffice.org/61967 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-19clang-tidy readability-misleading-indentationNoel Grandin1-2/+2
Change-Id: I4673fc7c694924b41d048a1918ddb8b0e0af1f79 Reviewed-on: https://gerrit.libreoffice.org/61935 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-15clang-tidy misc-redundant-expressionNoel Grandin1-1/+1
Change-Id: I708b0b486a233071f95592ccdb97f27fc35a23c4 Reviewed-on: https://gerrit.libreoffice.org/61783 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-15add SvStream::TellEndNoel Grandin6-28/+12
and simplify callsites to use it instead of the current "seek to end, find pos, seek back to original pos" pattern Change-Id: Ib5828868f73c341891efc759af8bd4695ae2f33c Reviewed-on: https://gerrit.libreoffice.org/61738 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-09loplugin:constfields in smoketest..sotNoel Grandin4-11/+11
Change-Id: I59ceda8ff85cc7b348882a6e1c62491b74297801 Reviewed-on: https://gerrit.libreoffice.org/61549 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>