Commit Graph
3406 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
Zdeněk Crhonek 09d1353ece uitests for bugs tdf#71339 tdf#116215 tdf#116421
Change-Id: I4533c4d8cc2742592a0f34b3cdeebee556fd1f67
Reviewed-on: https://gerrit.libreoffice.org/51785
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-03-28 23:48:49 +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
Jens Carl 3fc835b799 tdf#45904 Move _XCalculatable Java test to C++
Change-Id: Ib1fac049d2a135074de45c17fbaa78b0af2bec91
Reviewed-on: https://gerrit.libreoffice.org/51929
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-03-28 03:28:30 +02:00
Samuel Mehrbrodt 8766bb000a tdf#116510 Unit test for copying columns with images anchored to cells
Change-Id: I194252bb07842dbc0376da5a143e93b557bcc04d
Reviewed-on: https://gerrit.libreoffice.org/51860
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2018-03-27 14:00:39 +02:00
Caolán McNamara edfa056261 ofz#7121 NamedDBs::insert takes ownership of its argument
at one point this was based on std::auto_ptr and didn't
free its arg on failure

Change-Id: I8aeed6876d80b7ebe4ebb5e2cfd12e00420bd207
Reviewed-on: https://gerrit.libreoffice.org/51932
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-27 13:30:40 +02:00
Jens Carl 655b9054bc tdf#45904 Move _XDDELink Java test to C++
Change-Id: Ic7a23088ee10f2d92d05354131e3066ec098a7b9
Reviewed-on: https://gerrit.libreoffice.org/51850
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-03-27 03:14:09 +02:00
Caolán McNamara 01582612fe forcepoint #29 detect illegal self series add
Change-Id: I3bba0f942780c54951a3a810c05cc3b56ca18a5e
Reviewed-on: https://gerrit.libreoffice.org/51854
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 14:58:08 +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
Jens Carl 6189c211d5 Correct class name of ScAutoFormatObj
Change-Id: I0abb4590126b7c7a7d855ec57f340ea0157c56d5
Reviewed-on: https://gerrit.libreoffice.org/51813
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-03-25 18:24:17 +02:00
Jens Carl f9099cecf9 Correct class name
Change-Id: Ie7e7ce72c264d9244bd0cb2e8e1f51fb6f4434d8
Reviewed-on: https://gerrit.libreoffice.org/51756
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-03-23 07:48:19 +01:00
Jens Carl b910203239 tdf#45904 Move _SpreadsheetDocumentSettings Java test to C++
Change-Id: Ic6bde95d0d4255e082a60e41a117365422b22aa8
Reviewed-on: https://gerrit.libreoffice.org/51724
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-03-22 16:56:04 +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
Jens Carl fd911a3250 tdf#45904 Rename test object for GlobalSheetSettings
Rename test object ScSpreadsheetSettingsObj to ScSpreadsheetSettings.

Change-Id: Ia70cc82e0ee20571ad029590db735f932e5c7958
Reviewed-on: https://gerrit.libreoffice.org/51723
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-03-22 07:43:47 +01:00
Caolán McNamara dfc2e9be09 ofz#7012 Integer-overflow
and fix negative rounding code, which results in changing tet
of from -996 to -1002 which is closer to the original -1000

Change-Id: Ie992e61bf4d14d0cd4194e773479feba96b6d68e
Reviewed-on: https://gerrit.libreoffice.org/51576
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-21 00:22:43 +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
Jens Carl d97120c6f3 tdf#45904 Move _Spreadsheet Java tests to C++
Change-Id: Ic540d06899def77313d6dc7e0a5241e1f9eeea54
Reviewed-on: https://gerrit.libreoffice.org/51491
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-03-18 23:32:04 +01:00
Zdeněk Crhonek caeb7930c1 uitest for bug tdf#86253
Change-Id: If5488988ba581108d96797e58d001152cff1ad38
Reviewed-on: https://gerrit.libreoffice.org/51088
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-03-18 16:08:14 +01:00
Zdeněk Crhonek 6709db941f uitest for tdf#62267
Change-Id: I49cad5ebfb459f881aa1520e18f32c1e3ac42327
Reviewed-on: https://gerrit.libreoffice.org/51235
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-03-18 12:09:56 +01:00
Zdeněk Crhonek 6134a8ebd4 uitest - Calc Paste Only
Change-Id: I4d858b34609058fb86fe70244236f6cca32a4c31
Reviewed-on: https://gerrit.libreoffice.org/51071
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-03-18 11:08:24 +01:00
Zdeněk Crhonek 5d40cfa4ab uitest - Calc Document Properties
Change-Id: Ice5a2fcb3cac3bfcc21f0c060b1a38fb686a728d
Reviewed-on: https://gerrit.libreoffice.org/51074
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-03-18 11:07:57 +01:00
Zdeněk Crhonek e7c86898bd uitest for bug#69450
Change-Id: I467bbfd0c9effe81b6f67d903766a9daedd60329
Reviewed-on: https://gerrit.libreoffice.org/51090
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-03-18 11:06:17 +01:00
Zdeněk Crhonek 826d9839e0 uitest for bug tdf#65856
Change-Id: I494be1801bcecff42a00208880b533f0bc4ee874
Reviewed-on: https://gerrit.libreoffice.org/51178
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-03-18 11:05:51 +01:00
Armin Le Grand 8d107b8d3b OperationSmiley: Adapted TestDocument
The OperationSmiley fix is about removing the old hack
that for CustomShapes in top-left and bottom-right points
were added. In the ScTiledRenderingTest::testGraphicInvalidate
UnitTest using this document exactly that top-left wrong polygon
was hit which is now no longer there. The used shape was an
ellipse, so this makes a difference - there *is* no geometry
in the top-left corner of this shape. To fix that, I exchanged
the ellipe CustomShape with a rectangle CustomShape. That way,
the old hit behaviour will be replicated.

