Instead of not reading the relative size of group shapes at all, read it
into the document model, just ignore it during painting. Visually this
doesn't change anything, however this way we can write the information
back to the file.
Change-Id: Ic24fceaacec0f831d657a35e52493e1c0e9bf626
Commit 279ff2e03371542d014bf281e73282ba8080cf6b (bnc#816593 DOCX import:
fix auto para spacing without compat option, 2013-08-28) corrected the
value of "auto" paragraph spacing, but unfortunately this triggers a
layout problem:
warn:legacy.osl:12692:1:sw/source/core/layout/tabfrm.cxx:2513: debug assertion: <SwTabFrm::MakeAll()> - format of table lowers suppressed by fix i44910
resulting in "the rest of the table is not rendered by the layout".
Given that we backported the original fix to stable branches as well,
just stay on the safe side and revert back to the original behavior in
case the document requests the web layout.
Change-Id: I72683530b5218beff084bec8218cc99946b44802
Regression from bbef85c157169efa958ea1014d91d467cb243e6f (bnc#779620
DOCX import: try harder to convert floating tables to text frames,
2013-10-01), the conversion of nested tables is delayed by default till
we know the page size. However, in case the anchor is in a table, we
should convert it right away, because the conversion of the parent table
would invalidate our XTextRange references.
Change-Id: Id41556e721c6e1c7239e4ea25abd57c999d2219b
When two floating tables were belong to the same paragraph,
import makes one of them anchored to the other instead of
anchorig both to the corresponding paragraph.
Modifications:
- Check the whole text range for anchored frames not
just one point of it.
- Save frame format's name because SwFrmFmt pointers can
become invalid.
Change-Id: Ide7c894065b619095a8e713ff0622bbea4f199b6
In Word it is not allowed to anchor a shape to
an onther shape.
That's why this code write text boxes only on the first level,
nested frames is also written out on the same level because
writeDMLText/WriteVMLText will push nested frames
into m_aFramesOfParagraph's back.
Change-Id: Ie1956ac9ac0ed56ff9611ff9763eb454f02558b9
The problem was that in case a shape had multiple (e.g. two) paragraphs,
and in case the first paragraph had an explicit character height, but
not the second, then the cursor carried over the explicit character
height to the second paragraph, but it shouldn't, as that leads to
incorrect character height in the second paragraph.
Fix this by remembering the default character height and using that in
case nothing is set explicitly.
Change-Id: I66e06d5cf192739fb254f7280c74617171d9ee6a
- Issue related to footer reference.
- Added unit test to check footer1.xml.rels
is contains in doc after roundtrip.
- Also check Id = rId1 in footer1.xml.rels file.
Conflicts:
chart2/qa/extras/chart2export.cxx
Reviewed on:
https://gerrit.libreoffice.org/7851
Change-Id: I52fa8017abb7552c7752185873ff2bfb46689367
Issue :
- Number of child nodes required by cubicBexTo should be 3 of type "pt".
While exporting, sometimes the child nodes are less than 3.
The sequence of writing these tags was getting messed up.
Implementation :
- corrected the logic for writing the sequence of cubicBexTo tag.
Change-Id: Ic26db72b2c516276c2e6452a21b4106d6a0a1a80
Reviewed-on: https://gerrit.libreoffice.org/7990
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Description:
After roundtrip
<wp:extent cx="-22327235" cy="149225" />
The cx value is negative so that the roundtrip file gives error while opening.
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Reviewed on:
https://gerrit.libreoffice.org/7898
Change-Id: I563f292ac5aaaeb0726159db1f4852a7e237f7ea
Problem Description:
- In document.xml, outerShdw dist contains the negative value after roundtrip.
- Due to negative value file get corrupted.
XML difference:
Roundtrip: Before fix
<a:outerShdw dist="-1363652116480" dir="2700000">
Roundtrip: After fix
<a:outerShdw dist="57811035" dir="2700000">
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Reviewed on:
https://gerrit.libreoffice.org/7880
Change-Id: Ied752672244d5768dee554e907f2f4d7a9d077d5
For the below captions :
ALPHABETIC
alphabetic
ROMAN
roman
ARABIC
in document.xml, captions were added as
<w:instrText xml:space="preserve"> SEQ "scientific" *ROMAN </w:instrText>
-no space after *
-Double quotes added for scientific
-For Caption ARABIC, it was comming as
<w:instrText xml:space="preserve"> SEQ scientific *Arabic </w:instrText>
it should be
<w:instrText xml:space="preserve"> SEQ scientific * ARABIC </w:instrText>
- After adding the above code, anchor value for a hyperlink tag was getting
corrupted. So aaded a fix for that.
UT which was failing due to above code changes :testBnc834035
"equality assertion failed
- Expected: _Toc363553908
- Actual : Figure!1|sequence"
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Reviewed on:
https://gerrit.libreoffice.org/7839
Change-Id: I9124eefa0ae63baf7ee3eaa2148f3c739d6fa699
There was a problem that in style.xml and document.xml in <w:ind> tag "right" & "left" margin
attributes gets added(w:right=0 & w:left=0),if these attributes are not set in original document.
(In this case LO should not write these attributes in <w:ind>)
eg. if original doc has implicit right and left indentation values set(In style.xml) and there is no
explicit values provided for some para (In document.xml) still it used to write w:right=0 and w:left=0
in <w:ind> tag of document.xml which overrides an entry from style.xml.
XML difference :
- Original file:
<w:ind w:left="567" />
- Roundtrip file Before Fix:
<w:ind w:left="567" w:right="0" w:hanging="0"/>
- Roundtrip file After Fix:
<w:ind w:left="567" w:hanging="0"/>
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Reviewed on:
https://gerrit.libreoffice.org/7816
Change-Id: Ifa01bae24d48bb38d5e255356247c46a43beefcc
Relative width of tables means relative to the page
and not to the paragraph area so we have to set
the RelativeWidthRelation property of the containing
text frame.
Change-Id: I054d22e1883eb0ed9b07b9141bb2bea956e8367e
Issue :
1] DOCX containing column break with column_count = 0
was not getting preserved after RT.
2] LO was writing column break only when column_count > 1
Implementation :
1] Removed check column_count > 1. So that if LO
encounters a column break with column_count >=0,
it should preserve it.
2] Added export Unit Test case.
Behavior after Fix :
LO is able to preserve Column Break with
column_count = 0.
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Reviewed on:
https://gerrit.libreoffice.org/7815
Change-Id: I29c77f27184ec5afed354be01fc68e0d3471bfee
Issue:
- While exporting the system used to write adjustment values for preset shape type "rect" in document.xml
with the shape guide name(adjustment name) being empty.
- This is not accepted by MS Office. Hence the file was resulting as corrupt.
Implementation:
- The preset shapes are being picked up from GetOOXMLPresetGeometry(), which refers pCustomShapeTypeTranslationTable[] array
for the mapping.
- Most of the shape types have been commented in the pCustomShapeTypeTranslationTable[] array therefore the GetOOXMLPresetGeometry()
defaults the shapetype as rect, whereas the adjustment values are being picked up for the actual shape type(s).
- Uncommenting the commented shape type translations( for instance textInflateTop) in pCustomShapeTypeTranslationTable will
eventually write prst="textInflateTop" under the tag prstGeom which is invalid.
- It should probably go under prstTxWrap.
- In order to avoid the corruption, thought of adding a check before writing the adjustment values. If the shape type is "rect"( which is defaulted
and does not have adjustment values defined in presetShapeDefinitions.xml) then avoid writing the adjustment values under this tag.
Conflicts:
oox/source/export/drawingml.cxx
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Reviewed on:
https://gerrit.libreoffice.org/7765
Change-Id: I6511e9a3ee0c01962d6e82997705a484161086ef
1. While exporting through LO, it writes numPicBullet with imagedata of size 0,0.
2. Because of this image file of 0KB is added in media folder
3. While opening the document in MS-Office, it shows the image missing at the top
which is of 0 KB size.
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Reviewed on:
https://gerrit.libreoffice.org/7744
Change-Id: I5f8f187fc4fe678dceb3f2b594de74a6b52cbe74
Problem:
Hebrew Text-Bulleted List converted to Numbered List in round trip file
Implementaion:
- Added Hebrew support for import and export for list.
- Added Unit test case.
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Reviewed on:
https://gerrit.libreoffice.org/7693
Change-Id: I739f4b74fb0451f6da80be06114c48074d1e4cdf
Mapped Property at import, so Page margins mirrored are imported correctly.
Also exported the mirrorMargins in settings.xml
Added export UT for the same.
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Reviewed on:
https://gerrit.libreoffice.org/7632
Change-Id: I2d90643f55e1dc1d96c809e28ce37dee4653bf57
Issue :
File containing Shape with text inside it having Line style as
Dash type is not getting preserved after RT in MS office 2007.
Implementation :
1] Added XML element <v:stroke> with attribute dashstyle="dash".
2] Written Export Unit test case.
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Reviewed on:
https://gerrit.libreoffice.org/7611
Change-Id: Id01c5975c2c1cf176a7459f65973f4c9c3c9b9d8
- In case of auto width to table it should export as auto.
- Added Unit Test to check it is properly exporting table.
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Reviewed on:
https://gerrit.libreoffice.org/7594
Change-Id: Id448111b81110bbc6c109f3da9195075b9b8a9fc
- In case of auto width of table and atleast one cell of table
is auto width It was setting table width to 100% relative width.
- hence it was causing rederening problem, table width was wrong
while rendering.
- Changed 100% hardcoded value, now setting total width of table
as per grid values.
- modified one UT since we no longer setting width of table to
100% default in case of 'auto' width.
- Added one UT to check proper table width while importing.
Conflicts:
sw/qa/extras/ooxmlimport/ooxmlimport.cxx
Reviewed on:
https://gerrit.libreoffice.org/7593
Change-Id: Iae396c632eb1ef0c06efaa8c1965e4a68f12c6b1
First, I updated the clang rewriter to do the conversion.
Then I lightly hand-tweaked the output for the few places where
the rewriter messed up, mostly when dealing with calls on "this".
Change-Id: I40a6a977959cd97415c678eafc8507de8aa3b1a9
Reviewed-on: https://gerrit.libreoffice.org/7879
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
In Writer shapes had no cropping property so far. With this
commit this is introduced as a FillProperty and has the same
type as the cropping used for pictures
(Picture context menu > Picture > Crop).
Layout and UI will be an other step. On the UI it would be placed
on the Shape context menu -> Area, when Bitmap is selected as fill type.
Note: In case of picture/graphic, cropping property is imported from
and exported to a:srcRect instead of a:fillRect.
Change-Id: Idc1ed2d40cb20b6992e94f14e7e4d853e1f55d02
The z-order can be any number, Word uses kind of random 32bit integers,
we count from 0. It turns out 0 and 1 may have some special meaning, as
counting from 2 (instead of 0) fixes the visibility the problems in the
bugdoc.
Change-Id: I695a625fc0ab8206cc09896bcf02ff7689f1defc
Added unit-tests to make sure that 'table cell redlines'
(e.g. - table cell was inserted \ removed) are being round
tripped correctly from a DOCX file.
Change-Id: I773cb51a39654d2640200489d5199361b56396c7
Reviewed-on: https://gerrit.libreoffice.org/7878
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Added unit-tests to make sure that 'table row redlines'
(e.g. - table row was inserted \ removed) are being round
tripped correctly from a DOCX file.
Change-Id: I369dd32e7372d0cf0add19197f07d0ad604e9ef0
Reviewed-on: https://gerrit.libreoffice.org/7849
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Colors can have modifiers like in the following example:
<a:schemeClr val="accent6">
<a:lumMod val="40000"/>
<a:lumOff val="60000"/>
</a:schemeClr>
In the case of RGB colors, the transformations are merged within the
RGB color itself on import, so there's no need to preserve the
original transformations, but that's necessary in the case of scheme
colors.
Slightly modified an existing unit test to check this feature too.
Change-Id: I3a03a56f2b633f283c392e54842b326bd4df316b
This reverts commit 138bd3d656c30911d5f45a8b6804e50857f6b30c. See
comment 5 in the bugreport, the fix in its current form causes more
trouble than it fixes.
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Change-Id: I64f64f02a2e073b96e165c81bd2f85928e5527bc
1edca1fe0aaadbd48ea23b691dc244ad2a6b6f73 (fdo#74499: - FILESAVE:System
throws a segmentation fault while saving files, 2014-02-06) added a unit
test to make sure a crash doesn't occur, except that it forgot to fix
the problem itself. Disable that for now till the real fix arrives.
Change-Id: I2dd2e2f2bb6f518acf082534bb048fb2d13e58e8
ODF standard handle 'textarea-vertical-align' as a
'graphic-property' which "specifies formatting
properties for chart, draw, graphic, and frame elements".
So this change fit to the standard.
Change-Id: I956f512953380983c2c882e943178335fd4dbfeb
Description: Docx containing text frame giving segmentation fault while saving file.
Reason found is inside writeDMLTextFrame() it was getting SdrObject pointer which is NULL
and accessing this NULL pointer was giving seg fault.
issue is fixed with commit 4de30fa7fd6abb5c2ea2b63a0e306954f7acc1b1 here is the export test.
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Change-Id: I0ab4bbf2126abbfa0fa37d2156aa3390ded0997c
Reviewed-on: https://gerrit.libreoffice.org/7894
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
There was a problem that in case of TOC,PAGEREF field tag was not preserved inside <hyperlink> during Roundtrip.
Reason found, there was no code support to handle PAGEREF in export.
Added code support in export code to handle PAGEREF.
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Reviewed on:
https://gerrit.libreoffice.org/7605
Change-Id: I1785360684d8772b71c3f45fdd2c654f94777067