Commit Graph
693 Commits
Author SHA1 Message Date
Noel Grandin 63c6668f06 loplugin:virtualdown in svl,svtools
I expect a lot of the overriding methods will be removed as soon as I
run the unusedmethods plugin

Change-Id: I4fb228724fcfba51a98d2113efb93cec1bc15c7c
Reviewed-on: https://gerrit.libreoffice.org/52006
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-29 08:35:23 +02:00
Johnny_M f584f2515b Translate German variable names
Akt -> Current in svl/style

Change-Id: Id6f8f7b09a8ae1768708d9fd5d11003fef1e2e42
Reviewed-on: https://gerrit.libreoffice.org/51798
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2018-03-28 18:14:20 +02:00
Noel Grandin 3acc5a2383 tdf#69977 improve creation of large charts
this patch only tweaks a few things around the edges. The bulk of the
cost is down in the chart2 module where it creates ticks and labels.

Change-Id: If73a16d2f0a7511f07eff379a9b5c1b38ef96786
Reviewed-on: https://gerrit.libreoffice.org/51931
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-27 13:26:30 +02:00
Mike Kaganski f1779e0e4b Remove redundant assert
We had just returned on this condition

Change-Id: I822a4fe62e24442800ca17b404862818095e641d
Reviewed-on: https://gerrit.libreoffice.org/51685
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-03-21 10:16:38 +01:00
Noel Grandin 866e17cfdb no need to construct a new object in SfxIntegerListItem::operator==
looks like an obvious typo

Change-Id: Icea0952ec8203725cf5ba1ec90bdddd82eca7b3c
Reviewed-on: https://gerrit.libreoffice.org/51562
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-20 07:50:03 +01:00
Johnny_M 0ff6102300 Translate German variable names
Akt -> Current in itemset

Change-Id: I22f24505c220775fcbbcc64f6fdfc529c772dbe9
Reviewed-on: https://gerrit.libreoffice.org/50312
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-02-26 11:45:00 +01:00
Noel Grandin 6a579702b1 loplugin:flatten in svl
Change-Id: Id5c62c00aa8349468c0d547616424b2637533e7f
Reviewed-on: https://gerrit.libreoffice.org/48485
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-25 07:24:09 +01:00
Noel Grandin 945a119675 loplugin:constparams
Change-Id: I7c695073d9a9d3b7a641d6eb9fe01a47d8c3a504
Reviewed-on: https://gerrit.libreoffice.org/48392
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-24 07:56:57 +01:00
Stephan Bergmann ce84922f7b Assume this wants to SAL_WARN for the sal_uInt16 range, actually
Change-Id: Icdda5cbc39fc2878c869ec01349135fd56a15363
Reviewed-on: https://gerrit.libreoffice.org/48349
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-23 07:57:29 +01:00
Stephan Bergmann 6a6cf93ace More loplugin:cstylecast: svl
Change-Id: Ida9c41fab0b8b3e91d710434028dd648e6d4b135
2018-01-15 09:02:51 +01:00
Stephan Bergmann dead6b3a94 More loplugin:cstylecast: svl
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-12 20:14:44 +01:00
Noel Grandin ccf986a77a loplugin:useuniqueptr in svl
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-11 14:50:11 +01:00
Noel Grandin 75c604a4ec loplugin:convertlong in ucb,sot
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-09 07:20:44 +01:00
Noel Grandin ec920ed0ec Revert "GetTrueSlotId is dead"
This reverts commit 4f11182566.

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-05 13:01:33 +01:00
Noel Grandin 4f11182566 GetTrueSlotId is dead
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-04 14:27:53 +01:00
Noel Grandin 21e0d8162a loplugin:unusedfields
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>
2018-01-04 07:17:23 +01:00
Noel Grandin 6028b64e27 loplugin:passstuffbyref even more return improvements
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-24 07:01:47 +01:00
Noel Grandin a8c1c0ae16 loplugin:passstuffbyref improved returns in vcl
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-23 12:36:24 +01:00
Noel Grandin 783120996a new loplugin: convertlong
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-21 08:22:29 +01:00
Michael Stahl 29baa05bb9 tools: remove unused #include from solar.h
Change-Id: I214e13add371380701ae39403d90a574a63e495d
2017-12-13 22:12:39 +01:00
Jochen Nitschke 165d0a149d clang-tidy modernize-use-equals-default in svl
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-28 08:33:08 +02:00
Noel Grandin b9fd0d1c42 loplugin:constmethod in svl
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-26 11:43:40 +02:00
Stephan Bergmann 65c7343768 loplugin:includeform: svl
Change-Id: I769b091515d1e6b7d16652d11ff2b94a75584ad0
2017-10-23 22:45:51 +02:00
Noel Grandin 87a9979c89 overload std::hash for OUString and OString
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-23 08:15:35 +02:00
Takeshi Abe 96e67461c8 svl: Remove unnecessary abstraction of SfxImpStringList
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-04 14:33:10 +02:00
Jochen Nitschke 950742b3ac inline SfxPoolItem copy constructor
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-29 15:24:32 +02:00
Noel Grandin 48b200a0a2 clang-tidy modernize-use-emplace in svgio..svtools
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-12 13:15:40 +02:00
Michael Stahl 276536fc10 svl: assert calls of SfxPoolItem::Create/Store
Change-Id: I2d92897d558ad0914e8bbc80b4dec72d0fd00629
2017-09-08 20:46:21 +02:00
Noel Grandin 2e0a25ce2b loplugin:constantparam
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-08 09:19:32 +02:00
Noel Grandin 7aa7f4d9e4 loplugin:unnecessaryparen include c++ casts
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-04 10:52:41 +02:00
Jochen Nitschke e0883b6f6a SfxItemPool_Impl::nInitRefCount is always 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-03 09:56:03 +02:00
Noel Grandin 4d41b2e42f loplugin:unusedfields
Change-Id: I81bcf4f56599146536ba8d66cc86fa5a08737298
Reviewed-on: https://gerrit.libreoffice.org/41556
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-25 13:10:03 +02:00
Noel Grandin 1b694dad64 loplugin:unusedmethods
Change-Id: Iaaf9092ec4d6189492906648b84494d087fed81f
Reviewed-on: https://gerrit.libreoffice.org/41539
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-25 09:04:26 +02:00
Jochen Nitschke e62a8f3333 svl: refactor string stream helpers
functions were declared twice, in stringio.hxx and poolio.hxx.

