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>
Section properties are not imported if the section starts with a table for DOCX,
and also for a few RTF files with combination of tables and section breaks.
SwXBodyText::createTextCursorByRange is not able to find the start of section and hence
section properties are not applied.
As a workaround added an empty paragraph at the beginning of every section
which has the the first element as a table. And then removed it when the
section ends ( DomainMapper::lcl_endSectionGroup is called).
Also handled to add the paragraph earlier, if there is a bookmark
so that the bookmark is not attached to the dummy paragraph.
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Reviewed on:
https://gerrit.libreoffice.org/9097
Change-Id: I717ba40e22b055d974bc83d4414aeb2945e16d26
Reused most of the code of outerShdw effect. Modified an existing
unit test to add a check for innerShdw.
Change-Id: Ifdd77850bfd3b5fa250594469455b1b66c338611
Docx's w:gridBefore means that there should be this given space in the table
grid before any cells come. But writer requires tables to be rectangular, so
the space needs to be faked using cells without border. So far so good, but
now reality in the form of the retarded overdesigned writerfilter comes.
The internal representation of table data (and not just one actually) is
pretty non-obvious and hard to modify, seems to be modelled just to follow
the parser data the way it comes. Moreover dmapper gets notified of w:gridBefore
only after cells in the row have been already processed. So after futile attempts
to add the fake cells somehow in dmapper I've eventually given up and hacked up
input handling to fake input as if the fake cells were actually there (which
was tedious to find out as well, but at least it's reasonably doable).
Change-Id: I7107e13f28dd3f7093688782f64238167cead76f
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
- Textbox run character properties are change after roundtrip
- Italic case was not handled in textcharacter properties
Reviewed on:
https://gerrit.libreoffice.org/9096
Change-Id: Ia38fcadce489ef0bfffb9bda402d13058cf6129a
In case the URL text has multiple portions, then MSWordExportBase
generates multiple URL's anyway, and this helps to avoid loosing some
direct formatting of the remaining portions of the paragraph.
Change-Id: Ifd72741de610ce69b9ae0978aa8f9a532a3aeed2
Previously only the number of nested sprms / attributes was compared.
With this, the font of the bugdoc is correctly Arial, not Times.
Change-Id: I351de414b6734336b31c1334dbd2349072f16002
Added support for linked textboxes for docx interoperability.
Reviewed on:
https://gerrit.libreoffice.org/9092
Change-Id: I7db4f5a1783afff53c64908d182788b262f5e863
The test document has 4 pages which only contain frames, first 3 pages
(sections) have <p> block with <framePr> and another <p> with just <sectPr>,
and the second paragraph would be removed, thus there would be no nodes on which
to actually set the page style and they would be set on nodes for the previous
page, overwriting its page style. The last page does not have its own <p>
at all, so it needs to be faked.
The changes in finishParagraph() are because of e.g. the comments-nested.odt
sw test, which there causes exception because of unknown property ParaStyleName
(comments do not use those it seems) and the code is skipped over (which
is probably a bug on its own, but it's unrelated to this change otherwise).
Change-Id: I9d37f992407a9b649c710d2a031ec4447fb11771
Regression from a48e2fd9049797110b3b2505c363557284987ca8 (fdo#44736 -
convert RTFSprms to a copy-on-write structure., 2012-12-07)
Change-Id: I2538f440e29cef6d40db2ea914e4afcbfe411890
Description:
For pStyle = 'NumberedList1', iLvl and numId was not preserved.
These tags needs to be preserved under numPr in document.xml
These tags are preserved now.
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Change-Id: Ib6734c9ae55bd72d4fbc0f6d6cae85764ac1a244
Reviewed-on: https://gerrit.libreoffice.org/7767
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Problem description:
For the images who has the "Text wrapping" property set as Behind Text
is not preserved after saving the file in DOCX format using LO.
Reviewed on:
https://gerrit.libreoffice.org/9065
Change-Id: Ic8555103909c0f1ed1cb58fba4dc2ef2f84cc9dd
1. Open the attached file in LO which has images [.TIF] format
2. Save the document as DOCX
3. Open the saved document in MS-Office or extract the content of the saved docx file.
In [Content_Types].xml , .tif extension is changed to .tiff.
Change-Id: I73baea9ad6cd991b04d47e23865b77432127a510
Reviewed-on: https://gerrit.libreoffice.org/9010
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Description: There was a problem for some documents, that when opened in LibreOffice
extra image was getting added to the first page of the doc and same could be noticed
even in RoundTripped doc.
The root cause was if picture bullet is added to the doc and there is no <w:lvlPicBulletId> tag
in <w:lvl> of <w:abstractNum> then removal of extra added graphic object from document body was
getting missed because currently that is handled in ListsManager::lcl_sprm() inside "case NS_ooxml::LN_CT_Lvl_lvlPicBulletId".
Checking if there is any remaining item in m_aNumPicBullets when LO hits the ListsManager destructor.
If there is any calling dispose() for all of them.
Change-Id: Ibfc3c93b68ff7d6ef0909fe789dda6db67ac11e2
Reviewed-on: https://gerrit.libreoffice.org/8940
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
This patch fixes an error in commit
c6ff03f37a6898f50a5ca07152168fb4fe911e05.
And now that fdo#75722 is fixed, I completed the existing unit test
for this bug with absolute position checks.
Change-Id: I76b4fa046db9b946fd23194e91686ffa4fcb5362
The DML importer used a tranformation matrix to rotate the shape, but
I replaced it with the same code that's being used in the VML importer
in which the position is correctly set.
I've noticed that I cannot use that code in all cases thanks to the
existing unit tests; that's why I added the bUseRotationTransform. In
case it is set to true the existing transformation matrix rotation is
used.
Finally I added a unit test for this case.
Change-Id: I260c14b42d169def786e15484e4ecb1d8e8584e4
Description :
In StyleSheetTable.cxx, while setting the property "ParaInteropGrabBag" throws an exception.
Hence rest of the properties are not set.
Implimentation :
Skip that property so that rest of the properties will not be lost.
Change-Id: Id488de71bc5f893a7401420d9e63e4405b90f760
Reviewed-on: https://gerrit.libreoffice.org/8902
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
There are two issue related to table in the saved(exported) file
- the table alignment in saved file is "left" instead of "center"
- the table width type in properties is "auto" instead of "dxa"
In the issue file alignment was specified in w:tblpXSpec="center"
and so were missed at import. Added support to fetch
HORI_ORIENT from frame properties if its not set in Table Properties
The ::GetTablePageSize returns 0 if the table width is FIXED.
Modified it to return the tableWidth in such case.
Conflicts:
writerfilter/source/dmapper/DomainMapperTableHandler.cxx
Reviewed on:
https://gerrit.libreoffice.org/8846
Change-Id: I02a3af5e9d8ef3746c4d6bec0a07a24e01cc12a4