summaryrefslogtreecommitdiff
path: root/xmloff/source/style/xmlnumfi.cxx
AgeCommit message (Collapse)Author
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-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-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-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-15More loplugin:cstylecast: xmloffStephan Bergmann
Change-Id: I870bc9fd1c7361913b073411065ec723f6b080da
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-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-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-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-07-20loplugin:constparams in xmloffNoel Grandin
Change-Id: Iec9535b106c85e47ddb14eec4ef3db5b1c8d8fd7 Reviewed-on: https://gerrit.libreoffice.org/40219 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-14use more OUString::operator== in test..xmlsecurityNoel Grandin
Change-Id: If5bdd1532be44a47ff7cc3b769be3ea585aea562 Reviewed-on: https://gerrit.libreoffice.org/39685 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-13loplugin:oncevar: empty strings: xmloffStephan Bergmann
Change-Id: I2ac40424c252b24d78b849ca8b4bfe75d6f073cb
2017-07-11simplify some OUString::copy callsNoel Grandin
Change-Id: Ifa228ca02ea79a1309e1875414028aade7e5f12d Reviewed-on: https://gerrit.libreoffice.org/39801 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-05new loplugin unnecessaryparenNoel Grandin
Change-Id: Ic883a07b30069ca6342d7521c8ad890f4326f0ec Reviewed-on: https://gerrit.libreoffice.org/39549 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-19loplugin:stringcopy: xmloffStephan Bergmann
Change-Id: Iec7feb114088357e8f87619ceb5dbfb228e8b5c7
2017-05-08cleanup tools/debug.hxx includesJochen Nitschke
with command > git grep -l tools/debug.hxx | xargs grep -L DBG_ | xargs sed -i '/#include *\(<\|\"\)tools\/debug.hxx.*/d' don't change files in includes/ and */pch Change-Id: Ie429d6a7dca5dfa1073e0f5ba037f7c84bdbec08 Reviewed-on: https://gerrit.libreoffice.org/37349 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-26use strong_int for LanguageTypeNoel Grandin
Change-Id: If99a944f7032180355da291ad283b4cfcea4f448 Reviewed-on: https://gerrit.libreoffice.org/36629 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-25tools: svstream.hxx needs only errcode.hxx & not errinf.hxxChris Sherlock
Change-Id: Ia28e35ae5af4f601e9a586a3deffbcd61702b0ca Reviewed-on: https://gerrit.libreoffice.org/36896 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-03-13templatize SvXMLEnumMapEntryNoel Grandin
in preparation for "scoped UNO enums". This is a little hacky: In order to limit the scope of this change, the templated SvXMLEnumMapEntry struct actually has a fixed size field, and we cast it to SvXMLEnumMapEntry<sal_uInt16>* in various places, to avoid carrying the type param around. Change-Id: Idfbc5561303c557598dd5564b7a7259ae5261d83 Reviewed-on: https://gerrit.libreoffice.org/34987 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-08loplugin:unusedenumconstants read-only constants in xmloffNoel Grandin
Change-Id: I88afb3b4b3aa7d823c46062ead894561a66ac275 Reviewed-on: https://gerrit.libreoffice.org/33995 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-20can use truncate instead of a new OUStringBufferCaolán McNamara
Change-Id: I6efd48af1e00c21675ef0697b38185008a794d7a
2016-12-01loplugin:unnecessaryoverride (dtors) in xmloffStephan Bergmann
Change-Id: I351ff5955d766118e3a6b2234181774af0d1f522
2016-10-13loplugin:unnecessaryoverrideNoel Grandin
Change-Id: I08c55a3023ec2e8990098eeb60e91cd18556e7ae Reviewed-on: https://gerrit.libreoffice.org/29656 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-13unconditionally replacing Y after G (era) with E was always wrongEike Rathke
For example, in en-US locale G MM/DD/YYYY saved and reloaded lead to G MM/DD/EE using the Hebrew calendar. Use E or EE only if a secondary calendar was given. Change-Id: I6db22e89f435342aa4a1bce7fa13711c138007f5
2016-09-13do not add calendar modifier to format code when importing as E or EE keywordEike Rathke
... with implicit calendar switch. Change-Id: Ie4d848e261fe86bbe504954b2e0c7cf24bc181bc
2016-09-13that copypasta comment fragment makes no senseEike Rathke
Change-Id: I835fd6045e5ab5aeb93c91edb07037b1ed3ea4a9
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark overriding destructors as 'virtual'" appears to no longer be a problem with MSVC 2013. (The little change in the rewriting code of compilerplugins/clang/override.cxx was necessary to prevent an endless loop when adding "override" to OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager(); in chart2/source/inc/LifeTime.hxx, getting stuck in the leading OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.) Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-09-13switch to using LocaleDataWrapper::doesSecondaryCalendarUseEC()Eike Rathke
Change-Id: I6621e82249feeed3d88ee463447d08c4f812259c
2016-09-09use std::unique_ptrDavid Tardon
Change-Id: I46dd045b2648f711b3e29ffea0c2e264c141293c
2016-09-09use std::unique_ptrDavid Tardon
Change-Id: I33d75ede0031da63c00c35af7b42867fea0b8d80
2016-09-07loplugin:stringconstantStephan Bergmann
Change-Id: I972a8423f3751de50c95d83ddcefe449493ccf57
2016-09-07Resolves: tdf#101963 loading zh-TW ROC calendar use EE|E instead of YYYY|YYEike Rathke
This still (unnecessarily) prefixes with [~ROC] but preserves the intended "no leading zero" semantics. Change-Id: I154be0978a8147ceddefcb546c257d44f770b5de
2016-08-10XML number format: do not enquote space followed by minus, tdf#97837 follow-upEike Rathke
Which with [$kr.-406] #.##0,00;[RED][$kr.-406] -#.##0,00 saved and reloaded gave [$kr.-406] #.##0,00;[RED][$kr.-406]" -"#.##0,00 and thus an almost identical duplicated format with the built-in format. Change-Id: Ie39b97576842bc29ac301d2fe64f7331f6c57fc4
2016-07-27tdf#100834 Extend ODF for integer/fraction delimiterLaurent Balland-Poirier
Any string can be used as delimiter between integer and fraction. It is now saved/loaded to/from ODF, as it was from XLS. Change-Id: Ie6364d1cdefc020ea615c18099118135c619f96b Reviewed-on: https://gerrit.libreoffice.org/27262 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-07-27tdf#100755 Extend ODF to allow 0 in fractionLaurent Balland-Poirier
As '0' is now allowed in numerator/denominator this commit extend ODF to save/load this format Change-Id: I3bc897dcce5393453acd7a434a21ae305feeb919 Reviewed-on: https://gerrit.libreoffice.org/27263 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-06-17convert DBG_ASSERT in xmloffNoel Grandin
Change-Id: I2f4bbbef451026fc34638e17fa29b6db2c14d850 Reviewed-on: https://gerrit.libreoffice.org/26191 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-16tdf#97837 Detect delimiter only for date, time, currencyLaurent Balland-Poirier
Other formats do not require delimiter Except for minus sign Change-Id: Ica5a62c175345062383247760fe5e2a061aeebe8 Reviewed-on: https://gerrit.libreoffice.org/24902 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-05-30tdf#99661 Add max-denominator-value attribute to number:fractionLaurent Balland-Poirier
Add max-denominator-value attibute to <number:fraction> to comply with ODF 1.3 See https://issues.oasis-open.org/browse/OFFICE-3695 Specify loext or number according to ODF version This value is only used to stored the number of digits in numerator. No other values than 9, 99, 999,... are expected. Add loext:max-numerator-digits attributes to <number:fraction> to distinguish ??/?? and ##/## or any combination Not saved for ODF strict min-...-digits indicates the number of '?' max-...-digits indicates the total number of '?' and '#' This needs to be saved with both min-...-digits at least one because previous versions cannot have min-...-digits of 0. See tdf#38097 Change-Id: Ibd785579aa75edc315e3bd94935a146d82bbeeef Reviewed-on: https://gerrit.libreoffice.org/24903 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-05-30Choose ODF version for min-decimal-place and force-exponent-signLaurent Balland-Poirier
Change-Id: I873dbf53bbb865577fd51ee70142c1b45ea54ce2 Reviewed-on: https://gerrit.libreoffice.org/25588 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2016-05-13clang-tidy modernize-loop-convert in writerfilter to xmlsecurityNoel Grandin
Change-Id: I334411c6b57c028ffb41b5deb72002f9d54038c3 Reviewed-on: https://gerrit.libreoffice.org/24923 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-09tdf#38097 min numerator/denominator at least 1Laurent Balland-Poirier
In <number:fraction> attributes min-denominator-digits and min-numerator-digits should be at least 1. Gnumeric can create file with 0 values Change-Id: I08ef51c23ce686136f51277671bf630807353484 Reviewed-on: https://gerrit.libreoffice.org/24670 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-01-31unnecessary use of OUString constructorNoel Grandin
Change-Id: Idd31b0a53c8318af69bbcd32f6798721ec8eb8e1 Reviewed-on: https://gerrit.libreoffice.org/21945 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-11tdf#40517 Export/Import in ODF decimal replacement with spaceLaurent Balland-Poirier
Number format such as "0.???" is saved in ODF with number:decimal-replacement=" " Change-Id: I0dd19b5ea126f380bcf17a3ccc5d8c355119e23b Reviewed-on: https://gerrit.libreoffice.org/21021 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
2015-11-26com::sun::star->css in xmloff/Noel Grandin
Change-Id: Iee6e21e093fb1383f19a0716dbc1c341f446b8c2 Reviewed-on: https://gerrit.libreoffice.org/20192 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-18remove unused typedefs and inline use-once typedefsNoel Grandin
and improve the script a little Change-Id: I2792ea4dd5df3a50736fbe209225c3f16fb86b84 Reviewed-on: https://gerrit.libreoffice.org/20033 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
Change-Id: I8690de2cb68dcfedc9f2239ce66cea06fd94bc16
2015-11-04tdf#93296 dashes in decimal part => 0 min decimal placesLaurent Balland-Poirier
During import, as well during export, "0.--" must be considered as 0 min decimal places Change-Id: I33d06dd95c0678660bc0bb222972f82ef54f2c6e Reviewed-on: https://gerrit.libreoffice.org/19647 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>