Commit Graph
9968 Commits
Author SHA1 Message Date
Winfried Donkers fc121c32ca tdf#97977 make MODE.MULT fully compatible with Excel.
Also, improve efficiency of function.

Change-Id: Id01542bdd997e0cacfdfd16683d1ac832d22fa35
Reviewed-on: https://gerrit.libreoffice.org/51708
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
2018-03-29 21:46:43 +02:00
Noel Grandin 73e6a7975b loplugin:unusedmethods
Change-Id: I7805ac9bc6f8c0aa5ba4804777e7d7c2c29a78f3
Reviewed-on: https://gerrit.libreoffice.org/52066
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-29 14:45:43 +02:00
Noel Grandin bc8b3a8d45 loplugin:useuniqueptr in ScInterpreter
Change-Id: I682fa97a567ecf952214aa050a0ec981b4897ef5
Reviewed-on: https://gerrit.libreoffice.org/52028
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-29 08:35:43 +02:00
Noel Grandin 149a4d7566 loplugin:virtualdown in sc..sd
Change-Id: If93dc12f484839e6d2b44d6568b506f0c15b4735
Reviewed-on: https://gerrit.libreoffice.org/51989
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-28 13:01:12 +02:00
Noel Grandin 1a43481a1d loplugin:useuniqueptr in ScSortInfoArray
ScSortInfo is rather small POD object, so rather than using the heap,
and doing lots of pointer chasing, just allocate them in nice big cache-
friendly arrays.

Change-Id: Ice7b6afc73c7f6e2af51855d38184640ef440e46
Reviewed-on: https://gerrit.libreoffice.org/51914
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-28 08:39:55 +02:00
Noel Grandin e32c56855b use boost::optional in sc and svgio
instead of using std:unique_ptr to allocate small objects on the heap

Change-Id: Ifd309a9bf331910354406b827b89a0363f3b7eda
Reviewed-on: https://gerrit.libreoffice.org/51945
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-28 08:39:35 +02:00
Noel Grandin b2e8bbeafa loplugin:useuniqueptr in ScColumn
Change-Id: Iff6c68a29b9e7660132cbe4e556802b0f63706f0
Reviewed-on: https://gerrit.libreoffice.org/51904
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-28 08:39:21 +02:00
Noel Grandin f4f1654c07 tdf#106667 Hang when trying to open a dialog and the whole sheet is selected
regression from

    commit 8d54796bf1 (patch)
    enhance pass-by-ref plugin to detect large arguments

which converted this peice of code into an O(n^2) loop

Change-Id: I0473a084518c0d10411615e1b3901b9b90144bc9
Reviewed-on: https://gerrit.libreoffice.org/51956
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
2018-03-27 21:22:31 +02:00
himajin100000 8100a41597 tdf#116470:Apply BOLD to CJK/CTL pivot table style
by changing ATTR_CJK_FONT_WEIGHT and ATTR_CTL_FONT_WEIGHT
(carelessly forgotten in Change 51511)

Change-Id: Idd7fce6b20f8e1f5b8d70bdc74ba06833cd0a1d9
Reviewed-on: https://gerrit.libreoffice.org/51727
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2018-03-27 16:35:37 +02:00
Noel Grandin 3acc5a2383 tdf#69977 improve creation of large charts
this patch only tweaks a few things around the edges. The bulk of the
cost is down in the chart2 module where it creates ticks and labels.

Change-Id: If73a16d2f0a7511f07eff379a9b5c1b38ef96786
Reviewed-on: https://gerrit.libreoffice.org/51931
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-27 13:26:30 +02:00
Noel Grandin 0f87f89538 loplugin:useuniqueptr in ScMultipleReadHeader
Change-Id: I517593a910ed5783f256722bad915be2232f290e
Reviewed-on: https://gerrit.libreoffice.org/51913
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-27 09:54:37 +02:00
Noel Grandin 50af4bf5c6 loplugin:useuniqueptr in ScDrawLayer
Change-Id: I684e391b738be23ba7769b7c5b0a354f43a9226e
Reviewed-on: https://gerrit.libreoffice.org/51903
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-27 08:21:44 +02:00
Noel Grandin 26ebaae4f1 loplugin:useuniqueptr in ScPrintSaverTab
Change-Id: I51ef59e97e9b46cf9496dbefaabcc15471e9cdae
Reviewed-on: https://gerrit.libreoffice.org/51902
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-27 08:21:33 +02:00
Caolán McNamara 0869602fdf forcepoint #31 check validity of another group range
Change-Id: I82ff3e47a033c91581b108e1685b1ff4d5865895
Reviewed-on: https://gerrit.libreoffice.org/51881
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-27 00:36:49 +02:00
Szymon Kłos 030c30b33b tdf#116241 Customizing value highlighting colors
Available in: Tools->Options->Application colors

