summaryrefslogtreecommitdiff
path: root/sd
AgeCommit message (Collapse)Author
2018-06-07sd: pdf: really share the PDF streamAshod Nakashian
Change-Id: I5b25b3532912c7982a6db9dcc80fb7a72a41af38
2018-06-07svx: import PDF text using PDFiumAshod Nakashian
Change-Id: I7c75477f5257931f5182b8d65e898857526bf555
2018-06-07svx: support breaking PDFs imported as imagesAshod Nakashian
Change-Id: I990c2b3c3055fbffddedc407c34beb5824277b38
2018-06-07vcl: svx: preserve the imported PDF page number in GraphicAshod Nakashian
Change-Id: I1bb3fa7d44d5f92df2bb8c4ed4b85ccd984c2617
2018-06-07svx: sd: cosmeticsAshod Nakashian
Change-Id: Ic82e0b20b6e0f0ecdd308969c85c887ef84d2340
2018-06-07sd: import PDFs as images using Pdfium new SdPdfFilterAshod Nakashian
LOK now opens PDFs as images using Pdfium, which has a superior accuracy and support to poppler, the default pdf reader. Change-Id: Ifbbecf7f048f001836fb98886705cba47e6bed4e
2018-06-07tdf#96099 Remove std::vector typedefsAbhyudaya Sharma
Change-Id: Ic7e1cecaecadf3f9ebfa183727d61046dd87e473 Reviewed-on: https://gerrit.libreoffice.org/55260 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-06-06tdf#109190 sd MakeVisible: fix flattened loop logic errorJustin Luth
There is a bug in the conversion from while(rRect.Bottom() > aNewPos.Y() + aVisAreaSize.Height()) to const long distBottom(rRect.Bottom() - aNewPos.Y() + aVisAreaSize.Height()); While the bottom of the object is lower on the page than the visual Top position plus the height of the screen, (in other words, it isn't in the visible range of the screen), move the screen down by the size of the object and try again. The loop could first be finished when the shape bottom is exactly at the bottom of the screen: rRect.Bottom() = aNewPos.Y() + screen Height. or rRect.Bottom() - (aNewPos.Y() + aVisAreaSize.Height()) = 0 or rRect.Bottom() - aNewPos.Y() - aVisAreaSize.Height() = 0 Change-Id: I762a39df3cdcd5689c8f6742797a9f7b38ddb384 Reviewed-on: https://gerrit.libreoffice.org/55156 Reviewed-by: Justin Luth <justin_luth@sil.org> Tested-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2018-06-06Translate German comments and debug stringsJohnny_M
And correct a few comments (translation and grammar) Change-Id: Ifafa521c683e9ca65aeba8031cd4cbfc1fadc137 Reviewed-on: https://gerrit.libreoffice.org/54888 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2018-06-05tdf#117940 setting resize shape while text edit active not recorded in undoCaolán McNamara
Change-Id: I0887a1caea96f3efe897c304cde0520d59da6c59 Reviewed-on: https://gerrit.libreoffice.org/55323 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-06-05tdf#42949 remove unused compheler includes ..Jochen Nitschke
and fix the fallout Change-Id: I15bc5d626f4d157cbc69a87392078b41e621d14e Reviewed-on: https://gerrit.libreoffice.org/54882 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-06-04Bitmap->BitmapEx in BitmapFactoryNoel Grandin
Change-Id: I7f88333a74f7c523030ab55b896c316b3aa73cce Reviewed-on: https://gerrit.libreoffice.org/55282 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-04second param of NotifyPreviewCreation is unusedNoel Grandin
ever since it was introduced in commit cd361fde6a8033015a589531992e3d37c10e6f05 Date: Thu Apr 3 13:45:13 2008 +0000 INTEGRATION: CWS presenterview (1.1.2); FILE ADDED Change-Id: I480ca64d6c02b69f7a738ec1f914267fa4ea9e7a Reviewed-on: https://gerrit.libreoffice.org/55283 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-04tdf#42949 Fix IWYU warnings in sd/source/filterGabor Kelemen
Found with bin/find-unneeded-includes Removal proposals are dealt with, and necessary fallout management Change-Id: Ibf30bb929d2530572bbfee7ebeaad8a7fea7b3c2 Reviewed-on: https://gerrit.libreoffice.org/55208 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-06-04make CreateStyleFamilies return std::unique_ptrNoel Grandin
Change-Id: Ibb7bec9ede8045a6cea42c02f61f14ad36d2b434 Reviewed-on: https://gerrit.libreoffice.org/53730 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-02coverity#1435913 Dereference after null checkCaolán McNamara
Change-Id: Ieaf1eeee7be375c9381070d7141f6366b0bec7a3 Reviewed-on: https://gerrit.libreoffice.org/55218 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-06-02Removed executable permission on data filesAndrea Gelmini
chmod -x to complete Change-Id: I966773e0adebf8563343856f18ba25ba84b0a633 Reviewed-on: https://gerrit.libreoffice.org/53666 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-06-02Removed executable permission on xml fileAndrea Gelmini
Change-Id: Iac67a8371efd5f4562a926cae5913f0a4b3b6b4d Reviewed-on: https://gerrit.libreoffice.org/54812 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-06-02Removed executable permission on data filesAndrea Gelmini
chmod -x for odp, ods and so on Change-Id: I74397d9b8e24575130d2776ed90f4cfc13e1f03c Reviewed-on: https://gerrit.libreoffice.org/52570 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-06-01use more BitmapEx in sdNoel Grandin
Change-Id: I5c24ca437a329b105151adfedcaed0016bdaf771 Reviewed-on: https://gerrit.libreoffice.org/55191 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins <ci@libreoffice.org>
2018-06-01drop Image(Bitmap) constructorNoel Grandin
and convert some more code from Bitmap to BitmapEx Change-Id: Icf3c18608e0bb608408fe69722441cfa19f6b161 Reviewed-on: https://gerrit.libreoffice.org/55160 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2018-06-01tdf#87995 Missing setting for save thumbnail in settings.xml.Ilhan Yesil
If the user unchecks "Save preview picture with this document" in the dialog field and saves the document, the appropriate flag is now written to settings.xml by introducing the setting named "SaveThumbnail". Change-Id: I4916b4149a9494dd1891c0e05cb9a985ba0a9121 Reviewed-on: https://gerrit.libreoffice.org/52768 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-06-01loplugin: look for CPPUNIT_ASSERT_EQUALS with params swappedNoel Grandin
idea originally from either tml or moggi, can't remember which Change-Id: Id78d75035036d3aa1666e33469c6eeb38f9e624d Reviewed-on: https://gerrit.libreoffice.org/55126 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-31Corrected PresObj StylesArmin Le Grand
When SdrPresObj's get constructed, e.g. when loading/ opening an Impress, the Styles for the PresObj's (PresentationObjects) need to be constructed carefully the same way as in former versions. This is a combination of creating the SdrObject, adding a Style and setting default Attributes, combined with in.-between corrections. All these combinations make these fragile, plus the im/export using ODF XML format and UNO API. With last SOSaw080 changes not all places were correctly converted (mainly due to new timing when and how a SdrObject belongs to a SdrPage). Corrected this now, checked im/export/echange with libreoffice-6-0 versions. Stuff is more complicated that initially thought, see comment added at AttributeProperties::GetObjectItemSet() for more info. Adaption of the two UnitTest-Files is explained there, too. Change-Id: Ia90a37492f3a92030790fbd27b7c532883bce923 Reviewed-on: https://gerrit.libreoffice.org/55029 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2018-05-31SOSAW080: Cleanup of SdrModelArmin Le Grand
First step: Find all constructors/derivations, mark all of them. Removed two-value-constructors, adapted code as needed Reduced constructors for SdrModel/FmFormModel to a single one. Removed PathName for List creation, this is not needed and anyways all calls used the default SvtPathOptions().GetPalettePath(). This is also true for usage of IsFuzzing() that is also part of the default creation process (without path). All usages that need an extra-List were setting it after construction explicitely. Removed UseExtColorTable. This prevents a single List to be not created by default, the ColorTable which is replaced later by all callers that used this. This is not needed since the default ColorTable gets constructed just by default, no expensive stuff is triggered (e.g. loading the ColorTable). Thus now a default ColorTable is created and kept for a short moment, destructed again when a ColorTable is explicitely set. Doing so is also more safe - it avoids not creating a default-ColorTable and then not setting one (what would be urgently required). f23c24a8548d5246b77b1cc359ba89564538e81a f124468c3898c5842d37123bdeb87d79a2b19c62 Change-Id: I865de4bb23f673c6684d83c2c6390439506dc5b6 Reviewed-on: https://gerrit.libreoffice.org/55028 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2018-05-31drop Graphic::GetBitmapNoel Grandin
so that we flush out various code using Bitmap, in favour of using BitmapEx. This is part of the process of making Bitmap largely an internal detail of vcl Change-Id: Iaf2ead5e3d9960838723fb55b812b97108093d74 Reviewed-on: https://gerrit.libreoffice.org/55062 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-30sd: allow ruler to respond to switching active cell faster.Mark Hung
Change-Id: I8647c6e820b4bac795e87d538eba822fac7ddbe7 Reviewed-on: https://gerrit.libreoffice.org/54644 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Hung <marklh9@gmail.com>
2018-05-30tdf#104376 Adjust SvxLRSpaceItem with right distance to border.Mark Hung
Like what has been done with left distance to border, so that the ruler handle reflects the setting. Change-Id: I4ed920280aafc537ba3068f0f666778c2d723b6b Reviewed-on: https://gerrit.libreoffice.org/54618 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Hung <marklh9@gmail.com>
2018-05-30tdf#104376 activate existing protect item for the ruler.Mark Hung
SvxProtectItems were used to protect size and position of the rulers in Impress/Draw but weren't really activated because they were missing in the sdi of the view shell. See also: DrawViewShell::GetRulerState() in drviews3.cxx. Change-Id: I576932fb45acd996a3b6f3045dcbc131b7316ece Reviewed-on: https://gerrit.libreoffice.org/54616 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Hung <marklh9@gmail.com>
2018-05-30tdf#104376 fix positions of the ruler handles for tables.Mark Hung
Use the cell boundary to decide correct SvxLRSpaceItem values. Change-Id: I1906eaf34a7ff5f852b729114371ddb5387692d3 Reviewed-on: https://gerrit.libreoffice.org/54615 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Hung <marklh9@gmail.com>
2018-05-30Missing includesStephan Bergmann
Change-Id: I48d78fb86c2604040b3d0c2d207aae410faf4870
2018-05-30tdf#42949 Fix more IWYU warnings in sd/inc/Gabor Kelemen
Found with bin/find-unneeded-includes A lot of fallout needed fixing, unfortunately Change-Id: I528cf5fe77199ee72f19fce3de08fe67e7f63dbe Reviewed-on: https://gerrit.libreoffice.org/54884 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-05-30use BitmapEx in the screenshot stuffNoel Grandin
part of the process of moving Bitmap usage to BitmapEx Change-Id: I4f02f8aa60d19a3639d623a998491447adf79e15 Reviewed-on: https://gerrit.libreoffice.org/55031 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-29weld SvxTransformTabDialogCaolán McNamara
Change-Id: Ib6dabd04e3f834b61363d5a620de7f0219a1e644 Reviewed-on: https://gerrit.libreoffice.org/55012 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-05-29tdf#117847 Impress: Deselected alignment remained checkedIlhan Yesil
The state of the attributes for alignment are now read and set correctly. Change-Id: I65047dac341729154ded0d5b01ace1207893a5ba Reviewed-on: https://gerrit.libreoffice.org/54907 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2018-05-28loplugin:useuniqueptr in MotionPathTagNoel Grandin
Change-Id: I1f63cf02a99018fbac1bf07b9afe6d7347a973d9 Reviewed-on: https://gerrit.libreoffice.org/54861 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-28loplugin:useuniqueptr in AccessibleDrawDocumentViewNoel Grandin
Change-Id: Ibec6b19e83a3c29299382c398ca6a40b92377ede Reviewed-on: https://gerrit.libreoffice.org/54860 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-28loplugin:useuniqueptr in TextApiObjectNoel Grandin
Change-Id: I418f18a1e090dab2923395963b2a003df58890ae Reviewed-on: https://gerrit.libreoffice.org/54859 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-28loplugin:unusedfieldsNoel Grandin
Change-Id: I625b73152c0c277c6e0ce3e24e4704094fc4e8ff Reviewed-on: https://gerrit.libreoffice.org/54822 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-27tdf#38225: update API name when renaming using a base class refMike Kaganski
... but don't update it in case it's a predefined API name Change-Id: I20075a4e085bdeab8374860c16e7eb2a72772c33 Reviewed-on: https://gerrit.libreoffice.org/54879 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-05-25Improve re-throwing of UNO exceptionsNoel Grandin
(*) if we are already throwing a Wrapped*Exception, get the exception using cppu::getCaughtexception. (*) when catching and then immediately throwing UNO exceptions, use cppu::getCaughtException to prevent exception slicing (*) if we are going to catch an exception and then immediately throw a RuntimeException, rather throw a WrappedTargetRuntimeException and preserve the original exception information. Change-Id: Ia7a501a50ae0e6f4d05186333c8517fdcb17d558 Reviewed-on: https://gerrit.libreoffice.org/54692 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-25loplugin:passstuffbyrefNoel Grandin
Change-Id: I785e96599bbda029adf4698d11d7f981750dec07 Reviewed-on: https://gerrit.libreoffice.org/54802 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-25SOSAW080: Derive SdrObjGroup from SdrObjListArmin Le Grand
Also simplify parent/child relationships, get rid of double data (SdrPage/Parent infos in SdrObjects, also in SdrObjList). This is all not needed - when a SdrObject is inserted to a SdrPage, get SdrPage by traveling over parents (no double info, member as soon as inserted, ...). More cleanups/reworks included, will need some more cleanups, too. Stabilizing: SetRectsDirty/DefaultStyleSheet Had to correct the SetRectsDirty stuff for 3D due to going down the hierarchy while the 2D implementation goes the other direction -> endless loops. Added special handling for 3D stuff for now (will be chnaged again when SnapRect is no longer needed at SdrObject level). Also had to adapt how the DefaultStyleSheet is set at incarnated SdrObjects - better: their properties. Since we now always have a SdrModel, it is possible to correctly initialize with the correct default StyleSheet from that SdrModel. This needs to be done after ForceDefaultAttributes and in a way that again deletes Items that are set in the StyleSheet. This leads to an error in CppunitTest_sd_import_tests where I checked tdf100491 - it is okay and thus I change the control instance of the imported, XML-dumped file. The less hard attributes, the better for Styles in general. Cleanup of comments for last two commits Corrected SvxShape::getParent() Needed to get the direct parent, so test for SdrObject first (to get SdrObjGroup/E3DScene), for SdrPage second Fixed CppunitTest_sc_subsequent_export_test Several problems arose. The used SdrCaptionObj was Cloned, but the clone not inserted to a SdrPage. This leads to not being able to access a UNO API imlementation of the SdrPage (SvxPage) on lower levels. It worked before due to SdrObject having a SdrPage* additionally to being added to a SdrPage - this is exactly the main cleanup this change does. Looked for why it is cloned, could see no reasons. The SdrCaptionObj exists during all im/export, not difference to other SdrObjects (that do not get cloned). It is not changed in any way. It *might* be to suppress a crash that happened due to UNO API Service emfio/emfio not being available in the UnitTest scenario. Interestingly it did not crash with the cloned SdrCaptionObj, but the Graphic exported was probably wrong. Fixed by no longer Cloning the SdrCaptionObj and adding emfio/emfio UNO API Service. d139f821a5b39535a3e7b9c6261df7e18f8ae8ac 910e7f4bc628a715fda7545dffaf3369d5e76ea0 ca1de01b723051e09ac37d7ec7bba978beea41c5 3a76da1471dfe75e69847f64a6a3519ad21c8c9c Change-Id: I986586e326b563acebf00d931a7084c6eb09e5f8 Reviewed-on: https://gerrit.libreoffice.org/54689 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2018-05-24rework custom widget welding to enable inheritenceCaolán McNamara
Change-Id: I0d391b3fe9d2d610ae41e2a03cd2e195a866e103 Reviewed-on: https://gerrit.libreoffice.org/54681 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-05-24tdf#42949 Fix IWYU warnings in sd/inc/*Gabor Kelemen
Found with bin/find-unneeded-includes Removal proposals are dealt with here With fallout management as necessary Change-Id: Iaef9eec626334c480dd5a2def63bb476350ceebb Reviewed-on: https://gerrit.libreoffice.org/54617 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-05-23toolbar:id is not valid attribute of toolbar:toolbarChristian Lohmaier
according to framework/dtd/toolbar.dtd – and having the same ID everywhere also is kinda pointless.. Change-Id: Ia7768be2f951886e39e24d78fc6d69b4f3c84235 Reviewed-on: https://gerrit.libreoffice.org/54665 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2018-05-23sd: extend bitmap bullet testsTomaž Vajngerl
Change-Id: I169f7306f3af2c283b1c928230eaf6566b1a6660 Reviewed-on: https://gerrit.libreoffice.org/54696 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-05-23sd: convert XGraphic to XBitmap for the "GraphicBitmap" propertyTomaž Vajngerl
Change-Id: Idec08d4823775b11976f8650fe942f296d6dd4ce Reviewed-on: https://gerrit.libreoffice.org/54695 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-05-22Fix typosAndrea Gelmini
Change-Id: Idbe136fbfd222e8baad588dc36a2f9b7ce6996ec Reviewed-on: https://gerrit.libreoffice.org/54590 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins <ci@libreoffice.org>
2018-05-21Activated notebookbar in drawKshitij Pathania
Added tabbed and two groupedbars mode of notebookbar. Change-Id: I208a365139ca6c83510a73a8ffa0260b05787793 Reviewed-on: https://gerrit.libreoffice.org/54547 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>