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
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
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
XShapeDumper is now also dumping the
InteropGrabBag property as a new empty element.
In the future, new "private" properties added to
the grab bag could be dumped too.
Updated the unit tests accordingly.
Change-Id: I7526dbd64bdc08915dc71f1167f05224118f17a6
Reviewed-on: https://gerrit.libreoffice.org/5848
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
This reverts commit 5fe65c0c5e5a8d815d9d15ef192e7652726662e6.
Unfortunately this causes a regression elsewhere.
This also disables the unit test for this bug - will re-enable when I find
a fix that both fixes this, and does not regress other stuff :-)
Change-Id: Iad334e3c59c928edb78f25c0f36a33a26a7e6125
This reverts commit eaeaafbf20629e2e2eb111b71ddcc78ab81aec55.
I must recognize I don't understand why it doesn't work but since most of the tinderboxes are red...
This reverts commit 979def88090633bfee0e0445b19999a1dac71ed4,
this time manually confirmed that the import layout does change, but that it
appears to be all desirable changes
Change-Id: Iee5e5ebd16989f65569b02f8b4f6570985157dfc
Guard against xml:id load breakage, that cause fdo#64512 and
fdo#60075. Both connector shape and animation references need it
to work.
Change-Id: I7883d1d27eae02f605c83217a2e1b83934b31483
+ update the expected dumps together with that.
This allows testing of the other part (wrong text color and size, commit
55c63ccfd460895af22e91979967cec15d80b72d) of n#758621 too.
Change-Id: Ie93feb9d9d05eb4e11106bf9aa1f237947351b4e
This also adds instructions how to easily add tests for which it is enough to
check the drawinglayer dump.
Change-Id: Ieaf261a9be0c8da2fa81c075dadebcac0c07def5