summaryrefslogtreecommitdiff
path: root/svx/source/items
AgeCommit message (Collapse)Author
2019-07-09Simplify Sequence iterations in svxArkadiy Illarionov
Use range-based loops, STL and comphelper functions Change-Id: If6d190cf72b8653c1c3fbe9a6a6e47f10f1a6765 Reviewed-on: https://gerrit.libreoffice.org/75255 Tested-by: Jenkins Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
2019-05-27tdf#42949 Fix IWYU warnings in include/svx/[sS][a-h]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I84fc75e06e61e5391aef6e237c36daad95dedb84 Reviewed-on: https://gerrit.libreoffice.org/72550 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-05-18Resolves: tdf#125104 crash on getting text desc of numberingCaolán McNamara
this seems to have been wrong for a very long time, but we used to get away with it back in the .src era with presumably amusingly random strings from other parts of the ui shown in the summary of changes are of the organizer page of the dialog Change-Id: If223182170ba8519d7899f8044f01c2a12f4e391 Reviewed-on: https://gerrit.libreoffice.org/72490 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-18Adapt AutoFormatHelper to std::unique_ptrArmin Le Grand
Change-Id: I3087a7e95e73dbcda798ca62705f7941a6466ccb Reviewed-on: https://gerrit.libreoffice.org/72401 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2019-05-16tdf#42949 Fix IWYU warnings in include/svx/[e-g]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I861d3f0fa15ee3b7e0e830c4fac2e5794ea4071b Reviewed-on: https://gerrit.libreoffice.org/72213 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2019-05-10tdf#62699 Drop pass-through header file include/svx/svdattr.hxxGabor Kelemen
Change-Id: I04289589196ac69b31f75989d9252c79d03c890f Reviewed-on: https://gerrit.libreoffice.org/71633 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-05-03Use hasElements to check Sequence emptiness in sfx2..svxArkadiy Illarionov
Similar to clang-tidy readability-container-size-empty Change-Id: Icabd773f3b924d465b33e8581175f1fcf70c282e Reviewed-on: https://gerrit.libreoffice.org/71704 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-27Removed executable permission on source filesAndrea Gelmini
Change-Id: Iaafc0f45282b0351c24b4ddc433ed1086177ff73 Reviewed-on: https://gerrit.libreoffice.org/71400 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2019-04-26Removed executions flags on source filesAndrea Gelmini
Change-Id: I165d417a8e28d5732945722158b83e2ac5edb402 Reviewed-on: https://gerrit.libreoffice.org/71388 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-04-25WIP: Further preparations for deeper Item changesArmin Le Grand
(1) Migrated all still existing binary load/save stuff in SfxPoolItem to legacy files. Isolated from Item implementations. Adapted all usages. No more methods Create/Store needed, also GetVersion removed (2) Removed operator= for SfxPoolItem. Adapted all usages. Goal ist to handle Items more as Objects ('Object-Oriented') in the sense to move/handle instances, not to copy one instance over another one (which is more and more problematic with hard to copy content as UNO API stuff or similar). This lead to much more usages of std::shared_ptr which correlates well with future plans fr Items (see dev branch). Next logic step will be to also remove copy constructor Linux build and corrections done Fixed Writer test and removed unused defines Fixed another unused m,acro Started to unify the AutoFormat stuff Changes to OUString constructor usages, tests completely No idea why, but SfxStringItem constructor which takes a OUString& now insists of not getting ::OUString's handed in - changed all 'SfxStringItem.*OUString.*".*"' accordingly Change-Id: Ibed7358b18fb019994a7490332b9d797a6694c29 Reviewed-on: https://gerrit.libreoffice.org/71075 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2019-04-15improve loplugin simplifyconstructNoel Grandin
to find stuff like OUString s = OUString("xxx") Change-Id: Ie7ed074c1ae012734c67a2a89c564c1900a4ab04 Reviewed-on: https://gerrit.libreoffice.org/70697 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-22loplugin:unusedfields in svxNoel Grandin
Change-Id: I9f6a21066224c449d3fcc8a0d97cb32dae0a65f6 Reviewed-on: https://gerrit.libreoffice.org/68193 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-09Resolves: tdf#123122 category is just one bit, date+time is two bits setEike Rathke
DATE|TIME != DATE ... Regression from commit e85966450b770e1169f113183ce1a9a9f4dcc507 CommitDate: Wed Oct 3 12:08:55 2018 +0200 Related: tdf#119613 tdf#118127 suppress duplicated builtins, rework All cat Change-Id: If500dbeae00805f04f61586730479901b27d3901 Reviewed-on: https://gerrit.libreoffice.org/67554 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2019-01-16Resolves: tdf#122509 we have a second list with generated currency formatsEike Rathke
... which kicks in if SvxNumberFormatShell::FindEntry() determined a format index of NUMBERFORMAT_ENTRY_NEW_CURRENCY instead of a real existing index. Regression from commit e607f1da329a2d4dd91904053d7ff86ac05c77bf CommitDate: Thu Oct 4 15:02:13 2018 +0200 Select the current format if multiple instead of first matching format code The old (now removed as unused) SvxNumberFormatShell::GetListPos4Entry(const OUString&) used before took care of that, add the functionality back but combine into the existing GetListPos4Entry() function, the additional FindEntry() call wasn't necessary anyway because it was just called before in the caller. The actual crash happened elsewhere in SvNumberFormatter::GenerateFormat() because no format exists for the then determined entry, which should be changed independently to prevent such abuses. Change-Id: Id42efa152693119fbde82b234f367679f818cfab Reviewed-on: https://gerrit.libreoffice.org/66472 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2018-12-08Remove obsolete SAL_FALLTHROUGH completelyStephan Bergmann
...after 7ffdd830d5fb52f2ca25aa80277d22ea6d89970b "HAVE_CPP_ATTRIBUTE_FALLTHROUGH is always true now" Change-Id: I54e5ff4e036a6bb3e5774d1c0524158aae18e937 Reviewed-on: https://gerrit.libreoffice.org/64800 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-11-26add dumpAsXml methods to more pool itemsMarkus Mohrhard
Change-Id: Ia33ac2dfa23bdc4e2990e6d028d1bae7fedfe4f5 Reviewed-on: https://gerrit.libreoffice.org/63853 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-11-19Simplify containers iterations in svx/source/[f-i]*Arkadiy Illarionov
Use range-based loop or replace with STL functions Change-Id: Icd11c895b7eca5ad438a8b0e29a762bb22d43b1b Reviewed-on: https://gerrit.libreoffice.org/63531 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-14tdf#42949 Fix IWYU warnings in include/svl/*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ide75232858599c275e023c2300201090acd22307 Reviewed-on: https://gerrit.libreoffice.org/63237 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-11-05tdf#120703 PVS: V547 Expression is always true/falseMike Kaganski
Change-Id: If748a205b328a23473152872c6d0ed87d0570cc1 Reviewed-on: https://gerrit.libreoffice.org/62857 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-11-03tdf#120703 PVS: V547 Expression is always true/falseMike Kaganski
Change-Id: I75082c85862b83ed2503900186ce9c70783e54db Reviewed-on: https://gerrit.libreoffice.org/62817 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-26tdf#42949 Fix IWYU warnings in include/unotools/*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I444c43b9d549977039f25bec2b5bf666c3e15e0e Reviewed-on: https://gerrit.libreoffice.org/62041 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-10-24remove more rtl::OUString and OString prefixesNoel Grandin
which seem to have snuck back in since the great rounds of removals. Change-Id: I85f7f5f4801c0b48dae8b50f51f83595b286d6a1 Reviewed-on: https://gerrit.libreoffice.org/62229 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-18clang-tidy readability-simplify-boolean-exprNoel Grandin
Change-Id: I78fa01a6c803dec782488490b730af3a11814d64 Reviewed-on: https://gerrit.libreoffice.org/61902 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-09Extend loplugin:redundantinline to catch inline functions w/o external linkageStephan Bergmann
...where "inline" (in its meaning of "this function can be defined in multiple translation units") thus doesn't make much sense. (As discussed in compilerplugins/clang/redundantinline.cxx, exempt such "static inline" functions in include files for now.) All the rewriting has been done automatically by the plugin, except for one instance in sw/source/ui/frmdlg/column.cxx that used to involve an #if), plus some subsequent solenv/clang-format/reformat-formatted-files. Change-Id: Ib8b996b651aeafc03bbdc8890faa05ed50517224 Reviewed-on: https://gerrit.libreoffice.org/61573 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-10-09loplugin:unusedmethodsNoel Grandin
Change-Id: Icd7a0f9909f36363b307b4fe7ee920183881afbb Reviewed-on: https://gerrit.libreoffice.org/61576 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-04Reformat this eye-cancer causing messEike Rathke
A mix of clang-format and manual. Change-Id: Ice3d96d1400329fc7386e2d4544c69641658600f
2018-10-04Select the current format if multiple instead of first matching format codeEike Rathke
This never worked.. Change-Id: I79b8687dde4faac383121abeda70931d0192b33d Reviewed-on: https://gerrit.libreoffice.org/61290 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2018-10-03Related: tdf#119613 tdf#118127 suppress duplicated builtins, rework All catEike Rathke
In number formatter dialog: Some locales may define duplicated formats, specifically date formats, for all builtin formats <50 must be present and default formats may be equal to other formats. Try to suppress duplicated formats, preferring those that are essential (i.e. used as current, default or edit formats). This is done only per category, not in the All category. Example is [en-ZA] English (South Africa) that now has ISO 8601 also as default date+time format, though there only the date+time format is suppressed because for date we want to keep both the locale's default and the fixed ISO format pickable. The All category still listed the since long deprecated old currency formats including the worrying CCC format that follows the current default currency. Eliminate that crap, unless one matches the current format. Also, additional formats defined in locale data and user defined formats were never listed in the All category, do that. Change-Id: I6e6b9bfecc34d51e89930f348f7afbe5e3c41738 Reviewed-on: https://gerrit.libreoffice.org/61275 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2018-10-02Omit deprecated old currency entries for ALL category unless usedEike Rathke
These €0 instead of [$€-407]0 and CCC switching with system instead of [$EUR] They can't even be imported anymore since binfilter is gone, but still could be manually entered. Just don't offer that nonsense. Change-Id: I193eb3a864e192d4d420ac5178bf03296d697761 Reviewed-on: https://gerrit.libreoffice.org/61224 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2018-09-17New loplugin:externalStephan Bergmann
...warning about (for now only) functions and variables with external linkage that likely don't need it. The problems with moving entities into unnamed namespacs and breaking ADL (as alluded to in comments in compilerplugins/clang/external.cxx) are illustrated by the fact that while struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } returns 1, both moving just the struct S2 into an nunnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { namespace { struct S2: S1 { int f() { return 1; } }; } int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } as well as moving just the function f overload into an unnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; namespace { int f(S2 s) { return s.f(); } } } int main() { return f(N::S2()); } would each change the program to return 0 instead. Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c Reviewed-on: https://gerrit.libreoffice.org/60539 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-11loplugin:simplifyconstruct in svtools..svxNoel Grandin
Change-Id: Ia20fac7cec01ac658a903f8b001807b2e72dbf3e Reviewed-on: https://gerrit.libreoffice.org/60316 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-11clang-tidy bugprone-copy-constructor-initNoel Grandin
Change-Id: Idd435b3a4d081f6d3af26ff8add69ad4af50db57 warning: calling a base constructor other than the copy constructor Reviewed-on: https://gerrit.libreoffice.org/60239 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-29Replace find_if with proper quantifier algorithmsArkadiy Illarionov
Change-Id: Icc820a47ac891c358883f9c01224f676c58fdd11 Reviewed-on: https://gerrit.libreoffice.org/59744 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-24pass DelFormats around using std::vectorNoel Grandin
instead of an array and a separate count Change-Id: Ia12a549da7e35092da2db35f8b2b9fc6a9e9c2be Reviewed-on: https://gerrit.libreoffice.org/59506 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-02Add missing sal/log.hxx headersGabor Kelemen
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it. This is a continuation of commit 6ff2d84ade299cb3d14d4110e4cf1a4b8070c030 to be able to remove those unneeded includes. This commit adds missing headers to every file found by: grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG') to directories from stoc to svx Change-Id: If562b1aa1d676d2c1cf513e953238abbb846c65c Reviewed-on: https://gerrit.libreoffice.org/58224 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-31loplugin:returnconstant in svxNoel Grandin
Change-Id: I0cc0c32afa0d735738c6744873f3518a2763821e Reviewed-on: https://gerrit.libreoffice.org/58334 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-25tdf#42949 Remove unnecessary localization headers of svxGabor Kelemen
Found by searching for the header names and the localization functions: git grep -l -e \<svx/dialmgr.hxx\> -e \<svx/strings.hrc\> -e svdglob.hxx | xargs grep -c -e SvxResId -e SvxResLocale -e ImpGetResStr | grep :0$ | grep -v /pch Change-Id: I45c979589165086288030031e713d536005a9833 Reviewed-on: https://gerrit.libreoffice.org/53241 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-04-18tdf#42949 Remove unnecessary localization headers of editengGabor Kelemen
Found by searching for the header names and the localization function: git grep -l -e \<editeng/eerdll.hxx\> -e \<editeng/editrids.hrc\> | xargs grep -c EditResId | grep :0$ | grep -v /pch Change-Id: Ic542ceee09352cb52dcdc9780d4cb1890e02f383 Reviewed-on: https://gerrit.libreoffice.org/53062 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-04-11new loplugin:unusedvariablemoreNoel Grandin
collection of heuristics to look for local variables that are never read from i.e. do not contribute to the surrounding logic This is an expensive plugin, since it walks up the parent tree, so it is off by default. Change-Id: Ib8ba292241bd16adf299e8bba4502cb473513a06 Reviewed-on: https://gerrit.libreoffice.org/52450 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-15More loplugin:cstylecast: svxStephan Bergmann
Change-Id: If370ad12d2885ea9a6348736a3bcab618bc2e6ec
2018-01-12More loplugin:cstylecast: svxStephan 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: I100e6c14cbf1d780f0e5ebca6b0c9e71ce1caaf7
2018-01-03loplugin:passstuffbyref more return improvementsNoel Grandin
slightly less restrictive check when calling functions Change-Id: I35e268ac611797b1daa83777cda02288a635aa32 Reviewed-on: https://gerrit.libreoffice.org/47259 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-02RID_* can be extern global variablesNoel Grandin
no need to access them via methods Change-Id: If0d1a65d6f56ce2fc585749d974ba13c9f2749b2 Reviewed-on: https://gerrit.libreoffice.org/47245 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-13tools: remove unused #include from solar.hMichael Stahl
Change-Id: I214e13add371380701ae39403d90a574a63e495d
2017-10-24loplugin:implicitboolconversionStephan Bergmann
...similar to a2d814ac1d7beb6fbe4b9cb7b75814f4b08b8e59 "loplugin:implicitboolconversion" Change-Id: Id664a066549498548c123e8dbdc68ba43af9348e
2017-10-23loplugin:includeform: svxStephan Bergmann
Change-Id: I4057fe05983fb2b63b592ffd325894c12b9cb5b2
2017-10-05clang-tidy modernize-use-equals-default in svxJochen 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 and destructors on such items. Also removing copy constructors of pool item members SvxClipboardFormatItem_Impl and SvxColumnItem. Change-Id: Ic0f39c992d1fd7b667cb56134fd7c953681a3131 Reviewed-on: https://gerrit.libreoffice.org/43143 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-14improve redundantcast lopluginNoel Grandin
to find c-style casts where the expression is a templated method Change-Id: Ifbd1e2cdc72d906fc95a7ec0f9408c3f6d2a836b Reviewed-on: https://gerrit.libreoffice.org/42275 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-14convert SvxCellOrientation to scoped enumNoel Grandin
Change-Id: Ia4c75c6394b47805f24a7daca593e0074a8ddf0b Reviewed-on: https://gerrit.libreoffice.org/42268 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>