summaryrefslogtreecommitdiff
path: root/svl
AgeCommit message (Collapse)AuthorFilesLines
2017-01-25loplugin: unnecessary destructor svl..svtoolsNoel Grandin4-18/+0
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 Grandin2-17/+6
which is it's only use-site Change-Id: I35943282ad4f5fd5ad297831d63e8abee9a2ddff
2017-01-23Revert "used std::map in SfxItemSet"Noel Grandin3-456/+661
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 McNamara1-1/+3
Change-Id: I1482b1ce9a9ec9556e076c8f74185a9ce29e8d08
2017-01-19New loplugin:dynexcspec: Add @throws documentation, svlStephan Bergmann1-0/+13
Change-Id: Idbe6378e2c7da51a2f08de5173bc58733eceb95f
2017-01-19make SfxItemSet with SAL_WARN_UNUSEDNoel Grandin1-5/+0
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 Grandin4-17/+14
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 Grandin1-1/+1
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 Grandin3-661/+455
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 Grandin1-85/+0
Change-Id: I6f88f37eca2bdd6b40c8713f1b2e35ad0be94ab0
2017-01-10fix SfxUShortRangesItem::operator==Noel Grandin1-1/+1
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 Grandin1-6/+0
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 Bergmann1-72/+1
Instantiate one million SfxPoolItems to reach the next level! Change-Id: Ib600f6f2ece080eb98d7f8d284080b5584b0a9d1
2017-01-09New loplugin:externvar: svlStephan Bergmann2-7/+7
Change-Id: Ib8a198c52aa6b92d602e0477d4af7e30f5d5baee
2017-01-02coverity#1371220 Missing move assignment operatorCaolán McNamara2-4/+24
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 McNamara4-50/+47
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 Grandin3-59/+63
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 Hosny1-38/+1
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 Bergmann1-10/+10
...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 Grandin6-52/+18
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 McNamara1-1/+1
and coverity#1397044 Unchecked return value Change-Id: I193bd676e417c35450efa91cb5773c78c998b63f
2016-12-11remove unusable debug code, DBG_UTIL_MIJochen Nitschke1-11/+0
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 Grandin4-18/+17
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 Grandin1-5/+5
Change-Id: I58a63a0e6f619442f21827064644ecd8ca57b8ff
2016-12-05convert DecodeMechanism to scoped enumNoel Grandin5-51/+51
Change-Id: I5c56634b1bca8e37fa73d02d2428645301b6c547
2016-12-05convert INetURLObject::EncodeMechanism to scoped enumNoel Grandin2-6/+6
Change-Id: I50ea17c7779c7b5cacddf548f1773fd7d6c8bade
2016-12-02loplugin:unnecessaryoverride (dtors) in svlStephan Bergmann2-6/+0
Change-Id: I6dd35199e15aebf547578642692db2b1983ebd95
2016-12-02svl: fix loplugin:cppunitassertequals warningsMiklos Vajna4-35/+35
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 Stahl3-14/+14
Change-Id: I8fc4d849e434e245d871dc2d2eef42713e1359bb
2016-11-30don't hold vector as pointer here ...Jochen Nitschke1-6/+3
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 Vajna1-1/+1
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 Grandin3-15/+15
Change-Id: I0ad7c02953aa53168dc242f1f374ab871728c84e
2016-11-22trivial makefile cleanupsMichael Stahl1-1/+2
Change-Id: Ida5bdfa06ecd7907305f4f171ca5ab64260d0259
2016-11-18svl: assert SfxPoolItem::operator==Michael Stahl12-12/+12
Change-Id: Ia293c498682dd2ac86b15a74f06fd1ab389f9ba6
2016-11-17loplugin:unusedfieldsNoel Grandin1-2/+0
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 Grandin7-10/+10
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 Tardon2-4/+4
Change-Id: I039f8ff491b42ea9c3936bf13922df8095434228
2016-11-13revert unintentionally committed linesDavid Tardon1-5/+0
Change-Id: I5cb355af20f18e63fdfe45e5946a9281fd1fa084
2016-11-13add missing dependencyDavid Tardon1-2/+7
Change-Id: I72696c82d9a96709746060ae18bd497da8715d35
2016-11-10make comphelper::sequenceToContainer a little smarterNoel Grandin1-1/+1
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-Poirier1-0/+5
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 Grandin1-1/+1
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 Nitschke3-18/+8
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 Grandin1-6/+10
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, ...)
2016-11-03remove unnecessary castsJochen Nitschke1-10/+6
Which IDs are always sal_uInt16 and likely passed from defines Change-Id: I134358289ccd338ef1ff6ba963e25a524e790f4e Reviewed-on: https://gerrit.libreoffice.org/30498 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-03bin nranges.*, move remaining functions into itemset.cxxJochen Nitschke3-107/+84
Change-Id: I1b88d98e00415e9c32a48486912d577a00fbfbda Reviewed-on: https://gerrit.libreoffice.org/30486 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-01add an assert to check for ref-counts > 16 bitsNoel Grandin1-1/+5
after commit 87c518593de59dbf4c0f5f45c720b14a05aeca9e sc: remove antique reference counting hacks from ScDocumentPool In theory, nothing should be trying to save items like this anymore, but lets make the error more obvious in case something is. Change-Id: I89b3637168c072d20e214a8f6338f6336d44d891 Reviewed-on: https://gerrit.libreoffice.org/30467 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2016-11-01simplify loop to O(n)Jochen Nitschke1-19/+10
Change-Id: Ib14da0201730e213f15f4f46b539fc843bfbe750 Reviewed-on: https://gerrit.libreoffice.org/30454 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-31loplugin:oncevar in svl..svxNoel Grandin1-9/+5
Change-Id: I80b11a7b698de4b84d7a2f4c7dc62b2e4fd8bb01 Reviewed-on: https://gerrit.libreoffice.org/30438 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-31fix use of is_sorted_untilNoel Grandin1-6/+21
fix for "comparison doesn't meet irreflexive requirements, assert(!(a < a))" as a consequence of author Jochen Nitschke <j.nitschke+logerrit@ok.de> commit e75561bd19faa332c077ec249a397d056fae63f2 bin SfxUShortRanges, inline and rewrite only usage seems that std::is_sorted_until has stronger requirements than we actually want here, so open-code a similar algorithm Change-Id: I126584d9146137b9ac699dad85fd9691490dc30d Reviewed-on: https://gerrit.libreoffice.org/30435 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>