Change-Id: I6e4f7a0dcad9a6ee222275019596853f0cbd3ab0
Reviewed-on: https://gerrit.libreoffice.org/51791
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2018-03-26 23:24:08 +02:00
Noel Grandin 4f26869578 loplugin:useuniqueptr in ScDPSource
Change-Id: Iea0795b0c48ec8ad50af15beb0d27cc335b15660
Reviewed-on: https://gerrit.libreoffice.org/51846
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-26 15:34:55 +02:00
Caolán McNamara 6215deb5d2 forcepoint #30 check validity of group range
Change-Id: Ie0611f36809b051ce46030e44c137b4e1f8d2fe0
Reviewed-on: https://gerrit.libreoffice.org/51856
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-26 12:18:33 +02:00
Noel Grandin 7e1fbb3cdb loplugin:useuniqueptr in ScAddInAsync
Change-Id: Ic9b0964dd5c3d7188ec857fa52d20d030edacd5a
Reviewed-on: https://gerrit.libreoffice.org/51847
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-26 11:55:02 +02:00
Noel Grandin 939b90f126 loplugin:useuniqueptr in ScChartListener
Change-Id: Ib178b1cbe518088af7b3120c5188dd03ae4cf6c2
Reviewed-on: https://gerrit.libreoffice.org/51848
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-26 11:16:01 +02:00
Szymon Kłos 154496aefe Revert "tdf#116241 Customizing value highlighting colors"
This reverts commit fb29b82624.

Change-Id: I338af7c108bb6386193550ef0603b406c4f7bd99
Reaseon: I will move this to more suitable place "application colors" and extend with protected cell backround.
Reviewed-on: https://gerrit.libreoffice.org/51789
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2018-03-23 20:48:41 +01:00
Eike Rathke c53235ba9a Enable binary search for numeric values again
... as used in LOOKUP and VLOOKUP.

This was disabled as a fallout from

    commit bad266fa06
    CommitDate: Mon Feb 22 21:30:28 2016 +0100

        ScQueryEntry::GetSearchTextPtr() with SearchType, tdf#72196

that changed the !bRegExp condition (which includes numeric) to
bLiteral (which covers only text string) searches.

Change-Id: I265286ffe75bc7cd9e660ab82b0e647d82865eb9
2018-03-23 13:14:51 +01:00
Noel Grandin 503c93275e loplugin:useuniqueptr in ScPoolHelper
Change-Id: I12bb470b3c0af78aa713e7b28d59235b55507d24
Reviewed-on: https://gerrit.libreoffice.org/51737
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-23 08:17:58 +01:00
Samuel Mehrbrodt d8b7119859 tdf#116510 Copy cell anchored images too when copying cells
Change-Id: Ia64100a00e65b7871c44a9b4700ca86782897a8e
Reviewed-on: https://gerrit.libreoffice.org/51725
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-03-22 16:45:50 +01:00
Noel Grandin b7654432bf loplugin:useuniqueptr in ScDocument
and fix bug where we were deleting a pointer to an object
we did not own via pFormatExchangeList

Change-Id: I488c679734c48bd21bc6be04837e037e97550647
Reviewed-on: https://gerrit.libreoffice.org/51668
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-22 09:53:45 +01:00
Noel Grandin c0a76a9460 loplugin:useuniqueptr in ScColumn
Change-Id: If2f8e1f730fabaf124e515dbe58ec5d755d1e57b
Reviewed-on: https://gerrit.libreoffice.org/51667
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-22 07:36:12 +01:00
Noel Grandin cc2c1d9525 loplugin:useuniqueptr in ScDPResultMember
Change-Id: Icf8a52bcf233994bc49a5d9094196154f20602ea
Reviewed-on: https://gerrit.libreoffice.org/51663
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-22 07:33:56 +01:00
Szymon Kłos fb29b82624 tdf#116241 Customizing value highlighting colors
Change-Id: I5d77e6207d1e29326282d7184c9348e59292977a
Reviewed-on: https://gerrit.libreoffice.org/51653
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2018-03-21 17:54:47 +01:00
tagezi 3b3e203461 tdf#68290 cursor moves with Enter in protected sheet
Change-Id: I2ac848f1799d94f521628480664cdb579417772a
Reviewed-on: https://gerrit.libreoffice.org/49085
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
2018-03-21 01:08:03 +01:00
himajin100000 82aab78ccd tdf#116470:Convert between ProgName/DisplayName for pivot table style
to avoid styles in different languages to be unnecessarily registered

