Dominik Stadler
4a3b92b305
Comment out flaky assertion and add more information to find which file fails in CI
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917072 13f79535-47bb-0310-9956-ffa450edef68
1 month ago
Dominik Stadler
9453fa908a
Bug 66425: Avoid exceptions found via poi-fuzz
Use correct default date-format, add some tests
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=66381
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917070 13f79535-47bb-0310-9956-ffa450edef68
1 month ago
Dominik Stadler
af4d1e9f1a
Adjust some tests for Java 19 and Java 20
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903105 13f79535-47bb-0310-9956-ffa450edef68
1 year ago
PJ Fanning
ea9883af55
update tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1895705 13f79535-47bb-0310-9956-ffa450edef68
2 years ago
PJ Fanning
548dfb37f5
update tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1895703 13f79535-47bb-0310-9956-ffa450edef68
2 years ago
PJ Fanning
1896253fb5
[bug-65703] new DataFormatter method: setUse4DigitYearsInAllDateFormats - defaults to false
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1895326 13f79535-47bb-0310-9956-ffa450edef68
2 years ago
PJ Fanning
b9d1e9c27f
[bug-63211] fix issue with escaped % in custom number format
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1895312 13f79535-47bb-0310-9956-ffa450edef68
2 years ago
PJ Fanning
f375c158d9
convert indents to spaces
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1891364 13f79535-47bb-0310-9956-ffa450edef68
2 years ago
Dominik Stadler
454baca538
Print out information that current locale might be wrong if a specific test fails
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1891345 13f79535-47bb-0310-9956-ffa450edef68
2 years ago
Andreas Beeker
b6aee1ef6d
65206 - Migrate ant / maven to gradle build
compile / jar / test of mrJars
don't include ants build.xml anymore
rename directories to match project and maven artifact names
refactor artifacts - so each project has one artifact
replace static references in hssf/dev tests with junit5 constructs, which had problems in parallel tests
increase gradle heap to 4gb because of OOM - maybe less would also work
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1888488 13f79535-47bb-0310-9956-ffa450edef68
3 years ago
Andreas Beeker
37791e4bdf
65206 - Migrate ant / maven to gradle build
update gradle files and project structure along https://github.com/centic9/poi/tree/gradle_build
remove eclipse IDE project files
remove obsolete record generator files
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1888111 13f79535-47bb-0310-9956-ffa450edef68
3 years ago
Andreas Beeker
9c358836b4
Sonar fixes
JUnit5 test classes and methods should have default package visibility
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1885325 13f79535-47bb-0310-9956-ffa450edef68
3 years ago
Andreas Beeker
606a313c4c
Sonar fixes
JUnit5 test classes and methods should have default package visibility
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1885281 13f79535-47bb-0310-9956-ffa450edef68
3 years ago
Andreas Beeker
a0fa9e19b1
#65026 - Migrate tests to Junit 5
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884783 13f79535-47bb-0310-9956-ffa450edef68
3 years ago
Nick Burch
2b2631225d
#64319 Tighten the scientific format code to avoid making eg TRUE into TRUE+, handle formats like 0E-0, and ensure formats like 0E0 work correctly
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1876396 13f79535-47bb-0310-9956-ffa450edef68
4 years ago
Nick Burch
2fb30f7892
Add disabled unit test for #64319
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1876225 13f79535-47bb-0310-9956-ffa450edef68
4 years ago
Dominik Stadler
e6c3dd9350
Fix some IDE warnings and enable commented test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1856691 13f79535-47bb-0310-9956-ffa450edef68
5 years ago
Greg Woolsey
67aad69757
#63292 1904 date windowing flag not used for some format cases
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1856648 13f79535-47bb-0310-9956-ffa450edef68
5 years ago
Greg Woolsey
0d22749477
#63291 CellFormat global cache isn't thread-safe
move date format synchronization down to where the problem instance is held.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1856647 13f79535-47bb-0310-9956-ffa450edef68
5 years ago
PJ Fanning
2a9390d683
[bug-63291] support concurrent date formatting with same DataFormatter
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1856449 13f79535-47bb-0310-9956-ffa450edef68
5 years ago
PJ Fanning
80dc4b34c9
add test for concurrent use of DataFormatter
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1856439 13f79535-47bb-0310-9956-ffa450edef68
5 years ago
Dominik Stadler
5b62dcd379
Bug 62839: Adjust MathX.floor() to handle negative values the same
way as Excel/LibreOffice
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1849764 13f79535-47bb-0310-9956-ffa450edef68
5 years ago
PJ Fanning
1e8ecbec04
change HyperLink getType to return HyperlinkType
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808737 13f79535-47bb-0310-9956-ffa450edef68
6 years ago
PJ Fanning
31f2a54bde
[github-25] support excel number trailing comma format - Thabks to Luca Martini for proving the patch
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800975 13f79535-47bb-0310-9956-ffa450edef68
6 years ago
PJ Fanning
26389768b9
[Bug 60422] fix data formatter issue with specific format in German locale
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800713 13f79535-47bb-0310-9956-ffa450edef68
7 years ago
PJ Fanning
dc0a33679c
Remove check for jdk1.5 in test because POI now only supports jre1.6 and up
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800696 13f79535-47bb-0310-9956-ffa450edef68
7 years ago
PJ Fanning
32a337f1d1
add test case for date formatting using different locales
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800558 13f79535-47bb-0310-9956-ffa450edef68
7 years ago
PJ Fanning
b68b916d08
Remove some deprecated *SSF APIs
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1800147 13f79535-47bb-0310-9956-ffa450edef68
7 years ago
PJ Fanning
07cb031c2e
[Bug 60422] Fix forbidden-api build issue
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799723 13f79535-47bb-0310-9956-ffa450edef68
7 years ago
PJ Fanning
840904ed91
[Bug 60422] Tidy up test case
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799722 13f79535-47bb-0310-9956-ffa450edef68
7 years ago
PJ Fanning
9856c7c663
Bug 60422 add testtestcase with current LocaleUtil workaround
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799721 13f79535-47bb-0310-9956-ffa450edef68
7 years ago
Greg Woolsey
6971b1ee60
Fix bug #61007
Revert to previous "expected" test results even though they don't match excel for a specific case, to accommodate tighter logic about which format patterns to send to CellFormat vs. handle directly in DataFormatter.
Send what was checked previously plus only multi-segment conditional range formats. Allows existing tests to pass plus the new test with the case for these conditional formats.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1791964 13f79535-47bb-0310-9956-ffa450edef68
7 years ago
Greg Woolsey
9490042347
Fix bug #61007
use CellFormat for all format strings containing multiple parts (";" delimited) and update unit test to expect the same values as Excel. Also added tests for the failing formats.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1791949 13f79535-47bb-0310-9956-ffa450edef68
7 years ago
Dominik Stadler
749f8d09ea
Bug 60031: Enhance test some more
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1780450 13f79535-47bb-0310-9956-ffa450edef68
7 years ago
Javen O'Neal
442e7cc721
bug 60031: DataFormatter parses months incorrectly when put at the end of date segment. Thanks to Andrzej Witecki
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1779564 13f79535-47bb-0310-9956-ffa450edef68
7 years ago
Andreas Beeker
2e50133e88
merge trunk to branch
git-svn-id: https://svn.apache.org/repos/asf/poi/branches/hssf_cryptoapi@1761376 13f79535-47bb-0310-9956-ffa450edef68
7 years ago
Javen O'Neal
72a9e2285b
bug 60025: DataFormatter should print booleans as TRUE/FALSE, not true/false
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1760219 13f79535-47bb-0310-9956-ffa450edef68
7 years ago
Dominik Stadler
8924e1260b
Fix some IntelliJ and Findbugs warnings: StringBuilder, foreach, append(), ...
test-updates
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1753122 13f79535-47bb-0310-9956-ffa450edef68
7 years ago
Dominik Stadler
0a467f10c3
Add a unit-test to verify that DataFormatter.formatCellValue() does format formula-results correctly
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1751400 13f79535-47bb-0310-9956-ffa450edef68
8 years ago
Javen O'Neal
8d31c01f40
bug 59791: replace deprecated Cell.CELL_TYPE_* usage with CellType.*
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1751240 13f79535-47bb-0310-9956-ffa450edef68
8 years ago
Andreas Beeker
e425cd4f14
findbugs fixes
changed UDFFinder to abstract class and moved DEFAULT constant to factory method
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1747942 13f79535-47bb-0310-9956-ffa450edef68
8 years ago
Dominik Stadler
2edb0f535b
Add some pre-checks to fail the test with better assertion if the locale is not set correctly.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1747916 13f79535-47bb-0310-9956-ffa450edef68
8 years ago
Javen O'Neal
97b299d672
bug 59638: patch from Axel Howind, support non-comma number grouping separators (such as German 1.234,57)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1747139 13f79535-47bb-0310-9956-ffa450edef68
8 years ago
Javen O'Neal
54020b8fb4
whitespace
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1717931 13f79535-47bb-0310-9956-ffa450edef68
8 years ago
Javen O'Neal
50d6f49f7d
whitespace
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1717928 13f79535-47bb-0310-9956-ffa450edef68
8 years ago
Nick Burch
d95108b5f5
#58532 Enable more of the padding cell format tests, but a few remain to be fixed
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1710407 13f79535-47bb-0310-9956-ffa450edef68
8 years ago
Nick Burch
b3f68c4eb4
#58532 For Excel cell formats with 3+ parts to them (eg +ve,-ve,0), which
DataFormatter didn't properly support, call out to the alternate CellFormat
instead for the formatting.
This also allows us to enable some disabled parts of DataFormatter unit tests
We still need to rationalise DataFormatter and CellFormatter though, so we
only have one set of cell formatting logic...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1710399 13f79535-47bb-0310-9956-ffa450edef68
8 years ago
David North
940f3c5af3
Format numbers more like Excel does
Thanks to Chris Boyle for the patch
https://bz.apache.org/bugzilla/show_bug.cgi?id=58471
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1706971 13f79535-47bb-0310-9956-ffa450edef68
8 years ago
Andreas Beeker
a3d2eb57ff
Bug 58326 - Forbidden APIs patches - first set of changes for locale and timezone settings
also includes fixes for
- name shadowing
- unused deprecated method "getClipRect" in classes extending Graphics2d
- HexDump - replaced intermediate String.format calls with custom padding
- convert testcases to junit4
- closing resources
also tested with an arbitary timezone (PST) and locale (ru)
supresses forbidden apis check for
- LocaleUtil (the only place where Locale.getDefault() and TimeZone.getDefault() should be called)
- Classes using FontMetrics - without the actual text it's difficult to return something sane
Some usage of UTC and Locale.ROOT might be still wrong, e.g. in MapiMessage we don't access the
extended mapi properties, which might contain the timezone
DataFormatter has now a Observable property which need to be observed when custom formats are used
and the Locale changes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1701688 13f79535-47bb-0310-9956-ffa450edef68
8 years ago
Dominik Stadler
dd25abcc68
Bug 56595: Also switch the cache in DateUtil.isADateFormat() to ThreadLocals to not have another syncpoint here. Again only very little data is kept, so no memory bloat should happen because of this.
Also do more simple checks before actually looking at the cache
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1647296 13f79535-47bb-0310-9956-ffa450edef68
9 years ago