Age | Commit message (Collapse) | Author |
|
This also made it necessary to adapt the unit tests that checked
for the old default format in output.
Change-Id: Ie7bc78d1e5a17e5cb6f52d5ed1ab42db80f07d2e
Reviewed-on: https://gerrit.libreoffice.org/61200
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
|
|
...warning about (for now only) functions and variables with external linkage
that likely don't need it.
The problems with moving entities into unnamed namespacs and breaking ADL
(as alluded to in comments in compilerplugins/clang/external.cxx) are
illustrated by the fact that while
struct S1 { int f() { return 0; } };
int f(S1 s) { return s.f(); }
namespace N {
struct S2: S1 { int f() { return 1; } };
int f(S2 s) { return s.f(); }
}
int main() { return f(N::S2()); }
returns 1, both moving just the struct S2 into an nunnamed namespace,
struct S1 { int f() { return 0; } };
int f(S1 s) { return s.f(); }
namespace N {
namespace { struct S2: S1 { int f() { return 1; } }; }
int f(S2 s) { return s.f(); }
}
int main() { return f(N::S2()); }
as well as moving just the function f overload into an unnamed namespace,
struct S1 { int f() { return 0; } };
int f(S1 s) { return s.f(); }
namespace N {
struct S2: S1 { int f() { return 1; } };
namespace { int f(S2 s) { return s.f(); } }
}
int main() { return f(N::S2()); }
would each change the program to return 0 instead.
Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c
Reviewed-on: https://gerrit.libreoffice.org/60539
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Also handle rounding/scaling better in ImpGetTimeOutput() for the
[] duration formats, of which [HH]:MM:SS(.0000000) is used to edit
time values.
The wall clock change made it necessary to adapt some test cases in
Test::testUserDefinedNumberFormats() where M_PI formatted to
date+time actually is 1900-01-02 03:23:53.60527 with second 53
instead of the previously rounded 54.
Change-Id: I242a6c753a24281e041d3f73af019bdd77c65b37
Reviewed-on: https://gerrit.libreoffice.org/59857
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
|
|
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
|
|
Change-Id: Ib2b9963a90a135998b6189fba521bd85f5579cf5
Reviewed-on: https://gerrit.libreoffice.org/58645
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I07cf04cd2acc5b50d64224edb9f2c2de2c61e356
Reviewed-on: https://gerrit.libreoffice.org/57884
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
|
|
Change-Id: Ife1db81f772ecf3bb713952be276ff8a2fd318a9
Reviewed-on: https://gerrit.libreoffice.org/56716
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: Id28e688e7f81a2f3f43f01be44d03c5f185ffd01
Reviewed-on: https://gerrit.libreoffice.org/55904
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
|
|
Limit NatNum12 conversion only for the selected parts of the
date format (this bug – double calls of getNumberText – was hidden
by the space prefix " " and empty return values at the first calls,
resulting unchanged dates yet).
New prefixes: "capitalize", "upper" and "title" to handle optional
capitalization. (In Calc, it was not possible to format the result of
NatNum formatting, but some languages often need capitalization
or title case to format numbers and currencies.)
Thanks code clean up using enum WhichCasing to Eike Rathke.
Change-Id: I5fceb784930e6bc6d376116f5a42ad49cd248a54
Reviewed-on: https://gerrit.libreoffice.org/55681
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
|
|
to support variants of preposition, suffixation,
article or their combination. For example, Catalan
"de març"/"d'abril", English "1st of May"/"First of
May" or Hungarian "május 1-je/május 2-a".
When the date format contains more than a date keyword,
it needs to specify in NatNum12 argument which date
element needs special formatting by using libnumbertext:
'[NatNum12 ordinal-number]D' -> "1st"
'[NatNum12 D=ordinal-number]D" of "MMMM' -> "1st of April"
'[NatNum12 D=ordinal]D" of "MMMM' -> "first of April"
'[NatNum12 YYYY=year,D=ordinal]D" of "MMMM", "YYYY' ->
"first of April, nineteen ninety"
Note: set only for YYYY, MMMM, M, DDDD, D and NNN/AAAA
in date formats. It's possible to extend this for other
keywords and date + time combinations, as required.
Note 2: default l10n date formats can use the new NatNum12 date
formats, see FormatElement in i18npool/source/localedata/
XML files and FormatElement specification:
https://opengrok.libreoffice.org/xref/core/i18npool/source/localedata/data/locale.dtd#223
Change-Id: I598849f1492f4012e83cef9293773badbff16206
Reviewed-on: https://gerrit.libreoffice.org/55613
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
|
|
This allows using all the libnumbertext library functions.
[NatNum12] gives cardinal number names (one, two, three, ...)
[NatNum12 ordinal] gives ordinal number names (first, second, third, ...)
[NatNum12 ordinal-number] gives ordinal indicators (1st, 2nd, 3rd, ...)
[NatNum12 money USD][$-409] gives formal English (US) money text
... etc (see numbertext.org for syntax).
Change-Id: I16dbb44d8d4bdb82a1b950de6d438c8311b554ff
Reviewed-on: https://gerrit.libreoffice.org/54366
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
|
|
Change-Id: I31c84eb2267b4978f110a4f38cbf4d2377d59400
|
|
idea originally from either tml or moggi, can't remember which
Change-Id: Id78d75035036d3aa1666e33469c6eeb38f9e624d
Reviewed-on: https://gerrit.libreoffice.org/55126
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ice57b81106d35f5b217f0680824d1acf62ff9098
|
|
That block of code at the top of the file started out as
#include "precompiled_svl.hxx"
#ifdef WNT
# include <prewin.h>
# include <postwin.h>
# undef ERROR
#endif
in d2a16264ec6cb1ca5e8178096b72053a357cb3fb "Initial unit test skeleton, copied
and modified from sc", so assume the leftover #undef is unnecessary cargo-cult
by now.
Change-Id: I39637518d1507352b1eb2ed19168013d9fe635ac
Reviewed-on: https://gerrit.libreoffice.org/54499
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I28d0260531132216c5f0bd187d400ed47cc43326
Reviewed-on: https://gerrit.libreoffice.org/54498
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
... based on libnumbertext integrated since commit
f1579d3d6c5f5f3a651825e035b93bee7a4f43c6.
[NatNum12] gives cardinal number names (one, two, three, ...)
[NatNum13] gives ordinal number names (first, second, third, ...)
[NatNum14] gives ordinal indicators (1st, 2nd, 3rd, ...)
Change-Id: Ie2afdeeb82da1b36e9755c02d7b2276c77be9c72
Reviewed-on: https://gerrit.libreoffice.org/54186
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
|
|
drop SFXSTYLEBIT_HIERARCHY because it has no overlap with these values,
it's used an extra bit in
SfxCommonTemplateDialog_Impl::LoadFactoryStyleFilter
Change-Id: I8ee5ecb9b5f8d2087d8eedd1f5526260ec1e4018
Reviewed-on: https://gerrit.libreoffice.org/53089
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ic3d695dd3ad4ee5ca6537f65d643d8736e3a5700
Reviewed-on: https://gerrit.libreoffice.org/52886
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I0e25c8950ac26b851ff42f71e1471fcbe4770d48
Reviewed-on: https://gerrit.libreoffice.org/50373
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ifb434589ef08428ce609bc7a40b015d4df13224c
Reviewed-on: https://gerrit.libreoffice.org/50048
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: Ie2618ffeea49e45d7bd7d35238a1edbcc5887fa5
|
|
Change-Id: I1c01c9afe4a2479bd8e595b84816febe8e9e5947
|
|
Change-Id: Ib983a8f4305dc916e077407d712883de6d05649a
|
|
Change-Id: I2c78a06169526b079fd1463df23b09bacb50588b
|
|
Change-Id: Ibd80b484788779b73943b28a5f36e51ebcacec30
Reviewed-on: https://gerrit.libreoffice.org/49821
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
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: I71e3b2c9b4c68183288f43999d242e95ae13584d
|
|
Change-Id: Icab5ded8bccdb95f79b3fa35ea164f47919c68fa
Reviewed-on: https://gerrit.libreoffice.org/46339
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
|
|
Change-Id: I0683fe5f7632e9941f347773c2679af82421bdc4
Reviewed-on: https://gerrit.libreoffice.org/46455
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
Change-Id: I1d169590302067fdcb3fe8ecc1cf5dea8f766a02
|
|
... as especially the keywords are controlled by the current state (locale) of
the ImpSvNumberformatScan instance and *not* a property of SvNumberformat. Add
a clarifying descriptive comment as well, and outline it's only for the unit
tests anyway..
Change-Id: I732918026bf9ffc25db11033d5f10bc2f51e3505
Reviewed-on: https://gerrit.libreoffice.org/46426
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
Change-Id: Ia0730cfd2293c374ec8b8f4aa69fef5d319642e4
|
|
Change-Id: Ic908af0bf5cbd83fab7bbf2d2f37a1b51bc5e32a
|
|
Change-Id: Ib5b414d533ea3dcce55f4e6a02f329e98acf6e83
Reviewed-on: https://gerrit.libreoffice.org/43791
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
|
|
Change-Id: I769b091515d1e6b7d16652d11ff2b94a75584ad0
|
|
Test of English NfKeywords with non-English languages
These tests need https://gerrit.libreoffice.org/43633/
to pass for Finnish
Change-Id: I5e6c3250e6136eeb2e8e25e1f411390e109d5b7e
Reviewed-on: https://gerrit.libreoffice.org/43634
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
|
|
Check the number of elements
Check equivalence with sKeyword
Check if the order of elements in the sEnglishKeyword vector matches the order defined in NfKeywordTable, so if someone adds/(re)moves/inserts an element both table and vector stay aligned.
Change-Id: I97b530b1c7ee262c7884f51e2562eace9f13d8f8
Reviewed-on: https://gerrit.libreoffice.org/43690
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
|
|
Covering the loop and non-loop states in
ImpSvNumberformatScan::FinalScan()
Change-Id: I4a8da617a2a61ad12a99462bfe4014aaa5a75c1b
|
|
Change-Id: I0988401a9aa7afc25ea3a50883e4d3a5cfbe9d44
|
|
Change-Id: Iab53f39313c1bac04fe5718823455e5ef0e52f13
|
|
Change-Id: I4015a339ca18b214adca228b58319d897f0ad910
|
|
Change-Id: I3d13e1c0bb6aa4a7aacc463198747c1368ebc9b4
Reviewed-on: https://gerrit.libreoffice.org/38114
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I9a2990e49c95a01ce505f13408be8c19db1cf5d1
|
|
extend oncevar to any POD type
Change-Id: Ia98ee0a67f183e40fb0c38477760124b2c411dc0
Reviewed-on: https://gerrit.libreoffice.org/40564
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I23368c3ce6d29c7b2e758e209e5a8315e82a2818
Reviewed-on: https://gerrit.libreoffice.org/40051
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Iec49ad76f102dc228d41beb10d7e99ed197c0ea8
|
|
Change-Id: I20e3796407c7e429a88d2811673929ac1141a41c
Reviewed-on: https://gerrit.libreoffice.org/39280
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Iaa5b97267b6487c37744bd08d21c82015da9d522
|
|
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>
|
|
Improve error message if test fails
Add more formats to test
Need https://gerrit.libreoffice.org/35320/
Change-Id: I89f5071e12ff87cdf1c03912922918390531e972
Reviewed-on: https://gerrit.libreoffice.org/35377
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
|