summaryrefslogtreecommitdiff
path: root/xmloff
AgeCommit message (Collapse)Author
2018-02-10ofz#6180 Integer-overflowCaolán McNamara
Change-Id: Ibf4b40521f5be3866451e574abc59b7e1cf3aec9
2018-02-09ofz#6180 Integer-overflowCaolán McNamara
Change-Id: I6339a6ebb188dc9e7bccfa629a40af8e67c13feb Reviewed-on: https://gerrit.libreoffice.org/49487 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-08tdf#115319 use loext namespace for reference-languageLászló Németh
attribute of alternative reference fields with Hungarian articles Change-Id: I19578bc0d5cb5633cf2619e9aea81da946a13f3e Reviewed-on: https://gerrit.libreoffice.org/49437 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2018-02-07tdf#115483 svl xmloff sc sw: verify all ODF 1.2 protection-key hashesMichael Stahl
ODF 1.2 has added some mandatory requirements for protection-key hashes which did not exist in ODF 1.1. This affects sections and indexes in ODT documents, as well as spreadsheets and sheets in ODS documents. 1. Accept the following hashed passwords: * UTF16 LE/BE encoded StarOffice-SHA1, OOo legacy and allowed by ODF 1.1 * UTF8 encoded proper SHA1, as required by ODF 1.2 * UTF8 encoded SHA256, as required by ODF 1.2 - specified either with the wrong URL used in the ODF 1.2 spec or the correct URL from the W3C spec, see OFFICE-3702 * Excel+SHA1 double-hash, only in Calc, see OFFICE-2112 2. Round-trip any of the above as-is * for SHA256 only write the URL from the ODF 1.2 spec 3. Generate only UTF16 LE encoded SHA1 for now, so that older LO releases can still verify the password * some time in the future, switch to generating some valid ODF 1.2 hash More changes are necessary in Calc, which can actually preserve different hashes for the same passwords in its runtime data model, whereas Writer just has a single buffer without even any metadata. For the Calc unit tests we need one document per hash because the protection-key attribute can be set on the entire spreadsheet, which is an unique element in the document. There are further uses of SvlPasswordHelper for change-tracking passwords, but apparently those are stored in settings.xml, so ODF has no requirements for them, so let's leave that as it is. Change-Id: Icb720b14ae9c0d9c04d2e082769ae2b74e3af8aa Reviewed-on: https://gerrit.libreoffice.org/49352 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-02-05unused includeTomaž Vajngerl
Change-Id: Ia39289367d00b006b022305db500abeb1ab0ef9e Reviewed-on: https://gerrit.libreoffice.org/49220 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-02-02tdf#115319 references with Hungarian articlesLászló Németh
Add new alternative reference formats, stored by the proposed text:reference-language attribute. This is an implementation of the ODF improvement draft published in the bug report. Note: choose Hungarian locale setting to show the new "Article a/az + Page" etc. reference formats in dialog window "Fields". Change-Id: I210d4b9a3e821fb4e45e24643bad9c70b867c89d Reviewed-on: https://gerrit.libreoffice.org/48944 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-02-01Change bitmap table to store XBitmap instead of GraphicObject URLTomaž Vajngerl
As we want to get rid of GraphicObject URLs for the more robust image life-cycle handling, it was necessary to change the way bitmap table stores and handles images, so that they always store a Graphic object (wrapped in UNO object that provides the XGraphic and XBitmap interface). In addition this changes loading and saving from ODF (xmloff) and OOXML (oox) filters so they don't depend on GraphicObject URL anymore, but load or save directly to / from XGraphic or XBitmap. Change-Id: I2b88e10056e7d6c920249d59188f86b1a5a32d21 Reviewed-on: https://gerrit.libreoffice.org/49074 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-01-31loplugin:useuniqueptr in SvXMLExportNoel Grandin
Change-Id: I8ce26b7cddeb74fd86f60896c84bf3574ccbc9bc Reviewed-on: https://gerrit.libreoffice.org/48421 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-29xmloff: add a comment tooMichael Stahl
Change-Id: Ic23c36250938009b17f4b916f0d13a097d018a0c
2018-01-29tdf#106780 Fix for invalid attribute in impress ODFAbhishek Shrivastava
This patch fixes the invalid ODF generated in impress. In tables now the attribute is shown as table:name="default" instead of "text:style-name". For strict XML version we only set table:name="default" For Extended/Compatibility XML we set both text:style-name and table:name Change-Id: I894fd31f5f0eed3f77b216b3114b5da53acf1f9f Reviewed-on: https://gerrit.libreoffice.org/48373 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-01-28ofz#5621 Integer-overflowCaolán McNamara
Change-Id: Ie0a7c29428e686e5c480997b84b8d12e5be4539f Reviewed-on: https://gerrit.libreoffice.org/48790 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-26xmloff: ODF export: don't write LO_EXT attribute unless ODF expendedMichael Stahl
The loext namespace is not defined when exporting standard ODF versions, which triggers an assert() in SvXMLNamespaceMap. (regression from 4469b29faeb8dbf7793a5d81d9c5ddebacf3015f) Change-Id: Ic93fb0ea8fe092463d3fd18a0fbf4429d8652642
2018-01-26ofz#5621 Integer-overflowCaolán McNamara
Change-Id: I621fb776457054f82078ed483c8b247acf734a3a Reviewed-on: https://gerrit.libreoffice.org/48630 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-26loplugin:useuniqueptr in XMLTextParagraphExportNoel Grandin
Change-Id: I20a45d5d3914c75b01b55339169d495b294fe7fd Reviewed-on: https://gerrit.libreoffice.org/48514 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-25loplugin:useuniqueptr in XMLTransformerBaseNoel Grandin
and flatten some members, no need to allocate separate object Change-Id: I9f6b7ee89af935608424a88d9343d8bbebaaada1 Reviewed-on: https://gerrit.libreoffice.org/48513 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-25reuse limitCaolán McNamara
Change-Id: I5942b6581c02ac55d7eb6acf535214daa5b34865 Reviewed-on: https://gerrit.libreoffice.org/48507 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-25ofz: out-of-memoryCaolán McNamara
Change-Id: If1c9ade3268f4ebadfdad771fe3b35641dca210d Reviewed-on: https://gerrit.libreoffice.org/48506 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-25loplugin:datamembershadow in SdXMLShapeLinkContextNoel Grandin
in this case, we can just drop the child member and re-use the parent member. The parent class barely contains any logic anyway. Change-Id: I520217c04a38b66323a76bf5fddb476bd3fc8e15 Reviewed-on: https://gerrit.libreoffice.org/48551 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-25loplugin:useuniqueptr in XMLTextFieldExportNoel Grandin
Change-Id: I2b3e1ec5454bc3486fb41b010091adc549500daf Reviewed-on: https://gerrit.libreoffice.org/48512 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-25loplugin:useuniqueptr in SvXMLNumFmtExportNoel Grandin
Change-Id: I720450a4bee17673907fba2e9a34879d2a98bcae Reviewed-on: https://gerrit.libreoffice.org/48481 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-25loplugin:useuniqueptr in SdXMLExportNoel Grandin
and flatten some data structures, no need to allocate some of the the vector members on the heap Change-Id: I8e7e06144da2fa58c8e3352013d44d368d61ea1d Reviewed-on: https://gerrit.libreoffice.org/48480 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-25loplugin:useuniqueptr in XMLEventImportHelperNoel Grandin
Change-Id: I2369ac92fa2f30b98b5910563dd6d0a6f8ca6a0c Reviewed-on: https://gerrit.libreoffice.org/48479 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-24ofz#5621 Integer-overflowCaolán McNamara
Change-Id: I98f93101dc287b2ef285f3d9547d44dd06d2fe01 Reviewed-on: https://gerrit.libreoffice.org/48429 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-24loplugin:useuniqueptr in OOo2OasisTransformerNoel Grandin
Change-Id: I6c1cabbf233e6d3d9fd37cdb5c66ffa17df2dd9c Reviewed-on: https://gerrit.libreoffice.org/48425 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-24loplugin:useuniqueptr in Oasis2OOoTransformerNoel Grandin
Change-Id: I7636bb09bfa728ae8031d57e52d2903f711e9cca Reviewed-on: https://gerrit.libreoffice.org/48424 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-23USHRT_MAX -> SAL_MAX_UINT16 for XMLCharContext::m_nCountStephan Bergmann
...which is of type sal_uInt16 ever since the class got introduced with 0e3ff5db960cdf907c03445220f1e29d37fc367f "INTEGRATION: CWS oj14: #i77059# export char content helper for example line break" Change-Id: I1dcb2894861ea5b6104932d896b7166c5c0b4689 Reviewed-on: https://gerrit.libreoffice.org/48347 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-20loplugin:unused-returns in filter,tools,xmloffNoel Grandin
Change-Id: I7a57be7e241883adac4417baa699a97d6304a631 Reviewed-on: https://gerrit.libreoffice.org/48188 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-18Fix typosAndrea Gelmini
Change-Id: I633e4921042809c628e55825b70c540767eba1d3 Reviewed-on: https://gerrit.libreoffice.org/48140 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-18Fix typosAndrea Gelmini
Change-Id: Iaad78e5f1100df1ca69d34bf7693e4a9feac17eb Reviewed-on: https://gerrit.libreoffice.org/48084 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-17loplugin:unnecessaryparen extend to delete statementsNoel Grandin
Change-Id: Ic4383ea948876a26f791f0e5b0110cef978a26e1 Reviewed-on: https://gerrit.libreoffice.org/48027 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-15tdf#114488 Rank multiple images also for flat odfSamuel Mehrbrodt
Only the file extension was considered before which is not available in flat odf. Now both internal and external URLs are resolved to their respective mimetype. Change-Id: Id7e290cd9a441a1a6c2ce5e8d764391c50495bea Reviewed-on: https://gerrit.libreoffice.org/47824 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-01-15More loplugin:cstylecast: xmloffStephan Bergmann
Change-Id: I870bc9fd1c7361913b073411065ec723f6b080da
2018-01-14xmloff: XmlImageStyle class is pointless as the methods are staticTomaž Vajngerl
When used, we instantiate the XmlImageStyle class but all its methods are static, so instantioation is completely pointless. So change XmlImageStyle to a namespace and static method to functions. Change-Id: I6385bd7eeb08c627cb8e48b79a6820372cf94a65 Reviewed-on: https://gerrit.libreoffice.org/47851 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-01-12More loplugin:cstylecast: xmloffStephan Bergmann
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: Ic872cef7bb9982305528ec3ce12a1871f055b752
2018-01-11Corrected precision of imported rotationArmin Le Grand
Change-Id: I82a8b13acad1dd4d56657f02ba02ab1f1f35b161 Reviewed-on: https://gerrit.libreoffice.org/47759 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2018-01-11Fix typosAndrea Gelmini
Change-Id: If655aaa59d42ab63335ced6d98b2c02d0ac4ff5b Reviewed-on: https://gerrit.libreoffice.org/47764 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-11loplugin:redundantcast: xmloffStephan Bergmann
(after a to-be-committed improved loplugin:cstylecast would have rewritten the C-style casts into static_casts) Change-Id: I4697e7f56d700b360dbdf2ab91ec7932e91244ad
2018-01-11RotateFlyFrameFix: Add RotCenter info to ODF exportArmin Le Grand
Since the WriterFlyFrames are implicitly rotated around their center in the Writer UI this has to be added to the transformation in ODF expressing this. The saved data now contains the shape data in svg:x/y/width/height statements (and thus back-compatible AFAP) and a draw:transform statement (that is to be applied to the defined shape) containing the rotation around the object's center. Change-Id: Iccfc70924364f1d58995fce180bce9b6e7643ff4 Reviewed-on: https://gerrit.libreoffice.org/47719 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-01-09RES_CHRATR_PROPORTIONALFONTSIZE and RES_CHRATR_NOLINEBREAK unusedNoel Grandin
but leave placeholders behind to avoid having to renumber items. Change-Id: Ifa1a9dc790a68d7486da7504c11b3c203a5fd3db Reviewed-on: https://gerrit.libreoffice.org/47580 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-04Fix typosAndrea Gelmini
Change-Id: I4fae1f0f5da36741ee8aa163f8372f19c050fa0c Reviewed-on: https://gerrit.libreoffice.org/47406 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2018-01-04Modifying the impl. of startUnknownElement of FastParser:Mohammed Abdul Azeem
Modifying it to emit the namespace URI instead of prefix and qualified name instead of local name. This will be useful for handling arbitrary elements in the fast contexts. Change-Id: I0f150b862574612e97491f6c335f3f4c9966da0a Reviewed-on: https://gerrit.libreoffice.org/47055 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2018-01-04RotateFlyFrameFix: im/export rotation in degArmin Le Grand
Unified im/export of rotation at FlyFrame Graphics to not write their internal old 10th degree format, but to use deg notation and the correct orientation. Extended the mechanism to use tooling (SdXMLImExTransform2D) to completely read/write 'draw:transform' statements. Added quite some comments due to stuff in the old mechanism(s) Change-Id: I7d265c1a05532a0dd9b921e383c10b477b4c8846 Reviewed-on: https://gerrit.libreoffice.org/47335 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2018-01-04loplugin:redundantinline (--disable-debug)Stephan Bergmann
Change-Id: I0252fcbf7835cca1e9d6569db0ccacf30081a8e9 Reviewed-on: https://gerrit.libreoffice.org/47330 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-03loplugin:passstuffbyref more return improvementsNoel Grandin
slightly less restrictive check when calling functions Change-Id: I35e268ac611797b1daa83777cda02288a635aa32 Reviewed-on: https://gerrit.libreoffice.org/47259 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-29Fix typosAndrea Gelmini
Change-Id: I90f72b6a618436d8cd2115be4e57a07bac15befc Reviewed-on: https://gerrit.libreoffice.org/47161 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-27loplugin:passstuffbyref improved return in xmloff,sfx2Noel Grandin
Change-Id: I7161dfca77f944027bd20614616e22d6acfa27cd Reviewed-on: https://gerrit.libreoffice.org/47081 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-25various coverity exception warningsCaolán McNamara
Change-Id: I7b3588ad42e17f2f363b6a247e318f23c95e578e Reviewed-on: https://gerrit.libreoffice.org/46961 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-20Fix typosAndrea Gelmini
Change-Id: I6f0eb93ec654e629c8fbe761f000190ea9343103 Reviewed-on: https://gerrit.libreoffice.org/46824 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-19wrap scoped enum around css::util::NumberFormatNoel Grandin
Change-Id: Icab5ded8bccdb95f79b3fa35ea164f47919c68fa Reviewed-on: https://gerrit.libreoffice.org/46339 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-12-19inline use-once typedefsNoel Grandin
Change-Id: I5c3ffc03c26b3428f1f336e6ecba7838a1cf1157 Reviewed-on: https://gerrit.libreoffice.org/46764 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>