summaryrefslogtreecommitdiff
path: root/sc
AgeCommit message (Collapse)Author
2020-01-28New loplugin:unsignedcompareStephan Bergmann
"Find explicit casts from signed to unsigned integer in comparison against unsigned integer, where the cast is presumably used to avoid warnings about signed vs. unsigned comparisons, and could thus be replaced with o3tl::make_unsigned for clairty." (compilerplugins/clang/unsignedcompare.cxx) o3tl::make_unsigned requires its argument to be non-negative, and there is a chance that some original code like static_cast<sal_uInt32>(n) >= c used the explicit cast to actually force a (potentially negative) value of sal_Int32 to be interpreted as an unsigned sal_uInt32, rather than using the cast to avoid a false "signed vs. unsigned comparison" warning in a case where n is known to be non-negative. It appears that restricting this plugin to non- equality comparisons (<, >, <=, >=) and excluding equality comparisons (==, !=) is a useful heuristic to avoid such false positives. The only remainging false positive I found was 0288c8ffecff4956a52b9147d441979941e8b87f "Rephrase cast from sal_Int32 to sal_uInt32". But which of course does not mean that there were no further false positivies that I missed. So this commit may accidentally introduce some false hits of the assert in o3tl::make_unsigned. At least, it passed a full (Linux ASan+UBSan --enable-dbgutil) `make check && make screenshot`. It is by design that o3tl::make_unsigned only accepts signed integer parameter types (and is not defined as a nop for unsigned ones), to avoid unnecessary uses which would in general be suspicious. But the STATIC_ARRAY_SELECT macro in include/oox/helper/helper.hxx is used with both signed and unsigned types, so needs a little oox::detail::make_unsigned helper function for now. (The ultimate fix being to get rid of the macro in the first place.) Change-Id: Ia4adc9f44c70ad1dfd608784cac39ee922c32175 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87556 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-28remove some unused local varsNoel Grandin
found by my new aggressive unused var plugin. these are unused return values from function calls Change-Id: I3359c583f535828f192cb833762dfedc008d82f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87439 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-27drop SvxColorListBox forward declaresCaolán McNamara
Change-Id: I0db2e3e5c2566ae4dc59ff49f677eab8daa930be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87465 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-26tdf#124176: Use pragma once instead of include guardsBurak Bala
Change-Id: Ib2465f040f12413560b2cec1c742cf3558461309 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87404 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2020-01-26Use properly typed variable for iterationStephan Bergmann
Change-Id: Ifb81145c7238ef6b4916e0ef0984c9b868319aec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87451 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-26Use properly typed variables for iterationStephan Bergmann
Change-Id: Id4857933ae7f038ae14c356ce22257d3ab352c96 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87445 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-26remove some unused local varsNoel Grandin
found by a more aggressive variant of loplugin:unusedvariables. This is my first pass, committing the simplest and most obviously unnecessary vars Change-Id: I9676a6e39a101937097788548764506c93811c57 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87414 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-26rename some local variablesNoel Grandin
mostly to make the job of my very aggressive unused local vars plugin easier Change-Id: Ifc21a920841f8589f8b7e10de39dba6622a5d501 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87399 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-25Resolves: tdf#130159 hide writedirection unless CTL is enabledCaolán McNamara
rework as ToolboxControllers registered in Controller.xcu Change-Id: I3e7fea09fe83d1ed6400218c41384f82b38b07a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87419 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-25tdf#124176: Use pragma once instead of include guardsFaruk Demirbaş
Change-Id: I2c74c77115df7c9fd29ccf7722d00c71687046fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87402 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2020-01-25tdf#124176: Use pragma once instead of include guardEfdal İncesu
Change-Id: Ic525a57880067fc589346b87237c08fae4644ac5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87403 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2020-01-24conditionalentrymobile doesn't workCaolán McNamara
this is probably based on the non-mobile version, but by when it was initially integrated it was already out of sync with the non-mobile version and can't work as it is Change-Id: I480052230d2f893f540cacb2cc2c3b699f9cba1a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87283 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-24Revert "lok: ui: more files to increase the 'step-increment'"Miklos Vajna
This reverts commit 0a64b33617299ece871a947828855b16e2482706. Let's revert this till it's clear how to fix UITest_writer_tests2 to not hang with these changes. Change-Id: I9b40b101ecdad0ccac9a0b52b6a2ef19bd47a38c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87333 Reviewed-by: Henry Castro <hcastro@collabora.com> Tested-by: Henry Castro <hcastro@collabora.com>
2020-01-24loplugin:makeshared in scNoel Grandin
Change-Id: Ie287b5c11a1276c56f416f17ea69cddd5992b4a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87326 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-23lok: ui: more files to increase the 'step-increment'Henry Castro
property to 5. In mobile view, touch spin button should increment by 5 Change-Id: Ib3c8966443d053ab0588fa0c124f0daae31b7ed8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86844 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86854 Tested-by: Henry Castro <hcastro@collabora.com>
2020-01-23loplugin:unusedmethodsNoel Grandin
Change-Id: Ic2212a502bbd42217934884f4fce49f6f8d4765c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87236 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-23weld SvxFontWorkDialogCaolán McNamara
Change-Id: If9da7ad6a834d22f1bcab8d41ce7fe1f80168946 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/84774 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-23Resolves: tdf#129158 freeze/thaw around bulk insertsCaolán McNamara
Change-Id: I0ba22cd262512b467abd383d2f932d2adf6ca1a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87256 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-22rework line style to be a wide toolbar buttonCaolán McNamara
involves converting SvxLineStyleToolBoxControl to a PopupWindowController because chart is doing interesting things in its panel there needs to be a non-standard way to report/detect the selected line style, which is then reused to disable/enable the arrows when none is selected/deselected in non-chart sidebars SvxLineBox becomes a toolbar dropdown instead of a combobox itemwindow linectrl.cxx split into linewidthctrl.cxx and linewidthctrl because SvxLineBox is now needed in svxcore Change-Id: Icf0ef5e612b894a43d389af8a2908138c2e9c580 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87164 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-22tdf#83779: convert TRUE/FALSE constants to functions TRUE()/FALSE()Mike Kaganski
This avoids problems with round-tripping Excel spreadsheets, where previously a formula like =IF(ISNA(A1)=FALSE;"a";"b") was imported as =IF(ISNA(A1)=0;"a";"b"), and when exported back, it didn't work in Excel, because boolean values had a distinct type in it. Change-Id: I672a631bfa1a4811349794f714293404c6b24381 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86238 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2020-01-22use fastparser in ScXMLMasterStylesContextNoel Grandin
Change-Id: I02a303fb9940749fbd1ae3e951b1b9bbf4a3052e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87176 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-22tdf#130112 lok: Do not apply zoom-factor twice...Dennis Francis
... in ScOutputData::FillReferenceMarks(). mnPPT[XY] already has the factor aZoom[XY] in it. Refer ScViewData::CalcPPT() to see how PPT[XY] are derived. Change-Id: I3f9b5c01cb53514450fad5f7b2b6861b112effdb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87158 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit 3f62c10548466119ec6b1a662ab339e5dbe0b05f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87170 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2020-01-22use fastparser for XMLFontStylesContextNoel Grandin
Change-Id: I7b273cdc0f90f2a8c9527d1f19fed97672a74741 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87175 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-21use more FastParser in SvXMLStylesContextNoel Grandin
Change-Id: I05c7314739246a864b16723c13bd8fbb4ef725e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87146 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-21use more FastParser in ScXMLChangeInfoContextNoel Grandin
had to hack the token constant generating process a little because we have two tokens that only differ in "-" vs "_" Change-Id: I0744d697918d28cca0c92b83ecfd37c1ae9d2bae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87138 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-21Use FastParser in XMLDocumentSettingsContextNoel Grandin
and flatten the pImpl data Change-Id: I8d817cd2af0a3855d10dbfaa580c3379119d5067 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87126 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-21tdf#129412: Crash when registered data source is not availableJulien Nabet
See bt here: https://bugs.documentfoundation.org/show_bug.cgi?id=129412#c4 Regression from: https://cgit.freedesktop.org/libreoffice/core/commit/?id=9009663deb8f0862f419fd99bf0b761c7f923eff author Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> 2017-02-26 22:48:06 +0100 committer Tomaž Vajngerl <quikee@gmail.com> 2017-04-04 13:39:29 +0000 commit 9009663deb8f0862f419fd99bf0b761c7f923eff (patch) tree ea25976de0919f9d2161037d83be0eace4c1070b parent 1931b5b01c6fdaa204d26ec4b9675dad16373cf2 (diff) tdf#83257 [API-CHANGE] Pivot chart implementation Change-Id: Ib4de665f6e5380baf51589c92473ad88e8c9b84e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87096 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-01-21use FastParser in XMLScriptContextNoel Grandin
Change-Id: I7c5f5b77a78307c556ee5718480346ed3dd159fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87075 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-21Propagate warning error code from dBASE export, tdf#130020Eike Rathke
Long time existing code cleared all warnings set by the actual export routine. I could not figure out why this ever was done. It started short after the initial OOo import with commit 0ec1e9cbdfb4be18ea18b6b9be567d23bff5963f CommitDate: Fri Oct 27 18:00:10 2000 +0000 dBase export: don't set warning errorcodes that did not set warnings at the medium anymore without giving a rationale. Change-Id: I0f26d0644890c53557076ac7b99ffe7c8756a047 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87109 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2020-01-20calc sidebar alignment updateandreas kainz
Change-Id: Ia8d0771766ef1c59a3473e3bc70cea39bb4cf37e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87015 Tested-by: Jenkins Reviewed-by: andreas_kainz <kainz.a@gmail.com>
2020-01-20Fix wrong translation of commentEike Rathke
... and give it back the original meaning. Change-Id: I71cf8840c82eb2c1d1b07503748a9fac3daafd02
2020-01-18calc sidebar cellappearance simplyficationandreas kainz
Change-Id: I22a69805816d0ca6a00443075ea4d5cc15c1b544 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87017 Tested-by: Jenkins Reviewed-by: andreas_kainz <kainz.a@gmail.com>
2020-01-18tdf#130054: consider all row/col bars in ScTabView::EnableRefInputMike Kaganski
Left col bar and bottom row bar were ignored - apparently overlooked at least since commit 9ae5a91f7955e44d3b24a3f7741f9bca02ac7f24. Change-Id: I5c2386b0aa1fdbb42f352c0b654e268dc62c7e66 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87007 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-01-18calc sidebar numberformat alignment and arrangementandreas kainz
Change-Id: Id283e72ea0f54124df5daa5f74baef62b544e0f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86974 Tested-by: Jenkins Reviewed-by: andreas_kainz <kainz.a@gmail.com>
2020-01-17show degree symbol in DialControl linked spinbuttonsCaolán McNamara
Change-Id: I792755f043109173606a78e947d5dc01f78c6849 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86982 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-17Clean up duplicated command dispatch test functionalityMiklos Vajna
Used in both Writer and Calc at 5 different places, so host it in unotest/. Change-Id: I013e6df471deb8693cf4ae62f0958b12e16fda7b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86972 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-01-17use std::vector in ScMarkArray, instead of re-inventing the wheelNoel Grandin
and compact the ScMarkEntry record, this stuff shows up on perf profiles Also make these classes so we don't need to #include the cxx into a unit test. Change-Id: Id806385ae877a576ec25e7772c972448dada130b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86907 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-16drop some unneeded includesCaolán McNamara
Change-Id: I312acdd1e893e24c78df76d663e306ba6aa54cd7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86920 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-15rework SvxUndoRedoControl to be a PopupWindowControllerCaolán McNamara
Change-Id: I78b4e03c76bc3aa8479013ae157a9e1316dcfecd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86841 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-15tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctorMesut Çifci
Change-Id: Ib58c66590c60175d7984af55d23b7c55a6a2383e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86828 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-15tweak GetBitmap methods in BitmapExNoel Grandin
so we return a const& for the normal case, just like other methods, which reduces copying. This revealed that CreateDisplayBitmap in Bitmap can be const. Change-Id: I9f9b9ff0c52d7e95eaae62af152218be8847dd63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86836 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-15do not ignore return value of a (confusing) function (tdf#126248)Luboš Luňák
The two ScCellFormat::GetString() overloads are lame API, one returns the value normally and the other one returns void and uses a reference parameter. I got confused by this in 6f810e3d7dafcd7d0101173a501 and didn't use the return value in one case. Change-Id: I0b6c839f9d0299e14ea022813481802275df5ea6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86750 Tested-by: Jenkins Reviewed-by: 锁琨珑 <suokunlong@126.com> Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-01-15tdf#129393 Calc: cannot format whole row of unprotected cellsNoel Grandin
regression from commit 3c3a371c799d00475deb13b4c3e0a8860c7e4fb3 tdf#125254 Performance: A spreadsheet opens too slow, part2 Change-Id: I87e06a58d6a4eb1a32bdf7e9267a4fe9d6dc4f2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86826 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-15clang-tidy modernize-concat-nested-namespace in scNoel Grandin
Change-Id: I6a9b2b912434c053e20ce06ef03e52451e506693 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86804 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-14rework SfxEmojiControl to be a PopupWindowControllerCaolán McNamara
Change-Id: Ia3262e5b54257d5556c500f440806ac2df9886cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86794 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-14remove some unneeded includesCaolán McNamara
Change-Id: Ic7add88f04fb53960c4d76414fb655cb4e5040b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86745 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-14rework SfxCharmapCtrl to be a PopupWindowControllerCaolán McNamara
With MSVC, the changes to include/sfx2/charmappopup.hxx would cause spurious > isvt.lib(svtlo.dll) : error LNK2005: "public: virtual class com::sun::star::uno::Any __cdecl cppu::ImplInheritanceHelper<class svt::ToolboxController,class com::sun::star::lang::XServiceInfo>::queryInterface(class com::sun::star::uno::Type const &)" (?queryInterface@?$ImplInheritanceHelper@VToolboxController@svt@@VXServiceInfo@lang@star@sun@com@@@cppu@@UAA?AVAny@uno@star@sun@com@@ABVType@4567@@Z) already defined in classificationcontroller.o > isvt.lib(svtlo.dll) : error LNK2005: "public: virtual void __cdecl cppu::ImplInheritanceHelper<class svt::ToolboxController,class com::sun::star::lang::XServiceInfo>::acquire(void)" (?acquire@?$ImplInheritanceHelper@VToolboxController@svt@@VXServiceInfo@lang@star@sun@com@@@cppu@@UAAXXZ) already defined in classificationcontroller.o > isvt.lib(svtlo.dll) : error LNK2005: "public: virtual void __cdecl cppu::ImplInheritanceHelper<class svt::ToolboxController,class com::sun::star::lang::XServiceInfo>::release(void)" (?release@?$ImplInheritanceHelper@VToolboxController@svt@@VXServiceInfo@lang@star@sun@com@@@cppu@@UAAXXZ) already defined in classificationcontroller.o when linking Library_sfx (and which appears to be unrelated to the (implicit) /INCREMENTAL since 9739c37d8ad7c6fca269709674a6975fa7ebd191 "enable incremental linking on windows"), which requires the HACK in include/svtools/popupwindowcontroller.hxx. Change-Id: I74c4318e6216001f18d0cf5ed63e78ba2ab13cd3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86664 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2020-01-13mobile: escape JSON for function wizard, and emit only on mobile.Michael Meeks
Otherwise typing "-> wa" into a cell gives JS exceptions. Change-Id: I5303186fe9f84e055d65cf1929ccf5a7a20cae35 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86706 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-01-13rework TextUnderlinePopup to be a PopupWindowControllerCaolán McNamara
Change-Id: I149777b827dd00e00e62b461836122861864f829 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86697 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-13rework TextCharacterSpacingPopup to be a PopupWindowControllerCaolán McNamara
Change-Id: I3db8f93b99157f7ee8d6095f7dfc5c2b2e6890e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86690 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>