summaryrefslogtreecommitdiff
path: root/sc
AgeCommit message (Collapse)Author
2016-07-05Resolves: tdf#90285 do not reuse the same StartListeningContextEike Rathke
... that after UpdateInsertTab and related may point into broadcasters' ColumnBlockPosition that have been shifted to the next sheet. Change-Id: I6f657021b6102cec427734a8ff3105f0c4309a7a
2016-07-05tdf#100446 fix compatibilty issues with Excel.Winfried Donkers
Use cases added to the unit test showed various differences in results between Calc and Excel. The code changes makes Calc now return the same results as Excel, even if the result is somewhat unexpected. Change-Id: I348f7f2cc2c39a30f4db68dbed98b03de48f1ff5 Reviewed-on: https://gerrit.libreoffice.org/26544 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-07-05Expand unit test for SWITCH function with extra use cases.Winfried Donkers
Change-Id: I109b2bb50dcc6959cf8a2dc435df676b2146d16e Reviewed-on: https://gerrit.libreoffice.org/26239 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-07-05Resolves: tdf#91995 copying cells to undo doc shallow copied note pointerCaolán McNamara
maybe UpdateCaptionPos isn't needed if we do it this way and deep copy it. surely we have to copy the note here, otherwise it gets deleted by both the source and destination document Change-Id: I6bc885c45b2938d0c775572c48642e67cd1ef5ca Reviewed-on: https://gerrit.libreoffice.org/26913 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-07-05Resolves: tdf#100761 after insert note, focus cannot return to inputbarCaolán McNamara
suspected regression from. commit 11d605cc5a0c221d2423b6e63f502db660d085d2 Date: Mon Feb 1 18:39:51 2016 +0200 tdf#84843 Stop using PseudoSlots for drawing slots Change-Id: I64aba363f7562c6b16ae1d679968149fea1ba763 Reviewed-on: https://gerrit.libreoffice.org/26909 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-07-04explicitly disable partial cell shift with change-tracking, tdf#73335 relatedEike Rathke
... in ScDocFunc::InsertCells()/DeleteCells() that can be reached via API but ChangeTrack produces a SC_CAT_NONE action because the partial shift is not handled. UI slots are disabled for this. Change-Id: Ie0f992b05753bb1467d3f7a80263714bfcc1a2d7
2016-07-04tdf#73335 sc: ODF export: ignore ScChangeAction SC_CAT_NONE harderMichael Stahl
ScChangeTrackingExportHelper::WorkWithChangeAction() must not add attributes when it does not export an element. Change-Id: Ia6625b73114ab8bf93c4b7a31b484d11bef2fde9
2016-07-04Resolves: tdf#90285 during sheet copying the old sheets retain their old indexCaolán McNamara
at the point that ScDocument::CopyTab calls StartListeners so when void ScColumn::StartListening(sc::StartListeningContext& rCxt... calls rCxt.getBlockPosition(nTab) it calls it with the old nTab index in ScDocument::maTabs, so the return block position is not correct. Here I bubble down the requested ScAddress and use its Tab/Col/Row members rather than trust the members of the indexed-into elements Change-Id: I291e8c1146c2caa4d0976780b1ee6bcc41994e3c Reviewed-on: https://gerrit.libreoffice.org/26552 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2016-07-04typo: emtpy → emptyChristian Lohmaier
Change-Id: I60cdcdc7fc38c175243c071f34295efa8739b717
2016-07-04ASan: value nan is outside the range of representable values of type 'int'Stephan Bergmann
Change-Id: Icd0a383ddec97c1129a3937fbcd8c9a9e61ff8eb
2016-07-04SfxModule to use initializer_list instead of variadic argumentsMark Page
The compiler can perform type checking with initializer lists Change-Id: I1d26b56a3a2b67fe719f33d758ca9b0c95ebd4d1 Reviewed-on: https://gerrit.libreoffice.org/26852 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-04remove comphelper::string::removeNoel Grandin
and replace it with OUString/OString::replaceAll Change-Id: I37b1c3b51251dfd9d749d6f1060c75b3a93d7f1a Reviewed-on: https://gerrit.libreoffice.org/26850 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-04comphelper::OBaseMutex -> cppu::BaseMutexNoel Grandin
convert usage of deprecated class, and remove the old class Change-Id: I19fb9271090d19e5531622b58492e1a848d306e2 Reviewed-on: https://gerrit.libreoffice.org/26843 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-04add ANORDEGRC test caseZdeněk Crhonek
Change-Id: I10fdf45171505ba53e971c1a634ffa66a4a09f9a Reviewed-on: https://gerrit.libreoffice.org/26811 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-07-04tdf#100458 Don't forcefully change cell typeJan-Marek Glogowski
Just quoting the source comment from the breaking commit 61c39eae570d6d6040b65bfe93127b30e6080cc8. // If a matrix formula has a matrix reference cell that is intended to // have // a blank text result, the matrix reference cell is actually // saved(export) as a float cell with 0 as the value and empty <text:p/>. Ok // Import works around this by setting these cells as text cells so that // the blank text is used for display instead of the number 0. This seems to be wrong. Forcing the cell to a util::NumberFormat::TEXT actually kills the cell value, if the text is a result of the formular. I'm not sure if forcefully changing the cell format at this point is correct at any time, if a cell type was already determinated. I imagine that an undefined cell type should probably be fixed at the end of the row import, if Calc detected an error case, or even generally, This patch is just a minimalistic initial fix. If it's correct, it probably needs an additional code comment. Change-Id: If7d9d69467d56c7d8fd2444f9e8b3ae906285264 Reviewed-on: https://gerrit.libreoffice.org/26435 Reviewed-by: Eike Rathke <erack@redhat.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-07-04add CEILING test caseZdeněk Crhonek
Change-Id: Ie335210609a556fc4081b16292ba756819bfa4d1 Reviewed-on: https://gerrit.libreoffice.org/26827 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-07-04add NOMINAL test caseZdeněk Crhonek
Change-Id: Iec3e70ceeae38d6a5c18996e89fa5ae10a9f9668 Reviewed-on: https://gerrit.libreoffice.org/26862 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-07-04tdf#100347 Fix Outline export into XLSX formatBartosz Kosiorek
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>
2016-07-03tdf#48767 Fix orientation issue after export to .xlsxBartosz Kosiorek
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>
2016-07-03tdf#81939 Add qa unit testLaurent Balland-Poirier
Test removal or not of escape char in number format strings in XLSX Change-Id: I02a7e1bfd9df1ffd3bbad7dc072cfc85be68f949 Reviewed-on: https://gerrit.libreoffice.org/26877 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-07-01CppunitTest_sc_tiledrendering: clear reference to local var in timeMiklos Vajna
Should fix <http://ci.libreoffice.org/job/lo_callgrind_linux/2013/console>. Change-Id: I4ff4ddafbbb15ee360cb845afe8e8b4dbbf04460
2016-07-01sc: add LOK_CALLBACK_CELL_VIEW_CURSOR testcaseMiklos Vajna
Fails with the sc/source part of commit (sc lok: add LOK_CALLBACK_CELL_VIEW_CURSOR, 2016-07-01) reverted. Change-Id: I4a1a7d97b744dd089fe15bd58af6cca5e0b79e8f Reviewed-on: https://gerrit.libreoffice.org/26856 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-07-01CppunitTest_sc_tiledrendering: replace ifdefs with a single makefile conditionMiklos Vajna
Change-Id: I1dded11e0572dee7cd917a1aa8c2e2ca53b81d84 Reviewed-on: https://gerrit.libreoffice.org/26849 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-07-01no need to check twiceEike Rathke
Change-Id: Iad2942851fced632c0c662bf754b1d687740105c
2016-07-01use GetInt32() for integer Add-In parametersEike Rathke
Change-Id: Id62acb1800b3a302d62900699a01d1a5cdf1ab56
2016-07-01let GetInt*() truncate to integer towards 0Eike Rathke
like it should always had been the case ... Change-Id: I75b9e71bbaad5e356a45b416a3b42dc4becec801
2016-07-01sc lok: add LOK_CALLBACK_CELL_VIEW_CURSORMiklos Vajna
So a view can be aware where the cell cursors of other views are. Change-Id: Ifcf06c0019c6af8b859e2e92222e4f3fd18da74f Reviewed-on: https://gerrit.libreoffice.org/26844 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-06-30Resolves: tdf#100440 check mode to be 0 or 1 for MONTHS(), YEARS() and WEEKS()Eike Rathke
Needed to adapt the WEEKS and YEARS test documents to cope with the change. Change-Id: Ia52505418f4fed684bd04290c608e2a65eee2fbc
2016-06-30GSoC added button with small paddingSzymon Kłos
+ vcl builder setups action for custom buttons + new control: vcllo-SmallButton with WB_SMALLSTYLE property Change-Id: I54891969f26d237eac8e45532906d76040264272 Reviewed-on: https://gerrit.libreoffice.org/26781 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-06-30use GetInt*() in the most obvious placesEike Rathke
found with /approxFloor.*GetDouble Change-Id: Ice058c9cb318d7b0b0cadb9a26b4eb9f3691752f
2016-06-30use GetInt*() in the most obvious placesEike Rathke
found with /approxFloor.*GetDouble Change-Id: I2a08d8c268e6c1d64270d9c9f343b69a62f27708
2016-06-30use GetInt*() in the most obvious placesEike Rathke
found with /approxFloor.*GetDouble Change-Id: Ib14a60e872c6a3adde2aa11f96f391c42b4e510c
2016-06-30return SAL_MAX_... instead of 0 for GetInt*()Eike Rathke
Most places will use GetInt*() to obtain flags or enums in a range 0..somenumber and explicitly check for valid values, so returning MAX instead of 0 will save us an extra comparison of nGlobalError and push/return. Change-Id: I84c5d693d3642ea643308dc4650a391de2ebe82a
2016-06-30introduce ScInterpreter::GetInt32WithDefault()Eike Rathke
Change-Id: Ic3a5c65e4846a4582461564f572be83897b1d12d
2016-06-30introduce ScInterpreter::GetUInt32()Eike Rathke
Change-Id: Iba1a8cfcab01083a23b4956d7da51651ad3a447f
2016-06-30use GetInt16()Eike Rathke
in the places changed by 2606915f0f480af30367a5d0f67adbf930c2c6b9 and 002697221215e009cdf20fd5c12b50350b8a2128 Change-Id: Iea056b3101c5c41ee932defe13edf4769cb9eab1
2016-06-30introduce ScInterpreter GetInt32() and GetInt16()Eike Rathke
in preparation of replacing oversimplifying casts and special handling like in 2606915f0f480af30367a5d0f67adbf930c2c6b9 and 002697221215e009cdf20fd5c12b50350b8a2128 Change-Id: I81327dbc2218f40359c3485cf3d639d19fd69cef
2016-06-30fix Window::~Window: inconsistency in top window chain leakCaolán McNamara
Change-Id: I4f32b77a4b107e5315e0c2bc9b20db897135c8b0
2016-06-30Step towards disposing of ScDataFormDlg properlyKatarina Behrens
There were some VclPtrs hiding inside std::vector (twice), so fix that, but the destructor is still not called (getting Window::~Window inconsistency assert). With this patch however the screenshot cppunit test no longer fails Thanks noelgrandin for help Change-Id: I8b46c4608cbab2070e36ef4abec226bcd997425e Reviewed-on: https://gerrit.libreoffice.org/26772 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-29No need for a derived classStephan Bergmann
Change-Id: I42e96a0c7818abdaff15f5cd2b1111839aa771e6
2016-06-29Simplify finding elements of theAddInAsyncTblStephan Bergmann
Change-Id: Id9a2d84e1efb86a89e620dca5cd35274979aa1b9
2016-06-29tdf#97837 Add qa unit testLaurent Balland-Poirier
Add a number format with "/ " at the begining like in bug report Change-Id: I98ae12434608e16c8e202a1c4acfda50df4db6f1 Reviewed-on: https://gerrit.libreoffice.org/26576 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-06-29tdf#81939 Remove escape char only for fractionLaurent Balland-Poirier
In XLSX files, in number format, all escape characters were removed. But it is only necessary for space character in fraction. Preserve escape character in other cases. Change-Id: I6f82b7285cf91726725b723b0bb109bcced066b8 Reviewed-on: https://gerrit.libreoffice.org/26466 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-06-29move #includes to top of fileNoel Grandin
instead of being randomly embedded somewhere deep inside the CXX code. Found with: git grep -nP '^#include' -- *.cxx | sort -g -k 2 -t : Change-Id: I9ee432d3b665ecb6ec600bd51cc4b735a1b1127a Reviewed-on: https://gerrit.libreoffice.org/26764 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-06-29tdf#100592 Add extra number formats for fractionLaurent Balland-Poirier
Change-Id: Ia3a5fa02029e06e083fcc10748b0deb3048dae79 Reviewed-on: https://gerrit.libreoffice.org/26675 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-06-29Reinstate: tdf#99729: fix text alignment (no autofit & no full width)Caolán McNamara
with extra disposes to shutdown the test thingies in the right order This reverts commit a4780b3c8b45261e59ed3cbb34c4463d58ad8079. Change-Id: I13282d6bc54a0dceb3ed91a04cd438a9011154fe Reviewed-on: https://gerrit.libreoffice.org/26756 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-06-29add XOR test caseZdeněk Crhonek
Change-Id: I07a2cf1d38757614c469e2cb7bfb3730ea32f3cc Reviewed-on: https://gerrit.libreoffice.org/26741 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-06-29Revert "tdf#99729: fix text alignment (no autofit & no full width)"Miklos Vajna
This reverts commit 0cb200d000fad8ba31c7400e08cd031823f27308. Even if it was verified by Jenkins, it broke CppunitTest_sd_import_tests on a number of tinderboxes. Need to at least find out how to reliably trigger the crash and fix it before it goes in again. Change-Id: I7ed52cae559648ec101b7a343046a7d74a7c48d3
2016-06-29loplugin:passstuffbyrefNoel Grandin
Change-Id: Ic96736e5dc07abcbb738bcc4664981e3e142eee9
2016-06-28identify boolean element type at least for inline arrays (i#87219)Eike Rathke
Since 23e5540a05e940cb4a591815e6b85a485b01fc32 we can use GetDoubleOrStringFromMatrix() and check for SC_MATVAL_BOOLEAN. Only if transported of course.. If not, then even a {FALSE,FALSE,FALSE,...} result is better than the previous {FALSE,TRUE,TRUE,...} for any array sequence where all TRUE results resulted from the previous call to ISLOGICAL() ... Change-Id: I879e0cbc6557e73ac24713267b5122f923500501