summaryrefslogtreecommitdiff
path: root/sd/qa
AgeCommit message (Collapse)AuthorFilesLines
2014-09-10bnc#480256: OOXML import: Respect table background properties a bit moreMatúš Kukan2-0/+49
Only getBackgroundFillProperties() (fill) was used. Use also getBackgroundFillStyleRef() (fillRef). Also, do not replace table background color value with cell color, we have to interpolate the two colors (if cell color is transparent). Unfortunately, we don't use background table property in LibreOffice, so this seems to be a best workaround. (cherry picked from commit 43efd9b40d40b791a2c2deedcac36b99f7efb2cf) And add unit test. (cherry picked from commit 5681725f1a2535a13b86104d8b8a33f750f34efc) Change-Id: I21bcc87a149c9f6d865ebee4012132ccc3a54af2 Reviewed-on: https://gerrit.libreoffice.org/11353 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-09-02n#708518: sd: check that master page matches when setting parent styleMichael Stahl2-0/+43
In ODF import it happened that the parent style of "outline2" etc. was always set to the "outline1" style of the first master page in the document, but it should be the "outline1" style of the same master page as the "outline2". (regression from e955433c3574cb602dedba96bc645898f97858bf) (cherry picked from commit 5b63c12ace2aec9a659e4b9125f6aa9ff204ed09) Conflicts: sd/qa/unit/import-tests.cxx Change-Id: Ie563d5ee5c2040aeb6ca5c8bb25b195e15ea964e Reviewed-on: https://gerrit.libreoffice.org/11195 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2014-08-28PPTX import: fix missing document metadataMiklos Vajna1-0/+16
Without this, the creation / modification date is lost on import. (cherry picked from commit ef2668bad976f1fbb70759887cafd35ea7833655) Conflicts: sd/qa/unit/import-tests.cxx Change-Id: I0b74ac91aee7b8b3e0bc763247086a3a39816bc1 Reviewed-on: https://gerrit.libreoffice.org/11167 Reviewed-by: Zolnai Tamás <tamas.zolnai@collabora.com> Tested-by: Zolnai Tamás <tamas.zolnai@collabora.com>
2014-07-17bnc#862510: Improve handling of OOXML gradientsTor Lillqvist1-51/+51
OOXML gradients can have an arbitrary number of "stops". LibreOffice gradients have just a start and end colour, plus an optional uniformly coloured border (on the "start" side). In addition, LibreOffice has the "axial" gradient mode, which means the gradient is reflected in the middle. It is thus obviously impossible in general to losslessly map OOXML gradients to LibreOffice ones. But let's try a bit harder than earlier to get visually more similar result, in at least some simple sample cases. We look for the widest gradient segment and use that for the start and end colours of the LibreOffice gradient. Also, map an OOXML gradient to an axial LibreOffice gradient only if it is symmetrical. Also, use the border property when suitable. In general, look for the widest OOXML gradient segment (once a segment corresponding to the LibreOffice gradient border, if any, has been accounted for) and use that as the LibreOffice gradient. Possibly some perceptionally better heuristic should be used... Like, if we have a three-segment gradient, with a wide gradient segment between two visually very similar colours (for example, two shades of red), and a narrower segment ending with a visually very different colour (for example, yellow), it probably would be best to represent that in LibreOffice as a gradient from the first red shade to yellow, instead of as a gradient between the two shades of red. Or even, if a first or last gradient segment is between very similar colours, equalize those start and end colours, thus using a border colour in LibreOffice instead. The possibilities for bikeshedding are endless. I am sure there are instances where the old code (by accident?) produced visually more pleasing results... But hopefully this works more pleasingly and consistently in a larger number of cases. Change-Id: If153e986ad943454307e3ba718479d5ac4cdc7ab (cherry picked from commit f4a2f1e647354efb75be8c90384d6cd3e5f9b9bd) Signed-off-by: Andras Timar <andras.timar@collabora.com>
2014-06-30bnc#882631: Do not hide top of the first row when editing text in table cells.Matúš Kukan1-2/+2
This can happen when proportional line spacing is less than 100% and "FontIndependentLineSpacing" is set, so just keep the height of the very first line in case of IsFixedCellHeight() too. Change-Id: Id231fc1f2373645e5420f877e8c2568ce8a1f099 (cherry picked from commit 9388c45c0263a0090f9cb4be9c42b93b5f7985d0) Reviewed-on: https://gerrit.libreoffice.org/9890 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2014-06-21Revert "bnc#882631: keep line visible if proportional line spacing is < 100%."Matúš Kukan1-2/+2
This reverts commit 339e5d44a2afa0f5309a970f1ff11968103e336a and commit d1987a3eaccfc3add35e6b9f8307ede857c5468e "fix sd_import_tests after e42c05c1f96832572e525d85d89590f56f5a29dd". It would need more work and understanding, so just revert. Also, the problem with bnc#882631 is somewhere else, though this helped too. Change-Id: I2221b6bd2b71edabff17ac83b014fae79bb73aaf
2014-06-17fix sd_import_tests after e42c05c1f96832572e525d85d89590f56f5a29ddMatúš Kukan1-2/+2
Change-Id: Ife852a6c7c360c66a7d7d5b144f18898398505dd (cherry picked from commit 5158f5e9fdffe31f54b6da9e75164a99d10ad617)
2014-06-16Revert "Make glTF support an experimental feature"Zolnai Tamás1-13/+2
There are others who think this will work better before the release. This reverts commit 653bac184f579524bc25a9f40281763a736ae6fd. Conflicts: sd/qa/unit/import-tests.cxx xmloff/source/draw/ximpshap.cxx Change-Id: Ie8747745a9a89ce4d6500a35d15a98e28bda840a
2014-06-16Reduce test doc size, use a simpler gltf modelZolnai Tamás2-2/+2
(cherry picked from commit e38acfa15b52353565ad9ddaf3cf96dd13c5b0fb) Change-Id: I5bd78343728f8a4d68610397a7be328826a0334c
2014-06-16glTF import/export: fallback must be the second one inside the frameZolnai Tamás1-0/+0
The previous solution was good because older LO versions import the fallback image without changing their code, but it came out it does not fit to ODF standard so export fallback image as the second object after the glTF model. (cherry picked from commit 4d8c4e7fe3e9b0ec6e14b5475a29d119e2023065) Change-Id: Ib9b2044b1f36b32d980cb79f6dac8dcf94d6209b
2014-06-16glTF export: Use plural folder namesZolnai Tamás2-2/+2
Change-Id: If17628395ede512c00b666efc5511d9711edfb5a (cherry picked from commit 9ee69cbd6f1143160aa96001462b933770cc6b76)
2014-06-15Fix --disable-gltf buildZolnai Tamás1-0/+3
saveAndReload tests export, which is needed only when gltf support is enabled. Change-Id: I08152c12db77ad2fc623f2699784b968378686db (cherry picked from commit 634530620e6a51c5ea8f1596f6ab51b2a7e2ea9c)
2014-06-13Change glTF mime type: {application -> model}/vnd.gltf+jsonZolnai Tamás2-1/+2
There is no an accepted mime type for glTF models yet, so follow collada's mime type: model/vnd.collada+xml. Change-Id: I1e23a95dbb0caea781dade819f8e08235cb5c1dc (cherry picked from commit e8fcf1153fd93b4f8155da0d571935125367a59b)
2014-06-13Make glTF support an experimental featureZolnai Tamás1-4/+14
Change-Id: I75e69ba1acafbab8362536f02f4d39a8fc2deed1 (cherry picked from commit 653bac184f579524bc25a9f40281763a736ae6fd)
2014-06-13Introduce HAVE_FEATURE_GLTF to enable/disable gltf related codeZolnai Tamás2-3/+15
When it is a release build then enable it only on Windows and Linux. Change-Id: I7c462aeb75e6ab60eeaa0fa42ca7853a6369b742 (cherry picked from commit fe70101856332663f600df144b39d2638b3d0570)
2014-06-11Related bnc#862510: extend handling of txXfrmZolnai Tamás3-21/+23
We don't actually need to check mbAnchorCtr to change text spacing. This txXfrm workaround works only with rectangles, because other shapes' text area can be smaller then the shape size. So add some condition to avoid using it for other shapes. Plus fix typos cause regression introduced in: 53c376d35b7223d53e8c9403390afe53d1f69089 Change-Id: I87917b8e0b2bb97ae1bba773e7dda7f81682736f (cherry picked from commit 98dd0f2bb5801f974374ef341037e094e4275cbb)
2014-06-06html export: More standard time specification in <meta/>.Jan Holesovsky1-1/+1
Change-Id: I1a62d12531029cc36fb8aeabecb9d92a8af837f7
2014-06-06sd html: Unit test for the metadata export.Jan Holesovsky1-0/+5
Change-Id: I1e38e28b57e816a0829d1a56f2ffcb32d8f93718
2014-06-06bnc#880763: PPTX import: wrong z-order becuause of wrong import orderZolnai Tamás3-11/+37
importExtDrawings() must be called as soon as possible, before parser starts to parse the next shape. Call it when graphicFrame tag is closed. This tag include the reference to the SmartArt. Plus fix up import tests. Change-Id: I9e8d54c2b1afeb78a1122390dc4982d580c152ae (cherry picked from commit 46d682eec92bb241f4604a4b6ab42a3859cd0d48)
2014-06-06c++03 vs c++11 enum namespacingCaolán McNamara1-4/+4
Change-Id: I91be0e7d2b013221b1d47a5cd1e4e75eb16c2b67 (cherry picked from commit e990e4d145f16c0c7e4e9e12c4882ddde63a3d5a)
2014-06-062nd part of bnc#870233: import font color from color fragment for SmartArtsZolnai Tamás2-0/+68
SmartArt import ignores some fragments during import if drawing fragment exists, which seems to be not complete. In this case font style is blank (white) in data (and drawing) fragment and the real value is defined in the ignored color fragment. So first make color fragment parsing work, then apply font color of "node0" style on nodes of the SmartArt. Actually, it's a workaround, because "node0" style label is hardcoded, for a proper solution layout fragment should be parsed too to get the right style label, but it interferes with the drawing fragment by now. Change-Id: I7db89176a07eee928563d42d3896fbd02190dfa8 (cherry picked from commit 639571d52b1b7e4cf912803642ca245c5dd86839)
2014-06-061st part of bnc#870233: wrong list style in shapesZolnai Tamás2-0/+73
Text list styles were copied, without proper copy constructor and operator. It lad to mix up list styles and so text font. (cherry picked from commit 31650d5b4255c484faec11d570cb98a80f0120cc) Change-Id: Iee7a6c0c1f74322fd7b80e41a262849f948e463a
2014-05-30bnc#870237: wrong text position in grouped listZolnai Tamás2-0/+22
In grouped list text area does not cover the whole shape but just a part of it at the top. To get the same visual effect modify text distance attribute. Change-Id: I32f30d0afbc1975f940c4562ec65f46596e97060 (cherry picked from commit 53c376d35b7223d53e8c9403390afe53d1f69089) Reviewed-on: https://gerrit.libreoffice.org/9571 Tested-by: Zolnai Tamás <zolnaitamas2000@gmail.com> Reviewed-by: Zolnai Tamás <zolnaitamas2000@gmail.com>
2014-05-15sd html test: move local vars on top, clean-upTomaž Vajngerl2-11/+9
Change-Id: Iac393561337825e316a974801a6061944b8fd72a
2014-05-14Unify utl::TempFile ctorsStephan Bergmann2-2/+2
Change-Id: I0a781a86804808cebf7756506d9299971c13e2ff
2014-05-09coverity#1209803 Dereference before null checkCaolán McNamara1-1/+0
Change-Id: Ie6435770edc709feba2ad191e00e03d637cf6154
2014-04-29tests: add XML and HTML test tools to test moduleTomaž Vajngerl1-38/+4
XML and HTML parsing and XPath asserts are used by many test in sw, sc and sd modules. This commit moves this functionallity to test module, where it is available to all modules. Change-Id: I53ad9c45b24f4c9bf106cb58ea619002968bfeda
2014-04-24sd: sal_Bool->boolNoel Grandin1-1/+1
Change-Id: I3172a42f6b6abe434ffe0475d1201ff50b6c06ea
2014-04-23fix sd layout unit testAndras Timar1-115/+115
Change-Id: Ica34592788005cc3c96987b1c6c9625dd6359c76
2014-04-17remove executable bitAndras Timar4-0/+0
Change-Id: I91f6e861f6d0dbea1b57ac73857e0c706b27f681
2014-04-16fdo#77027: ODF import: fix wrong version in check for embedded objectsMichael Stahl2-0/+35
SvXMLImport::LO_4x does not mean 4.0+ any more. (regression from 92cb21ebeda98c5193c50c4cf7ef3d60611c2a52) Change-Id: Ib444762c2d6e4d051e99962eaff1b1ed34af983a
2014-04-15Remove unused codeStephan Bergmann1-18/+0
Change-Id: Ie16056c7e6716831a0ba61c1f22ded978fb5f3c2
2014-04-13sd html: impress html export testTomaž Vajngerl3-22/+164
Change-Id: I710868b4cb19cec2820c3cf699dd5d855e3da7e2
2014-04-04ODP filter test: embedded media and glTF modelZolnai Tamás2-0/+26
Change-Id: I2340fa5a20a5774e5db78940cf7d4dc584f09b82
2014-04-04SdFiltersTest: reduce code duplicationZolnai Tamás2-47/+2
Change-Id: I95ddae64001015f911494e11fa15373dfaedd6ba
2014-04-01Explicitly mark overriding destructors as "virtual"Stephan Bergmann1-1/+1
It appears that the C++ standard allows overriding destructors to be marked "override," but at least some MSVC versions complain about it, so at least make sure such destructors are explicitly marked "virtual." Change-Id: I0e1cafa7584fd16ebdce61f569eae2373a71b0a1
2014-04-01prevent leaked tmp files from sd import testMarkus Mohrhard1-0/+37
Change-Id: I6365924420f636c8db556d0bce02b2131e540f2c
2014-03-28Add unit test for text gradfill import.Muthu Subramanian2-0/+27
Change-Id: I803238fd21d1c73aae8146966a5e62e62ad48c5c
2014-03-27write (no)wrap of text only for custom shapes to .pptx (fdo#71961)Luboš Luňák2-0/+35
Apparently checking the TextWordWrap property in DrawingML::WriteText() gives false by default for objects that do not have it set, which happens to be everything except for custom shapes, which seem to be the only ones to actually obey it. So all normal text would be exported as nowrap to .pptx and read back as custom shape that has non-wrapping text. I tried to make the property return true (which is what it should be in practice), but that appears to be an exercise in futility, or I'm not mad enough to follow the complicated property sets and whatnot. So just write it out only for custom shapes. UNO purists, if any, are welcome to change the dynamic_cast to something UNO-better if they manage without an ambiguous base class error. Change-Id: I3ed906285fde88d902ac9c801986a82a7515638b
2014-03-27Second batch of adding SAL_OVERRIDE to overriding function declarationsStephan Bergmann3-7/+7
...mostly done with a rewriting Clang plugin, with just some manual tweaking necessary to fix poor macro usage. Change-Id: Ie656f9d653fc716f72ac175925272696d509038f
2014-03-27Add unit test for left spacing (anchorCtr)Muthu Subramanian2-0/+22
Change-Id: I8fa347497c9509285c5f0422c618efcb360dbd34
2014-03-27Add unit test for text rotation.Muthu Subramanian2-0/+22
Change-Id: Iba4e002c461f00807f277e6032afcdaaf25ea4a2
2014-03-25update test filesDavid Tardon3-9/+9
Change-Id: I937a85fa7bda7df13e79e704973c21bfc732ba66
2014-03-23fix unit testDavid Tardon1-1/+1
2014-03-17n#862510: Adding unit test case for baseline=0Muthu Subramanian2-0/+27
Change-Id: Ia8281ddc31b653ecf47c6bb5030db74de75b2e8d
2014-03-10add strict OOXML pptx import testMarkus Mohrhard2-0/+16
Change-Id: I2e4f17b7b7ab1e14c5cb0f6ce90e771d7c20a5c8
2014-03-06n#821567: Add unit test case.Muthu Subramanian2-0/+29
2014-03-04use CPPUNIT_ASSERT_EQUAL to improve error messageMarkus Mohrhard1-1/+1
Change-Id: I946f4177bef82bbac8058640f216a294582c24a3
2014-02-13Update a hatching import test according to the new valuesZolnai Tamás1-10/+10
Change-Id: I2f3504e12be63a326da189e7f69ce87ad2bdb674
2014-02-11coverity#735822 Unchecked dynamic_castCaolán McNamara1-0/+1
Change-Id: I88911159659f765e6f2c2f49d3d3e8313b2c9e8f