summaryrefslogtreecommitdiff
path: root/sc/inc/clipcontext.hxx
AgeCommit message (Collapse)Author
2023-02-28tdf#153669: Track formulas that stopped listening ...Kohei Yoshida
... then have them start listening again after the copy from clipboard is complete. Note that in case the pasted cells are formula cells, those will be handled together as well. Change-Id: Ia4be814b888734267a39f7c89435011968570b7f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147940 Tested-by: Jenkins Reviewed-by: Kohei Yoshida <kohei@libreoffice.org>
2022-04-04sc: add support for copy/cut and paste of SparklinesTomaž Vajngerl
Currently cut,copy and paste will copy the Sparkline and create a new SparklineGroup for each cell in the new cell range. This probably need to be adjusted so the SparklineGroup is shared. Change-Id: I6f86bb026753b2b4b5bfa46aca4ca9794721f311 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132473 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-02-04tdf#146795: Make sure to use valid position hints to avoid crash.Kohei Yoshida
This commit also unifies the code path for both "skip empty cells" option is selected and when that option is not selected, which simplifies the code quite a bit. Change-Id: I21054cccdd9f60e073695091740b9415dfef2985 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129267 Tested-by: Jenkins Reviewed-by: Kohei Yoshida <kohei@libreoffice.org>
2022-01-29Standardize the flag name on bSkipEmptyCells.Kohei Yoshida
And document what the flag does. This corresponds with the "Skip empty cells" check box in the Paste Special dialog. Change-Id: Ic6cf9099efbee43f737a1472a4e275839e3d2c82 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129130 Tested-by: Jenkins Reviewed-by: Kohei Yoshida <kohei@libreoffice.org>
2021-05-16sc_ucalc: move conditional format tests to their own moduleXisco Fauli
in order to split sc_ucalc monster into smaller modules While at it, remove testCopyPasteSkipEmptyConditionalFormatting it was added already disabled in 5915d38e84c7a7861c169bea18c63824bcfdc470 <add disabled test for conditional formatting with skip empty cells> and it fails if it's enabled Change-Id: I6222849b38ab288b24432dc00698d72f5bcc5c2e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115677 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-03-23tdf#124176 Use pragma once in s*Vincent LE GARREC
sc, scaddins, sccomp, scripting Change-Id: Ia99fec9e238033821cb784810edd4762c09bd5db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112049 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2020-03-12Revert "loplugin:constfields in sc"Noel Grandin
This reverts commit fb1d3b580763a333bbbfe115d09e1b5cd8849675. Now that we know that making fields has negative side effects like disabling assignment operator generation. Change-Id: Ib48334ffbeb2c768896dd8ced6818aa0b9910b0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90333 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-12sc: rowcol: tdf#50916 pass ScDocument to the token classesNoel Grandin
needed to create a fake ScDocument for the external ref manager, since it has no ScDocument at all Change-Id: Ia786ac291133e3c438694e81ecfb2590729a853d Reviewed-on: https://gerrit.libreoffice.org/85050 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-01loplugin:finalclasses in sc/incNoel Grandin
Change-Id: I6a08a86262deae4bed3a05f77d3041a568f23595 Reviewed-on: https://gerrit.libreoffice.org/81853 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-20cache mdds positions during ScDocument::CopyBlockFromClip() (tdf#112000)Luboš Luňák
Make RefUpdateContext and ScColumn::UpdateReferenceOnCopy() use the same sc::ColumnBlockPositionSet that CopyFromClipContext uses. Without it pathological cases like in tdf#112000 trigger quadratic cost because of repeated mdds searches from the start. Includes also an mdds patch that allows it to search backwards from a position hint. Without it, this would be very difficult to fix otherwise, as CopyFromClip() in ScDocument::CopyBlockFromClip() moves the position hint past the area that UpdateReferenceOnCopy() would use. It also just plain makes sense to try to go backwards in an std::vector. Change-Id: I985e3a40e4abf1a824e55c76d82579882fa75cc2 Reviewed-on: https://gerrit.libreoffice.org/72424 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-10-15loplugin:constfields in scNoel Grandin
Change-Id: If326175d571d15752efd1b63df45b2bc785f7541 Reviewed-on: https://gerrit.libreoffice.org/61653 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-23loplugin:includeform: scStephan Bergmann
Change-Id: I2ed763e0584a188032c80fde60890de3c6985cbd
2016-09-30loplugin:constantparamNoel Grandin
Change-Id: Idbe8c8e6b3d44cacce296ec8c79b2b244281057c Reviewed-on: https://gerrit.libreoffice.org/29321 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark overriding destructors as 'virtual'" appears to no longer be a problem with MSVC 2013. (The little change in the rewriting code of compilerplugins/clang/override.cxx was necessary to prevent an endless loop when adding "override" to OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager(); in chart2/source/inc/LifeTime.hxx, getting stuck in the leading OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.) Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-04-26C++11: disable ctors instead of not implementing them (sc)Jochen Nitschke
replace the old declare and don't implement pattern with C++11 delete keyword Change-Id: I96c71d512d8dab4ad7c806c2e871604163fc49c1 Reviewed-on: https://gerrit.libreoffice.org/24399 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com>
2016-04-05tdf#94306 Replace boost::noncopyable with plain C++11 deleted copy ctorsSteven Guo
Replaced boost::noncopyable with play C++11 deleted copy ctors in sc/inc/* files. Change-Id: I2e6310f2f2bac673dd3b5d14e80ce80a98795672 Reviewed-on: https://gerrit.libreoffice.org/23059 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-01-11loplugin:privatebase: Make derivation from noncopyable explicitly privateStephan Bergmann
Change-Id: Ia410950353aec0106ea82d025ed3ee89c79ca127
2015-09-18boost->stdCaolán McNamara
Change-Id: I7f3bb094f116103c1146a7d60e3af94c0b37d9ea Reviewed-on: https://gerrit.libreoffice.org/18677 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-09-17revert for mac and win unit case crashes after boost->stdCaolán McNamara
Change-Id: I82c7084f203a834c2d42f9527705288e6036019b
2015-09-17boost->stdCaolán McNamara
Change-Id: I1e6a7fd66f90e6acd803c6cd464f1d73252f7bcb
2015-01-03boost::unordered_map->std::unordered_mapCaolán McNamara
Change-Id: I2c65709cda6f10810452dfb8aa1a247cb3a5564f
2014-12-10Deteremine the script type of source cell during paste replication.Kohei Yoshida
Doing this ahead of time eliminates the need to update script types of all replicated cells after the paste. This makes significant performance impact. Change-Id: Ic4f7d7b2fe152bd5640ddb1dae01cc2ed757657e
2014-11-25Adjust ref undo to ensure group area listeners are used.Kohei Yoshida
When undoing row deletion (and possibly other similar undo's). And write test for it. Change-Id: I04b4fd9932f4236f124dcd25967355c6055dec33
2014-11-18Move this code to the context class.Kohei Yoshida
Change-Id: I387dba24993d418a2b3923eac992ad2506229704
2014-11-18Speed up pasting of single row onto multiple destination rows.Kohei Yoshida
This is an extension of the earlier paste optimization of a single cell across multiple destination cells. Change-Id: I3a60300d3d0e11420d997bea8f7f540e948f56cc
2014-11-18Make these methods non-inline again.Kohei Yoshida
Change-Id: I34e18fa1607d56351e1c3656b1f37a823b7a5609
2014-09-04create type-safe bitfield for sc insert/delete flagsNoel Grandin
The most important part of the change is in sc/inc/global.hxx It creates a type-safe struct that prevents the accidental interaction between regular integer types and the flags struct. It also provides utility methods that make combining and testing the flags type-safe. Change-Id: Ibc5b20058b1655df913490682b679afd1297b36d Reviewed-on: https://gerrit.libreoffice.org/11071 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2014-06-17improve the inlinesimplememberfunctions clang pluginNoel Grandin
Change-Id: I6d5a952901648e01904ef5c37f953c517304d31e
2014-06-09loplugin: inlinesimplememberfunctionsNoel Grandin
Change-Id: I42119f656ca528286fb25d2d36c0af54b7d04a6b
2014-05-11fix-includes.pl: scThomas Arnhold
Change-Id: Iade3fedac5d2f8e978b7dd9c30f001d7d1564946
2014-04-19fixincludeguards.sh: scThomas Arnhold
sorry, huge one...
2014-02-18fdo#74573: Delete ranges that are non-empty before pasting from clipboard.Kohei Yoshida
The conditional formatting part is still not working. But other bits appear to be working now. Change-Id: Ia8a2cbe57cd2fa9ca9ad46635a91a1d8b99b0e7d
2014-01-27Handle note instances during copy-n-pasting of single cell.Kohei Yoshida
Change-Id: Ib258556414fd94b5156b65777478a8fd37abfd9e
2014-01-24Optimize copy-n-pasting of single cell replicated over a range.Kohei Yoshida
This is a very common operation. Let's speed it up a bit. TODO : Handle cell comments. Change-Id: I5442bf19008475a9427b889c1eb641cacd8ff161
2013-10-23Re-implement cell note storage using mdds::multi_type_vector.Laurent Godard
Change-Id: I34ea91e360e2a6b85d65f970c6e43db687d213ca
2013-06-24Reduce dependency on mtvelements.hxx header.Kohei Yoshida
Because that header includes lots of template definitions which would undoubtedly slow down compilation speed. Change-Id: Ifdd686a250d341a7a6877cca41f042f8dfdbbaf9
2013-05-20A bit of a cleanup.Kohei Yoshida
Change-Id: Iaa7003cabee4630e4fbb8fb1cd114d04b4e9e33c
2013-05-20Same with MixDocument(). But this one has additional bottleneck...Kohei Yoshida
With the removal of existing cells. So, this change is not enough to make this operation fly. Change-Id: Ic468375f6d0c28e2cc7d5391fb0565d53ee7fb4e
2013-05-20Do the same thing for CopyToDocument.Kohei Yoshida
This removes O(n^2) slowness from undo and redo of a large array of cells with empty cells in between. Change-Id: Id87c8ac8986c97ddf305f849a4752f0f92cc5899
2013-05-20Move the boolean flags to the context bucket.Kohei Yoshida
To reduce the number of function parameters lower. Change-Id: I816bd7c27070597f5fcdf69bdc7d981279390ca6
2013-05-20Do the same optimization for CopyToClip.Kohei Yoshida
The basic idea is the same as the one I did for CopyFromClip. This prevents the O(n^2) algorithm from being invoked during undo object creation. Change-Id: Iac46663b0c25db2f00ffa3ab95a4dcf2857252ce
2013-05-20Cleaned up a bit to remove the need to initialize the block positions.Kohei Yoshida
Change-Id: Iad2e69e4eb61167ad85581a83b19e3798c5edfd0
2013-05-20Keep track of current block position when pasting a range of cells.Kohei Yoshida
This avoids re-starting the search for insertion position in the cell text attribute array, on every single cell insertion. Instead of always searching from the first position, it starts the seaarch from the previous insertion position. This reduces the paste time from the previous 3.5 seconds to 1.7 seconds on my machine. Here is the scenario. 1) Put =A1 in B1, and leave B2 empty. 2) Select B1:B2 and copy it via Ctrl-C. 3) Select B3:B50000, and paste via Ctrl-V. Because of the empty cells interspersing the destination range, this makes the data array highly partitioned, which makes the position lookup very very expensive without the position hint. Still, I was hoping the duration would become a fraction of a second. 1.7 seconds still seems a bit too slow... Change-Id: I7742ce7e22935b6d0e082e4569d53dbd2072c4e5
2013-05-20Move the column element block definitions out of ScColumn.Kohei Yoshida
so that I can reference it in another class. Change-Id: I035cc1d37ec219c3e3da2e180a0337fb3c6fba8a
2013-05-20Move all clip params into the new context class. We don't need two buckets.Kohei Yoshida
Change-Id: Ida0542583242ebcdd7f1448931e31656aa542457
2013-05-20Introduce copy-from-clip context for copy handling code.Kohei Yoshida
It's not used yet, and is currently empty. Change-Id: Ia377994ae042fc8b19d269adc2f94830422770f1