summaryrefslogtreecommitdiff
path: root/sd
AgeCommit message (Collapse)Author
2018-06-18vcl: share GfxLinkAshod Nakashian
When importing PDF as images, we store the PDF stream in the GfxLink. For large PDFs storing a copy of the full PDF with each page is overkill. For example a 10MB PDF with 200 pages will consume 2GB of memory! Change-Id: I99913514cf5c562683080bc817668095bee69427 Reviewed-on: https://gerrit.libreoffice.org/55571 Tested-by: Jenkins Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2018-06-17tdf#42949 Add a class declaration to include/sfx2/shell.hxxGabor Kelemen
This is necessary to not get IWYU warnings or build errors where SFX_DECL_INTERFACE is used Also remove an earlier workaround in sd Change-Id: I4cc86f7ad0c83aeaae225ee05af34fa49ba67e73 Reviewed-on: https://gerrit.libreoffice.org/55955 Tested-by: Jenkins Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2018-06-16AW080: Continued cleanups/remaps/correctionsArmin Le Grand
Change-Id: I953f29e6a8d398e00884a600d6f4ceba880489a5 Reviewed-on: https://gerrit.libreoffice.org/55913 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2018-06-16tdf#42949 Fix IWYU warnings in sd/source/ui/inc/[dDE]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here and a bit of fallout management. Change-Id: Ie86a34f7f091525f21369f989165a56eace70513 Reviewed-on: https://gerrit.libreoffice.org/55558 Tested-by: Jenkins Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2018-06-16AW080: Cleanup of 3D Object methodsArmin Le Grand
Change-Id: I3a8247aabd2fd24b53faf9e1e8da29856dde70bf Reviewed-on: https://gerrit.libreoffice.org/55897 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2018-06-15tdf#96099 Remove some trivial std::vector iterator typedefsArkadiy Illarionov
Change-Id: Iced10ed59c475dff4d33ff06151b2015a27a860b Reviewed-on: https://gerrit.libreoffice.org/55715 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-06-14tdf#100894 freeze when editing calc file with bazillions of cond formattingNoel Grandin
This does not fix the root cause of this problem, which is simply that the document has a bazillion style sheets. Either the program which exported this document is broken, or our importer is not correctly de- duplicating the imported stylesheets. Anyhow, I made performance improvements until I realised that it was simply going to be impossible to display that many stylesheets in our UI. But still, this bug was useful in flushing out some performance issues. The improvements, in order of decreasing importance are: (*) Use SfxStyleSheetIterator in SvxStyleToolBoxControl::FillStyleBox to avoid an O(n^2) situation where the pool repeatedly marks all the stylesheets as not-used, and then walks the document finding out if a stylesheet is used. Which is a waste of time because we're searching the documents pool, so of course they are all used. (*) Add a virtual method to avoid dynamic_cast (*) return raw pointers instead of returning rtl::Reference by value to avoid unnecessary reference counting. SfxStyleSheetIterator Change-Id: I15ff9c1846d3ed3e6f5655fa44c762f7619d547a Reviewed-on: https://gerrit.libreoffice.org/55751 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-14tdf#104199 sd: nofill borders shouldn't be visible.Justin Luth
regression from export bugfix tdf#90190. rLineProperties.maLineFill was set, but that value was never used, leaving aBorderLine with the default value. Setting borderline to COL_AUTO lets it merge in with background colors while still taking up the space defined by the border width. The existing unit test says "it is likely you will break this if fixing background issues, so feel free to adjust the test values." Indeed, this patch removes an unwanted black border, so utilizing that test as a proof. Change-Id: I0725a3d5874a509a4464c586d60c77cde2b49fcb Reviewed-on: https://gerrit.libreoffice.org/55205 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
2018-06-12tdf#118063 Impress: Deselected spacing remained checkedIlhan Yesil
The state of the attributes for spacing are now read and set correctly. Change-Id: I661c00e247b55c64ea39c03db77dab9fa0775852 Reviewed-on: https://gerrit.libreoffice.org/55455 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-06-12simplify calls to *DialogFactory::Create methodsNoel Grandin
we don't need to check for nullptr here, it's never null. Change-Id: I3cc5337a8f4dec6747821679e39ccba3cec20f56 Reviewed-on: https://gerrit.libreoffice.org/55114 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-11tdf#118068 InsertionIndicator should be temporaryCaolán McNamara
its original use is during a drag/drop operation so its expected to be in use just for a temporary scope, so End after Start Change-Id: I3efdc4079ef7e1466b49e027fed0698715b5fd58 Reviewed-on: https://gerrit.libreoffice.org/55619 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-06-09remove cargo cult OSL_ENSURE(pFact, "ScAbstractFactory create fail!"(Noel Grandin
Possibly this was useful once upon a time, but now it's just noise. If it failed, we're going to crash on the next line when we call a method on that pointer anyway. Change-Id: Ic601f0c3344f6895f8a6ffb3bc6f8bcb45d00a92 Reviewed-on: https://gerrit.libreoffice.org/55082 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-08Unit test for Line algorithmekuiitr
TestMaxDepth test checks the linear (lin) algorithm such that it arranges child layout nodes along a linear path. Change-Id: Ibf6f654d2f68f31a1c1a0f57044b411add954fa0 Reviewed-on: https://gerrit.libreoffice.org/55080 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2018-06-08tdf#118037 PPT import: fix lost crop of graphicMiklos Vajna
Regression from commit b11188835d3b87cd9d2a8cdb3da204cfda5d3e6e (DOC import: lazy-read images, 2018-04-20). Change-Id: Ie2155c971d94153352a9372a9795cbb9d820dd40 Reviewed-on: https://gerrit.libreoffice.org/55452 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2018-06-08tdf#42949 Fix IWYU warnings in sd/source/ui/inc/[a-c]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here, with a bit of fallout management Change-Id: Ifcfd19b845146e8af386090d898c1f6ef6c98100 Reviewed-on: https://gerrit.libreoffice.org/55449 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-06-08look for unnecessary calls to Reference::is() after an UNO_QUERY_THROWNoel Grandin
Since the previous call would throw if there was nothing to be assigned to the value. Idea from tml. Used the following script to find places: git grep -A3 -n UNO_QUERY_THROW | grep -B3 -F 'is()' Change-Id: I36ba7b00bcd014bdf16c0455ab91056f82194969 Reviewed-on: https://gerrit.libreoffice.org/55417 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-06-07vcl: svx: misc improvements to pdfium importingAshod Nakashian
Change-Id: I58f2fd973a731b148f40b37139cd74bac097a7d2
2018-06-07pdf: preserve the original page dimensions on importAshod Nakashian
Also allow for rendering PDFs to images at custom resolution, instead of hard-coded (old hard-coded value of 96 dpi is now default arguments). Change-Id: Ia5b52f72d6ce7130a2debc7c6f86504aa041bdc8 Reviewed-on: https://gerrit.libreoffice.org/54786 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2018-06-07sd: make the imported PDF page exactly as originalAshod Nakashian
i.e. no borders or larger page than rendered PDF Change-Id: I1f356cceeec1d5d9f1728f0e29160fdd9241a221 Reviewed-on: https://gerrit.libreoffice.org/54764 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2018-06-07sd: render the correct PDF page on swapping inAshod Nakashian
Change-Id: I81225e228d9cf2b9849110715dbfdeb59f2805dd Reviewed-on: https://gerrit.libreoffice.org/54746 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2018-06-07sd: disable pdf import testsAshod Nakashian
Change-Id: Iaee679d2ff322c67d081185588103d5685fa970a
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>