Age | Commit message (Collapse) | Author |
|
... implementing signed years with year 0 gap.
Date(31,12,-1) last day BCE
Date(1,1,1) first day CE
New class Date member functions:
* AddYears(sal_Int16) to be used instead of
aDate.SetYear(aDate.GetYear()+sal_Int16) to handle year 0 gap.
* convenience GetNextYear() to be used insted of GetYear()+1
* convenience GetPrevYear() to be used insted of GetYear()-1
* AddMonths(sal_Int32)
* operator=(const css::util::Date&)
New class DateTime member functions:
* operator=(const css::util::DateTime&)
Made some conversion ctors explicit, specifically Date(sal_Int32)
Adapted hopefully all places that used a sal_uInt16 year to use
sal_Int16 where appropriate.
Eliminated some quirks in date handling found on the fly.
Added era handling to i18npool icu calendar setting interface, which
missing was responsible for 0001-01-01 entered in Calc being set as
-0001-01-01, hence subtracting one day resulted in -0002-12-31.
Change-Id: I77b39fba9599ebd5067d7864f6c9ebe01f6f578f
Reviewed-on: https://gerrit.libreoffice.org/27049
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
Change-Id: I8d8b36e6f61df4a683ce2d32ab0fde8ef003a2e0
|
|
unnecessarily passing primitives by const ref.
Suggested by Tor Lillqvist
Change-Id: I445e220542969ca3e252581e5953fb01cb2b2be6
Reviewed-on: https://gerrit.libreoffice.org/24672
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
|
|
probably not much performance benefit, but it sure is good at
identifying leftover intermediate variables from previous
refactorings.
Change-Id: I3ce16fe496ac2733c1cb0a35f74c0fc9193cc657
Reviewed-on: https://gerrit.libreoffice.org/24026
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
|
|
stage 2 of replacing usage of various checks for the windows platform
with the compiler-defined '_WIN32' macro
In this stage we focus on replacing usage of the WIN macro
Change-Id: Ie8a4a63198a6de96bd158ecd707dadafb9c8ea84
Reviewed-on: https://gerrit.libreoffice.org/22393
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
|
|
using an idea from dtardon:
<dtardon> noelgrandin, hi. could you try to run the unusedmethods clang
plugin with "make build-nocheck"? that would catch functions that are
only used in tests. e.g., i just removed the whole o3tl::range class,
which has not been used in many years, but htere was a test for it...
<noelgrandin> dtardon, interesting idea! Sure, I can do that.
Change-Id: I5653953a426a2186a1e43017212d87ffce520387
Reviewed-on: https://gerrit.libreoffice.org/22041
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
|
|
Change-Id: Ia5acfb564f913d52cd25b5d64d06b5280b94cb72
|
|
Change-Id: I695ff721efd63b8ca0dd3c61ba5a4fef2c43cde6
Reviewed-on: https://gerrit.libreoffice.org/19854
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
|
|
Change-Id: Ib52c5d1a55d17c572fd5be9a3ce36c6de7965220
|
|
Change-Id: I4d1bf6591d54621c33dc2ff0be0ecb59f1839581
|
|
Change-Id: I3123876860cf6cce1e16c8f516f3d08fa7e15d83
|
|
and reduce scope for other local support functions.
Change-Id: Id0d6b9a04ff67620f6dca39d62443a3f191d75ee
|
|
Change-Id: Ia7b5f519e381318f1d1cd6d0f982d22e8bbdffa7
|
|
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. Cleaned up some, but something like
grep -FwL sal/log.hxx $(git grep -Elw \
'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF') -- \*.cxx)
shows lots more files that potentially need fixing before the include can be
removed from rtl/string.hxx and rtl/ustring.hxx.
Change-Id: Ibf033363e83d37851776f392dc0b077381cd8b90
|
|
Change-Id: I049aa3f5be42c520f824ec62943c37e8ffac78ad
|
|
...as follow-up clean-up after 71fefe1dc2bcda3a4cc18d71e1acaf161cc059f2 "Change
'blink times' to be of type sal_uInt64 and thus consistent with
Timer::Get/SetTimeout since 9c7016b5b530ca212b1275f44f9e2fc0527109ee 'Scheduler:
Changed uLong to uInt32/uInt64.'"
Transitively meant to change quite a number of further time-related places from
sal_uLong/sal_uIntPtr to consistently use sal_uInt64.
Change-Id: I38eb493943906356138bf58eb098d2f54a3dee34
Reviewed-on: https://gerrit.libreoffice.org/15214
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
|
|
add constructors to Date/DateTime/Time,
that take the css::util counterparts,
to simplify code converting between these type
Change-Id: I4b03da02c63f65b6ec18cb4d6ecc3859bdef1ff7
Reviewed-on: https://gerrit.libreoffice.org/13855
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
|
|
Put the TOOLS Time class in the tools namespace. Avoids clash with the X11
Time typedef.
Change-Id: Iac57d5aef35e81ace1ee0d5e6d76cb278f8ad866
Reviewed-on: https://gerrit.libreoffice.org/11684
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
|
|
Previously, the timer events could have accumulated in that scenario leading
to unresponsiveness to user events.
Change-Id: I455d726ae7475f7dbf98d871c54d8c156cb64e52
|
|
Timer Queues
http://msdn.microsoft.com/en-us/library/windows/desktop/ms686796%28v=vs.85%29.aspx
allow creating & maintaing high-precision timers. This commit switches the
WinSalTimer implementation from using the Timers:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms644900%28v=vs.85%29.aspx
to Timer Queue Timers.
The 'classic' Timers do not have better precision than some 15.6ms (the
documentation mentions 10ms, but some measuring seems to confirm that it is
more than that).
With the Timer Queue Timers, we now have 1ms precision.
Incorporates some cleanup from Michael Meeks <michael.meeks@collabora.com>.
Change-Id: I0312a0c9fdc2779258698b24389b24c39e643473
|
|
Saves ~40bn cycles, 10% of calculation for the bug document.
Change-Id: I9d48706ad2cfe290965b648306d95b4d66e5fc63
|
|
Change-Id: I0a8860f2b0ea053cdfe9504dc266be36cdb0043e
|
|
Export date controls as ooxml Standard Document Tags (SDT) instead
of replacing them with plain text.
SDT date controls contain the date in ISO format as an attribute of
<date> tag, a custom date format that can be specified by the user
in the <dateFormat> tag and the date formatted in that custom format
in the <w:sdtContent> tag.
The unit test testFormControl from ooxmlexport suite was removed,
it only checked if the date control was exported as text and it
obviously fails now. A new test that checks the values of the
exported control was written instead.
A pair of date format functions were added to datetimeutils.hxx.
TODO: to avoid supporting all the posible custom formats that can be
specified in the <dateFormat> tag, it is forced to dd/mm/yyyy on
export.
Change-Id: I9d1b6f840ee9e133831fdb04ad399fe31bcb2063
|
|
Change-Id: I5cd642db4e0595c96e1af8adf7c7a45f589a259e
|
|
After the move now other classes can convert DateTime to OString also
Reviewed on:
https://gerrit.libreoffice.org/6816
Change-Id: I0ceb9a5cc26103a6cb36d7765a717770ec3fbe7d
|
|
Change-Id: If20ac542f31dd650d6d1cc22ced618f73e1ce773
|
|
Change-Id: I4899c89ee5b2a54c9c05b531ab284365f1558e3d
Reviewed-on: https://gerrit.libreoffice.org/5270
Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
|
|
Change-Id: I6a92196f33d7a5278c7dcc426112e9c56d582655
Reviewed-on: https://gerrit.libreoffice.org/4627
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
|
|
Since 6619955e72c1c2f29a32e82478d19147c0d7610a Date::GetDaysInMonth()
operates on the normalized value that corresponds to the actual values
set at the Date instance, obtain and set number of days for the intended
month instead of using the rolled-over date.
Change-Id: Ia6b007675104f8e134b278f216c3bb48b72f061c
|
|
Now all these usages were removed from LO.
Change-Id: I8a7233db20abdcdbb18428ad4004c78cc516a0e6
Reviewed-on: https://gerrit.libreoffice.org/3326
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
|
|
Change-Id: I20180cda1a28f898f487aff605796077d3418be3
|
|
Change-Id: I9a263e2232d63e5794f757cab39b93e13c7d159f
|
|
- nanosecond precision
- signed (allowed negative) year
Also: assorted improvements / bugfixes in date/time handling code.
Some factorisation of copy/pasted code.
Change-Id: I761a1b0b8731c82f19a0c37acbcf43d3c06d6cd6
|
|
Change-Id: Id7b2c7e871abf19b70f427095371c6a6c0208607
|
|
Change-Id: I759d2c7cea6a27fe676d1c1a17586445aa013ee9
|
|
This is a follow-up patch of 7710faa45640d25a83136a35044aafdb1b168d88.
Change-Id: I1f54cbe5c3170e9a79e11e9b9c1da3791419a4ba
|
|
Change-Id: I28ec097a70a8d71312d9e8382c3cf71a1eabde88
|
|
Change-Id: Ibc26313e79dd5f992c4bfb9454a9798fb1a78f00
|
|
Change-Id: I3f95d12a8c325c96c586253b5d9bb7dce24c0858
|
|
Change-Id: I5b6fd5712f08dae180bdd3b57b63713946b82433
|
|
Avoid some uses of non portable #!/bin/bash in shell scripts.
Patch contributed by Pedro Giffuni
http://svn.apache.org/viewvc?view=revision&revision=1235297
remove redundant namespace, patch contributed Mathias Bauer
http://svn.apache.org/viewvc?view=revision&revision=1162610
removal of OS/2 port changes, and preferring our similiar
tools/inc/tools/solar.h DLLPOSTFIX cleanup.
i118595 - Removal of the use of getopt() from rscdep.
Patch contributed by Andre Fische
http://svn.apache.org/viewvc?view=revision&revision=1202270
|
|
Change-Id: I96f76ed6b33f5c786d1e3ab3981a535037a9c1b5
|
|
|
|
|
|
|
|
|
|
|
|
+ IsValidDate() checks only day and month regarding the year, not Gregorian
cut-off date as now does IsValidAndGregorian().
+ Normalize() carries over invalid day and month values to next months and
years.
* All methods that return or internally use a day count now internally
normalize the date values, without modifying the actual Date instance. So,
if the date is not valid you may get unexpected results.
* Previously, a date with month>12 would had accessed the days-of-month
array out of bounds on all such methods. So you would had gotten
unexpected results anyway..
* Affected methods are:
GetDayOfYear()
GetWeekOfYear()
GetDaysInMonth()
static DateToDays()
|
|
Once smaller than 1582-10-15 decrementing a Date will not produce a valid date.
|
|
|