Change-Id: I4b96ad79ba91166f097207226577d34087625589
2018-03-17 23:15:50 +01:00
Henry Castro 009d2756b1 lokdialog: do not lock events when opened ScFilter Dialog
When exists 2 or more views and one of the views open the ScFilter dialog,
the other views are locked and no event process.

In tiled rendering case, collaborative editing is not functional with 2 or
more views are locked, so the patch prevents locking the other views

Change-Id: I0133d38ac5ecef4d3ebc22f3e922602704dcd0b3
Reviewed-on: https://gerrit.libreoffice.org/51370
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Henry Castro <hcastro@collabora.com>
2018-03-16 20:58:50 +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
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
Stephan Bergmann e723cb0950 -Werror,-Wunused-private-field
Change-Id: I9272b14c7760f2880983e198ff98b54cf37e1d30
2018-03-12 13:35:39 +01:00
Eike Rathke 5f23f94cde Unit test tdf#116324
Change-Id: Ib1f0f8fe2308c075477903d4f981046a939d4b79
2018-03-10 21:03:16 +01:00
Noel Grandin 6529cd54c2 don't use heap for elements in ScRangeList
no need to store small objects like this out of line.

Also
 - add move constructor and move assignment operator
 - drop Assign method since it now has the same
   signature as push_back

Change-Id: I9a8647d3a11f24166a83d399a358a2bce3b2cb79
Reviewed-on: https://gerrit.libreoffice.org/50899
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
2018-03-10 19:22:01 +01:00
Jens Carl b8563d46a0 tdf#45904 Move _SheetLink Java tests to C++
Change-Id: I33813be65bcb44c11a35bc97d963057418a28d9e
Reviewed-on: https://gerrit.libreoffice.org/50984
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-03-09 18:30:31 +01:00
Noel Grandin ba43b0cb7a drop getColor() method of Color
no longer necessary

Change-Id: I9e0fcea1134e8c5e27f9effbb5eb79fe5446e33d
Reviewed-on: https://gerrit.libreoffice.org/50925
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-09 07:14:22 +01:00
Tomaž Vajngerl fb29e6eeea svx: removing GraphicURL and OWN_ATTR_GRAFURL, fix writerfilter
Change-Id: I5b84788a324cc68e3c4561e9a7376fcb1cfeeb67
Reviewed-on: https://gerrit.libreoffice.org/50933
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-09 04:19:38 +01:00
Jan Holesovsky bf5c486946 tdf#116283 oox customXml: Don't write the Relationship to DOCX files twice.
Change-Id: Id3da40138e86c142707e377aa897df372aacb704
Reviewed-on: https://gerrit.libreoffice.org/50947
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2018-03-08 15:44:50 +01:00
Ashod Nakashian 4de1c0223c oox: unit-tests for custom package preservation
Change-Id: I69d0d7d6bdc8804d0e56be19cd86a699200fc85f
Reviewed-on: https://gerrit.libreoffice.org/50855
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2018-03-08 12:39:50 +01:00
Zdeněk Crhonek a790ee5431 uitest - calc subtotals; tdf#114720 tdf#88792 tdf#88735 tdf#56958 tdf#55734
Change-Id: I6e31816409c105d572d545d7860d9e2ccadfad48
Reviewed-on: https://gerrit.libreoffice.org/50331
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-03-07 07:41:05 +01:00
Tomaž Vajngerl d72145f930 Move BackGraphicURL property & friends to BackGraphic + fixes
This moves BackGraphicURL, HeaderGraphicURL, FooterGraphicURL and
ParaBackGraphicURL properties to BackGraphic, HeaderBackGraphic,
FooterBackGraphic and ParaBackGraphic. With this the property type
changes from String to XGraphic.

This change also fixes a bunch of test failures, changes the tests
to use the new properties and the correct type, changes the import
and export filters like xmloff and oox, to make the tests happy.

