summaryrefslogtreecommitdiff
path: root/sw/qa
AgeCommit message (Collapse)Author
2014-08-22DOCX import: list styles don't support automatic updatesMiklos Vajna
The problem was the following: setPropertyValue("IsAutoUpdate") on the style failed -> a number of styles was not imported in StyleSheetTable::ApplyStyleSheets() due to the exception, then when we tried to use one of the not imported styles, we also got an exception in DomainMapper_Impl::finishParagraph(), which resulted in not calling DomainMapperTableManager::handle(), so multiple cells of the same table wanted the same range for cell contents, and that resulted in a crash. Regression from cf33af732ed0d3d553bb74636e3b14c55d44c153 (handle w:gridBefore by faking cells (fdo#38414), 2014-04-23), but that commit just made the previously hidden problem visible. Change-Id: I788cb6b4a2c7b7efbfa48297c658bb26450bf583
2014-08-21sw: _one_ unit test with use_library_objects sw ought to be enoughMichael Stahl
Linking those things takes a lot of RAM. Change-Id: I4db9ee3f07f97601d526ab3f905ecadbf4c552ca
2014-08-21DOCX export: prevent multiple paragraphs in some SDT containersMiklos Vajna
E.g. Word doesn't do anything if you hit return in the middle of a title; if that's so, then we should handle this situation on export as well. Change-Id: Ib5b52a59250b09c97023b53906b8046f530d0e31
2014-08-21DOCX export: handle anchored TextFrames inside shapesMiklos Vajna
The exporter already handled TextFrames inside TextFrames, a feature supported by Writer, and not by Word. Similarly, if DocxSdrExport::writeDMLAndVMLDrawing() starts a shape, then anchored TextFrames should be posponed till the end of that shape. Change-Id: I597a8a46b1cf2348a8ccb9af668ea5afab27541b
2014-08-20double-checked locking is not thread-safe in JavaNoel Grandin
found by PMD Change-Id: Ibd4a9139c626932bec56c0b1dd32b4d59c8440b1
2014-08-19DOCX export: handle SDT end right before a section break introducing headersMiklos Vajna
Change-Id: I0fab5ae4335ed6016d31aa243b131899c3154388
2014-08-19split CppunitTest_sw_ooxmlexport into several testsLuboš Luňák
In order to allow running them in parallel. There are already enough tests to make it run for a couple of minutes and it's annoying to see only once core busy with it. I intentionally left the original file at the same name, without 1 appended, in order to avoid merge problems. Change-Id: I097c45c34797cc68f5d1790cf31eefc96fbaf44e
2014-08-19java: use 'Short.valueOf' instead of 'new Short'Noel Grandin
Change-Id: Icef19ef61ee0af2dd3bda527263934006271f219
2014-08-19java: use Boolean.valueOf instead of instantiating Boolean objectsNoel Grandin
Change-Id: Ie41d6b0170a035a694dd270c311a137fd1810e74
2014-08-19DOCX export: handle SDT around floating tablesMiklos Vajna
Change-Id: I07fedc201c51008baca3254dcc099f0182aa4c72
2014-08-19DOCX export: handle multi-para SDT's ending right before a tableMiklos Vajna
Change-Id: I47ea5fd6e1b4d9d5a2893112efdcd810c4c84cfb
2014-08-18DOCX export: don't forget to close SDT elements inside the TextBoxes of shapesMiklos Vajna
A usual problem with SDT is that in case it should end after the last paragrah of a container, there is no "next" paragraph that could have the relevant "EndSdtBefore" property. This is usually handled by closing the SDT tag before the container is closed. The problem here was that DocxAttributeOutput::WriteSdtBlock() did not notify DocxSdrExport about opening the SDT, as it thought there is no draw export in progress. This is because in case of "shape with a TextBox", the common writeDMLAndVMLDrawing() method is not called, instead the separate writeDMLTextFrame() and writeVMLTextFrame() methods are invoked. Fix the problem by adjusting these methods to writeDMLAndVMLDrawing(), so that they also set m_bDMLAndVMLDrawingOpen to true during the TextBox export. Change-Id: Ie08b0b955cd2d6a645970da3d485e447abfd6495
2014-08-18fdo#82492 : DOCX: Corruption: File was getting corrupt fafter RTPallavi Jadhav
Issue : - In issue file there were two runs(first run=SDT, second run=Shape). - These two runs were consecutive(no text/space/tab was there in between two runs). - Due to such scenario, "SdtEndBefore" was not getting set on Shape. - Hence at Export EndSdtBlock() was getting called from EndParagraph(). Due to this SDT was not getting end after first run. In order to end SDT after run, EndSdtBlock() should get called from EndRun() (as in Original file) Implementation : - Set "SdtEndBefore" on Shape in DomainMapper_Impl::PushShapeContext() - Retrieved same property at export. - Added export unit test case. Note : Added common functions at Import and Export with reference to https://gerrit.libreoffice.org/#/c/10827/ Conflicts: sw/source/filter/ww8/docxattributeoutput.cxx Reviewed on: https://gerrit.libreoffice.org/10912 Change-Id: I357d77cd179c83b8ae976db331ee46c8993b6cb8
2014-08-18DOCX filter: improve qFormat export handlingMiklos Vajna
The old rule was: write qFormat for everything that's not a custom style. The new rule: write qFormat for everything that's a custom style + have a whitelist of non-custom, but qFormat styles. This matches better what Word does (whitelist is from the latent style section of an empty document, created by Word). Change-Id: Ie7a0802e886c41b8d26ca9aa154913aa2f3ff87a
2014-08-17fix reading even/odd page breaks from .docx (bnc#519228)Luboš Luňák
We map Word's even/odd page breaks to Writer's left/right page styles. And we cannot just set any page style to be left/right, because that could set e.g. the default page style as such, which would make all normal pages that way. So instead we need to make a copy of the relevant page style, as the original page style as its follow, copy all the properties and headers/footers, and use this copy to get the page break. Change-Id: Id0d2568de91ac2de4afb0ba3a6eedd9cec46f878
2014-08-17fix reading a .doc that has frame anchored to the end of page (bnc#787942)Luboš Luňák
MSWord, unlike Writer, can anchor even to a page break (i.e. after the last paragraph). When this document was read, what happended was: - the last paragraph was read and the current position PaM was set to point after it - frame was read and anchored to the PaM - page break was read, making everything following be moved to the next page; including whatever ended up at the PaM position Handle this by checking for this case and inserting an extra empty paragraph before the break. This shouldn't affect layout of the page itself anyway, since the break should leave room for it (and MSWord shows a page break there if control characters are enabled, so there is room). Change-Id: Ia2a13bf5cf1c959b5aa228254365019a00a22679
2014-08-17remove executable bitsThomas Arnhold
Change-Id: Iec785ae538de81325812b1e6fe33115789b39770
2014-08-16Consistently use size_t and SAL_MAX_SIZEMatteo Casalin
Change-Id: Ibab89984ec94556ec368653b6db50c6c2e380dec
2014-08-16RTF import: handle pWrapPolygonVertices shape propertyMiklos Vajna
Change-Id: I512713e9b9aa1ceb3d98af7a1a6abd144e370689
2014-08-15fdo#82191 sw::DocumentLayoutManager: copy textbox content of draw formatsMiklos Vajna
The SwFmtCntnt, i.e. the content of the draw format was already copied, but that's only a pointer to the real content: instead duplicate the real contents on copy&paste, that's how we copy fly frames as well. Change-Id: I42475e356aaa1c54c08fb23a6a395d1726e5f33e
2014-08-14bnc#865381 DOCX import: handle <w:hideMark> table cell propertyMiklos Vajna
Change-Id: Id0dd34110376168e34df4956869608895b86abfe
2014-08-14sw: use less confusing variable names in python testMichael Stahl
Change-Id: Ie07fe4761a634c3ae55e82e1ed70c9424dc33213
2014-08-14java: remove commented out codeNoel Grandin
Change-Id: I05c907a38b562231e968c17f14e09ef80e0a6ed1
2014-08-13check_table.py: use assertEqual()Thomas Arnhold
To fix DeprecationWarning: Please use assertEqual instead. Change-Id: Iae7cb50dd968d055b106e35baa7eee526a50bf6d
2014-08-13RTF import: fix handling of RTF_SHPFBLWTXTMiklos Vajna
Commit 6cac123a8de8357cf11d9b5f818233889d729939 (fdo#45183 import RTF_SHPFBLWTXT, 2012-12-27) fixed this already once in the past -- fix it again, this time with a testcase. Change-Id: I0cbbfb1ba4eef42b2ee32f6f77065afaad3ddc1b
2014-08-13DOCX export: write qFormat for style names having an STI numberMiklos Vajna
Change-Id: I1f1bf0cf14bbd7b6253489f27753bdb2ec81fe35
2014-08-13java: remove dead methodsNoel Grandin
found by UCDetector Change-Id: I219caa8e680dba5a395541a778df6144841c4dde
2014-08-13warning C4245: 'initializing' : conversion from 'int' to 'sal_uLong'...Thomas Arnhold
...signed/unsigned mismatch In history this was sal_Long and then converted to sal_uLong, but the test never got aligned. Fix it by adding arbitrary element counts starting from 30. old: getCount(): {-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9} (With -5 silently converted to SAL_MAX_UINT32 - 5) new: getCount(): {30,31,32,33,34,0,1,2,3,4,5,6,7,8,9} Change-Id: Ic13678094c7bb4dcd122727f028c910513609cef
2014-08-13java: reduce scope, make some methods privateNoel Grandin
found by UCDetector Change-Id: Ib1425edde146193a65c242dc159b7e3fbf0e4a2e
2014-08-13java: reduce scope, make fields privateNoel Grandin
found by UCDetector Change-Id: I7f97e15667159cf8ee776e8f32fdcdec8ec00ed6
2014-08-12Refactored IDocumentLayoutAccess out of SwDoc.Valentin Kettner
Into the new class DocumentLayoutManager. Change-Id: I02d0cfcc63633d0bdab380508b2ef563187fd269
2014-08-12Refactored IDocumentStatistics our of SwDoc.Valentin Kettner
Into the new class DocumentStatisticsManager. Change-Id: I281232dc09dbd79c2faf3c2a78ae49625bbe88ee
2014-08-12Refactored IDocumentFieldsAccess out of SwDoc.Valentin Kettner
Into the new class DocumentFieldsManager. Removed SwDoc::_MakeFldList because it is not defined anywhere. Also moved a few non interface methods that belong to the manager. Change-Id: Icefd7ca7adcbb05a18d6fae0529fc54150b862fd
2014-08-12Refactored IDocumentRedlineAccess out of SwDoc.Valentin Kettner
Into the new class DocumentRedlineManager. Added an non const version of GetRedlineTbl to the interface. Also Moved SetAutoFmtRedlineComment which is not part of interface. Change-Id: I600d5821d5d5831557f5fc5375fb1203fe67a295
2014-08-12fdo#82165: ODF import: clear all shapes when removing header contentMichael Stahl
Shapes anchored to the first or last paragraph survive setString("") so need to be deleted with some ruse. (regression from b8499fc3dcf474050f026b8d5cd1d9037bbe42b7) Change-Id: I00a8132583c45d1953c207932cc7f02f3065ae77
2014-08-12DOCX export: handle wrap polygon around picturesMiklos Vajna
Change-Id: I83d9d42cd48ba4dcd86c6506c7dbd6493bb4d204
2014-08-12java: add @Override annotation to overriding methodsNoel Grandin
Change-Id: I086964c6f6ce52c60c52b6dbc445d3c21d22c80a
2014-08-11DOCX drawingML export: handle ContourPolyPolygon for drawinglayer shapesMiklos Vajna
Change-Id: I04438e4c32d001b989d3d3b8aec882ec57dc28b9
2014-08-11java: remove unused parametersNoel Grandin
Change-Id: I47c618117e079bb2ef90d92c449c8166ea957fa5
2014-08-11fdo#82123 : DOCX: Corruption: File was getting corrupt fafter RTPallavi Jadhav
Issue : - In issue file there were two runs(first run=SDT, second run=Image). - These two runs were consecutive(no text/space/tab was there in between two runs). - Due to such scenario, "SdtEndBefore" was not getting set. - Hence at Export EndSdtBlock() was getting called form EndParagraph() Instead EndSdtBlock() should ge called from EndRun() in order to end sdt after first run(as in Original file) Implementation : - Set "SdtEndBefore" on Graphic in DomainMapper_Impl::ImportGraphic() - Retrieved same property at export. - Added export unit test case. Change-Id: Id514b91f1831af371924f94388f0a404d762c042 Reviewed-on: https://gerrit.libreoffice.org/10827 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-08-10fdo#82106 RTF import: fix missing tab after special footnoteMiklos Vajna
Change-Id: I5ea45dbed652231acdcc3632ced728ed8bcb621a
2014-08-08DOCX export: handle date SDT on paragraphsMiklos Vajna
Date SDT's are normally imported as form controls, while most other SDT types are just custom properties on regular text portions or paragraphs. However, given that form controls are not supported in headers/footers, in that case even date SDT's are just custom properties. So support such properties on paragraphs in the exporter to properly roundtrip date SDT's in headers/footers. Change-Id: I19eb73a3673e387a7b8780756ce7426a1851e796
2014-08-08fdo#81946 Corrupt : DOCX file getting corrupt after RTPriyankaGaikwad
Decription : DOCX file getting corrupt after RT due to the AlternateContent inside sdtContent block XML Difference : In header.xml Original File <w:sdt> <w:sdtContent> ... </w:sdtContent> </w:sdt> Roundtrip File <w:sdt> <w:sdtContent> <mc:AlternateContent> ......Text Box..... </mc:AlternateContent> </w:sdtContent> </w:sdt> Reviewed on: https://gerrit.libreoffice.org/10805 Change-Id: I32d22f57a52060dd6f0ee784ee0002968d06ac3a
2014-08-08java: remove exceptions from throws clauses that are notNoel Grandin
.. actually thrown Change-Id: Ia326ac7f82e11b948ed0f34e20908a96e7adcd10
2014-08-08java: remove redundant null checksNoel Grandin
Change-Id: Ia42e5ed715fbd3f5b84029a9844da55f307c6260
2014-08-08java: remove dead methodsNoel Grandin
Change-Id: I9f2e705fd603a7c8832c0f0772bee9f395380a0d
2014-08-08fdo#81945 [DOCX] Round Tripped file corrupted due to nested SDTsVinaya Mandke
Original File contains two separate SDTs which are getting nested during RT as follows:- sdtStart [MARK] rPr [MARK] sdtEND RunSTART ==PREPEND==> sdtStart [MARK] sdtEND RunSTART rPr RunEND Now Another SDT starts sdtStart [MARK] sdtEND RunSTART rPr RunEND [MARK] sdtStart ==PREPEND==> sdtStart [MARK] sdtStart sdtEND RunSTART rPr RunEND So, in such cases wait before closing the earlier sdt, to avoid nesting. Thus the [MARK] can be retained in the corrrect position, to start the new SDT and end the earlier SDT. Reviewed on: https://gerrit.libreoffice.org/10803 Change-Id: Ia86f94c0587a5d44ab23391ea9ac38f86b5dd250
2014-08-07DOCX export: avoid empty attributes in paragraph shadingMiklos Vajna
Change-Id: I4bdf3f2d7f2aee3ce735a52185e736a8861d85e4
2014-08-06DOCX export: handle <w:cnfStyle> row propertyMiklos Vajna
Change-Id: Ice1cf2ce078b130130c44952ec2be0f8642f21a8
2014-08-05Avoid fn ptr casts in SwNodes::ForEeachStephan Bergmann
...by moving ForEach from BigPtrArray down to its sole user SwNodes. Change-Id: I6d326d3e1ac9dc6ac820e600973af420785d5a50