summaryrefslogtreecommitdiff
path: root/svl
AgeCommit message (Collapse)AuthorFilesLines
2017-10-23loplugin:includeform: svlStephan Bergmann12-25/+25
Change-Id: I769b091515d1e6b7d16652d11ff2b94a75584ad0
2017-10-23tdf#33689 Add QA unit testLaurent BP1-0/+50
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>
2017-10-23Follow-up of resolution of tdf#33689 for FinnishLaurent BP1-1/+10
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>
2017-10-23tdf#33689 QA Check integrity of sEnglishKeywordLaurent BP1-0/+68
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>
2017-10-23tdf#33689 Make sEnglishKeyword static memberLaurent BP3-4/+16
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>
2017-10-23overload std::hash for OUString and OStringNoel Grandin2-12/+2
no need to explicitly specify it anymore Change-Id: I6ad9259cce77201fdd75152533f5151aae83e9ec Reviewed-on: https://gerrit.libreoffice.org/43567 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-22Resolution of tdf#33689 Update commentLaurent BP1-2/+2
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>
2017-10-19tdf#33689 Accept English syntax keywords in format stringsLaurent BP1-69/+196
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>
2017-10-18Replace lists by vectors in svlJulien Nabet3-70/+52
+ remove using namespace std and use prefix std:: Change-Id: Iab432f2c88ba5a15541bd97567682c6a34b0af2e Reviewed-on: https://gerrit.libreoffice.org/43471 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-17Add to nPos once instead of in each iterationEike Rathke1-5/+3
Change-Id: I9ab9d5be1edead3a83375d87910bc9128c894b85
2017-10-17More tests for time and date+time fractions of seconds, tdf#112933 relatedEike Rathke1-0/+19
Covering the loop and non-loop states in ImpSvNumberformatScan::FinalScan() Change-Id: I4a8da617a2a61ad12a99462bfe4014aaa5a75c1b
2017-10-16Unit test for tdf#112933Eike Rathke1-0/+5
Change-Id: I0988401a9aa7afc25ea3a50883e4d3a5cfbe9d44
2017-10-16Resolves: tdf#112933 correct number of one decimal in fraction of secondsEike Rathke1-22/+16
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
2017-10-16svl: Drop unnecessary abstraction of DdeItemImpTakeshi Abe1-19/+1
Instead, just use std::vector<DdeItemImpData>. Change-Id: If0c4943bdf370211cd6e0466a899da718480a4ae Reviewed-on: https://gerrit.libreoffice.org/43415 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-13tdf#100726 improved readability of OUString/Ostring concatenationTjipke van der Heide1-2/+2
changed variable aResult to use concationation operator + instead of += Change-Id: I1547a869a9b6ede6e64727a1048232caf404acb7 Reviewed-on: https://gerrit.libreoffice.org/43340 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Muhammet Kara <muhammet.kara@pardus.org.tr>
2017-10-10svl: Drop dead constantsTakeshi Abe1-2/+0
which were gone at b021353dd62c3d8c9ee0281753b88f6304a2514d and 75933b220d48bceff25b07cfc4b55c70a2e24917. Change-Id: Ibfff9a4b0c5f834c1daaedeeff8e48d8eb923cb3 Reviewed-on: https://gerrit.libreoffice.org/43308 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-10-06use rtl::Reference in svl,sfx2Noel Grandin2-30/+26
instead of manual ref-counting Change-Id: Icb6472ffadfb57c9723b26f6f247e78fff45e528 Reviewed-on: https://gerrit.libreoffice.org/43193 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-05Rename and move SAL_U/W to o3tl::toU/WMike Kaganski4-9/+13
Previosly (since commit 9ac98e6e3488e434bf4864ecfb13a121784f640b) it was expected to gradually remove SAL_U/W usage in Windows code by replacing with reinterpret_cast or changing to some bettertypes. But as it's useful to make use of fact that LibreOffice and Windows use compatible representation of strings, this commit puts these functions to a better-suited o3tl, and recommends that the functions be consistently used throughout Windows-specific code to reflect the compatibility and keep the casts safe. Change-Id: I2f7c65606d0e2d0c01a00f08812bb4ab7659c5f6 Reviewed-on: https://gerrit.libreoffice.org/43150 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-10-05Resolves: tdf#102075 support system [$-F400] time and [$-F800] long dateEike Rathke2-9/+99
By substituting a (valid matching the type) format using these special LCID modifier values with the current system locale's format. See ECMA-376-1:2016 18.8.31 numFmts (Number Formats) and https://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.numberingformats.aspx which seems to be the only documentation available. Change-Id: Ieca048a77d4ef473ae475e202557d1353ff5387d Reviewed-on: https://gerrit.libreoffice.org/43148 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-10-04add << operator for css::uno::ExceptionNoel Grandin1-2/+1
Change-Id: Ia23dafd07133779144965682df3b7125a3214235 Reviewed-on: https://gerrit.libreoffice.org/43046 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-10-04svl: Remove unnecessary abstraction of SfxImpStringListTakeshi Abe1-32/+23
Change-Id: Idbf1bf08f89f0fd1e92ad8f0d93d325267d19416 Reviewed-on: https://gerrit.libreoffice.org/43120 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-03new loplugin:blockblockNoel Grandin1-8/+6
Change-Id: I7b68b70fa4c7234e8882f7627026959a596968fd Reviewed-on: https://gerrit.libreoffice.org/43025 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-02Add unit tests for ISO 8601 date+time inputEike Rathke1-1/+10
Change-Id: Iab53f39313c1bac04fe5718823455e5ef0e52f13
2017-10-02Number scanner: accept fractional seconds in ISO 8601 also for ',' commaEike Rathke1-0/+8
... if comma is the group separator (or some other separator). Strictly only if 'T' separator was encountered. Change-Id: I4df55235a6a416f0719752dfcde659d846ac208e
2017-10-02Number scanner: accept fractional separators in an ISO 8601 date+time stringEike Rathke2-0/+17
In a strict ISO 8601 date+time string with 'T' separator the Time100SecSep separating seconds and fractional seconds can be either '.' period or ',' comma, so accept those in all locales. Not accepting '.' in all locales was the cause of tdf#100822 before code was changed to use sax::Converter::parseDateTime() instead. Change-Id: Ica676050b52b11da64afbac6feabb43d9e985bc4
2017-09-30Number scanner: accept negative year ISO 8601 input with 'T' time separatorEike Rathke1-2/+3
This is valid input: -1999-11-23T12:34:56 Change-Id: I0464b623b76fb55c1d2b848d0db9278e9589a4d8
2017-09-30Translate German comments and debug strings (leftovers)Johnny_M1-1/+1
Change-Id: I4ab8fbae47037f6e21c51713d1c51aaa5dc61f40 Reviewed-on: https://gerrit.libreoffice.org/42967 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-09-30Use explicit function names for fooA/fooW WinAPI; prefer fooWMike Kaganski1-6/+5
We should only use generic foo function name when it takes params that are also dependent on UNICODE define, like LoadCursor( nullptr, IDC_ARROW ) where IDC_ARROW is defined in MSVC headers synchronised with LoadCursor definition. We should always use Unicode API for any file paths operations, because otherwise we will get "?" for any character in path that is not in current non-unicode codepage, which will result in failed file operations. Change-Id: I3a7f453ca0f893002d8a9764318919709fd8b633 Reviewed-on: https://gerrit.libreoffice.org/42935 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-29inline SfxPoolItem copy constructorJochen Nitschke1-7/+0
as delegating constructor. In preparation to remove default able copy constructors of derived classes. Change-Id: I516efa70ef2a06079194aafbf630e151138c6bbc Reviewed-on: https://gerrit.libreoffice.org/42923 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-09-23loplugin:flatten in svl..svxNoel Grandin2-360/+300
and implement a check in the plugin to prevent us modifying the same patch of source code twice. This logic should probably be moved into plugin.cxx at some point. Change-Id: I7ebff6424cc8733bb2c8f7dba75eaaec68649290 Reviewed-on: https://gerrit.libreoffice.org/42660 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-22Fresh run of bin/update_pch.shMike Kaganski1-3/+30
Change-Id: I69d4157aaf6570cecd51ea59df20556914942e06 Reviewed-on: https://gerrit.libreoffice.org/42565 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-22Windows: avoid dependence on UNICODE define; prefer W functionsMike Kaganski4-48/+42
Change-Id: I95b90128e93f0d88ed73601bcc5a7ca9279d4cf1 Reviewed-on: https://gerrit.libreoffice.org/42560 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-19unused Registration classNoel Grandin1-68/+3
since commit 1b694dad643334ec1bab3f823dcd68f44a05ebe3 Date: Thu Aug 24 22:14:27 2017 +0200 loplugin:unusedmethods Change-Id: I54ec057e9216f3b245b86b6c81fb75ca06917d74
2017-09-19Clean up the code by using LOWORDStephan Bergmann1-1/+1
<https://msdn.microsoft.com/en-us/library/windows/desktop/ ms646296(v=vs.85).aspx> documents: "The low word contains a Language Identifier for the input language and the high word contains a device handle to the physical layout of the keyboard. Change-Id: I0b35e7a0f2bf5570dcf57cffe59ed2e2db361d2e
2017-09-18Use even more WIN32_LEAN_AND_MEANMike Kaganski2-0/+6
Change-Id: I538fe5b41156366e0e87b3a93e58a3947afd18f5 Reviewed-on: https://gerrit.libreoffice.org/42398 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-15cryptosign: don't use 8-bit string functionsMike Kaganski1-15/+15
Change-Id: I5f0414c85001043cd746bab364a84a00ac9c85e4 Reviewed-on: https://gerrit.libreoffice.org/42305 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-14loplugin:cstylecast (clang-cl)Stephan Bergmann1-1/+2
Change-Id: I1d9b30cc06882b7662ef5d706be52755e02323ed
2017-09-12clang-tidy modernize-use-emplace in svgio..svtoolsNoel Grandin6-8/+8
Change-Id: I4f3b0762e197d5397e723aba1dc43e3c857be145 Reviewed-on: https://gerrit.libreoffice.org/42193 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-12use std::unique_ptr in TItemInfoNoel Grandin2-17/+7
and inline the TItems typedef Change-Id: I0c50d12d53ce4b52c330cad8790a65065ebdd82e Reviewed-on: https://gerrit.libreoffice.org/42182 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-10gpg4libre: add sha512 supportThorsten Behrens1-0/+1
Change-Id: Ia5ef54e47e8528a33aba83ae2e317fac5cffb428 Reviewed-on: https://gerrit.libreoffice.org/42086 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-09-08svl: assert calls of SfxPoolItem::Create/StoreMichael Stahl1-0/+2
Change-Id: I2d92897d558ad0914e8bbc80b4dec72d0fd00629
2017-09-08loplugin:constantparamNoel Grandin2-5/+5
Change-Id: Ic87f0cc863490858b7cc7e74a7f90ec31992dd53 Reviewed-on: https://gerrit.libreoffice.org/42089 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-06Clean up sal/backtrace.hxxStephan Bergmann1-3/+4
Change-Id: Id78e9c0ca29ff2e52591f3d446431ac23c20ab7a Reviewed-on: https://gerrit.libreoffice.org/41926 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-09-04Resolves: tdf#52510 handle trailing ';' specifying empty following subformatEike Rathke1-2/+20
Change-Id: Ic84065f11619542fe735f45e72c9303897ea5755
2017-09-04loplugin:unnecessaryparen include c++ castsNoel Grandin5-5/+5
Change-Id: I132d3c66f0562e2c37a02eaf4c168d06c2b473eb Reviewed-on: https://gerrit.libreoffice.org/41874 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-03SfxItemPool_Impl::nInitRefCount is always 1Jochen Nitschke2-5/+1
since removal of serialisation code Change-Id: I8cbd7ecd3d4bb61a8d9e6bc098f09f43c02a8f4c Reviewed-on: https://gerrit.libreoffice.org/41850 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-02sw: retrieve subject name from signatureAshod Nakashian1-0/+47
From CryptoAPI. Change-Id: I5ec33a754f71d3617090a03887355077d0ffedd7 Reviewed-on: https://gerrit.libreoffice.org/41789 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2017-08-31loplugin:constparams: svl (clang-cl)Stephan Bergmann1-1/+1
Change-Id: Iddeb46c10046a83708ccff82e7125c36ed27c34d
2017-08-30Unit tests for tdf#91758Eike Rathke1-2/+6
Change-Id: I4015a339ca18b214adca228b58319d897f0ad910
2017-08-30Force ISO date format again if ISO input, tdf#91758 follow-upEike Rathke2-1/+8
... and input doesn't match a date acceptance pattern, even if less than 3 digits in year. Change-Id: Ib25aa8e813c06a224cfa95ead79c0f3bf2d2d672