summaryrefslogtreecommitdiff
path: root/sc
AgeCommit message (Collapse)AuthorFilesLines
2017-03-14Resolves: tdf#106459 3D reference can't be handled as vector referenceEike Rathke1-0/+4
Change-Id: Icba12a6218086079a7d5538f7263bccb1f2ee1b0 (cherry picked from commit ca1f051972946b24cb6658143fb0d0ac3587a988) Reviewed-on: https://gerrit.libreoffice.org/35051 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-03-10tdf#95612: Print preview: page numbering starts with 1 (not 0)Katarina Behrens1-3/+3
unless otherwise specified. It was okay for 1st page & broken everywhere else. Possibly resolves tdf#95206 as well ... Change-Id: Ie69f770a28dd69f90d4f04ad4fa9e701fa2d56e2 Reviewed-on: https://gerrit.libreoffice.org/34759 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit c07ac0d92ad830762906586164bab466a0f05531) Reviewed-on: https://gerrit.libreoffice.org/34946
2017-03-07tdf#101904 Fix Date deleting in SCalcJean-Sebastien Bevilacqua1-4/+65
Introduction ------------ In SCalc, when you want to clear contents, a dialog box asks you the data type you want to delete. For example, if you select `Date & time`, only cells of type `Datetime` should be deleted in the selected area. Currently, this feature is not working for datetime type. To delete datetime cells, you must select `Numbers` type. Datetime type is seen as number. Context of this fix ------------------- First, `DeleteAreaHandler::operator` function is called for each area to delete. In this context, area has a special meaning. An area is a group of consecutive cells (on column) of the same datatype (numeric, formula...). To locate area in the column, we use the `node.position` attribute which contains the row index of the cell (remember area can be only on one column) and `nDataSize` which contains the number of rows. How this fix works ------------------ In `deleteNumeric` function, we loop through area rows to detect if cell contains a numeric value or a datetime value. To optimize performance, we don't delete cells one by one but we get a range of the same datatype. As long as datatype stays the same, we add current cell to a "sub-area" but as soon as datatype switches (datetime -> number or number -> datetime), we delete this sub-area. Finally, at the end of `deleteNumeric` function, we delete the last "sub-area". Note ---- `deleteNumberOrDateTime` function deletes rows only if the corresponding flag in the dialog box is setted: `mbNumeric` for `Numbers` and `mbDateTime` for `Date & time`. Change-Id: I24c0b3c0a6195211af71aa18d867df82109fa941 Reviewed-on: https://gerrit.libreoffice.org/34068 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com> (cherry picked from commit 4575d7cf657ae291c427c2318eb4600cec2f12b7) Reviewed-on: https://gerrit.libreoffice.org/34956
2017-03-07tdf#104117 set template parameter sal_Int64 for randomTomaž Vajngerl1-1/+1
Change-Id: Ie8cef4375608df160b383ff74c32838f00e60aba Reviewed-on: https://gerrit.libreoffice.org/34777 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Kohei Yoshida <libreoffice@kohei.us> (cherry picked from commit 23672df737258391bd9533e61733c6cc70b9a5eb) Reviewed-on: https://gerrit.libreoffice.org/34817 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-02-25xPoolHelper is empty in a clipboard docMarkus Mohrhard1-1/+1
Found by the crashreporter: http://crashreport.libreoffice.org/stats/signature/ScDocument::IsClipboardSource() Change-Id: I3fb030921b653396deb46a9e98d30d5df9c9ce15 (cherry picked from commit c63ff2a769f4601f67ffd13cb36df63c70fdd601) Reviewed-on: https://gerrit.libreoffice.org/34641 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-02-24Resolves: tdf#105854 retain popover if it has the same pos, size and settingsCaolán McNamara3-4/+28
Change-Id: I102874867020a3c471567cbdc97162c564351635 Reviewed-on: https://gerrit.libreoffice.org/34485 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2017-02-23Resolves: tdf#105667 forget target area's caption pointer in Merge UndoEike Rathke1-1/+7
It's the same that was copied to the Undo document, so don't delete the caption. Change-Id: Ib89870ed6e392c4271de2f416c78d42135922609 (cherry picked from commit a627c44026fcf883918f84bddd1c3b745e1f898c) Reviewed-on: https://gerrit.libreoffice.org/34384 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-02-21Resolves: tdf#106089 generate range string with current address conventionEike Rathke1-2/+15
This is a combination of 2 commits. Resolves: tdf#106089 catch legal IllegalArgumentException on bad range string ... that for example doesn't match the document's current address convention. Further work is need to make that actually fly, but at least don't terminate the application but come up with a default Chart instead where the range can be edited. (cherry picked from commit 0200677891c6d592a12343f0d6f82c569cd7a9e0) Related: tdf#106089 generate range string with current address convention ... so subsequent parsing actually works. (cherry picked from commit 3ec3d7ead0f2e47a4e24ba0d6953fea0f49815ed) 47d661d24552104b56827248b4c5e6a6617c5d63 Change-Id: I6cb6400c56c896dac7ab949b8a986c784690dfd3 Reviewed-on: https://gerrit.libreoffice.org/34496 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-02-18Resolves: tdf#105858 check SC_DPOUT_MAXLEVELS to prevent crashEike Rathke1-47/+71
This is a combination of 2 commits. Resolves: tdf#105858 check nDataCount<SC_DPOUT_MAXLEVELS to prevent crash (cherry picked from commit 9bdf971b0202c6d55d88e61861b251459de9586b) more counts<SC_DPOUT_MAXLEVELS to check, tdf#105858 related Also for row, column and page field arrays. (cherry picked from commit 7fbdd8b7d3741d55b229977f9e6d6213af5fa542) 1dccdf139af778a2c0dc550be0b573c984256a2d Change-Id: If9084543a0a191d08da37b5b8a187bce46440871 Reviewed-on: https://gerrit.libreoffice.org/34369 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-02-16tdf#95306: Be sure to specify the entire range.Kohei Yoshida1-2/+2
Especially in presence of multiple disjointed selections. Change-Id: I8e7779824109c30e69fd43a2448ae900beaf28d3 Reviewed-on: https://gerrit.libreoffice.org/34140 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Kohei Yoshida <libreoffice@kohei.us> (cherry picked from commit 6d450aad0a8f82ee0320ffc3e76eefb43c16addb) Reviewed-on: https://gerrit.libreoffice.org/34143 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2017-02-15tdf#105840 EXCEL export: fixes for hidden defaultRowJustin Luth4-8/+29
second attempt at fixing hidden rows without creating a million repeated rows. (related to tdf#98106) This affects both .xls and .xlsx. XLSX previously had NO support for default-hidden(zeroHeight), but XLS already did. Change-Id: I804e3f2ba21e595a1c2b2ebb355f0995868dd289 Reviewed-on: https://gerrit.libreoffice.org/34128 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl> Reviewed-on: https://gerrit.libreoffice.org/34277
2017-02-15Optimize Excel GetOrCreateRow: compare to previous map entryJustin Luth1-2/+5
Follow-up patch to 09e9274fc080b471393b806617eb03124db67590 and related to tdf#105840. Just keeping the non-dependent parts separate, and building up to a solution for bug 105840. Change-Id: I129e671f71de6abf876a82d4a6503695add85548 Reviewed-on: https://gerrit.libreoffice.org/34039 Reviewed-by: Justin Luth <justin_luth@sil.org> Tested-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl> Reviewed-on: https://gerrit.libreoffice.org/34276 Tested-by: Jenkins <ci@libreoffice.org>
2017-02-15Optimize Excel GetOrCreateRow: reduce loopsJustin Luth1-10/+27
for ( size_t nFrom = maRowMap.size(); nFrom <= nXclRow; ++nFrom ) This previous code worked best under the assumption that every row is added to the map. However, the size of the map actually has no correlation to the row numbers contained in it when many rows are identical to each other (think silly formatting and empty rows - related to tdf#105840) Thus row 1,000,000 could occupy slot 2, and every access of that row would then trigger nearly 1 million redundant loops. Optimize: -check to see if the row already exists - if so do nothing. -existance of higher rows indicates there are no missing rows. -build missing rows from the previously-mapped row. Reviewed-on: https://gerrit.libreoffice.org/34038 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl> Conflicts: sc/source/filter/excel/xetable.cxx Change-Id: Ib02520a1bf0f77b5ca0ec5ad3165ff7ea879515f Reviewed-on: https://gerrit.libreoffice.org/34275 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2017-02-14tdf#103890: Fix the logic on setting 3D flag on reference.Kohei Yoshida1-6/+7
This is a backport commit that combines 3 original commits from the master branch. (cherry picked from commit bf8d4fb60da5e583b3a90639af45b901e19cb5aa) (cherry picked from commit 6e1efe7b6bd16e3183cdb7c87d786cb714a61959) (cherry picked from commit aeb465a458fc7ba02e3b1ca6b4193488defef511) Change-Id: I401d379be058cc45a5715a4a8a8f72aa56208655 Reviewed-on: https://gerrit.libreoffice.org/34138 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-02-12tdf#86470: Let's not forget to move onto the next column.Kohei Yoshida1-2/+2
Change-Id: I451f521723458b5d6fe9d9fa8b41855fe17def64 Reviewed-on: https://gerrit.libreoffice.org/34159 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Kohei Yoshida <libreoffice@kohei.us> (cherry picked from commit bcdde13996e3e33f9d4c41be25d062560c72636b) Reviewed-on: https://gerrit.libreoffice.org/34163 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-02-08tdf#105629: Let's move the advanced-filter specific stuff ...Kohei Yoshida1-15/+14
to the place where we actually parse the filtering rules for advanced filter queries. Change-Id: I87650227e15fa54303efd720530d31ecf9827226 Reviewed-on: https://gerrit.libreoffice.org/33816 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Kohei Yoshida <libreoffice@kohei.us> (cherry picked from commit 42e472b5870278058537d43d03d457dc80b16166) Reviewed-on: https://gerrit.libreoffice.org/33852 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-01-31Resolves: tdf#105410 do not crash on a deleted formatEike Rathke1-2/+5
... if the last condition was deleted and the Manage list is to be updated. The format is gone. Change-Id: I0fc056b5c75849197f351871b0d05e5015d0d1bf (cherry picked from commit e32c8293709d4940ccf9f3def963e5a87925e583) Reviewed-on: https://gerrit.libreoffice.org/33713 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-01-30tdf#105548 fix incorrect DATEDIF result.Winfried Donkers2-9/+33
DATEDIF didn't convert datetime values to date before calculating date differences, which in certain cases produced incorrect results. Adding use case to unit test document. Removed 'TODO-comment' after checking what Excel really does. Change-Id: Icc16413e43f664d1c993d24e31eb4dc6990623e9 Reviewed-on: https://gerrit.libreoffice.org/33662 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> (cherry picked from commit e7606f1f19b2970f0160075f56d4d97029f1e47a) Reviewed-on: https://gerrit.libreoffice.org/33704
2017-01-27Resolves: tdf#105450 calc navigator gets 0 height on toggle off/on when dockedCaolán McNamara3-11/+10
Change-Id: Icd346cdf0a208ccaeddd77e6803f4f906361324c (cherry picked from commit b37ac48935621fcc7b71f81a8b892f24e85e5b6f) Reviewed-on: https://gerrit.libreoffice.org/33498 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-01-27dissolve LinkUpdateMode confusion, document::Settings vs XGlobalSheetSettingsEike Rathke2-17/+53
This is a combination of 3 commits. this is css::sheet::XGlobalSheetSettings attribute LinkUpdateMode ... and not css::document::Settings property LinkUpdateMode. It directly maps to ScLkUpdMode, LM_UNKNOWN isn't documented as a valid input value. (cherry picked from commit 109cff60a3a18b20b2e0efefd0d49f6eab9b52fd) remove now unused header file (cherry picked from commit d03cacfb7b9b126e375dfeaeed2fcd74d4fa48fb) this is the css::document::Settings property LinkUpdateMode ... not the css::sheet::XGlobalSheetSettings attribute LinkUpdateMode. (cherry picked from commit 32d90e643e4d9285366169301af4342d871c0d94) 7a9696f07c1a6e1deec342f224343bd938078c2c 039c8d39e89e693de1c5a1a4218c2fca70a6de9f Change-Id: I062a1fd32ad6a98db4f8e78de4724be1c8190407 Reviewed-on: https://gerrit.libreoffice.org/33600 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-01-27Resolves: tdf#105558 accept numeric BASIC return types as numericEike Rathke1-6/+45
... not only SbxINTEGER, SbxLONG, SbxSINGLE and SbxDOUBLE. Change-Id: I75d892f5ae60ef1b18bd86e64777dea746e35a1f (cherry picked from commit 9a283e44ca7de2f2fa276544b4d49cff495bd53d) Reviewed-on: https://gerrit.libreoffice.org/33616 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-01-27Resolves: tdf#104153 crash on drag and drop pivot table fieldCaolán McNamara5-36/+19
This is a combination of 2 commits. Resolves: tdf#104153 crash on drag and drop pivot table field now though sometimes it doesn't get removed at all, so a band aid for the moment (cherry picked from commit 068edb65b1dce375223d8642a01b07db3948ac03) Resolves: tdf#104153 lookup what listbox an entry is dragged from so we can find where its been dragged from in order to remove it from that source, rather than relying that it comes from the previously focused listbox Reviewed-on: https://gerrit.libreoffice.org/33575 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com> (cherry picked from commit 011bae55cdd24a1d3e42f0aa2fcfd98d3ddc9b14) e6aa1a311b46e5e9ee96cab05e0705b794b5eb0b Change-Id: I6ccbbe51fe9250af0f85c30a9d253269a18df457 Reviewed-on: https://gerrit.libreoffice.org/33630 Reviewed-by: Eike Rathke <erack@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-01-26tdf#101828 handle rtf/richtext correctlyOliver Specht10-15/+45
Change-Id: Id894f62a918bd6e6fa59f8d546307343bf2bd4b0 Reviewed-on: https://gerrit.libreoffice.org/32682 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 048e30c1f8231e6cd144a9251061f6fa127b353e) Reviewed-on: https://gerrit.libreoffice.org/33567 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-01-25Resolves: tdf#104675 ScConditionalFormat ranges needed to start listeningEike Rathke1-1/+1
Conditional format manager dialog holds a cloned list of ScConditionalFormat and sets that at the document on OK. The ranges of a format need to be set before ScFormatEntry/ScConditionEntry are added to start their listeners. Change-Id: I903553b1f6a8298838ee8753315a6ea263b29b08 (cherry picked from commit 657eea01046c7f39ee8ca4545241372177385946) Reviewed-on: https://gerrit.libreoffice.org/33525 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-01-25Resolves: tdf#105351 pass matching index key to conditional format dialogEike Rathke1-0/+1
Change-Id: I9d872140755c4ec0ae67349530b00f339057a356 (cherry picked from commit 0367acdcc59e14b0b067976a08202e8afef0ecf3) Reviewed-on: https://gerrit.libreoffice.org/33528 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-01-25ScFormulaListener: do not start listening to clipboard or Undo docsEike Rathke1-1/+4
Change-Id: Ic00e30eccc64cc85ee877572ef8df042899f45f5 (cherry picked from commit 81845445de26111eb0b7e30f45b3708389fd76cf) Reviewed-on: https://gerrit.libreoffice.org/33527 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-01-25tdf#104967 preserve isolated notes data in clipboard when closing documentEike Rathke10-26/+60
Change-Id: I0e263583e27c5103c0bb90e8fe00562e46a52d98 (cherry picked from commit b8b657123cc508c906622d20669507628c93e104) Reviewed-on: https://gerrit.libreoffice.org/33289 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-01-24tdf#105348 add check for divide by zero situation.Winfried Donkers1-2/+8
Reviewed-on: https://gerrit.libreoffice.org/33098 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> (cherry picked from commit 84e87423c182ec78aba4eb108355906a0d2f0096) Backported, without test case document. Change-Id: I339997870a7983d829a8909d2b3da7b3ab03f58d Reviewed-on: https://gerrit.libreoffice.org/33484 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2017-01-23Resolves: tdf#105466 crash when changing conditional formatting conditionCaolán McNamara1-8/+12
Change-Id: Id219a7935f83acf3924e60cb1bf02311dc5c4372 (cherry picked from commit 0b7c1dcd149cd98136e5ed3e8e0e70255d87cd16) Reviewed-on: https://gerrit.libreoffice.org/33481 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-01-23Resolves: tdf#105411 remove from entries before disposeCaolán McNamara1-2/+3
cause on dispose all the state change callbacks are called, and all of the conditional formatting code assumes that if there's an entry in the entries, that its not an empty disposed one Change-Id: I50d85128ba884a0719959f2d6e7ae83d6fb3431c (cherry picked from commit 2fb220093f7178f75ebd582bbcd956c1ee7e03db) Reviewed-on: https://gerrit.libreoffice.org/33476 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2017-01-23coverity#1399031 golden, Out-of-bounds readCaolán McNamara1-1/+1
There are 17 elements, so SAL_N_ELEMENTS(sppnPatterns) is 17 The largest valid index is 16, not 17, so valid max index is out by one Change-Id: Id20218a0e73cb9e502a631fa6bfbb3f0a22c4727 (cherry picked from commit 9ad08b403be9c6646cda9a379332545c3668975b) Reviewed-on: https://gerrit.libreoffice.org/33400 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-01-22tdf#104967 prevent crash when pasting notes originating from a closed documentEike Rathke1-0/+15
This is only a workaround to prevent a crash, the actual note content is lost when pasting, only a standard empty note caption will be pasted. Change-Id: Ifaef5d30cc2024f3d03d6b2b4f56c5ccfbb67142 (cherry picked from commit cb566c056b0e8f9f73dac3cbaf497e102a247cb9) Reviewed-on: https://gerrit.libreoffice.org/33273 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-01-22Resolves: tdf#105158 set date or time return type for DATEVALUE TIMEVALUEEike Rathke2-5/+28
... so adding/subtracting another date produces number of days instead of date, and adding/subtracting a number produces date. But if used as the final formula result force number type. Change-Id: I046f5cc53d1fe8c9f6f71876787f2f19d24fe146 (cherry picked from commit b85ee27d9f8039a6442429587598426e73aeb1ba) Reviewed-on: https://gerrit.libreoffice.org/33362 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-01-13fix interchanged parametersJochen Nitschke1-2/+2
first one found by cppcheck > sc/source/filter/excel/xelink.cxx 637 > funcArgOrderDifferent > warning Function 'InsertExtName' argument order different: > declaration 'rnExtSheet, rnExtName, rUrl, rName, rArray' > definition 'rnExtSheet, rnExtName, rName, rUrl, rArray' Change-Id: I6b9bdbf58a8eb271e873bf8dfc30041a72419f59 Reviewed-on: https://gerrit.libreoffice.org/32927 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr> (cherry picked from commit ebadc6017827edef2bca7ed389d1af9ebffb96e9) Reviewed-on: https://gerrit.libreoffice.org/32989 Reviewed-by: Eike Rathke <erack@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-01-11tdf#97598 xlsx import: do not apply any scenariosJustin Luth4-17/+24
Excel does not automatically apply scenarios, so neither should LO. Scenarios appear to first be supported in 2009 and this section that applies the "mnShown" scenario comes from > commit 0851da4d8a0a557f1e9a31af652a530c615c2989 > CWS-TOOLING: integrate CWS dr68 mnShown should only mean the last scenario that was shown, so mark it as active, but don't apply it. In Excel, mnCurrent tracks and auto-selects a scenario in the dialog box, so that is irrelevant to us. Change-Id: I6b4a9b14733d6ab6dc2283a569f0e2484f81c24f Reviewed-on: https://gerrit.libreoffice.org/32432 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> (cherry picked from commit dfc6f4c1be58b088dd099f6f8bb6103bf962e144) Reviewed-on: https://gerrit.libreoffice.org/32941 Reviewed-by: Justin Luth <justin_luth@sil.org>
2017-01-10Resolves: tdf#104711 adjust range reference constructed of named anchorsEike Rathke4-10/+45
A constructed range reference of named anchors (i.e. extended during expression compilation) forms a range listened at that needs to be adjusted if the cell is shifted and one or both anchor parts are individually named relative references. Currently the resulting range (ScComplexRefData aka DoubleRef) does not know to distinguish between whether its anchors are the result of a literal range in a named expression or the result of individually named anchors, so such RelName DoubleRef needs to be adjusted unconditionally when shifting or moving the formula cell. Change-Id: I75e2cc79ac60116671acce7641567337d5f5f7ed (cherry picked from commit 439b2a134218b93e6ca9fa23005b89c19498f586) Reviewed-on: https://gerrit.libreoffice.org/32923 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2017-01-06recognize the broken "Err:xxx" written by 5.2 and earlier, tdf#105024 relatedEike Rathke1-5/+16
... and handle same as "#ERRxxx!" if present. Change-Id: I1ebb31d628b080c52b450a8fe624c20e9e1188b7 (cherry picked from commit 75d963bc7bb87429f304d29138c27178880c039a) Reviewed-on: https://gerrit.libreoffice.org/32793 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-01-06read single error constant formula as such, tdf#105024 relatedEike Rathke4-10/+25
... without creating a token so when writing again no leading '=' is prepended, with which we can enable 5.2 to read such thing correctly, and when re-reading in 5.3 it also doesn't lead to a "real" formula. Change-Id: I26fbd20536436b49b781e2bbb5bba1dc6bafbb37 (cherry picked from commit 4fcbe16959c839bfacf745cfa554b234e639f794) Reviewed-on: https://gerrit.libreoffice.org/32792 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-01-06out of bounds string accessEike Rathke1-1/+1
Change-Id: Iecbe24f90cefe34a447cd52a44967a4b09b4394b (cherry picked from commit 00f17500520bcb2634146496adc8de9f4d28eea5) Reviewed-on: https://gerrit.libreoffice.org/32787 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-01-06Resolves: tdf#105061 Only one text box shown in case of 'between'Caolán McNamara2-0/+9
non-layout ScCondFormatList widget not responding to layout child change Change-Id: I7edd4fc54de9e71fb86b47a9b182bfc22fa4af25 (cherry picked from commit ac561ab34ea9d26243fe3791f624c440dcf7ae6d)
2017-01-06check token array code errors when testing for equality, tdf#105024 relatedEike Rathke2-0/+16
To not end up with a series of equal errors when importing individual error cells and attempting to group them. Change-Id: Idfcbb2e7077fc8799ef925c2c2e17188ac5e3b14 (cherry picked from commit 44021bd4018f4f97d9f0f6b6e1f0a256e8853537) Reviewed-on: https://gerrit.libreoffice.org/32762 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2017-01-05tdf#105024 use context to generate "error only" formula stringEike Rathke1-1/+4
The ScGlobal::GetErrorString() shortcut produced error constants in the localized UI language, which was wrong anyway when storing ODFF. Use compiler with context instead to generate the proper symbols. However, this currently maps all not defined Err:xxx to #NULL! so to preserve those additional work is needed. Change-Id: I1de7621d6349d5b00a5aac1cedc9f265c78c7db1 (cherry picked from commit 896dd3962cd7e62bb2a9ebc6f97ff77936ec06a8) Reviewed-on: https://gerrit.libreoffice.org/32752 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-01-05Resolves: tdf#104919 crash with empty ScNavigatorDlg memberCaolán McNamara2-0/+10
commit 292560a957498bed70b625c992ec6bcf631dceb3 Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Mon Oct 17 13:23:23 2016 +0200 loplugin:unusedmethods detected the intended methods to do this were unused, so restore then, but hook them up this time Change-Id: I3b7e4a557696a91a70956487468b99fec6324a93 (cherry picked from commit f91dc0342de13e648dba5d9a93c01db23ae83533)
2017-01-05handle paste special of single formula cell if IsEmptyDisplayedAsString()Eike Rathke1-0/+5
Similar to CopyCellsFromClipHandler. Change-Id: I7da8a55c3648c6f04c5f3b11459764fd42f51399 (cherry picked from commit 3afe82bd63fde41d2a88418fb64e4ff587b05436) Reviewed-on: https://gerrit.libreoffice.org/32743 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-01-05handle paste special of single formula cell with error resultEike Rathke1-0/+7
This apparently was never implemented, unlike in the block pasting code that handles it fine. Formula cells with error results were always copied as is if numeric was requested, even if formulas weren't requested. Change-Id: Id550c4e757b6bb2c06aa0637328216383cdf3d6b (cherry picked from commit 12ecd30476f17c6f6efde976f8e56d604eda0f1e) Reviewed-on: https://gerrit.libreoffice.org/32742 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-01-04tdf#104981 Fix deficiencies with PERCENTRANK functions.Winfried Donkers1-2/+7
Added constraint check for significance argument. Replced inproper use of log() with log10(). Improved code efficiency a little bit. Change-Id: Ie918857e6a04ea9fcf18410f789d7252f9c1cfc8 Reviewed-on: https://gerrit.libreoffice.org/32528 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> (cherry picked from commit facb4e69e4c75839df89969206403d2e97146dbd) Reviewed-on: https://gerrit.libreoffice.org/32703
2017-01-03tdf#105026 Remove wrong constraint in PERMUTATIONA.Winfried Donkers1-1/+1
With permutations with repetitions, argument selection may be larger than argument elements. Probably inadvertently copied from PERMUT; has been there from pre-git. Change-Id: Icdee18eca647fb278f140630e45844684a1e3046 Reviewed-on: https://gerrit.libreoffice.org/32569 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> (cherry picked from commit 25625f18a282209235214674f2b81604ecd067ad) Reviewed-on: https://gerrit.libreoffice.org/32704
2016-12-16tdf#104581 handle constraints for NEGBINOMDIST in compliance with ODFF1.2.Winfried Donkers1-7/+7
Also changed varaiable names for easier understanding of their meaning. Change-Id: I7c6f338c04898c7b07ebeb97fb331d51fa691f5b Reviewed-on: https://gerrit.libreoffice.org/31910 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com> (cherry picked from commit 245b615400904274e264d5051baf63b3613db935) Reviewed-on: https://gerrit.libreoffice.org/32087
2016-12-16Resolves: tdf#103543 disable mass broadcasts from drawing objects' changesEike Rathke1-0/+4
Specifically the a11y listeners are nasty bottle necks. A11y will get updated on paint/view. We're touching all objects on that drawing page to reposition so interdependencies that need to be broadcasted should not happen. Change-Id: Ic80446e22422a3097281ba20eecf0a078ac6a7cb (cherry picked from commit 6a334757082be4915e7e731ce4c1b0bd4641050d) Reviewed-on: https://gerrit.libreoffice.org/32064 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2016-12-16tdf#71435: Accessible caret-moved events are missing when "freeze" is enabledTamás Zolnai1-1/+1
Two accessible document is created when "freeze" options is enabled. meSplitPos identifies which accessible document handle which part of the window. We should handle events only in that accessible document which handles the active part. Change-Id: Ic9674344951f620546dd272beaad796de611d258 Reviewed-on: https://gerrit.libreoffice.org/32065 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 06ea887f8ba34a628d7641eab210501f7bd2493d) Reviewed-on: https://gerrit.libreoffice.org/32077 Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>