summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell/docsh5.cxx
AgeCommit message (Collapse)AuthorFilesLines
9 dayshelp msvc -analyzer out wrt C6011 Dereferencing NULL pointerCaolán McNamara1-1/+8
Change-Id: Ied22e4ea805ab5a94f89a71438962bdd6d118771 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167548 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-01-03tdf#114441 Convert use of sal_uLong to better integer typesgilssonn1-6/+6
Reasoning: + For clipcontent.cxx, column3.cxx, dbdocutl.cxx, documen8.cxx,formulacell.cxx, patattr.cxx, stlpool.cxx, table2.cxx, table3.cxx and validat.cxx: + sal_uLong variables and functions are being initialized with/assigned/returning sal_uInt32 or size_t values + For column2.cxx: + The type of the return values of the `getWeight` function are size_t + For document.hxx, documen2.cxx, docsh.hxx, docsh5.cxx, viewfun2.cxx and globstr.hrc + `ScDocument::TransferTab`'s return variable's value is constrained to be either 0 or 1; which is better represented as a boolean Change-Id: If556f7fcc29f7e325618721959ea4e3615b2e755 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154408 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2023-12-28Decouple ScPatternAttr from SfxItemPoolArmin Le Grand (allotropia)1-2/+2
ScPatternAttr is traditionally derived from SfxPoolItem (or better: SfxSetItem) and held in the ScDocumentPool as Item. This is only because of 'using' the 'poolable' functionality of the Item/ItemSet/ItemPool mechanism. Lots of hacks were added to sc and Item/ItemSet/ ItemPool to make that 'work' which shows already that this relationship is not optimal. It uses DirectPutItemInPool/DirectRemoveItemFromPool to do so, also with massive overhead to do that (and with not much success). The RefCnt in the SfxPoolItem that is used for this never worked reliably, so the SfxItemPool was (ab)used as garbage collector (all Items added and never removed get deleted at last for good when the Pool goes down). For this reasons and to be able to further get ItemSets modernized I changed this. I did two big changes here: (1) No longer derive ScPatternAttr from SfxItemSet/ SfxSetItem, no longer hold as SfxPoolItem (2) Add tooling to reliably control the lifetime of ScPatternAttr instances and ther uniqueness/ reusage for memory reasons It is now a regular non-derived class. The SfxItemSet formally derived from SfxSetItem is now a member. The RefCnt is now also a member (so independent from size/data type of SfxPoolItem). All in all it's pretty much the same size as before. To support handling it I created a CellAttributeHelper that is at/owned by ScDocument and takes over tooling to handle the ScPatternAttr. It supports to guarantee the uniqueness of incarnated ScPatternAttr instances for a ScDocument by providing helpers like registerAndCheck and doUnregister. It hosts the default CellAttribute/ ScPatternAttr. That default handling was anyways not using the standard default-handling of Items/Pools. I adapted whole SC to use that mainly by replacing calls to DirectPutItemInPool with registerAndCheck and DirectRemoveItemFromPool with doUnregister, BUT: This was not sufficient, the RefCnt kept to be broken. For that reason I decided to also do (2) in this change: I added a CellAttributeHolder that owns/regulates the lifetime of a single ScPatternAttr. Originally it also contained the CellAttributeHolder, but after some thoughts I decided that this is not needed - if there is no ScPatternAttr set, no CellAttributeHolder is needed for safe cleanup at destruction of the helper. So I moved/added the CellAttributeHolder to ScPatternAttr where it belongs more naturally anyways. The big plus is that CellAttributeHolder is just one ptr, so not bigger than having a simple ScPatternAttr*. That way, e.g. ScAttrEntry in ScAttrArray did not 'grow' at all. In principle all places where a ScPatternAttr* is used can now be replaced by using a CellAttributeHolder, except for construction. It is capable to be initialized with either ScPatternAttr instances from the heap (it creates a copy that then gets RefCounted) or allocated (it supports ownership change at construction time). Note that ScAttrEntry started to get more a C++ class in that change, it has a constructor. I did not change the SCROW member, but that should also be done. Also made registerAndCheck/doUnregister private in CellAttributeHelper and exclusively used by CellAttributeHolder. That way the RefCnt works, and a lot of code gets much simpler (check ScItemPoolCache, it's now straightforward) and safer and ~ScPatternAttr() uses now a hard assert(!isRegistered()); which shows that RefCnt works now (the 1st time?). There can be done more (see ToDo section below) but I myself will concentrate on getting ItemSets forward. This decoupling makes both involved mechanisms more safe, less complex and more stable. It also opens up possibilities to further optimize ScPatternAttr in SC without further hacking Item/ItemSet/ItemPool stuff. NOTE: ScPatternAttr *should* be renamed to 'CellAttribute' which describes what it is. The experiencd devs may know what it does, but it is a hindrance for understanding for attacting new devs. I already used now names like CellAttributeHelper/CellAttributeHolder etc., but abstained from renaming ScPatternAttr, see ToDo list below. SfxItemSet discussion: ScPatternAttr still contains a SfxItemSet, or better, a SfxSetItem. For that reason it still depends on access to an SfxItemPool (so there is acces in CellAttributeHelper). This is in principle not needed - no Item (in the range [ATTR_PATTERN_START .. ATTR_PATTERN_END]) needs that. In principle ScPatternAttr could now do it's own handling of those needed Items, however this might be done (linear array, hash-by-WhichID, ...). The Items get translated to and from this to the rest of the office anyways. Note that *merging* of SfxItemSets is *still* needed what means to have WhichID slots in SfxItemState::DONTCARE, see note in ScPatternAttr::ScPatternAttr about that. And there is also the Surrogates stuff which would have to be checked. The other extreme is to use SfxItemSet *more*, e.g. directly derive from SfxItemSet what would make stuff easier, maybe even get back to using the 'regular' Items like all office, I doubt that that would be much slower, so why...? Also possible is to remove that range of Items exclusively used by ScPatternAttr from ScDocumentPool *completely* and create an own Pool for them, owned by CellAttributeHelper. That Pool might even be static global, so all SC Docs could share all those Items - maybe even the ScPatternAttr themselves (except the default per document). That would remove the dependency of ScPatternAttr from a Pool completely. ToDo-List: - rename ScPatternAttr to CellAttribute or similar - use SfxItemSetFixed with range [ATTR_PATTERN_START .. ATTR_PATTERN_END] instead of regular SfxItemSet (if the copy-construtor works now...?) - maybe create own/separate Pool for exclusive Items - make ScAttrEntry more a C++ class by moving SCROW to the private section, add get/set methods and adapt SC Had to add some more usages of CellAttributeHolder to the SC Sort mechanism, there were situations where the sorted ScPatternAttr were replaced in the Table, but the 'sorted' ones were just ScPatternAttr*, thus deleting the valid ones in the Table already. Using CellAttributeHolder makes this safe, too. Added a small, one-entry cache to CellAttributeHelper to buffer the last found buffered ScPattrnAttr. It has a HitRate of ca. 5-6% and brings the UnitTest testSheetCellRangeProperties from 0m48,710s to 0m37,556s. Not too massive, but erery bit counts :-) Also shows that after that change optimizations in the now split functionality is possible and easy. Change-Id: I268a7b2a943ce5ddfe3c75b5e648c0f6b0cedb85 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161244 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-07-12Fix typoAndrea Gelmini1-1/+1
Change-Id: Ie93cc4651f51cc239d3a739c76a71c79b9c3dfad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154338 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-07-11tdf#123026 xlsx import: recalc optimal row height on importJustin Luth1-0/+10
This patch depends on the previous patch for this bug report, which allows each sheet to hold its own default row height. The given height for the row might not be enough to fit the content. If the row is set to use optimal height, that will be corrected as soon as the row is edited. Obviously, it should not require an edit to be correct on FILEOPEN, so this patch recalculates after loading the document. This might have a very negative effect on the time needed to open a file. I couldn't duplicate the XLS method because Library_scfilt.mk doesn't link to ScSizeDeviceProvider. The existing UpdateAllRowHeights wasn't designed to allow any performance improvements, so I made a new one. The new one is based on the newer ScDocRowHeightUpdater class - so perhaps the older method can be phased out. This new UpdateAllRowHeights could replace the XLS bSetRowHeights clause - with hopefully some performance benefit. I'm not sure I'm ready for the regression hate that would come from the inevitable performance implications. Testing however doesn't suggest a huge slowdown. I tested with time make sc.check before the fix I was getting 16m 4s +- 10s after the fix I was getting 16m 25s +- 10s Specific test showing the need for these patches: make CppunitTest_sc_subsequent_filters_test2 \ CPPUNIT_TEST_NAME=testTdf123026_optimalRowHeight Impacted unit tests (without the previous patch) are documented in earlier patchsets. make CppunitTest_sc_subsequent_export_test \ CPPUNIT_TEST_NAME=testMiscRowHeightExport make CppunitTest_sc_subsequent_export_test2 make CppunitTest_sc_jumbosheets_test CPPUNIT_TEST_NAME=testTdf134553 Change-Id: I6d020c1a5137dd4f05e20e82b1764a102b7f56d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140260 Reviewed-by: Justin Luth <jluth@mail.com> Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-17Related: tdf#142635 Make ScDocShell reference ScDocument by shared_ptrMike Kaganski1-112/+112
Required for eventual sharing of the document between the shell and other pieces having different lifetime, as required to fix tdf#142635. Change-Id: I9e69bd2e3b57d7712526f51161e7e725d4af8068 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134383 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-03-03improve ScMark* classes a bitLuboš Luňák1-2/+1
Bin pointless empty destructors, make trivial functions inline, return value by simply returning it. Change-Id: Ia71e73262802bbe6b022ca4bafb2b958ffdf39f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130915 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-09-17rather return ref from getCharClassPtrNoel Grandin1-1/+1
since we never return a nullptr, and rename to reflect that Change-Id: I5b8f0aba6ce387bb0fe1ce6088ba2685d2ade7f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122209 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-05Pass context and resource string down to boost::locale separatelyNoel Grandin1-2/+2
because this is often on a hot path, and we can avoid the splitting and joining of strings like this. Change-Id: Ia36047209368ca53431178c2e8723a18cfe8260a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119220 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-01no need to allocate these on the heapNoel Grandin1-3/+3
Change-Id: I6eb3853883c724b5cb28bbf4debf6f56a587ff88 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116515 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-02Don't bother shrinking row height when changing just one row interactivelyTor Lillqvist1-1/+1
This reverts dca0374fb1edbd9bdeeaadda3f1866ce66b3a778 and instead tries to achieve the same without using a flag in ScGlobal. How reliable that is I don't know. See https://gerrit.libreoffice.org/c/core/+/110245 for discussion. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110245 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Change-Id: I2a7aa5bf3d29e5fd071e2f1cab628b923b5b6754 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110285 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2020-11-27tdf#42949 Fix new IWYU warnings in directory sc/Gabor Kelemen1-1/+0
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I217817e2e4a42b096f5a7fb6344568c10d69aab2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106078 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-10-20use tools::Long in scNoel1-1/+1
Change-Id: I8f37a8d1174ed816df971b8cee036d4e88d4a7fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104526 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-24ScCellFormat::GetString never called with a null ScDocument*Caolán McNamara1-3/+3
and similar, allowing a few redundant null checks to be dropped Change-Id: Ice0d6d57df112a09d3e1af3d34126b3519529daf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103278 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-17Tokens2RangeStringXML ctor never called with null ScDocument*Caolán McNamara1-1/+1
and some more similar Change-Id: Ia92791f4d225352fdb0992e1f2fe4652fe8d3504 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102904 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-16TransferDrawPage always dereferences its ScDocument* argumentCaolán McNamara1-1/+1
Change-Id: Ie2639fc10f1bf6a5c046e4e075337b117a8f6144 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102837 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-16TransferTab always dereferences its ScDocument* argumentCaolán McNamara1-1/+1
Change-Id: I68b1fb4cda82a8a334e60b43216cfa74534e4a28 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102836 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-30loplugin:flatten in sc/uiNoel Grandin1-22/+22
Change-Id: I4e12da123924b1036c1348ad1b04eef1826ae26a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99703 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-30pass ScSheetLimits aroundNoel Grandin1-2/+2
instead of MAXROW, MAXCOL. In preparation for more conversion work that needs to be done to make jumbo sheets work. Change-Id: I4698b8fe111e060ae2a965afc7276b7e7bfb482a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95153 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-22ScGlobal - change direct access to a static ptr for a getterTomaž Vajngerl1-1/+1
pLocalData and pCharClass static veriables on ScGlobal are always set from SvtSysLocale on init, probably for "faster" access. This can just be made simpler with access through a getter, so this introduces a getter for ScGlobal::getCharClassPtr and ScGlobal::getLocaleDataPtr, where the access is made directly to SvtSysLocale instance. In addition all the usages needed to be fixed, which is all over the calc module. Change-Id: Ie047b158094e25bbaa2aba15074d7998d9541787 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89249 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-12-02use weld::WaitObjectCaolán McNamara1-1/+0
Change-Id: Ib2ad0f0fe17c4db66693ef91e3cdbc8511eb8314 Reviewed-on: https://gerrit.libreoffice.org/84166 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-11-25sc: rowcol: tdf#50916 convert segmenttreeNoel Grandin1-2/+2
Change-Id: Ia05d1bc60a76a8bbf65afe5b0459ce213be9bfbe Reviewed-on: https://gerrit.libreoffice.org/83646 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-11sc: rowcol: tdf#50916 convert mark data structuresNoel Grandin1-2/+2
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 Grandin1-12/+12
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 McNamara1-12/+9
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 Kelemen1-0/+2
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 Kelemen1-1/+0
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 Kelemen1-10/+9
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 Grandin1-4/+4
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 Kelemen1-0/+1
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 Grandin1-8/+8
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 Grandin1-1/+1
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 Grandin1-2/+2
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 Grandin1-4/+4
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 Grandin1-4/+4
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 Grandin1-2/+2
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 Grandin1-4/+6
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 Grandin1-9/+5
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 Grandin1-11/+11
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 Gelmini1-1/+1
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 Castro1-114/+114
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 Grandin1-1/+1
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 Kelemen1-6/+7
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 Grandin1-1/+1
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 Grandin1-3/+3
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 Grandin1-1/+1
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 McNamara1-12/+21
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 Rathke1-3/+18
And don't clear AutoFilter button flags in the new temporary range. Change-Id: I273de1e04632ac99c267523b2843665d257fd361
2017-12-07loplugin:constparamsNoel Grandin1-1/+1
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 Casalin1-14/+6
Change-Id: I783b3fda560cddbbf5c196d20db6323972f62402