Change-Id: I450909d798749f751b1c59cda28865f6c3ea76c3
Reviewed-on: https://gerrit.libreoffice.org/51511
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
2018-03-20 21:13:28 +01:00
Caolán McNamara 4b785097f1 drop unnecessary includes
Change-Id: I1a817d5575bbd57ecaa874a27158b9218e4210cc
Reviewed-on: https://gerrit.libreoffice.org/51603
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-20 13:08:20 +01:00
Caolán McNamara cce17de6e7 coverity#1430077 add assert for 'Division or modulo by zero'
and

coverity#1430076 Division or modulo by zero
coverity#1430078 Division or modulo by float zero
coverity#1430082 Division or modulo by float zero
coverity#1430083 Division or modulo by zero
coverity#1430085 Division or modulo by zero
coverity#1430102 Division or modulo by zero
coverity#1430103 Division or modulo by zero

Change-Id: I9d7190f95d19a755c681f1f897a8921105ef7c46
Reviewed-on: https://gerrit.libreoffice.org/51568
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-19 21:19:21 +01:00
Noel Grandin 2ec02d7ea1 tdf#116421 autosum is not working
regression from
   commit 6529cd54c2
   don't use heap for elements in ScRangeList

The change in lcl_MoveRanges is not part of the fix, just something else
I noticed when reviewing the problematic commit

Change-Id: I958937f92a84f6e8e7bec607705c3a958d70ad3c
Reviewed-on: https://gerrit.libreoffice.org/51547
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-19 14:51:01 +01:00
Jochen Nitschke b2147abdf6 remove unused ucbstreamhelper includes
and a few vclunohelper includes

Change-Id: I4803605766d155fe5044c2a65c0444631146831c
Reviewed-on: https://gerrit.libreoffice.org/51496
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-19 07:38:49 +01:00
Julien Nabet b37f81f298 cppcheck: arrayIndexThenCheck
Change-Id: If30664066e3f3f99c02244e248e72406380069aa
Reviewed-on: https://gerrit.libreoffice.org/51513
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-03-18 21:10:46 +01:00
Noel Grandin 04caeef4fd loplugin:useuniqueptr in ScDPSaveDimension
Change-Id: I169a8eff540c866958da37c25a03550542433f16
Reviewed-on: https://gerrit.libreoffice.org/51372
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-16 13:10:47 +01:00
Noel Grandin 4b2d899bc0 loplugin:unused-returns in sc
Change-Id: Ic1d6cbf883fcfeb013c3a82d31c177a1a14bb7c8
Reviewed-on: https://gerrit.libreoffice.org/48193
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
2018-03-15 23:44:18 +01:00
Eike Rathke fd5e480eaf Check return of ScFlatBoolRowSegments::ForwardIterator::getValue()
And if it is only an assert() where code (probably rightly)
assumed there is a value.. if there wasn't then we'll have to
handle it.

Change-Id: Icbdb4a7727ca4cf8a6372c03e02d3bffa6156b6c
Reviewed-on: https://gerrit.libreoffice.org/51374
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
2018-03-15 23:43:56 +01:00
Eike Rathke 4748151417 Use return value of ScTable::GetDataEntries()
It's unnecessary to insert an empty set and sort it..

Change-Id: I01b7ce926747083dc9b5a82304c8ab182cd5a1bd
2018-03-15 19:00:19 +01:00
Winfried Donkers c71e8df90b tdf#97977 related : make MODE.SNGL comply with Excel.
MODE.SNGL is to return the first occurrence of the number that has the
most occurences in the array of numbers in case of multiple
numbers having the same amount of (maximum) occurrences.

