summaryrefslogtreecommitdiff
path: root/svx/source/svdraw
AgeCommit message (Collapse)Author
2018-11-07fix compiler error: shadows a member of 'this'Marco Cecchetti
Fix an annoying bug reported by compiler (warnings as errors enabled) Moreover there are some minor change in formatting reported by clang-format commit-hook Change-Id: I148b0bc3384e9fab070bba4df5b15cbb44ece930 (cherry picked from commit e30214acc7f9d527876354200c8b9b792a323ecf)
2018-10-30Add a HAVE_FEATURE_PDFIUM conditionalTor Lillqvist
Change-Id: I7f4a34bb132141d867b028d40b100da674acaa91 Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2018-10-30Put most of this file in #if HAVE_FEATURE_PDFIUM like in masterTor Lillqvist
Change-Id: I43c6e841144b6e5f76d2c78e7b78ab41a29c20e5 Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2018-08-10tdf#118860 svx opengl: avoid SalBitmap creation without solar mutexMiklos Vajna
The bugdoc has 2 slides. When switching to the second slide, the graphic is loaded in the background, but OpenGLSalBitmap::Create() can't work correctly if the caller doesn't own the solar mutex. This already asserts in OpenGLContext::prepareForYield() in a less obvious way. Focus on the correctness, so just hold the solar mutex during the whole ImportGrpahic() call. If it turns out that the purpose of running this on a thread is to avoid synchronous network traffic, then the data could be first copied to a memory stream, and only then take the lock + import the graphic. (cherry picked from commit 919ccaba419531d689231b76a43ab29c6a9ec65a) Change-Id: I88203c12b4e7a5f2b689928c01e2ba953c5b13c5 Reviewed-on: https://gerrit.libreoffice.org/58126 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 2038ab9d4cbb7282172a65352e4ed1a852404b29)
2018-06-01svx: set the font name of imported PDF textAshod Nakashian
Change-Id: I79dde3c8983a70311de2d2a46093fac2722fb372
2018-06-01svx: update PDFium patch and codeAshod Nakashian
Change-Id: I07c6a7c65d5631b70da64927a35d7a3b371eff25
2018-06-01svx: cleanup pdfium importerAshod Nakashian
Change-Id: Id925ba7734a2c73270e40f19d3fc50552441c34e
2018-06-01svx: transform PDF text rectangles while importingAshod Nakashian
Change-Id: I7675a183bfb691a8783950f33dc34826f91cb768
2018-06-01svx: set the Model explicitly before using SDR objectsAshod Nakashian
Change-Id: I176d1c1c7f759904ab36796a47e879e45ce4a5af
2018-06-01svx: support no fill and no stroke paths in PDF importAshod Nakashian
Change-Id: Ida5daa71d469805fd52e08e804fb9fa182d7d008
2018-06-01svx: support sub-paths in PDF importAshod Nakashian
Change-Id: Ibcfd30383db6846e791aea7609ab196c4f3f2da4
2018-06-01svx: import processed PDF textAshod Nakashian
Some PDFs don't include spaces in the text. Instead, they rely on the explicit positioning of each character to render visually separated words. Latex seems to be prone to this approach, though not exclusively. Luckily, PDFium does process text and inserts "generated" spaces where necessary, which is what we retrieve and use as the text string while importing. Change-Id: Ic21fe6c8416ecaba66f06b6260f1d6b040ff12af
2018-06-01svx: correctly possition form objects from PDFAshod Nakashian
Change-Id: I7d216ca61b8a10219628877db7dd593a4987ef60
2018-06-01svx: support importing forms from PDFsAshod Nakashian
Still missing the context matrix transformations. Change-Id: Id9457c6475463127d3bc444f36fa373a6ec8fcb6
2018-06-01sd: support breaking any PDF pageAshod Nakashian
Change-Id: Ifa5f58163bef209a988fc0f88e2b609b1973e0d4
2018-06-01svx: path line width is given as full thickness in PDFAshod Nakashian
Change-Id: I728d962ea65ad1671e3b4c76034d396bee84228e
2018-06-01svx: support color text for imported PDFsAshod Nakashian
Change-Id: I01cba9456b37bd7a63c823bbe332d686f7ede389
2018-06-01svx: more accurate PDF imported text sizeAshod Nakashian
Change-Id: I22880afdd9d36d9096003d86bba15098b465e0b3
2018-06-01svx: correct the positioning of PDF Paths and the stroke widthAshod Nakashian
Change-Id: I5b150721cc1b61b028f282062c1466ef6a67fcae
2018-06-01svx: improved text importing from PDFAshod Nakashian
Change-Id: I9a2fc2c8511655c1aa362c1a03a5e82ae3ba697e
2018-06-01svx: improve path importing from PDFAshod Nakashian
Change-Id: I8e63b2a35d841e065ef32fea95c0a5f22ca6f049
2018-06-01svx: support Paths in PDFs while importingAshod Nakashian
Change-Id: Idba294cf5a3a8dd00988f94786715b110039e000
2018-06-01svx: support PDF text colorAshod Nakashian
Change-Id: I7fa675c6560504e4fc7917e19cac3cceb2700d8e
2018-06-01svx: more informative loggingAshod Nakashian
Change-Id: Ia9f2fa1fbb24ad3466bd082b778244f451c90745
2018-06-01svx: import PDF images as BGRAAshod Nakashian
This makes it trivial to support all sort of odd bit-format and 8-bit paletted images. Change-Id: I4555794eccd0ee2906f9a39bd93957ad3775432c
2018-06-01svx: refactor PDF text importingAshod Nakashian
Change-Id: Ibe8d794c1d457936c9272bb664a5478d78654dd4
2018-06-01svx: more accurate PDF text importingAshod Nakashian
Change-Id: If37119510cbc091dc86cb5f699984186167745c7
2018-06-01svx: import PDF text using PDFiumAshod Nakashian
Change-Id: I7c75477f5257931f5182b8d65e898857526bf555
2018-06-01svx: import PDF images at correct possition and scaleAshod Nakashian
Change-Id: Idb447b99143ad326294f2748f4d5154432fc328a
2018-06-01svx: import images from PDFAshod Nakashian
Change-Id: If0765aac9f47df73f1021664e13afa15ebf0f9ee
2018-06-01svx: support importing PDF imagesAshod Nakashian
Change-Id: Id4524a30b8f9fa4228c4acb4bf8714700da3017c
2018-06-01svx: support breaking PDFs imported as imagesAshod Nakashian
Change-Id: I990c2b3c3055fbffddedc407c34beb5824277b38
2018-06-01vcl: svx: preserve the imported PDF page number in GraphicAshod Nakashian
Change-Id: I1bb3fa7d44d5f92df2bb8c4ed4b85ccd984c2617
2018-06-01svx: sd: cosmeticsAshod Nakashian
Change-Id: Ic82e0b20b6e0f0ecdd308969c85c887ef84d2340
2018-06-01pdf: share pdf data in GraphicTomaž Vajngerl
(cherry picked from commit e3b59350ddceb158d01dedfe368bb600a9b37ea8) Also includes... graphic: move access to cxx for PDFData and VectorGraphicData We need strict control when PDFData and VectorGraphicData is accessed and changed, so create access methods for PDFData and move the access methods to cxx (for VectorGraphicData). Reviewed-on: https://gerrit.libreoffice.org/52395 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 18caee072ccbd2be7b947ef2659204d3c18a05f1) Change-Id: I39324a807a4db559bad5501b5913e62a0aeabf01 8146aa4e206788afff71142e1877fd7a885f4652
2018-03-25tdf#115639: Align right/center with trailing spaces the same as MS PowerPointTamás Zolnai
* Add HoriAlignIgnoreTrailingWhitespace compatibility option. ** For MSO file formats it is set to true ** For ODP format it's set to false by default ** The flag is saved to ODP format as user data if the document comes from an MSO format. Reviewed-on: https://gerrit.libreoffice.org/49889 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 1da3a3cb74a415a76fa547ef0c8f61780e260e7f) Change-Id: Ie22233d33a25e605de46120bfc2195038dffd63c
2018-03-25PPTX export scale for TextFitToSizeSzymon Kłos
MSO requires to save fontScale attribute to have all the text shown properly (with FitToSize property) Values are approximated, after any modification in MSO scale is recalculated. Change-Id: I73657fdd663b540b436747cfeeef3c76e8fe388c Reviewed-on: https://gerrit.libreoffice.org/49742 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> (cherry picked from commit 2c2919cb591d88b11bb2e25e45d6f75923821457)
2018-03-19Bin mysterious pointless '// HACK' commentTor Lillqvist
Change-Id: I40509707bd98be6891f4158428163fa722c6e4d3 (cherry picked from commit 8ab6440cf04c6d8412bf0f6850e6f12aee38966a)
2018-03-19Get rid of a dynamic_castTor Lillqvist
Add a virtual member function instead. This improves performance a bit. The time to load a specific pathological customer document dropped from 1min 53s to 1min 47s on my machine. Not hugely, but clearly. Change-Id: I1e59d601e9d0e14b6a756c6e0ad29ce2a1fce66d Reviewed-on: https://gerrit.libreoffice.org/46791 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> (cherry picked from commit fdbd3ac1880b3943e2cff48ecfb95dd088210d09)
2018-03-19lokit: add .uno:DocumentRepair commandHenry Castro
Change-Id: I5b13ea6f4785bc91c29111fa63c4a1b0ea9b2660 Reviewed-on: https://gerrit.libreoffice.org/38908 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Henry Castro <hcastro@collabora.com> (cherry picked from commit 6fd6e3c1d36d67002967f56e47255e360f4b08c1)
2018-02-28tdf#79546: Make sure temp copy of inserted media file keeps the same extensionTor Lillqvist
Inserting videos into Impress presentations with 'Insert>Audio or Video' did not work at all for me. This helps. It seems that the AVFoundation APIs are sadly rather picky about file name extensions. Why we need to make a temporary copy of the media file (which after all can be rather large) at all, when inserting it in a slide, I don't understand. But I am not going to dig into that now. Change-Id: I43fcfb5bb3ef0a2c0f8979ac3e7c458a84f180a1 Reviewed-on: https://gerrit.libreoffice.org/50390 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com> (cherry picked from commit 1aa5a3874bf716acfbded2a09319dce5d4ce8c0d) Reviewed-on: https://gerrit.libreoffice.org/50440 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-02-19Related: tdf#114756 fix up similar casesCaolán McNamara
Change-Id: Id67ccaeda6ebff477f5d86617863280766713f24 Reviewed-on: https://gerrit.libreoffice.org/49982 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2018-02-19tdf#114756: fix connector dropdownJulien Nabet
bt: 0 0x00007fffef4738d3 in SdrEdgeKindItem::GetValueTextByPos(unsigned short) const (this=0x5555587ff770, nPos=0) at /home/julien/lo/libreoffice/svx/source/svdraw/svdattr.cxx:1307 1 0x00007fffba50f71b in SvxConnectionPage::FillTypeLB() (this=0x55555c4d2a90) at /home/julien/lo/libreoffice/cui/source/tabpages/connect.cxx:507 2 0x00007fffba50be46 in SvxConnectionPage::SvxConnectionPage(vcl::Window*, SfxItemSet const&) (this=0x55555c4d2a90, pWindow=0x55555c46cc70, rInAttrs= SfxItemSet of pool 0x555557883790 with parent 0x0 and Which ranges: [(1000, 1234), (4003, 4057)], __in_chrg=<optimized out>, __vtt_parm=<optimized out>) at /home/julien/lo/libreoffice/cui/source/tabpages/connect.cxx:98 See https://bugs.documentfoundation.org/attachment.cgi?id=139972 Change-Id: I24ba9e0140668d666da686e3f8a05587b46e923f Reviewed-on: https://gerrit.libreoffice.org/49924 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> (cherry picked from commit a2721ba03e61a476838d3c518505b05a12ad2a5b) Reviewed-on: https://gerrit.libreoffice.org/49973 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-16ofz#6311 still problems with SdrEdgeObj listening to same obj at start as endCaolán McNamara
Change-Id: Ibd80b484788779b73943b28a5f36e51ebcacec30 Reviewed-on: https://gerrit.libreoffice.org/49824 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-10tdf#51188: allow connector gluepoint undoMark Hung
It should had overwritten the connector data when the connector attach to a different glue point of the same object. Let’s always overwrite it, though it waste a little bit time. Change-Id: Ib4cc4bf105e5ef17289e027dcddd0110f7297190 Reviewed-on: https://gerrit.libreoffice.org/46559 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Hung <marklh9@gmail.com> (cherry picked from commit 4173798ef73d3fc7da8c5b8fa575a36f05cd6f83) Reviewed-on: https://gerrit.libreoffice.org/47248 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2017-12-19tdf#51188: notify that geometry has changed when dragging the connector.Mark Hung
Change-Id: I7b7cb7719c9c735eeb4f964b1ae6ce6819186aed Reviewed-on: https://gerrit.libreoffice.org/46319 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> (cherry picked from commit 98de1ed2e2c49ea52f398f666aef7480b60e4e3c) Reviewed-on: https://gerrit.libreoffice.org/46516 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2017-12-15tdf113594: marking gluepoints immediately.Mark Hung
pPV was for the parameter of MarkGluePoint that was removed in ec38966951f2, and was kept somehow and is converted to bool here. Just replace the default boolean value to false ( that means marking instead of unmarking. ) Change-Id: I4c4b9dd368537b7b90cc4effae482a7b8a41eec9 Reviewed-on: https://gerrit.libreoffice.org/46472 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit bf151f0716910b56e3538579f4af7ede8f51bbcf) Reviewed-on: https://gerrit.libreoffice.org/46497
2017-12-04Related tdf#72966 Provide replacement graphic also for metafilesSamuel Mehrbrodt
With this, SVM files are still written to ODF, but accompanied by a replacement png graphic. Change-Id: I2c949f100dd5197a10c741baa42ea740f3a1415a Reviewed-on: https://gerrit.libreoffice.org/45567 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-on: https://gerrit.libreoffice.org/45677 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-11-22Make loplugin:unnecessaryparen warn about (x) ? ... : ... after allStephan Bergmann
...which had been left out because "lots of our code uses this style, which I'm loathe to bulk-fix as yet", but now in <https://gerrit.libreoffice.org/#/c/45060/1/> "use std::unique_ptr" would have caused an otherwise innocent-looking code change to trigger a loplugin:unnecessaryparen warning for pFormat = (pGrfObj) ? ... (barring a change to ignoreAllImplicit in compilerplugins/clang/unnecessaryparen.cxx similar to that in <https://gerrit.libreoffice.org/#/c/45083/2> "Make not warning about !! in loplugin:simplifybool consistent", which should also have caused the warning to disappear for the modified code, IIUC). Change-Id: I8bff0cc11bbb839ef06d07b8d9237f150804fec2 Reviewed-on: https://gerrit.libreoffice.org/45088 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-22loplugin:flatten in svxNoel Grandin
Change-Id: Idc4d0186ecc6f0722c2b1358486a2430f037ae29 Reviewed-on: https://gerrit.libreoffice.org/45036 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>