summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ooxmlexport
AgeCommit message (Collapse)AuthorFilesLines
2014-03-08Fix types in a testJacobo Aragunde Pérez1-3/+3
Change-Id: I2f857f564e100cc4cf6b885c5a8f96e506b4046f
2014-03-08ooxml: export date controls properlyJacobo Aragunde Pérez3-8/+18
Export date controls as ooxml Standard Document Tags (SDT) instead of replacing them with plain text. SDT date controls contain the date in ISO format as an attribute of <date> tag, a custom date format that can be specified by the user in the <dateFormat> tag and the date formatted in that custom format in the <w:sdtContent> tag. The unit test testFormControl from ooxmlexport suite was removed, it only checked if the date control was exported as text and it obviously fails now. A new test that checks the values of the exported control was written instead. A pair of date format functions were added to datetimeutils.hxx. TODO: to avoid supporting all the posible custom formats that can be specified in the <dateFormat> tag, it is forced to dd/mm/yyyy on export. Change-Id: I9d1b6f840ee9e133831fdb04ad399fe31bcb2063
2014-03-07drawingML export: fix handling of dkVert pattern fill presetMiklos Vajna2-0/+9
We convert the dkVert preset to a certain hatch configuration (style, distance, angle), but when we exported it back, then we didn't recognize it, and wrote ltVert instead. Change-Id: I021885496843f5ea5453af3473453bbec50d928f
2014-03-07fdo#75158 : Handled unsupported fields for docx file.sushil_shinde2-0/+13
- Handled unsupported fields using fieldmark API. - Added Unit Test. Change-Id: I0c69458f330fa2e98821c392ea97410fe1b1e20e Reviewed-on: https://gerrit.libreoffice.org/8391 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-03-06Re-enable the unit test (BackGraphicURL).Muthu Subramanian1-1/+1
2014-03-06Disable unit-test BackGraphicURL test temporarily.Muthu Subramanian1-1/+1
2014-03-05ooxml: round-trip test for w14:anchorId & wp14:anchorIdTomaž Vajngerl2-0/+12
Change-Id: Iada0ba2b6d1450167977915fe95a38b5bab2559c
2014-03-05sw tests: Fix description of the new assertXPathContent() and use it broadly.Jan Holesovsky1-77/+46
Change-Id: I3c8d5e491fcf9f871d72fb2d138bb7094ff69746
2014-03-05fdo#75557 : OLE Objects of type .zip not being preserved in RTTushar Bende2-0/+8
Problem was Document containing ole object if RoundTripped then after Roundtripping the OLE object was not working. Which means if doc contains .zip file as ole object then after RoundTripping that .zip object was not getting opened . Reason found that it was because of missing o:title attribute during RoundTrip for <v:imagedata> inside <v:shape>. XML file difference : In document.xml, Before - <v:shape id="ole_rId2" style="width:72pt;height:40.3pt" o:ole=""> <v:imagedata r:id="rId3" /> </v:shape> After - <v:shape id="ole_rId2" style="width:72pt;height:40.3pt" o:ole=""> <v:imagedata r:id="rId3" o:title="" /> </v:shape> Verified that code changes working for other ole objects as well which are: Equations ,Excel Sheet and .zip. Change-Id: I813de38bcd6e334ce38a661fdfcfa434ef246ed0 Reviewed-on: https://gerrit.libreoffice.org/8458 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-03-05fdo#73596 [DOCX] Index:distance between columnsVinaya Mandke1-0/+2
Import the "w:space" or the distance between multiple columns of an Index Modifies existing UT for the same Reviewed on: https://gerrit.libreoffice.org/8444 Change-Id: I6d38e106208524cb22d0b98b0071360865e64bc0
2014-03-05fdo#73219 File corruption: Table in headerPriyankaGaikwad2-0/+9
Description: File corrupt due to the end tag </w:tc> </w:tr> </w:tbl> are missing after roundtrip in header4.xml Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Reviewed on: https://gerrit.libreoffice.org/8378 Change-Id: Ib05a50b3b3beca6c744b93360f9341ddcaa1a22a
2014-03-05fdo#74792 [DOCX] Grab-bag rels and images for SmartArtVinaya Mandke2-1/+23
Added support to grab-bag rels and associated Images for data[i].xml, and drawing[i].xml. Added UT for the same Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Reviewed on: https://gerrit.libreoffice.org/8362 Change-Id: I545825f67214f14037ab72b77764a07d575b8b5b
2014-03-05fdo#73596 Added support to import and export \r,\h Index flags.Nikhil Walvekar3-0/+21
This supports \r flag run-in type index. If \r is specified then we don't have to write \e flag (separator char). \h is Alphabetic separator, where indexes are grouped as per starting character. Change-Id: I690b29cef3d24b2a71b01f1deef0e418162d71aa Reviewed-on: https://gerrit.libreoffice.org/8099 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-03-04CppunitTest_sw_ooxmlsdrexport: make this failure a bit more readableMiklos Vajna1-1/+2
Change-Id: Ia71f5ea712ad16d6eef3af1136613d38cd27b581
2014-03-03make sw_ooxmlsdrexport 'work' on macNorbert Thiebaud1-1/+1
Change-Id: I35558dfb71007932e9a371408e6306216cfbd0f9
2014-03-03Use cstdlib std::abs instead of stdlib.h absStephan Bergmann1-4/+4
...because the latter lacks the abs(long) overload in some popular environments, cf. <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60401> "stdlib.h does not provide abs(long) overload." Similarly, stdlib.h lacks the abs(float), abs(double), abs(long double) overloads compared to cmath there, whose use was apparently intended in sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx. Rewrote that to use CPPUNIT_ASSERT_DOUBLES_EQUAL instead, which revealed that the comparisons need rather large deltas of .1 resp. .2 (which the original code hid with an implicit conversion to integral type, thus using an effective delta of 1). Discovered with -Wabsolute-value ("absolute value function 'abs' given an argument of type 'long' but has parameter of type 'int' which may cause truncation of value") recently introduced on Clang trunk towards 3.5. Change-Id: I4c41575ffdccb2944498b662bd3a53fd510cb0c0
2014-02-28ooxml: rountrip test for w:compatSettings and mc:IgnorableTomaž Vajngerl1-0/+38
Change-Id: I69a602f3a5eb83f116113b1dbe8bb9f208bd5e5d
2014-02-28DOCX import: handle font theme references in group shape textMiklos Vajna2-0/+10
Change-Id: I1d5b86ad17b2c4a0945f483c94ac6abf410cf1d6
2014-02-27ooxml: extend roundtrip test - stylisticSets, cntxtAltsTomaž Vajngerl2-0/+18
Change-Id: I727df93d112e28be31b196c7f861cf1d0133bfe1
2014-02-27ooxml: extend roundtrip test - ligatures, numForm, numSpacingTomaž Vajngerl2-2/+21
Change-Id: Ibab36ef0e6352f740d339b12c81385053af84be1
2014-02-27Remove visual noise from swAlexander Wilms1-10/+6
Conflicts: sw/inc/unodraw.hxx sw/inc/unoframe.hxx sw/sdi/swriter.sdi sw/source/core/unocore/unoframe.cxx sw/source/core/unocore/unoparagraph.cxx sw/source/filter/ww8/rtfexportfilter.cxx sw/source/ui/inc/unotxvw.hxx sw/source/ui/lingu/hyp.cxx sw/source/ui/lingu/sdrhhcwrap.cxx sw/source/ui/uno/swdetect.hxx Change-Id: Ic0a3fb2392187c277c9b36915ffb10dcf0317908 Reviewed-on: https://gerrit.libreoffice.org/8322 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-27DOCX export: fix style's next element orderMiklos Vajna2-0/+9
Change-Id: I03e91a448794efc2b91f3a6fb6c29dda3403ce9b
2014-02-27DOCX export: fix order of table border elementsMiklos Vajna2-0/+14
Change-Id: I17d8634017c5b0374d30501186b338ddedbcd7ea
2014-02-27ooxml: extend roundtrip test with w14:props3dTomaž Vajngerl2-0/+28
Change-Id: Ia7a3a998b07aefc94e6713c2ecf639166f1d3460
2014-02-27ooxml: extend roundtrip test with w14:textFillTomaž Vajngerl2-0/+39
Change-Id: I9d1a426b0972211f4b04145dd8e231162d3e5845
2014-02-26sw: write other types of embeddings properly to docxJacobo Aragunde Pérez1-1/+1
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
2014-02-26CppunitTest_sw_ooxmlexport: restore this testMiklos Vajna1-2/+1
It was crashing, as a quick-fix 43feacd5330b5652b58e8a75a0f41a78ee6ebe1c (sw: fix build, 2014-02-08) disabled the test. I wanted to fix this properly today, but it was already working. Change-Id: Ifbfa82bc907d6c4bd8ec398472f751714c721b09
2014-02-26CppunitTest_sw_ooxmlsdrexport: move all AlternateContent testsMiklos Vajna2-453/+454
AlternateContent is used while dealing with shapes, move all those tests. With this, the original suite has 330 asserts, the new one has 78, and they can run in parallel since 2efee3c632bb8372685bb9f7b07e99b91668d779. Toplevel 'make' on my machine: - before: 3m15.237s - after: 2m40.197s Change-Id: Id7ac9708e29ae8c6ea7db8aa845de089ed4bdf42
2014-02-26CppunitTest_sw_ooxmlexport: factor out drawing-related testcasesMiklos Vajna2-524/+433
As a start, moved 30 asserts to the new suite, still 378 is in the original one. Change-Id: I934bce63e286af3080ae014c3bd8f4f09866feb2
2014-02-26fdo#74771 : LibreOffice image captions crash MS Office WordTushar Bende2-0/+9
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
2014-02-26fdo#75133: Preseved bibliography after round trip.Rohit Deshmukh2-0/+11
Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx writerfilter/source/dmapper/DomainMapper_Impl.hxx Reviewed on: https://gerrit.libreoffice.org/8124 Change-Id: Ieaea19600fbda3b536549a1a100f847f9ae3654b
2014-02-26fdo#73596 [DOCX] Auto Columns in IndexVinaya Mandke2-0/+19
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
2014-02-26fdo#72563 : PAGEREF field tag not preserved during RoundtripTushar Bende2-1/+14
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
2014-02-26fdo#73596 [DOCX] Multiple Columns in IndexVinaya Mandke2-0/+22
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
2014-02-26fdo#74566:DOCX: Preservation <w:br> tag for Break to Next PagePallavi Jadhav2-0/+20
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
2014-02-26fdo#74271: Added unit test & code changes for footer contains hyperlink.YogeshBharate2-0/+12
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>
2014-02-25fix test merge screw-upTomaž Vajngerl1-0/+1
Change-Id: Id09d609c97872f7578b33e981d397fcdf7241e1b
2014-02-25ooxml: extend roundtrip test with w14:textOutlineTomaž Vajngerl2-1/+57
Change-Id: Ie888f3089f56dfd7b6ae4ae87aa2700e364c3ae3
2014-02-25ooxml: also change the document name in the testTomaž Vajngerl1-1/+1
Change-Id: I930d7da93d49545a1622a158943ab7ef03fc4d1f
2014-02-25ooxml: extend roundtrip test with w14:shadow and w14:reflectionTomaž Vajngerl2-0/+59
Change-Id: If5843a6e5b18102d0a3379ece168d06ad0020275
2014-02-25fdo#74105 : Prservation of Numbered lists-Starting with Value '0'Pallavi Jadhav2-0/+15
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
2014-02-24fix MacOSX-x86_49-TDF tinderboxCaolán McNamara1-2/+2
Change-Id: I15632bd87be37d9bb5815c9d800271dfd4c3b016
2014-02-24sw: Unit test for spreadsheets embedded in docxJacobo Aragunde Pérez2-0/+31
Change-Id: I0a91ea0ca36d57320c3495a5cedba7924d3a7ea7
2014-02-24abi#11739 DOCX export: fix validation error, wrong order of some elementsMiklos Vajna2-0/+36
Change-Id: Ic1c0174718ba6853fcc8795324a99b2a332b865e
2014-02-22DOCX export tests: simplify namespaceZolnai Tamás1-12/+12
Change-Id: I656bba948ba672e68b8de262b06e18ded73668db
2014-02-22fix buildMarkus Mohrhard1-6/+6
Change-Id: Ic21c92a02d42dc69d66a69de0e5d8e55ee1c8cb3
2014-02-21OOXML roundtrip test for w14:glowTomaž Vajngerl2-0/+12
Change-Id: I80dd71bad02be980229899845c1451df6f34dca5
2014-02-21WW export: make line spacing export clearerZolnai Tamás2-12/+60
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
2014-02-21DOCX export: initial support for the DateField form controlMiklos Vajna2-0/+8
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
2014-02-21DOCX export: make sure a graphic is only written onceMiklos Vajna2-0/+11
Even if it's referenced multiple times, because of mc:AlternateContent. Change-Id: Ie4cb0ec088d12be5421bac43113c8ae4636028e0