summaryrefslogtreecommitdiff
path: root/svl
AgeCommit message (Collapse)AuthorFilesLines
2017-03-29loplugin:unusedmethodsNoel Grandin3-41/+0
Change-Id: Ib008613fb06c82791c63d5b074a3e2ff1c3607a0 Reviewed-on: https://gerrit.libreoffice.org/35834 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-29convert SearchBehavior to scoped enumNoel Grandin3-3/+3
Change-Id: I57f03fc43aff838c7066556319a3a5a187e46ad3 Reviewed-on: https://gerrit.libreoffice.org/35831 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-25Fix typosAndrea Gelmini3-3/+3
Change-Id: I4eda687db6ad8d41e6a28430c76b288510da605d Reviewed-on: https://gerrit.libreoffice.org/35645 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-24convert ViewShellId to o3tl::strong_intNoel Grandin1-9/+9
Change-Id: I45553d11d56aa8c4432aec126ca51f24bd3ead09 Reviewed-on: https://gerrit.libreoffice.org/35421 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-23Remove unused #include <ctype.h>Stephan Bergmann3-3/+0
Change-Id: I8bf3e30687e20151a9e1936e69362abfe9b3a99d
2017-03-22Use rtl::isAscii* instead of ctype.h is* with sal_Unicode argStephan Bergmann2-13/+4
Change-Id: I744f774e6e43866f1c6ef9ff8de2d9f2e183f0be
2017-03-21tdf#96505 - Get rid of cargo cult long integer literalsudaycoder1-1/+1
Change-Id: I56fbc7cd9c879b18ac65c5e6adf80f01c6b95b84 Reviewed-on: https://gerrit.libreoffice.org/35176 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-03-17cleanup double includes and declarationsJochen Nitschke1-1/+0
Change-Id: I770e09f48b1a3e8299f59a8e475ba3c18d436d7b Reviewed-on: https://gerrit.libreoffice.org/35312 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-03-17remove unused defines from HRC files in svlNoel Grandin1-25/+0
Change-Id: Ib8e45921593784cccd5ff29feba47b6953b860e8 Reviewed-on: https://gerrit.libreoffice.org/35278 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-16drop GetId() from SfxUndoActionNoel Grandin1-16/+0
mostly so that the subclasses can use proper enum types for their own IDs. It turns out that nothing at the svl/sfx2 level needs an ID anyhow. Change-Id: I3c020aeafb812fa30d896216d4e3bc1a82cbfeab Reviewed-on: https://gerrit.libreoffice.org/35222 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-14Following tdf#106190 Treat blank after fraction barLaurent Balland-Poirier2-6/+7
To consider that denominator is found (bDenom=true) there must be some digits found after fraction bar Dummy format # ?/ ? can now work again (even with blank as thousands delimiter). However such format can not be saved (except in XLS) Change-Id: I657e97e09a6ae4c08a29ad6d0b586c85a9968e3d Reviewed-on: https://gerrit.libreoffice.org/35111 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-03-13force SvNumberformat::FormatterPrivateAccess for Get/SetLastInsertKeyEike Rathke1-8/+9
... so only SvNumberFormatter can use it, as intended. Change-Id: I91875dfd00d1f83b3ae988bda922782336489f73
2017-03-11Fix typosAndrea Gelmini1-1/+1
Change-Id: Ia79bc8d35cf19438d177f31a8e0c8603102b4ef1 Reviewed-on: https://gerrit.libreoffice.org/35061 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-10guard against a (theoretical?) endless loop of blanks onlyEike Rathke1-1/+3
Change-Id: I68d6cca1b359aa8fba42663bddb1107c31102415
2017-03-10prevent string access out of boundsEike Rathke1-10/+13
Though only the closing 0-character and the following check excludes that, dbgutil asserts. Change-Id: Ife1299042a60f6f058c4cf58b406d1cc022786a7
2017-03-10string access out of boundsEike Rathke1-1/+5
Change-Id: I4f6e6e8e77cdabe593bca5719b6ef38aeecc5da7
2017-03-09Clean up uses of integer typesStephan Bergmann1-2/+3
Change-Id: I1155dfe3e2bcfe2c15c101c7373fcc9e161aa366
2017-03-06tdf#106190 Move meber variable to localLaurent Balland-Poirier2-2/+1
Update b2738c6f67cb650ac32228f3cd20b9dfe4b41c9c Change-Id: I8417dcf948e72376c7e67bee78df56c3021b55de Reviewed-on: https://gerrit.libreoffice.org/34913 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-03-05Proper fix for multiply defined SfxEnumItem<sal_uInt16> with MSVCStephan Bergmann2-8/+5
With --disable-pch the original hack from f091259ad2ec1590714645839668580cd7b8c7c4 "convert SfxEnumItem to type-safe template class" doesn't happen to work: When linking sd, the occurrences of SfxEnumItem<sal_uInt16> in sd/inc/sdattr.hxx clash with those from editeng (where LanguageType is a typedef for sal_uInt16) and svl (as the respective include files from editeng and svl happen to not be included). For whatever reason, the explicit instantiation declaration without a __declspec(...) in include/svl/eitem.hxx doesn't seem to make a difference (at least with MSVC 2015 Update 3). Change-Id: I51b5943fe19a7184db9414192c6364f7c26b79eb Reviewed-on: https://gerrit.libreoffice.org/34903 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-03Remove redundant 'inline' keywordStephan Bergmann2-4/+4
...from function definitions occurring within class definitions. Done with a rewriting Clang plugin (to be pushed later). Change-Id: I9c6f2818a57ccdb361548895a7743107cbacdff8 Reviewed-on: https://gerrit.libreoffice.org/34874 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-03remove unused CreateDefault methodsNoel Grandin1-3/+0
Change-Id: Ifbdd7d41f0938e9a03693f88416792ff8087f8c2 Reviewed-on: https://gerrit.libreoffice.org/34850 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-03Fix typosAndrea Gelmini1-1/+1
Change-Id: Ib25dadb25d8c2df1361de194f74cf3ddd459650d Reviewed-on: https://gerrit.libreoffice.org/34783 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-03convert SfxEnumItem to type-safe template classNoel Grandin2-32/+2
and drop the SvxChartTextOrientItem class, unused. Change-Id: I99100837d1beb953450f57b2cda47d165df1620c Reviewed-on: https://gerrit.libreoffice.org/34747 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-02tdf#106190 fix left alignment of denominatorLaurent Balland-Poirier3-13/+35
The bug was introduced with left aligment of denominator. Non feasable denominators were not tested and create infinite loop while inserting and removing the same space. This patch detects - if denominator starts just after fraction bar. Otherwise, format is faulty. - if a non digit is detected in the denominator, next part of format is treated as text This patch is changing behavior of some formats: "# ?/foo??" is treated as faulty format while it was considered as valid "# ?/??E?" is treated with 2 digits in denominator and "E?" at the end, while it was considered as faulty Change-Id: I0379a398dff79b6e21a44776c0d4356d066cdeab Reviewed-on: https://gerrit.libreoffice.org/34659 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-03-01typesafe wrappers for css::i18nutil::TransliterationModulesNoel Grandin1-39/+45
and related css::util::SearchOptions2 The TransliterationModules enum has it's constants spread over multiple UNO enum/constant-collections - TransliterationModules and TransliterationModulesExtra, which means that most code simply uses sal_Int32. Wrap them up into a better bundle so that only the lowest layer needs to deal directly with the UNO constants. Change-Id: I1edeab79fcc7817a4a97c933ef84ab7015bb849b Reviewed-on: https://gerrit.libreoffice.org/34582 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-28new loplugin unoanyNoel Grandin5-12/+12
Change-Id: I5d6c4a67cb2a09e7cd5bd620c6b262d188701b89 Reviewed-on: https://gerrit.libreoffice.org/34714 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-27loplugin:loopvartoosmallStephan Bergmann1-3/+2
Change-Id: I2e80e15ded19e09853ec16f9876e425a88cf910e
2017-02-24fix inverted warning logicJochen Nitschke1-3/+4
warning says the item pool is not empty, so test item pointers for not null. ever since initial commit cf7e1f9cc99e7c260cfab823f2c47f56035bdbd0 and make warning more descriptive by adding pool names Change-Id: I3a8a6ca69e319d01418eac527b15f61adfd0fb13 Reviewed-on: https://gerrit.libreoffice.org/34589 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-21Remove unused function. Following tdf#105657Laurent Balland-Poirier1-9/+0
Change-Id: I7890d76b35bcf5eb9a965fb90ae1a106913548e8 Reviewed-on: https://gerrit.libreoffice.org/34506 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-02-21tdf#106052 Treat SubFormat for "Precision as shown"Laurent Balland-Poirier1-0/+12
Get precision from the correct subformat Change-Id: I458e5b3d1fb515864f19499ac9ac529e1d68a267 Reviewed-on: https://gerrit.libreoffice.org/34505 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-02-20use SvNumberformat::GetMaskedType()Eike Rathke1-6/+5
... instead of manually masking out css::util::NumberFormat::DEFINED Change-Id: I0761132800b2b1693df41085695f36cd3cc1236b
2017-02-20tdf#105657 Treat "Precision as shown" for fractionsLaurent Balland-Poirier2-63/+93
For Option "Precision as shown", fraction must specificly be treated ImpGetFractionElements retrieves values of each part of fraction (integer, numerator, denominator) independently from its exact representation Update: avoid include of zformat.hxx in document4.cxx Change-Id: Ia3ea2322f3d311c04ef71f3260730c7154c3dc15 Reviewed-on: https://gerrit.libreoffice.org/34331 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2017-02-15unit test for engineering notation, tdf#105968Eike Rathke1-0/+35
Change-Id: Ib5303f09cfda232b0bee88df3d76650165337c08
2017-02-15Resolves: tdf#105968 handle engineering notation rounded into next magnitudeEike Rathke1-0/+11
Change-Id: Ie31ab88543994f0e8aeef8152c230c05e071ef8e
2017-02-13convert CharCompressType to scoped enumNoel Grandin1-4/+4
and move it to svl, where it belongs Change-Id: Ic4d846419dfe2dd85de5ade8ed1a041867bbf1dc
2017-02-10convert InsertOperation to scoped enumNoel Grandin1-1/+1
and drop unused LINK enumerator Change-Id: I6c42424ae5a7503b3e14e5f04fcf7a49b595b416
2017-02-10convert EItem to scoped enumNoel Grandin3-8/+4
and drop read-only enumerators: enum EItem E_APEARCFG enum EItem E_FLTRCFG enum EItem E_FONTSUBSTCONFIG enum EItem E_LANGUAGEOPTIONS enum EItem E_SEARCHOPT Change-Id: Ie3baaecec3d1c30404b4fb0d948e25d4bb2f3f93
2017-02-06Add missing #includesStephan Bergmann6-0/+10
...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 Nitschke1-25/+14
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 Grandin1-1/+1
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 Grandin6-10/+9
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 Nitschke1-12/+12
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 Bergmann21-819/+232
...(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 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>