summaryrefslogtreecommitdiff
path: root/sc
AgeCommit message (Collapse)Author
2021-10-20Resolves: tdf#145235 TEXTJOIN() clear last string also for referenced emptyEike Rathke
Change-Id: If6d20a1629e001708c700c5c25bef8a75fa34e25 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123889 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit f4f2c94513e7d06691a73d9f12707c33d131d537) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123865 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-10-07ScRangeList::UpdateReference() join all ranges properly (tdf#140901)Luboš Luňák
This is basically a revert of 6eb8634a9f62bfe486ecd2f46, which made this Join() just the last range, probably under the assumption that the function is always called with just one range to update, or to avoid the possibility that Join() removes several items from the list, breaking the next step of the loop. But DeleteArea() may split several ranges, so we need to make sure to Join() all of them. Change-Id: Iea124142335ccdc8fa578344cddce8670c27573d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123135 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com> (cherry picked from commit e7ec79fe36a0f22f10167806da80e3c1f30b36e8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123154 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit d138dd209e99300c4fc0412f726b1058fbb0039d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123157
2021-09-09Resolves: tdf#144376 focus into protected ScTextWnd shouldn't be possibleCaolán McNamara
the expectations are that this isn't possible and if it happens then under windows there is a QueryCharPosition which will trigger the deletion of the ScTextWnd EditView due to that expectation before it is then unconditionally dereferenced Change-Id: Ied5d8031ae7d74669a2958dbcdec87843a26d384 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121841 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-08-31tdf#143940: the style index might be -1Xisco Fauli
Similar to 52aebe6986bcec07071adb3f94d6c09fea147044 < tdf#138466 Crash when creating different scenarios > ExportColumns calls GetStyleNameIndex which might return -1 so check the index is different than -1 as it's already done when calling ScFormatRangeStyles::GetStyleNameByIndex Also move fix for tdf#138466 down the stack to be consistent Debug builds will still assert, see coverity#1438402 Since 5e777f23fd0118f6649f0d9e30eb77a72f1099e4 < loplugin:useuniqueptr in ScColumnRowStylesBase > where the nIndex < 0 check in ScColumnRowStylesBase::GetStyleNameByIndex was removed Change-Id: I084bfa04c39f37cb325c3b3df76801b3abdea994 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121128 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 7246759822aff30e4e4e1bca7949eae3b0d960ef) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121069 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-08-30ofz: MemorySanitizer: use-of-uninitialized-valueCaolán McNamara
Change-Id: I649e8b8fa0d1752f0f4b0b6b688cea8ae945bb87 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121154 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins
2021-08-30ofz: MemorySanitizer: use-of-uninitialized-valueCaolán McNamara
Change-Id: I136816837eddcb1bf81c23b6f4fcfa65e9335629 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121156 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-08-23tdf#144022: make sure to create missing columns if neededMike Kaganski
Change-Id: I1a0771fbe8023859ab29d8114303b62f6a3d539c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120731 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 23c1ec0d498124fbe275145d236db455f83cd850) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120873 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-08-19tdf#142264: make sure to load potentially unloaded objects when savingMike Kaganski
Commit 574eec9036c5f185b3572ba1e0ca9d111eb361dc happened to reveal a pre-existing problem that XLSX export only saved those OLE objects that were kept loaded in the OLE object cache, subject to thevalue of org.openoffice.Office.Common/Cache/DrawingEngine/OLE_Objects. Before that change, the imported charts were marked modified on load, and that prevented them from unloading in OLEObjCache::UnloadCheckHdl, because SdrOle2Obj::CanUnloadRunningObj returned false. After the mentioned change, the charts started to load without the wrong "modified" state, which allowed them to be properly managed by the cache, and the export filter implementation error surfaced. It's likely that commit 692878e3bb83c0fc104c5cca946c25ccf2d84ab2 tried to workaround the same underlying problem for charts that for some reason / at some point in time didn't get marked modified on load, and that commit converted an error shown in Excel into silently missing charts. This change makes sure that whenever a reference to chart document is requested from XclExpChartObj, it is actually loaded and ready for reading data. Possibly something could be done on the level of old reference that becomes non-functional (although valid) as the result of unloading, so that it would automatically reload on following use. That would make operating on the references robust. I didn't find an obvious way to do that. It is interesting to investigate, it the heizenbug related to images disappearing from documents, as users keep reporting without robust reproducers, might possibly be caused by a similar problem. Change-Id: I45fcdc98254157d805c7519340b5265526f27166 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120688 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120695 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-08-18tdf#143619 validation circle anchor is specialRegina Henschel
For usual drawing objects, maStart in its Calc user data means the cell address of left/top of snapRect/logicRect. For validation circle it means 'address of cell to be validated'. Thus corrections might be needed, if a general method is used for validation circle. Here the method SetLogicRect() calls via broadcast ScDrawLayer::SetCellAnchoredFromPosition(), which calculates maStart from snapRect/logicRect. Because the circle is extended to cover a larger area than the to be validated cell, maStart got the cell address of the cell one left and one above of the to be validated cell. Now the old, correct address is backuped and restored. Change-Id: I9646da3f22fef45a6e47e59ef55a70307e2f9cc6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119715 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de> (cherry picked from commit 0cff1aa48453ee0c05bafcac5360329fb6bf9557) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120147 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120224 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2021-08-17Resolves: tdf#96561 Include embedded null-characters while assembling CSV lineEike Rathke
... instead of prematurely ending analysis and skipping the remainder that is still part of data read. Change-Id: I8f34bc9672e37f9c1c1ae81ddeba464360add7c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120555 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit 7bd03074ae7362d8fffe5182529626a0b43a0ed1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120572 Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-15Resolves: tdf#143809 "INF" may be a named expression or DB area nameEike Rathke
... to not be caught by rtl::math::stringToDouble() handling XMLSchema-2 "INF" and "NaN" and set as error. Change-Id: I9bf7aad416a69d4c3c0d49d6c80168097040a3e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120337 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit b37fd7f38165dadc5b1a674b73f4b18824e4789e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120435 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-08-10undo blocking emitting focus events during grab_focusCaolán McNamara
revert... commit f97dbac73fe149e8fed0932890d0c1d6be4869a3 Author: Caolán McNamara <caolanm@redhat.com> Date: Wed Jun 26 21:00:02 2019 +0100 infinite focus changing in toc biblio page which blocked calling focus-changed callbacks when grab_focus is called explicitly analogous to how we block value-changed callbacks setting values through code but don't block them when the value is changed by user interaction. In retrospect that was a poor choice, so revert that and subsequent workarounds in favour of just not calling gtk_grab_focus if the widget already has focus. checked: a) tdf#138427 focus set to wrong input box b) tdf#138078 only call GetFocus if we gained focus from an unfocused state c) tdf#137993 ensure the toplevel vcl::Window is activated d) tdf#136941 call focus in handler explicitly Change-Id: I411480e2d627aa9995fb41b0aa17e9fb6d34d73f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114524 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit db1cf111666847ce5ce93d18ae5ae8c29a4c44d6) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120079 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Caolán McNamara <caolanm@redhat.com>
2021-08-09tdf#143582 - Clear return value of the method before calling itAndreas Heinisch
Otherwise the function keeps a copy of its return value, which may be used in an upcoming call. Change-Id: I4977c39e1ce48cfd5ab067a4df4783f10505a9ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119905 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120197 Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120211
2021-08-08Resolves: tdf#143759 Limit empty search's empty column to actual search rangeEike Rathke
... instead of the non-/filtered last row. Change-Id: I9b941af688a8083d472a793a6bc6b6dbb7b916ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120176 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit 15960931988cfd898e14a12d6b9cddaf6d8b0ade) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120135 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-08-03Consolidate link update handlingEike Rathke
Have it at one central place and identical for all document loading paths. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119835 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit 55abc3eb93fb8314b413453e384261cb00fde087) Conflicts: sc/source/ui/docshell/docsh4.cxx Change-Id: Ib00153a9f5831e223d0129df0538353a7e20961e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119837 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-07-08cid#1468696 Logically dead codeCaolán McNamara
bool bTryXlA1 = (eConv == FormulaGrammar::CONV_A1_XL_A1); if (...) eConv = FormulaGrammar::CONV_XL_R1C1; if (bTryXlA1 || eConv == FormulaGrammar::CONV_OOO) { if (...) { bExternalName = true; eConv = FormulaGrammar::CONV_OOO; } } if (!bExternalName && (bTryXlA1 || eConv != FormulaGrammar::CONV_OOO)) { if (...) { if (eConv == FormulaGrammar::CONV_OOO) { // this condition can only be reached if bTryXlA1 is true // but bTryXlA1 is only true if eConv was originally // CONV_A1_XL_A1. The only things eConv can be changed to // in this function are CONV_XL_R1C1 or CONV_OOO. If it // was changed to CONV_OOO then bExternalName was also // set to true and the block isn't entered if that is true } } } maybe an unconditional assignment of eConv = FormulaGrammar::CONV_XL_A1 is a better solution Change-Id: I45f9947c21662369474048acf2d648733a9b9a6d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107076 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com> (cherry picked from commit 22c7ad49679c2abcac4409c93d32b20746b16904) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118602
2021-07-08cid#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> (cherry picked from commit a94aecfdaafc5525be73246d3e8f19fdb714b387) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118583 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-07-02tdf#140431 XLSX export: fix double file:// prefixTünde Tóth
Regression from commit: fc58d7d65b9683db7b7632137126680b8483f6c5 (tdf#129969 XLSX export: file URLs need IURI encoding) Change-Id: I5bfb0ef9ba7fe82cd3f4d0e0b3fdcf8f705cba64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118090 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 67e2cc17bad3fd7aacb94da47f9024b731434a84) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118293 Tested-by: Gabor Kelemen <kelemen.gabor2@nisz.hu> Reviewed-by: Gabor Kelemen <kelemen.gabor2@nisz.hu> (cherry picked from commit 5a47501ec5856f32d652d492e9e144e64642b452) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118299 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-07-02Resolves: tdf#138432 Use locale's CharClass to parse numeric i18n contextEike Rathke
Change-Id: I1828f1b6f93228cd517a6a7bd9ae36584bd801a1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118226 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit d703131d063c41b8baca01830c4c9806f99ab7d2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118190 Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-24Resolves: tdf#143008 Evaluate AM/PM for type date+time text-to-column and CSVEike Rathke
Change-Id: Ib760b9a103ab4b8ce7f5a158b09fbe11c6617f2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117747 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit d81775f5b12080676ebaf659c5a4c10d64a9074b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117720 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-06-22tdf#142932: fix crash when pasting cells with comments+"skip empty cells"Julien Nabet
See bt here: https://bugs.documentfoundation.org/attachment.cgi?id=173011 4 0x00007fc4b0cdbb3d in ScColContainer::operator[](unsigned long) (this=0x872e1e0, nIndex=64) at sc/inc/colcontainer.hxx:43 5 0x00007fc4b120d82b in ScTable::DeleteBeforeCopyFromClip(sc::CopyFromClipContext&, ScTable const&, sc::ColumnSpanSet&) (this=0x872e1e0, rCxt=..., rClipTab=..., rBroadcastSpans=...) at sc/source/core/data/table7.cxx:118 6 0x00007fc4b0e42939 in ScDocument::DeleteBeforeCopyFromClip(sc::CopyFromClipContext&, ScMarkData const&, sc::ColumnSpanSet&) (this=0x3bffa60, rCxt=..., rMark=..., rBroadcastSpans=...) at sc/source/core/data/document10.cxx:75 7 0x00007fc4b0e0b67b in ScDocument::CopyFromClip(ScRange const&, ScMarkData const&, InsertDeleteFlags, ScDocument*, ScDocument*, bool, bool, bool, bool, ScRangeList const*) (this=0x3bffa60, rDestRange=..., rMark=..., nInsFlag=7, pRefUndoDoc=0x0, pClipDoc=0x7d3bb40, bResetCut=true, bAsLink=false, bIncludeFiltered=false, bSkipAttrForEmpty=true, pDestRanges=0x7fff4a3da4b0) at sc/source/core/data/document.cxx:2916 8 0x00007fc4b2412dc3 in ScViewFunc::PasteFromClip(InsertDeleteFlags, ScDocument*, ScPasteFunc, bool, bool, bool, InsCellCmd, InsertDeleteFlags, bool) (this= 0x41a29e0, nFlags=7, pClipDoc=0x7d3bb40, nFunction=ScPasteFunc::NONE, bSkipEmpty=true, bTranspose=false, bAsLink=false, eMoveMode=INS_NONE, nUndoExtraFlags=InsertDeleteFlags::NONE, bAllowDialogs=true) at sc/source/ui/view/viewfun3.cxx:1312 Change-Id: Ic119cb5d414a35a9ba18b0564d7adf83154eb9d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117497 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit a6d269ed9478b20f611912bf9711c2683e7bc924) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117632 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit bb59b4165456d13eda800098be8b875d93b093d3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117637
2021-06-21tdf#142873: Fix print preview zoom-out zoom-in buttonsJulien Nabet
.uno:ZoomOut has been renamed .uno:ZoomMinus .uno:ZoomIn has been renamed .uno:ZoomPlus Change-Id: I06e7e66550399e53032a0df39a98846982acba48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117279 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com> (cherry picked from commit c21398066b6bf630070ed291456f2663e06d94b9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117427 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-06-14Resolves: tdf#127013 differentiate non-/array separators and restrictEike Rathke
This is a combination of 2 commits. Resolves: tdf#127013 differentiate non-/array separators and restrict Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117068 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit bb54d6d8241a06a6772052b77b67d6a4f686426c) Related: tdf#127013 Check loaded separators for validity ... not only if something is present at all. That way future restrictions can reset separators. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117072 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit 381bc9d9acd461415cf81eef71ec3dd935a07b62) I738bcb9e052e8dbecb0a6cd07bbae8f4a8ea1c35 Change-Id: I9ff6b816b0c7af9081954fa407a4d516a576a338 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117075 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-06-10tdf#136766 Zoom slider in calc print preview has white backgroundNoel Grandin
I cannot figure out any way to make transparent stuff on the toolbar behave under all rendering backends, so just revert this this reverts commit 00cffc20e40b2412c7e9867eed24c9834504e24f Date: Mon Sep 7 13:28:33 2020 +0200 tdf#135181 Calc print preview zoom slider print preview not transparent (gen) commit 444c7c736be7545344298a9cbb3a69886edc5ecb Date: Mon May 18 18:23:13 2020 +0200 tdf#125538 fix background of zoom control Change-Id: I7c351796b2c0778c1520fc8177d05567b2ae8a48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116982 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit d693223b84b518701d308678801ccc50877490dc) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116904 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-06-10tdf#141769 ScTextWnd has to be available before the editview is createdCaolán McNamara
Change-Id: Iec3b4180c4dc83723224b7122a1513cb8fe3ea0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116921 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-05-26Related: tdf#81757 Do not even try to re-enter ScDocShell::Do*Recalc()Eike Rathke
That happened when loading bug doc https://bugs.documentfoundation.org/attachment.cgi?id=103462 where form selection events fire asynchronous recalcul() and BASIC Main also calls recalcul. Change-Id: Ic27fb340c7b5019453723c7cabe2122905d400f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116133 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit 807f3508c9319d7f94820ea1282e306594418fce) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116152 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-05-24Resolves: tdf#134675 Allow unrestricted pastes of same size in one dimensionEike Rathke
So copy-paste of for example one entire column onto more than 23 columns is possible as that does not create multiple repetitions. Change-Id: I2b035afa1c04522db55569396a36b1bac57c590c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116031 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116039
2021-05-22tdf#142395: properly handle "no string delimiter" caseMike Kaganski
In this case, the delimiter character value would be '\0'. Change-Id: Idb0f01756991b3ea35a92f11b78fddd56c25265a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115839 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 6155689bb6f1d72f29b43ac5ae94b32522ef9b42) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115851 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-05-18tdf#138209 ODF export: work around forms problem in LO < 7.0Michael Stahl
LO without commit 519d96fd8b83ef4c61576d87b58f97b7e6e6e3c6 makes a mess when storing form documents it has loaded from ODF 1.3 documents: the XML parts are stored as ODF 1.2, but the storage (and therefore manifest entry) keeps version 1.3. To avoid this, store form documents as ODF 1.2 extended by default. Unfortunately a bunch of ODF export code accesses the global SvtSaveOptions variable; with this version override, only SvXMLExport::getSaneDefaultVersion() must be used. Change-Id: I5fa8e286f5103c578ed0d93da07a8a6cbe2f0ddd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115357 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 16de54a5c47fbc4691ee099c1f7bb559a8fe11ac) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115390 Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2021-05-12tdf#139241: partially revert 059f07f9f33460c809a93e0fda1165f5c6f6d805Mike Kaganski
And instead normalize the start and end values before creating rectangle. Change-Id: Ib9921f1a537ca88a70cedf989d2f696180ad68e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115284 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 05f8f239d49bd66145e736b4e2e28ad073ef6f2f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115285 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-05-10tdf#43175 - Adjust chart references on every copied sheetAndreas Heinisch
Change-Id: I92fcfeecb9aa10bf8974de953399d780ffe02176 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115058 Tested-by: Jenkins Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit d55bf8aab008d84fac673f3cd907f5199347ce77) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115210 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-05-03tdf#90278 - Set the vba border to the default borderAndreas Heinisch
The default border width in calc is 0.75[pt] * 1/72[inch] * 2.54[cm/inch] = 0.0264[cm] set in 2f527738ea4f8e93acafdd7f0ae06de1678cfdd8 which contradicts the border setting of OOLineThin used in order to parse vba borders. The latter was set to 1.00[pt] * 1/72[inch] * 2.54[cm/inch] = 0.0352[cm]. This mismatch leads to an exception when the corresponding weight of a cell is parsed. Change-Id: I945d8aecdf31e5ad76d0d04e76eaaf4668e3d8ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114980 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115035
2021-04-30tdf#137945: sc: Add UItestXisco Fauli
Change-Id: I6fa935d0c77556113ae087a67c2932ddcee12a1e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114871 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-04-29tdf#141970 Revert "tdf#129606: Round the mean of the two subtractions"Mike Kaganski
This reverts commit d5ebe7c3089ab9f4d3fe0707169fc1ce024cdb70, and brings number of inexact values in testing back to lower numbers (see test document in the bug). Change-Id: I5cfb34b7260fc6e4866585af6a2a50e79696eea2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114861 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit aa096331ba468f19951e43e2550105d4dcf50053) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114865 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-04-29Related: tdf#130326 skip calling Refresh if its already just calledCaolán McNamara
Change-Id: I80d3ae7f10b56dfe53a4ab5101ae771b47848092 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114877 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Jenkins
2021-04-29Related: tdf#130326 drop ScContentTree::ObjectFreshCaolán McNamara
this was introduced as part of the large IA2 integration commit b41332475783c31136673fb44cf4c411bb0148f8 Author: Steve Yin <steve_y@apache.org> Date: Mon Dec 2 15:54:29 2013 +0000 Integrate branch of IAccessible2 Both calc and writer gained the feature that "space" in the navigator for drawing objects selects the highlighted object, extending the selection of another one is already selected. (notably impress was left unchanged) In calc, but not writer, an ObjectFresh was added which fires on every SfxHintId::ScKillEditView which is broadcast on every exit of the cursor from a cell. Its purpose seems to be primarily to re-highlight the last selected-by-keyboard entry on a content refresh. As far as I can tell this doesn't seem necessary and we already refresh content on SfxHintId::ScDrawChanged events so we shouldn't need to additionally refresh on ScKillEditView and refreshing on every ScKillEditView is very slow on navigating through a calc document with a lot of drawing objects. Change-Id: I64b2840f8510d474314d108e657fc3367f8ab6c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114876 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Jenkins
2021-04-27tdf#99991 - Don't resize toplevel widget containing the options expanderAndreas Heinisch
Change-Id: I930445e9047478b26142d049598fbe656d25d666 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114628 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de> (cherry picked from commit dc83f99c466296caaa6b236e32b39e04ae9e6d8c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114598
2021-04-26tdf#95554 fix ScDocument::GetClipArea() for rows: use > instead of <scito
I did not write any tests, as the multi range copying to system clipboard has another issue, see tdf#141847 Change-Id: I3af58d68370038274a07d753809fb4ceca9016f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114534 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins (cherry picked from commit 7c1e22152ed1a1837782a55fc9997f8e7801681b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114510 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-04-25Related: tdf#130326: GetDrawNames doesn't do anything when !bisInNavigatoeDlgCaolán McNamara
so return early instead of looping to do nothing Change-Id: Ibb8fe1409a8e66d37d51d9a1b99ce135f36b9522 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114589 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-22tdf#94962 - Limit calculation of pearson coefficientAndreas Heinisch
The RSQ/PEARSON functions return values greater than one, if the divisors are below the numerical limits. Change-Id: Ice224315072afafc6206c367f219771adebe23ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114301 Tested-by: Eike Rathke <erack@redhat.com> Reviewed-by: Eike Rathke <erack@redhat.com> (cherry picked from commit fc9919bcfcf32f2ecefa4fce18a49545b93d3499) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114426 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2021-04-22tdf#141537: UNO Object Inspector: Crash while inspecting fileJulien Nabet
See bt: 6 0x00007f276e146773 in ScChartsObj::getByName(rtl::OUString const&) (this=0x7738e00, aName="Object 1") at sc/source/ui/unoobj/chartuno.cxx:345 7 0x00007f276e146865 in non-virtual thunk to ScChartsObj::getByName(rtl::OUString const&) () at sc/source/ui/unoobj/chartuno.cxx:348 8 0x00007f27a1d87b7f in (anonymous namespace)::NameAccessTreeEntry::fill(std::unique_ptr<weld::TreeView, std::default_delete<weld::TreeView> >&, weld::TreeIter const&) (this=0x6d463e0, pDocumentModelTree=std::unique_ptr<class weld::TreeView> = {...}, rParent=...) at sfx2/source/devtools/DocumentModelTreeHandler.cxx:139 9 0x00007f27a1d87905 in (anonymous namespace)::ChartsEntry::fill(std::unique_ptr<weld::TreeView, std::default_delete<weld::TreeView> >&, weld::TreeIter const&) (this=0x6d463e0, pDocumentModelTree=std::unique_ptr<class weld::TreeView> = {...}, rParent=...) at sfx2/source/devtools/DocumentModelTreeHandler.cxx:596 10 0x00007f27a1d842e5 in DocumentModelTreeHandler::ExpandingHandler(weld::TreeIter const&) (this=0x76e3850, rParent=...) at sfx2/source/devtools/DocumentModelTreeHandl chart isn't retrieved from there: 0 sc::tools::findChartsByName(ScDocShell*, short, std::basic_string_view<char16_t, std::char_traits<char16_t> >, sc::tools::ChartSourceType) (pDocShell=0x351baa0, nTab=0, rName=u"Object 1", eChartSourceType=sc::tools::ChartSourceType::CELL_RANGE) at sc/source/ui/unoobj/ChartTools.cxx:106 1 0x00007f6297305323 in ScChartsObj::GetObjectByName_Impl(rtl::OUString const&) const (this=0x77ce370, aName="Object 1") at sc/source/ui/unoobj/chartuno.cxx:126 2 0x00007f62973076b4 in ScChartsObj::getByName(rtl::OUString const&) (this=0x77ce370, aName="Object 1") at sc/source/ui/unoobj/chartuno.cxx:343 Indeed, if graph hasn't type ChartSourceType::CELL_RANGE, it could be ChartSourceType::PIVOT_TABLE Change-Id: Id5a248535b214ad5f114671c52e4592d87c9f54a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113777 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> (cherry picked from commit 42e0ea0a6e4f48967d58fa95081c8ba5a6b08bc6) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114361 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-04-20tdf#93664 sc: fix filtering clicking on cells merged horizontallyTünde Tóth
Click on the filter button of cells merged horizontally showed the "Empty" entry instead of the filter list. Pressing Alt-Down (.uno:DataSelect) worked correctly here, so only mouse handling was broken. This was a regression from commit aaab3a79dfd762a64fa4c1d19dd29ae46c0b9dd0 "Resolves: #i120017, filter button is not shown in merged cell" (which fixed filtering clicking on cells merged vertically). Partial revert of that commit sets the correct first column in the merged range again instead of the last one. Change-Id: I83724f18580134868867bc829cad0739f0932733 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114050 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit b7d8ee083230964de2e1580c4639ee4cd307207f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114353 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-04-15Work around assert() in circular reference within group calc, tdf#141146Eike Rathke
Triggered by crash test loading document of wget 'https://bz.apache.org/ooo/attachment.cgi?id=71756' -O ooo114587-1.ods after commit 042dbf83122b14fd1dd32705c8f8b7d65c22f21b CommitDate: Thu Mar 25 16:31:29 2021 +0100 Resolves: tdf#141146 Fix LOOKUP in array with result scalar / single reference Though could happen any time whenever a shared formula group calc attempts to obtain a result from an already running cell. Change-Id: Id668b31a8d81389c593c6fd2191fd444efcdb70f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113494 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit 465b8b0e9ad4b0c9c7701dee2820a99c5d00b5bf) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113633 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-04-12tdf#138646 - consider the document's address conventionAndreas Heinisch
When accessing a named range using getCellRangeByName, consider the document's address convention. Otherwise, an exception is raised, when the formula syntax is EXCEL R1C1 or EXCEL A1. Change-Id: I5df2546f1c3fd00ff30cb057dcf47f6bb01d501d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112602 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113984
2021-04-10tdf#141416: partial revert of the fix for tdf#81396Xisco Fauli
d4743045a0b320449d07a957463a76bb8b13f939 < the cells need to be imported before we handle charts, tdf#81396 > Import time of sample file in tdf#141416 goes from more than an hour to 1 minute while keeping tdf#81396 fixed Unittest for tdf#81396 added in 9a59068fc31d7150e255ada91c59b8299636f185 Change-Id: Ic15d57945069397076c483b6ef8f3070057db317 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113818 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit 30f222c91fa816a7863bf4bfc4a36e503e0bf2d3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113768 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-08tdf#141547: maQueryItems can be 0Mike Kaganski
E.g., fillQueryParam (sc/source/ui/unoobj/datauno.cxx) may clear it and leave empty if relevant input item is empty. Note how commit e4b924df8f9ad02c66549751cb8e123e420e8508 had changed the same checks in ScQueryEntry::IsQueryBy[Non]Empty. Change-Id: I552462c72e69ddce43711bcff645dc6c7b133db7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113783 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit a0d2fb3217094aa7158310f0bcf16093bcc4984f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113757 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-04-07Resolves: tdf#128334 Reset mnCurrentSheetEndPos, mnCurrentSheetTab in all casesEike Rathke
Encountered for a single decimal separator not being a value either, but could be for any condition within IsReference() returning false up to the IsSingleReference() call. Change-Id: I6222adf2a2d06904001175da8798b2ba9fdef99c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113697 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit 4d4fd4cc57a37a5f24178cf8bac63d979f4323da) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113647 Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-06tdf#99913 XLSX import: set filtered flag for rowsTünde Tóth
hidden by AutoFilter to support copying the result of filtering. Unlike ODS and XLS, XLSX doesn't differentiates filtered and manually hidden rows, and without this fix, copy of the unupdated data of the loaded filtering contained the hidden rows, too. Change-Id: I390d1a84b9bf275f3d3782756553b2f236487758 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113040 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113382 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-04-06ofz: Segv on unknown addressCaolán McNamara
Change-Id: I6c69375a89781fc0b87230203335c861efb562f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113481 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-04-06tdf#139786 partial revert tdf#106181 XLSX export: output form controlsJustin Luth
Not every export is going to be to OOXML format, so don't just set ooxmlexport to true and remove the "if" clause (especially when leaving the comment that this is for DOCX only). This is a partial revert to 7.1 (and backported to 6.4.5) commit 577dd32b1c4eb0a4cff574fbabca987cb52b831b. Change-Id: If7ea32a236715ec779cac302773c4c9da19865a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113399 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> (cherry picked from commit a3c5c0f7ce73001adab7475fde1f8ffec4eef48b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113484 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>