Age | Commit message (Collapse) | Author |
|
30.6001 shows month days without Jan and Feb.
According to the below link, it is calcuated as (365-31-28)/10 = 30.6
but because of a floating point bug, it was used as 30.6001 as a
workaround.
"30.6001, 25 year old hack?"
https://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/archv011.cgi?read=31650
The value 30.6 is used as i18nutil::monthDaysWithoutJanFeb here
instead of 30.6001. The new value is ~30.60000038 which is > 30.6, so
the calculations should be correct. In order to make sure, a unit test
is added, and part of the values are checked against the values
calculated by this website:
Julian Day and Civil Date Calculator
https://core2.gsfc.nasa.gov/time/julian.html
Change-Id: I8cc7e046514dc3de652a1c37399e351cb2b614dc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125813
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
|
|
* Some variables that were only used in the calendar_hijri.cxx
are now moved out of the header file, and they are no loner
member variables of the the class Calendar_hijri. They are now
placed in the the i18npool namespace.
* Removed unused variables SynMonth, EveningPeriod and LeapYear
* Moved a global variable definition to the member function that was
the only place it was used. It is now a local variable.
Change-Id: I8a8b25765bd8ed5640b1a0cfa46ec9903b460a53
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125433
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
|
|
* Removed the static member variable SA_TimeZone, which is not used
elsewhere
* It is write-only according to the clang compilerplugins output:
compilerplugins/clang/unusedvarsglobal.writeonly.results
* Time zone should not be allocated as a constant
* Removed unused local variables commented out 15 years ago to avoid
warnings in: 4170cbdbdfc9ceb282d25e1e19cd7b4d178436bf
Change-Id: Ifc24651ae0aee33dd6a01c77c919ce0cb0426366
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125432
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
|
|
* Replaced multiplying by magic number 0.01745329251994 with
basegfx::deg2rad() which is equal to M_PI/180.0
* Instances of this could be found using:
git grep 0.01745329251994 *.cxx *.hxx
Change-Id: Ib813251f6223e4218fe977c0211732c22199295d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125294
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: I3b4226a9d089ec9aedab95d96e50a068f57a76c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123991
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
... to avoid hidden cost of multiple COW checks, because they
call getArray() internally.
This obsoletes [loplugin:sequenceloop].
Also rename toNonConstRange to asNonConstRange, to reflect that
the result is a view of the sequence, not an independent object.
TODO: also drop non-const operator[], but introduce operator[]
in SequenceRange.
Change-Id: Idd5fd7a3400fe65274d2a6343025e2ef8911635d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123518
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
i.e. < -32768-01-01 or > 32767-12-31
They couldn't be input or stored as proleptic Gregorian in file
formats anyway.
Additionally in i18npool handle the absolute year values casting
conversion int32 <-> int16 where era 0 BCE year 32768 is fielded as
-32768 but still is a valid year for our proleptic Gregorian, so
it isn't displayed as --32768.
Change-Id: Ifdd482f07e04c2a4296fd0556bbef7f1d3e15676
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122835
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
|
|
Change-Id: Id812b720413bfe9ea678910fc8d9d0a64dd32d92
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122195
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Change-Id: I886b6f446293d3b1cfbf4ae05e8dbd7fabab9f20
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105510
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Change-Id: I9366193085a4c46ef64f0a9660e51b8678ca35f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105252
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
use standard true.
/home/rene/LibreOffice/git/master/i18npool/source/calendar/calendar_gregorian.cxx: In member function 'virtual void i18npool::Calendar_gregorian::setLocalDateTime(double)':
/home/rene/LibreOffice/git/master/i18npool/source/calendar/calendar_gregorian.cxx:363:40: error: 'TRUE' was not declared in this scope
363 | body->getTimeZone().getOffset( fR, TRUE, nZoneOffset, nDSTOffset, status );
| ^~~~
/usr/include/unicode/umachine.h says:
@deprecated ICU 68 Use standard "true" instead.
Change-Id: I45d2b0afa6a9043767af5c2cf41ba24377f2cdc4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105151
Tested-by: René Engelhard <rene@debian.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
|
|
Change-Id: I9ab8876aac7b2f8b488db6dfa9c6fd0cecd2238b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104626
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
See tdf#74608 for motivation.
Change-Id: I814512ccc546bd015558a8122f0d2e3803437e38
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99722
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I8b93f7610103f4bd8e86e2d9f57929922b6dc92c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97568
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: Ie06a19b902e4dc12914fe0f2328a5abafa85368e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96208
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
See bt here:
https://bugs.documentfoundation.org/attachment.cgi?id=161882
Change-Id: If5a6c5e2b52af9ef97af9522296aaa58352cfa69
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96161
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
and workaround a clang crash
Change-Id: Ida94c8abb4b2e997d38a7f430e59f73aadf8fcc8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91844
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I765979f41842befcf25909944100d1caa97f81a8
Reviewed-on: https://gerrit.libreoffice.org/85476
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Idf5b7be45d48076fbe191fbf1a2fa63c6da71902
Reviewed-on: https://gerrit.libreoffice.org/83617
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
...following up on 314f15bff08b76bf96acf99141776ef64d2f1355 "Extend
loplugin:external to warn about enums".
Cases where free functions were moved into an unnamed namespace along with a
class, to not break ADL, are in:
filter/source/svg/svgexport.cxx
sc/source/filter/excel/xelink.cxx
sc/source/filter/excel/xilink.cxx
svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
All other free functions mentioning moved classes appear to be harmless and not
give rise to (silent, even) ADL breakage. (One remaining TODO in
compilerplugins/clang/external.cxx is that derived classes are not covered by
computeAffectedTypes, even though they could also be affected by ADL-breakage---
but don't seem to be in any acutal case across the code base.)
For friend declarations using elaborate type specifiers, like
class C1 {};
class C2 { friend class C1; };
* If C2 (but not C1) is moved into an unnamed namespace, the friend declaration
must be changed to not use an elaborate type specifier (i.e., "friend C1;"; see
C++17 [namespace.memdef]/3: "If the name in a friend declaration is neither
qualified nor a template-id and the declaration is a function or an
elaborated-type-specifier, the lookup to determine whether the entity has been
previously declared shall not consider any scopes outside the innermost
enclosing namespace.")
* If C1 (but not C2) is moved into an unnamed namespace, the friend declaration
must be changed too, see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71882>
"elaborated-type-specifier friend not looked up in unnamed namespace".
Apart from that, to keep changes simple and mostly mechanical (which should help
avoid regressions), out-of-line definitions of class members have been left in
the enclosing (named) namespace. But explicit specializations of class
templates had to be moved into the unnamed namespace to appease
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92598> "explicit specialization of
template from unnamed namespace using unqualified-id in enclosing namespace".
Also, accompanying declarations (of e.g. typedefs or static variables) that
could arguably be moved into the unnamed namespace too have been left alone.
And in some cases, mention of affected types in blacklists in other loplugins
needed to be adapted.
And sc/qa/unit/mark_test.cxx uses a hack of including other .cxx, one of which
is sc/source/core/data/segmenttree.cxx where e.g. ScFlatUInt16SegmentsImpl is
not moved into an unnamed namespace (because it is declared in
sc/inc/segmenttree.hxx), but its base ScFlatSegmentsImpl is. GCC warns about
such combinations with enabled-by-default -Wsubobject-linkage, but "The compiler
doesn’t give this warning for types defined in the main .C file, as those are
unlikely to have multiple definitions."
(<https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gcc/Warning-Options.html>) The
warned-about classes also don't have multiple definitions in the given test, so
disable the warning when including the .cxx.
Change-Id: Ib694094c0d8168be68f8fe90dfd0acbb66a3f1e4
Reviewed-on: https://gerrit.libreoffice.org/83239
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Use range-based loops, STL and comphelper functions.
Change-Id: Ibbc1c14e921585819872f26e8def2a60594e6a63
Reviewed-on: https://gerrit.libreoffice.org/78754
Tested-by: Jenkins
Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
|
|
Change-Id: I92ac60fafcc404439c101d1950ed214fce140c91
Reviewed-on: https://gerrit.libreoffice.org/77621
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
in i18npool
Change-Id: I99563b620056e7cd665a2b3330d15c73d0144c7e
Reviewed-on: https://gerrit.libreoffice.org/77583
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: Icc5871d548fd7795936e58ff73b9d6fa7eeb6414
Reviewed-on: https://gerrit.libreoffice.org/76670
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I892281f85f6cc9c2de2c341ae63240ae85d302c4
|
|
Reportedly there can be confusion between names css::lang::Locale
and icu::Locale if explicit namespaces are omitted due to (the bad
habit of using) the using directive, since
commit 942de6a01ba990e5f3bc55ce4ab3737a03f67f39
CommitDate: Thu Jun 20 01:57:20 2019 +0200
Resolves: tdf#92503 introduce TimeZone to calendar loading and default to UTC
Rightly, because that via inclusion of calendar_gregorian.hxx
pulls in unicode/calendar.h which in turn ...
Didn't happen in TDF builds so far.
Change-Id: Ie7fb7fce0ab5cd4b93fbbfd3abe04d7d18a8a081
Reviewed-on: https://gerrit.libreoffice.org/74795
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
|
|
Without that, the system's time zone was used which on DST
transition dates leads to non-existent times when switching
to/from DST. As the calendar use and number parser/formatter nor
conversions or calculations are time zone aware, using not DST
afflicted UTC is the better choice.
Change-Id: I3303c6620d8c4b9d081555c8293954fb1bd67895
Reviewed-on: https://gerrit.libreoffice.org/74386
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
|
|
Support to Korean Traditional Calendar, Dan-gi(단기/檀紀) Calendar
The era name, Dangi(단기,檀紀) originating from the foundation of Gojoseon[고조선/古朝鮮] is also widely used in Korea as an indication of long civilization of Korea.
Full name: `Dangun-giwon (단군기원, 檀君紀元 "First Age of Lord Dangun")`
Abbreviation Name: `Dangi(단기,檀紀)`
The Dangi Calendar measures years from the ancient founding of Korea in 2333 B.C.
Reference. ICU Library
ICU library support Dangi Calendar.
ICU4C 50 http://bugs.icu-project.org/trac/ticket/9255
ICU4J 51 http://bugs.icu-project.org/trac/ticket/9616
Change-Id: I490b8b288c68f498eb29d4fcc73251cbef3ac6d4
Reviewed-on: https://gerrit.libreoffice.org/72943
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
|
|
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Change-Id: Ic331c845f0a8f06c4a8f8f79b6f87e26ca7c3a7d
Reviewed-on: https://gerrit.libreoffice.org/72972
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
|
|
starting from 2019-05-01, which has been announced officially.
This fills the provisional slot acknowledged at
cacbb0faef77ae8462de9ff5c7307a6a2e28b2bb.
Change-Id: Ifb12e6afaad4c66d455f664b46ec946e80324e87
Reviewed-on: https://gerrit.libreoffice.org/70028
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
|
|
...after 7ffdd830d5fb52f2ca25aa80277d22ea6d89970b
"HAVE_CPP_ATTRIBUTE_FALLTHROUGH is always true now"
Change-Id: I54e5ff4e036a6bb3e5774d1c0524158aae18e937
Reviewed-on: https://gerrit.libreoffice.org/64800
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: Ic0ca695a1d9d05418213475a68e233953136cc8e
Reviewed-on: https://gerrit.libreoffice.org/63468
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I7abecaebd296d404e6a095b2befe5da07d346e75
Reviewed-on: https://gerrit.libreoffice.org/62017
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
...showing that print_node etc. are actually unused
Change-Id: Ife7faf53dc2487a7ee0cfbe131a761ea18104945
Reviewed-on: https://gerrit.libreoffice.org/60538
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
The emperor Akihito will abdicate on 2019-04-30. The next emperor
will be Naruhito, but so far neither the new era name (Heisei for
Akihito) nor its abbreviation or a Unicode character are
determined. At least introduce the new era with some dummy names
(Naruhito,Na,N).
Change-Id: I8c0af390ca0408ac259e47e7eaf2e49b5889c9ba
Reviewed-on: https://gerrit.libreoffice.org/58142
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
|
|
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>
|
|
and fix fallout
Change-Id: Id06bf31f2075111e426ba40c84c885ae70697bee
Reviewed-on: https://gerrit.libreoffice.org/52206
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
|
|
Change-Id: Iff39b9298bfad474c5c011b6355b8ebf5be06318
Reviewed-on: https://gerrit.libreoffice.org/49091
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...instead of having to add it to more and more individual .cxx files, as the
need arises.
Change-Id: If1e893c79abf1c1bb7fb7b89dcb9bd423a7f1b94
Reviewed-on: https://gerrit.libreoffice.org/48108
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: Idf609a4012499e76acc5e7ae76565937f2a58fbd
|
|
If jday were guaranteed to be non-negative, the first could also be changed to
jday = std::round(jday);
but that would give different results for negative jday. So play it safe by
assuming that jday might be negative, and that if it were, the original way of
rounding was actually intended.
Change-Id: I137ee659e738791a7d260ce86cba60cdbbc084a6
Reviewed-on: https://gerrit.libreoffice.org/48004
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...instead of converting from sal_Int32 to double and back to sal_Int32
Change-Id: I005777ff031dbbd919d46c971a84dff17f0adf9b
Reviewed-on: https://gerrit.libreoffice.org/47997
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@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: I5ca5f27425c150f58e5ec3f2392dda43a857fc33
|
|
since cdecl is the default calling convention on Windows for
such functions, the annotation is redundant.
Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d
Reviewed-on: https://gerrit.libreoffice.org/46164
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
first, since those are safer to change than virtual methods
Change-Id: Ie3b624019d75ee2b793cee33b3c5f64e994e8bfe
Reviewed-on: https://gerrit.libreoffice.org/45798
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I4356a9e559a3f63c172542256543b272df6ba173
|
|
instead of trying to share the css::i18n namespace, which is just very
confusing and should be left to actual UNO artifacts
Change-Id: I2f5c36bf1af9a2a98c4f997dd450d015e75ed3f6
Reviewed-on: https://gerrit.libreoffice.org/43079
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I399f8266bf543aa7b31d7833bd27aa7bec8a6708
|
|
Change-Id: I9024b8b614a4de83a4d927e1918f6d4904a7fccb
Reviewed-on: https://gerrit.libreoffice.org/42592
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ia9b20a8ca95684cbeb21e3425972c43ba50df3cd
Reviewed-on: https://gerrit.libreoffice.org/39187
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|