summaryrefslogtreecommitdiff
path: root/sc/source
AgeCommit message (Collapse)Author
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>
2019-04-02tdf#124329 Keep ResizeWithCell value when anchoring to a different cellSamuel Mehrbrodt
Change-Id: I62010b4882268aae135a406eb27634c3335d72cf Reviewed-on: https://gerrit.libreoffice.org/70118 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-04-02tdf#124329 Add API to make cell anchored graphic resize with cellSamuel Mehrbrodt
Change-Id: Ib2335b1eb26e55fcfcfb964d0f3fe3dd267bdd0d Reviewed-on: https://gerrit.libreoffice.org/70067 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2019-04-02drop some unneeded includesCaolán McNamara
Change-Id: I78b9682968acea7564554fb589d2759b6c8e67d0 Reviewed-on: https://gerrit.libreoffice.org/70126 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-04-02Related tdf#124329 Handle shapes resizing with the cellSamuel Mehrbrodt
The same as shapes just anchored to the cell. Change-Id: I0ce03e4c650dd10bd89cee87aa26775c32703d06 Reviewed-on: https://gerrit.libreoffice.org/70065 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-04-02Remove unnecessary commentsSamuel Mehrbrodt
Change-Id: Ie6dfdc87d209686955ae4b758cd020f2587e7dac Reviewed-on: https://gerrit.libreoffice.org/70117 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-04-02tdf#120445 File-open ODS: Slower as compared to LibO 4.4.7.2Noel Grandin
This takes opening the file from 21s to 9.4s on my machine Change-Id: I38248f3c9acfa413fc105fcbe9ece06192389d46 Reviewed-on: https://gerrit.libreoffice.org/70073 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-01Add Rows() method to ooo.vba.excel.XApplicationTor Lillqvist
Change-Id: I7e1d83539153eede300b2b24f2fa6796859d299c
2019-04-01sc lok: avoid save incorrect data, whether the pane has ...Henry Castro
horizontal / vertical splits In the tiled rendering case the horizontal / vertical splits were not implemented, so the leftmost visible column is 0. So preserve horizontal / vertical splits when saving the document Change-Id: I15b6f009910e51fdaf475de5aac1ebded16c1956 Reviewed-on: https://gerrit.libreoffice.org/69926 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
2019-04-01tdf#115192 XLSX export: fix hyperlink inserted to shapetundet
Hyperlink inserted to shape didn't work after export, because the LO wrote TargetMode="External" code incorrectly in the xml. test_115192.xlsx: Test file from Excel 2016. Change-Id: I3a9d39c1aa5de5af6d1ca43d16c45a5401ec6f3d Reviewed-on: https://gerrit.libreoffice.org/69915 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-04-01weld ScSolverProgressDialogCaolán McNamara
Change-Id: I5ee081b1c9e542a2b717b4eb27ee0aba7331d57d Reviewed-on: https://gerrit.libreoffice.org/70071 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-04-01Avoid "Text Import" dialog if invoking Paste() from OLE AutomationTor Lillqvist
Excel does not show such a dialog in that case either. At least not in the customer use case. Possibly we could try to be clever and sniff the string to see if it seems to use defaults, like TABs as separators, and if not, then show the dialog? Change-Id: Ib12b628eee25273aa489dbbd86004167ca105c0b
2019-04-01Get rid of XclXmlUtils::ToOString(const OUString& s)Mike Kaganski
The helper function is used in export code to convert UTF-16 internal string representation to UTF-8 used in XML encoding. I suppose that all strings here should be already valid UTF-16 (an invalid input should have been validated at import/input stage). An invalid string at this stage means a programming error in another part of code that breaks this precondition, and should not be handled at export stage. This effectively changes flags used in conversion from UTF-16 to UTF-8, so that now RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR is used instead of RTL_UNICODETOTEXT_FLAGS_INVALID_DEFAULT, so that the result would be truncated on invalid bytes instead of inserting U+FFFD, and would fail assertion in debug builds. Other changed flags don't affect UTF-16-to-UTF-8 conversion. Change-Id: I8b154249e66ee32b531b8ab503e0222b9108d829 Reviewed-on: https://gerrit.libreoffice.org/69830 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-04-01tdf#42949 Fix IWYU warnings in include/sfx2/[sS]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I4a3baffa8944b522b16b50975185759081662020 Reviewed-on: https://gerrit.libreoffice.org/69945 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-04-01tdf#120703 PVS: Silence V522 warningsMike Kaganski
V522 There might be dereferencing of a potential null pointer. Change-Id: Ie617b41a8f8d334022cf5313b242a236baedba48 Reviewed-on: https://gerrit.libreoffice.org/70017 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-03-29Remove now moot commentEike Rathke
That compiler workaround isn't necessary anymore since at least commit 9894f158a287bdfe9933df96ab117a9527e9195b CommitDate: Sat Apr 21 12:51:13 2012 +0200 simplify lifetime management of some variables that changed the array form to a simple instance. Change-Id: Ic11fa8422c0be62f24e2135298104123d23c8d2f
2019-03-29tdf#42949 Fix IWYU warnings in include/sfx2/[n-r]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ia2bea9bd4775f4ed5ef0133971106a6c0bfdd1c0 Reviewed-on: https://gerrit.libreoffice.org/69896 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-28tdf#124286 fix annoying rounding error.Winfried Donkers
In case of ROUNDDOWN and ROUNDUP, it is possible that seemingly clear decimal values are rounded unexpectedly (from the user's POV). This is caused by the i decimal to binary to decimal conversions. By rounding to 12 significanr digits before calling the round-down of -up function, most of these unexpected roundings are eliminated. Change-Id: Ia19181383b77e1ff40a067c4a1cea1ece0955871 Reviewed-on: https://gerrit.libreoffice.org/69762 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2019-03-28tdf#120660: Populate rNewSharedRows even if no FC...Dennis Francis
at specified position. At least in case of ScUndoPaste, during undo operation, the content from changed area in main-document is removed before actual undo-paste, so when cloned formula-cell from undo-doc is inserted to main-doc, there is no "old" cell to detach, so "rNewSharedRows" is not populated which is needed for proper re-establishment of listeners if there are formula/ formula-groups adjacent to insertion position. Change-Id: Id2bfb65a2a7a5abb03effbdcc4405015fddc401c Next: fix the vector version of this case and write unit tests. Reviewed-on: https://gerrit.libreoffice.org/69737 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2019-03-28loplugin:useuniqueptr in sc dialog constructorsNoel Grandin
Change-Id: I9fef0d3d567d9a0143c7a796725a44348b96bb23 Reviewed-on: https://gerrit.libreoffice.org/69880 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-28simplify reset(nullptr) -> reset()Noel Grandin
Change-Id: Iec5e93d9c59dde44571376e46fb98ea854e16b6c Reviewed-on: https://gerrit.libreoffice.org/69784 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-28tdf#42949 Fix IWYU warnings in include/sfx2/[e-M]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I6e97c7ed6c0211dfafee83b9bdbea672e415fc49 Reviewed-on: https://gerrit.libreoffice.org/69715 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-28return unique_ptr from CreateTokenMatrixMapNoel Grandin
Change-Id: I7a779bf1b2e5438e7e5d9f75c765049d4e2b9dac Reviewed-on: https://gerrit.libreoffice.org/69856 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-27return unique_ptr from CreateOutputEditEngineNoel Grandin
Change-Id: I403f0da5ea1ccdf508d156a9fa828e9f91813385 Reviewed-on: https://gerrit.libreoffice.org/69804 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-27return unique_ptr in CreateFlatCopiedTokenArrayNoel Grandin
Change-Id: I0d44ad1eca45b0b77d5a898a553aab61b1f479a9 Reviewed-on: https://gerrit.libreoffice.org/69805 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-27return unique_ptr from MakeNumberInfoItemNoel Grandin
Change-Id: I76a90ec9799e580c50b240bc906f83d62d3099b5 Reviewed-on: https://gerrit.libreoffice.org/69803 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-27return unique_ptr from CreateAttrIteratorNoel Grandin
Change-Id: Ib990282abcd3a75bfb6bdd42b5e16d6e673f71b1 Reviewed-on: https://gerrit.libreoffice.org/69783 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-27no need to allocate aEmptyOUString separatelyNoel Grandin
Change-Id: I938f5c022ef07e9ac4cc6eaf60cc7a88deabbda7 Reviewed-on: https://gerrit.libreoffice.org/69747 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-26weld SearchResultsDlgCaolán McNamara
Change-Id: Ib2a031843a92626941ebe9c94a77a44c4c970585 Reviewed-on: https://gerrit.libreoffice.org/69757 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-03-26ScUnoHelpFunctions::AnyToInterface is redundantMike Kaganski
Change-Id: Ia61806f7781b49f29122ad9be75a5eb739918c37 Reviewed-on: https://gerrit.libreoffice.org/69734 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-03-26tdf#74664 : add Fourier analysis toolDennis Francis
Add Fourier analysis tool to Statistics submenu. Use FOURIER() formula to do all the work here. Change-Id: Ifdaa79d8ee367f1c1f5054248e01853ffe4c6823 Reviewed-on: https://gerrit.libreoffice.org/69472 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2019-03-26tdf#74664: FOURIER: add 5th optional parameter MinimumMagnitudeDennis Francis
This parameter is used only if Polar=TRUE. All frequency components with magnitude less than MinimumMagnitude will be suppressed with a zero magnitude-phase entry. This is very useful when looking at the magnitude-phase spectrum of a signal because there is always some very tiny amount of rounding error when doing FFT algorithms and results in incorrect non-zero phase for non-existent frequencies. By providing a suitable value to this parameter, these non-existent frequency components can be filtered out. By default the value of this 5th parameter is 0.0, so *no* suppression is done by default. Change-Id: I422ad1bf91f42b320e98e58a19c99bf8528e4708 Reviewed-on: https://gerrit.libreoffice.org/69471 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2019-03-26weld ScPivotFilterDlgCaolán McNamara
Change-Id: I0a2ffa6fd02dcf82d55f961ba229112b456eda8e Reviewed-on: https://gerrit.libreoffice.org/69733 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-03-26No need in function object; just use range-based loopMike Kaganski
Change-Id: I08289c35eb1e8babc53406deb25df39f68a0dd88 Reviewed-on: https://gerrit.libreoffice.org/69726 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-03-26flatten TabRangesNoel Grandin
no need to declare this separately, saves one pointer hop Change-Id: I14fd82a9448c43ddfa0b6179a3b79cf6d364130d Reviewed-on: https://gerrit.libreoffice.org/69687 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-25tdf#42949 Fix IWYU warnings in include/sfx2/[a-D]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I444cb71bc3d045072a4b1f9eed279ed7e425a0d4 Reviewed-on: https://gerrit.libreoffice.org/69481 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-25tdf#124318 FILEOPEN: XLS Hyperlink URL incorrectNoel Grandin
regression from commit 52f69445c55c9af8ad97bee6da335b4592d56d4d Date: Wed Aug 1 17:03:18 2018 +0200 loplugin:stringloop in sc Change-Id: I7d481ea27866fc146c5de9d027aa7bb308f14e52 Reviewed-on: https://gerrit.libreoffice.org/69652 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-25avoid a crash with an editor-forced matrix formula (tdf#123479)Luboš Luňák
Normally when ScInterpreter has bMatrixFormula set, pMyFormulaCell is set as well (done in the ctor). But in some rare cases, this may not be so, and some functions such as ScRandom() already check for this. But not all do, tdf#123479 specifically crashes because ec97496525f82f added AssertFormulaMatrix() to force bMatrixFormula be set without pMyFormulaCell being set, and ScColumn() doesn't handle this case. Fix this by trying to pass ScFormulaCell* to ScInterpreter when AssertFormulaMatrix() is used, this should ensure the result in the formula editor fits better the edited formula. Since there still may be cases when the cell is not set (e.g. editing a new formula), also handle that case gracefully. Ideally ScSimpleFormulaCalculator should pass ScMarkData to ScInterpreter in such cases so that those functions use that when they can't use GetMatColsRows(), but currently the handling of selections is rather poor in the formula edit dialog: Non-array formulas are simply entered in one cell and the selection is ignored, in case of a multi-selection there's an error dialog only after the dialog is closed, and the result field of the dialog is rather small and doesn't scroll, so e.g. matrix result of ScRandom() wouldn't show more than one item anyway. Given that tdf#123479 is a priority bug, better just fix it and possibly handle selections better somewhen later. Change-Id: I5fcbe1e358fac3623d4917eb0ead8eae00a1e153 Reviewed-on: https://gerrit.libreoffice.org/69161 Reviewed-by: Dennis Francis <dennis.francis@collabora.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Luboš Luňák <l.lunak@collabora.com>
2019-03-25Removed executable permission on data filesAndrea Gelmini
Change-Id: Ic21b28fd094f706dd7b1de32907d75e28f27494a Reviewed-on: https://gerrit.libreoffice.org/69558 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-03-24weld SvxSearchDialogCaolán McNamara
I have to use the other way to specify an a11y role, both are implemented in the vcl parser, but in my gtk3-3.24.7 the role tag crashes the gtk parser, while the other route works fine. The CONTENT_FLOWS_TO accessibility relation is another additional complexity over the norm Change-Id: Ia096bcbe9f00f9944e4e4d5ad9bb1a52d19c7b3f Reviewed-on: https://gerrit.libreoffice.org/69569 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-03-24Fix typoAndrea Gelmini
Change-Id: I2a71473c872d4c69de728857e74a4a7c1b89fb36 Reviewed-on: https://gerrit.libreoffice.org/69594 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-03-23formatting fixesLuboš Luňák
Change-Id: Ie8ceead5cba72abf32e57e214e677dbf478941d4
2019-03-22Remove listening in ScDocument::SetString() and ScDocument::SetValue()Eike Rathke
They now unnecessarily duplicated the start listening with the changes that introduced ScColumn::StartListeningUnshared(). Also the ScColumn::BroadcastNewCell() now is sufficient as it is called after StartListeningUnshared(). Change-Id: I0495ce5fe47daa068974c7b70ec28e0530c080f1 Reviewed-on: https://gerrit.libreoffice.org/69570 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2019-03-22Use RegexMatcher.find(pos, status) call on old ICUTomáš Chvátal
The RegexMatcher.find(status) is new since icu 55 and this works even on the old releases thus revert there to the available albeit slower call. Change-Id: I964c10efd15515b04ac9037cda3b5b309910baf5 Reviewed-on: https://gerrit.libreoffice.org/69311 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2019-03-22tdf#114969 XLSX export: fix 'sheet.name.with.dot'!A1-like linksTünde Tóth
When the sheet name/cell address separator was an exclamation mark, bad conversion of the optional dot separator replaced the last dot of the exported sheet name, resulting broken links: 'sheet.name.with!dot'!A1 Change-Id: I84fb6c8da345c144b04657ea350f1f96614071b7 Reviewed-on: https://gerrit.libreoffice.org/69272 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-03-21Increase the life-cycle of threads in thread-pool...Dennis Francis
to ScDocument lifetime if possible. This helps to avoid lots of thread setup-cost while doing recalcs especially if there are many formula-groups in the document and most of them are fairly light-weight. Change-Id: Idd57e1ebd0d4e492f99e31237d4a55ec9c95a121 Reviewed-on: https://gerrit.libreoffice.org/69473 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-03-21tdf#42949 Fix IWYU warnings in sc/source/ui/pagedlg...undoGabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Icb5f0235339364e6dc09936e26f256765a60830a Reviewed-on: https://gerrit.libreoffice.org/69378 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-19Resolves: tdf#124024 scaling factor isn't displayed correctlyCaolán McNamara
Change-Id: If08731217c0839ebd8d51399bb0dd1a3b598dceb Reviewed-on: https://gerrit.libreoffice.org/69420 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-03-18Listening when grouping in ScColumn::AttachNewFormulaCells(), (tdf#123736)Eike Rathke
Not directly related to tdf#123736 but similar approach. Setting a vector with ScColumn::SetFormulaCells() is currently only done for Undo documents, but implementation provided listening as only single cell listening for not-undo/clip documents, which wouldn't work if actually used in grouping context. The upcoming unit tests will use SetFormulaCells() for checks. Change-Id: I990e6a5d6e1efcf70a2661b3a9a39c37d9e4c2e6 Reviewed-on: https://gerrit.libreoffice.org/69371 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2019-03-17Reget position_type as the block or type may have changed, tdf#123736 relatedEike Rathke
Change-Id: I2faf3e74d95cb1f3088f20cbb7de7ba965a6de21 Reviewed-on: https://gerrit.libreoffice.org/69358 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins