summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell/docsh5.cxx
AgeCommit message (Collapse)Author
2017-05-10partial revert of "loplugin:checkunusedparams in sc(part4)"Noel Grandin
<erAck> noelgrandin: actually that "also fix bug in ScDocShell::DBAreaDeleted" with 4d047221945b34a9023d852bbd19a2a24a7f54c3 wasn't a bug because the aDocument.RemoveFlagsTab() call with ScMF::Auto removes the AutoFilter which is in the first row of the DB-Area <erAck> noelgrandin: now it unnecessarily processes the entire range <noelgrandin> erAck, does that also apply to the PostPaint call? <erAck> noelgrandin: should so, as only the row with the AF-buttons needs to be repainted <noelgrandin> erAck, will revert that part Change-Id: I29b9ee4e1b6517a01bf67f8efc09217d9df453a5
2017-05-10loplugin:checkunusedparams in sc(part4)Noel Grandin
also fix bug in ScDocShell::DBAreaDeleted which has been there ever since it's initial commit in commit 9ae5a91f7955e44d3b24a3f7741f9bca02ac7f24 Author: Jens-Heiner Rechtien <hr@openoffice.org> Date: Mon Sep 18 16:07:07 2000 +0000 initial import Change-Id: Ifc8d6dec4843c668404fdf1ca1a9e521f73132d5 Reviewed-on: https://gerrit.libreoffice.org/37459 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-10loplugin:checkunusedparams in sc(part1)Noel Grandin
Change-Id: I8c4fca704fe8ed6f861728cc3f3782c676aba67c Reviewed-on: https://gerrit.libreoffice.org/37435 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-25tools: svstream.hxx needs only errcode.hxx & not errinf.hxxChris Sherlock
Change-Id: Ia28e35ae5af4f601e9a586a3deffbcd61702b0ca Reviewed-on: https://gerrit.libreoffice.org/36896 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-04-06Fix typosAndrea Gelmini
Change-Id: I9e7f7fa6a8b89304883a843f9fb0b905f5e8a8a4 Reviewed-on: https://gerrit.libreoffice.org/36100 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-04tdf#39468 Translate German commentsJens Carl
First run of translating German comments and terms in sc/ Change-Id: I9802df334259edcea148bead95cc98a8057b91a1 Reviewed-on: https://gerrit.libreoffice.org/35994 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-03-29Translate German comments in sc/source/ui/docshell/Johnny_M
Change-Id: Ic1a312677fac1b729538dd4463febac63e7204e5 Reviewed-on: https://gerrit.libreoffice.org/35343 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-03-07Resolves: tdf#102777 broadcast SC_TAB_INSERTED when inserting scenarioEike Rathke
So ScViewData::maTabData gets an entry added which deleting the scenario can remove again. Change-Id: I166baeff5408ef67faef41364515a13b8d4610bb
2017-02-16convert ScGetDBSelection to scoped enumNoel Grandin
and drop unused SC_DBSEL_SHRINK_TO_SHEET_DATA enumerator Change-Id: I083f65fba450fd0a9abebcaaae3b18c8d0b6c808
2017-02-13tdf#76183: refresh objects' positions on optimal height recalcMike Kaganski
Since commit b10833d4db6046f2d32ea44a60cb19a626d80447, it's required to detect when objects' placement should be adjusted, and call SetDrawPageSize manually. Unit test included Change-Id: I933ba4802b212400cc47ed0fb7e1f8f44049bb81 Reviewed-on: https://gerrit.libreoffice.org/34165 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
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-10-05Remove _TYPED suffix from tools/link.hxx macrosStephan Bergmann
...which was introduced with 3ead3ad52f9bb2f9d1d6cf8dfc73a0a25e6778ed "Gradually typed Link" to distinguish the new, typed versions from the old, untyped ones, but is no longer necessary since 382eb1a23c390154619c385414bdbe6f6e461173 "remove untyped Link<>" removed the old versions. Change-Id: I494025df486a16a45861fcd8192dfe0275b1103c
2016-09-26convert PAINT constants to typed_flagsNoel Grandin
Change-Id: Ie0a02c87ca225ee7a8b8e76a2498836836e79c82
2016-09-23perf: eliminate SfxSimpleHint and move to SfxHint, tdf#87101 relatedEike Rathke
There were over 150 places in *::Notify() functions that did some dynamic_cast<SfxSimpleHint*> of which ~98% were unnecessary because the base class SfxHint passed was an SfxSimpleHint anyway. dynamic_cast operations come with quite some cost, so avoid if possible. Specifically for ScFormulaCell::Notify() that created a bottleneck in scenarios where cells were notified that already handled a previous notification. In mass operations doing the dynamic_cast before it could be decided whether having to act on it or not this made 2/3 of all time spent in the Notify() call. To get rid of that rename/move SfxSimpleHint to SfxHint and let classes derive from SfxHint instead of SfxSimpleHint. This comes only with a slight cost that an additional sal_uInt32 is transported in such hints, initialized to 0, but this is neglectable compared to the huge gain. For the rare cases where a Notify() actually expects both, an SfxHint (formerly SfxSimpleHint) and a derived hint, this changed order of the dynamic_cast involved so the simple SfxHint::GetId() is handled last. Modules using such combinations can further optimize by treating the simple SfxHint::GetId() first once verified that none of the other derived hints use an ID not equal to zero respectively none of the ID values the simple hint uses. Change-Id: I9fcf723e3a4487ceb92336189d23a62c344cf0ce Reviewed-on: https://gerrit.libreoffice.org/29205 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-08-21coverity#1371453 try silence Wrapper object use after freeCaolán McNamara
Change-Id: I707debb1dab694b3de2942e1c8b9a1bd7ec2d283
2016-07-26sc: convert SC_SCENARIO_.. defines typed flags ..Jochen Nitschke
ScScenarioFlags add ScScenarioFlags::NONE for 0. replace uses of '-= flag' with '&= ~flag'. Change-Id: I003c0ca1f59b060f52935fec8bb6282fd9981805 Reviewed-on: https://gerrit.libreoffice.org/27464 Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
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-23clang-tidy clang-analyzer-deadcode.DeadStoresNoel Grandin
Change-Id: I7113a13ac36db5beef3a17e9849c1f5506df2374 Reviewed-on: https://gerrit.libreoffice.org/25194 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-24loplugin:constantparam in scNoel Grandin
Change-Id: I8608a6cb47972e9b838cc5ea431863348758ded0
2016-03-23loplugin:constantparam in scNoel Grandin
Change-Id: I437367b8c6960db730a69c020ba82792a9170d01
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
Change-Id: I765d2a600f9c57da50c85354688e3ae796750d94
2015-10-28com::sun::star->css in scNoel Grandin
Change-Id: I7774890f46f9343e944e34db27af8bce3b1d0915
2015-10-26convert InsertDeleteFlags to use o3tl::typed_flagsNoel Grandin
Change-Id: I3f6a97195d3364b2a0964f62f11e9c0de9493d64
2015-09-02TableRef: introduce ScDBDataPortion enumEike Rathke
... to replace * bool bStartonly=false with ScDBDataPortion::AREA * bool bStartonly=true with ScDBDataPortion::TOP_LEFT and provide means to look at header row only with ScDBDataPortion::HEADER as needed for TableRef. Change-Id: I9f6affd04c15a6204193687b2379160eb975f56e
2015-08-14loplugin: defaultparamsNoel Grandin
Change-Id: I4f635044b93f74fb397a4e47535e91160fce456c
2015-07-17Resolves: tdf#77479 do not reset AutoFilter range for temporary operationsEike Rathke
Change-Id: I22f5e74ca91eb188ce669762927dd25604a256ff
2015-07-17do not reset existing HasHeader on anonymous database rangeEike Rathke
tdf#88402 related Change-Id: I401c67da383227496e9d8c2b2ed0671e2a2796f2
2015-07-17inherit existing HasHeader when expanding/shrinking anonymous database rangeEike Rathke
tdf#88402 related Adding columns, invoking Data->Sort, Cancel now still does not lose a HasHeader set in a previous Sort dialog. Change-Id: I1388b8f6a1964fb584f1826751072ba648f53ab7
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-05-05Use typed Timer::SetTimeoutHdl LinkStephan Bergmann
Change-Id: Iaaf0c93e5b28c0f7dbe4f02eda8beeae30708100
2015-04-10Automated conversion of VclPtr construction to use Instance template.Michael Meeks
Change-Id: I8be9141b9653e73ebd23a5a3d810f240c376f97e
2015-04-10first half of non-scriptable, Instance constructor conversion.Michael Meeks
Change-Id: If73bb41bfa805e22609748f25971724b4778edb3
2015-04-10vclwidget: fixup locally allocated vcl::Window objectsNoel Grandin
They need to be wrapped in ScopedVclPtr in order to be disposed properly. Change-Id: Ib64dba353774f54711e4de7f5d15d859c6a4dc7e
2015-04-09vclwidgets: wrap all vcl::Window subclasses allocated on stack in VclPtrNoel Grandin
Change-Id: Ia8b0d84bbf69f9d8f85505d019acdded14e25133 Conflicts: sw/qa/tiledrendering/tiledrendering.cxx
2014-12-18sc: Use appropriate OUString functions on string constantsStephan Bergmann
Change-Id: Ifc00b2045de0d356e175733b0f03ab0c90083039
2014-10-31coverity#735811 Dereference after null checkEike Rathke
We always have a DB collection. Change-Id: I8933be3a01b4c2e63b852361d5d2438e6fca4d05
2014-10-23Fraction: Revert "fdo#81356: convert Fraction to boost::rational<long> - wip"Jan Holesovsky
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
2014-10-23Fraction: Revert "fdo#84854 it seems long is not enough on 32 bit"Jan Holesovsky
This reverts commit 582ef22d3e8e30ffd58f092d37ffda30bd07bd9e. Conflicts: svx/source/svdraw/svdedtv1.cxx svx/source/svdraw/svdibrow.cxx sw/source/filter/ww1/w1filter.cxx Change-Id: I80abc7abdeddc267eaabc9f8ab49611bb3f8ae83
2014-10-16fdo#84854 it seems long is not enough on 32 bitDavid Tardon
Fraction used BigInt internally for computations, rational does nothing like that. Change-Id: I3e9b25074f979bc291208f7c6362c3c40eb77ff5
2014-10-09fdo#81356: convert Fraction to boost::rational<long> - wipJuan Picca
* 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>
2014-09-30sc: std::auto_ptr -> std::unique_ptrStephan Bergmann
Change-Id: I25468d578de597ff9aeba3ffc850c630fa532767
2014-09-23fdo#82577: Handle WindowNoel Grandin
Put the VCL Window class in the vcl namespace. Avoids clash with the X11 Window typedef. Change-Id: Ib1beb7ab4ad75562a42aeb252732a073d25eff1a
2014-07-28fdo#79578: Properly update formulas upon change in db collection.Kohei Yoshida
Update it to handle formula groups correctly. Change-Id: I009a7fcf3d3fb17ef6951c50534ca6bc1fffc259
2014-07-11new loplugin: externalandnotdefinedNoel Grandin
Find "missing headers," where a function is declared directly in the .cxx (as extern) and not defined, and should arguably instead be declared in an include file. Change-Id: I6d83ee432b2ab0cd050aec2b27c3658d32ac02a2
2014-06-27remove SFX_APP() macro that was a mer wrapper for SfxGetApp()Norbert Thiebaud
Change-Id: I480a789c767dd671775c9d70d96bf71908f21f5b
2014-06-25remove whitespaceMarkus Mohrhard
Change-Id: Ib15413e73409cc33de01fa92a47b9d1237cfc4b2
2014-06-24new compilerplugin returnbyrefNoel Grandin
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
2014-04-23sc: sal_Bool->boolNoel Grandin
Change-Id: I70aad0b38979f45a313b8ac36890fb6c64d11bb0
2014-04-06whitespace cleanup in scMarkus Mohrhard
Change-Id: Id1dcadcac179c52977e48a6912ce4d5fd542f60c
2014-03-12fdo#75977: Clear sheet deleted flags for affected references when undoing.Kohei Yoshida
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. Change-Id: If0de5dc1737a2722b6d61a87644b10a4f921edc5