summaryrefslogtreecommitdiff
path: root/xmloff
AgeCommit message (Collapse)Author
2018-08-10unnecessary null check before dynamic_cast, in variousNoel Grandin
Change-Id: I76ad0b3152030c29ee28f6a6cc80d0832188d02b Reviewed-on: https://gerrit.libreoffice.org/58774 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-10Fix typosAndrea Gelmini
Change-Id: I98d9120160fb652cae490513765670f447cf5911 Reviewed-on: https://gerrit.libreoffice.org/58791 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2018-08-06Export Data Transformations to ODF - follow-upVikas Mahato
Change-Id: I8aea387f5db399e27b2a08224f6c4ac59f26c54c Reviewed-on: https://gerrit.libreoffice.org/58254 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-08-01add operator+=(OUStringBuffer) method to OUStringNoel Grandin
to reduce needless object creation and copying some more And fix what looks like a bug in CSS hex color parsing at line 609 in sw/../parcss1.cxx that has been there since commit 7b0b5cdfeed656b279bc32cd929630d5fc25878b "initial import" Change-Id: Ibad42b23721a56493bd1edcd7165e6104494a5c3 Reviewed-on: https://gerrit.libreoffice.org/58357 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-30loplugin:stringloop in svgio..xmlsecurityNoel Grandin
Change-Id: I1b2fe5674c8350690efc3d3219b9273cc61d5b0c Reviewed-on: https://gerrit.libreoffice.org/58332 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-30loplugin:returnconstant in xmloffNoel Grandin
Change-Id: Ia837a93ae817df282096abb80efcbd6922867b25 Reviewed-on: https://gerrit.libreoffice.org/58335 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-29Fix typosAndrea Gelmini
Change-Id: I483680622a75affb9822bbf5fc4d14512961493f Reviewed-on: https://gerrit.libreoffice.org/58130 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2018-07-29cppcheck: useInitializationList in test to xmloffJochen Nitschke
Change-Id: I50545784c5412ab7767f401c6e40058a1d0bfab0 Reviewed-on: https://gerrit.libreoffice.org/58262 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-28loplugin:stringloop in xmloffNoel Grandin
Change-Id: I33a24e08b7359a75c41b88c21ee31c22b8c62d05 Reviewed-on: https://gerrit.libreoffice.org/58215 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-26xmloff: avoid -Werror=deprecated-copy (GCC trunk towards GCC 9)Stephan Bergmann
...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 Change-Id: Idd25cd86db429b0f3391e359bb2617863b29eb67 Reviewed-on: https://gerrit.libreoffice.org/58053 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-07-24loplugin:unusedfields,can-be-const in xmloff(1)Noel Grandin
(*) When passing a part of a global static data to XMLPropertiesOOoTContext_Impl, just store a reference to it instead of copying (*) Simplify the OOo2OasisTransformer constructor and call sites to make the const-ness work Change-Id: I012d638cfd9266ed3514164e84b381d0d577f821 Reviewed-on: https://gerrit.libreoffice.org/57853 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-23Fix typosAndrea Gelmini
Change-Id: Iebc31a53404da41f35eed7338662365d7efbd7a2 Reviewed-on: https://gerrit.libreoffice.org/57810 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-07-23loplugin:unusedfieldsNoel Grandin
Change-Id: I1827262ad95942cacff589929f9436f8383cf142 Reviewed-on: https://gerrit.libreoffice.org/57642 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-19Fix typosAndrea Gelmini
Change-Id: I18b19477f9697b155ecb63481c38b93a5ac8c430 Reviewed-on: https://gerrit.libreoffice.org/57607 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-07-17loplugin:useuniqueptr in SvXMLExportPropertyMapper::ImplNoel Grandin
Change-Id: I10729d720338ad3fc0d9507491b6255dd53a3173 Reviewed-on: https://gerrit.libreoffice.org/57512 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-17loplugin:useuniqueptr in XMLRedlineExportNoel Grandin
Change-Id: I337b6c068e28a5cf69d9c0b6a30b480834d8a227 Reviewed-on: https://gerrit.libreoffice.org/57513 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-17remove the GL based 3D chartsMarkus Mohrhard
Change-Id: Ia578c71ae70aa0a85b49fa50138edf90f961b1e9 Reviewed-on: https://gerrit.libreoffice.org/57533 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-07-12tdf#65353 separate autostyle collection and exportTomaž Vajngerl
To be able to look which fonts are in use, we need to collect the autostyles which contains all styles that are used in a document. Previously the autostyles were collected in the same process as they were expoted, so with this commit we separate collaction and export. First we collacte the auto styles, then e can use them in embedded fonts export, the last we export the auto styles themselves. Change-Id: Ib939f1119f4af00a1e5d66fcd2e04b9d2add6881 Reviewed-on: https://gerrit.libreoffice.org/57348 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-07-12Add missing sal/log.hxx headersGabor Kelemen
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it. This is a continuation of commit 6ff2d84ade299cb3d14d4110e4cf1a4b8070c030 to be able to remove those unneeded includes. This commit adds missing headers to every file found by: grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG') to directories w* x* Change-Id: I27bff44da3d34d24262031c7489e755311599bc5 Reviewed-on: https://gerrit.libreoffice.org/57307 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-11ODF export data transformations -follow-upVikas Mahato
Change-Id: I31a0b29d94abb59e7633c45aa1536772b2d8c102 Reviewed-on: https://gerrit.libreoffice.org/57217 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-07-10Revert "tdf#118324 Extend ODF for blank in integer"Eike Rathke
This reverts commit c290f692dd28094d41dff686f3faa1c4e14b556e. Reverting because a) makes builds fail with errors from the schema validator in saving unit tests b) the loext:max-blank-integer-digits is now saved for some number formats where it is not necessary For example, load sc/qa/unit/data/ods/tdf102370_ExponentWithoutSign.ods save as .xlsx reload the .xlsx save as .ods (which effectively is what the ScExportTest::testExponentWithoutSignFormatXLSX() unit test does and makes the schema validator stumble) Change-Id: Iaac7e42b23317e7977876c9b5d545c76a1e2a4d2 Reviewed-on: https://gerrit.libreoffice.org/57240 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2018-07-10tdf#65353 filter fonts when embedding (unused, font script)Tomaž Vajngerl
When embedding, the fonts are gathered and added to the ODF document. This change in addition adds the functionallity to embed used fonts only and filtering out of font scripts. When embedding used fonts only, they are filtered depending on if the style (referencing the font) is in use and in addition if the font is used in direct formatting. Change-Id: I1ba0066b1eb34bdde7247eeb63c1be5a91db984d Reviewed-on: https://gerrit.libreoffice.org/57168 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-07-10[API CHANGE] tdf#65353 Add more doc. settings more embedding fontsTomaž Vajngerl
- Add setting to embed used fonts only - Add setting for filtering of Latin, Asian, Complex script fonts Change-Id: I8d093ed05fdcef3715616c008f6eeaa8cfbcc850 Reviewed-on: https://gerrit.libreoffice.org/57167 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-07-10tdf#118324 Extend ODF for blank in integerLaurent BP
Following resolution of tdf#117575, this commit add disambiguation between '0' and '?' in integer part XML_MAX_BLANK_INTEGER_DIGITS is added for the number of '?' XML_MIN_INTEGER_DIGITS is the number of '?' and '0' This preserve compatibility with previous versions: in previous versions '?' will be transformed in '0' It also applies to scientific and fraction numbers. Change-Id: I6e1185bbece9c615240425cc973d59052b22aa34 Reviewed-on: https://gerrit.libreoffice.org/56352 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2018-07-06tdf#117261 xmloff: ODF import: convert form:connection-resource URLMichael Stahl
... to absolute on import. (regression from fbb3b60cdb7a22595eec80232bb3ccd83781cf00) Change-Id: I2cd046e44489da86d3d67ff5df6cbad13e8265d0 Reviewed-on: https://gerrit.libreoffice.org/57076 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Tested-by: Jenkins
2018-07-06tdf#101856 Backport parsing of bookmark propertiesSerge Krot
Change-Id: I7654aa93d4d86a5d36201832ac3609b9f4c30e03 Reviewed-on: https://gerrit.libreoffice.org/50565 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 88b6b1a8c149163d226eb3295930e3407bcb8b5b) Reviewed-on: https://gerrit.libreoffice.org/56958 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-07-06tdf#101856 create bookmarks w/ new hidden/cond attrs, save as odtBernhard Widl
Committer's note: this is forward ported from 5.2+backports branch, with numerous conflicts. tdf#101856 add new checkbox/editfield for hidden/condition attrs Conflicts: sw/uiconfig/swriter/ui/insertbookmark.ui Author: Bernhard Widl <bernhard.widl@cib.de> (cherry picked from commit c347e00821791377731ab32acd103ea006f3cc1b) tdf#101856 Fix crash in Insert Bookmark dialog Author: Serge Krot <Serge.Krot@cib.de> Reviewed-on: https://gerrit.libreoffice.org/50616 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit bcc16920eec647f2a3753d60c4d969862f272942) Change-Id: Ib1df7a4c1477693aa2d0ec067635cdcbd393cebd Reviewed-on: https://gerrit.libreoffice.org/46820 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-07-06tdf#117903 Add signature line feature to calcSamuel Mehrbrodt
Change-Id: I4e9121803a26cba1f40f8f1c673c7809543ef2ec Reviewed-on: https://gerrit.libreoffice.org/57015 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-07-02Export data transformations to odfVikas
Change-Id: Ie36aef4a4ee550a1bb5407305f13726d55eeea58 Reviewed-on: https://gerrit.libreoffice.org/56665 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-07-02tdf106792 Get rid of SvxShapePolyPolygonBezierArmin Le Grand
SvxShapePolyPolygonBezier was an implementation for the UNO Shape group of polygons with bezier parts (filled/unfilled/ closed/open), e.g. com.sun.star.drawing.OpenBezierShape. It was differing from SvxShapePolyPolygon just by supporting drawing::PolyPolygonBezierCoords instead of the simple drawing::PointSequenceSequence and some details. This leads to problems - the ShapeType *does change* e.g. when you edit a non-bezier Shape in Draw/Impress and change parts to curve (also when closing, see ShapeTypes above). This is why SvxShape::getShapeType() already detects this identifier by using thze internal ShapePolyType (e.g. OBJ_PATHLINE). So there is no reason to have two separate UNO API imple- mentations for sthe same type of SvxShape at all. Get rid of the extra one and unify this implementation detail. Also cleaned up double basegfx tooling for conversions of UNO API Poly/bezier data and B2DPolygon. Adapted test for "tdf113946.docx", see comment there. Adapted test for "tdf90097.rtf", see comment there. Also needed to use the Linux values, also check comment there. Adapted test for "tdf105127.docx", see comment there. Adapted test for "tdf85232.docx", see comment there. Had to fic a problem with test for "tdf96674.docx"- the adaption of the RotateAngle for line objects goes havoc together with the UNO API when scaling is involved. That old aGeo rotate stuff just kills the existing rotation due to numerical inprecise stuff. The UNP API - in trying not just to apply a rptation, but manipulate the existing one then goes wrong in not re-getting the current rotation value anymore. ARGH! This is the original reason for the ols tdf#96674 task - i doubt that the additional code to make a line not exactly hor/ver is needed. Checked and it is not needed, thus removed the change from tdf#96674 in shape.cxx. Change-Id: I2bb8d4cfe33fee3671f3dad60e5c18609a394f9d Reviewed-on: https://gerrit.libreoffice.org/56614 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2018-07-01cppcheck: variableScopeJochen Nitschke
Change-Id: Ic175a141cc6b6e98e66da7bc34ee77090236c9b6 Reviewed-on: https://gerrit.libreoffice.org/56767 Tested-by: Jenkins Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2018-07-01cppcheck: variableScopeJochen Nitschke
Change-Id: I7c90978dba2e751303244785a38fe251bd955224 Reviewed-on: https://gerrit.libreoffice.org/56766 Tested-by: Jenkins Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2018-06-27xmloff: prevent embedding same font files with checksummingTomaž Vajngerl
When embedding fonts to ODF documents we can get into a situation where the same font is embedded multiple times and this wastes space. To prevent this we calculate the checksum of the font first and track the fonts that are embedded. When the font has the same checksum, the path to already embedded font is returned. Change-Id: I087c42d9a63b1697b9b4ea985dbce2fda760a996 Reviewed-on: https://gerrit.libreoffice.org/56507 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-06-27xmloff: cleanup XMLFontAutoStylePool, use range for, std::pairTomaž Vajngerl
Change-Id: I5c775b8bc5cef3e14404f119e1ffb06334022003 Reviewed-on: https://gerrit.libreoffice.org/56506 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-06-27OFFICE-3789 xmloff: ODF export: fix footer-first order inconsistencyMichael Stahl
Reorder footer-left/footer-first so that they are valid wrt. ODF 1.3 draft schema. The schema was changed to add footer-first after footer-left, but the filter wrote footer-first before footer-left. Change-Id: I48b7ed932729ec2c94e17e6f3d4797926c9811ee Reviewed-on: https://gerrit.libreoffice.org/56482 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-06-27tdf#117904 Don't allow copying signed shapesSamuel Mehrbrodt
Instead just copy the "unsigned" graphic Change-Id: I5183b0b33be0469dceaace142d73aa403cc32ef2 Reviewed-on: https://gerrit.libreoffice.org/56472 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-06-22tdf#42949 Fix IWYU warnings in include/sal/Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I62758fd7c9d932c5a390739774b112356006a937 Reviewed-on: https://gerrit.libreoffice.org/56062 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-06-20remove printfTomaž Vajngerl
Change-Id: I82ba88a11936616f3ddfebed5a550fee79ef73f7
2018-06-19xmloff: add m_ prefix to instance vars in XMLFontAutoStylePoolTomaž Vajngerl
Change-Id: I42bb50f3857392ffb15741942bbe8cef255a41f7 Reviewed-on: https://gerrit.libreoffice.org/55930 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-06-14loplugin:unusedfieldsNoel Grandin
Change-Id: I7d9966d11f8272034523d9804ecf76e119552780 Reviewed-on: https://gerrit.libreoffice.org/55796 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-06-11Derive NativeNumberXmlAttributes2 from NativeNumberXmlAttributes, tdf#115007 ↵Eike Rathke
follow-up Also ensure that transliteration-spellout and (transliteration-format,transliteration-style) are mutually exclusive and transliteration-spellout is only written if ODF version is >1.2, namespace 'loext' for 1.2 with extensions and namespace 'number' in anticipation of ODF 1.3 (may need to be adapted). Change-Id: I371dee8883ecb0d4638510c92b4bf59acd09f636 Reviewed-on: https://gerrit.libreoffice.org/55491 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2018-06-08tdf#115007: add import/export to NatNum12 (spell out numbers,László Németh
dates and money amounts, supporting all the XNumberText/libnumbertext formatting codes, for example "ordinal", "ordinal-number", "ordinal-feminine", etc., and ISO 4217 currency codes, also their possible combinations. NatNum12 formatting codes are stored by using the newly introduced (yet, loext:)transliteration-spellout attribute. creator-initials also added to token list Change-Id: I20f93c9d16778f142067a56d53b336d0acbe2d92 Reviewed-on: https://gerrit.libreoffice.org/54673 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2018-06-08look for unnecessary calls to Reference::is() after an UNO_QUERY_THROWNoel Grandin
Since the previous call would throw if there was nothing to be assigned to the value. Idea from tml. Used the following script to find places: git grep -A3 -n UNO_QUERY_THROW | grep -B3 -F 'is()' Change-Id: I36ba7b00bcd014bdf16c0455ab91056f82194969 Reviewed-on: https://gerrit.libreoffice.org/55417 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-06-05tdf#42949 remove unused compheler includes ..Jochen Nitschke
and fix the fallout Change-Id: I15bc5d626f4d157cbc69a87392078b41e621d14e Reviewed-on: https://gerrit.libreoffice.org/54882 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-05-30Load ODF signature line signed imagesSamuel Mehrbrodt
Change-Id: I7684d4747c4977103fcc3dca62f5d1c28a0836bf Reviewed-on: https://gerrit.libreoffice.org/55056 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-05-29loplugin:unusedfields-in-constructor in xmloffNoel Grandin
fields that are only referenced in the constructor Change-Id: I44bddb2dce2f30c21ea0f1ada4c1615c854d3334 Reviewed-on: https://gerrit.libreoffice.org/54823 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-27Fix typosAndrea Gelmini
Change-Id: I907e5dbcd7c62344c2c76fe2fdaf1b18ecfecee1 Reviewed-on: https://gerrit.libreoffice.org/54838 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2018-05-25Improve re-throwing of UNO exceptionsNoel Grandin
(*) if we are already throwing a Wrapped*Exception, get the exception using cppu::getCaughtexception. (*) when catching and then immediately throwing UNO exceptions, use cppu::getCaughtException to prevent exception slicing (*) if we are going to catch an exception and then immediately throw a RuntimeException, rather throw a WrappedTargetRuntimeException and preserve the original exception information. Change-Id: Ia7a501a50ae0e6f4d05186333c8517fdcb17d558 Reviewed-on: https://gerrit.libreoffice.org/54692 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-22vbahelper, xmloff: Ask current datetime only onceTakeshi Abe
Change-Id: I930983fab11d30f0887965fe30b07c5ac6eef8ef Reviewed-on: https://gerrit.libreoffice.org/54651 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-20Fix typosAndrea Gelmini
Change-Id: Ia2c768f519a4131b26f38243a64179a39771eb00 Reviewed-on: https://gerrit.libreoffice.org/54576 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>