summaryrefslogtreecommitdiff
path: root/test/source/sheet/xspreadsheets2.cxx
AgeCommit message (Collapse)AuthorFilesLines
2023-10-20Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: testStephan Bergmann1-3/+3
Change-Id: I883d34c9562b48d987a16a0254272f3aeeb4bf5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158242 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-06-26new loplugin:constexprliteralNoel Grandin1-1/+1
OUStringLiteral should be declared constexpr, to enforce that it is initialised at compile-time and not runtime. This seems to make a different at least on Visual Studio Change-Id: I1698f5fa22ddb480347c2f4d444530c2e0e88d92 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153499 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-14loplugin:stringviewparam improvementsNoel Grandin1-4/+7
improve the check by checking for methods that exclude using string_view, rather than checking for methods that __can__ use string_view, which leads to exposing some holes in our o3tl/string_view.hxx coverage. Change-Id: Ic9dd60441c671f502692f9cd2a1bb67301c4b960 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150277 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-10-24UnoApiTest: factor out common codeXisco Fauli1-4/+1
Change-Id: Ia8874d65ea8d7eb26d10b18e37ba2bac1a7d756b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141730 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-03-25const OUString -> const OUStringLiteralMike Kaganski1-1/+1
Mostly automated rewrite Change-Id: Ie020a083f898bc126b8fb039d4ecb2e687172da1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112965 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-05tdf#139734 Remove redundant asserts after functions loadFromDesktop and loadMoaz1-3/+0
MacrosTest::loadFromDesktop itself asserts on its return value. Thus, the additional checks in unit tests are redundant, and only create noise unrelated to the tested functionality. SwModelTestBase::load calls SwModelTestBase::loadURL which calls loadFromDesktop from within. Change-Id: I30061bbc6e13e05f0cfbf17a7910926070b996f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111547 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-11-17loplugin:stringviewparam check methods tooNoel1-1/+1
not just functions Change-Id: Icca295dd159002b428b73f2c95d40725434f04d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105789 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-28Change OUStringLiteral from char[] to char16_t[]Stephan Bergmann1-3/+3
This is a prerequisite for making conversion from OUStringLiteral to OUString more efficient at least for C++20 (by replacing its internals with a constexpr- generated sal_uString-compatible layout with a SAL_STRING_STATIC_FLAG refCount, conditionally for C++20 for now). For a configure-wise bare-bones build on Linux, size reported by `du -bs instdir` grew by 118792 bytes from 1155636636 to 1155755428. In most places just a u"..." string literal prefix had to be added. In some places char const a[] = "..."; variables have been changed to char16_t, and a few places required even further changes to code (which prompted the addition of include/o3tl/string_view.hxx helper function o3tl::equalsIgnoreAsciiCase and the additional OUString::createFromAscii overload). For all uses of macros expanding to string literals, the relevant uses have been rewritten as u"" MACRO instead of changing the macro definitions. It should be possible to change at least some of those macro definitions (and drop the u"" from their call sites) in follow-up commits. Change-Id: Iec4ef1a057d412d22443312d40c6a8a290dc6144 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101483 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-07-02Upcoming improved loplugin:staticanonymous -> redundantstatic: testStephan Bergmann1-3/+3
Change-Id: I7926d0fef411337e637bca6d0f18ea75a12dc522 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97704 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-05Upcoming loplugin:elidestringvar: testStephan Bergmann1-5/+2
Change-Id: Id28d83963443e85bf8309bf41fa28140c4070af8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95580 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-12-19tdf#42949 Fix IWYU warnings in test/Gabor Kelemen1-9/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Id1ee9b6d44315443d023bdfbf9ae8e5aa2158ab2 Reviewed-on: https://gerrit.libreoffice.org/85171 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-12-06Test results across all imported and inserted sheets.Eike Rathke1-0/+54
Change-Id: I573467a962a2835765cc5672b81cce4c7772ddff Reviewed-on: https://gerrit.libreoffice.org/84669 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2019-12-06Swap expected and actual valuesEike Rathke1-8/+8
in CPPUNIT_ASSERT... the first parameter is the expected value and the second the actual value. Passing them swapped is confusing if the test is failing. Change-Id: I06f8f345d52c3743d10441aae6d8c943f9b49b41 Reviewed-on: https://gerrit.libreoffice.org/84635 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2019-12-06Use correct destination sheet instead of arbitrary leftover of expected nameEike Rathke1-2/+2
Tests are executed in sequence, inserting a sheet with each importSheetToCopy(), ended up with 'SheetToCopy_4' as the first sheet (last sheet inserted), but obtained "destination" values from sheet 'SheetToCopy' (the first sheet inserted) whatever may have happened to its references during the previous tests or by inserting more sheets in front of it. Instead of obtaining the destination sheet by name 'SheetToCopy', obtain it by index 0 where it was inserted We could also remove the inserted sheet after each test, but likely a cleaner approach would be to setup a fresh document to be inserted into for each test to avoid any side effects like names already being present from a previous insertion. Change-Id: I38f35ccac7d656026b6fec8d3c5faa68d6f4a642 Reviewed-on: https://gerrit.libreoffice.org/84631 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2019-08-12Fix typosAndrea Gelmini1-1/+1
Change-Id: Iedac37e0e056815e64294c70a233242df6dbf110 Reviewed-on: https://gerrit.libreoffice.org/77278 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-13fix wrong SET/QUERY flags passed to uno::ReferenceNoel Grandin1-1/+1
By creating deleted methods for the wrong calls. Avoids the compiler needing to construct a temporary Change-Id: I3b8c648d6bb22d22827bf74f21ea5a2a17fc0f6a Reviewed-on: https://gerrit.libreoffice.org/72103 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-27condition always true in XSpreadsheets2::importSheetToCopyNoel Grandin1-19/+10
leftover from commit ed45c87896de74048708d51c050ecd42c9f4a0a0 Date: Mon Oct 20 21:08:54 2014 +0200 sc: fix temp file leak in ScTableSheetsObj Change-Id: Ic108fb36cc0caccbe57f2b47f7fcbe80156842dc Reviewed-on: https://gerrit.libreoffice.org/69749 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-03loplugin:constfields in swNoel Grandin1-10/+11
Change-Id: I1eb6583bb9ec815bc0564b0d7c676f5b1fb9045f Reviewed-on: https://gerrit.libreoffice.org/61177 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-08look for unnecessary calls to Reference::is() after an UNO_QUERY_THROWNoel Grandin1-3/+0
Since the previous call would throw if there was nothing to be assigned to the value. Idea from tml. Used the following script to find places: git grep -A3 -n UNO_QUERY_THROW | grep -B3 -F 'is()' Change-Id: I36ba7b00bcd014bdf16c0455ab91056f82194969 Reviewed-on: https://gerrit.libreoffice.org/55417 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-01-15More loplugin:cstylecast: testStephan Bergmann1-1/+1
Change-Id: I5f7cd029e27be24415c075c4589e71eeae5d6ac2
2017-10-23loplugin:includeform: testStephan Bergmann1-1/+1
Change-Id: Ibcbb5b002e8326c484547a825cb295d0f5158a3b
2017-06-28loplugin:oncevar in test..toolsNoel Grandin1-14/+7
Change-Id: I7b3ccc8f227100ff7fedeaca96a12f135da60bab Reviewed-on: https://gerrit.libreoffice.org/39326 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-12remove unused uno::Reference varsNoel Grandin1-1/+1
found by temporarily marking Reference as SAL_WARN_UNUSED. Change-Id: I18809b62654467f890016adcc92576980ced393b Reviewed-on: https://gerrit.libreoffice.org/37511 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-28loplugin:cppunitassertequals: testStephan Bergmann1-1/+1
Change-Id: I3357b7502fcf9a45095919157ca1530e10c14dd0
2017-04-03use actual UNO enums in test..vbahelperNoel Grandin1-1/+1
Change-Id: I2e38462045efedc31903589a3fa4e6f62d74d8de Reviewed-on: https://gerrit.libreoffice.org/36042 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-07-07loplugin:passstuffbyref also for {css::uno,rtl}::ReferenceStephan Bergmann1-1/+1
Change-Id: If18ea216cc3416e4a7e2041e50b5a64b1e90886a
2016-04-28teach stylepolice plugin about ref-counted-pointer namingNoel Grandin1-2/+2
Change-Id: I6e91d22fc1826038c05ddb6fc065563c6a250752 Reviewed-on: https://gerrit.libreoffice.org/24459 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-05use uno::Reference::set method instead of assignmentNoel Grandin1-3/+3
Change-Id: Id036f867e75d03d8347cc32a1011c5cdda1dcc73
2015-10-20loplugin:defaultparamsStephan Bergmann1-1/+1
Change-Id: I742a25440d6c321549bb32a2e5ce86207bfb711c
2014-11-12Fix common typos. No automatic tools. Handmade…Andrea Gelmini1-1/+1
Change-Id: I1ab4e23b0539f8d39974787f226e57a21f96e959 Reviewed-on: https://gerrit.libreoffice.org/12164 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-21sc: fix temp file leak in ScTableSheetsObjMichael Stahl1-1/+7
Change-Id: Iff838c97c1cf633f99e75a169eeb8bb324d4a32a
2013-10-30simplify code and fix out of bounds readMarkus Mohrhard1-3/+3
Change-Id: I5be3a28d3d1ae43974f844d143a30bfd989cbe5b
2013-05-06remove usage of RTL_CONSTASCII_USTRINGPARAMLuboš Luňák1-3/+3
Mechanical removal of usage together with OUString ctor, done by compiler plugin. Change-Id: I554227f76df0dac620b1b46fca32516f78b462c5
2013-04-30Move to MPLv2 license headers, with ESC decision and author's permission.Michael Meeks1-23/+4
2013-04-26test: clean up namespacingThomas Arnhold1-1/+2
Change-Id: I7df07176bdbd15fdfdf8f9a7cdb26d4bee12997d
2013-04-07mass removal of rtl:: prefixes for O(U)String*Luboš Luňák1-29/+29
Modules sal, salhelper, cppu, cppuhelper, codemaker (selectively) and odk have kept them, in order not to break external API (the automatic using declaration is LO-internal). Change-Id: I588fc9e0c45b914f824f91c0376980621d730f09
2013-03-19removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStrings declarationsThomas Arnhold1-13/+13
s/(OUString\s+[a-zA-Z_][A-Za-z0-9_]*\s*)\(\s*RTL_CONSTASCII_USTRINGPARAM\s*\((\s*"[^")]*?"\s*)\)\s*\)/$1\($2\)/gms Change-Id: Iad20f242c80c4bdc69df17e2d7a69d58ea53654b Reviewed-on: https://gerrit.libreoffice.org/2835 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
2012-12-04re-base on ALv2 code. Includes:Michael Meeks1-3/+3
Patches contributed by Herbert Duerr i#118735 prevent endless loop if vlookup/hlookup doesn't find anything http://svn.apache.org/viewvc?view=revision&revision=1239673 Patches contributed by Andre Fischer remove lp_solver http://svn.apache.org/viewvc?view=revision&revision=1199180 i#118160: Added external CoinMP library. http://svn.apache.org/viewvc?view=revision&revision=1233909 Patches contributed by Armin Le-Grand i#118485 - Styles for OLEs are not saved. http://svn.apache.org/viewvc?view=revision&revision=1182166 i#118524: apply patch, followup fixes to 118485 http://svn.apache.org/viewvc?view=revision&revision=1186077 Patches contributed by lihuiibm i#108860 - Fix range validation. http://svn.apache.org/viewvc?view=revision&revision=1242846 i#118954 Chart data will lost after copy to different file http://svn.apache.org/viewvc?view=revision&revision=1301345 Patches contributed by Ariel Constenla-Haile Fix Linux build breaker: extra qualification on member http://svn.apache.org/viewvc?view=revision&revision=1301591 i#118696 - i#118697 - Fix some Sheet Tab Color API issues http://svn.apache.org/viewvc?view=revision&revision=1225428 i#118697 - Fix uninitialized variable http://svn.apache.org/viewvc?view=revision&revision=1225859 i#118771 - ScUndoImportTab should preserve tab background color http://svn.apache.org/viewvc?view=revision&revision=1230356 i#118921 - Repaint linked sheet tab background color after updating link http://svn.apache.org/viewvc?view=revision&revision=1245177 i#118927 - Undo/Redo "Update Link" does not reset sheet tab color http://svn.apache.org/viewvc?view=revision&revision=1245241 i#118747 - Copy tab color when transferring sheets across documents http://svn.apache.org/viewvc?view=revision&revision=1230355 Patch contributed by Oliver Rainer-Wittman i#118012 - methods <ScBroadcastAreaSlot::AreaBroadcast(..)> and <ScBroadcastAreaSlot::AreaBroadcastInRange(..)> adapt stl-container iteration in order to avoid destroyed iterators during iteration. http://svn.apache.org/viewvc?view=revision&revision=1297916 Patches contributed by Mathias Bauer gnumake4 work variously http://svn.apache.org/viewvc?view=revision&revision=1394707 http://svn.apache.org/viewvc?view=revision&revision=1394326 http://svn.apache.org/viewvc?view=revision&revision=1396797 http://svn.apache.org/viewvc?view=revision&revision=1397315 Patch contributed by Daniel Rentz calc69: #i116936# fix VBA symbol Cells http://svn.apache.org/viewvc?view=revision&revision=1172135 Patches contributed by leiw: i#118546 CPU 100% on switched off AutoCalculate with Conditional Formatting on date values http://svn.apache.org/viewvc?view=revision&revision=1301380 Re-add new function documentation. Many various cleanups. Add missing calc66: #o11817313# also look at formula result number format, remove redundant binaries.
2012-09-18deprecate oustringostreaminserter.hxxNorbert Thiebaud1-1/+1
the intent of this header has canged over time. now it is already systematically included with ustring.hxx and the operator overload it provide fit nicely there... Just to be safe, since that include as been added to the api during the 3.5 timeframe and therefore is already in 'production' the header remain and simply attempt to include ustring.hxx but a warning is issued indicating that this header should not be used anymore... in a couple of major release we will thenr emove it completely All internal users of that header are converted. Change-Id: I8934c55f089e29d78c0f5649b7c87b2ecf024bad Reviewed-on: https://gerrit.libreoffice.org/634 Tested-by: Norbert Thiebaud <nthiebaud@gmail.com> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2012-02-21WaE: add virtual dtorCaolán McNamara1-0/+4
2012-02-19this test uses ScNamedRangeObj.ods tooMarkus Mohrhard1-1/+1
TODO: remove the explicit test file dependency from the interface test code don't use one of the test files for another class
2012-02-12fix errors with assertion macrosMarkus Mohrhard1-2/+2
2012-02-12use better assertion macrosMarkus Mohrhard1-10/+10
2012-01-23refactor concept for c++ based subsequenttestsMarkus Mohrhard1-0/+352