summaryrefslogtreecommitdiff
path: root/writerfilter/source
AgeCommit message (Collapse)AuthorFilesLines
2014-01-27fdo#66011 abi#2128 RTF import: fix memory leakMiklos Vajna2-1/+13
Commit 9389cf78e304a5a99bcf1745b9388e14ac36281a (cp#1000018 RTF import: empty para at the end of footnote text got lost, 2013-11-15) assumed that \par at the end of all substreams means an empty paragraph, but it turns out this is only true for footnotes/endnotes, but not for e.g. headers. Additionally, that commit actually causes a memory leak, which is detected by an assert in the SwIndexReg dtor, so crash-testing caught this. (cherry picked from commit f7ef84640258e4ee6ddc4cc5cbf58a2d89860afa) Change-Id: Idfa040bf3026a9515a120cd7afaf7d314553a131 Reviewed-on: https://gerrit.libreoffice.org/7663 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2014-01-26RTF import: fix handling of font color from paragraph styleMiklos Vajna1-1/+3
Conflicts: sw/qa/extras/rtfimport/rtfimport.cxx Change-Id: I6bbad2d69863020ea870be800f49e13e763b80bf Reviewed-on: https://gerrit.libreoffice.org/7667 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2014-01-21fdo#73389 Writer does not show a docx-document with nested table correctlyZolnai Tamás1-15/+8
The table manager can work with more table simultaneously and so m_aCellWidths contains more table's properties.Only one item of it belongs to the current table (getCurrentCellwidths). Regression from 74c5ed19f430327988194cdcd6bdff09591a93fa (cherry picked from commit d0c383256ef72d5212d8e2db77582d0ebe417209) Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx Change-Id: I93efac0c004af1b2524c955ffb20c3ecd74a2920 Reviewed-on: https://gerrit.libreoffice.org/7543 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2013-12-29fdo#41109 RTF shape import: handle fBehindDocument propertyMiklos Vajna1-0/+5
Change-Id: I9bf24eb2d3087e855d54c0ee7aba4e98dc856cc2 (cherry picked from commit e8d10f215e9da65617988a9a471be18775afad00)
2013-12-29fdo#41109 RTF shape import: shpz has priority over dhgtMiklos Vajna1-3/+3
And not the other way around, how 24ee3df385cf2aa95cd888581c84fdf90cc682dc (RTF import: fix priority handling of shpz vs dhgt, 2012-04-10) did, this time with a reproducer. Change-Id: I9412341c6b35ca2760e4490a18f11bc6a0e0b78a (cherry picked from commit ff7ac1a9b82bc20fe6e3d82322e53a7024edb84f)
2013-12-28DOCX import: close rPrChange properly.Zolnai Tamás1-0/+3
Call endtrackchanges when rPrChange ends so the corresponding redline will be removed. (cherry picked from commit 75e7d6f12e914b63e66968890533b2a56d0b1a7e) Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx Reviewed on: https://gerrit.libreoffice.org/7195 Change-Id: I4091d7b54e0a74f3158cc979f210577a2dc29783
2013-12-28fdo#65090 RTF filter: import RTF_CLMGF and RTF_CLMRGMiklos Vajna6-3/+79
These describe an explicit horizontal merge, that is not something Word itself creates, but it turns out the Calc RTF export does. (cherry picked from commits bb562304c1e1c61a882e6db65806cfdf8601bcbf, 97dcf77841d19d344d58d5bdacdab141cdea4817 and 6eb02ac8a77f9f89f256b190281029f6cbd60d95) Change-Id: I1b6ec10bb8e8bd40e24791ccc96f2f066dd0d5d5
2013-12-20fdo#72204 RTF import: fix crash on rotated, but not imported groupshapeMiklos Vajna1-1/+3
In case the groupshape contains textboxes and they contain table, we don't import the groupshape itself, just the children, as drawinglayer rectangles wouldn't handle tables. If that's the case, don't try to apply properties on the groupshape, as that would crash (the Writer drawpage implements XShapes, but not the XShape interface). Change-Id: Ie34039170314b772dd050eb354681cfaec61c1fa (cherry picked from commit 3e199f81473d1f85a75238ac03d38a220f3ab818)
2013-12-15Revert "DOCX: fdo#72560 better solution for exchange alignment for RTL"Faisal M. Al-Otaibi1-18/+7
This reverts commit 66e68fe28a7bfb37d4fdeee9bed1d9a0ff840935. there some error in this patch.
2013-12-15DOCX: fdo#72560 better solution for exchange alignment for RTLFaisal M. Al-Otaibi1-7/+18
Change-Id: I39462fc722a58b32e8829a9f2005a411871f255d
2013-12-05cp#1000017 DOCX/RTF import: avoid fake tab char in footnotesMiklos Vajna3-0/+13
Word wants this, so it's added by the exporter to the document, but on import we should ignore it. Change-Id: Idcb669ba624bf462a50a85eb4aacf397afb6efe6 (cherry picked from commit b38629ae210b204a6d24d6e9c5c62eaaf563d494)
2013-12-04Drop SAL_CALL to get it to build on Windows.Kohei Yoshida1-1/+1
Change-Id: I0f475c396ec76ee7faa2cd0699181c58934e61e7
2013-12-04fastparser: Avoid copying all tokens into a sequence.Michael Meeks2-12/+18
2013-11-22init nRotation [-Werror=maybe-uninitialized]Eike Rathke1-1/+1
Change-Id: Ia48c8e3ef9dfb1f1f881845813ada518231352f2 (cherry picked from commit 44397a6f36ae6db697899c4595afe617e5fbe8ca)
2013-11-22cp#1000016 DOCX/RTF import: fix RemoveLastParagraph() on WindowsMiklos Vajna1-1/+1
Change-Id: I3f9d69ddbb2144c60a724e4242128b65ae167455 (cherry picked from commit a56bfe734a7bed40a175e0eeb7e86e7006a83f83)
2013-11-20Related bnc#837302: Don't introduce a redlined delete and the end of doc.Jan Holesovsky1-0/+14
Change-Id: I5c3903a40b69867684707d33acbc92b1f80a93ec
2013-11-19DOCX drawingML shape import: wp:anchor's behindDoc attributeMiklos Vajna1-1/+5
Also, adapt anchoring to what we have in VML import as well: when the paragraph moves, the shape should stay at the same place. (This is a bit odd, as ideally Word does not support at-paragraph anchoring, but this change results in the behavior what Word does at the end.) Change-Id: I3b849b2898d303e48920e6056c472f08fbb43af1
2013-11-19DOCX drawingML shape import: handle wrap typeMiklos Vajna1-0/+1
Change-Id: I8880c7413b10a284c9e55170afa35527dc7593ea
2013-11-19DOCX drawingML shape import: handle marginsMiklos Vajna1-0/+1
Change-Id: Ia89552658dc79568cc46b92e949fc1935434e43d
2013-11-19remove unnecessary use of OUString constructor when assigningNoel Grandin2-2/+2
change code like aStr = OUString("xxxx"); to aStr = "xxxx"; Change-Id: Ib981a5cc735677ec5dba76ef9279a107d22e99d4
2013-11-18DOCX drawingML shape import: handle positionMiklos Vajna1-1/+1
Change-Id: I9a0cb95d875328dab21950ead06d56c4dac8305d
2013-11-15[docx] activeX reference files (.bin) saved in InteropGrabBag and exported.sushil_shinde4-24/+57
The XInputStream for activeX.bin files is stored as the PropertyValue "OOXActiveXBin" into the "InteropGraBag" Added mxActiveXBinList object which holds XInputStreams for each activeX.bin from activeX folder. Added .bin files entry to respective acivex.xml's .rels file. Added Unit Test to test all .bin files are stores properly. Reviewed on: https://gerrit.libreoffice.org/6679 Change-Id: I3a0e9462a6cc53d8cbb9c7d59ed24631d77d4d30
2013-11-15Fixed for spacing between lines in table is getting preserve.PriyankaGaikwad1-0/+3
Problem Description: In "w:spacing" value of "w:line" attribute value in table is not getting is preserved. Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Reviewed on: https://gerrit.libreoffice.org/6678 Change-Id: I2b0284a22da3a828c81876960f488049be4f8681
2013-11-15Resolved: Preservation of para before and after auto spacing.Nikhil Walvekar4-10/+28
During import a flag and fixed value is stored in InteropGrabBag and during export we check for fixed value and value available in para spacing object. Write autospacing only if para spacing values are not modified during edit. Reviewed on: https://gerrit.libreoffice.org/6575 Change-Id: If34c5b61c3180b01e68dfe83862784c3d6f33981
2013-11-15cp#1000018 RTF import: empty para at the end of footnote text got lostMiklos Vajna2-11/+2
Updated 3 testcases, in all cases first checked that the new behavior matches what Word does. Also added a new test, to check that empty para at footnote end is now kept. Change-Id: I96b8788feb4d730b5a64ba3a743311a0180ab41f
2013-11-14[docx] activeX files saved in InteropGrabBag and exported.sushil_shinde4-1/+94
The XDocuments representing the DOM of an OOXML's activex document is stored as the PropertyValue "OOXActiveX" into the "InteropGraBag". Added mxActiveXDomList object which holds xDocument for each activeX.xml from activeX folder. This changeset stores only activeX[n].xml files. Relationship files (example activeX.bin) from activex are not stored yet. (Working on it.) Reviewed on: https://gerrit.libreoffice.org/6654 Change-Id: I658e361211e1446ed095a73b0422da0c4f74df1c
2013-11-14fdo#70457: Preserve rotation of embedded bitmaps from docxJacobo Aragunde Pérez1-1/+6
When importing bitmaps coming from VML code, we were mistakenly ignoring rotation information: we have just added it to the existing XShape object. In the case of bitmaps expressed in DrawingML, the code was transforming them into SwXTextGraphicObjects which don't have rotation information. We are now preventing that transformation when rotation value differs from zero, leaving the XShape object that was built in the first pass through the document. Added a unit test. Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx Reviewed on: https://gerrit.libreoffice.org/6484 Change-Id: I40100f8919894e48c005f8ed445bb5cad4f58d8b
2013-11-14...and -Werror,-Wunused-parameterStephan Bergmann1-0/+2
Change-Id: I8b9e0629710c3b48c26a19158ab54bb250d79d5c
2013-11-14-Werror,-Wunused-variableStephan Bergmann1-1/+1
Change-Id: Ida3365b0451b947e04d7097799ac5108f76fc1a5
2013-11-14Move MediaDescriptor from comphelper to unotoolsStephan Bergmann2-4/+4
...so it will be able to use SvtSecurityOptions internally. Change-Id: Id7433247e8fc53651935578510bedbcca5aa2ac9
2013-11-14writerfilter: improve mc:AlternateContent supportMiklos Vajna2-5/+47
Commit af7d4a5ebf3e6a09cd2079f241dee16aa22e0276 (n#820503: initial MCE support in writerfilter ooxml tokenizer, 2013-07-03) introduced initial support for this, always reading the Fallback branch. Improve this, so an array can contain the list of features we support. Change-Id: I2d6ba2207f6bfc62dc1e15c1a605311ede1d7eeb
2013-11-14remove unnecessary sal_Unicode casts in various placesNoel Grandin2-2/+2
Change-Id: Ibf04062ca86ed866202d748c3b62a210d30ed6ec
2013-11-13DOCX: fdo#43093 set alignment if not already setFaisal M. Al-Otaibi1-0/+2
Change-Id: I34d2c6c1fc9338cea025ac510621d370f23805a2
2013-11-13writerfilter: fix anchoring of anchored wps (drawingML) shapesMiklos Vajna1-0/+10
Previous code assumed that either we're dealing with VML shapes (where the shape knows its position, anchoring, etc.) or with Wrtier pictures. drawingML shapes are a third category: they don't know their anchoring (and similar properties), still they are not Writer pictures. For now just fix the anchoring, other properties should be handled in a later follow-up commit. Change-Id: I2fede3b11cfbd423cd50cfc0c032d424c81c6c4a
2013-11-13writerfilter: tokenize wps:wspMiklos Vajna2-0/+24
These are just the minimal changes, so that writerfilter calls into oox::shape::ShapeContextHandler, which does the real work. Change-Id: I4f44a508736d780ff090bca0d12526160ddd167f
2013-11-13[docx] CustomXml relationship files saved in InteropGrabBag and exported.sushil_shinde4-7/+86
The XDocuments representing the DOM of an OOXML's customxml property document is stored as the PropertyValue "OOXCustomXmlProps" into the "InteropGraBag". Added mxCustomXmlDomPropList object which holds xDocument for each itemProps.xml from relationship of item.xml. Exporting all itemprops files from customxml. Reviewed on: https://gerrit.libreoffice.org/6603 Change-Id: I3973e6ce40382bbc4da247b5b27d99b03e851744
2013-11-12fdo#71302 writerfilter: remove "Strong" -> "Strong Emphasis" style renameMiklos Vajna1-1/+0
Such renames only make sense if the exporter does the opposite of them, but in this case the stiName array in the exporter explicitly looks for the "Strong" character styles. So at the end it's better to not rename it at all. Change-Id: I69b699c76d287b1fe3b81ea3fe66b77992c6e2f1
2013-11-11Remove unused writerfilter::doctok::DffRecordMiklos Vajna5-390/+0
Change-Id: I40b4c0ff90055e4d388f97fbe19be30d3f66b1b4
2013-11-10writerfilter: remove unused WW8FSPA class in doctokMiklos Vajna2-9/+0
Change-Id: Id6e984cff8c171099e3bf0ec6940a28b4000b2e9
2013-11-10WaE: unused variablesTor Lillqvist1-2/+2
Change-Id: I8a4d15a7d7948a19df0fb8a585969d56f9918772
2013-11-09writerfilter: remove unused Dff{FSP,DGG,BSE,FSP,SpContainer,UDefProp} classesMiklos Vajna6-219/+1
Change-Id: Ie3c8f7ea546418a1de1113a54292fd31c64a1f7b
2013-11-08DOCX filter: handle numbering style's qFormat, rsid and friendsMiklos Vajna1-9/+3
Change-Id: Ia261995b98e2108ab673c7b240a1aa822d3db96e
2013-11-08DOCX filter: handle char style's qFormat, rsid and friendsMiklos Vajna1-3/+9
Change-Id: Ie0bc9aff722d87fcd246d0cf1971ad6f34f0996a
2013-11-07writerfilter: remove unused CpAndFc class in doctokMiklos Vajna2-147/+0
Change-Id: Id24eb2ab53e62961e6cbe2ea72221c6bfe7262d7
2013-11-07fdo#63020: Replace ::comphelper::stl_begin()...Marcos Paulo de Souza2-4/+2
And use some templates inside include/com/sun/star/uno/Sequence.hxx Change-Id: I48875fa1517751fc4cb0cf2b6c08b88975a29b47 Reviewed-on: https://gerrit.libreoffice.org/6599 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2013-11-07fdo#70812 writerfilter: check for nullptr after dynamic_castMiklos Vajna1-3/+6
Happens when we set "no number" in the default para style, which is already the case for Writer anyway. Change-Id: I3b262e633e52e4aae039c55d6edb744e36f0f354
2013-11-07DOCX import: handle NS_ooxml::LN_CT_Style_autoRedefineMiklos Vajna2-2/+9
Change-Id: I8c2c0ca8d060e2c460d0f36aed3050ed335fb3a3
2013-11-07DOCX filter: roundtrip paragraph customStyleMiklos Vajna1-3/+2
Change-Id: I7fec154ff3b39845e91301b4fb607381e80e13f7
2013-11-07DOCX filter: roundtrip paragraph style defaultMiklos Vajna1-4/+3
Change-Id: I93495b4a2f85fe9729f8e1c810532717783756e4
2013-11-07remove unnecessary use of OUString constructor in WRITERFILTER moduleNoel Grandin2-6/+6
Change-Id: Iba6fd6e2bb9b2a9e937149f3e3465b0817208a58