summaryrefslogtreecommitdiff
path: root/sc
AgeCommit message (Collapse)AuthorFilesLines
2017-04-25Resolves: tdf#99625 add parameter classification for TEXTJOIN and CONCATEike Rathke1-0/+2
So in array context the functions return a single string instead of an array of identical strings. Change-Id: Ia6ada10be4912745b60e281fac1736c560162d3a (cherry picked from commit f0fef88b747cc4f4de7a5ccb93da9c062545dcfb) Reviewed-on: https://gerrit.libreoffice.org/36744 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2017-04-18tdf#92650: handle overwritten references correctly in undo.Kohei Yoshida3-2/+12
(cherry picked from commit de39b6ba3a9edd20a476937ef0c78920df2f5c6d) Conflicts: sc/source/ui/docshell/docfunc.cxx sc/source/ui/undo/undoblk.cxx Change-Id: Idc3fbd78f8163c97a9cd80a3ff474b6da0349353 Reviewed-on: https://gerrit.libreoffice.org/36540 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-04-11Resolves: tdf#102777 broadcast SC_TAB_INSERTED when inserting scenarioEike Rathke1-0/+3
So ScViewData::maTabData gets an entry added which deleting the scenario can remove again. (cherry picked from commit 4c8059a3e140171399ac85ceb882d23bb458599d) Change-Id: I166baeff5408ef67faef41364515a13b8d4610bb Reviewed-on: https://gerrit.libreoffice.org/34943 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-04-11out-of-bounds tab access when deleting second last sheetEike Rathke1-2/+2
Which in a debug build lead to STL assert Error: attempt to subscript container with out-of-bounds index Change-Id: I09fddbc9e4b214b0313c193f85830ed458d20c0e (cherry picked from commit 0c55972d747511dbc711f3c9cbb4db5d8c5dc2ff) Reviewed-on: https://gerrit.libreoffice.org/36273 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-04-07Resolves: tdf#100011 (re-)add ocCeil and ocFloor .xls(x) export mappingsEike Rathke2-2/+7
This is a combination of 2 commits. Resolves: tdf#100011 (re-)add ocCeil and ocFloor .xls(x) export mappings ... for CEILING and FLOOR that were lost when introducing CEILING.MATH and FLOOR.MATH which are semantically identical, but the export needs a distinct known mapping otherwise the function is stored as a macro call, which Excel dislikes. (cherry picked from commit ea01a08763e56a7de66f0c24655a627669c8a7f7) these FUNCFLAG_EXPORTONLY need also FUNCFLAG_MACROCALL_NEW, tdf#100011 related Maybe one day we'll actually use these tables also for export capabilities ... (cherry picked from commit 4dd95cadcd330aee49b3c84d3e336b808217af46) f3d55ec008e321d95b21e0d284c7d58d13a2399b Change-Id: Id371c1732984a8e5567f74fd265b9aee88fb1898 Reviewed-on: https://gerrit.libreoffice.org/36234 Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl> Tested-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2017-04-06tdf#106456, don't try to use invalid ranges in external ref codeMarkus Mohrhard1-0/+6
Reviewed-on: https://gerrit.libreoffice.org/35132 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> (cherry picked from commit 951fcc6556346e19a028443c70dea27d0cbc9c36) Backported. Change-Id: I38e622df87dd4b5e37dd248c5181978e13890fda Reviewed-on: https://gerrit.libreoffice.org/35188 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-04-06tdf#105908: restore previously deleted range references upon undo.Kohei Yoshida5-2/+49
Reviewed-on: https://gerrit.libreoffice.org/35607 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Kohei Yoshida <libreoffice@kohei.us> (cherry picked from commit 749405af4fc38e0c16dc7e860d23a13dfceb4e40) Conflicts: sc/source/core/tool/interpr6.cxx Change-Id: If1932a5eb10da4c50fbcc3329af75f2e7a0a5137 Reviewed-on: https://gerrit.libreoffice.org/35673 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-03-22tdf#104383: prevent crash during file load.Kohei Yoshida1-2/+14
Apparently xView may be null sometimes. Change-Id: Icef81159eeaf5c9bdb0a91e036019b820952d20b (cherry picked from commit 273d7cec114ace96c5d891fdb24ddc36be3a2376) Reviewed-on: https://gerrit.libreoffice.org/35521 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-03-15fix conditional format import from XLSB, tdf#105486Markus Mohrhard1-1/+3
Change-Id: I2b781f45221e434c8ec0ee079afb54c505faf2b5 Reviewed-on: https://gerrit.libreoffice.org/34396 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> (cherry picked from commit aaea9beabcdfa16ffd36116591c5ebea25906b94) Reviewed-on: https://gerrit.libreoffice.org/35197 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-03-15tdf#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/34818 Reviewed-by: Eike Rathke <erack@redhat.com>
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/35052 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-03-12tdf#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/35047
2017-02-28Resolves: 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. (cherry picked from commit a627c44026fcf883918f84bddd1c3b745e1f898c) Change-Id: Ib89870ed6e392c4271de2f416c78d42135922609 Reviewed-on: https://gerrit.libreoffice.org/34385 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-02-23fix crash in input handler codeMarkus Mohrhard1-3/+8
Reported by the crashreporter: http://crashreport.libreoffice.org/stats/signature/ScInputHandler::DataChanged(bool,bool) Change-Id: I3038f8b66e1009f4e418b2d7fd488533162ef9d5 Reviewed-on: https://gerrit.libreoffice.org/34553 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-02-23Resolves: 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/34497 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-02-18Resolves: tdf#105858 check SC_DPOUT_MAXLEVELS to prevent crashEike Rathke1-44/+68
Backported. 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/34370 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-02-15tdf#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/34139 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2017-02-15tdf#98493 UI : "SCENARIO SELECTION IN NAVIGATOR (sheet group)"sll1-6/+22
Change-Id: I71071ba71ce05487273ce66e64f930cd2ec7b8d0 Reviewed-on: https://gerrit.libreoffice.org/28697 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com> (cherry picked from commit 1eebbd48fabbefaa52f5f223649c8d591915a884) Reviewed-on: https://gerrit.libreoffice.org/33953 Reviewed-by: Jean-Sébastien B. <realitix@gmail.com> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2017-02-14tdf#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/34144 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.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/34164 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-02-10revert tdf#98106 Preserving hidden and empty rows after xlsx exportJustin Luth2-23/+4
That patch has caused massive file bloat and and import hanging in xls and xlsx files (bug 105840). That patch was backported to 5.2.5. Just revert from the stable 5.2 branch and work on fixing 5.3 since the proper fix needs to be well tested. Since bug 98106 is just an enhancement, it is an obvious candidate for a simple revert of commit 7dd19273530730478b5ed24b79f42ac480c7ae43 Change-Id: I339694a86bab489ba0905b4d1090245bcb07fe86 Reviewed-on: https://gerrit.libreoffice.org/34104 Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl> Tested-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
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/33853 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/33714 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/33633 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
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/33533 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Jenkins <ci@libreoffice.org>
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/33401 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-01-18tdf#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/33274 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-01-11Resolves: 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/32924 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2017-01-08handle 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/32744 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-01-08display error constants written by 5.3+ in the for 5.2 usual way, tdf#105024Eike Rathke1-2/+17
Change-Id: I5b61ed58144ae1583d74056389478e9d5c86d2cb Reviewed-on: https://gerrit.libreoffice.org/32794 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
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/32724 Tested-by: Eike Rathke <erack@redhat.com>
2017-01-01tdf#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/32078 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-12-07stab at the sick "units in character width of the standard font", tdf#101363Eike Rathke1-1/+5
Which gave problems in the unit test on tinderbox build machines, apparently because they don't have not even the resulting fallback font installed. Specifically here digit '1' was slightly wider (123) than digit '0' (122), which the import accounts for but the export didn't, so widths were divided by 122 instead of 123 hence resulted in 24.23 instead of 24, for example. Change-Id: If8a04383632de674ae2a15a79608661e434aeb54 (cherry picked from commit 20b54a228b2844ad66d80d930d4a9eb39ce8c336) Reviewed-on: https://gerrit.libreoffice.org/31728 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2016-12-06Revert "attempt to fix Linux-rpm_deb-x86_71-TDF tinderbox build, tdf#101363"Eike Rathke1-8/+1
This is a combination of 2 commits. Revert "try a volatile" This reverts commit 8a460cfa1b1ce01c7a479ce2e7f21a92a2c50de3. Turns out the cause is something completely different.. (cherry picked from commit ed4da005b076b5b1ea96dcc4b8caa994709ee733) Revert "attempt to fix Linux-rpm_deb-x86_71-TDF tinderbox build for 5-2, tdf#101363" This reverts commit 39aa5c2c653f36393416a6aadd6e599051bbfe7b. Turns out the cause is something completely different.. (cherry picked from commit 709053fc72db3eacfec0a7d8e47557b34bc6193e) Change-Id: I55f4ac6f48029676ec531a021d3b6939f670bde0 Reviewed-on: https://gerrit.libreoffice.org/31705 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2016-12-06try a volatileEike Rathke1-1/+1
Change-Id: Iadaeb1cdf8a73cac3308e82caa2e65db07ec0fc1 (cherry picked from commit 8a460cfa1b1ce01c7a479ce2e7f21a92a2c50de3) Reviewed-on: https://gerrit.libreoffice.org/31662 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-12-06write the customWidth property also to XLSMarkus Mohrhard2-1/+2
Change-Id: I3d12e141e1cf6c70c3fbae7b6fb25a2fabeed77b (cherry picked from commit 776544f5e9b58a3fa05a9559c0fe9f678b2076c2) Reviewed-on: https://gerrit.libreoffice.org/31660 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2016-12-06sc: fix Android buildMiklos Vajna1-0/+11
trunc() is missing in the std namespace on the broken Android toolchain, work it around. Change-Id: I9715bce8e888a6f35d06753e40ab34ac43642acc (cherry picked from commit 10652c109e732584e43b81ecbd6f97277edb5c7b) Reviewed-on: https://gerrit.libreoffice.org/31661 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2016-12-05attempt to fix Linux-rpm_deb-x86_71-TDF tinderbox build for 5-2, tdf#101363Eike Rathke1-1/+8
See http://tinderbox.libreoffice.org/cgi-bin/gunzip.cgi?tree=libreoffice-5-2&brief-log=1480964401.32227 (as long as it is there) Change-Id: If119a19e2f5dbe53298f0b30b5749997d99bf884 (cherry picked from commit 39aa5c2c653f36393416a6aadd6e599051bbfe7b) Reviewed-on: https://gerrit.libreoffice.org/31657 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2016-12-05tdf#91475 Fix column width during .xlsx exportBartosz Kosiorek4-23/+111
With commit 16726a1b37df8bdcae02b3c7699df814977222bd the new import algorithm was introduced. Unfortunately it looks like that some specific column width are improved, but for other widths it is worse. More information is available at: https://bugs.documentfoundation.org/show_bug.cgi?id=91475#c29 In this commit I added unit tests which prooves proper working of old algorithm and I have switched to old algorithm. Unit test which was done: 1. After resave .xlsx file, the column width values did not change 2. After export .ods to .xlsx displayed column width did not change 3. After save .xlsx to .ods displayed column width did not change This commit resolve column width after exporting to .xlsx, and correctly preserve column width for LibreOffice. Reviewed-on: https://gerrit.libreoffice.org/27943 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com> (cherry picked from commit f2a75fecdfb5d92d27074312f29dc7dc4afb16ec) Conflicts: sc/source/filter/oox/worksheethelper.cxx Change-Id: I26d074b203d08a4bf4e9e31e52dbfd7ca7d3beb1 Reviewed-on: https://gerrit.libreoffice.org/31648 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2016-12-05tdf#70565 Set correct default values to "0" of xfId attributeBartosz Kosiorek3-1/+26
When xfId is not exist during .xlsx import it must have values set to "0". It is not impacts spreadsheets created with MS Excel, as xfId attribute is always created during export to .xlsx Not setting "0" value is causing wrong .xlsx import by LibreOffice, for spreadsheets created by external applications (ex. SAP BI). Change-Id: Ia4986236d5e902d0ff6f7a7a8da8f142b2c5061f Reviewed-on: https://gerrit.libreoffice.org/28069 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> (cherry picked from commit 9b9bcef5ef1858c63c8708bfae2ecea3d398eeb8) Reviewed-on: https://gerrit.libreoffice.org/31647 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-12-05tdf#101135 FILESAVE .xlsx Save XML_outlineLevelRow, XML_outlineLevelCol keysBartosz Kosiorek4-4/+39
In .xlsx, the XML_outlineLevelRow and XML_outlineLevelCol keys are required for Microsoft Office365 application to properly displaying Outline values. Change-Id: If4184ddc4fbfaa409732ddb0fb4ca85b4a27b024 (cherry picked from commit ad121df71ad463bed8caf147d27f020b548f0862) Reviewed-on: https://gerrit.libreoffice.org/31644 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2016-12-05tdf#101363 Fix precision of column width according to MS specificationBartosz Kosiorek1-3/+14
In MS specification the output value is set with double precision after delimiter, according to formula: =Truncate(({width in pixels} - 5)/{Maximum Digit Width} * 100 + 0.5)/100 Explanation of magic numbers: - 5 number - are 4 pixels of margin padding (two on each side), plus 1 pixel padding for the gridlines. It is still unknown if it should be applied during LibreOffice export - 100 number - used to limit precision to 0.01 with formula =Truncate( {value} * 100 ) / 100 - 0.5 number (0.005 to output value) - used to increase value before truncating, to avoid situation when 2.997 will be truncated to 2.99 and not to 3 Benefits of limited precision: - small .xlsx file size - slightly better performance during .xlsx import - easier to track column width changes, especially in unit tests - according to MS Excel specification Change-Id: I0537df5f9d04f5c715784c2b0c4e0d4472904dcc Reviewed-on: https://gerrit.libreoffice.org/27932 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> (cherry picked from commit 12408dad1b2af4055b91439e3cfbe46e0df52b41) Reviewed-on: https://gerrit.libreoffice.org/31646 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-12-05tdf#100946 Fix width calculation and add customWidth support (.xlsx)Bartosz Kosiorek8-8/+122
On some MS Excel version (OS X), the column "width" is not applied, if "customWidth" key (in "col") is not set to "true". It means that in case of .xlsx files, exported by LibreOffice, all columns have default width. To resolve that "customWidth" key was added during export into .xlsx file format. During development it appears that Default Column Width is wrongly calculated, and it was done not according to MS documentation. This issue was also fixed. After fix default column width is properly set. MS documentation: https://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.column.aspx Change-Id: I0d1944081a5ea445d1e4284db62e9b4d504bf1c0 (cherry picked from commit 40d892a2db4d750aaf0562c63004e693c028273c) Reviewed-on: https://gerrit.libreoffice.org/31645 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2016-12-05tdf#51524 Preserve hidden column width after saving into .xlsx and .xlsBartosz Kosiorek3-20/+97
Change-Id: I7f69a1e8f8ef46d8b0ab889df30498ec54917230 Reviewed-on: https://gerrit.libreoffice.org/27035 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com> (cherry picked from commit b0d96a82a4f6a0832d03d185f4a53db669adcc99) Reviewed-on: https://gerrit.libreoffice.org/31643
2016-12-05tdf#100347 Fix Outline export into XLSX formatBartosz Kosiorek4-7/+95
In previous XLSX export implementation the outline for column was not saved. Also rows without cell content was not saved if it was collapsed or outline level was set. This commit resolve all such issues Change-Id: I401f23e97f4803209fcd31c7d93baca3bd2a2385 Reviewed-on: https://gerrit.libreoffice.org/26625 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> (cherry picked from commit cc503abb860c33a54a188640a5962dbdf7052284) Reviewed-on: https://gerrit.libreoffice.org/31642 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-12-05tdf#48767 Fix orientation issue after export to .xlsxBartosz Kosiorek2-0/+17
After save to .xlsx in usePrinterDefaults was added into PageSetup. Due to bug in MS Excel, when usePrinterDefaults is present, (no matter what value), the orientation of the Page is alway "portrait". To resolve that issue, if usePrinterDefaults is set to default value, then usePrinterDefaults XML field is not added during export to .xlsx Change-Id: I3ab310babb278913bce3d66f7fae1192ed9727b9 Reviewed-on: https://gerrit.libreoffice.org/26871 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> (cherry picked from commit 46094ff4b0ea06931f2af3fc45d00fd38c3ebf26) Reviewed-on: https://gerrit.libreoffice.org/31641 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-12-05tdf#98106 Preserving hidden and empty rows after xlsx exportBartosz Kosiorek4-8/+29
Change-Id: I1ff2bab766eadac1dd5d483453af0e760634083d Reviewed-on: https://gerrit.libreoffice.org/26421 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> (cherry picked from commit 228c25fd17727660a3372307e3f73dbcff5e71d2) Reviewed-on: https://gerrit.libreoffice.org/31640 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-12-02prevent corrupt warning in MSO - justify dimensionJustin Luth1-0/+1
In 2007, the document will not open. In 2013, it requires repair if <dimension ref=""> is not normalized. Change-Id: I5ee5ba314944c960de90f4c9b234f8cc8056c734 Reviewed-on: https://gerrit.libreoffice.org/31524 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> (cherry picked from commit e0781244dacda54b3f30e8ddde708b25944f1344) Reviewed-on: https://gerrit.libreoffice.org/31538 Reviewed-by: Eike Rathke <erack@redhat.com>
2016-12-02OOXML: Write dimension range in full address notationBartosz Kosiorek5-11/+38
In every sheet.xml there is information about dimensions, like: <dimension ref="A1:AMJ177"/>. During export by LibreOffice to .xlsx, when row or column has maximum value, the dimension was truncated. For example given "A1:AMJ177" it's saves <dimension ref="1:177"/>. It was caused problems with Office 2007 import. This patch is fixing that by always using full address notation for dimension range, and allow open documents exported by LO properly by MS Office. Change-Id: Idda1455d1f9db08ade0871110fe40be2667c176c Reviewed-on: https://gerrit.libreoffice.org/30960 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> (cherry picked from commit 71862564df1422f84340e421bbef9060c4e41a71) Reviewed-on: https://gerrit.libreoffice.org/31526 Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2016-11-29Resolves: tdf#103493 copying note captions needs a completed destination sheetEike Rathke3-9/+26
If a copied sheet's destination position is before its source position, the source's ScColumn::nTab members still pointed to the original source position when the captions were created, which led to the wrong drawing layer page being used and at the end the drawing shapes not being correctly assigned. Change-Id: I9c3cc97d8b4486756023b9ab02da28079a1d0627 (cherry picked from commit 0a2a7436b4041bb34b01a183b9264af8488d1af3) Reviewed-on: https://gerrit.libreoffice.org/31229 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>