summaryrefslogtreecommitdiff
path: root/sc/inc
AgeCommit message (Collapse)Author
2021-03-09let ScLinkedAreaDlg have a Widget parent instead of a WindowCaolán McNamara
Change-Id: Ida871186e5d15290ed2520b18651bad211799c1e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112167 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-09fix ScFlatBoolSegmentsImpl delayed setup with threads (tdf#140754)Luboš Luňák
Change-Id: I258263f6a15e7098a2292ba7f3336fcaaf5224ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112184 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-03-09Make sal/config.h the first in pchMike Kaganski
By convention, it should be the first include in C/CXX files; so use of pch should not break that. Change-Id: Ic329c5f39e8f48ad1778724368e262e48972342b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112123 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-08tdf#140796: Wrong English string for U+2060 characterJulien Nabet
Rename "No-width No ~Break" to "Word ~Joiner" + replace pattern "ZWNBSP" variable names by "WJ" Change-Id: I95a874a9d2d20a30d2c4c3add6041adbe72d872c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112055 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-03-07ref-count SdrPageNoel
which simplifies ownership handling, particularly with regard to undo/redo Change-Id: Ie8f300ebfdae6db3c06f78a87e35a07497d6b825 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111991 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-06update pchesJulien Nabet
I just used ./bin/update_pch.sh Change-Id: I06a7f36eb4c511b8d6c6477fd87e57f0d9702457 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112097 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-03-03loplugin:refcounting in scNoel
Change-Id: I0b808785e54bf1dfc9387a649aacf731b2f34d12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111801 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-01tdf#140462 sc ODF import: fix empty autofilter columnsBalazs Varga
(followed a date type autofilter column) by setting QueryType to ByDate at ODF import. Change-Id: Ie78cb15885dfb1e40c9e8ac993ff79b19fe17993 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111070 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-02-26loplugin:refcounting in svlNoel
Change-Id: I0009464121faf6dd36793b031d892f492b56187c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111544 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-25allow use of FloatWinPopupFlags without including complete floatwin.hxxCaolán McNamara
Change-Id: Ica412938ead6f213668b3aa876bff81d8f512f1a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111526 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-25tdf#36466 sc UI: add new options to deselect hidden cellsTünde Tóth
Implement "Select Visible Rows Only" option to deselect the cells of the hidden rows in the actual selection. Implement "Select Visible Columns Only" option to deselect the cells of the hidden columns in the actual selection. Test e.g. on some data on A1:C1: 1) hide column B (don't try to test with autofilter, because copying of the filtered cells has already worked this way). 2) Select A1:C1 (2 visible cells) 3) Choose Edit->Select->Select Visible Columns Only (no visual feedback) 4) Copy the selection. 5) Paste it e.g. in D2: only A1 and C1 are copied, but not B1. Change-Id: I354ebdf6be6bddae4440f3e9b4929c6e82abc1df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111100 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-02-23loplugin:constantparamNoel
Change-Id: Ieaee9a3e3ef4aa9bc390ddb198ee1718f635bcbf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111391 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-23update pchesCaolán McNamara
Change-Id: I44424081b7f55710c4db7f10d1829de1ae08be76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111363 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-21loplugin:refcounting in scNoel
Change-Id: Id0ba24985aab36b931fa74b266dc5bf0bef62bb7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111273 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-20loplugin:refcounting in svlNoel
Change-Id: Iae192caa9d05f71ce02aae966ef1d71232d1a7b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111222 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-19update pchesCaolán McNamara
Change-Id: Ic4586057346b6de700c1bb6ff4cd759a11bb3e4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111231 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-19tdf#65872 [WIP] Allow prefered interpretation of pasted numbers to be savedGeorge Bateman
Change-Id: I065f1f8cff1b3c7d7198ce431df39a7b8cb7b593 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107402 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-02-18tdf#140400: Percentile function wizard has a typo in the hintJulien Nabet
Change-Id: I4f0c72f974b410a2da7e0c7c2c505ecbf5a6a751 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110879 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2021-02-17tdf#36466 calc UI: add option to Select Visible Cells OnlyTünde Tóth
Implement "Select Visible Cells Only" option to deselect the cells of the hidden rows in the actual selection. Change-Id: Ifa5a5c3aeeb45a7960a387d91b176cc66733ab10 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110937 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-02-12cid#1472119 Uninitialized scalar fieldCaolán McNamara
experiment to see what coverity does with this syntax Change-Id: I028a111ceee5b327a04979b5497a4bc2e1e61819 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110808 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-09tdf#104502 sc: skip hidden columns at printing pagesAttila Szűcs
Page calculation counted the hidden columns, resulted printing blank pages by accident. Extend GetPrintArea() and GetTableArea() to count pages without the hidden columns, too. Co-authored-by: Tibor Nagy (NISZ) Change-Id: I4817965a675e059cdc8f81ca3bb6e128af874f2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110028 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-02-09lok: Take indent and margins into accountDennis Francis
... when painting tiles with edit-text content. Conflicts: sc/source/core/tool/editutil.cxx Change-Id: I31199c18ed5aab005d56241046a9f7109691db99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109755 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com> (cherry picked from commit bc025dac6ce3301f5798e8ada4fee07b415de76a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110619 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2021-02-08update pchesCaolán McNamara
Change-Id: Icf55ddda055d11b649e7607c2cdd8b6d6ddfefbc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110483 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-04have one set of twips<->mm conversionsNoel
Change-Id: I510f4a0524a7c72eb124cba103cbf398024976d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110407 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-02tdf#137081, tdf137082 fixes shape handling in RTL sheetsRegina Henschel
The patch introduces an enum ScObjectHandling as parameter of ScDrawLayer::SetPageSize to distinguish page size changes from show or hide col/row from changes because of sheet flip for RTL. RTL is now handled this way: On save/reload objects are not mirrored but only shifted between positive and negative part of draw page. When a user flips sheet to RTL or back, the objects are mirrored. The 'noRotate' anchor is set to this meaning: maShapeRect contains the logic rectangle of the object at time the anchor was created. It is used to detect position relevant object changes in ScDrawView::Notify(). maStart contains the address of that cell, which is parent element of the object in xml. The logic rectangle need not be in that cell. Handling of DetectiveArrow and CellNote is not changed. Validation circles were not drawn, when switching to RTL mode (no bug report). That is fixed. SetVisualCellAnchored handles 'noRotate' anchor. That anchor is not visible on screen. I have changed the misleading name to SetNonRotatedAnchor. Change-Id: I3dd2d3e37c138c8418369c760293a1f19dddb753 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109959 Reviewed-by: Regina Henschel <rb.henschel@t-online.de> Tested-by: Regina Henschel <rb.henschel@t-online.de>
2021-02-02Don't bother shrinking row height when changing just one row interactivelyTor Lillqvist
This reverts dca0374fb1edbd9bdeeaadda3f1866ce66b3a778 and instead tries to achieve the same without using a flag in ScGlobal. How reliable that is I don't know. See https://gerrit.libreoffice.org/c/core/+/110245 for discussion. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110245 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Change-Id: I2a7aa5bf3d29e5fd071e2f1cab628b923b5b6754 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110285 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2021-02-01Don't bother shrinking row height when changing just one row interactivelyTor Lillqvist
I.e. when manually entering a new value. This used to happen at least for a sample document in .xlsx format for cells with automatic wrap turned on. After entering a value, the row height was annoyingly shrunk by a few pixels, which looked weird and pointless, and caused unnecessary invalidation thrash in the online collaborative editing context. Change-Id: I3c77f7fb4e575f02e1dd7cdc18f2919f5eb3426e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110243 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-01-30Added uno command for formula range selectionPranam Lashkari
Change-Id: I01cd06ed51197ffe21102fb1fd0fcdce88ab333b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108810 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> (cherry picked from commit e8a9157878f156e599e66349d7fb60ca39e62514) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109746 Reviewed-by: Pranam Lashkari <lpranam@collabora.com> (cherry picked from commit 820984cdd2bc8f1bd8675606ec92eb42e01fff75) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109796 Tested-by: Jenkins
2021-01-29loplugin:stringviewparam extend to new..Noel
O[U]StringBuffer methods Change-Id: I0ffbc33d54ae7c98b5652434f3370ee4f819f6f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110090 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-27cid#1472566 silence Unintended sign extensionCaolán McNamara
and hopefully also cid#1472568 Division or modulo by zero Change-Id: Ic774b11fc17f8635c769df912bba4fff69f87d0e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110007 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-26cid#1472493 silence Unintended sign extensionCaolán McNamara
Change-Id: Ib6bda68c1f6efe5492ca7444044b4c900b81e24e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109965 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-25tdf#92456 improve VLOOKUP perfNoel Grandin
shave 5% of the time here - ref-counting triggered by copying svl::SharedString is significant, so return by const& instead of by value Change-Id: Ic702632da45d75dddab33d6ce1e6f1097ff70de9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109900 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-15cid#1472119 silence Uninitialized scalar fieldCaolán McNamara
Change-Id: I0a8a12e8bb823fc650212f5cf946ad9139395030 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109327 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-14tdf#133858 reduce the double-ref range to data contentDennis Francis
in certain matrix formulas like SUM(IF(A1=G:G, H:H)*B1/B2) where whole columns are used for comparison in the condition of IF ultimately followed by a reducer like SUM. In such cases we can safely reduce the double-refs involved in the comparison to the sheet area where there is data before converting the data to ScMatrix. This is a more restricted version of Noel's fix in 37ffe509ef011357123642577c04ff296d59ce68 Change-Id: I1c2e8985adedb3f4c4648f541fb0e8e7d0fae033 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109050 Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> (cherry picked from commit 65167a9265acfea04733b5ff6ee3220a9da624f4) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109118 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2021-01-11CreateScSubTotalDlg always called with a non-null pArgSetCaolán McNamara
Change-Id: I8a13a66ab7ce55a48896a921dc3b91594abefbc4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109068 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-11CreateScAutoFormatDlg always passed a non-null ScViewData*Caolán McNamara
Change-Id: I0b9568df6fdc571b5fa6cbf75a7473ac588442da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109066 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-07ScTable::GetProtection and ScDocument::GetTabProtection can be constMike Kaganski
Change-Id: Ic30a3fe10ae6206e876a05bed5dc189a9516b452 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108851 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
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-29loplugin:stringviewparam: operator +Stephan Bergmann
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-19use more string_view in SfxItemPropertyMapNoel
Change-Id: I053dedcbf0b110a61752722d247d6ee5e9ba481d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107977 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-15update pchesCaolán McNamara
Change-Id: I280dea8fe5f346a5555f4bf479896877579d63e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107748 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-14loplugin:singlevalfieldsNoel
Change-Id: I31107d4e3b3bd175187a8c29a094a4c6acf2a87c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107686 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-14tdf#138662 improve dialog box feedback for invalid Calc sheet namesSeth Chaiklin
Change-Id: I4851f76c1868c71b8c3fb527a5bfd85ce5cf8fec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107382 Tested-by: Jenkins Reviewed-by: Seth Chaiklin <sdc.blanco@youmail.dk> Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2020-12-11Adapt the remaining OUString functions to std string_viewStephan Bergmann
...for LIBO_INTERNAL_ONLY. These had been missed by 1b43cceaea2084a0489db68cd0113508f34b6643 "Make many OUString functions take std::u16string_view parameters" because they did not match the multi-overload pattern that was addressed there, but they nevertheless benefit from being changed just as well (witness e.g. the various resulting changes from copy() to subView()). This showed a conversion from OStringChar to std::string_view to be missing (while the corresponding conversion form OUStringChar to std::u16string_view was already present). The improvement to loplugin:stringadd became necessary to fix > [CPT] compilerplugins/clang/test/stringadd.cxx > error: 'error' diagnostics expected but not seen: > File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 43 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:42): simplify by merging with the preceding assignment [loplugin:stringadd] > File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 61 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:60): simplify by merging with the preceding assignment [loplugin:stringadd] > 2 errors generated. Change-Id: Ie40de0616a66e60e289c1af0ca60aed6f9ecc279 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107602 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-07move various notebookbar widgets into vclCaolán McNamara
and we can drop their factories then Change-Id: I1e261886dd7700710ba628da4bbeeba65efa1531 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107134 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-04update pchesCaolán McNamara
Change-Id: I3e22c2000da03f6f3345353846213203993aa865 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107192 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-03tdf#87973 XLSX export: fix lost file names in modified linksAttila Szűcs
Calculate new indexes for external reference files to export it to xlsx. These indexes are calculated only temporary, only for exporting. Much better solution would be to change the indexes permanently, but the original indexes are stored so many places in the code (for example it is stored in cells formula tokens converted to string). So it would be a much bigger refactoring to be able to delete an external reference permanently... even just to reorder the indexes, require to modify a lot of code. Co-authored-by: Tibor Nagy (NISZ) Change-Id: If9254f6e62ec739e2b159a066ada7efdbceb3ad8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106895 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-11-30clean up ScDocumentThreadSpecificLuboš Luňák
IIRC there has always been a bit of an overlap between ScDocumentThreadSpecific and ScInterpreterContext, but it has evolved over time into the current state, which AFAICT is that ScDocumentThreadSpecific is just a thread_local aggregate of thread-specific data (including ScInterpreterContext) and ScInterpreterContext is the actual storage used for passing data around (including to/from the worker threads). So remove obsolete parts of ScDocumentThreadSpecific, including the functions for moving data to/from threads (they do not do anything, they even can't do anything because the struct is thread_local, and they have already been incorrectly converted to static by loplugin). Change-Id: I81fff7c83df151413a5387b3173af60f122f374a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106759 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-11-30loplugin:stringviewparam include comparisons with string literalsNoel
Change-Id: I8ba1214500dddaf413c506a4b82f43d63cda804b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106559 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>