summaryrefslogtreecommitdiff
path: root/svl
AgeCommit message (Collapse)Author
2017-04-28loplugin:salunicodeliteral: svlStephan Bergmann
Change-Id: Iaa5b97267b6487c37744bd08d21c82015da9d522
2017-04-28clang-tidy readability-simplify-boolean-exprNoel Grandin
Change-Id: Iea7ab64683f0b29794d50d774cc482b54a00e70a Reviewed-on: https://gerrit.libreoffice.org/36450 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-26use strong_int for LanguageTypeNoel Grandin
Change-Id: If99a944f7032180355da291ad283b4cfcea4f448 Reviewed-on: https://gerrit.libreoffice.org/36629 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-25tools: svstream.hxx needs only errcode.hxx & not errinf.hxxChris Sherlock
Change-Id: Ia28e35ae5af4f601e9a586a3deffbcd61702b0ca Reviewed-on: https://gerrit.libreoffice.org/36896 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-04-21gbuild: Remove MSVC 2013 legacy codeDavid Ostrovsky
Uwinapi is discontinued. Change-Id: I063b4d0d8fab2d60de168e960a63b8181158ac01 Reviewed-on: https://gerrit.libreoffice.org/23198 Reviewed-by: David Ostrovsky <david@ostrovsky.org> Tested-by: David Ostrovsky <david@ostrovsky.org>
2017-04-21remove unnecessary explicit linefeeds from end of SAL and OSL log callsNoel Grandin
Change-Id: I3fa363c8e76e6cfb297f4ec346e3f031c09d6fbf Reviewed-on: https://gerrit.libreoffice.org/36727 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-20loplugin:inlinefields in FSStorage_ImplNoel Grandin
Change-Id: I6650d39f8f4c2f271e3936d590fe7eb500e674fe Reviewed-on: https://gerrit.libreoffice.org/36665 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-19loplugin:useuniqueptr (clang-cl)Stephan Bergmann
Change-Id: Ia854d1d6a8bd5f5f9a87aebb57337a992606c03f
2017-04-19coverity#1405221 silence Out-of-bounds readCaolán McNamara
Change-Id: I39b84b1d0272c2e8aa606e8b2e9ab0d2d88c3586 Reviewed-on: https://gerrit.libreoffice.org/36671 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-04-18Resolves: tdf#107012 follow date order of the target localeEike Rathke
... when converting format codes between locales, so en-US MM/DD/YYYY correctly ends up as de-DE DD.MM.YYYY instead of MM.DD.YYYY Change-Id: Iccfdd4787fc05462f47266c77cc9e95d14dae60d
2017-04-13convert DateFormat to scoped enum and rename to DateOrderNoel Grandin
Change-Id: I71d7a7755a5c20d5146d1ad7e96ca22b7823173a Reviewed-on: https://gerrit.libreoffice.org/36517 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-04-10tdf#106190 Tests of fraction formatsLaurent Balland-Poirier
Improve error message if test fails Add more formats to test Need https://gerrit.libreoffice.org/35320/ Change-Id: I89f5071e12ff87cdf1c03912922918390531e972 Reviewed-on: https://gerrit.libreoffice.org/35377 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-04-07loplugin:redundantcast find cstyle arithmetic castsNoel Grandin
Change-Id: If7c259f0d12a41182f476ddb558f7cb5f76f9577 Reviewed-on: https://gerrit.libreoffice.org/36253 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-07tdf#39468 Translate German commentsJens Carl
Translate German comments and terms in dbaccess/, extensions/, formula/, include/, reportdesign/, rsc/, sd/, svtools/, and vcl/ Change-Id: Ie20dadda0eeb0786eb328c6c652287d5481c5e3b Reviewed-on: https://gerrit.libreoffice.org/36249 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-04-06make page size compile time constantJochen Nitschke
on educated guess > std::numeric_limits<sal_uInt32>::max() - sizeof(few fields) + 1 is always greater 1000 Change-Id: If0e91e27aabc2bda4beccb5e98eb20a7c890e2f0 Reviewed-on: https://gerrit.libreoffice.org/36201 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-06Improved loplugin:redundantcast, static_cast on arithmetic types: svlStephan Bergmann
Change-Id: I9a99d243173eb2300a57d47097b2eef8c48bb76b
2017-04-06tdf#106190 Fix (again) left alignment of denominatorLaurent Balland-Poirier
Instead of moving spaces from left to right, like it was done previously, this patch insert spaces directly on right when in denominator This avoid complex calculation when user enter such (stupid) format: # ?/ ??? or # ?/" hello world "??? In SvNumberformat::ImpNumberFill, for NF_SYMBOLTYPE_FRAC_FDIV you need at least to move in sBuf, to insert text at the expected place for (stupid) format like # ?/ 100 or # ?/" hello world "100 All these formats works, but are stored in ODF with text after fraction Change-Id: I296e60643e93242b8006848a643135219ad4ad0c Reviewed-on: https://gerrit.libreoffice.org/35320 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-04-05loplugin:constantparam part2Noel Grandin
Change-Id: I7ec4c946be52a6b56aee908426f95ecacc7b0746 Reviewed-on: https://gerrit.libreoffice.org/36072 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-04Finally switch MSVC to sal_Unicode = char16_t, tooStephan Bergmann
There is lots of (Windows-only) code that relied on sal_Unicode being the same as wchar_t, and the best change may be different in each case (and doing the changes may be somewhat error prone). So for now add SAL_U/SAL_W scaffolding functions to sal/types.h, remove their uses one by one again, and finally drop those functions again. Change-Id: I2cc791bd941d089901abb5f6fc2f05fbc49e65ea Reviewed-on: https://gerrit.libreoffice.org/36077 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-04loplugin:unusedmethodsNoel Grandin
Change-Id: I30f9b6e68a7aa73782c980749e34f8f8d40ae57b Reviewed-on: https://gerrit.libreoffice.org/36047 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-03tdf#39468 Translate German commentsJens Carl
Translate German comments and terms in UnoControls/, editeng/, filter/, odk/, reportdesign/, sd/, sfx2/, starmath/, svl/, svtools/, toolkit/, tools/, writerfilter/, and xmloff/. Change-Id: Ibc401a425ddfdf41e4e4a78600f3fbce8cfaa2b1 Reviewed-on: https://gerrit.libreoffice.org/35992 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-03-31tdf#82580 tools: rename Rectangle to tools::RectangleMiklos Vajna
Mostly generated using make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle" Except some modules have their own foo::tools namespace, so there have to use ::tools::Rectangle. This commit just moves the class from the global namespace, it does not update pre/postwin.h yet. Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2 Reviewed-on: https://gerrit.libreoffice.org/35923 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-03-30remove type decorations on char literalsJochen Nitschke
they are only needed where type deduction fails. left them in defines for now. Change-Id: I7f002dd6bc7acc083c73b6c64076de6dd28d0b09 Reviewed-on: https://gerrit.libreoffice.org/35893 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-29loplugin:unusedmethodsNoel Grandin
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 Grandin
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 Gelmini
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 Grandin
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 Bergmann
Change-Id: I8bf3e30687e20151a9e1936e69362abfe9b3a99d
2017-03-22Use rtl::isAscii* instead of ctype.h is* with sal_Unicode argStephan Bergmann
Change-Id: I744f774e6e43866f1c6ef9ff8de2d9f2e183f0be
2017-03-21tdf#96505 - Get rid of cargo cult long integer literalsudaycoder
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 Nitschke
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 Grandin
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 Grandin
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-Poirier
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 Rathke
... so only SvNumberFormatter can use it, as intended. Change-Id: I91875dfd00d1f83b3ae988bda922782336489f73
2017-03-11Fix typosAndrea Gelmini
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 Rathke
Change-Id: I68d6cca1b359aa8fba42663bddb1107c31102415
2017-03-10prevent string access out of boundsEike Rathke
Though only the closing 0-character and the following check excludes that, dbgutil asserts. Change-Id: Ife1299042a60f6f058c4cf58b406d1cc022786a7
2017-03-10string access out of boundsEike Rathke
Change-Id: I4f6e6e8e77cdabe593bca5719b6ef38aeecc5da7
2017-03-09Clean up uses of integer typesStephan Bergmann
Change-Id: I1155dfe3e2bcfe2c15c101c7373fcc9e161aa366
2017-03-06tdf#106190 Move meber variable to localLaurent Balland-Poirier
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 Bergmann
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 Bergmann
...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 Grandin
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 Gelmini
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 Grandin
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-Poirier
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 Grandin
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 Grandin
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 Bergmann
Change-Id: I2e80e15ded19e09853ec16f9876e425a88cf910e