summaryrefslogtreecommitdiff
path: root/xmloff
AgeCommit message (Collapse)Author
2018-03-26forcepoint #35 handle odd number of dimension fragmentsCaolán McNamara
Change-Id: I97e4e1b38d80276077b3427c90ae33023afb5e59 Reviewed-on: https://gerrit.libreoffice.org/51899 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-25xmloff: export ruby-position in a more compatible way.Mark Hung
Export both style:ruby-position and loext:ruby-position. The later one only allows "above" and "below", obeying ODF standard while the former one allows "inter-character", which is added lately. Also use ODFVER_012_EXT_COMPAT so that loext:ruby-position isn't exported only in extended mode. Change-Id: I7b9208f289f8253a835b2f7751549206361274e0 Reviewed-on: https://gerrit.libreoffice.org/51007 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Hung <marklh9@gmail.com>
2018-03-20tdf#115005 Do not remove original vector images from slidesSerge Krot
During calculation of the quality index of the image, we should take into account also SVM vector image type. Its mime type is image/x-vclgraphic. Change-Id: I7c723e99995f73258bb59d976a6c7670c51f7a25 Reviewed-on: https://gerrit.libreoffice.org/51599 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-03-20tdf#83877 ODF: Load signature linesSamuel Mehrbrodt
Change-Id: I6a92246161be34bc6ecea8f1c04229a5dd593deb Reviewed-on: https://gerrit.libreoffice.org/51535 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-03-20Signatureline ODF export: Use tokens instead of plain stringsSamuel Mehrbrodt
Change-Id: I80eca35b03be2a7f288705295a355f08fbc757be Reviewed-on: https://gerrit.libreoffice.org/51542 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-03-19Improve error message on token inconsistencySamuel Mehrbrodt
Change-Id: Ib8f4d0d008b495139defb162b1b5105e5e271c67 Reviewed-on: https://gerrit.libreoffice.org/51536 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-03-19Write signatureline element after imagesSamuel Mehrbrodt
The importer expects an image to exist when parsing the signatureline element Change-Id: I30c0ffad294229e0d2b09b5d7c31a692e714a3d5 Reviewed-on: https://gerrit.libreoffice.org/51534 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-03-15Fix typosAndrea Gelmini
Change-Id: Icb2d5f8bb9eb781d6a59384e1aac75abf6145774 Reviewed-on: https://gerrit.libreoffice.org/51337 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins <ci@libreoffice.org>
2018-03-14loplugin:constantparamNoel Grandin
Change-Id: I3ce653c0d9e517229dbbe32cc8d3ec3c206e364d Reviewed-on: https://gerrit.libreoffice.org/51273 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-14Moving XSAXDocumentBuilder2 to use XFastDocumentHandler:Mohammed Abdul Azeem
This is used in parsing of meta Contexts across different modules. This also involved moving to XFastParser for parsing xml filters in sw, sd, starmath. Change-Id: Ic663aaac6cb20ee8ce5b97cae87c93220f5a2929 Reviewed-on: https://gerrit.libreoffice.org/42989 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins <ci@libreoffice.org>
2018-03-14xmloff: ODF import: improve meta:generator checksMichael Stahl
Instead of a hard-coded check for (effectively) one project name "LibreOffice" (which is build-time configurable), check for the string "LibreOffice_project", which has been produced hard-coded ever since LO 3.3.0. This now recognises additional downstreams "LibreOffice_Vanilla" and "Collabora_Office", and also historic "BrOffice". An important point here is that the build-time configurable version numbers of any downstream that retains the hard-coded "LibreOffice_project" *MUST* be the same as the upstream's at least in their major and minor versions (micro and further digits are currently not used), and that such downstreams don't backport changes with ODF export compatibility impact further than upstream. Add a unit test too, with a representative sample of 4372 distinct generators in bugzilla attachments. This revealed that StarOffice 6 and AOO 4.0.1 were falling through the cracks and not recognised, so fix that too. Change-Id: I8105222d3428e7b20cc4a6b8e76732c697812594 Reviewed-on: https://gerrit.libreoffice.org/51171 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-03-11use XML_EMBEDDEDOBJECTGRAPHIC_URL_BASE defineTomaž Vajngerl
Change-Id: I6d37cc1e745b797a1c727a988177916291b650be Reviewed-on: https://gerrit.libreoffice.org/51049 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-11xmloff: convert replacement image loading to use "Graphic" prop.Tomaž Vajngerl
With this change ResolveGraphicObjectURLFromBase64 and ResolveGraphicObjectURL became unused and are also removed with this commit. Change-Id: I45428a4e47f0e8800f18c1fdba007293dfcb53f4 Reviewed-on: https://gerrit.libreoffice.org/51043 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-11xmloff: convert form controls to use Graphic property on importTomaž Vajngerl
Change-Id: I98e6a8a6cf114e1b6347b77abc6c3ad30842c3cd Reviewed-on: https://gerrit.libreoffice.org/51042 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-10xmloff: embedded objects can still use GraphicObject URLTomaž Vajngerl
The embedded graphic object don't seem to use the uniqueID of a graphic object, but seem to have the same URL prefix. Let's leave this in for now. Change-Id: I48d9ad2c3b1eca745911f03221988c46c0fdb8d2 Reviewed-on: https://gerrit.libreoffice.org/51041 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-10loplugin:unusedfieldsNoel Grandin
Change-Id: Idd0cdd38718c3822db4d4b94ca2315a416bc27bb Reviewed-on: https://gerrit.libreoffice.org/50997 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-10xmloff: modify code relying on Graph.Object URL and cleanup codeTomaž Vajngerl
Change-Id: Id08ee261ae06673809fcf8581e2490ecd957891f Reviewed-on: https://gerrit.libreoffice.org/51011 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-09svx: convert "ThumbnailGraphicURL" prop. to "ThumbnailGraphic"Tomaž Vajngerl
Change-Id: Id77768e6ad58c8ed7bd35478a8f0cf78ce4b1feb Reviewed-on: https://gerrit.libreoffice.org/50934 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-08loplugin:constantparam in svtools..unotoolsNoel Grandin
Change-Id: I6e72fbe44dcb65ee5162448e9a72e6437d56b044 Reviewed-on: https://gerrit.libreoffice.org/50948 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-08loplugin:unusedmethodsNoel Grandin
Change-Id: Id6b4edd265cb6bef31c72e2a0a440211d51c7c33 Reviewed-on: https://gerrit.libreoffice.org/50900 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-07tdf#115432 footnote separator position wrong (3rd attempt)Noel Grandin
My second attempt in commit dedf5e4f9000e271683dea9a0488e1b45b91176c "tdf#115432 footnote separator position wrong (2nd attempt)" managed to lose part of the change because of incorrect rebasing. Change-Id: I7b18f3e1602c617d1cb414ef0eb2ee456aeb58ee Reviewed-on: https://gerrit.libreoffice.org/50901 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2018-03-07tdf#115432 footnote separator position wrong (2nd attempt)Noel Grandin
the first attempt (d4a8d91abd40dee7f7bd739a678a502a6e34cb59) incorrectly changed the type of a UNO property defined in a published IDL file. Change-Id: I75bc75dead0954d1faa6dfb6adab9f4c42c67cfc Reviewed-on: https://gerrit.libreoffice.org/50827 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-07Revert "tdf#115432 footnote separator position remain in the left side"Noel Grandin
This reverts commit d4a8d91abd40dee7f7bd739a678a502a6e34cb59. because it changes the type of an UNO property defined in a published IDL file Change-Id: I4d3db3532b27552a30f34fcd4201856565eb0a3b Reviewed-on: https://gerrit.libreoffice.org/50825 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-07xmloff: remove "GraphicURL" from XMLShapeExportTomaž Vajngerl
Change-Id: If1967a7d87a934e2eea776bcd41b305e800f711a Reviewed-on: https://gerrit.libreoffice.org/50790 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-07xmloff: convert XMLTextParagraphExport to get rid of "GraphicURL"Tomaž Vajngerl
Change-Id: I10cc1115bfe628dc296b67b75e386e1a2e4a6c46 Reviewed-on: https://gerrit.libreoffice.org/50789 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-07convert SymbolBitmapURL to SymbolBitmap used in chart2Tomaž Vajngerl
Change-Id: Ib35ee5b5890ff5ca30796fc8608f00ff4b6b03e2 Reviewed-on: https://gerrit.libreoffice.org/50788 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-07Move BackGraphicURL property & friends to BackGraphic + fixesTomaž Vajngerl
This moves BackGraphicURL, HeaderGraphicURL, FooterGraphicURL and ParaBackGraphicURL properties to BackGraphic, HeaderBackGraphic, FooterBackGraphic and ParaBackGraphic. With this the property type changes from String to XGraphic. This change also fixes a bunch of test failures, changes the tests to use the new properties and the correct type, changes the import and export filters like xmloff and oox, to make the tests happy. Change-Id: Ie66097514203c6dc36ab27420faf265322e9279e Reviewed-on: https://gerrit.libreoffice.org/50760 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-06ofz#6764 Null-DereferenceCaolán McNamara
Change-Id: Ic4c43d43b673f207123c99cbaca7efc019565c0d Reviewed-on: https://gerrit.libreoffice.org/50820 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-06use more Color in xmloffNoel Grandin
Change-Id: Iec12d2e9f3e254dc6525dc285259321b13f75c4a Reviewed-on: https://gerrit.libreoffice.org/50794 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-06add some color conversion methods to sax::ConverterNoel Grandin
to make the call-sites less verbose Change-Id: Ifddcbb03a454a241bef93f31a8025801b84a66fc Reviewed-on: https://gerrit.libreoffice.org/50578 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-05drop sax::tools::*base64 methodsNoel Grandin
and use the underlying comphelper methods rather. This is so that I can break the dependency that tools has on sax, and can add methods that make sax depend on tools. Change-Id: I8a2d6ce2ffc3529a0020710ade6a1748ee5af7d5 Reviewed-on: https://gerrit.libreoffice.org/50767 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-02ofz#6656 -1 isn't a good flag for all elements filledCaolán McNamara
Change-Id: I163de8fd943859fbf986da0928f3e3552d063a09 Reviewed-on: https://gerrit.libreoffice.org/50622 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-02tdf#35301 xmloff: load / store loext:ruby-position.Mark Hung
Add a new property loext:ruby-position to ODF filter for the new attribute value "inter-character". Change-Id: I193eb93fba0e2e7861b6c8635244cac36eb29a06 Reviewed-on: https://gerrit.libreoffice.org/48328 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Hung <marklh9@gmail.com>
2018-03-02tdf#115429 sax,xmloff: assert on empty attribute names & namespacesMichael Stahl
Surely that's indication of a bug somewhere. Change-Id: Ic6219d8eb7f22301d8c4da98b2132ae3ef0467b5 Reviewed-on: https://gerrit.libreoffice.org/50579 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-03-01tdf#115429 xmloff: ODF import: fix handling of unknown attributesMichael Stahl
... in SvXMLLegacyToFastDocHandler::startElement(), so that it does not create invalid "-1" tokens that end up stored as empty-string attribute names in SvXMLAttrCollection and ultimately exported as invalid XML. The maName in struct UnknownAttribute actually stores a QName, i.e. namespace-prefixed, since commit bb59a80ee6000d3922fa95262f67e291fd9d8ee2. The attributes are read and converted again in SvXMLImportContext::startUnknownElement(). Change-Id: Ia69a4da293f1a84ce30766abc09ca19e2620edbd Reviewed-on: https://gerrit.libreoffice.org/50580 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-02-28drop old tools/gen methods in reportdesign..xmloffNoel Grandin
Change-Id: I398831c526ba51d861557fa6c13c0e2fb44dfbe0 Reviewed-on: https://gerrit.libreoffice.org/50447 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-28convert COL_ constants to be of type ColorNoel Grandin
Change-Id: I0e25c8950ac26b851ff42f71e1471fcbe4770d48 Reviewed-on: https://gerrit.libreoffice.org/50373 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-28tdf#115429: declare fill-ruleJulien Nabet
Change-Id: I5eb93d08b1dd56db19038132b560ddf7ba174bc6 Reviewed-on: https://gerrit.libreoffice.org/49242 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-02-27tdf#115432 footnote separator position remain in the left sideNoel Grandin
regression from commit 7e9857c2935bb2533806db4e71c6cd1e171c3478 "templatize SvXMLEnumMapEntry" Change-Id: Id29e7c07be637adcdc7fe624a1673beca9829d4d Reviewed-on: https://gerrit.libreoffice.org/50420 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-26use less RGB_COLORDATANoel Grandin
part of removing ColorData Change-Id: If31b5b88545529863377e9a178f45f4516bf6cbb Reviewed-on: https://gerrit.libreoffice.org/50345 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-26Fix typosAndrea Gelmini
Change-Id: Ifcfb8ed6783f7d022e7c7f139e3f3bafa7b4b71a Reviewed-on: https://gerrit.libreoffice.org/50088 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-02-26xmloff: remove unused code when loading/saving the bitmap tableTomaž Vajngerl
Change-Id: I6bffe243e813079538a4cb57111266b41d7c03f1 Reviewed-on: https://gerrit.libreoffice.org/50333 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-02-25remove const property name member for "GraphicURL"Tomaž Vajngerl
All of them should be removed however.. Change-Id: I83c9ec3c8d5f547b39528121a8d4be12aa1b911c Reviewed-on: https://gerrit.libreoffice.org/50296 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-02-25fix import of graphic bulletsTomaž Vajngerl
When changing to use "GraphicBitmap" property instead of "ImageURL", the import wasn't adapted and there was no test which would warn of such an situation. This also changes the difference between writer and impress where impress used "Graphic" and not "GraphicBitmap" property. Also adds missing tests for both writer and impress Change-Id: Ieed629d2d37f7806d63e729b6ef23cd848593071 Reviewed-on: https://gerrit.libreoffice.org/50140 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-02-23forcepoint #5 null derefCaolán McNamara
Change-Id: I95b67f98b7028d7ca7c4a9d1c15100e42d359816 Reviewed-on: https://gerrit.libreoffice.org/50241 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-22Replace "ReplacementGraphicURL" with "ReplacementGraphic" propertyTomaž Vajngerl
To transport the replacement graphic we use "ReplacementGraphicURL" property, but as it uses an GraphicObject URL it needs to be replaced. The new "ReplacementGraphic" does this with an XGraphic object as instead of the String URL. Change-Id: Iddf01c9aecb2a31a467e7b9d399495e0428d1859 Reviewed-on: https://gerrit.libreoffice.org/49993 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2018-02-21report the saved mimetype when saving graphic + mime from streamTomaž Vajngerl
When saving we need to determine which mime type to use for the graphic. Return this information back to the caller so the metadata can be written into the file if necessary. Also add function to determine the mime type from the XGraphic by converting it to a stream first (only then we can determine the format that will actually be used and written to the storage file. Change-Id: I796da715e47f29d77dea605a2769a2217ecd6ba5 Reviewed-on: https://gerrit.libreoffice.org/49992 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-02-21tdf#115782: Need to use mirrored rotation in ODFArmin Le Grand
To be compatible with the orientation of rotations in ODF format in current state (which is wrong oriented) we have to do the same as in all other places (unfortunately). Change-Id: I2f02019b91a0f6020612c9c09be2d247e1b1deb1 Reviewed-on: https://gerrit.libreoffice.org/50047 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2018-02-20create uno::Any overrides for ColorNoel Grandin
And use less ColorData in writerfilter and xmloff. part of removing ColorData. Change-Id: Ia1c57bf837ae814e7642cf1c7de2eb7ada7a1500 Reviewed-on: https://gerrit.libreoffice.org/50028 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-20drop Color::SetColor(ColorData) in favour of operator=Noel Grandin
first stage of getting rid of ColorData Change-Id: I5e4e95eb958722814c43c8d1ebfef17ad18c29ec Reviewed-on: https://gerrit.libreoffice.org/49997 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>