summaryrefslogtreecommitdiff
path: root/xmloff
AgeCommit message (Collapse)Author
2018-09-17Simplify containers iterations in xmloff/source/[f-t]*Arkadiy Illarionov
Use range-based loop or replace with STL functions. Change-Id: Ic94c7e292f44d460038d3ca99c7e4cc02958d8a3 Reviewed-on: https://gerrit.libreoffice.org/60549 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-13loplugin:constfields in xmloffNoel Grandin
Change-Id: I9623e6b483b28f5b50a2c76016bcc319b375a35a Reviewed-on: https://gerrit.libreoffice.org/60394 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-13loplugin:simplifyconstruct in writerfilter..xmlsecurityNoel Grandin
Change-Id: Ic2d901ca0dbc2d6fa96611d260c1572da8a783c0 Reviewed-on: https://gerrit.libreoffice.org/60398 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-12tdf#118500 Impress losing slide transition sound on savingSamuel Mehrbrodt
This reverts commit b223028d65d24ffcd8e27974c29c2744a5df6227. Change-Id: Iac12092a4f6b0edb3b6a5228ed17e7d0c1794357 Reviewed-on: https://gerrit.libreoffice.org/60391 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-09-11tdf#109229: Set "TextBox" prop before filling textbox-related propsMike Kaganski
Otherwise those properties aren't set, and defaults are used Change-Id: Ib6671c019ff652ec5b59d9cbbf02a4e536a17817 Reviewed-on: https://gerrit.libreoffice.org/60267 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-09-10tdf#42949 Fix IWYU warnings in include/cppuhelper/*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ib420e9216b8313f5ed7634ec375e39ceb741fd45 Reviewed-on: https://gerrit.libreoffice.org/59297 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-09-09tdf#114400 Import drawoo:fontwork-xyz attributesIlhan Yesil
Either the document has attributes in the old namespace or in the new, both will be imported. But export is still in the old namespace. Change-Id: I9f4d1ca0d8af37c13b513f99cc7d254c68867bb2 Reviewed-on: https://gerrit.libreoffice.org/59405 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-09-08Replace find_if with proper quantifier algorithmsArkadiy Illarionov
Missed in 085269d25a705b656436feac47149296b4b4b35d Change-Id: I3cfab57232908b48d090658e0fbc948d62b3fc6f Reviewed-on: https://gerrit.libreoffice.org/60180 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-06clang-tidy performance-unnecessary-value-paramNoel Grandin
Change-Id: I69247498e13331f6ef84afeb242479f8fb1178a8 Reviewed-on: https://gerrit.libreoffice.org/60068 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-03SvXMLUnitConverter::convertDateTime: use tools::Time::GetClock()Eike Rathke
... to not round up to the next magnitude. Change-Id: Ibda6e014ae3bdbe021e208c8781f619b112bee21 Reviewed-on: https://gerrit.libreoffice.org/59887 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2018-08-30tdf#101856 Handle properties of nested bookmarksSerge Krot
Change-Id: I1a92d2001e58751c5bbe41f6480f4c46dcc8c9e7 Reviewed-on: https://gerrit.libreoffice.org/59766 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-08-29new loplugin:oustringbufferNoel Grandin
look for places where we are appending the temporary result of adding strings together, to an OUStringBuffer, where we could rather call append repeatedly and avoid the temporary creation Change-Id: I481435124291ac7fb54b91a78344a9fe5b379a82 Reviewed-on: https://gerrit.libreoffice.org/59708 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-27tdf#101242 Support draw:display and draw:protect attributes of ODFRegina Henschel
LibreOffice writes the properties visible, printable and locked of layers into items in the subfile settings.xml and handles them as properties of the view. ODF handles them as property of the layer. To become more ODF conform as a first step these properties are now read and written. They are used to initialize the view in case they are missing in settings.xml, which is the case for foreign documents. The ODF properties are written in addition to the items in settings.xml, so that older versions will notice no difference with such documents. SdModelTestBase is changed to handle odg as Draw document. Change-Id: I190ecc51fc6ee91ec4b96d06bb216ce517bdfcfe Reviewed-on: https://gerrit.libreoffice.org/59269 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-08-22new loplugin:conststringfieldNoel Grandin
Look for const string fields which can be static, and mostly convert them to OUStringLiteral And add a getLength() method to OUStringLiteral to make the transition easier. Remove dead code in XclExpRoot::GenerateDefaultEncryptionData, default password is never empty. Change-Id: Iae75514d9dbb87289fd5b016222f640abe755091 Reviewed-on: https://gerrit.libreoffice.org/59204 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-22Fix typosAndrea Gelmini
Change-Id: I8a25a3d7928cca12b0f5c86701fe86b76b85249f Reviewed-on: https://gerrit.libreoffice.org/59414 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2018-08-21loplugin:useuniqueptr in XMLTextFieldExportNoel Grandin
Change-Id: Ib525cc596429f61740f567445296dcf71c19acf2 Reviewed-on: https://gerrit.libreoffice.org/59350 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-20Simplify containers iterations, tdf#96099 follow-upArkadiy Illarionov
Use range-based loop or replace with std::any_of, std::find and std::find_if where applicable. Change-Id: I2f80788c49d56094c29b102eb96a7a7c079567c6 Reviewed-on: https://gerrit.libreoffice.org/59143 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-16Resolves: tdf#119013 do not over-aggressively reorder date particlesEike Rathke
In particular not when reading documents as we don't know what the original (default/system) locale was when the date format was created and stored and whether the format's date order actually matched the locale's ordering. Regression from commit 51478cefaa4e265b42e3f67eda0a64767ff3efba CommitDate: Tue Apr 18 17:01:27 2017 +0200 Resolves: tdf#107012 follow date order of the target locale Change-Id: I9d3bdbd512d95ed81ff6459e368a2d7497ec8a2d Reviewed-on: https://gerrit.libreoffice.org/59182 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2018-08-15tdf#118883 reinstate the try block to not throw on copy/pasteTomaž Vajngerl
Seems the defnesive approach wasn't enough to ward against the exception being thrown when creating a clipboard document when copy/pasting between documents. Change-Id: Iedcfbc6fe054b46fc26005b1ea0dbadbd21a08cb Reviewed-on: https://gerrit.libreoffice.org/59121 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-08-14create appendCopy method in OUStringBufferNoel Grandin
so we can avoid temporary copies when appending a substring of an OUString to the buffer. I would have preferred to call the method just "append" but that results in ambiguous method errors when the callsite is something like sal_Int32 n; OUStringBuffer s; s.append(n, 10); I'm not sure why Change-Id: I6b5b6641fcb5b26ce2269f89ef06e03c0b6aa76f Reviewed-on: https://gerrit.libreoffice.org/58666 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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>