remove unicode functions as they were unused.
remove duplicate function declarations in poolio.hxx.
move implementations from poolio.cxx to new stringio.cxx.

Change-Id: I469346a01d793d22721e62bf7e96fd01e28d560c
Reviewed-on: https://gerrit.libreoffice.org/41331
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-19 19:53:23 +02:00
Jochen Nitschke 933d2b41e7 drop unused SfxSizeItem
unused since commit 48bf5e855a
Date:   Thu Nov 16 14:30:58 2000 +0000
    Remove tests for INET_PROT_FILE

Change-Id: I2dc134f529675204caad78c7e50417adb55e8e4f
Reviewed-on: https://gerrit.libreoffice.org/41320
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-19 13:49:48 +02:00
Jochen Nitschke 08566ea519 drop unused CntContentTypeItem
unused since commit cdae06a664
Date:   Fri Apr 6 11:17:10 2001 +0000
    #78400# Template scanning reimplemented using UCB

Change-Id: I3e742be5a7c5467628dbe5a19171c4dfcef07c58
Reviewed-on: https://gerrit.libreoffice.org/41274
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-18 12:34:56 +02:00
Varun Dhall 006a7b5054 Removing unused serialisation code
Change-Id: I86911c77f0831d448ff803afae2a74ec55ad4dd8
Reviewed-on: https://gerrit.libreoffice.org/41233
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-08-17 10:54:59 +02:00
Noel Grandin ff1f6a5fc2 remove UL/L suffixes from integer constants in initialiser/call expressions
Change-Id: Iae081567c4fa5b88edbd12cf2fbafd2b8f31b300
Reviewed-on: https://gerrit.libreoffice.org/41214
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-17 08:14:31 +02:00
Varun Dhall 75933b220d Rename SfxItemPool GetSurrogate to CheckItemInPool
Change-Id: Ife08e05a9fcbadea86c005a2e9defb7cef9b5acc
Reviewed-on: https://gerrit.libreoffice.org/41231
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
2017-08-16 22:38:04 +02:00
Varun Dhall bc11bee358 Removing unused serialisation code from svl
Change-Id: Ia22ea346610e925cc6d499b0cc4bc768a419f909
Reviewed-on: https://gerrit.libreoffice.org/41229
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-08-16 21:22:42 +02:00
Varun Dhall b021353dd6 Removing unused serialisation code
Change-Id: Id31c8de69043d393f005f83d5c7eba878af5119c
Reviewed-on: https://gerrit.libreoffice.org/41149
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-08-16 11:08:39 +02:00
Michael Stahl 8aae351702 SfxItemSet::Equal: ignore parents if the pools are different
If there are parents, they are necessarily different pointers for
different pools; the only sensible way to compare them is by-value,
which is a bit tricky because the items overwritten in the child
should of course be ignored.

