If a picture contains some 2D (glow, shadow...) or 3D effect
(rotation, extrusion...), we prevent the importer from transforming
it into a XTextContent so the XShape grab bag is not removed and
the effects are preserved using the existing mechanisms. Added a unit
test for this issue, and modified some existing unit tests to match
the new behaviour.
Change-Id: I3b87069ea208604383a592d34d0a4ceb6b0f9fc7
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
Issue :
- In RT in document.xml, value of Absolute Position Offset
<wp:posOffset> was going out of bounds.
- <wp:posOffset> is of type Int(32-bits), hence it's value
should not cross the MAX and MIN limits of Int.
Implementation :
- Added check for <wp:posOffset> should not cross
Maximum/Minimum limit of Int.
- Written Export Unit test case.
Reviewed on:
https://gerrit.libreoffice.org/9328
Change-Id: I22e75d7e603ebbf6a49e764fb1a3e6a4d2fd8b23
Description :
Docx file corrupt after roundtrip.
LO insert <w:drawing> inside the <wps:txbx> under choice after RT,
if the file created in MS word 2007 and contains Word Art inside the text box.
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
sw/source/filter/ww8/docxsdrexport.cxx
sw/source/filter/ww8/docxsdrexport.hxx
Change-Id: I7421ed353cd7e9bae17b2447122090a4113f52b5
Field inside a hyperlink closed after the ending tag of hyperlink, which corrupted the RT file.
Change-Id: Ib89ead8d2f8a9eb6c8473ffd14853495ee1b2f62
Reviewed-on: https://gerrit.libreoffice.org/9330
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
* In case of symbol, symbol character get imported first and then font of symbols.
* So we are storing symbol character and when we parse symbol font then create UNO object for text.
Change-Id: If5b79521c6a59aec02b165e8120dafdd472cdaeb
Reviewed-on: https://gerrit.libreoffice.org/9281
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
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
It is not creating .rels file for Header3.xml. While the Header3.xml contains the images.
Change-Id: I3d1eb187eaf23fc05783fbfd3576d9a585de791f
Reviewed-on: https://gerrit.libreoffice.org/9286
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Problem Description :
- After RT, table preferred width in percent is change to '0'.
- After RT, width type change to 'auto' instead of 'pct'.
XML Difference:
In Original : <w:tblW w:w="3000" w:type="pct" />
In Roundtrip : <w:tblW w:w="0" w:type="auto" />
Change-Id: I20f4011520715b7c1555e82dd1ca590c4b1b9b3a
Reviewed-on: https://gerrit.libreoffice.org/9277
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
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
- The parent node for checked, checkedState, uncheckedState is getting overwritten by "text"
- text node is a leaf node, and should not have any children.
Change-Id: Ic269525001e914adc1aa328c92be5fe4d5d1b3e7
Reviewed-on: https://gerrit.libreoffice.org/9278
Reviewed-by: Jacobo Aragunde Pérez <jaragunde@igalia.com>
Tested-by: Jacobo Aragunde Pérez <jaragunde@igalia.com>
In the past, LO did not support 'outset' and 'inset' border types
for tables, so when encountering them - LO converted them to other
types of border. Now that LO supports it - DOCX and RTF filters
were changed to import these border types correctly.
DOC filter was not changed, because creating a proper DOC sample
file that has these border types (needed for the 'bordertest.hxx'
file) was not possible right now. So at least DOCX and RTF filters
are fixed.
Change-Id: Ida2449d45a0ac138388f3cbfeb41657db1d4cda9
Signed-off-by: Michael Stahl <mstahl@redhat.com>
Content-type for 'png' images was not getting added in
[Content_Types].xml. This was as only 'jpeg' and 'wmf'
extensions were handled. Modified DocxSdrExport::writeDiagramRels
to handle all types of extensions.
Added UT for the same.
Reviewed on:
https://gerrit.libreoffice.org/9252
Change-Id: I5e068d4db14f3a43be08a4b7c9bf265f388bf356
Issue :
LO was exporting DOCX containing MultiColumns with additional
Section break Continuos.
Implementation :
1] Added check for Column_count in MSWordExportBase::WriteText()
If Column_count > 1 and Text node is empty then do not
export Section Break.
2] Written Export unit test case.
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Reviewed on:
https://gerrit.libreoffice.org/9200
Change-Id: Ibf3e6bd2d4827aa77a659b1600939cc56d65a63b
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
The cell property w:shd was not being properly preserved when the
shade value was different from "clear". The shading affects the cell
color and the exporter was not taking that into account when comparing
the cell color with the original color to know if the user had changed
it.
Besides, we were not preserving the attributes themeColor, themeTint
and themeShade.
I have modified the existing unit test testTableThemePreservation to
add a check for those new attributes.
Change-Id: I06d2e668486803cba039eacb717a69413bd5a1df
Regression from commit f5ccbfdc561c68099872d1abe07ac72fcddedd35 (oox
customshapepreset: switch to generated data -> code, 2014-04-17).
Change-Id: I2106271e2f43e7936237628e47cd4e01ab34441c
The margin of the floating table from top of the page is not being preserved correctly and it also get increased.
The w:tblpPr tag is also not preserved.
Reviewed on:
https://gerrit.libreoffice.org/9185
Change-Id: I8a27a4bab94a1afd27a7ba49ca55ff014918fffc
Case 1: If PAGEBREAK appears in first paragraph, LO was inserting
BreakType_PAGE_BEFORE but since it was first paragraph, PAGEBREAK
was not rendered in LO hence not exported back to docx file properly.
case 2: If PAGEBREAK appears after first run of any paragraph in document
LO was rendering it in wrong paragraph.
case 3: If COLUMNBREAK appears in first paragraph of section, LO was not
rendering and exporting it.
Change-Id: Ic557b3e6f80cfa6dd3eb6b4204be7e6531b9ecbf
Reviewed-on: https://gerrit.libreoffice.org/9191
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
For commits 1139d618b8bc6ab823a96184bd0f0257980aad24 and
893fe88469dec5b727d96f8ea1b4edb9e88288a7 .
Change-Id: Ia59ec5c4226944280c4b585c87179d28303bda4b
Reused most of the code of other effects, but adding some new
attributes specific for this effect. Finally, modified an existing
unit test to add a check for reflection.
Change-Id: Iffd0c1203e9c66a8d7b7f748d98d9c3ef01c7bbf
Reused most of the code of outerShdw and innerShdw effects. Modified
an existing unit test to add a check for innerShdw.
Change-Id: I7328fe696721d28c35b26ca1b702c7f64c63ab21
Reused most of the code of outerShdw and innerShdw effects, but adding
a new attribute "rad" and a flag to check if a color definition must
be written inside the effect definition. Finally, modified an existing
unit test to add a check for softEdge.
Change-Id: I0d32714bde9a5b05c726acd47b85b1dea3c6a581
Problem description:
The LO is not able to save the file if exported multiple times and the exported file is used as input.
The main root cause is Extra Line breaks getting added even though there is no text available.
Change-Id: I0afb52380912cae140d7ded694cb7cae9a8362a9
Reviewed-on: https://gerrit.libreoffice.org/9112
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
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
Given that CppunitTest_sw_ooxmlexport and
CppunitTest_sw_ooxmlsdrexport run in parallel, the
CppunitTest_sw_ooxmlsdrexport is way smaller, moving stuff from
CppunitTest_sw_ooxmlexport to CppunitTest_sw_ooxmlsdrexport speeds up a
toplevel 'make' a bit.
Change-Id: I97297404bc3a02b6ca65552670edf16137deb264
RT file gets corrupted because in presetgeometry tag shapetype is coming as blank.
A check is introduced to handle that.
Reviewed on:
https://gerrit.libreoffice.org/9147
Change-Id: Ie79db0f5dcadfa3cd5d3f54d4a676393b3a882c5
Document containing track changes within a SDT content
is getting corrupted.
Reason for corruption: In export side,parent tag [SDT] is
getting closed before child tag ['del' tag].
The corruption is resolved now.
Change-Id: I42451495f80e30ddfebab8b81bcf1e309b0c2ca2
Reviewed-on: https://gerrit.libreoffice.org/9146
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Description:
If SEQIdentifier for TOC field \c is not there then blank "" are getting added
due to which opening of RT file in LO was causing system hang.
Implementation:
1) Check added for SEQIdentifier, if found then add SEQIdentifier with ""
e.g. {TOC \c "SEQ"}
2) If SEQIdentifier not found then don't add ""
e.g. {TOC \c}
Change-Id: I9dbfa1db51358908b246456201428de8b4104e10
Reviewed-on: https://gerrit.libreoffice.org/9145
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
The embedded excel (xlsx) when inserted on its own (unlike with chart) is getting converted to ".bin".
Note that only extension differs otherwise its an excel file only.
There is no loss of user experience in editing the file in MS Word.
The similar case is also exists when power point is inserted on it's own.
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Reviewed on:
https://gerrit.libreoffice.org/9126
Change-Id: Ie13c098a794179c3b27100a7b9e30884fb47f656
- The image data stream for the targets of relId's were getting overwritten,
therefore the data was getting loss.
- Added anchor id as part of computing a unique name for images.
- Added UT for the same.
Change-Id: I999ba1b3701ef357641dd0365403a5d7ad8d18aa
Reviewed-on: https://gerrit.libreoffice.org/9121
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>