summaryrefslogtreecommitdiff
path: root/sc/qa/unit/ucalc.cxx
AgeCommit message (Collapse)Author
2018-01-16Better handle ScDde formulas with missing dde-link entriesCaolán McNamara
typically each ScDde formula has a matching table:dde-link which results in a ScDdeLink getting inserted during the load. If that dde-link is missing then no ScDdeLink exists and ScDde() will create a new one without cached content. So detect that ScDde is used in the freshing loaded ods and defer fetching new content until the right time. only call GetHasMacroFunc to set SetHasMacroFunc and bHasMacroFunc is not accessed any other way, so this is an oxbow Change-Id: I016b53288076d83dd49e92e245346a5f7f560522 Reviewed-on: https://gerrit.libreoffice.org/47757 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit b0597ba5d745974fce752e1b677451a19350d351) Reviewed-on: https://gerrit.libreoffice.org/47815 Reviewed-by: Eike Rathke <erack@redhat.com>
2017-10-27Handle decimalSeparatorAlternative in ScColumn::ParseString(), tdf#81671Eike Rathke
Change-Id: I9f708b28ee5fdb23217e75386a64ab86dacfd3c4
2017-10-23loplugin:includeform: scStephan Bergmann
Change-Id: I2ed763e0584a188032c80fde60890de3c6985cbd
2017-10-21coverity#1401307 document checked 'Uncaught exception'Caolán McNamara
markup std::unique_ptr where coverity warns a dtor might throw exceptions which won't throw in practice, or where std::terminate is an acceptable response if they do Change-Id: Icc99cdecf8d8b011e599574f0a05b59efd1c65c2 Reviewed-on: https://gerrit.libreoffice.org/41561 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-12clang-tidy modernize-use-emplace in scNoel Grandin
Change-Id: Ifc38e1fc188fe957a0c717aec19cdd6637e4c658 Reviewed-on: https://gerrit.libreoffice.org/42183 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-07tdf#107135 Add missing ODFF function SEARCHB.Winfried Donkers
Change-Id: Ic72693ad8f33fb94c171751f82680eabad1d3d6d Reviewed-on: https://gerrit.libreoffice.org/41900 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-08-30loplugin:constparam in variousNoel Grandin
Change-Id: I6821a3946f2e8fabf26558a84370c16ac8827fed Reviewed-on: https://gerrit.libreoffice.org/41721 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-07oovbaapi: screenUpdating, do not adjust heightTamas Bunth
Do not adjust row height if screenUpdating false, because it consumes significant time. Also change IsAdjustHeightEnabled boolean to a counter so it can be used several times in an overlapping manner too. Change-Id: Ie5c894481f3c1b4e07175164aac8303e504779ce Reviewed-on: https://gerrit.libreoffice.org/40443 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2017-07-25tdf#107135 Add missing ODFF function FINDB.Winfried Donkers
Change-Id: I96bbca8e6d91448fbb27fe95a57ce62a78d1b2c5 Reviewed-on: https://gerrit.libreoffice.org/40242 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2017-07-17Temporary ScAddress is unnecessary when constructing ScRangeEike Rathke
Change-Id: I9160eb2c0fe79a5a56b4a4e524d163133f6dc65b
2017-07-14use more OUString::operator== in scNoel Grandin
Change-Id: I1a7691fe59e5e93c15bd812f03366da814f9f3db Reviewed-on: https://gerrit.libreoffice.org/39900 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-10tdf#107135, add missing ODFF function REPLACEB.Winfried Donkers
Change-Id: I8d782b109eb390838b6c4f3a85e9b344ecef87ec Reviewed-on: https://gerrit.libreoffice.org/39606 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-06-26loplugin:oncevar in scNoel Grandin
Change-Id: Ice59e286debb6bd0eb692f2b2b0c2c5087c069c0 Reviewed-on: https://gerrit.libreoffice.org/39239 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-13Use FormulaTokenArray::FirstToken() in one place where we canTor Lillqvist
Change-Id: I84a108d9c0f1a0982fb7144b32be007498e5f0ea
2017-06-02Improved loplugin:redundantcast static_cast handling: scStephan Bergmann
Change-Id: I11f0deb6913a7a3adc6bc31890451e05bfa00802
2017-05-31clang-tidy readability-redundant-string-cstrNoel Grandin
and readability-redundant-string-init Change-Id: I7b25659ace9e1d5be042ec5e179f01191693334e Reviewed-on: https://gerrit.libreoffice.org/38225 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-28remove unnecessary use of OString::getStrNoel Grandin
Change-Id: I0490efedf459190521f4339854b3394d57765fdb Reviewed-on: https://gerrit.libreoffice.org/38058 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-23drop the SCsROW/SCsCOL/SCsTAB typedefsNoel Grandin
which are exactly the same as the regular SCROW/etc typedefs, and have been this way since commit 43a21999a92c99867bc3417291719996776b0647 Author: Oliver Bolte <obo@openoffice.org> Date: Fri Jun 4 09:00:39 2004 +0000 INTEGRATION: CWS rowlimit (1.1.2); FILE ADDED Change-Id: Ia7f75d71227ca3167b5fd56019bb9bdf0697d1b0 Reviewed-on: https://gerrit.libreoffice.org/37911 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-05-17tdf#43535: add unit test for this.Kohei Yoshida
Change-Id: I4e6b27f82d1344ac77b02867e1e717c510a133b6 Reviewed-on: https://gerrit.libreoffice.org/37696 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
2017-05-05Use the non-template variants.Kohei Yoshida
Eventually the template variants of these helper functions should be removed. Change-Id: I63edf2776efafd08908947217ce53dfc6d5e35fc Reviewed-on: https://gerrit.libreoffice.org/37269 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
2017-04-28loplugin:cppunitassertequals: scStephan Bergmann
Change-Id: Ifc250cf5bc293b4c87b9abb2d00be62078c2338a
2017-04-14update cppunit to 1.14.0Markus Mohrhard
Change-Id: I95fa42f4ef0580734b605df859c1660b29adb8b2 Reviewed-on: https://gerrit.libreoffice.org/36499 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-03-31tdf#82580 tools: rename Rectangle to tools::RectangleMiklos Vajna
Mostly generated using make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle" Except some modules have their own foo::tools namespace, so there have to use ::tools::Rectangle. This commit just moves the class from the global namespace, it does not update pre/postwin.h yet. Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2 Reviewed-on: https://gerrit.libreoffice.org/35923 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-03-24tdf#105908: add test for this.Kohei Yoshida
Change-Id: I553c18107d469bd7dce37d673f958126455b4393 Reviewed-on: https://gerrit.libreoffice.org/35608 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
2017-03-23convert ScMatrixMode to scoped enumNoel Grandin
and fix a bug in ScChangeActionContent::SetValueString where it was passing the grammar as the ScMatrixMode to the ScFormulaCell constructor. Change-Id: I7c1a174cdd8365dedc30cff0b26e3079bb8b84f3 Reviewed-on: https://gerrit.libreoffice.org/35552 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-17convert SvxBorderStyle to scoped enumNoel Grandin
and rename to SvxBorderLineStyle Change-Id: I19e530f162e4ca6290a0ad076e7fe3d5775ae6bc Reviewed-on: https://gerrit.libreoffice.org/35265 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-15tdf#106253 Test Precision as shown for thousand separatorsLaurent Balland-Poirier
Change-Id: I2e07667884d072a875b7bf5e5c7cf4c3e5d98332 Reviewed-on: https://gerrit.libreoffice.org/35098 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-03-14tdf#106252 Engineering notation for Precision as shownLaurent Balland-Poirier
with more tests Change-Id: Ifc77b847af4eaaa3c85e904e46c2663b6d768241 Reviewed-on: https://gerrit.libreoffice.org/35089 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-03-14add test for tdf#106456Markus Mohrhard
Change-Id: Icf8a52db84536ef540c5dcffceabfbeb5c1deb02 Reviewed-on: https://gerrit.libreoffice.org/35153 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-03-11Fix typosAndrea Gelmini
Change-Id: Ia79bc8d35cf19438d177f31a8e0c8603102b4ef1 Reviewed-on: https://gerrit.libreoffice.org/35061 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-09it's raining drawing layersEike Rathke
Change-Id: Ieee5cb5792535185ef09c3775072ed739fb0e4b0
2017-03-09sprinkle some drawing layers over test casesEike Rathke
... so things actually work like intended and creation of caption objects doesn't silently fail. Well, it does SAL_WARN or OSL_ENSURE but that's never displayed unless a test fails. Change-Id: Ibf4cc075cc3d6dadbe8f6208b2949310124b5749
2017-03-03Fix typosAndrea Gelmini
Change-Id: Iedca07be5300c68e180e0c71d2d6eb0052f5cced Reviewed-on: https://gerrit.libreoffice.org/34801 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-02Tests for "Precision as shown" following tdf#105657 tdf#106052Laurent Balland-Poirier
I was unabled to add these test svl/qa/unit/svl.cxx because they required ScDocument::RoundValueAsShown() Found that other formats are not supported by "Precision as shown" option: - engineering tdf#106252 - thousand tdf#106253 Change-Id: Iaf98c404cabec0f5c69f94f2bf863351487fe9d7 Reviewed-on: https://gerrit.libreoffice.org/34750 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-03-01typesafe wrappers for css::i18nutil::TransliterationModulesNoel Grandin
and related css::util::SearchOptions2 The TransliterationModules enum has it's constants spread over multiple UNO enum/constant-collections - TransliterationModules and TransliterationModulesExtra, which means that most code simply uses sal_Int32. Wrap them up into a better bundle so that only the lowest layer needs to deal directly with the UNO constants. Change-Id: I1edeab79fcc7817a4a97c933ef84ab7015bb849b Reviewed-on: https://gerrit.libreoffice.org/34582 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-22less ugly ClosingClipboardSource()Eike Rathke
Change-Id: Ie53837e4dd5f779255eac25e090b23e49c3786ce
2017-02-21do not test for different caption pointers ...Eike Rathke
... if it's not guaranteed they may not be identical. Change-Id: Ieb4b0eb07a1b1832df65dde3c2e5a92b5121a162
2017-02-21this should be GetOrCreateCaption()Eike Rathke
... as the caption object has to be created after the note was pasted from a clipboard where the caption was forgotten.. Change-Id: I9b04f0146a7609ac44973dc181fa2ab6b11295b9
2017-02-21unit test for copying note from clipboard after closing orig doc, tdf#104967Eike Rathke
Change-Id: I165363eecbb37561d8265638415e0f5f069878d7
2017-02-21this should had been GetNote() and GetCaption()Eike Rathke
Not creating if there wasn't. Change-Id: I3e7a0d167e604b13674d24de18bd2bc7d3b36aa0
2017-02-21move ScDocShell de-/init related to getNewDocShell() and closeDocShell()Eike Rathke
In preparation for being able to handle two documents. Change-Id: Ie7ea65136bcd6719031af6b1034d002058bfd81a
2017-02-21unit test for cell merge with note caption undo, tdf#105667Eike Rathke
Change-Id: Ib49e0f35aa554025634c8496fbb80d87dbc86d89
2017-02-20tdf#105931 Add function ROUNDSIG to Calc.Winfried Donkers
SIGDIGITS rounds a value to a determined number of significant digits. Change-Id: I5dbfb638bf17ca109f9a14b3588d6d6c103edfa4 Reviewed-on: https://gerrit.libreoffice.org/34148 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2017-02-13convert CharCompressType to scoped enumNoel Grandin
and move it to svl, where it belongs Change-Id: Ic4d846419dfe2dd85de5ade8ed1a041867bbf1dc
2017-02-11tdf#86470: add unit test for this.Kohei Yoshida
Change-Id: Ib93703d10fe1fff0898bc935222df7a0cfe20486 Reviewed-on: https://gerrit.libreoffice.org/34160 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
2017-02-02convert method names in tools::SvRef to be more like our other..Noel Grandin
reference classes, uno::Reference and rtl::Reference. Specifically rename Is()->is() and Clear()->clear(). Change-Id: Icb7e05e2d09cb9977121508b837ba0961dabb4ae Reviewed-on: https://gerrit.libreoffice.org/33576 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-02tdf#105629: add test case for the auto filter usage with time values.Kohei Yoshida
Change-Id: Ic459eefde02037c0aa615044003abaf03e48f9e3 Reviewed-on: https://gerrit.libreoffice.org/33819 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
2017-02-02tdf#105629: add test for the advanced filter usage.Kohei Yoshida
The test case itself is derived from tdf#43831. Change-Id: Ifd847e84b84b02c1eb74572303af729c30c4f380 Reviewed-on: https://gerrit.libreoffice.org/33818 Reviewed-by: Kohei Yoshida <libreoffice@kohei.us> Tested-by: Kohei Yoshida <libreoffice@kohei.us>
2017-01-08tdf#90290 use custom asserter in ucalc.cxxkerem
Change-Id: I2db09096c2862801631c92df77001b50cc8270c5 Reviewed-on: https://gerrit.libreoffice.org/32830 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2016-11-04unit test for tdf#103684, calculate status bar function across sheetsEike Rathke
Change-Id: I8205cf56628b6b4d4b5d655386df994a9c02a1ad