summaryrefslogtreecommitdiff
path: root/sc
AgeCommit message (Collapse)Author
2017-06-27Use base class to set/get super/sub scriptTamas Bunth
Looks like some obsolete code Change-Id: If600609ccd0baf3c10261cc850ac5ddc3c046401 Reviewed-on: https://gerrit.libreoffice.org/39216 Reviewed-by: Tamás Bunth <btomi96@gmail.com> Tested-by: Tamás Bunth <btomi96@gmail.com>
2017-06-26assert( nStartCol + nSize <= MAXCOL+1 ); tdf#108788 prepEike Rathke
Change-Id: I647253f32bfac0460c263f662ab95ec0151bf38c
2017-06-26tdf#39674 Translate some German variable namesJohnny_M
This translates "Neu..." to "New..." in names of some variables. No functional change is intended. Change-Id: I29859ecdd44e15820414746cd2b39f62cdfc0ae3 Reviewed-on: https://gerrit.libreoffice.org/39213 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-06-26nTransparency of type sal_Int16Stephan Bergmann
regression introduced with ac2d415a52f22caf0012b7d9b17d015aca27db9d "loplugin:oncevar in sc" Change-Id: I521053a59bb16c78d97129e4de5ebbf4820d6640
2017-06-26Write 0 of type 'unsigned char'Stephan Bergmann
regression introduced with ac2d415a52f22caf0012b7d9b17d015aca27db9d "loplugin:oncevar in sc" Change-Id: I1073e7e8b67ddf1dd633f004322c6bc46b9a8052
2017-06-26Fix int (sal_Int32) ambiguityStephan Bergmann
Change-Id: I32afd77a851da180d91011fa424a88be5871e8f7
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-26tdf#89139: pivotCache: output sharedItems children only for string fieldsMike Kaganski
... to avoid "corrupted" warning from Excel. In case of string fields, Excel expects the item list to be present, and containsXXX attributes of sharedItems to be absent, otherwise it shows a warning about file corruption. For numeric fields, it doesn't expect item list, othervise it also warns about file corruption. Change-Id: I5ded5b836587bed3177eb0a6b6c418e459e6be8b Reviewed-on: https://gerrit.libreoffice.org/39114 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-06-26Fix typosAndrea Gelmini
Change-Id: I2ce725f87ee6f8ebcffbac268cc7e7f8850023e5 Reviewed-on: https://gerrit.libreoffice.org/39232 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-06-24Related tdf#40713, use DecodeMechanism::UnambiguousJulien Nabet
Change-Id: I73221fb6c127903398a7faae48d5247339ec8d7f Reviewed-on: https://gerrit.libreoffice.org/39214 Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu> Tested-by: Jenkins <ci@libreoffice.org>
2017-06-24std::unordered_map can erase an element by given key, if anyTakeshi Abe
so that it is unneeded to find its position in advance. Change-Id: Iccf92f98b8683e4b2fb5252f5e05a357268b7033 Reviewed-on: https://gerrit.libreoffice.org/39156 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-06-24oovbaapi: add Application.OperatingSystem propertyTamas Bunth
stub As documented at: https://msdn.microsoft.com/en-us/vba/excel-vba/articles/application-operatingsystem-property-excel Change-Id: I2ccf17c698eb631e7b5ca420752b2268d2142d2a Reviewed-on: https://gerrit.libreoffice.org/39208 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2017-06-24tdf#40713: dBASE, don't lose dbt fileJulien Nabet
if aDbtFile corresponds exactly to aTmpFile, we just have to return Change-Id: I1dde8efbe01838dc94f6025d5b81f5aee01932ac Reviewed-on: https://gerrit.libreoffice.org/39189 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-06-23iOS, convert CPPUnittest to noopjan Iversen
unittest is not supported for iOS due to the way it is build Change-Id: I0682c5252231668edc2ec186147b872ef6fcc695
2017-06-23Resolves: tdf#108708 set a min width for calc dropdown combobox buttonCaolán McNamara
Change-Id: I002350170cf30a3347ed0c4e4885109ef194458e Reviewed-on: https://gerrit.libreoffice.org/39178 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-06-23tdf#39468 Translate some random German comments/termsJens Carl
Change-Id: I5f3b430fa317d7da13d47c21f1fec6c489b05522 Reviewed-on: https://gerrit.libreoffice.org/39141 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-06-23simplify some string handling in tracing callsNoel Grandin
Change-Id: I0fb76562429e691400a02216019c7f96791cf9b3 Reviewed-on: https://gerrit.libreoffice.org/39159 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-23coverity#1412873 Dereference null return valueCaolán McNamara
Change-Id: I7b812c3381237cd52902fd15667e6e70bb36d53e
2017-06-23coverity#735795 Unchecked dynamic_castCaolán McNamara
Change-Id: I3599c03d43761da73b89beae990f8688bd0b549b
2017-06-23tdf#89139: dump pivotField itemsMike Kaganski
This makes the pivot table exported to XLSX refreshable (does not crash Excel on pivot table refresh). Change-Id: Icc35795cd116e091b75bb1d4a603c52ccc71c44d Reviewed-on: https://gerrit.libreoffice.org/39018 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
2017-06-22Unit test for named single reference pointing to deleted row, tdf#108671Eike Rathke
Change-Id: Idb22bd00572d362eb2cc0137fe01835d6c28fcf8
2017-06-22assert( nX < nC && nY < nR ); cause of tdf#108292Eike Rathke
Change-Id: Iaa23361510b1aa1eebfa6618b526fc7d9d6fa537
2017-06-22Bin a couple way too verbose SAL_INFOsTor Lillqvist
Use temporary SAL_DEBUGs in your local tree instead if/when you need to trace these constructors and destructors. Change-Id: Icc52c905205914f0e5b911a2dae8322e99e9234e
2017-06-22tdf#39468 Translate some random German comments/termsJens Carl
Change-Id: I38cb79abb2a495ccca454903bc46b407009e8290 Reviewed-on: https://gerrit.libreoffice.org/39084 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-06-22Introduce a range-based iterator for 'references' in a FormulaTokenArrayTor Lillqvist
Take it into use in a couple of places. Change-Id: I72127f4236220fbe6fbf9ea25cdd56470be89961 Reviewed-on: https://gerrit.libreoffice.org/38997 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2017-06-22formula: remove indirection and use unique_ptrJochen Nitschke
Change-Id: Ib0c083803024d223f62b91ec54850b84eb68a758 Reviewed-on: https://gerrit.libreoffice.org/39033 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-06-21Resolves: tdf#108292 WalkAndMatchElements: really limit the matchEike Rathke
... to the columns queried, not just when entering an mdds node. Otherwise it would return an unexpected index, plus bailing out early spares unnecessary comparisons for the rest of a node block. Regression of commit 3fed166279377f7ad702b8911899243b8adff3bf Date: Fri Aug 16 16:29:38 2013 +0200 that started to use commit 7334f8db6f6004d48e2dbf014f27878a7ae21eb1 Date: Fri Aug 16 16:29:27 2013 +0200 with its bad implementation. Just that VLOOKUP on a matrix with a larger block of same typed data as the query *and* a match in an excess column seems to be rare.. Change-Id: Ia4ef3fd56490de82910d5aa13a84be2de851f9b0
2017-06-21Resolves: tdf#108671 mark named expression single reference #REF! if deletedEike Rathke
Probably broken already since commit f77c9d5b3cb65d9c2e2417f60bec1113feac50e1 Date: Mon Jul 29 14:47:07 2013 -0400 Change-Id: If90a959d000a1bf5ab0804deb22d5cfad413ea5e
2017-06-21Assert that nTabNo fits maTabData, tdf#108654 relatedEike Rathke
Change-Id: I30b95f69a71317896d86e36b1b926c703f1539d1
2017-06-21Resolves: tdf#108654 check nTabNo against maTabData sizeEike Rathke
ScViewData::DeleteTab() and DeleteTabs() never did that and worked by accident for which commit 73dec49802ef8fc42c5719efaa42a33cde68e569 removed the grounding.. Change-Id: I95460cd017d558c073df7891551d0251009dc1d4
2017-06-21loplugin:privatebaseStephan Bergmann
Change-Id: I4ccc29493332af16d9d79adff56002757b9d5bb6
2017-06-21loplugin:unusedfields in sfx2 part1Noel Grandin
and fix a memory leak in NotebookbarTabControl where it was not freeing it's m_pListener field Change-Id: Ib9970c9084982d532fa38d1bc3c44180ab2c3c39 Reviewed-on: https://gerrit.libreoffice.org/39036 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-21Fix use of wrong functionTamas Bunth
Input is a color, expected return value is an index. Change-Id: I1bb6977cea5aad7a89082ace12f0a85c58a0f2e3 Reviewed-on: https://gerrit.libreoffice.org/39045 Reviewed-by: Tamás Bunth <btomi96@gmail.com> Tested-by: Tamás Bunth <btomi96@gmail.com>
2017-06-21loplugin:unusedfields in svx part1Noel Grandin
Change-Id: I6621e0dda5a5dc3e68c7b1613975c075e2879912 Reviewed-on: https://gerrit.libreoffice.org/39006 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-21convert ErrCode to strong typedefNoel Grandin
would have preferred to re-use o3tl::strong_int, of which this is a modified copy, but there are lots of convenience accessors which are nice to define on the class. Change-Id: I301b807aaf02fbced3bf75de1e1692cde6c0340a Reviewed-on: https://gerrit.libreoffice.org/38497 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-20tdf#45904 Move remaining XCellSeries test code to C++Paul Trojahn
Change-Id: Ie4ee1e52157dd38ac0defee2e9d5cfa822763183 Reviewed-on: https://gerrit.libreoffice.org/38807 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-06-20new cannot return nullptrNoel Grandin
unless we are using std::nothrow Change-Id: I3bdd13c8ce18f4e977f18ee5196311bf4fc62de0 Reviewed-on: https://gerrit.libreoffice.org/38998 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-20Avoid "this member function can be declared static [loplugin:staticmethods]"Tor Lillqvist
Change-Id: If8e0810c4998b2d56609a0c9fe10ce061d1a6347
2017-06-20Remove unused ScColumn::mbDirtyGroupsEike Rathke
Change-Id: If8ed724ccec136653db5fcf43f9e74a82826add7
2017-06-19Moving legacy contexts to FastContexts:Mohammed Abdul Azeem
ScXMLExternalRefTabSourceContext ScXMLExternalRefRowsContext ScXMLExternalRefRowContext ScXMLExternalRefCellContext ScXMLExternalRefCellTextContext Change-Id: Ia626ed62186e53a352a5c7831b41be99ebc55018 Reviewed-on: https://gerrit.libreoffice.org/38881 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mohammed Abdul Azeem <azeemmysore@gmail.com>
2017-06-19Make SfxItemSet ranges correct by construction: Fix static casesStephan Bergmann
...with the aid of an extended compilerplugins/clang/store/sfxitemsetrewrite.cxx (which in turn needed a small addition to compilerplugins/clang/check.hxx). Enable svl::detail::validGap check for the static case, but keep it disabled for now for the dynamic case. Change-Id: I4846ba8e99aff94a86518e2cb5044e575093386e
2017-06-18remove unused osl/mutex.hxx includesJochen Nitschke
Change-Id: I3b50e45fdb99e9cd8bfda07356ee3ddb4dd0f8bb Reviewed-on: https://gerrit.libreoffice.org/38905 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-06-16Make SfxItemSet ranges correct by constructionStephan Bergmann
This is a follow-up to 45a7f5b62d0b1b21763c1c94255ef2309ea4280b "Keep WID ranges sorted, and join adjacent ones". While SfxItemSet::MergeRange relies on the m_pWhichRanges being sorted (and, under DBG_UTIL, asserts if they are not), the various SfxItemSet constructors curiously only check (via assert or DBG_ASSERT) that each individual range has an upper bound not smaller than its lower bound. Arguably, all SfxItemSet instances should fulfill the stronger guarantees required and checked by MergeRange. And in many cases the ranges are statically known, so that the checking can happen at compile time. Therefore, replace the two SfxItemSet ctors taking explicit ranges with two other ctors that actually do proper checking. The (templated) overload taking an svl::Items struct should be used in all cases where the range values are statically known at compile time, while the overload taking a std::initializer_list<Pair> is for the remaining cases (that can only do runtime checking via assert). Most of those latter cases are simple cases with a single range covering a single item, but a few are more complex. (At least some of the uses of the existing SfxItemSet overload taking a const sal_uInt16* pWhichPairTable can probably also be strengthened, but that is left for another day.) This commit is the first in a series of two. Apart from the manual changes to compilerplugins/clang/store/sfxitemsetrewrite.cxx, include/svl/itemset.hxx, and svl/source/items/itemset.cxx, it only consists of automatic rewriting of the relevant SfxItemSet ctor calls (plus a few required manual fixes, see next). But it does not yet check that the individual ranges are properly sorted (see the TODO in svl::detail::validGap). That check will be enabled, and the ensuing manual fixes will be made in a follow-up commit, to reduce the likelyhood of accidents. There were three cases of necessary manual intervention: * sw/source/core/unocore/unostyle.cxx uses eAtr of enum type RES_FRMATR in braced-init-list syntax now, so needs explicit narrowing conversion to sal_uInt16. * In sw/source/uibase/uiview/formatclipboard.cxx, the trailiing comma in the definition of macro FORMAT_PAINTBRUSH_FRAME_IDS needed to be removed manually. * In svx/source/svdraw/svdoashp.cxx, svx/source/svdraw/svdotext.cxx, sw/source/uibase/app/docstyle.cxx, sw/source/uibase/shells/frmsh.cxx, sw/source/uibase/shells/grfsh.cxx, and sw/source/uibase/shells/textsh1.cxx, some comments had to be put back (see "TODO: the replaced range can contain relevant comments" in compilerplugins/clang/store/sfxitemsetrewrite.cxx). A few uses of the variadic form erroneously used nullptr instead of 0 for termination. But this should have been harmless even if promoted std::nullptr_t is larger than promoted sal_uInt16, assuming that the part of the nullptr value that was interpreted as sal_uInt16/promoted int was all-zero bits. Similarly, some uses made the harmless error of using 0L instead of 0. Change-Id: I2afea97282803cb311b9321a99bb627520ef5e35 Reviewed-on: https://gerrit.libreoffice.org/38861 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-06-16For AutoSum up to next sum mark/select the resulting range, tdf#71339Eike Rathke
Change-Id: Ib543b4a84305467e8a9ce34bdc2c6a211f399cad
2017-06-16But not empty top/left in AutoSum of SUMs final selection, tdf#71339Eike Rathke
This was even more confusing than previously.. Change-Id: I9cbdd05e9b59662dfde4a08422d0d2846849719f
2017-06-16Resolves: tdf#71339 include selected top/left empty rows/columns in AutoSumEike Rathke
Keep the exclusion for determining the direction, but include them in the final formula result and selection. Change-Id: Ic752229bad17ac25de9ef598f3da32e0fd257fd1
2017-06-16Profiling API: add ProfileZonesLászló Németh
Change-Id: Ie5669bd75d9b4be047d98402cb69ac313ab618df Reviewed-on: https://gerrit.libreoffice.org/38787 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-06-16Get rid of the index inside FormulaTokenArrayTor Lillqvist
Instead, use FormulaTokenArrrayPlainIterator everywhere, especially in the FormulaCompiler. This is the final step of a long chain of commits. (Split up into many "uncontroversial" bits, and then this, to make potential bisecting easier.) Also added a logging operator<< for FormulaTokenArray, for SAL_DEBUG, SAL_INFO etc goodness. Change-Id: I02fe29f3f1e0dc33e5cba69e594223b4178a12bc Reviewed-on: https://gerrit.libreoffice.org/38851 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2017-06-15Fix typosAndrea Gelmini
Change-Id: Iea1f82e95c37bdf778941a568d61f17f179f838d Reviewed-on: https://gerrit.libreoffice.org/38795 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2017-06-15Prevent excess rows included in the resulting range list, tdf#95883 follow-upEike Rathke
Change-Id: Id2fdffa4d7bba8225ea5fcf583a562467342ad3d Reviewed-on: https://gerrit.libreoffice.org/38728 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>