summaryrefslogtreecommitdiff
path: root/xmloff
AgeCommit message (Collapse)Author
2019-04-30sw btlr writing mode: implement ODF filter for textframesMiklos Vajna
Layout is still not yet correct right after the import, though. Change-Id: Icdba2e8d608f35b6b5b43b88ffb223f779af1b89 Reviewed-on: https://gerrit.libreoffice.org/71552 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-04-30improve loplugin:stringconstantNoel Grandin
to find more places we can elide the OUString() constructor at call sites Change-Id: Ie09f3c61f2c4b4959c97dc98ebcbaf7c51d5d713 Reviewed-on: https://gerrit.libreoffice.org/71514 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-30implement std::hash for css::uno::Reference and rtl::ReferenceNoel Grandin
The declaration in BarChart.cxx is particularly suspicious, because it was using a < for the KeyEqual template parameter. Been there since: commit b2c3233e5f267b5d244d722a94424a3b224b3314 Date: Thu Dec 21 20:08:33 2017 +0900 chart2: suspend/resume setting rects dirty for 3D shapes comphelper::OInterfaceCompare is no longer necessary Change-Id: I8278c4a3d9113a18570ca237cd05d553ec8f3975 Reviewed-on: https://gerrit.libreoffice.org/71537 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-29tdf#63640 FILEOPEN/FILESAVE: particular .odt loads/saves very slow, part4Noel Grandin
cache the XMLTokenMap data in static const vars, so we only need to initialise them once Change-Id: Ib63bedc5af5d5927fed189a6b1a86a5db6865c72 Reviewed-on: https://gerrit.libreoffice.org/71466 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-25xmloff: create XMLImpressMetaExportOasis instances with an uno constructorMiklos Vajna
Change-Id: I350c2c96cd178878ae687dd5214fcabfcf7675e7 Reviewed-on: https://gerrit.libreoffice.org/71254 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-04-19optimise find/insert patternNoel Grandin
if we're doing a find/insert on a set or a map, it is better to just do a conditional insert/emplace operation than triggering two lookups. Change-Id: I80da5097f5a89fe30fa348ce5b6e747c34287a8d Reviewed-on: https://gerrit.libreoffice.org/70937 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-15xmloff: fix loplugin:simplifyconstruct warningMiklos Vajna
Change-Id: Iab32f67f911157c5d7c0db8f36ea638576cfd0bf
2019-04-15loplugin:sequentialassign in writerfilter..xmlsecurityNoel Grandin
Change-Id: I41028c704eca08b71746c3c87e38926b95449775 Reviewed-on: https://gerrit.libreoffice.org/70735 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-14tdf#120703 PVS: Silence V522 warningsMike Kaganski
V522 There might be dereferencing of a potential null pointer. Change-Id: Ie4bc74a734a6d5a73838a27e0d80cc8e51595839 Reviewed-on: https://gerrit.libreoffice.org/70730 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-04-08improve combining in hash functionsNoel Grandin
specifically, use boost::hash_combine to combine values in hash functions, except for a couple of places where I use the small-prime-number strategy popular in the Java world, to avoid including boost in header files that are widely shared. Change-Id: I0e184c9ec8803bf09fc6e84fe20131b203e1652a Reviewed-on: https://gerrit.libreoffice.org/70384 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-03Revert "add more append methods to *StringBuffer"Noel Grandin
This reverts commit 8cfa7f4dc00f3dd37e57917ef25c806b0e9e6e73. comment from sberg: we already have 70519a43e0d89a6b5d89859a6851f8c757c6b0c7 "Replace OUStringBuffer::appendCopy with append(std::u16string_view)" (which can be extended to OStringBuffer if needed) Change-Id: Ifcc550a8cf26ef38ad49fde8b067f53c999c9276 Reviewed-on: https://gerrit.libreoffice.org/70178 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-03add more append methods to *StringBufferNoel Grandin
which performs the append without needing the creation of a temporary *String Change-Id: If9ad3222275f26659db2e7df8d34f068977c4d17 Reviewed-on: https://gerrit.libreoffice.org/69826 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-26loplugin:unusedfieldsNoel Grandin
Change-Id: I31c953c8e4c1d4ec235ea318d0aa3b7cedaed1a3 Reviewed-on: https://gerrit.libreoffice.org/69683 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-14tdf#113289: Default value for footnote separatorDavid Vogt
In old versions of LO/AOO, separator style was defaulting to a solid line. When you have an old document that doesn't have the style set explicitly, the line would disappear. Since newer versions explicitly set the style, we should set the default to what it was before. Change-Id: I8dacea75fcf2f95f9bc145442b22ab0d173e7c5a Reviewed-on: https://gerrit.libreoffice.org/69167 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-14loplugin:unusedfields in xmloffNoel Grandin
Change-Id: I96de7fa324e3d2e3f0f133c93cf73776f4615ed3 Reviewed-on: https://gerrit.libreoffice.org/68134 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-09loplugin:unnecessaryvirtualNoel Grandin
Change-Id: I1fcde14b66ce80157cbebe7f3ec8c5ced1e13143 Reviewed-on: https://gerrit.libreoffice.org/68937 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-07log nice exception messages whereever possibleNoel Grandin
Change-Id: Idd125c18bee1a39b9ea8cc4f8c55cddfd37c33e1 Reviewed-on: https://gerrit.libreoffice.org/68579 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-06remove some unnecessary typedef struct... sugarNoel Grandin
Change-Id: I1576282b0a0a3af8ae14c04725d9c4900073f2c4 Reviewed-on: https://gerrit.libreoffice.org/68758 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-06loplugin:unnecessaryparen improve member expressionNoel Grandin
Change-Id: I304621018cb1e2a47e478e86df4229bcf2176741 Reviewed-on: https://gerrit.libreoffice.org/68757 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-05re-land "new loplugin typedefparam""Noel Grandin
This reverts commit c9bb48386bad7d2a40e6958883328145ae439cad, and adds a bunch more fixes. Change-Id: Ib584d302a73125528eba85fa1e722cb6fc41538a Reviewed-on: https://gerrit.libreoffice.org/68680 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-04OSequenceIterator is not necessary anymoreNoel Grandin
we have been able to iterate over a sequence for a long time now Change-Id: Ie7ed6ec25682f631e01170029f7c9f0089448836 Reviewed-on: https://gerrit.libreoffice.org/68666 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-04simplify UNO getTypes methodsNoel Grandin
Change-Id: Ia8b07edec54527fb4904536fabb03a18e8452550 Reviewed-on: https://gerrit.libreoffice.org/68659 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-04Revert "new loplugin typedefparam"Noel Grandin
This reverts commit 9865440d217d975206a3f91612f0666312bc8fd8. This is not ready to land yet, seems like the latest update of the logic reveals a bunch more places I need to fix before it can land.
2019-03-04new loplugin typedefparamNoel Grandin
verify that parameters use the exact same typedef-names (if any) in definition and declaration Change-Id: I55d2817f599b0253904dce2d35a1a93967e15a77 Reviewed-on: https://gerrit.libreoffice.org/68439 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-27loplugin:unusedfields look for classes where we can make all the..Noel Grandin
fields private Change-Id: Id3c6b123f06ab5dcf87628de4c347626110d2d27 Reviewed-on: https://gerrit.libreoffice.org/68302 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-21xmloff: create XMLImpressContentExportOasis instances with an uno constructorMiklos Vajna
Change-Id: I75301ca29794dd42a966faa36add3078c8c55211 Reviewed-on: https://gerrit.libreoffice.org/68166 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-02-20More loplugin:simplifyboolStephan Bergmann
...found with (trunk) libc++ on macOS, where the standard library iterator implementations are apparently sufficiently different to libstdc++ to find more cases of !(... == ...) vs. ... != ... Change-Id: Ia3861406aa584c7b1d33f47448190b5cf2e770f7 Reviewed-on: https://gerrit.libreoffice.org/68089 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-15xmloff: create XMLImpressStylesExportOasis instances with an uno constructorMiklos Vajna
Change-Id: I831321bcce241bc180e22b20364137f776fee0f9 Reviewed-on: https://gerrit.libreoffice.org/67847 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-13sw btlr writing mode: implement ODF filterMiklos Vajna
An easy way would be to just extend aXML_WritingDirection_Enum, but then we would write the new attribute value to a non-extension namespace. So special case the new attribute value during both import and export (and only for table cells as a start). Change-Id: I431bf99693c4a3452e91f241bd2f0fcfc72c68fd Reviewed-on: https://gerrit.libreoffice.org/67770 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-02-11tdf#120703 PVS: V560 A part of conditional expression is always true/falseMike Kaganski
Change-Id: Ib9ad5b874a210ef3862c668158fcc5d18eeab363 Reviewed-on: https://gerrit.libreoffice.org/67579 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-02-11loplugin:indentation in writerfilter..xmloffNoel Grandin
Change-Id: Ibda157508e92ab5fb222daf79a38941c30a8057e Reviewed-on: https://gerrit.libreoffice.org/67611 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-08o3tl::make_unique -> std::make_unique in tools..xmloffGabor Kelemen
Since it is now possible to use C++14, it's time to replace the temporary solution with the standard one Change-Id: Ib3201f865d43f372007cdf381c7e244e9cbeae26 Reviewed-on: https://gerrit.libreoffice.org/67474 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-08xmloff: create XMLImpressExportOasis instances with an uno constructorMiklos Vajna
Change-Id: I58c689f5a1b034f64687031e24b82a3ac56e4bae Reviewed-on: https://gerrit.libreoffice.org/67519 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-06no need to use OUStringHash here anymoreNoel Grandin
Change-Id: I2faa8c971dc7f4642353dceafa25b9022a0dfd2a Reviewed-on: https://gerrit.libreoffice.org/67436 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-05Remove code committed involuntarily.Xisco Fauli
Follow-up of a7da594593eb2d63004a91dc471683713ce9742a Change-Id: I7e252f9a881b2ac1098bc21bd193f66d32404056 Reviewed-on: https://gerrit.libreoffice.org/67423 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2019-02-05tdf#122625: Use solution for tdf#118879 in a more general caseXisco Fauli
Partially revert commit 36aa3f4d6f9e9da7289ed760cfb1e87600cb6459 Change-Id: Ia554d3e64da2ee620c69bc66b33a6cd305502c64 Reviewed-on: https://gerrit.libreoffice.org/67418 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-02-04tdf#118879 don't embed base64 image data if we have an origin URLTomaž Vajngerl
If an Graphic has an OriginURL it means it was created from an external source. We want to preserve this so we don't want to add the image base64 data - used in Flat ODF format. Change-Id: I2782ec53cf8dc78b0c360365d3eed3e5c54bf271 Reviewed-on: https://gerrit.libreoffice.org/67338 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-02-01Use << instead of + in SAL_WARN_IFStephan Bergmann
Change-Id: Iedf02c89954458e762a1997ed1676a278570a00c Reviewed-on: https://gerrit.libreoffice.org/67251 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-01fix incorrect OSL_ENSURENoel Grandin
broken in commit 5e0b52c1893ffe04a68333026afa7a557c48d534 Date: Thu May 17 14:51:04 2012 +0100 some more ConstAsciiString behind OSL_ENSURE Also convert to SAL_WARN_IF, and make the error message more useful. Change-Id: I7f1d0c577751e7309d5a0d544f38c5050b903a58 Reviewed-on: https://gerrit.libreoffice.org/67230 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-01xmloff: create XMLImpressImportOasis instances with an uno constructorMiklos Vajna
Change-Id: I10cac20b8180c0fc4d7cade2ab3d5de0f9380a88 Reviewed-on: https://gerrit.libreoffice.org/67240 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-01-29Improve ODF enhanced-path command moveTo to follow specRegina Henschel
ODF 1.2 section 19.145 says 'If a moveto is followed by multiple pairs of coordinates, they are treated as lineto.' The patch does this on import. Change-Id: Ib493ca49288cdb2d34b7ee801bd052281617d2e8 Reviewed-on: https://gerrit.libreoffice.org/66888 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2019-01-23loplugin:constparams in xmloffNoel Grandin
Change-Id: I8874c9204b8bf8f422fb5bb826a340b787589360 Reviewed-on: https://gerrit.libreoffice.org/66768 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-22tdf#42949 Fix IWYU warnings in include/xmloff/*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Id20e0bc42e39f868a7c5d49d756f2ad5e14a86c0 Reviewed-on: https://gerrit.libreoffice.org/66637 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-01-19tdf#101218 Import layer-set from pageRegina Henschel
This patch is a interim solution for document exchange between Karbon and LibreOffice, till layer-set for page and for master-page is implemented some day. Change-Id: I2f12eeeb9c742f65999fd4c0d95c418273ae008f Reviewed-on: https://gerrit.libreoffice.org/66518 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2019-01-18Use getTokenCount instead of custom codeMatteo Casalin
Change-Id: Ie6f097984950d306453f0735eb299cfa65d4d74e Reviewed-on: https://gerrit.libreoffice.org/66225 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-01-18Avoid getToken index for single call, minor simplificationMatteo Casalin
Change-Id: If9ec36565cf42d11a0e1715f4aac28c365843a56 Reviewed-on: https://gerrit.libreoffice.org/66226 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-01-16New loplugin:emptyStephan Bergmann
Change-Id: I8729db064573ac21dfe6b203c5ae244d79ecc4fe Reviewed-on: https://gerrit.libreoffice.org/66430 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-14use unique_ptr in XMLPropertyHandlerFactory::CreatePropertyHandlerNoel Grandin
Change-Id: Idb33e3a23b7e6001b2c549875a16b475d3ecd470 Reviewed-on: https://gerrit.libreoffice.org/66186 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-13Base loops on getToken index, not on numer of tokensMatteo Casalin
Change-Id: I5dea52157b42749bcd1925bd7a9fcefad1dc857f Reviewed-on: https://gerrit.libreoffice.org/66224 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-01-13Avoid index for single getToken callMatteo Casalin
Change-Id: Id7206487f96792ffe38611c36ac0e0e28bcc59b7 Reviewed-on: https://gerrit.libreoffice.org/66222 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>