path: root/sc/source/core/data/table2.cxx
AgeCommit message (Collapse)AuthorFilesLines
2014-12-02fdo#86762 re-establish listeners to move cell broadcastersEike Rathke1-2/+2
... for UpdateReferenceOnSort=false (cherry picked from commit 6c2111f17089eb667bf526561d7667d17825e822) Conflicts: sc/source/core/data/table3.cxx fdo#86762 broadcast also empty cells after sort (cherry picked from commit 08793e08c7e9cefe594c49130f782725e386c463) Conflicts: sc/inc/column.hxx sc/source/core/data/column.cxx sc/source/core/data/document.cxx sc/source/core/data/table2.cxx sc/source/ui/docshell/dbdocfun.cxx fdo#86762 re-establish listeners on moved broadcasters ... also in SortReorderByColumn() similar to SortReorderByRow() (cherry picked from commit e119f3883513aeaa49f332362620e955dc8b453f) Conflicts: sc/source/core/data/table3.cxx e275a754c530d6039ed14304900dd71416f36e46 7665dcc90d70fcf3b08bef0adb9ab6aaff1cdcdf Change-Id: Id90288660e317d6e47ee01ee3b5ff9058cfa18df Reviewed-on: Reviewed-by: Caolán McNamara <> Tested-by: Caolán McNamara <>
2014-08-13fdo#80501: Ensure that we notify each listener only once.Kohei Yoshida1-7/+0
Change-Id: If2ce4643ff58c7c2ba326d749698dd5196a108dc (cherry picked from commit b2ee0235e88dc4da715b5766295ed88f27974fbd) Reviewed-on: Reviewed-by: Eike Rathke <> Tested-by: Eike Rathke <>
2014-07-15fdo#71076, fdo#71767: Preserve number formats when charts are copied.Kohei Yoshida1-2/+3
(cherry picked from commit 1d38cb365543924f9c50014e6b2227e77de1d0c9) Signed-off-by: Andras Timar <> Conflicts: xmloff/source/chart/SchXMLExport.cxx sd/source/ui/view/sdview3.cxx chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx chart2/source/controller/main/ChartTransferable.cxx chart2/source/controller/main/ChartTransferable.hxx chart2/source/model/main/Axis.cxx chart2/source/model/template/ChartTypeTemplate.cxx chart2/source/tools/AxisHelper.cxx chart2/source/view/main/ChartView.cxx comphelper/source/container/embeddedobjectcontainer.cxx dbaccess/source/ui/browser/dbexchange.cxx dbaccess/source/ui/inc/JoinExchange.hxx dbaccess/source/ui/inc/TableRowExchange.hxx dbaccess/source/ui/inc/dbexchange.hxx dbaccess/source/ui/querydesign/JoinExchange.cxx dbaccess/source/ui/tabledesign/TableRowExchange.cxx embeddedobj/source/commonembedding/persistence.cxx embeddedobj/source/inc/commonembobj.hxx include/comphelper/embeddedobjectcontainer.hxx include/svtools/embedtransfer.hxx include/svtools/stringtransfer.hxx include/svtools/transfer.hxx include/svx/dbaexchange.hxx include/svx/dbaobjectex.hxx include/svx/fmview.hxx include/svx/galmisc.hxx include/svx/svdobj.hxx include/svx/svdoole2.hxx include/svx/svdxcgv.hxx include/svx/view3d.hxx include/svx/xmlexchg.hxx include/xmloff/xmlexp.hxx reportdesign/source/ui/dlg/GroupExchange.cxx reportdesign/source/ui/dlg/GroupExchange.hxx reportdesign/source/ui/inc/dlgedclip.hxx reportdesign/source/ui/report/dlgedclip.cxx sc/inc/column.hxx sc/source/ui/app/drwtrans.cxx sc/source/ui/app/lnktrans.cxx sc/source/ui/app/seltrans.cxx sc/source/ui/app/transobj.cxx sc/source/ui/inc/drwtrans.hxx sc/source/ui/inc/lnktrans.hxx sc/source/ui/inc/seltrans.hxx sc/source/ui/inc/transobj.hxx sc/source/ui/inc/viewfunc.hxx sc/source/ui/view/viewfun5.cxx sc/source/ui/view/viewfun7.cxx sd/source/ui/app/sdxfer.cxx sd/source/ui/dlg/sdtreelb.cxx sd/source/ui/inc/TabControl.hxx sd/source/ui/inc/View.hxx sd/source/ui/inc/sdtreelb.hxx sd/source/ui/inc/sdxfer.hxx sd/source/ui/view/sdview2.cxx sd/source/ui/view/tabcontr.cxx sfx2/source/doc/objxtor.cxx svtools/source/misc/embedtransfer.cxx svtools/source/misc/stringtransfer.cxx svtools/source/misc/transfer.cxx svtools/source/misc/transfer2.cxx svx/source/engine3d/view3d.cxx svx/source/fmcomp/dbaexchange.cxx svx/source/fmcomp/dbaobjectex.cxx svx/source/fmcomp/xmlexchg.cxx svx/source/form/fmexch.cxx svx/source/form/fmview.cxx svx/source/gallery2/galmisc.cxx svx/source/inc/fmexch.hxx svx/source/svdraw/svdoole2.cxx svx/source/svdraw/svdxcgv.cxx svx/source/tbxctrls/colrctrl.cxx sw/source/core/uibase/dochdl/swdtflvr.cxx sw/source/core/uibase/inc/swdtflvr.hxx sw/source/core/undo/unins.cxx Change-Id: If5ae8852152012483237e7602e56a0c46ea8748a (cherry picked from commit 4ee53683df4beda260aff26d2c9e56fe643f45bb) Signed-off-by: Andras Timar <>
2014-04-25fdo#72741, fdo#76607: Backport of Calc sort rework.Kohei Yoshida1-0/+21
This change requires mdds 0.10.3 as the baseline. Conflicts: sc/inc/fstalgorithm.hxx sc/source/core/data/column.cxx sc/source/core/data/table3.cxx sc/source/ui/docshell/dbdocfun.cxx Change-Id: Ia6d2bf1ee17e96c30b6d5310f5c49e5a4404e094 Reviewed-on: Reviewed-by: Michael Meeks <> Reviewed-by: Eike Rathke <> Tested-by: Eike Rathke <>
2014-03-25fdo#76470: Avoid joining new formula cells individually.Kohei Yoshida1-0/+8
Instead, insert the formula cells in the group first, then only try to join the top and bottom cells afterward. Otherwise the grouping would get messed up and a problem would ensue. (cherry picked from commit 474b2ea601f7fa2f1fbeae0f169ff5b8abc965be) Conflicts: sc/inc/column.hxx Change-Id: I4fdd5326c029032a636d8225b5fb16cbde427c7d Reviewed-on: Reviewed-by: Eike Rathke <> Tested-by: Eike Rathke <>
2014-03-17fdo#71491: Adjust reference during undo of drag-n-drop of cell range.Kohei Yoshida1-0/+20
Also with this commit, the signature of SvtListener::Notify() changes, by dropping the first argument which nobody uses. This change was necessary in order to call it directly without needing to pass any broadcaster instance. (cherry picked from commit 88955714d345d8584e86ae34bf5f5d1f3f4af9f7) (cherry picked from commit 99809b246c5dd2be548668032fac4f3c65fb962a) (cherry picked from commit 8b368d808e90561a9b34658e6b811a8fad83088f) (cherry picked from commit 83ee6b640eaf86f9aef6f42a4dd9c8a930cf9135) Conflicts: sc/inc/table.hxx sc/source/core/data/table2.cxx sc/source/ui/undo/undoblk.cxx svl/source/notify/broadcast.cxx Change-Id: I6a1e97f0fb1e070d1d8f7db614690b04c9e8024e Reviewed-on: Reviewed-by: Andras Timar <> Tested-by: Andras Timar <>
2014-03-13fdo#75977: Clear sheet deleted flags for affected references when undoing.Kohei Yoshida1-5/+4
This will allow formula cells to restore deleted references when they get recalculated. With this change, SetDirty() that previosly took no argument has been renamed to SetAllFormulasDirty(), and it now takes one argument that stores context information. (cherry picked from commit 18909ddb30db7ca9416ee2bfb0503753e877f002) Conflicts: sc/inc/document.hxx sc/source/ui/docshell/docsh5.cxx sc/source/ui/view/spelldialog.cxx Change-Id: If0de5dc1737a2722b6d61a87644b10a4f921edc5 Reviewed-on: Tested-by: Markus Mohrhard <> Reviewed-by: Markus Mohrhard <>
2014-02-06fdo#74556: Correctly handle note captions life cycles.Kohei Yoshida1-0/+17
When copying notes to clipboard, we don't clone captions but leave them pointing to the original captions objects. Also, during undo and redo, we need to clear all caption pointers to prevent them from being deleted when the ScPostIt objects get deleted. The undo and redo of caption objects are handled in the drawing layer afterwards. Also, Have ReleaseNote() really release note rather than destroying it. (cherry picked from commit fe5d604ecf6de4935c622e0e95efc085c4a3cbfd) (cherry picked from commit bc504b5adfaeeac0b910b89b0c98ae564f1ff5b8) Change-Id: Ia1da7784d04a2183f21813b6914e78161aad39d7 Reviewed-on: Reviewed-by: Fridrich Strba <> Tested-by: Fridrich Strba <>
2014-02-06fdo#74516: Avoid excessive building of escaped sheet names.Kohei Yoshida1-9/+11
The old code would build an array of escaped sheet names for all sheets on evevery invokation of ScCompiler, which unfortunately slowed down these "compile all formula cells" type methods, such as CompileAll(), CompileXML() etc. Let's avoid that and build or re-build the list only when necessary. Conflicts: sc/inc/column.hxx sc/inc/table.hxx sc/source/core/data/document.cxx sc/source/core/tool/compiler.cxx Change-Id: Iabf7c2374b728b6701da3aae7835cca2157f6c96 Reviewed-on: Reviewed-by: Fridrich Strba <> Tested-by: Fridrich Strba <>
2014-02-03fdo#74325: Ensure that all note objects have an sdr object before exporting.Kohei Yoshida1-0/+6
Otherwise, if a note hasn't been displayed at least once before saving that note would not get saved. In the future, we should modify the export code to not rely on SdrObject to check the presence of note. Change-Id: Ib7ca3ac00a0c9cdd3a01facda7af479ef172afbe (cherry picked from commit 018500a73f3b1082b6662b7c123dfe5158ae5752) Reviewed-on: Tested-by: Markus Mohrhard <> Reviewed-by: Markus Mohrhard <>
2014-01-30fdo#74014: Broadcast changes during undo and redo after paste.Kohei Yoshida1-2/+2
Change-Id: I271bbba5e5eb70e48274a4a062d125456af8ff6c (cherry picked from commit f5d8029a456c2c708cbc2b67f2d7875540dff1ab) Reviewed-on: Reviewed-by: Eike Rathke <> Tested-by: Eike Rathke <>
2014-01-27resolved fdo#71598 postpone SetDirty during Insert/DeleteEike Rathke1-2/+2
... until after all listeners are re-established. Change-Id: I9f6036d4bcc9206191959a88ed5439b9860ca268 (cherry picked from commit 20b7476142f75b49d10a75e48429a94cff0cec32) Reviewed-on: Reviewed-by: Norbert Thiebaud <> Reviewed-by: Markus Mohrhard <> Tested-by: Markus Mohrhard <>
2014-01-16resolved fdo#72293 correctly split grouped formulas and regroupEike Rathke1-4/+4
Grouped formulas need to be split at both edges of the deleted area, regroup _after_ rows have been deleted. Change-Id: I840806f30cef592e17b4cd3a33c81fd2a8309055 (cherry picked from commit 42f551d524a1df46f6a311d5897ac30bd8fc1aaf) Reviewed-on: Reviewed-by: Kohei Yoshida <> Tested-by: Kohei Yoshida <>
2013-12-02we want to delete anytime that attribs are overwritten, fdo#72149Markus Mohrhard1-1/+1
Change-Id: I1ed50e6daf5b363c46e31d1a0efacf7728621b1a
2013-11-28iterating through all cells is not a good idea, fdo#71934Markus Mohrhard1-0/+10
Change-Id: I370f641f0fffed8835a32c577c2f2e841ba419aa
2013-11-28checking every cell on a sheet is expensive, related fdo#71934Markus Mohrhard1-0/+14
This is only the first of two places that does this. Change-Id: I57fe1eb07630ecd86b112e88b7ad32c16e9f793a
2013-11-23resolved fdo#61946 use correct TabDelta for UpdateReferenceEike Rathke1-1/+1
The sheet delta was reverted resulting in the references not being updated when conditional formats were copy-pasted between sheets. Saved to .ods then was an identical calcext:target-range-address as for the copied source range. Change-Id: I038b58f20f71ff1393dccafa3021dac02cd69e4b (cherry picked from commit ef8e0beba442f58abe3bc77f6f55fc6109025dd4)
2013-11-06Modify ScFormulaCell's ctor to take a const reference to ScTokenArray.Kohei Yoshida1-2/+2
Instead of a pointer to ScTokenArray, and then clone its instance. If the token array gets cloned in ctor, take a const reference. Change-Id: I280fd7eb9eaea9905dbf954a1ace904ab0814dfe
2013-11-04Insert matrix formula vis ScDocumentImport, and more formula imorts.Kohei Yoshida1-8/+0
Now SetGroupFormulaCell() is no longer used. Change-Id: I10a387da04724794974eaf491a8efa4cda09d82a
2013-10-23Avoid exposing the internal cell note storage outside ScDocument.Kohei Yoshida1-0/+22
Let's try to avoid including mtvelements.hxx in document.hxx... mtvelements.hxx is very parser-heavy, and document.hxx is included everywhere... Change-Id: I2768ba6e25f8ff10f61f9cfd4a7cbc4844230630
2013-10-23Re-implement cell note storage using mdds::multi_type_vector.Laurent Godard1-225/+92
Change-Id: I34ea91e360e2a6b85d65f970c6e43db687d213ca
2013-10-22Bin comments that claim to say why some header is includedTor Lillqvist1-1/+1
They are practically always useless, often misleading or obsolete. Change-Id: I2d32182a31349c9fb3b982498fd22d93e84c0c0c
2013-10-08No more getIdentifier*() calls because they are not efficient.Kohei Yoshida1-11/+3
They shall never be used. Change-Id: I019c88b1511a67175d782777cd41e0ec0434f497
2013-10-08Unused methods.Kohei Yoshida1-8/+0
Change-Id: I8e70d2c730f0d8fa43a4270fddeca431bd7a5048
2013-10-08Store svl::SharedString in document cell storage instead of OUString.Kohei Yoshida1-2/+8
With this, both ScColumn and ScMatrix store svl::SharedString as their string values, instead of OUString. Change-Id: I3faece94d98f774881fd72b3ed5f6143504cd350
2013-10-08convert sc/source/core/data/*.cxx from String to OUStringNoel Grandin1-2/+2
and fix a bug in ScDPCache::ValidQuery where an inner loop was re-using an outer loop counter. Change-Id: Ie750234a079646bdb7174983814d8d9caf52f491
2013-10-04Add methods to turn cell strings into numeric IDs for comparison.Kohei Yoshida1-0/+16
Both in case sensitive and case insensitive comparisons. Change-Id: I356a655273f0f37157810c86e1cf3f87ea2afa09
2013-10-04convert sc/inc/t*.hxx from String to OUStringNoel Grandin1-1/+1
Change-Id: I23838bc08a625ebf438f0c6352a1bf86c728713b
2013-09-05increase conditional format range during inserting rows/cols, fdo#67783Markus Mohrhard1-3/+6
Change-Id: Ib74667fb958aa9bbbcae3a0289b3cbd6edf8fb37
2013-08-22fdo#39484 - don't loose outlines while trying to undo formulae changes.Michael Meeks1-1/+2
Change-Id: Ib3b2bab5beffb8164a8cd2c0b4db4c97f427507e
2013-08-21fdo#68381 take care of cell notes on TransposeLaurent Godard1-0/+14
Change-Id: I4272b45a1c8ad34b540ee39d9ef9dd717d4f6325 Reviewed-on: Reviewed-by: Kohei Yoshida <> Tested-by: Kohei Yoshida <>
2013-08-14Do the same when inserting columns.Kohei Yoshida1-1/+6
Change-Id: I387ef3c2c8345bb5be75909596f59af80b966443
2013-08-13Do the same when deleting rows.Kohei Yoshida1-2/+7
Change-Id: Ib1deab33a8771e196d0520bae872eb0d492c913e
2013-08-13Regroup formula cells later in columns where references are updated.Kohei Yoshida1-5/+21
Change-Id: I4dd6ade18e72d8f57583180463f9dda3603be4c2
2013-08-12Map shared formula from xls to formula groups, and share the tokens as well.Kohei Yoshida1-0/+8
No more mapping to range names. Change-Id: Ic43b6ef35a91fe4d6fff748ebc22969ba4e036db
2013-07-30Rework reference update in conditional formatting and cell validation.Kohei Yoshida1-1/+7
No tests are written for this yet. Change-Id: Ic26a7f19d6ce6e6d7059035dc9c99ae5bcb9d77b
2013-07-30More of the same. Will this ever end, I'm starting to wonder...Kohei Yoshida1-4/+1
Change-Id: I36bc90e8477cba306e107fb6d6e47f5732161df8
2013-07-24Broadcast on formula cells containing COLUMN functions on column insertion.Kohei Yoshida1-0/+7
To ensure that the change gets propagated properly. This fixes testFuncCOLUMN() cppunit test. Change-Id: Ia1ffc2880b7dae530ceb11c617c3963f7bfaeb00
2013-07-24More on removing use of CalcRelFromAbs().Kohei Yoshida1-1/+0
Some of them were called for all absolute references, which is not necessary. Change-Id: If19ee74731f40ca208e1cc1804c6b6e53073d891
2013-07-24Properly handle optional edge expansion of referenced ranges.Kohei Yoshida1-1/+1
Change-Id: I499189f4f76eee4b963f643364d1fad26cf69785
2013-07-24Use RefUpdateContext to stuff all parameters for UpdateReference.Kohei Yoshida1-4/+8
Because I was getting tired of typing all these parameters every time I branch off to a new function. Change-Id: I1ae14f290af5543150694d0bea27c617cccb9db2
2013-06-29only clean the cond format if we want to write attribs, fdo#62267Markus Mohrhard1-1/+1
Change-Id: I2f4feecb3180b165f6b9b299ecb3dcdbb65f87e3
2013-06-26coverity#1038508 Use after free (USE_AFTER_FREE)Caolán McNamara1-3/+3
** CID 1038508: Use after free (USE_AFTER_FREE) ** CID 1038509: Use after free (USE_AFTER_FREE) ** CID 1038510: Use after free (USE_AFTER_FREE) Change-Id: I3a1422e252af415536d9303e58ff85763c231921
2013-06-24Don't allow outside code to set text attributes.Kohei Yoshida1-5/+0
Also, use position() to update the value, to avoid performing position lookups twice (once for getting the current value, and once for setting the updated one). Change-Id: Iaa1575a4938b996266c01c8b3170e6a65b871961
2013-06-24Compiler warnings.Kohei Yoshida1-2/+1
Change-Id: I79b8370429bccaf8467a5c87ee5b68b643fb2f75
2013-06-24ScFormulaCell is no longer a child class of ScBaseCell.Kohei Yoshida1-1/+1
Change-Id: Id33072f193045e2eaf51373b47dac803f9a5d52c
2013-06-24Switch to using multi_type_vector for cell storage.Kohei Yoshida1-152/+230
The old style cell storage is no more. Currently the code is buildable, but crashes during unit test. Change-Id: Ie688e22e95c7fb02b9e97b23df0fc1883a97945f
2013-05-28correctly delete note captions, fdo#64068Markus Mohrhard1-1/+3
This fixes fdo#64068 and correctly without reintroducing the crash with Undo/Redo. Change-Id: I9ad48f6dbb7f1587985f8da9eba3886dfd4068de
2013-05-20Keep track of column block positions when mass-pasting formula cells.Kohei Yoshida1-3/+3
This speeds up the following scenario: 1) type =B1 in A1. Leave A2 empty. 2) Select A1:A2 and Ctrl-C to copy. 3) Select A3:A50000 (or longer if you so wish), and ctrl-V to paste. This causes the broadcaster storage array in column B to be heavily partitioned due to the empty cells interspersed between formula cells in column A. Without tracking the column position this would cause a O(n^2) complexity algorithm. Change-Id: Ic2f23c2c2bea3353c517faa73fe5412c7528bd95
2013-05-20A bit of a cleanup.Kohei Yoshida1-1/+0
Change-Id: Iaa7003cabee4630e4fbb8fb1cd114d04b4e9e33c