Age | Commit message (Collapse) | Author |
|
Change-Id: I6362caae4dd0764a5f99f1b0453c17ecde4b53f1
Reviewed-on: https://gerrit.libreoffice.org/59213
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
(cherry picked from commit a4c9e4539ee82c409add42e68329d4eb1100d62f)
Reviewed-on: https://gerrit.libreoffice.org/59244
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 16ee6373bab9056650cf3b7a153e832d8d09fc28)
|
|
Caller of ImpSvNumberformatScan::GetKeyWord() needs to know if
English or locale's keyword was found and act on it.
Pointed out by an assert when attempting to copy "STANDARD" length
characters (8) from "General" (7), which doesn't harm because when
not in debug it copied the terminating 0-character. However, the
keyword name also needs to be replaced for the locale's resulting
format code.
Change-Id: Ia5211b307ea44c1ba9c2b86786368355c570d4a2
Reviewed-on: https://gerrit.libreoffice.org/55293
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
(cherry picked from commit bfe6e9ecb18e8a3d9da368a1eb48e807ab9041cf)
Reviewed-on: https://gerrit.libreoffice.org/55298
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
(cherry picked from commit b203abbc50e57105bca654d024b30f7fff129456)
|
|
Because Excel does not know a Boolean number format, BOOLEAN is
saved to Excel as
"TRUE";"TRUE";"FALSE"
with implicit conditions [>0] and [<0]. This when loaded has no
boolean property. Then saved to ODF it is loaded as
[>0]"TRUE";[<0]"TRUE";"FALSE"
with explicit conditions, which has identical meaning.
Convert both equivalent format codes to proper BOOLEAN when
reading. Locale dependent representations are treated the same,
e.g. "WAHR";"WAHR";"FALSCH"
Reviewed-on: https://gerrit.libreoffice.org/50642
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
(cherry picked from commit ce4fc2fc08be8ea2773194e303ed42d2579e93a0)
Backported.
Conflicts:
svl/source/numbers/zforscan.cxx
Change-Id: I49383d71fce972fdd7ad9b19ce3bc150d02aba62
Reviewed-on: https://gerrit.libreoffice.org/50645
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
(cherry picked from commit feb3da3dc53c9b702e39ec12b037b07a67bedcbd)
|
|
Change-Id: I636e086c51ceb70bdac72acfbabe99ad29003cdb
Reviewed-on: https://gerrit.libreoffice.org/48268
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-on: https://gerrit.libreoffice.org/48299
Reviewed-by: Eike Rathke <erack@redhat.com>
|
|
.. instead of in every GetKeyWord() call, and force to EnglishOnly
if there aren't.
Change-Id: I56941298c0e02d041b80cdb5805905e24116405e
(cherry picked from commit 38a3886fc1464e635985f9ec82b48e0a69f6e536)
Reviewed-on: https://gerrit.libreoffice.org/46384
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
|
|
Change-Id: I3942a7de52bcedf491da83407791fcd0080aaf4d
(cherry picked from commit 482182fd0331a0be371f8f58dc74aa05a68f0a1d)
Reviewed-on: https://gerrit.libreoffice.org/46351
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
|
|
Change-Id: I45667a67c6c69106d86755ed41438f23e019dfea
|
|
StandardColor cannot be made const because GetColor returns a pointer on it
Change-Id: I974b1463012431069910db32a2cd7280b5d0b17e
Reviewed-on: https://gerrit.libreoffice.org/43790
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
|
|
Change-Id: If92869e19c413e11f1f299a97f96b9637aaba65d
Reviewed-on: https://gerrit.libreoffice.org/43864
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Using MM in Finnish should be minutes.
However, if English NfKeywords are used, MM can be month or minutes.
This patch try to distinguish minute/month if minute was first detected.
Change-Id: I029f3f2a4d79cb4a9730f8c32147f14bedd8094c
Reviewed-on: https://gerrit.libreoffice.org/43633
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
|
|
For QA test, we need to access sEnglishKeyword
Change-Id: Ib277204de14bc9268a5f3c825c3c7b3e61acbbc0
Reviewed-on: https://gerrit.libreoffice.org/43689
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
|
|
All keywords must be uppercase. Excel Thai modifier is the only one lowercase
Change-Id: I28d3df4592bc1ff0845892c8f37b083256d63f4b
Reviewed-on: https://gerrit.libreoffice.org/43686
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
If keyword does not correspond to any keyword in language
used, then English keywords are tested
Test done only if language may use localized keywords
Change-Id: Iace2470f311c9c02eb86b63d0ad5f6130f4e2f0b
Reviewed-on: https://gerrit.libreoffice.org/43260
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
|
|
Change-Id: I9ab9d5be1edead3a83375d87910bc9128c894b85
|
|
Regression from
commit 0ac1e2ad19d4fdb46dcf54f67db2df081f4675bb
Date: Wed Aug 2 09:39:43 2017 +0100
Resolves: ofz#2833 null deref
and similar for date+time
commit 42b894f80a6d0c39bb0f7092eb204a15c22c4f38
Date: Sat Aug 5 19:15:36 2017 +0100
ofz#2867 null deref
Effectively revert the code changes of those, leaving the test
case files intact, and "do the right thing" (switching two lines,
to
nPos = nPos + sStrArray[i].getLength();
i++;
nPos actually had always to be incremented by the length of the
*current* string position but was used after only as an error
position indicator, meaningless if there was no error.
Change-Id: I9bc4e5e56d70a275d26df0b72ed6a19e9297e0fa
|
|
Change-Id: If856473683685d79d88b024f7fafa2920b403bb7
Reviewed-on: https://gerrit.libreoffice.org/40792
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: Ibe9ad8c1bfbb336ee1f02edf0f619220cfcee375
Reviewed-on: https://gerrit.libreoffice.org/40744
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I631236b5750f1ddb9828ab5ebd4c59e7f1b81390
Reviewed-on: https://gerrit.libreoffice.org/40710
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I387b702a0bc785a8e9da4e0390067626c5475319
Reviewed-on: https://gerrit.libreoffice.org/40674
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I021a716aa76d430a1d3c6fac2dddec4daa01e563
Reviewed-on: https://gerrit.libreoffice.org/40667
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
* first, a non-const Date* may leave the impression that one could change the
NullDate through the pointer, which is only partly successful; luckily no one
did that
* second, there is always a NullDate so checking for nullptr is superfluous
* third, the pointer was dereferenced (maybe after a check) everywhere to
obtain the NullDate, luckily..
Change-Id: I3c3a788ba0336596ac6bde4c96e77a0cdb7a4a95
|
|
Change-Id: I859b77319f551eabd19dae54bd69c212221112a8
Reviewed-on: https://gerrit.libreoffice.org/39938
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I47a0e13c5affa220646c59ec0bddb342f858fe53
|
|
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>
|
|
Change-Id: I39b84b1d0272c2e8aa606e8b2e9ab0d2d88c3586
Reviewed-on: https://gerrit.libreoffice.org/36671
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
... when converting format codes between locales, so en-US MM/DD/YYYY
correctly ends up as de-DE DD.MM.YYYY instead of MM.DD.YYYY
Change-Id: Iccfdd4787fc05462f47266c77cc9e95d14dae60d
|
|
To consider that denominator is found (bDenom=true)
there must be some digits found after fraction bar
Dummy format # ?/ ? can now work again (even with
blank as thousands delimiter).
However such format can not be saved (except in XLS)
Change-Id: I657e97e09a6ae4c08a29ad6d0b586c85a9968e3d
Reviewed-on: https://gerrit.libreoffice.org/35111
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
|
|
Though only the closing 0-character and the following check excludes that,
dbgutil asserts.
Change-Id: Ife1299042a60f6f058c4cf58b406d1cc022786a7
|
|
Update b2738c6f67cb650ac32228f3cd20b9dfe4b41c9c
Change-Id: I8417dcf948e72376c7e67bee78df56c3021b55de
Reviewed-on: https://gerrit.libreoffice.org/34913
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
|
|
The bug was introduced with left aligment of denominator.
Non feasable denominators were not tested and create infinite loop
while inserting and removing the same space.
This patch detects
- if denominator starts just after fraction bar.
Otherwise, format is faulty.
- if a non digit is detected in the denominator,
next part of format is treated as text
This patch is changing behavior of some formats:
"# ?/foo??" is treated as faulty format while it was considered as valid
"# ?/??E?" is treated with 2 digits in denominator and "E?" at the end,
while it was considered as faulty
Change-Id: I0379a398dff79b6e21a44776c0d4356d066cdeab
Reviewed-on: https://gerrit.libreoffice.org/34659
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
|
|
...from previous commit
Change-Id: I062b7cd212c17e7eb5274476e6859228d0477c7f
Reviewed-on: https://gerrit.libreoffice.org/32098
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
|
|
This way the NumberFormatMapper can cache subsequent getFormatCode calls.
It improves performance in case LANG=en_US.
Change-Id: I81922f219c29a5aa302e5ad3afead107dee463e3
Reviewed-on: https://gerrit.libreoffice.org/29135
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
This class only adds a level of indirection, without any useful functionality.
Change-Id: I806e1b9241caf025c62c12c93aad3101daac874a
Reviewed-on: https://gerrit.libreoffice.org/29134
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I5b9c503fd28209b893688e81ddd00eb843b44e37
|
|
Enable modification of fraction number format through dialog UI:
- negative in red
- "Decimal places" is replaced with "Denominator places"
- leading zeros for integer part
- thousand separator for integer part
Update: options in Sidebar
Thousand separator works, also for ' ' as thousand separator
Change-Id: I0ed2952ed9cd8afb5444b44997526e5019a5858d
Reviewed-on: https://gerrit.libreoffice.org/27268
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Laurent BP <laurent.balland-poirier@laposte.net>
|
|
Change-Id: Icb05f681aa549a975ae4a1dee749e20ad4a215f0
|
|
Other formats may be differently interpreted
HH YY/MM => Month expected
HH DD/MM => Month expected
Change-Id: Iabb17911bf2907c02b6b898052b6933692f8074a
Reviewed-on: https://gerrit.libreoffice.org/27823
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
|
|
Clearly in {HH YYYY-MM-DD} the MM should not be minute. Also not in
{HH DD.MM.YY}. Don't follow every bullshit. Period.
It is debatable how to treat MDY, {HH:MM DD/YY} should be different from
{HH MM/DD/YY}, Excel ironically takes both as minute, even in an en-US locale.
Change-Id: I13d39a36294e3c40cc0e9bf72026804b299bb264
|
|
For format like HH:MM:SS MM/DD
second MM is detected as minute: see tdf#95339
New rules:
- first M following each H is minute
- first M following first S is minute
Detection Month/minute now fully compatible with Excel even with unwanted detection:
SS:MM:HH DD/MM/YY
second MM is minute even if user would expect month
Change-Id: Ia789fbc2dbd6d2dcbe9b9c34d3f288674966dd10
Reviewed-on: https://gerrit.libreoffice.org/27560
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
|
|
Change-Id: Ib23b34fd927eaecef1868fbeebde0a28399dc0c3
|
|
wrongly introduced with c9ed6e832213129cc579c1c309ce9dbd3593c57a
Change-Id: Ic6c9c404ad0af11eb5d638f453150ee0da60e633
|
|
This reverts commit cb94d2fbd9596aca45d915a599caa671a261c2a2.
There's an easier solution not leaving unhandled corner cases.
|
|
To fix tdf#95339 M-H was treated as minute-hour
But for "D.M.H" it should be treated as day.month.hour
THis commit extends test to detect if
- in case of M.H: there is day or year previous M => M stands for month
- in case of S.M: there is day or year after M => M stands for month
Some ambiguous cases like S.M.D are now treated as it was previously (month)
Change-Id: I048eb227a738b6c453e39d9208bef0d1fda136a0
Reviewed-on: https://gerrit.libreoffice.org/27493
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
|
|
In fraction number format, strings located between integer and fraction
should be treated as blank delimiter
Change-Id: I83e78fb0fe08178ee194fc2a213ee260ce15c639
Reviewed-on: https://gerrit.libreoffice.org/27128
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
|
|
Fraction number format
Accept '0' in numerator and denominator format: 0 0/0
Represent integer 3 as: 3 0/1
Load and save format to Excel
As it cannot (yet) be saved in ODF, replace 0 by ? during save to ODF
Change-Id: I4721a751431d3f9b903b369d199146ddfb76b43d
Reviewed-on: https://gerrit.libreoffice.org/27062
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
|
|
... 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>
|
|
For a fraction number format with forced denominator, stop detecting
denominator value after digits
Change-Id: I68281c5fc5b8a4c395932dff532179e694cf9827
Reviewed-on: https://gerrit.libreoffice.org/26907
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
|
|
Detect minute in user number format such as SSMM or MMHH
Change-Id: Iadb29dabba167b8f59903ff05e7367857378738a
Reviewed-on: https://gerrit.libreoffice.org/25222
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
|
|
...which (in LIBO_INTERNAL_ONLY) for Clang expands to [[clang::fallthrough]] in
preparation of enabling -Wimplicit-fallthrough. (This is only relevant for
C++11, as neither C nor old C++ has a way to annotate intended fallthroughs.)
Could use BOOST_FALLTHROUGH instead of introducing our own SAL_FALLTHROUGH, but
that would require adding back in dependencies on boost_headers to many
libraries where we carefully removed any remaining Boost dependencies only
recently. (At least make SAL_FALLTHROUGH strictly LIBO_INTERNAL_ONLY, so its
future evolution will not have any impact on the stable URE interface.) C++17
will have a proper [[fallthroug]], eventually removing the need for a macro
altogether.
Change-Id: I342a7610a107db7d7a344ea9cbddfd9714d7e9ca
|