summaryrefslogtreecommitdiff
path: root/xmloff/source/style
AgeCommit message (Collapse)Author
2018-08-17Resolves: 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 (cherry picked from commit 5b8007afdb97d416ee7c22bf9226e927d61e9bd3) Reviewed-on: https://gerrit.libreoffice.org/59215 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> (cherry picked from commit 807d4382cb021d2ac3ea99d6757a7b368a32941d) Reviewed-on: https://gerrit.libreoffice.org/55626 Tested-by: Eike Rathke <erack@redhat.com> Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2018-06-11tdf#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> (cherry picked from commit 32f1c56d8ff5e6f87dbcf086fd3743d6d36182bc) Reviewed-on: https://gerrit.libreoffice.org/55625 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: László Németh <nemeth@numbertext.org>
2018-04-15remove some unused comphelper includesJochen Nitschke
and fix the fallout Change-Id: I5d0c2040f57a3ac354a7e277592da31d09a5f359 Reviewed-on: https://gerrit.libreoffice.org/52894 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2018-04-08tdf#112384 sw: Allow New line as a label followed by chapter numberingNithin Kumar Padavu
reference-language also added to token list Change-Id: I32713508d3611dc2bce10b2c5abb1e1a4167bdaf Reviewed-on: https://gerrit.libreoffice.org/52561 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
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-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-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-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-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-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-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-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-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>
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-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: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-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-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
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-19loplugin:unusedenumconstantsNoel Grandin
Change-Id: I9dc4b369872a7c6c076ae9be1dcdf2f8385af8a7 Reviewed-on: https://gerrit.libreoffice.org/46684 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-05Bin a typedef used just onceTor Lillqvist
Change-Id: I8591b1d872a729402ea6045d2a17dc691fa66788 Reviewed-on: https://gerrit.libreoffice.org/45841 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2017-12-03Use for-range loops in xmlexppr (xmloff)Julien Nabet
Change-Id: I65b20b98082db6cd2bda17f527f7ade7a1123a97 Reviewed-on: https://gerrit.libreoffice.org/45743 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-11-28ODF export: expose font style and weight of embedded fontsMiklos Vajna
We don't need this info ourselves, but when converting the flat ODF output to other formats, this information is hard to find out, so state them explicitly. Names correspond to existing CSS ones, where it's necessary to state these explicitly. The EPUB export will make use of these attributes. (It is unclear why the test fails on the windows_msc_dbgutil_32 slave, it works for me locally.) Change-Id: I05030b6a14aca842e5a740786f3743e9ae838293 Reviewed-on: https://gerrit.libreoffice.org/45384 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-11-24loplugin:countusersofdefaultparams in sw (1)Noel Grandin
Change-Id: I0d14f9c375f93079aef21ca4f1132adc4e1fe06c Reviewed-on: https://gerrit.libreoffice.org/45207 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-23loplugin:simplifybool for negation of comparison operatorNoel Grandin
Change-Id: Ie56daf560185274754afbc7a09c432b5c2793791 Reviewed-on: https://gerrit.libreoffice.org/45068 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-22xmloff: These arrays are constantTakeshi Abe
Change-Id: I834e23610facb8b4b35f0a377e33b744e7725d1f Reviewed-on: https://gerrit.libreoffice.org/45066 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-15loplugin:flatten in xmloffNoel Grandin
Change-Id: I782278b8a633094b96788f81ae7066a45d45b5fe Reviewed-on: https://gerrit.libreoffice.org/44750 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-13Fix typosAndrea Gelmini
Change-Id: Ia544298334364ece3b3963a4adc00c5e01189b91 Reviewed-on: https://gerrit.libreoffice.org/44654 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Page <aptitude@btconnect.com>
2017-11-05ofz#4057 Integer-overflowCaolán McNamara
Change-Id: I6a7ef3ca4c26ce4965deeea27ae47a03169bcf12 Reviewed-on: https://gerrit.libreoffice.org/44320 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-30ofz#3895 Integer-overflowCaolán McNamara
Change-Id: Ibc90bdad5edf2d382e358dde4a0bfce6e4276584 Reviewed-on: https://gerrit.libreoffice.org/44026 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-23loplugin:includeform: xmloffStephan Bergmann
Change-Id: I9e55142a7904c426fce49f68f1790365ea490fab
2017-10-17xmloff: this should be an assert()Michael Stahl
Change-Id: Ib81fd7f72964d7152c62d1f9b90dc0cf95e952cc
2017-10-05Resolves: tdf#102075 support system [$-F400] time and [$-F800] long dateEike Rathke
By substituting a (valid matching the type) format using these special LCID modifier values with the current system locale's format. See ECMA-376-1:2016 18.8.31 numFmts (Number Formats) and https://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.numberingformats.aspx which seems to be the only documentation available. Change-Id: Ieca048a77d4ef473ae475e202557d1353ff5387d Reviewed-on: https://gerrit.libreoffice.org/43148 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-10-04add << operator for css::uno::ExceptionNoel Grandin
Change-Id: Ia23dafd07133779144965682df3b7125a3214235 Reviewed-on: https://gerrit.libreoffice.org/43046 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-10-03loplugin:finalclasses in xmloffNoel Grandin
Change-Id: I10ffefd29b858548472a459314c7d5632324bca2 Reviewed-on: https://gerrit.libreoffice.org/43069 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-01Prefer prefix operatorJulien Nabet
Change-Id: I82f3f66bfc675dbc4a5d5b57d8715c3de01d9620 Reviewed-on: https://gerrit.libreoffice.org/42994 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-09-26Rename the basegfx::tools namespace to basegfx::utilsTor Lillqvist
Reduce potential confusion with the global tools namespace. Will hopefully make it possible to remove the annoying initial :: when referring to the global tools namespace. Unless we have even more tools subnamespaces somewhere. Thorsten said it was OK. Change-Id: Id088dfe8f4244cb79df9aa988995b31a1758c996 Reviewed-on: https://gerrit.libreoffice.org/42644 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2017-09-22ofz: don't leak in face of exceptionsCaolán McNamara
Change-Id: Ic15590a13bd3770ee5dd7db76b21c830a4fe73e2 Reviewed-on: https://gerrit.libreoffice.org/42587 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-20xmloff,sw: some stylistic cleanup to conditional stylesMichael Stahl
Change-Id: I1722a0b3d67a7c8740daa5a131d7800319ee2373
2017-09-14clang-tidy modernize-use-emplace in xmloffNoel Grandin
Change-Id: I55bf75b5505d01cb33f26fac4603afdb3b4f1780 Reviewed-on: https://gerrit.libreoffice.org/42262 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-24tdf#111934 xmloff: ODF import: self-referential conditional style crashMichael Stahl
It's invalid input and also causes stack overflow. Change-Id: Ie0b9dcaefcfcf254326151f345f4802ed66b994d
2017-08-17remove UL/L suffixes from integer constants on the RHS of expressionsNoel Grandin
Change-Id: I899a8126c9d971601fea6c77eca165718aea0ac5 Reviewed-on: https://gerrit.libreoffice.org/41237 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>