summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell/docsh5.cxx
AgeCommit message (Collapse)Author
2021-02-01Don't bother shrinking row height when changing just one row interactivelyTor Lillqvist
I.e. when interactively entering a new value. This used to happen at least for a sample document in .xlsx format for cells with automatic wrap turned on. After entering a value, the row height was annoyingly shrunk by a few pixels, which looked weird and pointless, and caused unnecessary invalidation thrash in the online collaborative editing context. We assume that the call to ScDocFunc::SetNormalString() in ScViewFunc::EnterData() is the result of interactivity. Change-Id: I3c77f7fb4e575f02e1dd7cdc18f2919f5eb3426e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110245 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-11-11sc: rowcol: tdf#50916 convert mark data structuresNoel Grandin
Change-Id: I9b706c9bcc2925f72cc024142ffe72af5ddea82a Reviewed-on: https://gerrit.libreoffice.org/82419 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-23sc: rowcol: tdf#50916 convert docshellNoel Grandin
Change-Id: I52c641bfba397134ad5ed2a9e8005f8959092303 Reviewed-on: https://gerrit.libreoffice.org/81381 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-21reference childwins are all weldedCaolán McNamara
Change-Id: I050b4bdff4eaa645316538725c69e83bee4a90c5 Reviewed-on: https://gerrit.libreoffice.org/74526 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-04-08tdf#42949 Fix IWYU warnings in include/sfx2/[t-z]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ib3252828385d1dc8faf48a428b1593199647a679 Reviewed-on: https://gerrit.libreoffice.org/70383 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-27tdf#42949 Fix IWYU warnings in sc/source/ui/d*/*cxxGabor Kelemen
Also additions were needed in include/sfx2/msg.hxx to avoid build breakage Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I259ff10aaa5d044d4b11f9041174765d5a5f7dc7 Reviewed-on: https://gerrit.libreoffice.org/68364 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-01-29o3tl::make_unique -> std::make_unique in scGabor Kelemen
Since it is now possible to use C++14, it's time to replace the temporary solution with the standard one Change-Id: Ib69a4a2a08b1edbc0f40beac00f7f68075b479a1 Reviewed-on: https://gerrit.libreoffice.org/66967 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-18use unique_ptr in scNoel Grandin
Change-Id: I14ccb215e895b607c7244b420ee2cbaea8112b15 Reviewed-on: https://gerrit.libreoffice.org/66549 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-26tdf#42949 Fix IWYU warnings in include/unotools/*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I444c43b9d549977039f25bec2b5bf666c3e15e0e Reviewed-on: https://gerrit.libreoffice.org/62041 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-10-09use unique_ptr in SfxUndoManager::AddUndoActionNoel Grandin
Change-Id: I11483e3cece12a7373f4276972b4c899edf1ce15 Reviewed-on: https://gerrit.libreoffice.org/61566 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-08use more std::unique_ptr in ScDBCollection::NamedDBsNoel Grandin
Change-Id: I5825208435fd179e9515e731a24a6e5bf1c94431 Reviewed-on: https://gerrit.libreoffice.org/61436 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-06use more std::unique_ptr in ScUndoMoveTab and ScUndoCopyTabNoel Grandin
Change-Id: Id69d87369d2a73b00e4ed6159047eef3135722e1 Reviewed-on: https://gerrit.libreoffice.org/61432 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-31pass ScDBData by std::unique_ptrNoel Grandin
Change-Id: Ia16bde5b428be6a39ff7e3f6052258652ea0f07a Reviewed-on: https://gerrit.libreoffice.org/59789 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-31pass ScDocument by ScDocumentUniquePtrNoel Grandin
Change-Id: I6ce82c6f061c7f01a5584230c26e9bf20c7f07ca Reviewed-on: https://gerrit.libreoffice.org/59788 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-28loplugin:useuniqueptr pass ScDocument by unique_ptr in undo codeNoel Grandin
Change-Id: Ib05638865a42ad37c3382714e1790c7035ed8ebf Reviewed-on: https://gerrit.libreoffice.org/59638 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-28loplugin:useuniqueptr in ScUndoDBDataNoel Grandin
Change-Id: I6107079f8474a2ddc76a9cb6e93552d95861dc6c Reviewed-on: https://gerrit.libreoffice.org/56563 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-28loplugin:useuniqueptr in ScDocShellNoel Grandin
Change-Id: I6d4d4899670d8c3254f8c4337a14ba2bb937a2bf Reviewed-on: https://gerrit.libreoffice.org/56555 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-26loplugin:useuniqueptr in ScConsolidateParamNoel Grandin
Change-Id: I451315b844e759db3084220a1c889f47775189e3 Reviewed-on: https://gerrit.libreoffice.org/56331 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-13Fix typosAndrea Gelmini
Change-Id: I9ae4a9d821946591060ceadb45af05c27560668b Reviewed-on: https://gerrit.libreoffice.org/55410 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-06-03sc: prefix members of ScDocShellHenry Castro
Change-Id: I7c2a4e5e850b26da515719f7df869f12c49b0ad3 Reviewed-on: https://gerrit.libreoffice.org/55148 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Henry Castro <hcastro@collabora.com>
2018-05-16loplugin:constantparamNoel Grandin
Change-Id: I0110e0c662004456e4bc8f8082e2e2fea59e0148 Reviewed-on: https://gerrit.libreoffice.org/54385 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-12Replace ScGlobal::GetRscString with simple ScResId callsGabor Kelemen
After the gettext migration there is no point to have two APIs for reading the same .mo file. This patch is for sc/source/ui/[a-d]* for easier review. Change-Id: If268fb87ab09ca430a5bdb5cdd53a233e9158bfe Reviewed-on: https://gerrit.libreoffice.org/54134 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-03-28loplugin:useuniqueptr in ScColumnNoel Grandin
Change-Id: Iff6c68a29b9e7660132cbe4e556802b0f63706f0 Reviewed-on: https://gerrit.libreoffice.org/51904 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-22loplugin:useuniqueptr in ScDocumentNoel Grandin
and fix bug where we were deleting a pointer to an object we did not own via pFormatExchangeList Change-Id: I488c679734c48bd21bc6be04837e037e97550647 Reviewed-on: https://gerrit.libreoffice.org/51668 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-10don't use heap for elements in ScRangeListNoel Grandin
no need to store small objects like this out of line. Also - add move constructor and move assignment operator - drop Assign method since it now has the same signature as push_back Change-Id: I9a8647d3a11f24166a83d399a358a2bce3b2cb79 Reviewed-on: https://gerrit.libreoffice.org/50899 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2018-02-25convert remaining InfoBox to weld::MessageDialogCaolán McNamara
Change-Id: I91d828e38d96264cf4a76f30940942556b8f78d8 Reviewed-on: https://gerrit.libreoffice.org/50205 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-15Resolves: tdf#115046 don't restore a sheet-local DBData from temporaryEike Rathke
And don't clear AutoFilter button flags in the new temporary range. Change-Id: I273de1e04632ac99c267523b2843665d257fd361
2017-12-07loplugin:constparamsNoel Grandin
Change-Id: Ia322ecf8f80b28c58ec33d17ca9607401a92534b Reviewed-on: https://gerrit.libreoffice.org/45959 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-01Simplify OUString and return earlyMatteo Casalin
Change-Id: I783b3fda560cddbbf5c196d20db6323972f62402
2017-10-23loplugin:includeform: scStephan Bergmann
Change-Id: I2ed763e0584a188032c80fde60890de3c6985cbd
2017-07-21migrate to boost::gettextCaolán McNamara
* all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl * all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string") * ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching MODULE .mo files * UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui goes from l10n target to normal one, so the res/lang.zips of UI files go away * translation via Translation::get(hrc-define-key, imbued-std::locale) * python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there to keep finding the .hrc file uniform) so magic numbers can go away there * java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation mechanism * en-US res files go away, their strings are now the .hrc keys in the source code * remaining .res files are replaced by .mo files * in .res/.ui-lang-zip files, the old scheme missing translations of strings results in inserting the english original so something can be found, now the standard fallback of using the english original from the source key is used, so partial translations shrink dramatically in size * extract .hrc strings with hrcex which backs onto xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap * extract .ui strings with uiex which backs onto xgettext --add-comments --no-wrap * qtz for gettext translations is generated at runtime as ascii-ified crc32 of content + "|" + msgid * [API CHANGE] remove deprecated binary .res resouce loader related uno apis com::sun::star::resource::OfficeResourceLoader com::sun::star::resource::XResourceBundleLoader com::sun::star::resource::XResourceBundle when translating strings via uno apis com.sun.star.resource.StringResourceWithLocation can continue to be used Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
2017-07-14use more OUString::operator== in scNoel Grandin
Change-Id: I1a7691fe59e5e93c15bd812f03366da814f9f3db Reviewed-on: https://gerrit.libreoffice.org/39900 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-13loplugin:oncevar: empty strings: scStephan Bergmann
Change-Id: I8eca50560d9ce0a3be5ffe6a4a88cb0de5d5d451
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>