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
When two pictures apply different effects to the same picture, it is
only saved once in the original document. Added a cache to DrawingML
to know if the picture has already been exported, and added a test
for it.
Change-Id: Ia25f3d8f2f46d61f18aefc22fdfdbcdc72f2d916
When Word applies an artistic effect, it creates two embedded files;
one contains the bitmap with the effect and the other one contains the
original bitmap to be able to undo the effect.
This patch reads the original bitmap, stores it in the shape grab bag
and saves it back to the docx file. Added unit tests too.
TODO: right now, if two effects point to the same original bitmap it
is stored twice, we should improve this.
Change-Id: Ia72034a257739abe4ffafa0f42b2a912e4bf9436
Bitmaps can define artistic effects like in the following example:
<a:blip r:embed="rId5">
<a:extLst>
<a:ext uri="{BEBA8EAE-BF5A-486C-A8C5-ECC9F3942E4B}">
<a14:imgProps
xmlns:a14="http://schemas.microsoft.com/office/drawing/2010/main">
<a14:imgLayer r:embed="rId6">
<a14:imgEffect>
<a14:artisticMarker trans="14000" size="80" />
</a14:imgEffect>
</a14:imgLayer>
</a14:imgProps>
</a:ext>
</a:extLst>
</a:blip>
LO core doesn't support them, but I'm preserving them using the shape
grab bag. Bitmaps must not be transformed to a SwXTextGraphicObject
so the grab bag of the XShape is not discarded.
Added several Context and Properties objects on the import side to
traverse and save the relevant tags, and added the corresponding code
on the export side to extract the grab bag and output the effect back.
Also added a unit test for a selection of artistic effects.
TODO: Word saves the original bitmap as an embedded wdp file so the
effect can be undone. We must preserve it too and add the reference to
the a14:imgLayer tag.
Change-Id: I61d427f83e4c8f353eb073da0114cd73ba50ba4b
Transformed the preservation process of shape effects to be able to
store more than one effect. For that we:
* Created the Effect struct and added a vector member to the
EffectProperties struct.
* Changed the shadow effect to use the new Effect struct,
EffectShadowProperties struct is preserved because the direction
field still has some use but we should remove it.
* Changed the structure of the grab bag to store more than one effect.
* Modified an existing unit test to check shapes with several effects.
Change-Id: I0dd908fa1d9578827c02ef6272fc9e2b914391be
Implement a clang plugin to find them, and clean up existing code
to pass them by reference.
Change-Id: If642d87407c73346d9c0164b9fc77c5c3c4354b8
Reviewed-on: https://gerrit.libreoffice.org/9351
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Shapes 3D effects can specify colors for extrusion and contours like
in the following example:
<a:sp3d extrusionH="25400" prstMaterial="metal">
<a:extrusionClr>
<a:schemeClr val="accent5">
<a:lumMod val="40000"/>
<a:lumOff val="60000"/>
</a:schemeClr>
</a:extrusionClr>
<a:contourClr>
<a:srgbClr val="3333FF"/>
</a:contourClr>
</a:sp3d>
Colors can be theme-defined or set in RGB and can contain
transformations.
This patch preserves all the color information using the shape grab
bag and modifies an existing unit test to add this check.
Change-Id: Ida168affd4ca2135d0bd8f97135dc1cd1e74165a
Shapes 3D effects can specify a material like in the following example:
<a:sp3d prstMaterial="metal" z="488950" />
This patch preserves the prstMaterial attribute in the sp3d tag using
the shape grab bag and modifies an existing unit test to add this
check.
Change-Id: I7be2dbbcc7e599d5f0fb8fa53ec1d180c18d8ebd
Shapes 3D effects can specify top and bottom bevels like in the
following example:
<a:sp3d z="488950" extrusionH="63500" contourW="50800">
<a:bevelT w="139700" h="88900" prst="cross"/>
<a:bevelB h="88900" prst="relaxedInset"/>
</a:sp3d>
This patch preserves the a:bevel* tags and their attributes using the
shape grab bag and modifies an existing unit test to add this check.
Change-Id: I4762111e4d2f75ba2fd3721a126aa324a28a853c
Shapes can contain 3D effects like in the following example:
<a:sp3d z="488950" extrusionH="63500" contourW="50800"/>
This patch preserves the a:sp3d tag and its attributes using the shape
grab bag and modifies an existing unit test to add this check.
Change-Id: Ice3cae39c71784be0f6c7f2700b07c21a5e1fb6e
Shapes can contain 3D effects like in the following example:
<a:scene3d>
<a:camera prst="isometricLeftDown" zoom="150000"/>
<a:lightRig rig="threePt" dir="t">
<a:rot lat="0" lon="0" rev="4800000"/>
</a:lightRig>
</a:scene3d>
This patch preserves the a:lightRig tag, its attributes and the child
element a:rot using the shape grab bag. It also adds a unit test for
this case.
Change-Id: I66b6de3c2b5ef89223b10da54006e28113b8ba5f
Camera options in shape 3D effects can have rotation settings like in
the following example:
<a:camera prst="perspectiveRelaxedModerately" zoom="150000">
<a:rot lat="19490639" lon="0" rev="12900001"/>
</a:camera>
This patch preserves the a:rot tag and its attributes using the
shape grab bag. We created the class Scene3DRotationPropertiesContext
to be piled on top of a Scene3DPropertiesContext and process the
contents of the child item. It also adds a unit test for this case.
Change-Id: Id6bf58ad05fe5b49061619b6750ed0658badc9af
Shapes can contain 3D effects like in the following example:
<a:scene3d>
<a:camera prst="isometricLeftDown" zoom="150000"/>
<a:lightRig rig="threePt" dir="t"/>
</a:scene3d>
This patch preserves the a:camera tag and its attributes using the
shape grab bag. It also adds a unit test for this case.
Change-Id: Ic6a78031d2e1fb84a2bacd97b5cc9c55d9dbaa95
Code for these two classes was already present but it was commented
out or left outside of the build system because it didn't even
compile. I've brought it back and made it compile, but it has no use
yet. The goal is using it to preserve 3D transformations.
At scene3dcontext.cxx I removed the text chunks found in the middle
of the source and corrected some mistakes; I also modified the
conversion of "fov" attribute.
At shape3dproperties.hxx I removed all the struct members because
they seemed to have been copied&pasted from another file, and added
only those members that made sense. Removed useless function
definitions.
Change-Id: I2c00ea638e1a4fb1a3820bc4c322488296d3e6d7
Reused most of the code of outerShdw effect. Modified an existing
unit test to add a check for innerShdw.
Change-Id: Ifdd77850bfd3b5fa250594469455b1b66c338611
The goal is preserving the shadow effect with all its attributes using
the shape grab bag. This is the relevant piece of XML in the document:
<a:effectLst>
<a:outerShdw blurRad="50800" dist="38100"
dir="2700000" algn="tl" rotWithShape="0">
<a:schemeClr val="accent1">
<a:alpha val="40000" />
</a:schemeClr>
</a:outerShdw>
</a:effectLst>
In first place, we added members to the structure EffectProperties to
store the effect name and attributes. Later, when we create the shape,
we add them to the shape grab bag together with the shadow color (if
it is a theme color we store its name and transformations like in
other cases). Finally, we read back all these data from the shape grab
bag and write them back to the document.
I added a unit test for this shape property.
Change-Id: Idda2d5e2970cb8563e2ed13a84b2fa2d4b99aa70
Added support for linked textboxes for docx interoperability.
Reviewed on:
https://gerrit.libreoffice.org/9092
Change-Id: I7db4f5a1783afff53c64908d182788b262f5e863
It was already possible to dump a PropertyMap as code, but not as data.
The plan here is that if we dump the customshape preset definitions as
data, then once there is a parser for it, we can get rid of the ugly
generated code.
Change-Id: If596941fedf71693e5d0bff436446ac0855c4c84
Z-Index was not handledin LO for vml.
I have made the changes to handle that using aGrabBag.
Change-Id: I2af3b2974c8eb699bc6a7b743dc438584d6517ac
Reviewed-on: https://gerrit.libreoffice.org/8833
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
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
...mostly done with a rewriting Clang plugin, with just some manual tweaking
necessary to fix poor macro usage.
Change-Id: Ie656f9d653fc716f72ac175925272696d509038f
Document encryption and decryption uses either NSS or OpenSSL to
calculate digest. Digest class hides the implementation details
between the two implementations. Previously, functions sha1 and
sha512 were used for this, but were less generic.
Change-Id: I60119e2ab9c5c1f4a2b02bc417c3c89c53a63fda