summaryrefslogtreecommitdiffstats
path: root/sc/inc/document.hxx
Commit message (Collapse)AuthorAgeFilesLines
* coverity#1266519 Use after freeCaolán McNamara2015-01-261-1/+1
| | | | Change-Id: Ib6b3b33f4b45e3bb0ff35d9e82db46bf59c60916
* coverity#1266498 Uninitialized scalar variableCaolán McNamara2015-01-251-5/+11
| | | | Change-Id: I203b9ff32cca1ca8d03911567290e534e082ee52
* fdo#88398: Handle group listeners correctly when splitting formula group.Kohei Yoshida2015-01-151-0/+3
| | | | | | | It's basically the same thing we do in ScDocument::DeleteArea(), implemented in ScDocument::SetValue() and SetString(). Change-Id: Ifcae31aaef0e00ed8659aa5e2b9b8e206dc1a099
* Implement getDocumentSize(). Cell data only for now.Kohei Yoshida2015-01-141-0/+11
| | | | Change-Id: I31e14f12aaee2d98103d1594ba5b511ebf91e333
* Annotate this method.Kohei Yoshida2015-01-141-2/+17
| | | | Change-Id: Ia8f518fd6e61562e95eddacafc9f7e49656826e8
* brute-force find-and-remove of unused #define constants.Noel Grandin2015-01-081-2/+0
| | | | Change-Id: I7223530ae37297a76654cd00cc1fedb56dbe3adb
* changed timers to idleJennifer Liebel2014-12-091-1/+1
| | | | Change-Id: I5846940cc45781f4a0264047107dbb568604d543
* activate BROADCAST_BROADCASTERS to speedup SetDirty with rangeEike Rathke2014-12-091-1/+1
| | | | | | | | No need to iterate through all cell positions and attempt a broadcast if no one is listening. Instead, broadcast only the cell broadcasters and use AreaBroadcast for the area listeners. Change-Id: I1e666e8ff19ac0715f73d73f54da2e4c8d523173
* Ctrl+A and Data Sort took ages to broadcast ALL cellsEike Rathke2014-12-051-1/+5
| | | | | | | | | | | | | | ... now that also empty cells are to be broadcasted. Set dirty and broadcast only the effective data range as determined by Sort. This is more a workaround, a cleaner solution would be to refactor the SetDirty() algorithm to iterate only through broadcasters and use AreaBroadcast() to notify area listeners. However, this can also be easily backported to 4-3. Change-Id: I6d68ca0088cec6a8328a3e93364ac928ef69babe
* remove boolean parameter default from ScDocument::SetDirtyEike Rathke2014-12-031-1/+1
| | | | | | | ... and force the caller to make a decision. In fact some needed to include empty cells. Change-Id: I82b6ef72f7ecda6543b3cafc70f475519870b471
* fdo#86762 broadcast also empty cells after sortEike Rathke2014-12-021-1/+1
| | | | Change-Id: Ie275a754c530d6039ed14304900dd71416f36e46
* Adjust ref undo to ensure group area listeners are used.Kohei Yoshida2014-11-251-0/+2
| | | | | | | When undoing row deletion (and possibly other similar undo's). And write test for it. Change-Id: I04b4fd9932f4236f124dcd25967355c6055dec33
* Use group area listeners when deleting rows.Kohei Yoshida2014-11-211-0/+1
| | | | Change-Id: I9ceb1cabf448349e087e4d5c4c2b1a75af91dd75
* Handle group area listeners correctly when deleting cells.Kohei Yoshida2014-11-211-0/+1
| | | | Change-Id: Ic37084ed670f53e0354056f7bef54229971dd7c2
* Adjust InsertRow() for group area listeners.Kohei Yoshida2014-11-201-0/+5
| | | | Change-Id: I813b45d015eb1ae8dc7bd1242152ef734b5fe08c
* No need to start listening in CalcAfterLoad for xls import.Kohei Yoshida2014-11-201-1/+1
| | | | | | | | We do that prior to it, and in fact, doing it here would unregister all group area listeners and re-register non-group ones, which is massively slower with huge documents. Change-Id: I693f681df05f036eb1aa53554e601066c469f49a
* Avoid unnecessary broadcasting when deleting cells prior to pasting.Kohei Yoshida2014-11-181-1/+2
| | | | Change-Id: Id224fd6fdb804350e7e00634db802e80090ae6d7
* Rename methods whose name no longer represent what they do.Kohei Yoshida2014-11-181-1/+1
| | | | | | | We now do all broadcasting at the end of CopyFromClip, and nowhere else during pasting from clip. Change-Id: I1cb2c529f127d6e4080e49e4827f048ce5a19f95
* Dedicated listener type tailored for formula groups.Kohei Yoshida2014-11-181-4/+3
| | | | | | | Right now, it's only used when loading an xlsx file. But eventually this one should be used everywhere. Change-Id: I216c3a9a33c4b8040e8284d59299e0637471fb50
* Reduce duplicate broadcasting done when pasting a range of cells from clip.Kohei Yoshida2014-11-181-5/+10
| | | | | | | | | | We do pasting from clip in 2 steps: 1) delete the destination range, then 2) paste the content onto the destination range. The old code would broadcast both during 1) and 2). This change consolidates them and do broadcasting only once at the end, and also avoids broadcasting the same cell twice, which the old code sometimes did. Change-Id: Ic524c2b70888ce158619d99cbfb55dea85870497
* Add a means to dump the state of the area broadcaster slot machine.Kohei Yoshida2014-11-181-0/+4
| | | | Change-Id: I158307de667dbe621376dfc01adeef89aa12faaa
* Remove unused header include.Kohei Yoshida2014-11-151-1/+0
| | | | Change-Id: I57cfac2993301e438124c224655fdcac0ed0fd32
* Remove brdcst.hxx from document.hxx.Kohei Yoshida2014-11-151-1/+3
| | | | Change-Id: Ie44a743a6814cdf1bc15f850547ae71afd595836
* Remove tools/fract.hxx from document.hxx.Kohei Yoshida2014-11-151-1/+1
| | | | | | | | If a forward declaration does the job, use that. Adding a new header in document.hxx is a very expensive operation since almost everyone in sc includes document.hxx. Change-Id: I2d78440d65da7207ceb16cb28a7404249eba066a
* Fix common typos. No automatic tools. Handmade…Andrea Gelmini2014-11-121-3/+3
| | | | | | | Change-Id: I1ab4e23b0539f8d39974787f226e57a21f96e959 Reviewed-on: https://gerrit.libreoffice.org/12164 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
* remove some unused code in scNoel Grandin2014-11-041-3/+0
| | | | Change-Id: I6cd2acaf361ae1947787b5aacc86b75a6e21c379
* Removed duplicated includesAndrea Gelmini2014-10-311-2/+0
| | | | | | | Change-Id: I5362d997bfa086c9fb1726efcb15132a966684f6 Reviewed-on: https://gerrit.libreoffice.org/12160 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
* Fraction: Revert "fdo#81356: convert Fraction to boost::rational<long> - wip"Jan Holesovsky2014-10-231-4/+4
| | | | | | | | | | | | | | This reverts commit 47a2d7642d249d70b5da0c330a73f3a0032e4bba. Conflicts: cui/source/tabpages/transfrm.cxx svx/source/svdraw/svdedtv1.cxx svx/source/svdraw/svdibrow.cxx sw/source/filter/ww1/w1filter.cxx tools/source/generic/rational.cxx Change-Id: I4849916f5f277a4afef0e279b0135c76b36b9d15
* Fraction: Revert "fdo#84854 it seems long is not enough on 32 bit"Jan Holesovsky2014-10-231-3/+3
| | | | | | | | | | | | This reverts commit 582ef22d3e8e30ffd58f092d37ffda30bd07bd9e. Conflicts: svx/source/svdraw/svdedtv1.cxx svx/source/svdraw/svdibrow.cxx sw/source/filter/ww1/w1filter.cxx Change-Id: I80abc7abdeddc267eaabc9f8ab49611bb3f8ae83
* loplugin: cstylecastNoel Grandin2014-10-231-1/+1
| | | | Change-Id: If991c0efe1ded6ef6d32b3a722ee87bbe36bf0bf
* Move SetAttrEntries from ScDocument to ScDocumentImport.Kohei Yoshida2014-10-221-2/+0
| | | | | | Since that method was really an optimization for xls(x) import code. Change-Id: Ie2530f5dc27411bd45d72440681689c6c7a8b10a
* fdo#84854 it seems long is not enough on 32 bitDavid Tardon2014-10-161-3/+3
| | | | | | | Fraction used BigInt internally for computations, rational does nothing like that. Change-Id: I3e9b25074f979bc291208f7c6362c3c40eb77ff5
* fdo#81356: convert Fraction to boost::rational<long> - wipJuan Picca2014-10-091-4/+4
| | | | | | | | | | | | | | | | | | | | | * Added rational util functions used by Fraction class not available in the boost::rational class. * Replaced usage of Fraction by boost::rational<long> * Removed code that relies on: 1. fraction.IsValid() -- rational only allow valid values, ie denominator() != 0 2. rational.denominator() == 0 -- always false 3. rational.denominator() < 0 -- always false but implementation detail: http://www.boost.org/doc/libs/release/libs/rational/rational.html#Internal%20representation * Simplified code that relies on: 1. rational.denominator() != 0 -- always true * BUGS EXIST because Fraction allows the creation of invalid values but boost::rational throws the exception boost::bad_rational Change-Id: I84970a4956afb3f91ac0c8f726547466319420f9 Reviewed-on: https://gerrit.libreoffice.org/11551 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
* Add menu entry for the "formula to value" feature.Kohei Yoshida2014-10-041-0/+5
| | | | | | | Not sure 100% if that's the best place for this. Feel free to move it to a better place. Change-Id: Id66a92e1184e988bd71f7d845ea370b021c02c21
* New feature to allow converting formula cells to static values.Kohei Yoshida2014-10-021-0/+5
| | | | | | | | You used to have to convert formula cells to static values by copying them and pasting them as values onto the original place. Why not just allow converting them in place? This is something I've always wanted to implement.
* sc: std::auto_ptr -> std::unique_ptrStephan Bergmann2014-09-301-7/+7
| | | | Change-Id: I25468d578de597ff9aeba3ffc850c630fa532767
* fdo#82577: Handle WindowNoel Grandin2014-09-231-3/+3
| | | | | | | Put the VCL Window class in the vcl namespace. Avoids clash with the X11 Window typedef. Change-Id: Ib1beb7ab4ad75562a42aeb252732a073d25eff1a
* Add loading document colors to CalcKrisztian Pinter2014-09-171-0/+2
| | | | Change-Id: I06783b04dbbad2aa690820af1ca2cf05a1004f20
* callcatcher: update unused codeCaolán McNamara2014-09-101-2/+0
| | | | Change-Id: Ie31c16318b09699e080484292d489a378e3a6dce
* create type-safe bitfield for sc insert/delete flagsNoel Grandin2014-09-041-17/+17
| | | | | | | | | | | | | | 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>
* fdo#81633: Add a new configuration option to toggle ref update on sort.Kohei Yoshida2014-09-031-1/+4
| | | | | | | | The new option is in Calc -> General and is labeled "Update references when sorting range of cells" Change-Id: I5ac686e96742df40f7d8ba5ffec23806db2988a6
* Make some methods non-inline, and add method descriptions.Kohei Yoshida2014-08-281-2/+2
| | | | Change-Id: Ib8d5fa666827a7f97035ad37d05e305bb920c300
* fdo#78555: Retain formula results when moving a range of cells.Kohei Yoshida2014-07-311-0/+2
| | | | | | | | | | | | * No need to re-compile RPN token array on reference change alone. We do that when the formula contains one or more names that have been updated. * Adjust undo code to get it to work without relying on ref undo document, which would cause the token arrays to be unnecessarily recompiled. * Whatever else need to be changed in order to pass all unit tests. Change-Id: I99e86d23320aca8900fef011da23a9d34e42751e
* Remove some unused codeMarcos Paulo de Souza2014-07-291-1/+0
| | | | | | | Change-Id: Ib1fb5108a858c35a5bbe8ba865e15660639725e3 Reviewed-on: https://gerrit.libreoffice.org/10593 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
* fdo#79578: Properly update formulas upon change in db collection.Kohei Yoshida2014-07-281-6/+2
| | | | | | Update it to handle formula groups correctly. Change-Id: I009a7fcf3d3fb17ef6951c50534ca6bc1fffc259
* fdo#81309: Adjust references during sort.Kohei Yoshida2014-07-131-13/+22
| | | | Change-Id: I2b98610f6b774400ecfaffe2905201c27fcab33f
* fix incorrect ScAnnotationsObj UNO API, fdo#80551Markus Mohrhard2014-06-271-0/+1
| | | | | | | The used index was a sheet local index but the returned position was from a global container. Change-Id: I0b9e9e7e9618c72daf8e6417bca9d3a1cb23abb1
* remove whitespaceMarkus Mohrhard2014-06-251-6/+0
| | | | Change-Id: Ib15413e73409cc33de01fa92a47b9d1237cfc4b2
* new compilerplugin returnbyrefNoel Grandin2014-06-241-2/+2
| | | | | | | | | | | | | | Find places where we are returning a pointer to something, where we can be returning a reference. e.g. class A { struct X x; public X* getX() { return &x; } } which can be: public X& getX() { return x; } Change-Id: I796fd23fd36a18aedf6e36bc28f8fab4f518c6c7
* fdo#71076: Write test for this.Kohei Yoshida2014-06-201-2/+3
| | | | | | | This was actually just one element of all that contributed to this bug. Unfortunately it's a bit hard to test the others. Change-Id: I7a0d88c0b829e7b7859aecfc20df87f6837ecb4a