summaryrefslogtreecommitdiff
path: root/sc/inc/column.hxx
AgeCommit message (Collapse)Author
2017-07-22avoid unnecessary calls of AdjustRowHeightTamas Bunth
Change-Id: I2d164f69a7313d69f3fe5cabe1e3cc39aeba4d32 Reviewed-on: https://gerrit.libreoffice.org/40272 Reviewed-by: Tamás Bunth <btomi96@gmail.com> Tested-by: Tamás Bunth <btomi96@gmail.com>
2017-07-20Avoid unnecessary calls of AdjustRowHeightTamas Bunth
Check if attribute changed during ApplyAttributes. If it did not change, it is unnecessary to recalculate cell size, repaint etc. Change-Id: Ic3a3fa24efa9ad3619b8979a67e972a7635311cc Reviewed-on: https://gerrit.libreoffice.org/40198 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2017-06-20Remove unused ScColumn::mbDirtyGroupsEike Rathke
Change-Id: If8ed724ccec136653db5fcf43f9e74a82826add7
2017-06-12tdf#95883 Select Unprotected Cells in CalcGulsah Kose
Change-Id: I20a71f66154675de9c2c47ff32e859c899fe9103 Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/37424 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-06-06first arg of ApplyBlockFrame is never nullCaolán McNamara
Change-Id: Ie65fce6041278c6758df266c4ef097a5758f75dd Reviewed-on: https://gerrit.libreoffice.org/38448 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-06-06add COVERITY_NOEXCEPT_FALSECaolán McNamara
to markup dtors that coverity warns might throw exceptions which won't throw in practice, or where std::terminate is an acceptable response if they do Change-Id: I32b94814e8245372e1d1dc36be0d81e3564042f4 Reviewed-on: https://gerrit.libreoffice.org/38318 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-05-24tdf#107945: properly iterate over mtv during pivot cache loading.Kohei Yoshida
This reduces the total time required for populating the pivot cache by ~60%. Change-Id: I6a8511959c20231a8a5dbd0b0a9a3d0930a1fa0c Reviewed-on: https://gerrit.libreoffice.org/37971 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
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-18New HintId and unit test for hidden rows and SUBTOTAL, tdf#93171 follow-upArul Michael
Adding new Hintid for HideRows so that we notify only formulas with subtotal and aggregate function for recalculation. Added unit testing. Change-Id: I44f2e45acaf697f91744bc8202f27b218faa5b43
2017-05-12tdf#93171 Subtotal function with function indexes don't updateArul Michael
Calling InerpretTail during Hide rows by SfxHintId::ScDataChanged broadcast Change-Id: Ie78170bb6d49933a49d828a18637cb410796dc06 Reviewed-on: https://gerrit.libreoffice.org/37509 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2017-05-03tdf#107255: detect whether the range has only one data cell.Kohei Yoshida
Change-Id: I030961d9d38b092ffdc966baa10decae0c2d070d Reviewed-on: https://gerrit.libreoffice.org/37178 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
2017-04-05lok: notify cell note removes before erasing storageHenry Castro
Change-Id: I6181b27b6a969d94789c42ea0914b17328c5c8d5 Reviewed-on: https://gerrit.libreoffice.org/36109 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit f27f4dd900b50f15427f44f6d448e8e8e49ec2d5) Reviewed-on: https://gerrit.libreoffice.org/36143 Tested-by: Jenkins <ci@libreoffice.org>
2017-01-18tdf#104967 preserve isolated notes data in clipboard when closing documentEike Rathke
Change-Id: I0e263583e27c5103c0bb90e8fe00562e46a52d98
2016-12-08convert SFX_HINT to scoped enumNoel Grandin
Notes (*) In SC, BULK_DATACHANGED was or'ed into the hint id. Replaced with a dynamic_cast check. (*) In SC, removed the hint id field from ScIndexHint, no point in storing the hint id twice (*) Fold the SfxStyleSheetHintId enum into the new SfxHintId enum, no point in storing two different hint ids (*) In some cases, multiple #define's used to map to the same SFX_HINT value (notably the SFX_HINT_USER* values). I made all of those separate values. Change-Id: I990e2fb587335ebc51c9005588c6a44f768d9de5 Reviewed-on: https://gerrit.libreoffice.org/31751 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-12Renaming due to the fact that it now dumps non-formula blocks too.Kohei Yoshida
Change-Id: I9d06786a93bab2f0ed0d179df8edf9b5d8128bf6
2016-11-12Ctrl-Shift-F8 to dump the column storage where the cursor is.Kohei Yoshida
Enabled only in dbgutil build. Change-Id: I0cd095fb56893122a26b2da6882fca15e516d193
2016-11-11loplugin:countusersofdefaultparams in sc(part2)Noel Grandin
Change-Id: I1e2a0969ca7e9e0f75079a171150269dfed26507 Reviewed-on: https://gerrit.libreoffice.org/30755 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-10Refactor ScAttrArray for tdf#50916Dennis Francis
For a default column, now ScAttrArray does not store the default format. So the case of default pattern from 0 to MAXROW is represented as nCount = 0 and pData = nullptr in ScAttrArray. A new ScAttrArray object (aNextColAttrArray) is introduced as a member of ScTable. This is used to store the formatting of *unallocated* columns (whose indices are from aCol.size() to MAXCOL). In next patches for this bug, I plan to refactor table*.cxx functions related to formatting such that : 1) In formatting setter functions, if colspan of the input range spans the colrange(aCol.size() to MAXCOL) then instead of allocating columns, apply that formatting to aNextColAttrArray. 2) In formatting getter (const) functions, if requested colspan has some intersection with the colrange(aCol.size() to MAXCOL) then use the formatting info stored in aNextColAttrArray to calculate the formatting of the input range. 3) In general setter (non-const) functions if we really need to allocate new columns (example, when data is entered), use the formatting info stored in aNextColAttrArray to create pAttrArray of the new column. Change-Id: Ieb56f853209b396d92fdb2c27e39361703576423 Reviewed-on: https://gerrit.libreoffice.org/27828 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-11-07loplugin:expandablemethods in scNoel Grandin
Change-Id: Ib417c5e978fca563f8c0ef0dbe6b9d50fead9828 Reviewed-on: https://gerrit.libreoffice.org/30566 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-04Avoid UBSan "reference binding to null pointer"Stephan Bergmann
...at least during JunitTest_sc_unoapi_2 at > ScTable::DoSubTotals(ScSubTotalParam&) sc/source/core/data/table3.cxx:2097:25 > ScDocument::DoSubTotals(short, ScSubTotalParam&) sc/source/core/data/documen3.cxx:761:104 > ScDBDocFunc::DoSubTotals(short, ScSubTotalParam const&, bool, bool) sc/source/ui/docshell/dbdocfun.cxx:1076:29 > ScCellRangeObj::applySubTotals(com::sun::star::uno::Reference<com::sun::star::sheet::XSubTotalDescriptor> const&, unsigned char) sc/source/ui/unoobj/cellsuno.cxx:5868:15 > gcc3::callVirtualMethod(void*, unsigned int, void*, _typelib_TypeDescriptionReference*, bool, unsigned long*, unsigned int, unsigned long*, double*) bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx:77:5 > cpp_call(bridges::cpp_uno::shared::UnoInterfaceProxy*, bridges::cpp_uno::shared::VtableSlot, _typelib_TypeDescriptionReference*, int, _typelib_MethodParameter*, void*, void**, _uno_Any**) bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:241:13 > bridges::cpp_uno::shared::unoInterfaceProxyDispatch(_uno_Interface*, _typelib_TypeDescription const*, void*, void**, _uno_Any**) bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:431:13 > binaryurp::IncomingRequest::execute_throw(binaryurp::BinaryAny*, std::__debug::vector<binaryurp::BinaryAny, std::allocator<binaryurp::BinaryAny> >*) const binaryurp/source/incomingrequest.cxx:240:13 > binaryurp::IncomingRequest::execute() const binaryurp/source/incomingrequest.cxx:77:26 > request binaryurp/source/reader.cxx:85:9 > cppu_threadpool::JobQueue::enter(long, bool) cppu/source/threadpool/jobqueue.cxx:107:17 > cppu_threadpool::ORequestThread::run() cppu/source/threadpool/thread.cxx:165:31 > threadFunc include/osl/thread.hxx:185:15 > osl_thread_start_Impl(void*) sal/osl/unx/thread.cxx:240:9 > start_thread (/lib64/libpthread.so.0+0x75c9) > __clone (/lib64/libc.so.6+0x102f6c) pStyle can apparently be null, will get passed through to ScColumn::ApplyStyle (sc/source/core/data/column.cxx), where it is only used in pNewPattern->SetStyleSheet(const_cast<ScStyleSheet*>(&rStyle)); and which is apparently fine with a null argument. Change-Id: I13fbb092aab06960d820c605476b2cee58889be4
2016-09-26convert HASATTR constants to typed_flags_setNoel Grandin
Remove unused constant RTL. Inline PAINTEXT constant since it is only used in one place. Change-Id: I7b2c15e7579fc5bc475d00fe714f17592bd5e2a1
2016-09-23convert formula error codes to scoped enumNoel Grandin
Change-Id: I5ff214bf1ec9031e30344bc125bc99916fd11bfb Reviewed-on: https://gerrit.libreoffice.org/28897 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-09-22loplugin:unusedmethods in sc..vclNoel Grandin
Change-Id: I70fcf95dfd3db05b4fd6e5cee37866f673d3afa8 Reviewed-on: https://gerrit.libreoffice.org/29183 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-10loplugin:constantparam in scNoel Grandin
Change-Id: I82c78dd880c98532db407b0183a43705be2de67c Reviewed-on: https://gerrit.libreoffice.org/28777 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-29loplugin:countusersofdefaultparamsNoel Grandin
Change-Id: I26f46ddac3d7d810ebfa1c3e7f1a77427369828e Reviewed-on: https://gerrit.libreoffice.org/28451 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-25let ScInterpreter::pStack contain const formula::FormulaToken*Eike Rathke
For two reasons: * introduce a new PushTokenRef() to push an already existing token, which can be used in several places that currently unnecessarily copy-construct a new token to be pushed * prevent unwanted side effects in case a token on the stack would be fiddled with, which was possible but just by convention wasn't done Change-Id: I715d81bcba8bdb415af45e889e9f9db1e0ac4888 Reviewed-on: https://gerrit.libreoffice.org/28377 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2016-07-22sc: convert MatrixEdge... to typed_flagsJochen Nitschke
remove some unhelpful or obvious comments replace numeric values in last loop of ScTable::HasBlockMatrixFragment Change-Id: If7115b504689ce31b5caadbcae8ce2f5466e5b2a Reviewed-on: https://gerrit.libreoffice.org/27378 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-17Use mdds' event callback to count formula blocks in each column.Kohei Yoshida
And use it to speed up certain formula related operations. Change-Id: I43b1d860d6b665556624ba7bc716826799919015 Reviewed-on: https://gerrit.libreoffice.org/27261 Reviewed-by: Kohei Yoshida <libreoffice@kohei.us> Tested-by: Kohei Yoshida <libreoffice@kohei.us>
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-05-31tdf#100160 - Changing OpenCL state doesn't update sheetMarco Cecchetti
now we re-check for vectorization state of formula token each time OpenCL is enabled or disabled Change-Id: I652397dd154f5fbf788cb511c70e53a47cc94293
2016-05-25Convert SC_MF to scoped enumNoel Grandin
Change-Id: I3089006b502e33710bfb2564f051ebf2892ad08a Reviewed-on: https://gerrit.libreoffice.org/25085 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-24loplugin:unusedmethods in scNoel Grandin
Change-Id: Ic378126a30be853d10fe174c451cee3c6ded404f Reviewed-on: https://gerrit.libreoffice.org/25109 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-11loplugin:constantparamNoel Grandin
Change-Id: Ie690088d7a7d568703afd22f544628fc8012a7e1
2016-03-24tdf#75372 rework sheet-copy names for converting global names to sheet-localEike Rathke
This during copying a sheet copies global names that from a copied formula cell reference the copied sheet and converts the copied global names to sheet-local names. References to the original sheet are updated to point to the new sheet. It works for names used in formula cells copied but needs enhancement to pick up nested names, i.e. names used in names that do not reference the sheet but the nested name does. Change-Id: I1aa16cb28c9f7b3581bec289435492c21e6fcd73
2016-03-24loplugin:constantparam in scNoel Grandin
Change-Id: I8608a6cb47972e9b838cc5ea431863348758ded0
2016-03-18let FindRangeNamesInUse() collect also sheet-local names, tdf#96915 relatedEike Rathke
... though CopyRangeNamesToClip()/copyUsedNamesToClip() don't handle them yet. Change-Id: I570c13725ed6448688d1a2ce877f8bc1d1ff9916
2016-03-07loplugin:unuseddefaultparamsNoel Grandin
Change-Id: Ia414f7845425ef73859ed04853378e96cc738795 Reviewed-on: https://gerrit.libreoffice.org/22971 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-04loplugin:unuseddefaultparam in scNoel Grandin
Change-Id: Id461fc600bec5fe372875c2dcf405997fcf9f0b4
2016-03-03loplugin:unuseddefaultparams in sc (part2)Noel Grandin
Change-Id: I356a86bfca20cbf2c52185697042dce5237e847d
2016-02-18don't fill the matrix cell by cell, tdf#67071Markus Mohrhard
We are now at a place where filling one cell takes about a second with the big document. We could in theory for the special case of this document add some caching but that would fail in other cases. This document is already quite large with an external reference to 70k cells for each formula cell. I consider it already quite nice and useable again. Change-Id: I804094838471507e6bb7b0e0e3387e0c7fe53e4b Reviewed-on: https://gerrit.libreoffice.org/22388 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-01-15loplugin:unusedmethods unused return value in scNoel Grandin
Change-Id: I3ccc98d2e042120093e2e8508518681588692393
2015-12-27sal_uLong to sal_uInt32, ScHint relatedMatteo Casalin
Change-Id: I84402bf4b8d69ae350f6449cf4d1fd7c5c325f3c
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
Change-Id: I765d2a600f9c57da50c85354688e3ae796750d94
2015-10-12Replace "SAL_DELETED_FUNCTION" with "= delete" in LIBO_INTERNAL_ONLY codeStephan Bergmann
Change-Id: I328ac7a95ccc87732efae48b567a0556865928f3
2015-09-22convert SC_PASTE constants to scoped enumNoel Grandin
Change-Id: I2c1b2cd5a89b3124a2e452800bf397e100cc885b Reviewed-on: https://gerrit.libreoffice.org/18734 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-10Resolves: tdf#92995 do not delete caption objects that are held by UndoEike Rathke
Drag&Drop Undo is a special case of ownership.. Change-Id: I2fe7769c4d84efe09d432335d5d8e72d506bf7a1
2015-07-06improve the returnbyref lopluginNoel Grandin
Change-Id: I1b510a6194282dfa4a9001d473127c5ebc8b44eb Reviewed-on: https://gerrit.libreoffice.org/16731 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-06-08\<the the\> -> theJan Holesovsky
Change-Id: I9d820446411eb7dfca37bb3baf5e994f4ba6f421
2015-05-30Implemented formula group count statisticBenjamin Ni
Change-Id: I8b9c11fdd4b6e4343b467f1e5b1d1e96f1dd3140 Reviewed-on: https://gerrit.libreoffice.org/15927 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-05-05loplugin:staticmethodsNoel Grandin
Change-Id: I912187d6c481a2ba61fed9c01998bf6f3c08a6a0