summaryrefslogtreecommitdiff
path: root/svl
AgeCommit message (Collapse)Author
2018-01-13loplugin:useuniqueptr in svlNoel Grandin
Change-Id: I89aa05b3c59ca3ad680d35899400957a399ccf0e Reviewed-on: https://gerrit.libreoffice.org/47795 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-12More loplugin:cstylecast: svlStephan Bergmann
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: I71e3b2c9b4c68183288f43999d242e95ae13584d
2018-01-11loplugin:useuniqueptr in svlNoel Grandin
Change-Id: I2fdb63517349474d90cb17ad2bd667f30840e83d Reviewed-on: https://gerrit.libreoffice.org/47727 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-09loplugin:convertlong in ucb,sotNoel Grandin
Change-Id: I6fa355448834701f11b84584649dfcdecd0f7b2c Reviewed-on: https://gerrit.libreoffice.org/47596 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-05Revert "GetTrueSlotId is dead"Noel Grandin
This reverts commit 4f11182566b02f9f1c1821985a94b4b4de363fbb. Turns out I was wrong, there are tons of place defining slotid<->whichid mappings. Change-Id: I2a124ecba02c45f14ee917727adb993c39994881 Reviewed-on: https://gerrit.libreoffice.org/47454 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-04GetTrueSlotId is deadNoel Grandin
The only place is is used is ConvertAndPutItems. Which only loops over EE_PARA* which ids. But the only things which define slotid<->whichid mappings are XATTR*, SDATTR*, SCHATTR*. Which means that this code ConvertAndPutItems is dead, and that is the last place using GetTrueSlotId. Change-Id: I3037c25c2c15087572abacc9642970936824678d Reviewed-on: https://gerrit.libreoffice.org/47377 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-04loplugin:unusedfieldsNoel Grandin
fix the ReturnStmt check Change-Id: I95076076bd1313d23798c4615ea12910c86ed9a8 Reviewed-on: https://gerrit.libreoffice.org/47309 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-24loplugin:passstuffbyref even more return improvementsNoel Grandin
Change-Id: I2a752025cd429e4d271626402dce5d8a8b0c76d2 Reviewed-on: https://gerrit.libreoffice.org/47021 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-23loplugin:passstuffbyref improved returns in vclNoel Grandin
Change-Id: I0b103df2e7ce59093869f547225c95865d33da27 Reviewed-on: https://gerrit.libreoffice.org/46916 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-22lokdialog: Allow switching language of some of the ResMgr's.Jan Holesovsky
This way, it is possible to have all the strings translated in dialogs even when different users use different languages. [It was already possible to have different languages previously, but not everything in the dialog has switched - like the buttons at the bottom of the dialogs etc.] Change-Id: I29a5ae6d31a370eec60397884200b684ec1bf5b9 Reviewed-on: https://gerrit.libreoffice.org/46417 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/46979 Tested-by: Jenkins <ci@libreoffice.org>
2017-12-22request installation of langpack via packagekitCaolán McNamara
if ui is set to track the locale automatically and the current locale has no match in installed resources but has a match in the list of languages that libreoffice was compiled to contain so e.g. de_AT locale shouldn't trigger the installation of anything if langpack-de is already installed and yue_HK shouldn't trigger install of anything cause that not supported (at time of writing) for libreoffice put Fedora/RHEL/Ubuntu naming schemes in here. I moved the lang code from svl to svtools so I could use the restart dialog to prompt to restart after the langpack is installed, but packagekit's blocking mode seems to be no longer blocking and control returns immediately which is a change since the last time I played with this stuff, so drop the restart thing for now. The lack of a blocking modal also makes the "run this on idle when there's a toplevel window up and running" a bit futile, but lets keep that for now anyway. caolanm->rene: I know you'd disable this anyway, so Debian is left out, there's also config key Office/Common/PackageKit/EnableLangpackInstallation to disable this too. Change-Id: Ice731be539850338ccdd8af87839e0b4d83f01e7 Reviewed-on: https://gerrit.libreoffice.org/46856 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-21new loplugin: convertlongNoel Grandin
merge the droplong and convertuintptr into one new plugin. Limit the analysis to looking at var decl's, since that seems to be safest proposition, even if that too needs some careful analysis. Change-Id: Id005baaf05cfb157ce44a06a1c81f08559a07d1f Reviewed-on: https://gerrit.libreoffice.org/46851 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-20Fix typosAndrea Gelmini
Change-Id: I361b5283b092171eaaaf46fa3c1fb13faa53bd7a Reviewed-on: https://gerrit.libreoffice.org/46821 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-19wrap scoped enum around css::util::NumberFormatNoel Grandin
Change-Id: Icab5ded8bccdb95f79b3fa35ea164f47919c68fa Reviewed-on: https://gerrit.libreoffice.org/46339 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-12-19svl: Fix possible memleak at deleting DdeServiceTakeshi Abe
Change-Id: Ie10d4199999c4331af29dee2a8d98132488caa6e Reviewed-on: https://gerrit.libreoffice.org/44909 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-16Move init of keywords around, preset with English, localized case by caseEike Rathke
This way we can't forget an sKeyword element and need to care only about the exceptions. Adds a slight penalty for German in that it has 25 keywords initialized twice, but.. Change-Id: I99ba228ef8b1517a32ce98a9c79cfbe2b1d0b340 Reviewed-on: https://gerrit.libreoffice.org/46575 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-12-14Also EnglishKeywords is a NfKeywordTable, not just some vectorEike Rathke
Change-Id: I0683fe5f7632e9941f347773c2679af82421bdc4 Reviewed-on: https://gerrit.libreoffice.org/46455 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-12-14Naming nitpicks, r... for referenceEike Rathke
Change-Id: I1d169590302067fdcb3fe8ecc1cf5dea8f766a02
2017-12-14No need to keep these whitelisted functions decorated with SAL_CALLStephan Bergmann
The only effect SAL_CALL effectively has on LO-internal code is to change non- static member functions from __thiscall to __cdecl in MSVC (where all other functions are __cdecl by default, anyway). (For 3rd-party code, it could be argued that SAL_CALL is useful on function declarations in the URE stable interface other than non-static member functions, too, in case 3rd-party code uses a compiler switch to change the default calling convention to something other than __cdecl. But loplugin:salcall exempts the URE stable interface, anyway.) One could argue that SAL_CALL, even if today it effectively only affects non- static member functions in MSVC, could be extended in the future to affect more functions on more platforms. However, the current code would already not support that. For example, 3af500580b1c82eabd60335c9ebc458a3f68850c "loplugin:salcall fix functions" changed FrameControl_createInstance in UnoControls/source/base/registercontrols.cxx to no longer be SAL_CALL, even though its address (in ctl_component_getFacrory, in the same file) is passed to cppuhelper::createSingleFactory as an argument of type cppu::ComponentInstantiation, which is a pointer to SAL_CALL function. Change-Id: I3acbf7314a3d7868ed70e35bb5c47bc11a0b7ff6 Reviewed-on: https://gerrit.libreoffice.org/46436 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-14Move GetKeywords() and related from SvNumberformat to SvNumberFormatterEike Rathke
... as especially the keywords are controlled by the current state (locale) of the ImpSvNumberformatScan instance and *not* a property of SvNumberformat. Add a clarifying descriptive comment as well, and outline it's only for the unit tests anyway.. Change-Id: I732918026bf9ffc25db11033d5f10bc2f51e3505 Reviewed-on: https://gerrit.libreoffice.org/46426 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-12-13tools: remove unused #include from solar.hMichael Stahl
Change-Id: I214e13add371380701ae39403d90a574a63e495d
2017-12-13Blind fix for ambiguous CPPUNIT_ASSERT_EQUALStephan Bergmann
Change-Id: Ia0730cfd2293c374ec8b8f4aa69fef5d319642e4
2017-12-13Unit test testUserDefinedNumberFormats()Eike Rathke
Change-Id: Ic908af0bf5cbd83fab7bbf2d2f37a1b51bc5e32a
2017-12-13German super cow colors, conversion doesn't need a locale switchEike Rathke
Change-Id: I86a8bb7d345e707ad45693e997aa18bac7ce8825
2017-12-12use a mutex per instance for SvNumberFormatterNoel Grandin
instead of one mutex for all instances. We still keep the global mutex for some operations because there are some shared global data structures. Change-Id: Ic1106baa23d4ade18dbd732ad74979f3996f326b Reviewed-on: https://gerrit.libreoffice.org/46304 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-12-12Determine possibly localized keywords early and onceEike Rathke
.. instead of in every GetKeyWord() call, and force to EnglishOnly if there aren't. Change-Id: I56941298c0e02d041b80cdb5805905e24116405e
2017-12-12Resolves: tdf#114185 force KeywordLocalization::LocaleLegacyEike Rathke
... 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
2017-12-12Prepare ImpSvNumberformatScan with KeywordLocalization context, tdf#114185Eike Rathke
Change-Id: I3942a7de52bcedf491da83407791fcd0080aaf4d
2017-12-11loplugin:salcall fix functionsNoel Grandin
since cdecl is the default calling convention on Windows for such functions, the annotation is redundant. Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d Reviewed-on: https://gerrit.libreoffice.org/46164 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-08SvNumberFormatter::GetType() constEike Rathke
Change-Id: Id5392ec8996d157ac1be21cb24f0ab7fff18df27
2017-12-08use std::unique_ptr in SvNumberFormatterNoel Grandin
Change-Id: I78f83c427c3df16e26fbe3d8a3e00a1279e5ed2d Reviewed-on: https://gerrit.libreoffice.org/46028 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-07lokit: add .uno:DocumentRepair commandHenry Castro
Change-Id: I5b13ea6f4785bc91c29111fa63c4a1b0ea9b2660 Reviewed-on: https://gerrit.libreoffice.org/38908 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Henry Castro <hcastro@collabora.com>
2017-12-07loplugin:salcall handle static methodsNoel Grandin
Change-Id: Id6820abec4b8ca8bee26d62b333fd30b42a14aec Reviewed-on: https://gerrit.libreoffice.org/46007 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-02Get rid of the css::util::NumberFormat::TEXT abuse as "special" "key"Eike Rathke
It is a bit, not a key, which demanded special treatment at all places, and a key with the same value could not be handled at all. Abusing the css::util::NumberFormat::TEXT flag as number format key to signal the "special" meaning, having a number format key equal to that value would had resulted in undesired behaviour. The bit value is 256 and a key 256 means 156 user defined number formats in the default locale, rarely in the wild but can happen. Change-Id: Idfd5b07d524c222df3491d201095ef65ad4a46c9 Reviewed-on: https://gerrit.libreoffice.org/45705 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-11-29loplugin:unnecessaryparen (clang-cl)Stephan Bergmann
Change-Id: I3a2b7ed3fdef3b77c0a052b10f88918aa616779e Reviewed-on: https://gerrit.libreoffice.org/45469 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-27loplugin:unnecessaryparen check for (f1()).f2Noel Grandin
Change-Id: I93257b0ddd41c649875124d6d5c5faeaa431bae3 Reviewed-on: https://gerrit.libreoffice.org/45218 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-27Make SvNumberFormatter public methods threadsafeDennis Francis
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>
2017-11-24Clarify commentTor Lillqvist
Change-Id: I1f0d23cbda3d6729cc858e6bcba4c60fe44bab69
2017-11-23loplugin:simplifybool can't invert conditions involving float typesNoel Grandin
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 Grandin
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 Lillqvist
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 Abe
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 Rathke
Change-Id: I45667a67c6c69106d86755ed41438f23e019dfea
2017-11-14Translate German variable namesJohnny_M
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 McNamara
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 Grandin
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 Grandin
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 Bergmann
...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 BP
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 BP
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>