summaryrefslogtreecommitdiff
path: root/sc
AgeCommit message (Collapse)Author
2015-08-26Convert vcl Button Link<> click handler to typed Link<Button*,void>Noel Grandin
Change-Id: Ie80dfb003118d40741549c41ebcc7eda4819f05b
2015-08-26replace boost::ptr_vector with std::vector<std::unique_ptr>Derrick
Change-Id: I21fbfe37f89fa404688cd1b287163801da9f7e0a Reviewed-on: https://gerrit.libreoffice.org/17974 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-26tdf#89387 test for LCM functionŁukasz Hryniuk
Change-Id: I3d5eae99427ca68a5121ad43e9f4e7df03ddc23e Reviewed-on: https://gerrit.libreoffice.org/18005 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-08-26tdf#89387 test for GCD functionŁukasz Hryniuk
Change-Id: Ia9ae1f8583948620b6f496afcadd292671cdc906 Reviewed-on: https://gerrit.libreoffice.org/18004 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-08-26tdf#89387 test for SUMX2PY2 functionŁukasz Hryniuk
Change-Id: Id407614c75eb04fb920fcf75d368b070323a0b79 Reviewed-on: https://gerrit.libreoffice.org/18003 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-08-26tdf#89387 add some strings to CHITEST testŁukasz Hryniuk
Any string in one of given matrices should result in IllegalParameter error. Change-Id: Ia08d879ec109e04021373c34e83f1873be6815c2 Reviewed-on: https://gerrit.libreoffice.org/18002 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-08-26tdf#89387 add some strings to FTEST testŁukasz Hryniuk
Strings should be omitted by the algorithm, so such test cases are important (were missed before). Change-Id: I2e77b2087e398bf27ac71ba4da0b26c66cc08311 Reviewed-on: https://gerrit.libreoffice.org/18001 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-08-26implement Edit modify handler, rhbz#1255811 relatedEike Rathke
Same as in ScStatisticsInputOutputDialog. Change-Id: I0e3eb06bc86cf77c405c54f312340c7b2551c1ec
2015-08-26implement Edit modify handler, rhbz#1255811 relatedEike Rathke
Same as in ScSamplingDialog. Change-Id: Iff709ec2284673efa8824a9b8cfc037e4d6d567a
2015-08-26implement Edit modify handler, rhbz#1255811 relatedEike Rathke
Same as in ScRandomNumberGeneratorDialog. Change-Id: I1bc9296bfc8b1b2b8f3fc20183e2c626f94dee09
2015-08-26Resolves: rhbz#1255811 implement Edit modify handlerEike Rathke
... and disable/enable Apply/Ok buttons for in/valid ranges. Change-Id: I52b5eae2f34e3fca7c0761b14124477a0d160b01
2015-08-25Don't claim we support strings arguments in the OpenCL VLOOKUPTor Lillqvist
The string support certainly isn't complete or correct anyway. Partially revert c3383aafa18ef9d03b04b2a4719e71fdfabc14eb. Change-Id: Ica86f39daf864a1a62d92f8d8300d75d020c0ee0
2015-08-25Add VLOOKUP to the set of opcodes that we trust the OpenCL implementation forTor Lillqvist
Change-Id: I937ec900044bbc6027ff8d4ae37f2f275dde974f
2015-08-25Produce the expected N/A error code in the OpenCL VLOOKUP implementationTor Lillqvist
Instead of a bare NaN. Change-Id: I170c540478315eedd23f5851d54c30175d21ef96
2015-08-25Return correct value from the OpenCL VLOOKUP implementationTor Lillqvist
The commit c3383aafa18ef9d03b04b2a4719e71fdfabc14eb was missing an ! operator in two places where it checks whether a cell is a numeric or string one, resulting in it always using the string value, which for NULL (the case I was looking at, only numeric cells in the array) meant zero was returned. As such I am not sure if it is entirely correct to do the check whether a cell is a numeric or string value in the order the generated OpenCL code does here (and all over the place perhaps). The documentation in <formula/vectortoken.hxx> says: * Single unit of vector reference consists of two physical arrays. * * If the whole data array consists of only numeric values, mpStringArray * will be NULL, and NaN values in the numeric array represent empty * cells. * * If the whole data array consists of only string values, mpNumericArray * will be NULL, and NULL values in the string array represent empty * cells. * * If the data array consists of numeric and string values, then both * mpNumericArray and mpStringArray will be non-NULL, and a string cell will * be represented by a non-NULL pointer value in the string array. If the * string value is NULL, check the corresponding value in the numeric array. * If the value in the numeric array is NaN, it's an empty cell, otherwise * it's a numeric cell. Note how that implies one should first check whether the value in the string array is NULL or not, and only if it is NULL, look at the vale in the numeric array. The code in the generated OpenCL VLOOKUP implementation does it backwards. Scary. But probably equivalent for the subset of cases we actually handle in OpenCL, which (I think) are those where no string cells are involved. More bug fixes for the OpenCL VLOOKUP will follow. Change-Id: Id567c245a0700267584be6032320863a4a66df83
2015-08-25Update title of Conditional Format dialog when range modifiedAndrzej Hunt
Previously the title was set during construction as e.g. "Conditional Format: A2:B245" However the selected range can be modified while the dialog is open, hence we update it whenever the selected range is modified. Change-Id: I63790108553102cedb51ca32d672a62477493660 Reviewed-on: https://gerrit.libreoffice.org/15711 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-08-25tdf#68016 Speed up ScChart2DataSequence by caching addressesTobias Lippert
The lookup of getNumberFormatKeyByIndex() is sped up by storing the addresses into the cached data array m_aDataArray. The existing cache invalidating strategy should hold since the cache was already storing information about hidden fields and ranges, which is the information which affects the addresses. Also: Change data type of m_aDataArray from std::list to std::vector to allow index-based access. Also: Change for-loops over m_aDataArray to range-based loops with auto variables to make them more readable Change-Id: I9a5038892a384e7d5e72556a52faaf98b475a839 Reviewed-on: https://gerrit.libreoffice.org/16485 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-08-25CosmeticsTor Lillqvist
Try to use some sane consistent formatting in this function. No semantic change. Change-Id: Ic9e4625c910f826246451e8ff9e18d6131c04a78
2015-08-25Treat an array of null string pointers as no strings for OpenCLTor Lillqvist
For some reason, at least in the case of the "Test OpenCL" thing, we get here an mpStringArray that is non-null but where all the elements (rtl_uString pointers) in it are null. Treat that case as if the mpStringArray was null. This makes the tests "Test OpenCL" actually use OpenCL. Maybe it has other useful effects, too. (But for normal spreadsheet use, the mpStringArray that gets handled here *is* null when all the cells used by a formula group are numbers. At least it seemed so in a simple test.) Also add more useful (?) SAL_INFO calls in the area. Change-Id: I1388786a3a0765af6eb01a63da31e5b83c7a616d
2015-08-25Some cleanupMaxim Monastirsky
Change-Id: Ia22866225b2a726ed69c9f18d02d1ebffdafde8f
2015-08-25Correct icon for number format in Calc's sidebarYousuf Philips
Change-Id: Icc5958d77277c6938b8a03ef44dfd71b9350e288 Reviewed-on: https://gerrit.libreoffice.org/17978 Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com> Tested-by: Maxim Monastirsky <momonasmon@gmail.com>
2015-08-25parameter names are useless in DECL_LINK declarationsNoel Grandin
Change-Id: I77f7b528ed97964bdc153f820f6f96977ddb9254
2015-08-25remove useless commentNoel Grandin
Change-Id: Id253acad170e3d8f7a1278a10c731c6bd1927b92
2015-08-25make pWindow private in SfxChildWindowNoel Grandin
Change-Id: I585d4e8f0a53f46b6fbcef9e4d26f88b57569684
2015-08-25make eChildAlignment private in SfxChildWindowNoel Grandin
Change-Id: I68a4c3324736e111a2c88e3edb9df506c33042b7
2015-08-25sc: fix number format button highlighting in sidebarTomaž Vajngerl
When a number format for a cell (for example percent) is applied it is highlighted in the toolbar but not the equal button in the sidebar. This patch fixes this issue. Change-Id: I7f33ab1e989f8a8e3c49468aae2042621d088798
2015-08-24tdf#93437: release reference held by ScFormulaReferenceHelperKatarina Behrens
This does two things: reverts a revert of 087f7fe50b03307e2d9202365886e8c37bd7e6e3 -- turns out it was innocent. Plus, it actually releases the reference that prevents destructor from being called. It was actually ScFormulaDlg's own m_aHelper member variable holding reference to 'this' (extra-wicked, through SetWindow(this)), never releasing it. Change-Id: I258a280e09674d1a2f1ddebea19ea1b42dcdc777 Reviewed-on: https://gerrit.libreoffice.org/17949 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2015-08-23tdf#39440 sc: reduce scope of local variablesMichael Weghorn
This addresses some cppcheck warnings. Change-Id: Ia7f58c24429310b66f4464d8ba8b4f2e5c6fef38 Reviewed-on: https://gerrit.libreoffice.org/17922 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-23tdf#39440 reduce variable scope, adapt indentationMichael Weghorn
This addresses a cppcheck "variableScope" warning and adapts the indentation of some code lines according to the surrounding code. Change-Id: I76eca59a808740ab0366dd41c889a6ef19a2436d Reviewed-on: https://gerrit.libreoffice.org/17923 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-22tdf#39440 reduce scope of local variablesMichael Weghorn
This addresses some cppcheck warnings. Change-Id: Ie492fb9c106b37c3fe7b0105236ad6315f4f159e Reviewed-on: https://gerrit.libreoffice.org/17921 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-08-21tdf#93437: Calc RefDialogs were never actually destructedKatarina Behrens
as ScTabViewShell::CreateRefDialog was still holding VclPtr reference to them and never released it -- regression from commit 087f7fe50b03307e2d9202365886e8c37bd7e6e3 which is hereby reverted. Now it is *DlgWrapper holding the reference (via SfxChildWindow::pWindow) and dialogs get properly destructed when SfxChildWindow dies in SfxViewFrame::SetChildWindow(0, false) Re tdf#91125, it turns out that the follow-up commit 06ecf7d2aebe64226142ee27c2512351960f8bb1 is actually enough to prevent the crash. Change-Id: I895825da59aabc7c0de530ecb528b9bf5acde562 Reviewed-on: https://gerrit.libreoffice.org/17899 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-08-21loplugin:defaultparamsNoel Grandin
Change-Id: Iaf6415d3b33a4ce195a00913a0df69f1fb794217
2015-08-21remove last WeakImplHelper8 usesCaolán McNamara
Change-Id: I7ecadedb77832fb3073870880dbfba121fdae826
2015-08-20Revert "tdf#93437: Re-enable input after closing formula wizard"Eike Rathke
This reverts commit 808063ebe7d410eb7e370be1f5d8047377137dfb. As seen, the real cause is that ScFormulaReferenceHelper is never destructed because ScFormulaDlg isn't either. Change-Id: I45290ecd7932f4a6e607fc541837a253b8f86acc Reviewed-on: https://gerrit.libreoffice.org/17876 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2015-08-20tdf#93437: Re-enable input after closing formula wizardKatarina Behrens
Input was disabled on opening the wizard (in ScFormulaDlg ctor), but never enabled again. Row and column headers seem to be more sensitive about it than e.g. grid window and they then just discard mouse events ... Change-Id: Id27757fb1b3a8b96ad1588354f016ac55d71cca2 Reviewed-on: https://gerrit.libreoffice.org/17872 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2015-08-19sc: replace boost::ptr_set with std::set<std::unique_ptr>Michael Stahl
Change-Id: I966069726fd7dbc57e03e93514bec62d8bbb2ba0 Reviewed-on: https://gerrit.libreoffice.org/17862 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-08-19sc: replace boost::ptr_vector with std::vector<std::unique_ptr>Michael Stahl
Change-Id: I2a56ebf8edb30b5f16e09237f9480484a699170e Reviewed-on: https://gerrit.libreoffice.org/17861 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-08-19sc: replace boost::ptr_set with std::set<std::unique_ptr>Michael Stahl
Change-Id: I93bdb33a442a358b0067d57499b11d73bfbaa2d9 Reviewed-on: https://gerrit.libreoffice.org/17860 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-08-19sc: these are ptr_map not ptr_setMichael Stahl
Change-Id: I55848b3fedae79d714c8341fd84d505cb83a7c2c
2015-08-19loplugin:literaltoboolconversionStephan Bergmann
Change-Id: Iad48cf4949cb4a398a8abee32febaf8e152dade5
2015-08-19Bugfix test for tdf#77431Katarina Behrens
Change-Id: I2120ed72c281d2078e387f7f3ae91004ad95822c Reviewed-on: https://gerrit.libreoffice.org/17855 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2015-08-19tdf#77431: Move setting sheet visibility to finalize phaseKatarina Behrens
and thus fix xlsx-specific issue that 1st sheet can't be hidden. Also kill some UNO in the process. I'm not sure if guarding against all sheets being hidden (by having at least active sheet visible) is absolutely necessary, but better be safe than sorry. Change-Id: I4ad21d223b2effe427ab1d5411c035886f6cc71c
2015-08-19Clean up remaining utl::LocalFileHelper::Convert...Stephan Bergmann
together with 58d68a1bc9146334376206ae7ba8b1a6594a1040 "ConvertURLToSystemPath->getSystemPathFromFileURL" and 28f3464a571a23a2c16bd0980e9021b95d011511 "ConvertSystemPathToURL->getFileURLFromSystemPath," this replaces all those Convert... functionality with direct calls to the corresponding osl::FileBase functions. Change-Id: I2876171cd337a5eb939d25d8cf1e0c1253ff73a7
2015-08-18introduce temporary hard-recalc state, tdf#92749 follow-upEike Rathke
This allows listeners to be setup and initial lookup caches to be kept, which were thrown away after the initial calculation as an interim fix for tdf#92749. Change-Id: I34068b3f6b833a46f3c526579efbdc342a2e71df
2015-08-18tdf#75973 : User Defined Types in password encrypted macrosLaurent Godard
save/load basic script so that when executing password protected the user defined types can be rebuilt supports array and nested types a unit test in sc macros-test.cxx Change-Id: Ie127ea7ad9aea3353741048c00f1b3910c5517a4 Reviewed-on: https://gerrit.libreoffice.org/17815 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-18Resolves: tdf#92749 invalidate lookup caches after initial hard recalcEike Rathke
... because the caches are not setup as listeners during when the document's hard recalc state is active. Change-Id: Ie7ec84ee64d046e3e55ce26b92824e94a2f660e9
2015-08-18add a simple formula cell calculation chain dumperEike Rathke
Change-Id: Ie6409724dcf0baa2f1d7dd62ed8d995f0374dbf1
2015-08-17Move export tests where they really belongKatarina Behrens
Change-Id: Ia231bd3e355c398d4ea3ef3d8adcd64b7074847c
2015-08-17make Control::ImplCallEventListenersAndHandler take a lambdaNoel Grandin
so that we make the Link<> calls type-safe, without having to make this a template method Change-Id: I2e36bd6aa7c63440f72d266b593e101965b5ebce
2015-08-17tdf#93392 leak when linking to external html data file with auto updateDennis P. Francis
Change-Id: I32d96b945ad0c2a0505418a0841156600570b301 Reviewed-on: https://gerrit.libreoffice.org/17757 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>