summaryrefslogtreecommitdiff
path: root/svl
AgeCommit message (Collapse)AuthorFilesLines
2017-12-13Determine possibly localized keywords early and onceEike Rathke1-62/+69
.. 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>
2017-12-13Resolves: tdf#114185 force KeywordLocalization::LocaleLegacyEike Rathke1-0/+4
... in GetPreviewStringGuess() that is used in Calc TEXT() spreadsheet function, if the format code didn't resolve as English or the format code needs to be (re)parsed otherwise as locale dependent. Also SvNumberFormatterServiceObj::convertNumberToPreviewString() (XNumberFormatPreviewer::convertNumberToPreviewString()) if bAllowEnglish==true. Change-Id: I7c4b1a610d2bcb20fe0f0ae06efc81f998cae048 (cherry picked from commit b2cd9dd31183c45942c2f522104654ff1f8e6889) Reviewed-on: https://gerrit.libreoffice.org/46352 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2017-12-13Prepare ImpSvNumberformatScan with KeywordLocalization context, tdf#114185Eike Rathke2-93/+130
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>
2017-11-28Make SvNumberFormatter public methods threadsafeDennis Francis1-0/+67
This is a requirement due to the recent threading work done on calc formulagroup interpreter. Change-Id: I5d567b4b957a4d86303f6a86b14d1cbfc730beda Reviewed-on: https://gerrit.libreoffice.org/45085 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Dennis Francis <dennis.francis@collabora.co.uk> (cherry picked from commit b1f829dae5cacc595f78c9647ce8487ca22225af) Reviewed-on: https://gerrit.libreoffice.org/45328 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2017-11-24Clarify commentTor Lillqvist1-1/+2
Change-Id: I1f0d23cbda3d6729cc858e6bcba4c60fe44bab69
2017-11-23loplugin:simplifybool can't invert conditions involving float typesNoel Grandin1-1/+1
so revert some of the changes from commit 7a1c21e53fc4733a4bb52282ce0098fcc085ab0e loplugin:simplifybool for negation of comparison operator Change-Id: I937d575b86c1e418805d399b0dc16ae91876b4fe Reviewed-on: https://gerrit.libreoffice.org/45130 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-23loplugin:simplifybool for negation of comparison operatorNoel Grandin3-4/+4
Change-Id: Ie56daf560185274754afbc7a09c432b5c2793791 Reviewed-on: https://gerrit.libreoffice.org/45068 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-21Introduce ScInterpreterContextTor Lillqvist1-0/+2
Possibly later things that need to be thread-local can be handled through the ScInterpreterContext. Why handle some thread-local things through the ScDocument::maNonThreaded and ScDocument::maThreadSpecific mechanism, and others through this ScInterpreterContext? Good question. Share SvNumberFormatter across worker threads and use mutex to protect SvNumberFormatter::IsNumberFormat() Change-Id: I372e5fbd9a19785f55f0faf4a4bedc5fc1ef3e03
2017-11-20cosmetics: Drop duplicate semicolonTakeshi Abe1-2/+2
Change-Id: I96d2ffb903f9ed15070572552c9564b5089df12f Reviewed-on: https://gerrit.libreoffice.org/44914 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-11-17Resolves: tdf#113889 no date particle reordering when exporting to ExcelEike Rathke3-5/+12
Change-Id: I45667a67c6c69106d86755ed41438f23e019dfea
2017-11-14Translate German variable namesJohnny_M1-8/+8
Change-Id: I980d9e36c2175b1010a7d020e71d59a79e11dc36 Reviewed-on: https://gerrit.libreoffice.org/44631 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-11-09rename AvoidConfig to FuzzingCaolán McNamara1-1/+1
cause that's what its really used for and a couple of cases are not specifically about avoiding config but avoiding uninteresting disk acccess and what not Change-Id: I4c6454f98388579fcd0bf9798321d30408ab65ee Reviewed-on: https://gerrit.libreoffice.org/44491 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-03loplugin:constparam in vcl,svtoolsNoel Grandin2-2/+2
Change-Id: I7a3eb2bfda869e9e66db919f929ead60cf8890a4 Reviewed-on: https://gerrit.libreoffice.org/44209 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-02improve constparam lopluginNoel Grandin1-1/+1
lots of little fixes to make the logic less pessimistic Change-Id: If368822984250b11b98c56f5890177a1402e8660 Reviewed-on: https://gerrit.libreoffice.org/44168 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-01passwordcontainer.hxx is only included from svl/source/passwordcontainerStephan Bergmann2-5/+5
...but itself includes svl/source/passwordcontainer/syscreds.hxx, which only happens to work because of -I$(dir $(3)) in gb_CObject__command_pattern (in solenv/gbuild/platform/com_{GCC,MSC}_class.mk). Clean that up by moving the file. Change-Id: I7a04f757becf8113d1dccae9b78870e57ad3fbe5 Reviewed-on: https://gerrit.libreoffice.org/44171 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-01QA test of StandardColorLaurent BP3-0/+39
Change-Id: Ib5b414d533ea3dcce55f4e6a02f329e98acf6e83 Reviewed-on: https://gerrit.libreoffice.org/43791 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-11-01Make StandardColor and sErrStr staticLaurent BP3-21/+34
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>
2017-11-01Use std::unique_ptr moreMike Kaganski1-86/+65
Change-Id: I0340a3d0a5dec4f88c78cb1e0eff9d981761ac7e Reviewed-on: https://gerrit.libreoffice.org/44127 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-10-31loplugin:constantparam in svl,svtoolsNoel Grandin3-15/+4
Change-Id: I0d7c1dff2646e483c866f547224c60838b221c4b Reviewed-on: https://gerrit.libreoffice.org/44083 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-28TSCP: store and retrieve signature timestampAshod Nakashian1-1/+49
When TSA is provided, we can now store and retrieve the signing timestamp. Currently this is only implemented on Windows, thought. Change-Id: I657fa7a88623713483d0d6d88e4bc201142f47c4 Reviewed-on: https://gerrit.libreoffice.org/43988 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2017-10-28clang-tidy modernize-use-equals-default in svlJochen Nitschke12-68/+2
SfxPoolItem has a copy constructor and its copy assignment operator is deleted. Derived classes have a implicit defined copy constructor too, if all members are copy constructible. This patch removes default able copy constructors on such items. Note: clang-tidy only finds functions defined in source, inlined functions in headers are picked manualy. Change-Id: I7e642a2ecf139420c53f6fcb39208918dd1a8d52 Reviewed-on: https://gerrit.libreoffice.org/43003 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-27Handle decimalSeparatorAlternative in SvNumberFormatter parsing, tdf#81671Eike Rathke2-2/+26
Change-Id: Ic10aa36805ec4214f7ac54529fb391cf1e390a70
2017-10-26loplugin:constmethod in svlNoel Grandin11-56/+56
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>
2017-10-25Eliminate deprecated SvNumberFormatter::GetDecSep()Eike Rathke1-5/+0
Was only one call left.. Change-Id: I140099d77e762e53579b2a5954fe4c59855104da Reviewed-on: https://gerrit.libreoffice.org/43798 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2017-10-24loplugin:finalclasses in sfx2..svlNoel Grandin1-5/+3
Change-Id: I71b78135b3d0259657438c4401340bb35ab5c6e0 Reviewed-on: https://gerrit.libreoffice.org/43742 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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