Until now the export of OLE objects was being done adding them to the
m_postponedOLE member and reading that member when the run properties
are closed, but it can happen that we receive an OLE object while not
in the middle of the row properties.
We have extracted the code that actually does the export to a
separate method and call it if m_postponedOLE is not available.
Some lines are incorrectly indented to make the purpose of this patch
more evident, and will be corrected in the next patch.
Change-Id: I3e0d785c99c659ec35d0c02dfc52367dcb6880b7
Improves patch 1428ec6f4e2bfe0d8654a9ccc713e274e08c6423
When embedding an object into a docx, several things interact:
* The properties in the <o:OLEObject> tag in document.xml
* The ContentType for the file defined in [Content_Types].xml
* The Type of the Relationship defined in document.xml.rels
You need the right combination of those three elements for Word to
properly recognize the embeddings in exported documents.
To know which values must be written, I store some interoperability
information in the import phase in the document grab bag. The
relevant information is the value of the ProgID attribute in the
<o:OLEObject> tag.
I have defined three cases depending on the value of ProgID, but more
could be needed in the future:
* Embedded xlsx sheet.
* Embedded pptx presentation.
* Generic OLE, this should work with embedded odt/ods in combination
with the ProgID attribute stored in the import phase.
Change-Id: I26336cb3fe47bd33e1cef11dd1c7edcf390f2e56
save as new .doc
* when opening .doc in AOO, preserve the RTL property(property ID is 0x085A)
and export.
Reported by: Lou Qing le
Patch by: Chen Zuo Jun
Review by: Lei De Bin
(cherry picked from commit daa4da26a7ba0c58c79af69fc6624729f7b22c10)
Conflicts:
sw/inc/hintids.hxx
sw/source/core/bastyp/init.cxx
sw/source/core/doc/docnew.cxx
sw/source/core/text/atrstck.cxx
sw/source/filter/ww8/ww8atr.cxx
Change-Id: I2a1788452475e0deebf530aae41e543eae3cd45d
Resolves: #i120935# Insert blank entry for RES_CHRATR_BIDITRL...
and RES_CHRATR_IDCTHINT, to keep the identical res order
(cherry picked from commit 919e99308395c572a7298e6db2b96df8bf7ec3fd)
Conflicts:
sw/source/filter/html/htmlatr.cxx
Change-Id: I3c2a3513de3c146ece583ff40bf3ffb3845f971c
Resolves: #i122867# HTML export - correct function pointer table...
which holds the export functions for certain attributes
(cherry picked from commit 5d963c0c996d50fa1033e7c2da48b5d1c3747f20)
Conflicts:
sw/source/filter/html/css1atr.cxx
Change-Id: I7f31cfab8c654d5c549db1343d1e222f50a42c60
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>
Let's convert the switches to full comprison; it's future-proof, and the
performance difference here is not critical.
Change-Id: I1541acdc89312806f4bf05226efb3a42e81f8019
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