summaryrefslogtreecommitdiff
path: root/include/svl
AgeCommit message (Collapse)Author
2018-03-12loplugin:redundantfcast look for redundant copies in return statementsNoel Grandin
Change-Id: I5f416c865dfe1c36018784246a8007452eb42008 Reviewed-on: https://gerrit.libreoffice.org/50996 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-08loplugin:unusedmethodsNoel Grandin
Change-Id: Id6b4edd265cb6bef31c72e2a0a440211d51c7c33 Reviewed-on: https://gerrit.libreoffice.org/50900 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-23StyleSheetUser use in dynamic_cast should better be SAL_DLLPUBLIC_RTTIStephan Bergmann
...so that the dynamic_cast is guaranteed to work on macOS (where RTTI equivalence is determined by address, not by strcmp). The relevant dynamic_cast is in SdStyleSheet::IsUsed in sd/source/core/stlsheet.cxx, and at least during a `make check` it appears to only be fed SdStyleSheet instances derived from StyleSheetUser (and SdStyleSheet is also defiined in Library_sd, so the dynamic_cast happens to work fine also on macOS in that case). But better be conservative and mark StyleSheetUser as SAL_DLLPUBLIC_RTTI after all. Change-Id: I760f58357b7fe3b4826ea496934e03da3499419e Reviewed-on: https://gerrit.libreoffice.org/50246 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2018-02-16ofz#6311 still problems with SdrEdgeObj listening to same obj at start as endCaolán McNamara
Change-Id: Ibd80b484788779b73943b28a5f36e51ebcacec30 Reviewed-on: https://gerrit.libreoffice.org/49821 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-07tdf#115483 svl xmloff sc sw: verify all ODF 1.2 protection-key hashesMichael Stahl
ODF 1.2 has added some mandatory requirements for protection-key hashes which did not exist in ODF 1.1. This affects sections and indexes in ODT documents, as well as spreadsheets and sheets in ODS documents. 1. Accept the following hashed passwords: * UTF16 LE/BE encoded StarOffice-SHA1, OOo legacy and allowed by ODF 1.1 * UTF8 encoded proper SHA1, as required by ODF 1.2 * UTF8 encoded SHA256, as required by ODF 1.2 - specified either with the wrong URL used in the ODF 1.2 spec or the correct URL from the W3C spec, see OFFICE-3702 * Excel+SHA1 double-hash, only in Calc, see OFFICE-2112 2. Round-trip any of the above as-is * for SHA256 only write the URL from the ODF 1.2 spec 3. Generate only UTF16 LE encoded SHA1 for now, so that older LO releases can still verify the password * some time in the future, switch to generating some valid ODF 1.2 hash More changes are necessary in Calc, which can actually preserve different hashes for the same passwords in its runtime data model, whereas Writer just has a single buffer without even any metadata. For the Calc unit tests we need one document per hash because the protection-key attribute can be set on the entire spreadsheet, which is an unique element in the document. There are further uses of SvlPasswordHelper for change-tracking passwords, but apparently those are stored in settings.xml, so ODF has no requirements for them, so let's leave that as it is. Change-Id: Icb720b14ae9c0d9c04d2e082769ae2b74e3af8aa Reviewed-on: https://gerrit.libreoffice.org/49352 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-02-01split out SFX_METRIC_ITEM into separate fieldNoel Grandin
instead of overloading the nMemberId field and thus fix various places that were effectively setting the METRIC flag and causing a warning in SvxUnoConvertToMM And fix bug in sw/source/core/unocore/unomap.cxx where the PropertyAttribute::READONLY was in the wrong place, ever since commit 84a3db80b4fd66c6854b3135b5f69b61fd828e62 Date: Mon Sep 18 23:08:29 2000 +0000 initial import Change-Id: Ifc2bf56709f19aea75300b2fda62ce551efc26af Reviewed-on: https://gerrit.libreoffice.org/48950 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-25ofz: out-of-memoryCaolán McNamara
Change-Id: If1c9ade3268f4ebadfdad771fe3b35641dca210d Reviewed-on: https://gerrit.libreoffice.org/48506 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-19Remove include of config_global.h from sal/config.hStephan Bergmann
(where it is not actually needed), and instead include it where needed Change-Id: I107f8d4002d3001393b89834dd30a30b0c53a792 Reviewed-on: https://gerrit.libreoffice.org/48152 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
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-06remove unused definesNoel Grandin
In particular, the STR_SVT_MIMETYPE defines are dead since commit 1b694dad643334ec1bab3f823dcd68f44a05ebe3 Date: Thu Aug 24 22:14:27 2017 +0200 loplugin:unusedmethods Change-Id: I641ec0a14efedc55c9d6a4de4a28784c273602e9 Reviewed-on: https://gerrit.libreoffice.org/47464 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-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-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-19inline use-once typedefsNoel Grandin
Change-Id: I5c3ffc03c26b3428f1f336e6ecba7838a1cf1157 Reviewed-on: https://gerrit.libreoffice.org/46764 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-19loplugin:unusedenumconstantsNoel Grandin
Change-Id: I9dc4b369872a7c6c076ae9be1dcdf2f8385af8a7 Reviewed-on: https://gerrit.libreoffice.org/46684 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-18clear the data provider cache after import, tdf#111960Markus Mohrhard
This might also fix some problems with normal ODS files and not just with FODS files when we recompile formulas after the whole import. Change-Id: Iec05d2052ca5ce3bdf03abf02d502e4537fd3082 Reviewed-on: https://gerrit.libreoffice.org/46672 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
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-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-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-10Bin two comments that say the same as the names of the functions they are forTor Lillqvist
Change-Id: I385e0ae6502eeab9e5cb536c34c64b7fa48442d0 Reviewed-on: https://gerrit.libreoffice.org/46138 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
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-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-28loplugin:countusersofdefaultparams in sfx2..svtoolsNoel Grandin
Change-Id: I65ae5305f9cec14069fd7aef6613e981dbbed846 Reviewed-on: https://gerrit.libreoffice.org/45382 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-28tdf#83877 OOXML Roundtrip of SignatureLine propertiesSamuel Mehrbrodt
Change-Id: I521e5f35663c5ab3c2702f1416fcec872f2f5e3f Reviewed-on: https://gerrit.libreoffice.org/44683 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
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-20clang-format: enforce coding style via JenkinsMiklos Vajna
- factor out common code to a shared module, and quote path to the clang-format binary, just in case. - add a new check-last-commit script that is the CI equivalent of the exiting git pre-commit hook, but this one handles lack of clang-format as an error, not as a warning. - $LODE_HOME/opt/bin is supposed to be in PATH already, so not mentioning LODE_HOME in ClangFormat::find() explicitly. - if both COMPILER_PLUGINS and LODE_HOME is set, invoke solenv/clang-format/check-last-commit as part of 'make check' To test these changes as part of CI, fix a single style violation in an already committed, non-blacklisted file. This depends on the lode.git commit 496123bcae28e06c6d6aeda39a5afd1e1fb1fd98 (utils_Linux: install clang-format in the Jenkins case, 2017-11-16), otherwise erroring out on a not installed clang-format as part of the build would be a problem. Change-Id: Ib3110826194ff78a7f1bed1c3796147e92ccb3ba Reviewed-on: https://gerrit.libreoffice.org/44939 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-11-20TypedWhichId for XATTR* constantsNoel Grandin
Change-Id: Ie9d637d701b77a549de3b00956f9c74ee8bd08c1 Reviewed-on: https://gerrit.libreoffice.org/44830 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-17Resolves: tdf#113889 no date particle reordering when exporting to ExcelEike Rathke
Change-Id: I45667a67c6c69106d86755ed41438f23e019dfea
2017-11-16use implict conversion operator in TypedWhichIdNoel Grandin
instead of spreading calls to Which() everywhere. Change-Id: Ie32d106e44f5cb583908eeebe254ab8b8168ae61 Reviewed-on: https://gerrit.libreoffice.org/44760 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-15update license header on new fileNoel Grandin
I just copied the license header from a nearby file, which is wrong, so update from template. Change-Id: I96d2a8a29eff9020a23b1ccded8642d2f5d0968b
2017-11-15TypedWhichIdNoel Grandin
use a strong-typedef template to give which IDs a type, which we can carry around to do a (a) little bit more convenience when Get()'ing them and (b) a little bit of enforcement of which PoolItem subclass each ID uses Fix a bug in casting EE_PARA_BULLETSTATE to the wrong subclass in AccessibleEditableTextPara::_correctValues Change-Id: I015ce8b3b0f6d21308af182afa3caf122c877a5b Reviewed-on: https://gerrit.libreoffice.org/44587 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-08sw lok: add Accept/Reject All tracked changes, tdf#101977Henry Castro
Change-Id: I04d747343e24cb498a621c965d034d0791411d83 Reviewed-on: https://gerrit.libreoffice.org/44311 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Henry Castro <hcastro@collabora.com>
2017-11-03[API CHANGE] tdf#65393 Import signature line images from ooxmlSamuel Mehrbrodt
showing whether the signature behind the signature line is valid or not. Change-Id: Ia6cca62812019f26d55d234cac767a9b4b7c8175 Reviewed-on: https://gerrit.libreoffice.org/40980 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
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-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-10-31loplugin:constantparam in svl,svtoolsNoel Grandin
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-28clang-tidy modernize-use-equals-default in svlJochen Nitschke
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 Rathke
Change-Id: Ic10aa36805ec4214f7ac54529fb391cf1e390a70
2017-10-26loplugin:constmethod in svlNoel Grandin
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 Rathke
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>