summaryrefslogtreecommitdiff
path: root/writerfilter/inc/ooxml
AgeCommit message (Collapse)Author
2019-10-17loplugin:virtualdead unused param in OOXMLDocument::setXNoteTypeNoel Grandin
which means the whole method is dead Change-Id: Ib3349f5beb8b9bb9fe223bc33aca84a20e581445 Reviewed-on: https://gerrit.libreoffice.org/80954 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-10tdf#79877 perf loading docx file, writerfilter/ improvementsNoel Grandin
this improves load time by 20%. We switch from shared_ptr to tools::SvRef to manage the objects I noticed some double inheritance like this: DomainMapper LoggedProperties Properties SvRefBase LoggedTable Table SvRefBase so to be safe I made all the ref-count-base-class inheritance virtual. Change-Id: Ia3de9733f5c6966e8171f43d083dcc087040b8cd Reviewed-on: https://gerrit.libreoffice.org/57022 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-04loplugin:finalclasses in writerfilterNoel Grandin
Change-Id: I590de2fd15c630d5ea5e706ce9421ee8bfe19db7 Reviewed-on: https://gerrit.libreoffice.org/43116 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-17tdf#50097: DOCX: export form controls as MSO ActiveX controlsTamás Zolnai
* Use the same structure for export what MSO uses ** Position and size information are exported as VML shape properties ** Different handling of inline and floating controls (pict or object) ** Do some changes on VML shape export to match how MSO exports these controls ** Write out activeX.xml and activeX.bin to store control properties ** Use persistStorage storage type defined in activeX.xml * Drop grabbaging of activex.XML and activeX.bin * Cleanup control related test code Change-Id: I38bb2b2ffd2676c5459b61ec2549c31348bab41c Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/41256 Tested-by: Jenkins <ci@libreoffice.org>
2017-07-11tdf#106132 DOCX import: fix handling of nested textbox marginsMiklos Vajna
drawingML shapes are independent, and having a separate parser for each shape is a good thing, so that when we have an XML fragment like this: <wps:wsp> <wps:txbx> ... </wps:txbx> <wps:bodyPr .../> </wps:wsp> where <wps:txbx> may contain nested <wps:wsp> tags, we apply the properties specified in <wps:bodyPr> to the correct shape. In contrast, doing the same for VML is not a good idea, see commit 476316bfc9dd36c0613327c20822a193b5ca8d9b (do reuse shape context, 2012-05-22). So conditionally (for DML) maintain a stack of shape parsers, this way the outer <wps:bodyPr> is parsed and the result is applied to the correct shape, at the end resulting in correct inner margin for the outer shape in the bugdoc. This requires moving the context setup code from the OOXMLFastContextHandlerShape ctor to setToken(), as only then we know if this shape context will be used for VML or DML purposes. This should be OK, given that writerfilter::ooxml::OOXMLFastHelper::createAndSetParentAndDefine() calls setToken() right after allocating the context. Change-Id: I8c0d2f49cac76589fe269230698b203b5ca6996c Reviewed-on: https://gerrit.libreoffice.org/39798 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-06-07Related: tdf#108269 DOCM filter: reuse oox code for VBA data preservationMiklos Vajna
Which means the DOCM-specific code to roundtrip VBA things (project, data) can be removed. The oox part has to be extended a bit, as at least for this DOCM bugdoc there is an XML relation of the binary data, while existing shared code assumed the full VBA project is just a single OLE blob. Change-Id: I4085e4dba24475e6fd555e5f34fe7ad0f305c57d Reviewed-on: https://gerrit.libreoffice.org/38504 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-06-02Related: tdf#108269 DOCM filter: preserve VBA streamMiklos Vajna
This means 2 new streams when roundtripping DOCM files that actually have macros: word/vbaProject.bin and word/vbaData.xml (+ the relation pointing to the second from the first). Change-Id: Iba24eea4c5bca8f743a53027c71ed2aae48f1934 Reviewed-on: https://gerrit.libreoffice.org/38360 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-02-08loplugin:unusedenumconstants read-only constants in writerfilterNoel Grandin
Change-Id: I3cc0d696059b130a8f1f1d8d3b1908d2e84d1a75 Reviewed-on: https://gerrit.libreoffice.org/34017 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-08-12loplugin:countusersofdefaultparams in vcl..xmlsecurityNoel Grandin
Change-Id: I538596a99e632178d928ff7e66ad45c71b73c6fd Reviewed-on: https://gerrit.libreoffice.org/28018 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-27improve passstuffbyref return analysisNoel Grandin
Change-Id: I4258bcc97273d8bb7a8c4879fac02a427f76e18c Reviewed-on: https://gerrit.libreoffice.org/27317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-26loplugin:unusedmethodsNoel Grandin
Change-Id: Ib36bc0e87d00abb638cbfec511cd13b6179eabda Reviewed-on: https://gerrit.libreoffice.org/25431 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-19loplugin:unusedmethods in writerfilter to xmloffNoel Grandin
Change-Id: If95890eff0f785111e8b511ac1d5481c6910f099 Reviewed-on: https://gerrit.libreoffice.org/25148 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-06teach passstuffbyref plugin to check for..Noel Grandin
unnecessarily passing primitives by const ref. Suggested by Tor Lillqvist Change-Id: I445e220542969ca3e252581e5953fb01cb2b2be6 Reviewed-on: https://gerrit.libreoffice.org/24672 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-12clang-tidy performance-unnecessary-value-param in writerfilterNoel Grandin
Change-Id: I1f61be80ac1ebe42668580b09a261e7e3af1a403
2016-02-25loplugin:unuseddefaultparams in writerfilter/Noel Grandin
Change-Id: Ib5a2f6f0404e8489a9699eac6b0c50e61f31083f
2016-02-16Related: tdf#59699 DOCX import: fix linked graphics with relative URLsMiklos Vajna
Because the writerfilter::ooxml::OOXMLFastContextHandlerShape constructor only sent the input stream (and not the full media descriptor) to oox::shape::ShapeContextHandler, it's startFastElement() tried to reconstruct a media descriptor from just the input stream. As a result, the base URL of the document got lost at the time the oox::drawingml::BlipContext constructor tried to call getAbsoluteUrl(), to convert the relative URL to an absolute one. Fix the problem by sending not only the input stream, but the full media descriptor to the shape importer. As a bonus that makes code simpler, too. Change-Id: I1f06c04d0745aa7e2e06d4848cf454790d5073ca
2015-12-15writerfilter: set a BaseURL on embedded math objectsMichael Stahl
Change-Id: I9a500e079c892e281bdfee9627641f118261e0f8
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-02loplugin:unusedmethodsNoel Grandin
Change-Id: I3d6f1300f4fae2af9e580d1d3b2c2c80fa9e9268 Reviewed-on: https://gerrit.libreoffice.org/19075 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-21loplugin:unusedmethods writerfilterNoel Grandin
Change-Id: I52441115e14da6c1bcd7ba4926a0f3cc0620366e Reviewed-on: https://gerrit.libreoffice.org/17236 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-03-24SkipImages option for document importLászló Németh
This option allows images and drawings to be skipped while importing DOC and DOCX, for text-only conversion or indexing. Change-Id: Id4bfbbe48d8a8e970b1cb5922187768bf94dc918 Reviewed-on: https://gerrit.libreoffice.org/14733 Reviewed-by: Németh László <nemeth@numbertext.org> Tested-by: Németh László <nemeth@numbertext.org>
2014-12-30writerfilter: boost::shared_ptr -> c++11 std::shared_ptrMiklos Vajna
Change-Id: Ib5649d8979093bb147c61eebcf95a472ad899672
2014-12-22writerfilter: fold single remaining header of resourcemodel into dmapperMiklos Vajna
Change-Id: I54cc8ebda18c8ca7071c39210687f28adbc4790a
2014-12-09writerfilter: move QNameToString to the OOXML tokenizerMiklos Vajna
It's filled with contents in the OOXML tokenizer anyway, keeping its interface outside of it is pointless. Change-Id: I10051c5b41a1247417bfb3dd3170a76bf20925aa
2014-10-25only the now removed OOXML tokenizer called getType()Miklos Vajna
Change-Id: Id9786ed75bf9d9b637312655af33d790caf93b13
2014-10-17fix incremental buildMiklos Vajna
Change-Id: I28dd6c72c665abd95be6d14dc629296850e03e1d
2014-08-06writerfilter: fix dbglevel=2 buildMiklos Vajna
Change-Id: Ifd471e49cb167af48a9173762812164890e00791
2014-08-06OOXMLFastTokenHandler doesn't need an UNO contextMiklos Vajna
Change-Id: I476d7e26d35e38d458f62c01f478ed2b54eed355
2014-05-23DOCX import: detect document signatureMiklos Vajna
Change-Id: Ic84b1f1446d6ab1a1529de4e0a435afbf62915a7
2014-05-18writerfilter: drop last 'using' statement from headersMiklos Vajna
Change-Id: I08a13793c40bec0b9a657e01f4c973cc0e393d4d
2014-05-18writerfilter: drop global 'using css' from WW8ResourceModel.hxxMiklos Vajna
Change-Id: I2196a1df09a6f35e4de3ab3cc84bc1e149cd8f61
2014-04-19fixincludeguards.sh: writerfilterThomas Arnhold
2014-04-03writerfilter: unused WRITERFILTER_OOXML_DLLPUBLICMiklos Vajna
Change-Id: I3f14017d6816d59b951c947827ca9497f2cd97fc
2014-03-27Second batch of adding SAL_OVERRIDE to overriding function declarationsStephan Bergmann
...mostly done with a rewriting Clang plugin, with just some manual tweaking necessary to fix poor macro usage. Change-Id: Ie656f9d653fc716f72ac175925272696d509038f
2014-03-23fdo#76356 : Docx file contianing chart in footer/header gets corrupted.sushil_shinde
- Docx file with chart in footer/header or .bin file referred in chart was getting corrupted. - Embedded file for footer.xml was not grabbaged. - .bin embedded files were not grab baged. - Added grab bag support for both case. - Added UT to check .bin files are grab baged properly. Reviewed on: https://gerrit.libreoffice.org/8674 Change-Id: I221e3867798fc2a3a42f6385d687e80b80a3678f
2014-03-21DOCX import: implement progressbarMiklos Vajna
The design follows what we do in case of ODT import already: read the number of paragraphs from the document statistics metadata, and then estimate progress based on the number of already imported paragraphs. Change-Id: I042cc6014c05ca7456fdf1c8d7247b615ba3a244
2014-01-10fdo#72520 : Added embedded data of docx file to InteropGrabBag.sushil_shinde
- Added embedded exel sheet data for charts to grab bag. Change-Id: I7f52b56de2306671fea9247c8a789c0e2a5a8874 Reviewed-on: https://gerrit.libreoffice.org/7211 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2013-12-13fdo#71786 : Implemented Glossary folderRohit Deshmukh
1. Glosary folder is imported as Intrograb and exported. 2. Added unit test case Reviewed on: https://gerrit.libreoffice.org/6825 Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx writerfilter/source/filter/ImportFilter.cxx Change-Id: Ifd51a75a65e030d44d30e02cd7ab51fb088186b3
2013-11-15[docx] activeX reference files (.bin) saved in InteropGrabBag and exported.sushil_shinde
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-14[docx] activeX files saved in InteropGrabBag and exported.sushil_shinde
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-13[docx] CustomXml relationship files saved in InteropGrabBag and exported.sushil_shinde
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-05[docx] CustomXml saved in InteropGrabBag and exported customxml when saving.sushil_shinde
The XDocuments representing the DOM of an OOXML's customxml document is stored as the PropertyValue "OOXCustomXml" into the "InteropGraBag". Added mxCustomXmlDomList object which holds xDocuments for each item.xml from CustomXml. Exporting all items dom tree from customxml that has been parsed when loading the file. This is necessary in order to properly reopen docx files that contain data like citation. This fix grab bags only item[n].xml's files from CustomXml folder. itemProps[n].xml's and item.xml's .rels are not preserved and exported yet. (Working on this part) Change-Id: I330f34f38a7aa4cd39094371bff15ebbc0318167 Reviewed-on: https://gerrit.libreoffice.org/6519 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2013-09-20writerfilter: OOXML theme saved in InteropGrabBagAndres Gomez
The XDocuments representing the DOM of an OOXML's theme document is now stored as the PropertyValue "OOXTheme" into the "InteropGraBag" property of the SwXTextDocument. Added the importSubStream() method to the writerfilter::ooxml::OOXMLDocumentImpl class in order to create the XDocument for the theme XML fragment stream and invoked it during the resolve() method. Modified the writerfilter::ooxml::OOXMLDocument abstract class to be able to hold the OOXML's theme XDocument. Added the set/getTheme() methods to store and obtain the XDocument directly. Modified the WriterFilter::filter() method to store the OOXML's theme XDocument in the "InteropGrabBag" property of the TextDocument service SwXTextDocument implementation. Updated the UTs accordingly. Change-Id: I3960590fcf4856caf770908b983ffb6898f061c0 Reviewed-on: https://gerrit.libreoffice.org/6002 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2012-09-21fdo#49819 - allow slightly inconsistent docx files to be repairedMichael Meeks
2012-07-21writerfilter: rtl::OUString -> OUStringMiklos Vajna
Change-Id: I1577c1bb8a3dc498b647b930d405c90f80eafaf9
2012-06-28re-base on ALv2 code. Includes:Michael Meeks
Avoid some uses of non portable #!/bin/bash in shell scripts. Patch contributed by Pedro Giffuni http://svn.apache.org/viewvc?view=revision&revision=1235297
2012-05-22do reuse shape contextLuboš Luňák
This is pretty much a revert of 60cb70b94537e9ff1155fb80255fc04ce41363b2. Turns out e.g. <v:shapetype> is not local only to its <w:pict>. Added a testcase. Change-Id: Ibbb9fe01bc2fc77dd67151bf4ca0905443eebf63
2012-05-15do not reuse shape context (part of bnc#705956)Luboš Luňák
As far as I can say, this reusing is just an optimization, but it breaks e.g. with <w:pict><v:group><w:pict>... , where using the same context for two shapes breaks things, e.g. oox::vml::ShapeContainer::getFirstShape() does not work right. Change-Id: I90bb85b4d320e1bb0727401879b0551abbac5f12
2011-07-23revert to old writerfilter gbuilizationBjoern Michaelsen
* gnumake4's writerfilter gbuildization got pushed in a seperate branch * it might or might not be merged to master later
2011-06-20gnumake4: switching gbuildizationBjoern Michaelsen
* mostly switching to gnumake4/writerfilter10 gbuild implementation (thanks mst, hb)