There was a problem if
1)Document is created in MS word
2)then opened in Libreoffice and edited by adding Image and Caption
3)saved back to docx format
4)Attempt to open the DOCX file in Word. Word was crashing.
Problem was if any doc is edited in LO by adding image and Caption LO adds image as anchored inside TextBox.
Which MS word doesn't support(Anchored image inside TextBox).
Verified code changes on both MSWord2007 & MSWord2010 as it was crashing both earlier.
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Reviewed on:
https://gerrit.libreoffice.org/8354
Change-Id: I621d0c5e3acbf9e1fc8514aa70110aa863748ceb
When number of columns in the Index is not specified
by the "\c" switch, then avoid adding the section breaks
explicitly before and after the Index Section and "\c '0'"
in the field identifier string.
Also added UT for the same.
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Reviewed on:
https://gerrit.libreoffice.org/8104
Change-Id: I56826f72beea580d0ac5aef44d4a71fd29b77316
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.
- Also added <w:webHidden /> tag for PAGEREF
- Earlier pushed code changes was corrupting some documents.
- Verified this patch on large set of Docx containing different combination of hyperlinks.
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Reviewed on:
https://gerrit.libreoffice.org/8048
Change-Id: I2331a33100ed77e15a39ecc6db01b0e696ea62de
The number of columns in an Index is given by the "\c" switch.
During export, added section breaks before and after the Index;
this is to preserve the layout of the round tripped file in MS Office.
Modified MSWordExportBase::NoPageBreakSection so that
an incorrect "nextPage" section break is not exported.
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Reviewed on:
https://gerrit.libreoffice.org/8047
Change-Id: I364e19d6739c4c6a60e3c605044fc1fafd9147d3
Issue :
'Break to Next Page' gets converted to 'Page Break Before'
in RT.
XML diffrenece :
- LO exports <w:br> as <w:pageBreakBefore /> in document.xml
- The page break is written into wrong paragraph.
Implementation :
1] Removed implementation to export <w:pageBreakBefore />.
2] Added a check to write <w:br> in correct paragraph.
3] Modified code to handle SectionBreak() even if Text node
has no string.
It is required when DOCX contains a PageBreak with footer.
4] Written Export Unit Test case.
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Reviewed on:
https://gerrit.libreoffice.org/7891
Change-Id: I237b9c5fdd3083b441f6e81cd8442f458eccf1a0
Problem description:
- If the document contains a hyperlink in footer
that starts with "www" (ex. www.google.com) then
the footer1.xml.rels of the roundtrip file contains
empty Target.
- Since the target is empty, the file get corrupted in MS Office 2007.
Implementation:
- If hyperlink starts with "www" then make bSmart as true.
Change-Id: Ifa2b587d3326152b2d9778bd818fbe68b1cf6410
Reviewed-on: https://gerrit.libreoffice.org/7766
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
The previous fix for this bug only fixed a symptom, this a fix for the
real problem; with the real problem fixed the nCellEnds is unnecessary.
Given that top-level table properties may be put either before or after the
table cells, the only way that works to import tables is to buffer a whole
top-level table row, but currently the buffer is replayed already at the
end of a nested table row.
Fortunately the RTF spec guarantees that \nesttableprops must occur
after the nested table cells of the nested row, so it should be
sufficient to remember the cell properties for the current nested table
row only, in addition to the cell properties for the top-level table row.
With this change, skipping a \nesttableprops destination when there is
a table style turns out to mangle ooo98040-1.rtf badly, so stop doing
that workaround.
RTFDocumentImpl::popState() was copying various buffers up the state
stack which is a clear indication that these shouldn't be members of
RTFParserState in the first place, move them to RTFDocumentImpl.
Change-Id: Ic2d8f7b3e00844b224d61605b405ca651239e5f7
In case the underlying UNO object supports that, which is the case for
Writer. Export was already working before.
Change-Id: I4676c8349ebe1959da004d6e1a024a342da45049
Issue :
- DOCX containing Numbered lists- Strating with
value '0' is not preserved after RT.
- LO exports document with Numbered lists starting
from '1' instead of '0'.
- LO "Import" and "Export" need fixes.
- If LO will imports correctly, export will get
correct value.
Implentation :
- Added code at Import and Export side.
- Added Export Unit test case to check that
<w:start> is not present in numbering.xml
for 0th level.
NOTE : <w:start> is optional. If not mentioned
Numbered lists starts from '0'.
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Reviewed on:
https://gerrit.libreoffice.org/7710
Change-Id: I30910c41fd188f30a1723cf8e07be5ea1cde1be0
see also: SvxLineSpacingItem::PutValue
Move para spacing test from import to export and
remove a test case which tests a part of the same thing.
Change-Id: I96da9f6ac7851bd74e34ab4a6d2a2f3499549a87
unotext: a conversion was missing during the corresponding
SvxLineSpacingItem was filled with "ParaLineSpacing" UNO property.
Change-Id: I02559ed7e8b46150a88eed2bf20afdf084aec47b
Before we started to import the date SDT as a form control, we exported
what is now the HelpText property on the control. So as an initial step,
export that back as plain text, without any formatting.
Change-Id: I569e6690b0c580d8073611b48d610f87974145b3
Regression from fb5ee5c995 (sw: Add
support for different grab bags at PropertyMap., 2013-11-29),
PropertyMap::GetPropertyValues() assumed all XTextRange implementations
support the new property, which is not true for at least editeng.
Change-Id: Ib5657be522d30f203cecbbbae74d6594cef984fb
Added vcl/settings.hxx to all cxx files which require it.
This helps to speed up compilation after changes to the settings.
Conflicts:
sc/source/ui/dbgui/pvlaydlg.cxx
Change-Id: I211a0735c47f72d6879f6f15339355abfe0e3cf4
Reviewed-on: https://gerrit.libreoffice.org/7933
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Most probably this was fixed by 0761f81643
(123792: complete annotations on text ranges feature, 2013-12-19).
Change-Id: Ic712c1a33271081205901ddbf5d629d6f2198126
Translate component of parent shapes' transformation
have to be applied to children when there is no explicit
child transformation.
Note. Export also use this concept.
Change-Id: I51bd3325fb53ee250402326ee361c8f07038ed07
In this document written by "XMLmind XSL-FO Converter" there are less
\cellx than \cell and thus when reading \nestrow/\row a whole buffered
nested table \cell is lost and then subsequently the rest of the nested
table too. Try to fix that by counting both \cell and \cellx and
replaying until the maximum of those.
Cannot count \intbl since we synthesize that in various places.
(regression in LO 3.5)
Change-Id: I3b64ad94af842e076611418589a0c83bd18841c6
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 279ff2e033 (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 bbef85c157 (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