summaryrefslogtreecommitdiff
path: root/writerfilter/inc
AgeCommit message (Collapse)AuthorFilesLines
2019-05-12regenerate PCH headersLuboš Luňák1-1/+2
Change-Id: I4894023e42cbfa32916ee3ddfb2cfb5426cfc69f Reviewed-on: https://gerrit.libreoffice.org/72195 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-05-09regenerate PCH headers for the 4 new levelsLuboš Luňák1-10/+18
Plus some build fixes triggered by this. Change-Id: I59b21def706598ceffd45ae5b1f0262ec9c1ad50 Reviewed-on: https://gerrit.libreoffice.org/71581 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-03-25We can simply use DBG_UTIL now after efc29fbb6d458f5fd3660a36e2ff1592608fcbacTor Lillqvist1-3/+3
Change-Id: I74cce2d3fb4661ea9a44d0b166ca98dfade53056 Reviewed-on: https://gerrit.libreoffice.org/69604 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-07-26writerfilter: avoid -Werror=deprecated-copy (GCC trunk towards GCC 9)Stephan Bergmann1-0/+6
...by explicitly defaulting the copy/move functions (and, where needed in turn, also a default ctor) for classes that have a user-declared dtor that does nothing other than an implicitly-defined one would do, but needs to be user- declared because it is virtual and potentially serves as a key function to emit the vtable, or is non-public, etc.; and by removing explicitly user- provided functions that do the same as their implicitly-defined counterparts, but may prevent implicitly declared copy functions from being defined as non- deleted in the future. (Even if such a user-provided function was declared non-inline in an include file, the apparently-used implicitly-defined copy functions are already include, so why bother with non-inline functions.) Change-Id: I08632dcf7ccac1ab7efa0d5e8f4985d74cd31eac Reviewed-on: https://gerrit.libreoffice.org/58077 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-07-10tdf#79877 perf loading docx file, writerfilter/ improvementsNoel Grandin4-30/+24
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>
2018-03-02delete colordata.hxxNoel Grandin1-1/+0
move what we still need into color.hxx Change-Id: Ied7e31eb16468aa334c666b1499a6262f16a6350 Reviewed-on: https://gerrit.libreoffice.org/50561 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-22RTF filter: drop now redundant astyle.optionsMiklos Vajna1-2/+1
I (tried to) keep the RTF filter style consistent locally with astyle in the past, but now that's redundant when we have an enforcing clang-format mechanism in place. So drop the astyle config and switch to clang-format in the RTF filter case. To minimize backport pain, do this shortly before the libreoffice-6-0 branch-off. Change-Id: I708dbeb0b5ad2afacc90029ee5abba9495f4601f
2017-10-04loplugin:finalclasses in writerfilterNoel Grandin1-1/+0
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-09-22Fresh run of bin/update_pch.shMike Kaganski1-11/+21
Change-Id: I69d4157aaf6570cecd51ea59df20556914942e06 Reviewed-on: https://gerrit.libreoffice.org/42565 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-08-17tdf#50097: DOCX: export form controls as MSO ActiveX controlsTamás Zolnai1-3/+1
* 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-08-07Indentation fixesMiklos Vajna1-1/+1
These files had a consistent style before, let's keep them that way. Change-Id: If64773d8c29dee23638e4fb9b7e5b69b34d47e49
2017-07-31loplugin:constparams in writerfilterNoel Grandin1-1/+1
Change-Id: Ic0455f0a61825ec649ecbb78244f78a20df2787a Reviewed-on: https://gerrit.libreoffice.org/40595 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-11tdf#106132 DOCX import: fix handling of nested textbox marginsMiklos Vajna1-0/+4
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-23writerfilter: remove redundant virtual keywords in the RTF importMiklos Vajna1-2/+2
Also use default member initializers where possible. Change-Id: I535c467cb0d604863a47aafbe42dcf3498c8717c Reviewed-on: https://gerrit.libreoffice.org/39155 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-06-12tdf#108055 RTF: Header and Footer are added multiple times.Thomas Beck1-1/+0
Made it so Header/Footer of a certain section can only be added once. This change should only affect RTF-Files. Added Unittest Change-Id: I55025984e343d04da7fc0f201164ef39e3a26202 Reviewed-on: https://gerrit.libreoffice.org/37814 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 Vajna1-2/+1
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 Vajna1-0/+1
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-05-26RTF filter: use 'using' instead of 'typedef'Miklos Vajna2-2/+2
Change-Id: Ie7182fa30155a8090421cf9a669525be99f0e0a7 Reviewed-on: https://gerrit.libreoffice.org/38042 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-05-01AutoText: Reading multiple entriesSzymon Kłos1-0/+6
+ each entry is placed in a separate section + extended model and dmapper to react on docPart mark Change-Id: I7e5213a09ae7352d1d09369bd0a209b6d4e18e82 Reviewed-on: https://gerrit.libreoffice.org/37107 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2017-03-25Fix typosAndrea Gelmini1-1/+1
Change-Id: I80b6d080aa31ff8b9d043b983993f4d26d8dc87c Reviewed-on: https://gerrit.libreoffice.org/35662 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-02-08loplugin:unusedenumconstants read-only constants in writerfilterNoel Grandin1-1/+1
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-09-19Explanation of the SPRM acronym added to definition of the Sprm classMilos Sramek1-1/+1
Change-Id: I536cd6ba2d531292d5148819dfd914b76f4b1111 Reviewed-on: https://gerrit.libreoffice.org/29032 Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> Tested-by: Katarina Behrens <Katarina.Behrens@cib.de>
2016-08-12loplugin:countusersofdefaultparams in vcl..xmlsecurityNoel Grandin1-1/+1
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 Grandin1-1/+1
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 Grandin1-2/+0
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 Grandin1-1/+0
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 Grandin1-3/+3
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 Grandin1-5/+5
Change-Id: I1f61be80ac1ebe42668580b09a261e7e3af1a403
2016-03-11writerfilter: avoid ugly cross-directory includeMiklos Vajna1-0/+6
Change-Id: I16db4e16e5c2fa3aa3bfb22f83d2c36695499b5c
2016-02-25loplugin:unuseddefaultparams in writerfilter/Noel Grandin1-2/+1
Change-Id: Ib5a2f6f0404e8489a9699eac6b0c50e61f31083f
2016-02-23tdf#59699 RTF import: handle INCLUDEPICTURE fieldMiklos Vajna1-1/+2
On one hand, don't handle a fieldmark for it in dmapper. On the other hand, handle the field in the RTF tokenizer as it would be {\pict ...hexdump... }, that will result in an inline picture, as wanted. Change-Id: I554fdf017920350144300fd86617bf74eed8995b
2016-02-16Related: tdf#59699 DOCX import: fix linked graphics with relative URLsMiklos Vajna1-1/+1
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
2016-01-31boost::tuple -> std::tupleCaolán McNamara1-1/+1
Change-Id: Ia08c184b792ff73d3ed49d6a5d54dec1a35943e9 Reviewed-on: https://gerrit.libreoffice.org/21955 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-01-10Fix typosAndrea Gelmini1-1/+1
Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86 Reviewed-on: https://gerrit.libreoffice.org/21209 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-15writerfilter: set a BaseURL on embedded math objectsMichael Stahl1-1/+1
Change-Id: I9a500e079c892e281bdfee9627641f118261e0f8
2015-12-04Wingdi RGB macro handling improvedAshod Nakashian1-59/+7
Improved the isolation of windows headers. Specifically, RGB macro is better handled now. Change-Id: I0eeea16d0de9da3455810c80b0715f7b54ae8c3f Reviewed-on: https://gerrit.libreoffice.org/20039 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-11-15Fast PCH generator and optimized PCH filesAshod Nakashian1-168/+77
Ported update_pch.sh to Python with improved performance and features. The new script is invoked from the same update_pch.sh which calls it for each library in parallel, although it can be invoked directly. The ported script (update_pch) updates all PCH files in ~15 seconds where the old script took ~4500 seconds. In addition, the new script supports 3-tiered headers (system, module, and local) and is very flexible to support other improvement. It has a per-library optimal configuration settings that can be updated using another new scripts (update_pch_autotune.sh) which finds optimal per-PCH settings. PCH files have been generated using the new scripts which builds significantly faster (2-3x, depending on module and configuration) and the intermediate binaries are noticably smaller (by several GBs). The new script stamps each generated PCH file with the command that generated it to make it trivial for users to update them, and also adds the command to invoke another script (update_pch_bisect) that helps find missing headers or conflicting headers that may break the build after updating the PCH. Finally update_pch has built-in unit-tests for makefile parsing and other core functionality. Change-Id: Ib933b50e50374d7e2e7e3e95ba8799b0cc8a27fa Reviewed-on: https://gerrit.libreoffice.org/19965 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-10-19writerfilter: dmapper ctor can read TextInsertModeRange directlyMiklos Vajna1-2/+0
Change-Id: If17ae09266134b4bc410eab1a1b2f5139ba93a12
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann2-2/+2
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-02loplugin:unusedmethodsNoel Grandin1-2/+0
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-30loplugin:unusedmethodsNoel Grandin1-5/+0
Change-Id: Ib4d77ee01e7362f5951f81fceeca3c489872d971 Reviewed-on: https://gerrit.libreoffice.org/17378 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-21loplugin:unusedmethods writerfilterNoel Grandin2-18/+0
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-05-12tdf#90260 writerfilter: pasted RTF documents may contain no \parMiklos Vajna1-1/+2
sw core is not yet adapted, will be done in the next commit. Change-Id: If8da12427e0cdaced4c1c1776b9f0b8cbde5c57c
2015-04-11writerfilter: no need to spell out com::sun::star, css is enoughMiklos Vajna1-1/+1
Change-Id: I7dfcb041509508969135a325bdef709de7a8218f Reviewed-on: https://gerrit.libreoffice.org/15247 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2015-03-24SkipImages option for document importLászló Németh1-1/+3
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>
2015-02-06fdo#75757: Remove inheritance from std::vectorMatthew Pottage1-1/+0
Deprecated comphelper/sequenceasvector.hxx. Rewritten code using it. Using instead the functions containerToSequence and sequenceToContainer, found in include/comphelper/sequence.hxx. One class that inherits from it (in framework/inc/stdtypes.h), and the code using that has been left. Signed-off-by: Michael Stahl <mstahl@redhat.com> Conflicts: writerfilter/source/dmapper/DomainMapper.cxx writerfilter/source/dmapper/TblStylePrHandler.hxx writerfilter/source/dmapper/WrapPolygonHandler.hxx Change-Id: Ice61c94ffb052e389281aebb7cdf185134221061
2015-02-05Updated all precompiled headers.Ashod Nakashian1-15/+12
Change-Id: I955c8ac4dbe002d23531df7eb10fb4444d6b5157 Reviewed-on: https://gerrit.libreoffice.org/14292 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-01-02boost::unordered_map->std::unordered_mapCaolán McNamara1-1/+1
you can get debug stl this way Change-Id: Ia70a3e7c7c452390e8bee34975d296c9318e4a19
2014-12-30writerfilter: boost::shared_ptr -> c++11 std::shared_ptrMiklos Vajna5-10/+9
Change-Id: Ib5649d8979093bb147c61eebcf95a472ad899672
2014-12-25writerfilter: turn SourceDocumentType into a C++11 scoped enumerationMiklos Vajna1-3/+3
Change-Id: I11c550d0ec5a10f17116ac8f7025c0283e292f2e