summaryrefslogtreecommitdiff
path: root/svl
AgeCommit message (Collapse)AuthorFilesLines
2016-10-03add more dumpAsXml()Noel Grandin2-0/+14
and make it format the output nicely, so I don't have to use 'xmllint --format' before I can read it. Change-Id: I065ee93193f3c6c7bab87212ab96021fb0d7c5ed Reviewed-on: https://gerrit.libreoffice.org/29407 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-01Fix typosAndrea Gelmini1-1/+1
Change-Id: I1e0e6f1b99090f26a6cd657ee9019bf2fa906dd9 Reviewed-on: https://gerrit.libreoffice.org/29436 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-01Revert "don't write item right before destruction"Jochen Nitschke2-4/+10
triggers warnings in the dtor if RefCount isn't reset. revert till we have better ref counts and don't need debug code in dtor. This reverts commit b74d2433c856d6d172d9588f4b6d59c31ec02853. Change-Id: I1835885d94e15339aa7602037d850e1524fd9662 Reviewed-on: https://gerrit.libreoffice.org/29427 Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-09-30loplugin:constantparamNoel Grandin1-7/+4
Change-Id: Idbe8c8e6b3d44cacce296ec8c79b2b244281057c Reviewed-on: https://gerrit.libreoffice.org/29321 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-29tdf#88206 replace cppu::WeakImplHelper* in sfx2 and svlJochen Nitschke1-1/+1
some fallout in include/editeng/unotext.hxx which uses WeakAggImplHelper1 from implbase1.hxx Change-Id: I7237c46c1eb17752c63eeddc6a3aee41788fbbd2 Reviewed-on: https://gerrit.libreoffice.org/29374 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-28Resolves: tdf#96748 'Default Language' show current ui lang not new defaultCaolán McNamara1-0/+32
i.e. if you select it, then the General::UILocale is unset and a new default generated based on the L10N::UILocale and what langpacks are installed but what the entry string claims is "Default - Current Language", rather than "Default - The Language That Will Be Used", so split out the language selection code into a reusable bit and use that to get the name of the language which will be selected if this entry is used Change-Id: I13d901c9a47ef213aea86417501114d4231efae5
2016-09-26prevent adding duplicates in calls to GetCurrencyFormatStrings()Eike Rathke1-7/+16
Identical currency format codes popped up with fabb8f48dd89d71378daf293a974a412deccc961 that adds several currency symbols for the same ISO currency code, which of course also duplicates the format codes that use the ISO code. Do not offer them in UI which just looks confusing. Change-Id: I0bf039c400aa2e3bad946848ed4e57c8cfcb0fc3
2016-09-25remove unused parameterJochen Nitschke1-15/+1
bTotalRanges is never used. SFX_ITEMSET_NO_DEFAULT_CTOR is no where else used. Change-Id: Ia35ea875f16a8ca04c2173b01074113f1825f565 Reviewed-on: https://gerrit.libreoffice.org/29248 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-24Remove Chinese comment in svl/qa.Mark Hung1-4/+5
The Chinese characters in the comment caused a compiler warning that it can not be represented in cp950 codepage and forbid OUStringLiteral1 concatenation. Replacing it with meaningful English comment so others can understand it. Change-Id: Ibc571e68ee5d65a89e385d79962db0fd6b1298cc Reviewed-on: https://gerrit.libreoffice.org/29246 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-23perf: eliminate SfxSimpleHint and move to SfxHint, tdf#87101 relatedEike Rathke5-9/+9
There were over 150 places in *::Notify() functions that did some dynamic_cast<SfxSimpleHint*> of which ~98% were unnecessary because the base class SfxHint passed was an SfxSimpleHint anyway. dynamic_cast operations come with quite some cost, so avoid if possible. Specifically for ScFormulaCell::Notify() that created a bottleneck in scenarios where cells were notified that already handled a previous notification. In mass operations doing the dynamic_cast before it could be decided whether having to act on it or not this made 2/3 of all time spent in the Notify() call. To get rid of that rename/move SfxSimpleHint to SfxHint and let classes derive from SfxHint instead of SfxSimpleHint. This comes only with a slight cost that an additional sal_uInt32 is transported in such hints, initialized to 0, but this is neglectable compared to the huge gain. For the rare cases where a Notify() actually expects both, an SfxHint (formerly SfxSimpleHint) and a derived hint, this changed order of the dynamic_cast involved so the simple SfxHint::GetId() is handled last. Modules using such combinations can further optimize by treating the simple SfxHint::GetId() first once verified that none of the other derived hints use an ID not equal to zero respectively none of the ID values the simple hint uses. Change-Id: I9fcf723e3a4487ceb92336189d23a62c344cf0ce Reviewed-on: https://gerrit.libreoffice.org/29205 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-09-23Revert "Revert "remove SfxPoolItemArrayBase_Impl typedef""Noel Grandin2-5/+3
This reverts commit b0eecd2d3ba4a1a424a2d52cccf64fe6fc09c34b. Now that the necessary parent commits are in, we can re-apply this.
2016-09-23move SfxPoolItemArray_Impl::ReHash to poolio.cxx ...Jochen Nitschke2-19/+19
... it's declared in poolio.hxx Change-Id: I8cc4a7152f66cf89fb01cd7a718974d76825ec04 Reviewed-on: https://gerrit.libreoffice.org/29181 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-23Fix Cppcheck report: reduce scope of the variable 'fTemp'Laurent Balland-Poirier1-2/+2
Change-Id: I935de8e287f94f3219542dfe67f7bb4a05be14da Reviewed-on: https://gerrit.libreoffice.org/29200 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-23don't write item right before destructionJochen Nitschke2-10/+4
SetRefCount writes only SfxPoolItem members m_nRefCount and m_nKind Change-Id: Ibd06d4edc619b9a840a8a232d9395dd85c452149 Reviewed-on: https://gerrit.libreoffice.org/29195 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-22tdf#75757 remove inheritance from std::vectorJochen Nitschke2-2/+21
Change-Id: Ief06d3ea0288e8ebf34f2f67f3d1dfc9405b6d49 Reviewed-on: https://gerrit.libreoffice.org/29180 Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-09-22Revert "remove SfxPoolItemArrayBase_Impl typedef"Noel Grandin2-3/+5
This reverts commit d141d5b3bd11ba6154b5d064fb69900405724b13. seems like I pushed it too soon, it depends on other commits not in yet.
2016-09-22remove SfxPoolItemArrayBase_Impl typedefJochen Nitschke2-5/+3
Change-Id: Id4d3f80b3906395838afaffb2b0d00437d17f6dd Reviewed-on: https://gerrit.libreoffice.org/29182 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-22convert SfxItemKind to scoped enumJochen Nitschke3-29/+37
reduced size because it is stored in widely used SfxPoolItem. converted 'if' chains to 'switch case' Change-Id: Id9b5e375b681c88e8c91c561abd1a50610aa4815 Reviewed-on: https://gerrit.libreoffice.org/29186 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-22loplugin:unusedmethods in chart2..svxNoel Grandin1-4/+0
Change-Id: Ifb6045885049733415895f58cdd911256f48323c Reviewed-on: https://gerrit.libreoffice.org/29187 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-22Missing "const"Stephan Bergmann1-1/+1
Change-Id: Ib0cd605cf8e71e94f4442c07300726aff1d9ce03
2016-09-22tdf#53698: Add a NumberFormatMapper member to SvNumberformatScanMaarten Bosmans2-5/+3
This way the NumberFormatMapper can cache subsequent getFormatCode calls. It improves performance in case LANG=en_US. Change-Id: I81922f219c29a5aa302e5ad3afead107dee463e3 Reviewed-on: https://gerrit.libreoffice.org/29135 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-22Remove NumberFormatCodeWrapperMaarten Bosmans2-25/+21
This class only adds a level of indirection, without any useful functionality. Change-Id: I806e1b9241caf025c62c12c93aad3101daac874a Reviewed-on: https://gerrit.libreoffice.org/29134 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-21convert SfxItemPresentation to scoped enumNoel Grandin2-6/+6
Change-Id: Ibf605706a9f804ab509ac4f92f5f88fcf3daebc1 Reviewed-on: https://gerrit.libreoffice.org/29131 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-21add dumpAsXml() to more pool itemsNoel Grandin3-0/+20
Change-Id: I276109148bab8180ce2442f5ee69722357362453
2016-09-16loplogin:singlevalfields in include/Noel Grandin1-2/+1
Change-Id: I27842162fcf82120ecb811ee8e89e187430931fc Reviewed-on: https://gerrit.libreoffice.org/28931 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-15replace sal_Size with std::size_t (or sal_uInt64 for SvStream pos)Michael Stahl3-20/+20
... except in include/rtl, include/sal, include/uno, where sal_Size is retained for compatibility, and where callers of rtl functions pass in pointers that are incompatible on MSVC. Change-Id: I8344453780689f5120ba0870e44965b6d292450c
2016-09-15loplugin:singlevalfields in sc..vclNoel Grandin1-6/+2
Change-Id: I68752a3daf5ddd8581c07759b8be2c1dabbb9258
2016-09-14loplugin:constantparamNoel Grandin1-9/+3
clean up the plugin a little, and try to catch params which are default constructed, which doesn't seem to be working yet Change-Id: Ife45f18502a45cd26306424b7432c55fcbb0fd12 Reviewed-on: https://gerrit.libreoffice.org/28861 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-13loplugin:dllprivateStephan Bergmann1-4/+4
Change-Id: I1fe70a39c50aba8b84c117653185fc37dbbfeab0
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann12-15/+15
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark overriding destructors as 'virtual'" appears to no longer be a problem with MSVC 2013. (The little change in the rewriting code of compilerplugins/clang/override.cxx was necessary to prevent an endless loop when adding "override" to OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager(); in chart2/source/inc/LifeTime.hxx, getting stuck in the leading OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.) Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-09-09loplugin:constantparam in sot..svlNoel Grandin3-15/+7
Change-Id: I08db2db3b90725c556e3ba062da5d62d98f6e882 Reviewed-on: https://gerrit.libreoffice.org/28769 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-09-06remove outdated comment, getter not neededJochen Nitschke1-1/+1
DBG_CHKTHIS call was removed from Which() in commit d205ff49be10159d1766c2d06182c02255497def Change-Id: I4d5b806f0b0733ae3dc84c672ad9d6915d211f68 Reviewed-on: https://gerrit.libreoffice.org/28682 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-09-06use range based loops in SfxItemPoolJochen Nitschke3-72/+60
access arrays with [] try to clear up Delete() Change-Id: Ifcb741f56d263cf79c751aa6e32b410e6c22e6ef Reviewed-on: https://gerrit.libreoffice.org/28673 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-09-04get index only when neededJochen Nitschke1-7/+6
GetIndex_Impl can't be USHRT_MAX for nWhich > SFX_MAX_WHICH bSID is true and GetIndex_Impl returns nWhich - pImpl->mnStart Change-Id: I392e544d65196b7af143ee1864f9065e92b717d1 Reviewed-on: https://gerrit.libreoffice.org/28665 Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-09-02convert ppPoolDefaults to std::vectorJochen Nitschke3-38/+34
Change-Id: I13ba5b66f3ea70bae28181f580579c73a4353f68 Reviewed-on: https://gerrit.libreoffice.org/28599 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Jenkins <ci@libreoffice.org>
2016-09-01coverity#1372396 Uncaught exceptionCaolán McNamara2-4/+2
Change-Id: Idd2be5ba18d68ab9b5f7da12b69727480ad9ff50
2016-09-01coverity#1372381 Uncaught exceptionCaolán McNamara2-4/+2
Change-Id: I37fb1503737f81edb92a0571cc6222a69ba465c2
2016-09-01tdf#79398 Insert LCID in the correct sub-formatLaurent Balland-Poirier1-15/+15
During XL export, LCID is insert in format if necessary. If there are several sub-formats ([>0];[<0];[0]) this commit insert LCID in the correct one. Change-Id: I016c38a3338634113bfc0aa7e20e028e2e01e201 Reviewed-on: https://gerrit.libreoffice.org/28427 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-09-01use SfxItemPool::IsWhich instead of custom implementationJochen Nitschke2-10/+10
Change-Id: I56cbdc1ede491486643f73a98117c5cd4ce77c1d Reviewed-on: https://gerrit.libreoffice.org/28564 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-09-01use IsStaticDefaultItem from poolitem.hxx instead of custom checksJochen Nitschke1-1/+1
Change-Id: Ic49a940d83e5b8944bd724203bb2045bb1eb22b9 Reviewed-on: https://gerrit.libreoffice.org/28567 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-09-01use SfxItemPool::IsSlot instead of custom implementationJochen Nitschke1-2/+2
Change-Id: I435fb78f10f361120ee1865465dab93aa4661806 Reviewed-on: https://gerrit.libreoffice.org/28565 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-09-01avoid warning in PoolItemTestJochen Nitschke2-28/+27
> warn:legacy.tools:19758:1:svl/source/inc/poolio.hxx:139: > Start-Which-Id must be greater 0 adapt ID range in the test and leave usage comment in SfxItemPool ctor params Change-Id: I93150be8d3d1e330c6574b9f8d05b3b1ef2ffa43 Reviewed-on: https://gerrit.libreoffice.org/28570 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-30loplugin:stringconstant: adapt to improved OUStringLiteral1 (svl)Stephan Bergmann3-24/+23
Change-Id: I5b9c503fd28209b893688e81ddd00eb843b44e37
2016-08-30tdf#96248 delete SfxPoolItems with Which Id >= 4000Jochen Nitschke1-9/+2
Which Ids > 4999 (SFX_WHICH_MAX) are Slot Ids and handled above. Which Ids >= 4000 and <= 4999 are used by EditEngineItemPool, defined in eeitem.hxx (values 3994 to 4048). the former hack prevented that some of PoolItems got deleted when RefCount dropped to 0. when trying to Remove the PoolItem again, an earlier assert hits. hack and comment are in source since initial commit, other referenced comment is nowhere to be found. Change-Id: I299b2ae4aed088d4ee438397d0bb91ca8d055cef Reviewed-on: https://gerrit.libreoffice.org/28429 Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-08-30Let OUStringLiteral1 take its arg as ctor arg, not template argStephan Bergmann2-6/+6
...which makes it more flexible, can now also be used on non-const arguments. The drawback of the argument no longer being a compile-time constant is remedied by making the ctor constexpr. Change-Id: Ia4903a2cc86791fece92eac0cb8406b6659dd19d
2016-08-29Adapt loplugin:stringconstant to improved OUStringLiteral1Stephan Bergmann2-6/+6
Change-Id: Ibc5128df8bcf8cb5f2f09551c0de6dfdb46bdee0 Reviewed-on: https://gerrit.libreoffice.org/28447 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-08-29cid#1371226 Missing move assignment operatorNoel Grandin1-0/+22
Change-Id: I915b24d8f546f156b85ad18ad0418903fa3ce1ba
2016-08-27put StreamMode masks in scope of enum classJochen Nitschke1-2/+2
Change-Id: I77682f7e289a59b986bb84edf014029a20266470 Reviewed-on: https://gerrit.libreoffice.org/28420 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-25tdf#100726 - Improve readability of OUString concatanationsGökhan Gurbetoğlu1-4/+4
Improved readability of OUString concatanations. Also removed unused OUStrings "sColor" and "sEntry" from the code. Change-Id: Ie9792f499cd880be72229f8a8c71f05ff8e258b6 Reviewed-on: https://gerrit.libreoffice.org/28375 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-08-23rename rNum to aNatNumEike Rathke1-13/+13
... since it is a copied instance now. Change-Id: Ied3845cde42cb39ecabafa660d3ba7f6b1ca8b48