summaryrefslogtreecommitdiff
path: root/svl/source/undo
AgeCommit message (Collapse)Author
2018-07-13merge IUndoManager into SfxUndoManagerNoel Grandin
SfxUndoManager is the only implementation of the IUnderManager "interface", and it lives in the same header. Plus this way we can get rid of some covariant parameters, which will make using std::unique_ptr easier. Change-Id: I6661b9876b18da830bead78794d237886cd3c5c9 Reviewed-on: https://gerrit.libreoffice.org/57317 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-12More loplugin:cstylecast: svlStephan Bergmann
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: I71e3b2c9b4c68183288f43999d242e95ae13584d
2018-01-11loplugin:useuniqueptr in svlNoel Grandin
Change-Id: I2fdb63517349474d90cb17ad2bd667f30840e83d Reviewed-on: https://gerrit.libreoffice.org/47727 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-07lokit: add .uno:DocumentRepair commandHenry Castro
Change-Id: I5b13ea6f4785bc91c29111fa63c4a1b0ea9b2660 Reviewed-on: https://gerrit.libreoffice.org/38908 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Henry Castro <hcastro@collabora.com>
2017-10-18Replace lists by vectors in svlJulien Nabet
+ remove using namespace std and use prefix std:: Change-Id: Iab432f2c88ba5a15541bd97567682c6a34b0af2e Reviewed-on: https://gerrit.libreoffice.org/43471 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-12clang-tidy modernize-use-emplace in svgio..svtoolsNoel Grandin
Change-Id: I4f3b0762e197d5397e723aba1dc43e3c857be145 Reviewed-on: https://gerrit.libreoffice.org/42193 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-18loplugin:constparams in i18npool,opencl,svlNoel Grandin
Change-Id: I23368c3ce6d29c7b2e758e209e5a8315e82a2818 Reviewed-on: https://gerrit.libreoffice.org/40051 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-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-07-02loplugin:casttovoid: svlStephan Bergmann
Change-Id: Iec49ad76f102dc228d41beb10d7e99ed197c0ea8
2017-06-21loplugin:unusedfields store..svlNoel Grandin
Change-Id: I6070a683e5128271b84a10caccb548d07c950927 Reviewed-on: https://gerrit.libreoffice.org/39021 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-06add COVERITY_NOEXCEPT_FALSECaolán McNamara
to markup dtors that coverity warns might throw exceptions which won't throw in practice, or where std::terminate is an acceptable response if they do Change-Id: I32b94814e8245372e1d1dc36be0d81e3564042f4 Reviewed-on: https://gerrit.libreoffice.org/38318 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-05-06Plausible fix for timezone offset issue in Repair Document.Michael Meeks
Change-Id: Ic1dabb2c2330e0a74a75d75140b0c598555a0d53 Reviewed-on: https://gerrit.libreoffice.org/37301 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
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-03-24convert ViewShellId to o3tl::strong_intNoel Grandin
Change-Id: I45553d11d56aa8c4432aec126ca51f24bd3ead09 Reviewed-on: https://gerrit.libreoffice.org/35421 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-01-25loplugin: unnecessary destructor svl..svtoolsNoel Grandin
Change-Id: Ie96dda7194c83ba88693f8c91899c732d704a4bd Reviewed-on: https://gerrit.libreoffice.org/33515 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-18new loplugin: useuniqueptr: svl..svtoolsNoel Grandin
Change-Id: Ia4d5b37ee3cf67318e3cc01525e4b733af60d038 Reviewed-on: https://gerrit.libreoffice.org/33251 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-16make the element names in dumpAsXml match the class namesNoel Grandin
Change-Id: I955facfe3e901fcb76798dab342f96a67d5ac63f Reviewed-on: https://gerrit.libreoffice.org/30894 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-03add more dumpAsXml()Noel Grandin
and make it format the output nicely, so I don't have to use 'xmllint --format' before I can read it. Change-Id: I065ee93193f3c6c7bab87212ab96021fb0d7c5ed Reviewed-on: https://gerrit.libreoffice.org/29407 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-13loplugin:dllprivateStephan Bergmann
Change-Id: I1fe70a39c50aba8b84c117653185fc37dbbfeab0
2016-08-18svl: no need to iterate in reverse order in GetRedoActionsInfo()Miklos Vajna
We have random access to the array after all, so the non-reverse order is OK as well, and it's more readable. Change-Id: I966a56ae2e161d95f56927be1b2a9f9162d0f7bb Reviewed-on: https://gerrit.libreoffice.org/28204 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-08-05gtktiledviewer: expose undo/redo info in a repair document dialogMiklos Vajna
This shows the full undo and redo stack, with all the metadata available via the LOK API. Also fix SfxUndoManager::GetRedoActionsInfo(), so it's easy to show the undo/redo stack in linear time; and fix a use-after-free in lokdocview. Change-Id: I66625ed453efa61b5738d99d7d1ad8f468908240 Reviewed-on: https://gerrit.libreoffice.org/27913 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-08-05desktop: add undo/redo support to lok::Document::getCommandValues()Miklos Vajna
Expose the undo/redo stack and the metadata of each item. Change-Id: I66b81e855a945c97be3d491ed709959f310d4b73 Reviewed-on: https://gerrit.libreoffice.org/27905 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-08-04svl: track creation time of SfxUndoAction instancesMiklos Vajna
It's not yet clear how to expose this on the UI, though. Change-Id: Iee6737922d36e896653b4fae557442747dda1b8b Reviewed-on: https://gerrit.libreoffice.org/27878 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-08-04svl: expose redo actions in SfxUndoManager::dumpAsXml()Miklos Vajna
To see if an undo action is actually deleted or just moved to the redo stack. Change-Id: I40632ea29353e50b643b8b1831d5ffdf443ca75a Reviewed-on: https://gerrit.libreoffice.org/27871 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-08-03svl: handle nullptr pWriter in SfxUndoManager::dumpAsXml()Miklos Vajna
This is useful when it's called from gdb for Calc. Change-Id: I22b3e5bbfc5627bff27899a288f7c25179f750ec Reviewed-on: https://gerrit.libreoffice.org/27836 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-08-01svl: implement SfxUndoAction::GetViewShellId() interface in SfxListUndoActionMiklos Vajna
Client code in sw, sd, sc and svx is adapted, the rest is just a placeholder for now. With this, e.g. the undo item for Writer's insert comment properly tracks which window was used for the insertion. Change-Id: Idad587e6ca07ba69bf59aa7013b251af8bf95bab Reviewed-on: https://gerrit.libreoffice.org/27781 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-07-29svl: add SfxUndoAction::GetViewShellId()Miklos Vajna
In preparation of a Writer version that overrides this and remembers which view shell introduced which action. Change-Id: I4970f8ce9c56f1b57ab1ae92f3ea8be804ca27bf Reviewed-on: https://gerrit.libreoffice.org/27682 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-07-01svl: remove pointless catch around "delete" statementMichael Stahl
In C++11 the destructors are implicitly noexcept so if any of the subclasses of SfxUndoAction would have a throwing dtor we would have found out by now. Change-Id: I4e044f8c2c391464cdc236bac15465860fa0ef62
2016-05-31loplugin:unusedmethodsNoel Grandin
Change-Id: Ifeb818227a960cab8fd2e8e7352468efbfe1232c Reviewed-on: https://gerrit.libreoffice.org/25668 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-30loplugin:unusedmethods SfxLinkUndoActionNoel Grandin
Change-Id: I1ad7c2452dd9bc80e7404f41484b9667adbcfa7b Reviewed-on: https://gerrit.libreoffice.org/25542 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-22SfxUndoAction::dumpAsXml: show address of undo itemsMiklos Vajna
The order of undo items on the undo stack is: the newest item is the first. But for grouped items SfxListUndoAction is a list, so newest elements go to the end of the list. It's easy to get confused without seeing the exact addresses. Change-Id: I5c336f2317e4f5869b9fd227c800b2e15d0644ff Reviewed-on: https://gerrit.libreoffice.org/24295 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-03-09loplugin:constantparam in svlNoel Grandin
Change-Id: Iefc441262cbdc6f115ea4ca5a673456b59477e13
2016-03-07loplugin:unuseddefaultparamsNoel Grandin
Change-Id: Ia414f7845425ef73859ed04853378e96cc738795 Reviewed-on: https://gerrit.libreoffice.org/22971 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-01loplugin:unuseddefaultparam in svlNoel Grandin
Change-Id: Ifc82563c8930332d460df4d97935ba6e9946689f
2016-02-09Remove excess newlinesChris Sherlock
A ridiculously fast way of doing this is: for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \ --exclude-dir=workdir --exclude-dir=instdir '^ {3,}' .) do perl -0777 -i -pe 's/^ {3,}/ /gm' $i done Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c Reviewed-on: https://gerrit.libreoffice.org/22224 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2015-11-18use unique_ptr for pImpl in svl/Noel Grandin
Change-Id: Ieef897314ac0f056c0a09a5182ca59800fd58f41
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: I0f2f81dae91f62639e79799b1bed1b2df1fd79ab
2015-10-12Replace "SAL_DELETED_FUNCTION" with "= delete" in LIBO_INTERNAL_ONLY codeStephan Bergmann
Change-Id: I328ac7a95ccc87732efae48b567a0556865928f3
2015-09-01sw: include limits.h to fix build on Ubuntu 12.04Justin Luth
Change-Id: I37d4d4a933cfd1df8dc8f8258e270bd3dbcef714
2015-08-12cppcheck: noCopyConstructorCaolán McNamara
Change-Id: I62da241f237b17fc192dd586bcd35b5bd6ea284a
2015-08-11loplugin: defaultparamsNoel Grandin
Change-Id: I1d88744207f7fa7c8230f8b29d9cc123f488dfaa
2015-07-31comphelper: replace boost::function with std::functionMichael Stahl
Change-Id: I042c97d8472c3afceffba36808687f382571e6c2
2015-06-08cppcheck: noExplicitConstructorCaolán McNamara
Change-Id: I8b03c27188b02c3c4a9a9fbbe0df1fb1ae1c5caf
2015-04-22Various #include <sal/log.hxx> fixupsStephan Bergmann
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it. Cleaned up some, but something like grep -FwL sal/log.hxx $(git grep -Elw \ 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF') -- \*.cxx) shows lots more files that potentially need fixing before the include can be removed from rtl/string.hxx and rtl/ustring.hxx. Change-Id: Ibf033363e83d37851776f392dc0b077381cd8b90
2015-02-16boost::foo_ptr->std::foo_ptrCaolán McNamara
Change-Id: I9219619b538b6530a89f5932ac51eb3b62eb396a
2015-02-01Extract SfxUndoManager::dumpAsXml() from swMiklos Vajna
Change-Id: Ic031b63641e0fd0fbd1524657082188d9ce78fcf
2015-01-31Extract SfxUndoAction::dumpAsXml() from swMiklos Vajna
Change-Id: I7ec2071150c03b61f3f681dbd26968ae3c535742
2014-12-07Forward-declare MarkedUndoAction.Kohei Yoshida
Change-Id: I1c36077cada47bacfb8436cf3fb659e47d02da60