Rather than rewrite the whole function, just ignore the parents for
now, because this comparison is currently used to replace compares
of the serializations of item sets, and SfxItemSet::Store()
completely ignores the m_pParent, so this looks like the best
replacement.

Change-Id: I0a4bf44d4fef49e47a3ec78bc7d977a6fcbd789d
Reviewed-on: https://gerrit.libreoffice.org/41186
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-08-16 00:11:16 +02:00
Noel Grandin d347c24036 convert std::map::insert to std::map::emplace
which is considerably less verbose

Change-Id: Ifa373e8eb09e39bd6c8d3578641610a6055a187b
Reviewed-on: https://gerrit.libreoffice.org/40978
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-11 12:38:32 +02:00
Noel Grandin 61d49afadb loplugin:unusedmethods
Change-Id: Id66cf12e3a59aeed1b9a7a111b841e30b248635b
Reviewed-on: https://gerrit.libreoffice.org/40876
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-08 20:56:30 +02:00
Noel Grandin 3dcf6dfcee remove unnecessary use of 'this->'
Change-Id: I5c115389af7d24c18ddaf5fbec8c00f35017a5b4
Reviewed-on: https://gerrit.libreoffice.org/40671
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-02 13:45:36 +02:00
Caolán McNamara 90ac4671c1 make IntlWrapper arg to GetPresentation non-implicit and non-optional
which requires explicitly adding null in

1) SdrItemBrowserControl::SetAttributes(const SfxItemSet* pSet, const SfxItemSet* p2ndSet)

where SdrItemBrowserControl is only used by SdrItemBrowser and the only use of that is
within DBG_UTIL in SdrPaintView

2) SwCursorShell::GetContentAtPos( const Point& rPt,
within a #ifdef DBG_UTIL block in

3) SvxSearchDialog::BuildAttrText_Impl( OUString& rStr,
                                             bool bSrchFlag ) const
where the other branch uses SvxResId

4) SfxPoolItem::dumpAsXml(xmlTextWriterPtr pWriter) const
5) XFillStyleItem::dumpAsXml(xmlTextWriterPtr pWriter) const

looks very much like all uses (outside the dumpers) are intended
to be in the ui locale

results in that INetContentTypes::GetPresentation always called with UI Locale

Change-Id: I5a110c107838b4db3c355476426d6532f2b6ce52
Reviewed-on: https://gerrit.libreoffice.org/40538
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-31 22:00:27 +02:00
Noel Grandin b09deb0753 loplugin:constparams handle constructors
had to change the structure of the plugin considerably, was too messy to
structure it to do the calculations on a per-function basis

Change-Id: I4edee7735f726101105c607368124a08dba21086
Reviewed-on: https://gerrit.libreoffice.org/40516
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-28 14:51:56 +02:00
Eike Rathke 238de04de6 Ditch use of EditTextObject::Store() in ScGlobal::EETextObjEqual()
This was the last incarnation of SfxItem binary stream serialization that is to
be eliminated after clipboard use is gone.

The "full" EditTextObject::operator==() in EditTextObjectImpl::operator==(),
and via ContentInfo::operator==() in SfxItemSet::operator==(), also compare the
SfxItemPool pointers which gets in the way here (not stored to stream hence
didn't matter and maybe the reason for not having switched EETextObjEqual() to
use operator==() back in the days).

Introduce *::Equals() functions that do not compare pool pointers and let
SfxItemSet::Equals() in that case not assume it would be operating on one pool
only.

Change-Id: Ifff939a92101c7f74695b676a45a7fdbb4f1d7f6
Reviewed-on: https://gerrit.libreoffice.org/40492
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
2017-07-27 17:48:59 +02:00
Noel Grandin 31a85a9a13 convert UNO event ids to scoped enum
I'm fairly sure there are more simplifications that could be make here.
It seems like we have both an ID and a string name for all of these
events, and we could probably get by with just one of those, or
alternately, centralise the name<->id mapping somewhere

Change-Id: I978073822ddbebce94ac5b560fea675bea905a35
Reviewed-on: https://gerrit.libreoffice.org/40392
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-25 12:21:22 +02:00
Caolán McNamara 182a74d937 de-hrc various things
e.g.  helpid[s].hrc -> helpids.h
and insert include guards where missing

move "ordinary" defines into .hxx files

remove .hrc entries that are used as arguments to dialog factory
when a dedicated method can be added instead

Change-Id: I792fb8eb0adfaa63cf354e6e57401fc943e9196e
2017-07-21 08:20:51 +01:00