summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/output.cxx
AgeCommit message (Collapse)Author
2023-08-10tdf#155799: sc: fix paint the reference markHenry Castro
If a reference mark is initiated with the first click, the initial range points are the same and extended if merged cells, but if the user drag&drop more cells the Range end has to extend if merged cells Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: Ife7c4514a9303226b73bff61bd0df689f81af42f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155533 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit ebd1a4d6fc3f9ba533a29fa54acf7b3b41c398d5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155485 Tested-by: Aron Budea <aron.budea@collabora.com> Reviewed-by: Aron Budea <aron.budea@collabora.com>
2022-11-12sc: fix rendering of conditional formatting iconTomaž Vajngerl
The bWorksInPixels flag isn't needed as it means some rendering information is in pixel instead of logic, but we render in logic, not in pixels as it is falsely assumed. So don't take into account the bWorksInPixels flag and just render in pixels when LOKit is active. Change-Id: I3703d459a2d1444c397f2d9e97af9f0d3010d544 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129546 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit d0a11f591a57754362bb86c4bb07869bc18e5f75) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142609 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Aron Budea <aron.budea@collabora.com>
2022-11-12sc: fix cond. format icon size, when we work with pixelsTomaž Vajngerl
This is the case when the device is bWorksInPixels is true, which is the case when running LOKit. Change-Id: Ibfced11bf614604521240908f4821fb9abfbf362 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128200 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit f2e1c6033890e513aa8e6b15dd6f26905d4622c8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142608 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Aron Budea <aron.budea@collabora.com>
2022-04-14don't bother drawing zero-width cellsLuboš Luňák
If a document has most columns hidden, then they'd be "drawn" anyway, since ScGridWindow::Draw() calls ExtendHidden(), this appears to be needed in order to drawn properly background after the last cell. So at least try avoid zero-sized draw operations which may add up enough to be noticeable with 16k columns Change-Id: I631e3be7467f8ea2dbfb824e647f900a7573da61 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131326 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-12sc: Sparkline rendering improvement, take all attrs. into accountTomaž Vajngerl
This change moves Sparkline rendering into a new class and into a separate file - SparklineRenderer, and improve the rendering by taking all the sparkline attributes into account. Improvements: - render correct line width for lines - take hidden cells into account - draw the X axis - allow to override the min, max values (custom X axis limits) - handle empty cells (interpret as zero, as a gap or interpolate) - correctly handle first and last value - take marker attribute and color into account (missing before) - simplify range iteration (with RangeTraverser class) - show min, max also for stacked sparkline type - ... Change-Id: Id855f775677aa309b42174e086ad4f5d7de079c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132541 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 574384e90fdb24aed40e0dcffd17adae3443aa04) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132876 Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2022-04-12sc: split attrs out of SparklineGroup into a COW classTomaž Vajngerl
The attributes can be independent of the actual SparklineGroup, so they can be shared through multiple SparklineGroups and with the attributes being COW, they can be safely changed without the fear that it will impact a different SparklineGroup insstance. Change-Id: I274b1243d014288ea34a213326ef765ceff86a58 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132502 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 634399594cfd1672caaf412ed4bc945f12aa4913) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132832 Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2022-04-12sc: change GetSparkline to return a shared_ptr instead of raw ptrTomaž Vajngerl
Change-Id: If3d7b3ad4b96eb7d3b126ee8b130f8d5e684cd3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132472 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 413f144e84629fe8f3bae5d984b40228fdeec5c1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132795 Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2022-04-11sc: use forward decl. instead of include for SparklineGroupTomaž Vajngerl
Shouldn't trigger large rebuilding when SparklineGroup.hxx is changed. Change-Id: I9c5d265e94dd92d9f23e86e3fc75ca0644991339 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132250 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit e60726891761ca29dcb72e27f075fef75a990c24) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132778 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2022-04-11sc: render Sparkline columns smaller - reducee by 70% of the widthTomaž Vajngerl
Change-Id: I265a8b87b521f873e0ddea7a1a5becc558483ed2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132249 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 70bedb257a79eac45d614a09808b2e18074fa174) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132777 Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2022-04-11sc: support sparkline bar colors, add markers to sparkline linesTomaž Vajngerl
Change-Id: I705a7f57cc4d6544ecb35a5f93c18a27056b9944 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131918 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 6c16dc217ef5cbe25166df7a3728ade12a148880) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132772 Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2022-04-10sc: use enums instead strings for some SparklineGroup props.Tomaž Vajngerl
Change-Id: I082c0a7693c97a67bc4972398224bce4bdae85eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131489 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 055fcef3fe3c3f74ed485a35451c48f6723991b6) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132550 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2022-04-10sc: initial code to draw sparkline into a cellTomaž Vajngerl
Change-Id: I82861f4210a24f57573f0ec96489e86ab168677b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131488 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit f2d07a3b17430d21d4567f7a01525a702544ed8d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132549 Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2022-03-23do not allocate so many CellInfo objects in FillInfo()Luboš Luňák
FillInfo() is used for drawing to screen, so it's given a range of rows and columns, but drawing also depends on all cells to the left (e.g. their width, for position), so it allocated CellInfo for all columns starting from 0. But with many columns this can easily mean allocating and initializing a large amount of memory, easily 90MiB with a maximized window and going to XFD1, and handling all that can be slow enough to be seen when moving around. Since only few of the CellInfo fields are actually needed for all columns, split them into a separate smaller BasicCellInfo, and allocate CellInfo only for columns that need it. And exception is the nRotMaxCol code (for rotated cells?), which accesses more of the fields, so for that case allocate the same way as before. Change-Id: I2f0f2a9c27b1a8b74b70fc2d208d0689e16ee1a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130607 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-03-23remove harcoded MAXCOL/MAXROW from ScBigAddressLuboš Luňák
Change-Id: I670bb5d6e7a1eb20d2bfd48b853d1d2ebf87fe70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129964 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-03-23replace various sal_uLong that might overflow with huge sheetsLuboš Luňák
16Mx16k cells is more than 32bit, so things like cell counts or progress -> sal_uInt64. Height/widths of complete rows/columns -> tools::Long. Change-Id: I8077ec0c97782310db024c20c335cfcbc3833227 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129634 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-03-23avoid destructing many unique_ptr's most of which are nullptrLuboš Luňák
With huge sheets there are so many CellInfo structures that calling all the destructors actually shows up in profiler data while trying to scroll around (it allocates CellInfo for every column starting from 0 up to the last one wanted). Keep the owning pointers in a vector that'll be much faster to process. Change-Id: Ibadb05fcce467fb808c38e2ed9a13b4cfef3720e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129699 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-03-23clean up accessing CellInfo array in RowInfoLuboš Luňák
The array allocates one extra item before and after, which means all indexing must add 1 to column number. And a lot of the code uses array index variables instead of column numbers, which makes it confusing whether the value is +1 or not. To sort this out, hide the array inside RowInfo and provide access functions that will hide those +1 from caller code, plus it will do error checking. Change-Id: Ia91bd76e15fc6c96c09f27c742d71001f4c4151c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129698 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-02-14sc: make icon size of cond. formatting same as font sizeTomaž Vajngerl
This makes the behavior of the Calc te same as other spreadsheet programs, where the icon size of the conditional formatting is the same as the font size and not the actual cell height (as it is the behaviour now). Change-Id: I00c96ad83458cd31f67c0b6f566e3d01dd8cd47b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128185 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-12-17tdf#58125 sc: don't show comment notifier for hidden columnsJustin Luth
This fixes a LO 3.6-ish regression. Things have changed a lot since then. I assume that pCell was empty when it was hidden. The test for pCell was removed in commit c06dbbe7594c2a0b5a5b19f8e183d9c421e6e094, which was in the range that bibisect suggested. Change-Id: I0af137358335a808de901111a71f5c113fabcf24 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127001 Reviewed-by: Justin Luth <jluth@mail.com> Tested-by: Jenkins (cherry picked from commit b58dbb862296b63f3f2395c59d30fba40fa5f59f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126975 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-12-09tdf#144107: fix incorrect conditioning on bGrid...Dennis Francis
introduced in 3092322bb83998397b09d3f34b6d04b5e5c1da50 The intention was to avoid the default line drawing in the original else branches to be conditional on bMergeCover. The previous patch used 'bGrid' as a surrogate for the original 'else' case - which is wrong. Change-Id: I7c6b49fa9c21064312273b1051ffc7f81de3fef3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126076 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com> (cherry picked from commit 307c1f13821386687b8cf3c560ff2570b89ac3a9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126134
2021-07-31drawinglayer: remove extendedInformation from ViewInformation2DTomaž Vajngerl
We actually never use extended information when normally using the ViewInformation2D. The exception here is when we construct it from property values, where the unknown property values are then stored into the extended information sequence and then later reconstructed when we convert it back to a sequence of property values. Just for that case we don't neeed to expose the extended information to the outside and create it, as that is then a implementation detail for the UNO use case. I am also not convinced we need it when creating ViewInformation2D with the sequence of property values - it certantly not expected that we need to preserve the property values at all, but that is something that needs to be checked. Change-Id: I3b8d533cd412aac8b89ca2921738d6487be5cf45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119720 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-04-07lok: draw bgcolor lines for covering client grid...Dennis Francis
... that are over merged cells area. This is needed as client has no information about merged cells. Change-Id: I625d64cc3abd0ee1e60a8af9469a152286f25fd0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113145 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit e3fa896aa14c03165190f0fef304ff0e8074d619) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113632 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2021-03-26tdf#119292 sc layout: fix overlapping wrapped cell textsTibor Nagy
if rotated by 90 or 270 degrees using clipping to cell boundaries, like MSO does. E.g. this avoid of importing MSO documents with unreadable header cells. Note: it's possible to improve the patch extending clipping for the neighboring empty area instead of clipping all text exceeding the cell boundary (as in the case of the non-rotated, non-wrapped text). Co-authored-by: Attila Szűcs (NISZ) Change-Id: Idd37f7eb7208ff3818dcdab93ef0ec57275db954 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111964 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-01-12transparency->alpha in tools::ColorNoel
this just changes the Get/Set methods, the constructor and internal representation of Color is not changed. Change-Id: Idb6e07cc08bbaa5bd55b6bd4b585e648aef507b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109074 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-08Introduce Color::IsFullyTransparentNoel
Change-Id: I94875b9fb7ee18edf63ed28902da4ae77eb14bb0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108973 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-08use more IsTransparentNoel
Change-Id: Ice7904f2531dba98101c5f7a05d14702fa897053 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108971 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-08tdf#138134 sc: remove red circle of updated formulaTibor Nagy
Recalculation of formulas didn't remove the red validation circle around the formula cells despite their new valid value. Note: to check/show the fix manually, run the test with $ (cd sc && make -srj8 UITest_validity UITEST_TEST_NAME="tdf138134.DetectiveCircle.test_delete_circle_at_formula" SAL_USE_VCLPLUGIN=gen) (if needed, by adding import time time.sleep(5) to the called function of sc/qa/uitest/validity/tdf138134.py) Co-authored-by: Attila Szűcs (NISZ) Change-Id: Ieda4449b1ef07a3cb536881e99130d967c1bb175 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106502 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-01-08use more IsTransparentNoel Grandin
Change-Id: I3ef18a2601a51d56614b5da9b56e871bd33ec79e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108942 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-02introduce Degree100 strong_int typeNoel
Change-Id: I78f837a1340be0ca5c49097f543a481b7b43a632 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108367 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-24custom literal for Degree10Noel Grandin
Change-Id: Id13869138a622e62d9ffebf2c89bddccda6aff01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108238 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-27tdf#42949 Fix new IWYU warnings in directory sc/Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I217817e2e4a42b096f5a7fb6344568c10d69aab2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106078 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-10-28convert some more long -> tools::LongNoel
grepping for stuff in template params this time Change-Id: Ia37bfd85480b3a72c3c465489581d56ad8dde851 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104855 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-26std::unique_ptr -> std::optionalNoel
Change-Id: Ib3a901c26874bb6e6b7deacca359cefacbb0a3e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104798 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-21new tools::Degree10 strong typedefNoel Grandin
partly to flush some use of "long" out the codebase, but also to make it obvious which units are being used for angle values. Change-Id: I1dc22494ca42c4677a63f685d5903f2b89886dc2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104548 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-20use tools::Long in scNoel
Change-Id: I8f37a8d1174ed816df971b8cee036d4e88d4a7fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104526 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-30loplugin:reducevarscope in scNoel
Change-Id: If88c71351fb157b8eab242fceb65422f05eec3d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103645 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-14loplugin:simplifybool moreNoel Grandin
look for expressions like !(a && !b) which can be expanded out Change-Id: I72515a9638762b050f9a258c08da39ebfa2ef8e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100579 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-12loplugin:flatten in sc/ui/viewNoel Grandin
Change-Id: I0ea33fc076a280e5f4559eea8420b1b7fa442361 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100400 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-01Upcoming improved loplugin:staticanonymous -> redundantstatic: scStephan Bergmann
Change-Id: Ie2d2d26bac69f4b228eadef712b06b665b3974eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97650 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-02-21Drop o3tl::optional wrapperStephan Bergmann
...now that macOS builds are guaranteed to have std::optional since 358146bbbd1b9775c12770fb5e497b6ec5adfc51 "Bump macOS build baseline to Xcode 11.3 and macOS 10.14.4". The change is done mostly mechanically with > for i in $(git grep -Fl optional); do > sed -i -e 's:<o3tl/optional\.hxx>\|\"o3tl/optional\.hxx\":<optional>:' \ > -e 's/\<o3tl::optional\>/std::optional/g' \ > -e 's/\<o3tl::make_optional\>/std::make_optional/g' "$i" > done > for i in $(git grep -Flw o3tl::nullopt); do > sed -i -e 's/\<o3tl::nullopt\>/std::nullopt/g' "$i" > done (though that causes some of the resulting #include <optional> to appear at different places relative to other includes than if they had been added manually), plus a few manual modifications: * adapt bin/find-unneeded-includes * adapt desktop/IwyuFilter_desktop.yaml * remove include/o3tl/optional.hxx * quote resulting "<"/">" as "&lt;"/"&gt;" in officecfg/registry/cppheader.xsl * and then solenv/clang-format/reformat-formatted-files Change-Id: I68833d9f7945e57aa2bc703349cbc5a56b342273 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89165 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
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-10use more std::make_sharedNoel Grandin
found using 'git grep', I tried using clang-tidy, but it only successfully found a tiny fraction of these Change-Id: I61c7d85105ff7a911722750e759d6641d578da33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86526 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-01Introduce o3tl::optional as an alias for std::optionalStephan Bergmann
...with a boost::optional fallback for Xcode < 10 (as std::optional is only available starting with Xcode 10 according to <https://en.cppreference.com/w/cpp/compiler_support>, and our baseline for iOS and macOS is still Xcode 9.3 according to README.md). And mechanically rewrite all code to use o3tl::optional instead of boost::optional. One immediate benefit is that disabling -Wmaybe-uninitialized for GCC as per fed7c3deb3f4ec81f78967c2d7f3c4554398cb9d "Slience bogus -Werror=maybe-uninitialized" should no longer be necessary (and whose check happened to no longer trigger for GCC 10 trunk, even though that compiler would still emit bogus -Wmaybe-uninitialized for uses of boost::optional under --enable-optimized, which made me ponder whether this switch from boost::optional to std::optional would be a useful thing to do; I keep that configure.ac check for now, though, and will only remove it in a follow up commit). Another longer-term benefit is that the code is now already in good shape for an eventual switch to std::optional (a switch we would have done anyway once we no longer need to support Xcode < 10). Only desktop/qa/desktop_lib/test_desktop_lib.cxx heavily uses boost::property_tree::ptree::get_child_optional returning boost::optional, so let it keep using boost::optional for now. After a number of preceding commits have paved the way for this change, this commit is completely mechanical, done with > git ls-files -z | grep -vz -e '^bin/find-unneeded-includes$' -e '^configure.ac$' -e '^desktop/qa/desktop_lib/test_desktop_lib.cxx$' -e '^dictionaries$' -e '^external/' -e '^helpcontent2$' -e '^include/IwyuFilter_include.yaml$' -e '^sc/IwyuFilter_sc.yaml$' -e '^solenv/gdb/boost/optional.py$' -e '^solenv/vs/LibreOffice.natvis$' -e '^translations$' -e '\.svg$' | xargs -0 sed -i -E -e 's|\<boost(/optional)?/optional\.hpp\>|o3tl/optional.hxx|g' -e 's/\<boost(\s*)::(\s*)(make_)?optional\>/o3tl\1::\2\3optional/g' -e 's/\<boost(\s*)::(\s*)none\>/o3tl\1::\2nullopt/g' (before committing include/o3tl/optional.hxx, and relying on some GNU features). It excludes some files where mention of boost::optional et al should apparently not be changed (and the sub-repo directory stubs). It turned out that all uses of boost::none across the code base were in combination with boost::optional, so had all to be rewritten as o3tl::nullopt. Change-Id: Ibfd9f4b3d5a8aee6e6eed310b988c4e5ffd8b11b Reviewed-on: https://gerrit.libreoffice.org/84128 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-07Show highlight ranges when chart is selectedSzymon Kłos
Change-Id: Ibb9a085699065869a7f122f37a36c5873b934271 Reviewed-on: https://gerrit.libreoffice.org/82138 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/82140 Tested-by: Jenkins
2019-10-22sc: rowcol: tdf#50916 convert outputNoel Grandin
Change-Id: I6fbcf26dbf6a5dfa506d5c69b123dbb297855ef3 Reviewed-on: https://gerrit.libreoffice.org/81304 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-03loplugin:unusedfieldsNoel Grandin
and filter out the weld fields, since we're not touching them yet Change-Id: I3cc23c46d2650f13cb29c7d381687939d23e2882 Reviewed-on: https://gerrit.libreoffice.org/80104 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-24Add reference marks callbackSzymon Kłos
Change-Id: Ic749e138356392b0c327a30cff28055f06e23e2e Reviewed-on: https://gerrit.libreoffice.org/79464 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-08-12Fix typosAndrea Gelmini
Change-Id: Ibcf33db2157ce10c037a70a3e7c3ec586505f60b Reviewed-on: https://gerrit.libreoffice.org/77292 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-12tdf#42949 Fix IWYU warnings in sc/source/ui/{view,xmlsource}/*cxxGabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ie47dff381392ef57cb857184c179bf82d3b55862 Reviewed-on: https://gerrit.libreoffice.org/77258 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-04-02tdf#124266 : Paint cell if formula-cell has changed even if...Dennis Francis
not dirty. Change-Id: Id54811009079438945bb162dd3eb8705ce174781 Reviewed-on: https://gerrit.libreoffice.org/70043 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com>