summaryrefslogtreecommitdiff
path: root/svl
AgeCommit message (Collapse)Author
2017-02-06Add missing #includesStephan Bergmann
...and remove some unncessary using directives/declarations, in preparation of removing now-unnecessary #includes from cppumaker-generated files, post e57ca02849c3d87142ff5ff9099a212e72b8139c "Remove dynamic exception specifications". Change-Id: Iaf1f268871e2ee1d1c76cf90f03557527ebc9067
2017-02-04simplify SfxWhichIterJochen Nitschke
only one of 164 calls used the ctor with a restricting range. handle this special case. remove nFrom and nTo members. use operator[] on range pointer to highlight we access lower [0] and upper [1] range bound. remove dtor. Change-Id: I87b28502515e45bb190425eb88aa187ac0b5b2d2 Reviewed-on: https://gerrit.libreoffice.org/33911 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-02-02convert method names in tools::SvRef to be more like our other..Noel Grandin
reference classes, uno::Reference and rtl::Reference. Specifically rename Is()->is() and Clear()->clear(). Change-Id: Icb7e05e2d09cb9977121508b837ba0961dabb4ae Reviewed-on: https://gerrit.libreoffice.org/33576 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-31teach lolugin:stringconstant about calling constructorsNoel Grandin
so we can remove unnecessary calls to the OUString(literal) constructor when calling constructors like this: Foo(OUString("xxx"), 1) Change-Id: I1de60ef561437c86b27dc9cb095a5deb2e103b36 Reviewed-on: https://gerrit.libreoffice.org/33698 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-27use a define for invalid SfxPoolItemJochen Nitschke
and use helper function IsInvalidItem() more Change-Id: Ifd651a336a7bd4ef4f945219d765afb827465438 Reviewed-on: https://gerrit.libreoffice.org/33611 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-01-26Remove dynamic exception specificationsStephan Bergmann
...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html> "Dynamic Exception Specifications" for details. Most changes have been done automatically by the rewriting loplugin:dynexcspec (after enabling the rewriting mode, to be committed shortly). The way it only removes exception specs from declarations if it also sees a definition, it identified some dead declarations-w/o-definitions (that have been removed manually) and some cases where a definition appeared in multiple include files (which have also been cleaned up manually). There's also been cases of macro paramters (that were used to abstract over exception specs) that have become unused now (and been removed). Furthermore, some code needed to be cleaned up manually (avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no configurations available that would actually build that code. Missing @throws documentation has not been applied in such manual clean-up. Change-Id: I3408691256c9b0c12bc5332de976743626e13960 Reviewed-on: https://gerrit.libreoffice.org/33574 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-01-25loplugin: unnecessary destructor svl..svtoolsNoel Grandin
Change-Id: Ie96dda7194c83ba88693f8c91899c732d704a4bd Reviewed-on: https://gerrit.libreoffice.org/33515 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-25move GetPosByValue from SfxEnumItemInterface to SfxAllEnumItemNoel Grandin
which is it's only use-site Change-Id: I35943282ad4f5fd5ad297831d63e8abee9a2ddff
2017-01-23Revert "used std::map in SfxItemSet"Noel Grandin
This reverts commit 2757ee9fe610e253e4ccc37423fa420004d0f388. Besides causing a performance regression, I now notice that there is code in SW that relies on iterating over two different SfxItemSet's in parallel, and assumes that missing items are returned as nullptr, which is not the case for my std::map based change. Change-Id: I2b1110350fe4c4b74e5508558e9661ef1e1a103e
2017-01-21coverity#1399032 Dereference null return valueCaolán McNamara
Change-Id: I1482b1ce9a9ec9556e076c8f74185a9ce29e8d08
2017-01-19New loplugin:dynexcspec: Add @throws documentation, svlStephan Bergmann
Change-Id: Idbe6378e2c7da51a2f08de5173bc58733eceb95f
2017-01-19make SfxItemSet with SAL_WARN_UNUSEDNoel Grandin
Change-Id: Ia74ca329d8438f614169031acfbe0406faf7c281 Reviewed-on: https://gerrit.libreoffice.org/33268 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-18new loplugin: useuniqueptr: svl..svtoolsNoel Grandin
Change-Id: Ia4d5b37ee3cf67318e3cc01525e4b733af60d038 Reviewed-on: https://gerrit.libreoffice.org/33251 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-17fix bug in SfxItemSet::ClearItemNoel Grandin
resulting from commit 2757ee9fe610e253e4ccc37423fa420004d0f388 used std::map in SfxItemSet where I failed to notice that the nWhich parameter was being re-used as a loop variable. This bug was spotted by Jochen Nitschke Change-Id: Ifb43dfb84261ecbcf88e5b312b8ec24cf7c3dce9
2017-01-17used std::map in SfxItemSetNoel Grandin
instead of naked array SfxItemIter ended up needing to take copies of stuff because various code likes to iterate over the items and delete items inside the loop. The gdb pretty printer is no longer quite as pretty as it was before, but it still prints useful info. Change-Id: I59b07ea42f6b1c74798a15402970b9dbd8233dbe
2017-01-11SfxUShortRangesItem is unusedNoel Grandin
Change-Id: I6f88f37eca2bdd6b40c8713f1b2e35ad0be94ab0
2017-01-10fix SfxUShortRangesItem::operator==Noel Grandin
broken since commit 1416669670de6f93b40d8a2f8f001e92ec0bf101 Author: Thomas Arnhold <thomas@arnhold.org> Date: Tue Apr 2 14:21:42 2013 +0200 Revert "Revert "reduce some uglyness"" Change-Id: I41ac489e952f0356976e0a5372953d634d96e690
2017-01-10loplugin:unusedmethodsNoel Grandin
Change-Id: Ibe11923601760ded53a277c48631e4893606b2d6 Reviewed-on: https://gerrit.libreoffice.org/32875 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-09Wow! The ultimate Easter EggStephan Bergmann
Instantiate one million SfxPoolItems to reach the next level! Change-Id: Ib600f6f2ece080eb98d7f8d284080b5584b0a9d1
2017-01-09New loplugin:externvar: svlStephan Bergmann
Change-Id: Ib8a198c52aa6b92d602e0477d4af7e30f5d5baee
2017-01-02coverity#1371220 Missing move assignment operatorCaolán McNamara
Change-Id: Ie2947ea621da7ffc6c9530f007e1acdd4efb50cb Reviewed-on: https://gerrit.libreoffice.org/32650 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-01-02use std::unique_ptrCaolán McNamara
Change-Id: I1c4f81e0ba0529b9e365c6ddb3d77a8a6a6d5741 Reviewed-on: https://gerrit.libreoffice.org/32649 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-12-26use std::vector instead of naked array in SfxItemPoolNoel Grandin
Change-Id: I2d4ac010ff5818e673567cee05700872588918e4 Reviewed-on: https://gerrit.libreoffice.org/32384 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-12-25Enable “complex text layout” by defaultKhaled Hosny
All this does is enable some UI elements, like setting paragraph direction or selecting “CTL” fonts. Some of these UI elements are required for editing RTL documents and it makes no sense to hide them by default and then rely on some heuristic to guess if the user might need them (which fails half of the time). Hopefully this will also help not overlooking these elements in the new UI experiments (like how the sidebar missed the paragraph direction settings for few releases making it rather useless for RTL documents). I suppose we should do the same for “Asian” support, but I don’t know much about how this is used so will not touch it for now. And the heuristic can go since this is now is enabled by default. If someone wants to disable this, we shouldn’t second guess him. Change-Id: Idae72d91d422ac8d18875d87dc66ab4921956fe6 Reviewed-on: https://gerrit.libreoffice.org/32356 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
2016-12-17Adapt to no-longer explicit OUStringLiteral ctorStephan Bergmann
...from previous commit Change-Id: I062b7cd212c17e7eb5274476e6859228d0477c7f Reviewed-on: https://gerrit.libreoffice.org/32098 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-12-15teach sallogareas plugin to catch inconsistenciesNoel Grandin
Change-Id: I8bcea5ffc74d48148bea78da8c17744e288c069a Reviewed-on: https://gerrit.libreoffice.org/32004 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-12coverity#1397045 Unchecked return valueCaolán McNamara
and coverity#1397044 Unchecked return value Change-Id: I193bd676e417c35450efa91cb5773c78c998b63f
2016-12-11remove unusable debug code, DBG_UTIL_MIJochen Nitschke
nItemStartPos was never defined initial commit ee62af2e9ba16913568919c9289fb1753b4b456e Date: Wed Apr 13 10:18:14 2005 +0000 INTEGRATION: CWS visibility03 (1.1.2); FILE ADDED Change-Id: If63d5594d32bae9e5b3b89e7d2bc6106e7663071 Reviewed-on: https://gerrit.libreoffice.org/31857 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-08convert SFX_HINT to scoped enumNoel Grandin
Notes (*) In SC, BULK_DATACHANGED was or'ed into the hint id. Replaced with a dynamic_cast check. (*) In SC, removed the hint id field from ScIndexHint, no point in storing the hint id twice (*) Fold the SfxStyleSheetHintId enum into the new SfxHintId enum, no point in storing two different hint ids (*) In some cases, multiple #define's used to map to the same SFX_HINT value (notably the SFX_HINT_USER* values). I made all of those separate values. Change-Id: I990e2fb587335ebc51c9005588c6a44f768d9de5 Reviewed-on: https://gerrit.libreoffice.org/31751 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-05convert FSysStyle to o3tl::typed_flagsNoel Grandin
Change-Id: I58a63a0e6f619442f21827064644ecd8ca57b8ff
2016-12-05convert DecodeMechanism to scoped enumNoel Grandin
Change-Id: I5c56634b1bca8e37fa73d02d2428645301b6c547
2016-12-05convert INetURLObject::EncodeMechanism to scoped enumNoel Grandin
Change-Id: I50ea17c7779c7b5cacddf548f1773fd7d6c8bade
2016-12-02loplugin:unnecessaryoverride (dtors) in svlStephan Bergmann
Change-Id: I6dd35199e15aebf547578642692db2b1983ebd95
2016-12-02svl: fix loplugin:cppunitassertequals warningsMiklos Vajna
Change-Id: Ice929418e46ff42517a47dfcd5888a5cce36ae51 Reviewed-on: https://gerrit.libreoffice.org/31523 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-12-01svl: convert some legacy DBG_ASSERTMichael Stahl
Change-Id: I8fc4d849e434e245d871dc2d2eef42713e1359bb
2016-11-30don't hold vector as pointer here ...Jochen Nitschke
and make impl types private Change-Id: I7ead64bac38da3d813e0b47fa124970937c36617 Reviewed-on: https://gerrit.libreoffice.org/31438 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-11-30sw: use auto when initializing with a cast to avoid duplicating the type nameMiklos Vajna
Change-Id: Ide7bd0f1f444824b78aa53cfe1db0129cbca1a5d Reviewed-on: https://gerrit.libreoffice.org/31397 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-11-24use o3tl::typed_flags in ConfigurationListener::ConfigurationChangedNoel Grandin
Change-Id: I0ad7c02953aa53168dc242f1f374ab871728c84e
2016-11-22trivial makefile cleanupsMichael Stahl
Change-Id: Ida5bdfa06ecd7907305f4f171ca5ab64260d0259
2016-11-18svl: assert SfxPoolItem::operator==Michael Stahl
Change-Id: Ia293c498682dd2ac86b15a74f06fd1ab389f9ba6
2016-11-17loplugin:unusedfieldsNoel Grandin
Change-Id: Id2dbbf384637223db3d334d95332251832918003 Reviewed-on: https://gerrit.libreoffice.org/30927 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-16make the element names in dumpAsXml match the class namesNoel Grandin
Change-Id: I955facfe3e901fcb76798dab342f96a67d5ac63f Reviewed-on: https://gerrit.libreoffice.org/30894 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-13drop useless semicolonsDavid Tardon
Change-Id: I039f8ff491b42ea9c3936bf13922df8095434228
2016-11-13revert unintentionally committed linesDavid Tardon
Change-Id: I5cb355af20f18e63fdfe45e5946a9281fd1fa084
2016-11-13add missing dependencyDavid Tardon
Change-Id: I72696c82d9a96709746060ae18bd497da8715d35
2016-11-10make comphelper::sequenceToContainer a little smarterNoel Grandin
so we don't have to specify the source type Change-Id: I4106705a39874a8043f0f294a11374404d6cfc3a Reviewed-on: https://gerrit.libreoffice.org/30713 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-09tdf#102507 Add qa test of left aligned denominatorLaurent Balland-Poirier
New behavior of format # ?/??? gives for 3.5 3 1/2 instead of 3 1/ 2 Change-Id: I87f4a71fb13d8424017d557213bb4d279de28af5 Reviewed-on: https://gerrit.libreoffice.org/30167 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2016-11-09make comphelper::containerToSequence a little smarterNoel Grandin
So we don't have to specify the source and destination type as often. Change-Id: Id9e286417a1cb246d163cbc3c536b231a4a92624 Reviewed-on: https://gerrit.libreoffice.org/30700 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-04use aggregate initialisation instead of memset for arraysJochen Nitschke
Change-Id: I084dee370e5c1096e51b8ff4073443c719688469 Reviewed-on: https://gerrit.libreoffice.org/30517 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-03Revert "remove unnecessary casts"Noel Grandin
This reverts commit fa80dae9a79a7414af8adcb91bc04dfff13bbb63. because current Clang master complains with /home/noel/libo3/svl/source/items/itemset.cxx:189:26: error: passing an object that undergoes default argument promotion to 'va_start' has undefined behavior [-Werror,-Wvarargs] va_start( pArgs, nNull ); ^ /home/noel/libo3/svl/source/items/itemset.cxx:176:89: note: parameter of type 'sal_uInt16' (aka 'unsigned short') is declared here SfxItemSet::SfxItemSet(SfxItemPool& rPool, sal_uInt16 nWh1, sal_uInt16 nWh2, sal_uInt16 nNull, ...)