Change-Id: If76115ddc6b84367cbcb75de611f29076a538476
Reviewed-on: https://gerrit.libreoffice.org/50593
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
2018-03-15 18:48:00 +01:00
Bartosz Kosiorek 45d5c18a9a tdf#50916 Refactor of the table7.cxx to allow dynamic column size
Change-Id: I60ea249ca621e25b3585e1d2f75bdf15d96f6dcc
Reviewed-on: https://gerrit.libreoffice.org/48205
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Eike Rathke <erack@redhat.com>
2018-03-15 18:21:06 +01:00
Noel Grandin f725b130e5 loplugin:useuniqueptr in ScBroadcastAreaSlotMachine
Change-Id: Ib1f54ad7eeae5ea66ad7f8f789e86cd89c4b32d4
Reviewed-on: https://gerrit.libreoffice.org/51316
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-15 11:46:52 +01:00
Noel Grandin a3aceef820 don't use heap for elements in ScRangePairList
no need to store small objects like this out of line.

And use std::array for ScRangePair, so we get range checking in debug
mode.

Change-Id: Ie4690edbb4c3fdc4e08206cb016b8167a399d95a
Reviewed-on: https://gerrit.libreoffice.org/51268
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-15 07:30:26 +01:00
Noel Grandin bb787e7b45 modernize ScRangePairList::CreateNameSortedArray
we have this STL thingy now, pretty cool

Change-Id: Id96010dda59736bd0c143312424018b6ea5621f1
Reviewed-on: https://gerrit.libreoffice.org/51230
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-14 07:18:41 +01:00
Eike Rathke f59cf3874a ofz#6845 use of "deleted" ScRange
If nOverPos<i and i was last element, the next pOver=&rRange was
invalid, though not deleted because std::vector::erase() does not
reallocate.

Change-Id: I22d9302e2d45403dd47ac1947d2cf003b3a4f291
2018-03-13 22:36:27 +01:00
Samuel Mehrbrodt 6ae7b9d40c tdf#114552 Also reduce the anchor offset when shrinking images
Else the image will get larger than its current cell.

Follow-up for 4f29ce6a67

Change-Id: If2fb1087961a1b20f5a408ca3061956e96330e91
Reviewed-on: https://gerrit.libreoffice.org/51209
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-03-13 14:16:14 +01:00
Noel Grandin ebd9a6a652 loplugin:useuniqueptr in ScPageHFItem
Change-Id: I430ee7ff6dc5357593b152f9fe0f73d4b69ccf6a
Reviewed-on: https://gerrit.libreoffice.org/51204
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-13 13:24:49 +01:00
Noel Grandin 51da4c898d loplugin:useuniqueptr in ScConditionEntry
Change-Id: Ifcb2949fd932de249b71322ec9827e1ba3b1fe1b
Reviewed-on: https://gerrit.libreoffice.org/51206
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-13 13:24:12 +01:00
Noel Grandin af2652c1c2 loplugin:useuniqueptr in ScDocumentPool
Change-Id: Ia43710711b517e72d7758fea5603c1f3bf6e093f
Reviewed-on: https://gerrit.libreoffice.org/51205
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-13 12:46:12 +01:00
Samuel Mehrbrodt 4f29ce6a67 tdf#114552 Improve image scaling in Calc
When anchor type "To cell (resize with cell)" is selected, we do now::

1. Consider aspect ratio when scaling graphic objects with cell
   This only works when the image fits into one cell.
   When the image is over multiple cells, we need to respect the end
   anchor, so we need to keep the existing behavior (no aspect ratio considered).
2. Always scale images if anchor type is "resize with cell"
   Previously it would only scale if the image is larger than the cell.
   Now we always enlarge the image if the cell is enlarged, and shrink
   the image if the cell is shrinked _and_ the image no longer fits
   into the shrinked cell

Change-Id: Ib2a24819d0058bcebce73ea97bbf70a963d74584
Reviewed-on: https://gerrit.libreoffice.org/50451
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
2018-03-13 00:23:40 +01:00
Eike Rathke adc6ba2ad5 Rename ScMatrix::IsString() to IsStringOrEmpty()
... to prevent further confusion what it acually returns.
Follow-up inspection of places where used might be necessary, and
whether an IsEmpty() is used and necessary or an IsAnyEmpty() or
some such would be needed.

Change-Id: I7975a97f0d16442cf195956d148bfb7fbdf89c6a
Reviewed-on: https://gerrit.libreoffice.org/51055
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
2018-03-10 22:58:40 +01:00