summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2021-01-15Fix handling of the OBJECTDESCRIPTOR clipboard (pasteboard) type on macOSTor Lillqvist
This fixes a demonstrable problem, and affects only macOS. This is also on the path towards fixing https://github.com/CollaboraOnline/online/issues/849 , even if the code touched here is for macOS only. The iOS pasteboard handling code is based on the macOS one. We need the pasteboard to have the OBJECTDESCRIPTOR type as a MIME type that includes the typename attribute, because the code in sc checks for that when it decides whether it is a proper OBJECTDESCRIPTOR. Simplify the data in the flavorMap array. No need to duplicate the same MIME type string as both the pasteboard type and MIME type, for those cases where the MIME type is used diretly as pasteboard type. We also know that for those types, the MIME type might have additional parameters, so be more lenient in checking. With this change, and my recent change to sot, this now works: Start LibreOffice. Open a spreadsheet. Select a cell range. (It can include formulas.) Edit > Copy. Quit LibreOffice. Start LibreOffice again. Open a spreadsheet. Edit > Paste. You get the very same cells that you pasted as such (with relative cell addresses in formulas properly adjusted, as expected). Previously, it would paste an image of the copied cell range, which is fairly pointless. There is still lots of opportunity for cleanup in the clipboard code for macOS and iOS. It is presumably rather pointless to put images on the pasteboard in Windows bitmap format, for instance. Just PNG should be enough. No idea why the code provides the TIFF pasteboard type for images. Ditto for Windows metafiles (WMF and EMF). It is also unclear how useful the EMBED_SOURCE or LINK_SOURCE types are on macOS, for instance. Change-Id: I573648480b03972b506203b4f470d513bcb81212 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109297 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-01-15OUString::matchAsciiL() can be used instead of the fresh startsWithAsciiL()Tor Lillqvist
Revert the addition of the latter. Change-Id: I93636a901cde401b0b7d923e052887f57dd58212 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109315 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-01-15pdfium: add wrapper for FPDF_FILLMODE_* definesMiklos Vajna
Which is, I think, the last direct pdfium usage outside vcl. Change-Id: I2e435e5a3669c6163bf2c20bc6d1d8bd4c88cecd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109314 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-01-15Use value comparison hereMike Kaganski
This was always comparing pointers, ever since commit cb07ed8c74d71de9ef512c7a3568c7ee85585cef. They could only happen to be not different if they are both nullptr. But the uses of the function seem to expect value comparison (see SdrObjEditView::ImpChainingEventHdl, SdrObjEditView::SdrEndTextEdit). Change-Id: I2265dc8f0f7e4441940f8e19ec0b016b5f78e812 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109284 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-01-14cid#1471346 Uncaught exceptionCaolán McNamara
Change-Id: I535affd6597636aa32e1cf9c6005238f9503ef6b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109266 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-14Introduce startsWithAsciiL() to match endsWithAsciiL()Tor Lillqvist
Will be used in an upcoming change. Unit test included. Change-Id: I777a755cab543ea277b84fb5ad021d0b91725764 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109264 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-01-14Make lambda auto parameters explicitly constMike Kaganski
Change-Id: Ie8fe7738476f31ea3670987842f552782e9624da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109273 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-01-14tdf#133858 reduce the double-ref range to data contentDennis Francis
in certain matrix formulas like SUM(IF(A1=G:G, H:H)*B1/B2) where whole columns are used for comparison in the condition of IF ultimately followed by a reducer like SUM. In such cases we can safely reduce the double-refs involved in the comparison to the sheet area where there is data before converting the data to ScMatrix. This is a more restricted version of Noel's fix in 37ffe509ef011357123642577c04ff296d59ce68 Change-Id: I1c2e8985adedb3f4c4648f541fb0e8e7d0fae033 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109050 Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> (cherry picked from commit 65167a9265acfea04733b5ff6ee3220a9da624f4) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109118 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2021-01-14Make Fontwork gallery dialog asyncSzymon Kłos
Change-Id: I156dc1b505b01dc7520ccfe80bbf97eba881d653 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109092 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109258 Tested-by: Jenkins
2021-01-14jsdialog: execute IconView actionsSzymon Kłos
Change-Id: If94df547096a5adb15ace432695f91ee7e879bb6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109078 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109257 Tested-by: Jenkins
2021-01-14UITest: add IconViewSzymon Kłos
Change-Id: I6971d73e65f0a1f60203ea1010ed8ad3ba176755 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109243 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2021-01-14Fontwork dialog: use iconviewSzymon Kłos
Change-Id: I5bb35407ca83c9b0cda6f6355e6e25c21fecb459 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108960 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109181 Tested-by: Szymon Kłos <szymon.klos@collabora.com>
2021-01-14pdfium: add an FPDFPageObj_GetStrokeWidth() wrapperMiklos Vajna
Change-Id: If411b788b3ea07c29377e01052ee6a48893ca482 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109250 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-01-14tdf#138843 Show image file type inside image properties dialogshubham656
Change-Id: I77adc9c3cc9d3bd62f0f67345b7a025bcad2352a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108361 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-01-13Simplify comphelper::ContainerUniquePtrEqualsMike Kaganski
Change-Id: I93ac0a1879559aad146b9b846ba33a18467afb95 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109126 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-01-13SfxPoolItem: introduce StaticWhichCast and DynamicWhichCastBjoern Michaelsen
- at least in Writer it is a common pattern to switch case on a Which and then static_cast the SfxPoolItem to the assumed "right" type - instead, it would much less errorprone to use the TypedWhichId to be sure to cast to the right, matching type for an id - also, this allow to assert the dynamic_cast in debug build to highlight type confusion - finally, there is some example use added in sw showing how it gets rid of explicit manual lookup of the type to cast to - likely, many of the static_cast<TypedWhichId>(SfxPoolItem*) can be found and replaced with a compiler plugin. This is left as an exercise to the reader. - alternatively, this might be a nice easy EasyHack to start .... Change-Id: I00110c0fe25626bc89d835e3c4e7ff75839756b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109042 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2021-01-13Revert to use of delegating ctorMike Kaganski
... which was there prior to f3b52717e85621d3b4ee1c6d69700e2a0cca8efc Change-Id: I00d064feae0fff8ff88bb90cd0d60961a0c8ae4a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109122 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Dante DM <dante19031999@gmail.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2021-01-13transparency->alpha in GraphicAttrNoel
Change-Id: I1fe9311871724ff8b7b8960f5dba6e890198565c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109211 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-13devtools: move DevelopmentToolChildWindow to its own fileTomaž Vajngerl
Change-Id: I12326479afb5756729b62ff3676f995d16f64aa0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109045 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-01-13devtools: Add left-side tree of the document modelTomaž Vajngerl
This adds the graoundwork for displaying the DOM of the current document as a left-side tree and implements filling in the paragraphs for Writer. The content of the DOM tree is of course a WIP. Change-Id: I99c75b0c46d9a6a4ca398c46de0af759d459b7f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108976 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-01-13devtools: Add treeview with content of current objectTomaž Vajngerl
Change-Id: I8d6dd035e60a7521c404e23045fade7eae47fc6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108975 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-01-13vcl: migrate OutputDevice::SetGrayscaleColors() to Gradient::MakeGrayscale()Chris Sherlock
Change-Id: I125ad3db3ee30833022113da5d78dcf81d0f7edc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108374 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-01-13Revert "jsdialog: disable idle notify"Szymon Kłos
This reverts commit 71ec214d7583f637fefcb5eca13c637cc6b38029. and partially 54b5e6b4e083ce7a71e16ef622753898f38dc8ab freeze/thaw functionality was added so no longer needed. Change-Id: Iee29fa79bcebfd409fd3cea4f11cb1d48053daa6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108509 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2021-01-13devtools: Add selection change listener to DevToolsTomaž Vajngerl
Selection listener is needed so it is possible to react when the selection changes in the document. Change-Id: I94e9da06b3ceedbad13dd203f690037f3eafdb13 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108259 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-01-13Missing include (for std::min)Stephan Bergmann
Change-Id: I44eebee0149d7e890aeff715dd7ae0005c45378d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109179 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-01-13vcl: use BinaryDataContianer in VectorGraphicDataTomaž Vajngerl
This change is needed so we can use the same data in GfxLink and in VectorGraphicData. Currently the data needed to be duplicated, which is less than ideal. Change-Id: I79419921d09681fa8f0b1ac4bf8ea84199d4aae6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108440 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-01-12transparency->alpha in tools::ColorNoel
this just changes the Get/Set methods, the constructor and internal representation of Color is not changed. Change-Id: Idb6e07cc08bbaa5bd55b6bd4b585e648aef507b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109074 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-12jsdialog: make Data field dialog workingSzymon Kłos
Change-Id: Iae4ec2b585272fb09253b6e05ac2a59da2219fd7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107777 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109098 Tested-by: Szymon Kłos <szymon.klos@collabora.com>
2021-01-12loplugin:noexceptmoveStephan Bergmann
...since 80497c7d81af36f703d122ac78baa26387a5854d "vcl: implement BinaryDataContainer copy, move + test" Change-Id: Ifb9fb074d3263686ec498ef889c25f24dd4a4013 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109095 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-01-12Revert "WIN replace clipboard update thread with Idle" et alStephan Bergmann
This reverts commit 9617bc9544cd569066ff187c3672a87fe28fe17f "WIN replace clipboard update thread with Idle" plus follow-up commits f5ab8bcbfd20ecce4a358f62ee3f81b8b968a5de "WIN don't notify clipboard change with SolarMutex" and c921f9bd64187823af2356d7a8ceb77444c17219 "Release solar mutex before using an apartment-threaded COM object". The Gerrit Jenkins Windows builds had started to abort after timeout for almost all builds now. Going back to before the youngest of the above three commits, c921f9bd64187823af2356d7a8ceb77444c17219 "Release solar mutex before using an apartment-threaded COM object" did not improve things (see the <https://gerrit.libreoffice.org/c/core/+/109100> "Test build #1, DO NOT SUBMIT" chain, where three out of three of the Gerrit Jenkins Windows builds timed out). But going back to before the oldest of the above three commits, 9617bc9544cd569066ff187c3672a87fe28fe17f "WIN replace clipboard update thread with Idle", does look promising (see the <https://gerrit.libreoffice.org/c/core/+/109155> "Test build #7, DO NOT SUBMIT" chain, where three out of three of the Gerrit Jenkins Windows builds succeeded). So the hope is that reverting all three commits brings back a green master, allowing us to understand and fix the actual issue later. Change-Id: Ie83ba742f216396b49f561d19c2cda7758740502 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109158 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-01-11xmloff: "form:datasource" vs. "db:data-source"Michael Stahl
Recently xmloff started to use XML_DATASOURCE for "form:datasource" but it actually means "data-source". Add XML_DATA_SOURCE and use it for "db:data-source". (regression from 3de38e95561ab7ca114d9f3307702ba89c4e3e9a) Change-Id: I893efd3fb0fb7c19ae998442459bf36cb1da0b20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109019 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-01-10vcl: implement BinaryDataContainer copy, move + testTomaž Vajngerl
Also remove constructor that takes size only - BinaryDataContainer should always be constructed with data, that is copied into the container and should be immutable. Change-Id: Ic61b393b7729b948843bd20e6676c9290c68936f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108439 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-01-10remove some old debugging codeNoel Grandin
Change-Id: Idd88e4dcc920d7dd198545e519d7860e59762bcd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109048 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-09fix coverity parse errorsCaolán McNamara
Change-Id: I3a1179947704452e3ffec02be59d0f7bf0b75ab0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109017 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-09AccessibleShapeTreeInfo needs a vcl::WindowNoel Grandin
no point in passing an OutputDevice there Change-Id: I6da9b29a0e6f57ad6a8ebcb6113987ee25419483 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108988 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-09devtools: Implement development tools docking windowTomaž Vajngerl
Change-Id: Id3b8f424e24bac5164b8b3069580ffee65dd265c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107993 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-01-09sfx2: organize forward class declarations in objsh.hxxTomaž Vajngerl
Change-Id: I5e21010d540eaa6be2f75ef1a43b29d8ac75e32f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108258 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-01-09vcl: remove "path" attribute from VectorGraphicDataTomaž Vajngerl
This isn't used for anything important for the vector graphic and is mostly empty string anyways. Change-Id: I1c5b52b5b407bd320cb5053141f1699971607399 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108438 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-01-08Introduce Color::IsFullyTransparentNoel
Change-Id: I94875b9fb7ee18edf63ed28902da4ae77eb14bb0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108973 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-08use more IsTransparentNoel
Change-Id: Ice7904f2531dba98101c5f7a05d14702fa897053 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108971 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-08Remove BitmapColor::GetAlphaNoel
since its implementation is completely wrong - alpha and transparency are not the same thing, they are inverses of each other. Change-Id: Id9e00b8296391befd471345b6c86e0493a9e3f3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108964 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-08opacity->alpha in BPixelNoel
They are basically the same thing, but alpha is the preferred term these days. Also improve the mixing algorithm, 1 - opacity is 255 - opacity not 256 - opacity since the range of sal_uInt8 is 0..255 Change-Id: I8788ac79285ab25c8d322b05817dffd3745fd699 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108963 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-08lok: send chart line width updatesSzymon Kłos
Change-Id: I4c9c4a977df12a1cefb81cfbcac73b61ff26e488 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108843 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108966 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2021-01-08vcl: move ImplPrintTransparent() from OutputDevice to PrinterChris Sherlock
Change-Id: I6950bdca72b93b34621e0b108c2c8060c59d98d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108247 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-08use more IsTransparentNoel Grandin
Change-Id: I3ef18a2601a51d56614b5da9b56e871bd33ec79e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108942 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-08pdfium: add wrapper for FPDF_TEXTRENDERMODE_* definesMiklos Vajna
Change-Id: I85fe128f0b86d1e308727f7cc0f803d62c6ba48d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108952 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-01-08vcl: migrate OutputDevice::DrawShadowBitmapEx() to BitmapShadowFilterChris Sherlock
Change-Id: I5d8b92d91530feed92dcdf2e384448b05eebdb0f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108315 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-07pdfium: rework to eliminate FPDF_ANNOTATION from the public interfaceMiklos Vajna
Change-Id: Ib11213f0307cd215b71e3da08468be6e82e2eb55 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108914 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-01-06remove support for deprecated GtkAlignmentCaolán McNamara
Change-Id: I29e21e9e4d9b80b8c8e331ed9cce76b2e7fe0f68 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108689 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-06Drop comphelper::string::equals; compare OUString to OUStringCharMike Kaganski
In cui/source/tabpages/autocdlg.cxx, use code point-based methods for comparison with sal_UCS4 values in SvxSwAutoFormatFlags. Change-Id: If34c981393774d1b8db649f0c29870e1ca6bdfe8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108847 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>