Change-Id: Ie66097514203c6dc36ab27420faf265322e9279e
Reviewed-on: https://gerrit.libreoffice.org/50760
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-07 02:37:36 +01:00
Samuel Mehrbrodt 782d504649 tdf#114552 Add unit test for ODF Import of anchor types
Change-Id: I7b6e013de5b37c8da0adf5be8e66472e76d81375
Reviewed-on: https://gerrit.libreoffice.org/49602
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-03-06 15:49:10 +01:00
Samuel Mehrbrodt acf0bad4e2 tdf#114552 Add a third anchor type for calc graphics
This allows to have two cell anchored types:
* Only cell anchored (moves with the cell when sorting etc)
* Cell anchored, also resizes with the cell

Beforehand, all cell anchored images would resize with the cell,
which was often not what users expected.

The new default (when inserting images) is now that inserted images
are only anchored to the cell, but don't resize with the cell.

This makes use of the ODF elements table:end-cell-address, table:end-x, table:end-y.
When images should resize with the cell, the end address is written
(it has always been written earlier, so documents would still import correctly).
If not, they are omitted.

Also implements xlsx import & export

Change-Id: I5f96242f88943ed77a0fd12b7f39b444e1380df7
Reviewed-on: https://gerrit.libreoffice.org/49490
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-03-06 15:45:28 +01:00
Eike Rathke ba490001c2 Unit test for tdf#116216
Change-Id: Icd2e37c279db43b792e84b3aae64c16db0c4834b
2018-03-05 22:53:39 +01:00
Andrea Gelmini 4783119c89 Removed duplicated include
Change-Id: I5c938d4e86e371c7ee5eab66581d6ed736bc2033
Reviewed-on: https://gerrit.libreoffice.org/50754
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-03-05 09:42:38 +01:00
Jens Carl 7b7e0ff7b7 tdf#45904: Move _Shape Java tests to C++
Change-Id: If0bfa9fb465f37e0ccce5b2fa4e909baaac1df50
Reviewed-on: https://gerrit.libreoffice.org/50722
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-03-04 18:59:22 +01:00
Kohei Yoshida 08b8b55d9d Add a new test case for Excel 2003 XML import.
This one checks on importing column widths and row heights.

Change-Id: I19c63230666aa949eb61805ed2bffe46199a305e
Reviewed-on: https://gerrit.libreoffice.org/50653
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
2018-03-03 05:21:40 +01:00
Eike Rathke ce4fc2fc08 Resolves: tdf#115351 convert boolean equivalent format codes to proper Boolean
Because Excel does not know a Boolean number format, BOOLEAN is
saved to Excel as

"TRUE";"TRUE";"FALSE"

with implicit conditions [>0] and [<0]. This when loaded has no
boolean property. Then saved to ODF it is loaded as

[>0]"TRUE";[<0]"TRUE";"FALSE"

with explicit conditions, which has identical meaning.

Convert both equivalent format codes to proper BOOLEAN when
reading. Locale dependent representations are treated the same,
e.g. "WAHR";"WAHR";"FALSCH"

Change-Id: I49383d71fce972fdd7ad9b19ce3bc150d02aba62
Reviewed-on: https://gerrit.libreoffice.org/50642
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
2018-03-02 20:27:45 +01:00
Kohei Yoshida 86978ae247 Add a new test case for Excel 2003 XML import.
Change-Id: I1ba74f35e44b9cea3e3770d513ae520da02b3406
Reviewed-on: https://gerrit.libreoffice.org/50610
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
2018-03-02 03:59:00 +01:00
Caolán McNamara b54046188c weld ScStringInputDlg to native dialog
ScStringInputDlg and SwStringInputDlg do the same thing, but one uses the old
name as the label and leaves the new name blank in the entry. The other puts
the old name into the entry and autoselects it and uses a normal label. Both
are used from the rename button of the shared autoformat dialog.

Change-Id: I2ebf09a79f92c3f9020304e23e8907b67c06cd35
Reviewed-on: https://gerrit.libreoffice.org/50525
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-01 11:41:04 +01:00
Noel Grandin e2cb154195 convert COL_ constants to be of type Color
Change-Id: I0e25c8950ac26b851ff42f71e1471fcbe4770d48
Reviewed-on: https://gerrit.libreoffice.org/50373
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-28 07:34:27 +01:00
Jens Carl 5a0acced89 tdf#45904: Move _SheetFilterDescriptor Java tests to C++
Change-Id: I894b2e2534efeb5369c491053caf56f67dc56618
Reviewed-on: https://gerrit.libreoffice.org/50411
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-02-27 18:18:31 +01:00
Pranav Kant f48c0d0999 lok sc: Post mouse events to main thread
Change-Id: I1311938d7c01d0e3bfd239743e6cb2148da56cdf
Reviewed-on: https://gerrit.libreoffice.org/50253
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2018-02-27 19:43:37 +05:30