summaryrefslogtreecommitdiff
path: root/sc/source/ui/undo/undoblk.cxx
AgeCommit message (Collapse)Author
2018-08-27tdf#118308: Incorrect Paste Special dialog when ...Henry Castro
pasting content from another cell In tiled rendering case (headless) each window has its own clipboard, otherwise exists a unique clipboard (UNO service). Change-Id: I7d5d0b085faeaffa3fc0a80914fbe9349f4aa402 Reviewed-on: https://gerrit.libreoffice.org/56508 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com> Reviewed-on: https://gerrit.libreoffice.org/59630 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2018-08-27tdf#117228: crash in SfxItemSet::GetItemState...Henry Castro
(unsigned short, bool, SfxPoolItem const**) when pasting comment of closed document Re-work commit 1b7a8277aa3e9f73ccdf15e933a1ee3b42849a44. In the tiled rendering case, each view has its own clipboard, but not in desktop version which it has a shared clipboard each view. Change-Id: I57b1ab81e4c141829dbad899330e5c22204c384a Reviewed-on: https://gerrit.libreoffice.org/53922 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Reviewed-on: https://gerrit.libreoffice.org/59623 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2018-03-19lok - calc: outline and group handlingMarco Cecchetti
Change-Id: Ibb287468653bc381acf034dcb8531c5faf61aef3 Reviewed-on: https://gerrit.libreoffice.org/45356 Reviewed-by: Marco Cecchetti <mrcekets@gmail.com> Tested-by: Marco Cecchetti <mrcekets@gmail.com> (cherry picked from commit a2b70380c38dca4d075a0a866200096c6d9b4104)
2017-10-23loplugin:includeform: scStephan Bergmann
Change-Id: I2ed763e0584a188032c80fde60890de3c6985cbd
2017-10-21coverity#1401307 document checked 'Uncaught exception'Caolán McNamara
markup std::unique_ptr where coverity warns a dtor might throw exceptions which won't throw in practice, or where std::terminate is an acceptable response if they do Change-Id: Icc99cdecf8d8b011e599574f0a05b59efd1c65c2 Reviewed-on: https://gerrit.libreoffice.org/41561 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-02lok: sc: overlays and edit view misplaced by other view actionsMarco Cecchetti
The edit view, the cell cursor and the cell selection overlays become misplaced when another user inserts, deletes or resizes a row. The same is true for columns. The solution takes care of the current tab each view is displaying and of undo/redo actions. Change-Id: I24c94f774f3b18028c9356a904e1b14b07c5c61a Reviewed-on: https://gerrit.libreoffice.org/40016 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
2017-08-25loplugin:constparam in sc part6Noel Grandin
Change-Id: Ifbb921b820b7210e7f9539e45d4852764a1e9cbd Reviewed-on: https://gerrit.libreoffice.org/41563 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-14extend loplugin useuniqueptr to POD typesNoel Grandin
Change-Id: I6ff24f048bd8f75bf87a78b718f37b57855d4781 Reviewed-on: https://gerrit.libreoffice.org/39932 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-13loplugin:useuniqueptr in scNoel Grandin
Change-Id: I004e1f0292c8a40515880546574255ab835dbdbe Reviewed-on: https://gerrit.libreoffice.org/39875 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-10teach unnecessaryparen loplugin about identifiersNoel Grandin
Change-Id: I5710b51e53779c222cec0bf08cd34bda330fec4b Reviewed-on: https://gerrit.libreoffice.org/39737 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-03C++11 remove std::unary_function bases from functorsJochen Nitschke
std::unary_function is deprecated since C++11 and removed in C++17 90% done with regexp magic. removed obsolete <functional> includes. The std::unary_function base class was used in 3 places: * chart2/source/tools/DataSeriesHelper.cxx: lcl_MatchesRole is used in a std::not1 function helper who uses the members return_type and argument_type. - replace deprecated std::not1 with a lambda * chart2/source/tools/ModifyListenerHelper.cxx: lcl_weakReferenceToSame used the argument_type member in the operator() parameter. - inline the parameter type. * xmloff/source/chart/SchXMLExport.cxx: lcl_SequenceToMapElement used result_type and argument_type in operator(). - inline the types Also fix compile error with gcc about finding std::for_each. Change-Id: I073673beb01410c3108e7d0346d9e7d6b9ad2e2f Reviewed-on: https://gerrit.libreoffice.org/39358 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-06-26loplugin:oncevar in scNoel Grandin
Change-Id: Ice59e286debb6bd0eb692f2b2b0c2c5087c069c0 Reviewed-on: https://gerrit.libreoffice.org/39239 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-062nd arg of ApplySelectionFrame is always not nullCaolán McNamara
Change-Id: I50a5c9c3f0f2b7424fa1b9b27ceeee9ae9348413
2017-06-05clang-tidy performance-unnecessary-value-paramNoel Grandin
Change-Id: I6ed8c54c7c45931d91709cc818f2483c70197192 Reviewed-on: https://gerrit.libreoffice.org/38400 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-16lok: sc: invalidate col/row header on undo row/col operationsMarco Cecchetti
Change-Id: Ia0b2174cfcc3f2b3075e8f6eee1eb0f56b64db44 Reviewed-on: https://gerrit.libreoffice.org/37686 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
2017-05-16Revert "lok: sc: invalidate col/row header on undo row/col operations"Stephan Bergmann
This reverts commit 76d47e6f63e11d3509339ade6203757d63582d21, breaks the build.
2017-05-16lok: sc: invalidate col/row header on undo row/col operationsMarco Cecchetti
Change-Id: Ifabce9941541a615840163168af6fedaf54575cd Reviewed-on: https://gerrit.libreoffice.org/37243 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
2017-05-12remove unused uno::Reference varsNoel Grandin
found by temporarily marking Reference as SAL_WARN_UNUSED. Change-Id: I18809b62654467f890016adcc92576980ced393b Reviewed-on: https://gerrit.libreoffice.org/37511 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-13tdf#92650: handle overwritten references correctly in undo.Kohei Yoshida
Change-Id: Idc3fbd78f8163c97a9cd80a3ff474b6da0349353 Reviewed-on: https://gerrit.libreoffice.org/36496 Reviewed-by: Kohei Yoshida <libreoffice@kohei.us> Tested-by: Kohei Yoshida <libreoffice@kohei.us>
2017-04-08support undo of whole conditional format list, tdf#95617Markus Mohrhard
Change-Id: I3ff0ddb05f794064e33164c60cd1b4e6b89dbcca Reviewed-on: https://gerrit.libreoffice.org/36295 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-04-05tdf#39468 Translate German commentsJens Carl
Translate German comments and terms in sc/source/core and sc/source/ui Change-Id: I214565e73893688963d99c0f0ddfc356b5ad63be Reviewed-on: https://gerrit.libreoffice.org/36107 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-03-16drop GetId() from SfxUndoActionNoel Grandin
mostly so that the subclasses can use proper enum types for their own IDs. It turns out that nothing at the svl/sfx2 level needs an ID anyhow. Change-Id: I3c020aeafb812fa30d896216d4e3bc1a82cbfeab Reviewed-on: https://gerrit.libreoffice.org/35222 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-01typesafe wrappers for css::i18nutil::TransliterationModulesNoel Grandin
and related css::util::SearchOptions2 The TransliterationModules enum has it's constants spread over multiple UNO enum/constant-collections - TransliterationModules and TransliterationModulesExtra, which means that most code simply uses sal_Int32. Wrap them up into a better bundle so that only the lowest layer needs to deal directly with the UNO constants. Change-Id: I1edeab79fcc7817a4a97c933ef84ab7015bb849b Reviewed-on: https://gerrit.libreoffice.org/34582 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-22use std::unique_ptrCaolán McNamara
Change-Id: I11a58aa38f931c7912e2e5ac6df46f98e6bb681e Reviewed-on: https://gerrit.libreoffice.org/34539 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
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>
2017-01-19new loplugin: useuniqueptr: sc part 2Noel Grandin
Change-Id: I37936a297027313e2a8ae18f355567462955739e Reviewed-on: https://gerrit.libreoffice.org/33203 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-18tdf#104967 preserve isolated notes data in clipboard when closing documentEike Rathke
Change-Id: I0e263583e27c5103c0bb90e8fe00562e46a52d98
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-26init ScUndoRemoveMerge with range, tdf#92117 follow-upEike Rathke
So the original selection is restored after Undo. Change-Id: Ie549a0b62da469ee38270ae089ea5abf9a6868e3
2016-10-26Resolves: tdf#92117 create only one Undo for all UnmergeCells() callsEike Rathke
... during DeleteCells() and InsertCells(), instead of one Undo per UnmergeCells() call. And actually create Undo only if bRecord requested. Change-Id: I4f1747c3f42f36e16be81f989f0af5d048ba9d9f
2016-09-26convert PAINT constants to typed_flagsNoel Grandin
Change-Id: Ie0a02c87ca225ee7a8b8e76a2498836836e79c82
2016-09-26convert HASATTR constants to typed_flags_setNoel Grandin
Remove unused constant RTL. Inline PAINTEXT constant since it is only used in one place. Change-Id: I7b2c15e7579fc5bc475d00fe714f17592bd5e2a1
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-09-10loplugin:constantparam in scNoel Grandin
Change-Id: I82c78dd880c98532db407b0183a43705be2de67c Reviewed-on: https://gerrit.libreoffice.org/28777 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.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-10Add SAL_FALLTHROUGH, where apparently appropriateStephan Bergmann
Change-Id: Id0470b3e60a455bc3807f4fa5da98cf5f1877d00
2016-05-09convert SfxStyleFamily to scoped enumNoel Grandin
and update the RSC compiler to accept such In the process fix some confusion in SD where it was confusing SfxStyleFamily and the index of the relevant family (which other parts of the code in SVL use) Change-Id: I1efc9f85fbed8ab76eafe8f6e1ada411753ae5f9
2016-03-24loplugin:constantparam in scNoel Grandin
Change-Id: I8608a6cb47972e9b838cc5ea431863348758ded0
2016-03-23loplugin:constantparam in scNoel Grandin
Change-Id: I437367b8c6960db730a69c020ba82792a9170d01
2016-03-15loplugin:constantparamNoel Grandin
Change-Id: I270e068b3c83e966e741b0a072fecce9d92d53f5
2016-03-10loplugin:constantparam in scNoel Grandin
Change-Id: Ia7bc394fdc0dba720751c2a58d55bfe34b239098
2016-01-11loplugin:privatebase: Publicly derive from binary_/unary_functionStephan Bergmann
Somewhat arbitrarily prefer public over private derivation; ultimately, derivation from those deprecated (C++11)/removed (C++17) classes should be removed, anyway. Change-Id: I5ed24427d37586e72f8c16509cf5002a54af73f1
2015-12-15Bin silly 'STATIC DATA' commentsTor Lillqvist
Change-Id: I50e3772b7b479d2cf1eb644c7334d0f987874ccb
2015-11-115th step to remove tools/rtti.hxxOliver Specht
tools/rtti.hxx removed completed the interface of some Sdr.* Items and removed pseudo items Change-Id: I0cdcd01494be35b97a27d5985aa908affa96048a Reviewed-on: https://gerrit.libreoffice.org/19837 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Oliver Specht <oliver.specht@cib.de>
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