Commit Graph

89 Commits

Author SHA1 Message Date
5b63c12ace n#708518: sd: check that master page matches when setting parent style
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)

Change-Id: Ie563d5ee5c2040aeb6ca5c8bb25b195e15ea964e
2014-08-29 19:18:42 +02:00
a870b029a0 bnc#822347: Test for bullet character defined as '' - empty char.
Change-Id: Ie771a5e53f04c0cd307d24a8bfc3ab7bc9a3094a
2014-08-28 13:50:48 +02:00
e99535df4d remove executable bits
Change-Id: Iec785ae538de81325812b1e6fe33115789b39770
2014-08-17 05:50:13 +02:00
82127a86dc Update test data to match my gradient handling change
Thanks to vmiklos for pointing me to the instructions.

Change-Id: Ic95ef443beceb9a30e4179cf2364bd753992c05e
2014-07-16 23:21:05 +03:00
3d76a540f6 Unit test for cell properties, where lastRow is used in table (bnc#887225)
Change-Id: Ia11dadcbedf6acc035b2d86da39a115bdb298591
2014-07-15 14:29:44 +02:00
9388c45c02 bnc#882631: Do not hide top of the first row when editing text in table cells.
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
2014-06-24 20:39:24 +02:00
fc577e4f41 Revert "bnc#882631: keep line visible if proportional line spacing is < 100%."
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.
2014-06-21 09:40:04 +02:00
5158f5e9fd fix sd_import_tests after e42c05c1f96832572e525d85d89590f56f5a29dd
Change-Id: Ife852a6c7c360c66a7d7d5b144f18898398505dd
2014-06-17 12:49:14 +02:00
e38acfa15b Reduce test doc size, use a simpler gltf model
Change-Id: I5bd78343728f8a4d68610397a7be328826a0334c
2014-06-16 14:12:39 +02:00
04b7b2c72f Fix gltf export: close plugin element before export fallback
Change-Id: I2e1f27e535ee45259f7bdf783ea5224b2ad559ef
2014-06-16 13:55:40 +02:00
4d8c4e7fe3 glTF import/export: fallback must be the second one inside the frame
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.

Change-Id: Ib9b2044b1f36b32d980cb79f6dac8dcf94d6209b
2014-06-16 12:59:19 +02:00
9ee69cbd6f glTF export: Use plural folder names
Change-Id: If17628395ede512c00b666efc5511d9711edfb5a
2014-06-16 12:58:52 +02:00
e8fcf1153f Change glTF mime type: {application -> model}/vnd.gltf+json
There is no an accepted mime type for glTF models yet, so
follow collada's mime type: model/vnd.collada+xml.

Change-Id: I1e23a95dbb0caea781dade819f8e08235cb5c1dc
2014-06-12 21:43:36 +02:00
fe70101856 Introduce HAVE_FEATURE_GLTF to enable/disable gltf related code
When it is a release build then enable it only on Windows and
Linux.

Change-Id: I7c462aeb75e6ab60eeaa0fa42ca7853a6369b742
2014-06-12 21:43:35 +02:00
98dd0f2bb5 Related bnc#862510: extend handling of txXfrm
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
2014-06-10 19:08:59 +02:00
46d682eec9 bnc#880763: PPTX import: wrong z-order becuause of wrong import order
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
2014-06-06 16:50:04 +02:00
639571d52b 2nd part of bnc#870233: import font color from color fragment for SmartArts
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
2014-06-06 10:28:18 +02:00
31650d5b42 1th part of bnc#870233: wrong list style in shapes
Text list styles were copied, without proper
copy constructor and operator. It lad to mix
up list styles and so text font.

Change-Id: Iee7a6c0c1f74322fd7b80e41a262849f948e463a
2014-06-06 10:28:18 +02:00
53c376d35b bnc#870237: wrong text position in grouped list
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
2014-05-30 13:45:36 +02:00
2ea006fb60 fix sd layout unit test
Change-Id: Ica34592788005cc3c96987b1c6c9625dd6359c76
2014-04-23 16:02:04 +02:00
c79a5f87b1 remove executable bit
Change-Id: I91f6e861f6d0dbea1b57ac73857e0c706b27f681
2014-04-17 15:11:14 +02:00
25a2eab227 fdo#77027: ODF import: fix wrong version in check for embedded objects
SvXMLImport::LO_4x does not mean 4.0+ any more.

(regression from 92cb21ebeda98c5193c50c4cf7ef3d60611c2a52)

Change-Id: Ib444762c2d6e4d051e99962eaff1b1ed34af983a
2014-04-16 00:33:22 +02:00
e679c101ac sd html: impress html export test
Change-Id: I710868b4cb19cec2820c3cf699dd5d855e3da7e2
2014-04-13 23:13:57 +02:00
327b0a6cc0 ODP filter test: embedded media and glTF model
Change-Id: I2340fa5a20a5774e5db78940cf7d4dc584f09b82
2014-04-04 19:06:13 +02:00
186b96dcfb Add unit test for text gradfill import.
Change-Id: I803238fd21d1c73aae8146966a5e62e62ad48c5c
2014-03-28 17:40:49 +05:30
b3b843481d write (no)wrap of text only for custom shapes to .pptx (fdo#71961)
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-27 22:57:43 +01:00
b566aa7f16 Add unit test for left spacing (anchorCtr)
Change-Id: I8fa347497c9509285c5f0422c618efcb360dbd34
2014-03-27 13:27:29 +05:30
31b8ce1153 Add unit test for text rotation.
Change-Id: Iba4e002c461f00807f277e6032afcdaaf25ea4a2
2014-03-27 13:27:28 +05:30
1e188aa004 update test files
Change-Id: I937a85fa7bda7df13e79e704973c21bfc732ba66
2014-03-25 09:29:57 +01:00
acd03d7050 fix unit test 2014-03-23 06:57:05 +01:00
2796aa203c n#862510: Adding unit test case for baseline=0
Change-Id: Ia8281ddc31b653ecf47c6bb5030db74de75b2e8d
2014-03-17 14:08:49 +05:30
ed3fc457e1 add strict OOXML pptx import test
Change-Id: I2e4f17b7b7ab1e14c5cb0f6ce90e771d7c20a5c8
2014-03-10 18:17:21 +01:00
e8c00c4091 n#821567: Add unit test case. 2014-03-06 16:00:47 +05:30
4a25c65fcd Update a hatching import test according to the new values
Change-Id: I2f3504e12be63a326da189e7f69ce87ad2bdb674
2014-02-13 15:25:58 +01:00
0583c889c3 sd/qa: Remove InteropGrabBag property from XML dumps
The InteropGrabBag property adds a lot of noise to this tests and it
doesn't actually have any purpose, because we are building their own
tests for InteropGrabBag-supported document attributes.

We have removed this property by default but we left a flag to enable
it when it's convenient for debugging.

Change-Id: I97cc7ba171783222a57ab5a96e5755070b949505
2014-01-28 10:36:11 +01:00
bc0a9076aa ooxml: Preserve shape theme attribute for solid fill
Users can select the fill color for a shape among the theme-defined
colors. This results in the following XML:

  <wps:spPr>
    ...
    <a:solidFill>
      <a:schemeClr val="accent2"/>
    </a:solidFill>
    ...
  </wps:spPr>

Now we store both the original fill color and the name of the
theme-defined color, if it exists, on the import phase. They are put
into the InteropGrabBag of the shape with the names
OriginalSolidFillClr and SpPrSolidFillSchemeClr. Additionally, we
needed to to store the decoded theme color inside StyleFillRef.

On the export phase we have to take into account several combinations
of factors:
* If the final color for the shape fill is different from the
  original color, we must ignore any theme attributes and write the
  new color.
* If the fill color is unchanged and some theme color exists, we must
  write the theme color.
* If the fill color is unchanged and no theme color exists, we must
  check if the original color matches the style-defined color. If it
  does, we must not write any <a:solidFill> tag.
* Otherwise we must write the <a:solidFill> tag with the RGB color.

The method putPropertiesToGrabBag was added to the Shape object for
convenience.

The data files for some /sd/qa/ unit tests were updated to reflect
the new properties inside the Shape InteropGrabBag.

Change-Id: If0915c5442872a8acab0a8a081f60c89c97277bd
2014-01-18 14:51:43 +01:00
15e01d90b9 ooxml: Preserve shape style attribute fillRef
Shape style attributes contain the default format for the shape in
case that no direct format is specified for it. This is an example
of the attribute we want to preserve with this patch:

  <wps:style>
    ...
    <a:fillRef idx="1">
      <a:schemeClr val="accent1"/>
    </a:fillRef>
    ...
  </wps:style>

The relevant values in these tags are stored at the maShapeStyleRefs
member in the Shape object. The storage happens at
ShapeStyleContext::onCreateContext which is run when the <a:fillRef>
tag is opened. The ShapeStyleRef object contains the idx value and a
Color object which will contain the inner tag <a:schemeClr>.

The Color object has been modified to store the string value of
schemeClr. The storage happens at ColorValueContext::onStartElement
which is run when the tag <a:schemeClr> is opened.

Later, Shape::createAndInsert is called by the ShapeContextHandler to
create the actual XShape, this happens when the tag <wps:wsp> is
closed. createAndInsert puts idx and schemeClr values into the
InteropGrabBag property of the XShape with the name StyleFillRef.

On export time, when the shape data is written at
ShapeExport::WriteCustomShape, we added a call to
DrawingML::WriteShapeStyle. This method will check the existence of
the InteropGrabBag property in the shape, read the StyleFillRef prop
inside it and output the proper XML to the style definition.

DrawingML::WriteShapeStyle also writes some mock tags into the
<wps:style> because we found that they are compulsory. We will
replace them with the proper data in further patches.

The method putPropertyToGrabBag was added to the Shape object for
convenience.

The data files for some /sd/qa/ unit tests were updated to reflect
the new property StyleFillRef inside the InteropGrabBag.

Change-Id: I5ffa5242852461a1a709a8f169d40f0d7a2c9aa3
2014-01-18 14:51:42 +01:00
ee6eadfc61 fdo#72998: Add unit test case. 2013-12-30 18:07:00 +05:30
beba4603ee fdo#72998: Custom shapes have improper size. 2013-12-27 19:59:22 +05:30
3b9b2e2d98 n#828390: Unit test for bullet's relative size. 2013-12-19 18:17:27 +05:30
33b59c5557 n#828390: Add unit test for font properties export. 2013-12-18 20:01:11 +05:30
eea8c671e4 n#828390: Unit test for resetting char escapement. 2013-12-12 18:54:00 +05:30
0b578e51cd n#828390: Add unit test for new line import. 2013-12-12 13:21:33 +05:30
a850e62cd2 Fix unit test case.
This would test for white spaces in text import.
2013-12-10 21:57:11 +05:30
6fd352dc3a unittest for fdo#71434
Change-Id: I4ef376e048aa0ba37e5c1bc7664e9e8cd3e283b6
Reviewed-on: https://gerrit.libreoffice.org/6985
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2013-12-08 09:15:51 +00:00
a9562d5e3c XShapeDumper: empty name should not be dumped
Change-Id: Ic1ab8840c9e543cebf322de922b01739684789ad
2013-12-08 14:18:56 +07:00
4db9ae4479 sd/qa/unit: move and rename some files for consistency 2013-12-08 14:18:55 +07:00
32f700a683 fdo#68594: Adding unit test. 2013-11-25 19:39:20 +05:30
22db67c9b6 n#828390: Add unit test case for subscript export. 2013-11-14 13:45:09 +05:30
3752d67c05 fdo#71075: Adding unit test for chart import (odp) 2013-11-06 15:40:30 +05:30