summaryrefslogtreecommitdiff
path: root/sw/source/uibase/shells/txtnum.cxx
AgeCommit message (Collapse)Author
2019-05-02Resolve deprecated implicit capture of *this by reference in C++20Stephan Bergmann
...as flagged with -Werror=deprecated by trunk GCC in -std=c++2a mode. But C++17 forbids "this" in combination with a capture-default of "=", so in such cases list any entities explicitly that shall be captured by value. Change-Id: Ic228cd20682277a0f93e3e75798356d0fbbb80d4 Reviewed-on: https://gerrit.libreoffice.org/65241 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit c56a8280bdd605f77f0075a7f2bfa474aa2a26e5) Reviewed-on: https://gerrit.libreoffice.org/71661 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-03weld SwSvxNumBulletTabDialogCaolán McNamara
Change-Id: I8ea74dc15bba04c0615e61c069407160a7b95c4c Reviewed-on: https://gerrit.libreoffice.org/61242 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-06-09remove cargo cult OSL_ENSURE(pFact, "ScAbstractFactory create fail!"(Noel Grandin
Possibly this was useful once upon a time, but now it's just noise. If it failed, we're going to crash on the next line when we call a method on that pointer anyway. Change-Id: Ic601f0c3344f6895f8a6ffb3bc6f8bcb45d00a92 Reviewed-on: https://gerrit.libreoffice.org/55082 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-20drop unnecessary includesCaolán McNamara
Change-Id: I1a817d5575bbd57ecaa874a27158b9218e4210cc Reviewed-on: https://gerrit.libreoffice.org/51603 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-05there's already a way to pass around the SfxRequest source frameCaolán McNamara
Change-Id: I790497c3e651890e0971ee334d599a98a7aae7f0 Reviewed-on: https://gerrit.libreoffice.org/50768 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-22StartExecuteAsync doesn't need a second paramNoel Grandin
we can just use this to store a keep-alive reference in AsyncContext Change-Id: I0152aef5386aa9753b48afdfc958790f10d13560 Reviewed-on: https://gerrit.libreoffice.org/48294 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jenkins <ci@libreoffice.org>
2018-01-18lokdialog: Convert the Format -> Bullets and Numbering... dialog to async execJan Holesovsky
Change-Id: I01886ca1f0d7942450838e5f2de4700bdf81150f Reviewed-on: https://gerrit.libreoffice.org/48029 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-11-10rework tdf#113647 solution to be safeCaolán McNamara
rather than passing the pointer around, tragic use of uno apis means monstrous awt::Window thingy has to be passed around and still smuggled through the dispatch arguments to get through the eye of the XDispatch::dispatch needle Change-Id: I353f8a3b0bb698bb58f75576e49efd701f3db8bf Reviewed-on: https://gerrit.libreoffice.org/44585 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-10tdf#113647 bullet dialog has wrong modal parentCaolán McNamara
Change-Id: Ia2e6171a1aeb3b8ad679a547a63ccaeac20481df Reviewed-on: https://gerrit.libreoffice.org/44554 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-09uibase: consistently use "" and <> in include directivesMike Kaganski
Change-Id: Ib6888045cecb4bd7b3498534605d790324f1b40a Reviewed-on: https://gerrit.libreoffice.org/43265 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-08-06loplugin:constparams in sw part7Noel Grandin
Change-Id: Iaace9c024649481b2f7cdd67aaf1e86624fe0d4a Reviewed-on: https://gerrit.libreoffice.org/40811 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-21de-hrc various thingsCaolán McNamara
e.g. helpid[s].hrc -> helpids.h and insert include guards where missing move "ordinary" defines into .hxx files remove .hrc entries that are used as arguments to dialog factory when a dedicated method can be added instead Change-Id: I792fb8eb0adfaa63cf354e6e57401fc943e9196e
2017-06-16Make SfxItemSet ranges correct by constructionStephan Bergmann
This is a follow-up to 45a7f5b62d0b1b21763c1c94255ef2309ea4280b "Keep WID ranges sorted, and join adjacent ones". While SfxItemSet::MergeRange relies on the m_pWhichRanges being sorted (and, under DBG_UTIL, asserts if they are not), the various SfxItemSet constructors curiously only check (via assert or DBG_ASSERT) that each individual range has an upper bound not smaller than its lower bound. Arguably, all SfxItemSet instances should fulfill the stronger guarantees required and checked by MergeRange. And in many cases the ranges are statically known, so that the checking can happen at compile time. Therefore, replace the two SfxItemSet ctors taking explicit ranges with two other ctors that actually do proper checking. The (templated) overload taking an svl::Items struct should be used in all cases where the range values are statically known at compile time, while the overload taking a std::initializer_list<Pair> is for the remaining cases (that can only do runtime checking via assert). Most of those latter cases are simple cases with a single range covering a single item, but a few are more complex. (At least some of the uses of the existing SfxItemSet overload taking a const sal_uInt16* pWhichPairTable can probably also be strengthened, but that is left for another day.) This commit is the first in a series of two. Apart from the manual changes to compilerplugins/clang/store/sfxitemsetrewrite.cxx, include/svl/itemset.hxx, and svl/source/items/itemset.cxx, it only consists of automatic rewriting of the relevant SfxItemSet ctor calls (plus a few required manual fixes, see next). But it does not yet check that the individual ranges are properly sorted (see the TODO in svl::detail::validGap). That check will be enabled, and the ensuing manual fixes will be made in a follow-up commit, to reduce the likelyhood of accidents. There were three cases of necessary manual intervention: * sw/source/core/unocore/unostyle.cxx uses eAtr of enum type RES_FRMATR in braced-init-list syntax now, so needs explicit narrowing conversion to sal_uInt16. * In sw/source/uibase/uiview/formatclipboard.cxx, the trailiing comma in the definition of macro FORMAT_PAINTBRUSH_FRAME_IDS needed to be removed manually. * In svx/source/svdraw/svdoashp.cxx, svx/source/svdraw/svdotext.cxx, sw/source/uibase/app/docstyle.cxx, sw/source/uibase/shells/frmsh.cxx, sw/source/uibase/shells/grfsh.cxx, and sw/source/uibase/shells/textsh1.cxx, some comments had to be put back (see "TODO: the replaced range can contain relevant comments" in compilerplugins/clang/store/sfxitemsetrewrite.cxx). A few uses of the variadic form erroneously used nullptr instead of 0 for termination. But this should have been harmless even if promoted std::nullptr_t is larger than promoted sal_uInt16, assuming that the part of the nullptr value that was interpreted as sal_uInt16/promoted int was all-zero bits. Similarly, some uses made the harmless error of using 0L instead of 0. Change-Id: I2afea97282803cb311b9321a99bb627520ef5e35 Reviewed-on: https://gerrit.libreoffice.org/38861 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-05-24tdf#107008 Pass char style names to NBOTypeMgrBaseMaxim Monastirsky
Change-Id: I26db31b8f9db968aa33b92a4abe917ac20cd5844 Reviewed-on: https://gerrit.libreoffice.org/37963 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2017-03-08convert SvxAdjust to scoped enumNoel Grandin
Change-Id: I0df7a5313d6d62d0c657e62ef6014a3ddbab4639 Reviewed-on: https://gerrit.libreoffice.org/34941 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-03drop SvxNumType and rename SvxExtNumType->SvxNumTypeNoel Grandin
Both of them are abstractions over the css::style::NumberingType constants. SvxNumType serves no useful purpose, since it's just a typedef to sal_Int16. At least SvxExtNumType wraps up the css::style::NumberingType constants in a nice enum. Change-Id: I7b3f97cd42b0aa23aff7a4db4930da86149d4f4e Reviewed-on: https://gerrit.libreoffice.org/34816 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-28ScopedVclPtr vs std::unique_ptr for VclAbstractDialog derivativesCaolán McNamara
Change-Id: I5e43312b6f42ce0c63946f366eaf1e6dcb9629b2 Reviewed-on: https://gerrit.libreoffice.org/30344 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-09-26convert eNBOType constants to scoped enumNoel Grandin
and remove unused constants, which means we can remove the GraphicBulletsTypeMgr and MixBulletsTypeMgr classes Change-Id: I395691b48987543355379708e2c60d0de438d72c
2015-11-14tdf#95403 Add Outline buttonMaxim Monastirsky
Change-Id: I0d5187ed34539a05ab9f2ffdfb89118df0aa3511 Reviewed-on: https://gerrit.libreoffice.org/19964 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
Change-Id: I01e11fa956a249974e77dce9deebe79311f098d0
2015-10-20loplugin:defaultparamsStephan Bergmann
Change-Id: I11ff551955c1ac291ab576f2f18c2dd410427eda
2015-10-16sfx items: Kill the unreadable SFX_REQUEST_ARG, use a template param instead.Jan Holesovsky
Change-Id: I7130f7a84077a63cdc0ca1e131a4d90469eac90d
2015-10-16sfx items: The bDeep parameter of SFX_REQUEST_ARG is always false.Jan Holesovsky
Change-Id: I6d4f4cd09c83f94b26dd90577bdc6bc3226f58ab
2015-10-06 tdf#94559: 4th step to remove rtti.hxxOliver Specht
replaced use of PTR_CAST, IS_TYPE, ISA in idl, editeng, sc, sd, sw, sfx2, sot, starmath Change-Id: I4a5bba4fdc4829099618c09b690c83f876a3d653 Reviewed-on: https://gerrit.libreoffice.org/19132 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2015-09-29Nobody would go down the corridor anymoreMiklos Vajna
Change-Id: Ic2cb2c4d9534d503828308183d55cea5b8d88112
2015-09-17boost->stdCaolán McNamara
Change-Id: Idfbcfa1e5ba7bff92e98693c33c4b33a6beda08f
2015-06-10tdf#88290 Adapt the numbering popup to more than 8 itemsMaxim Monastirsky
The items count of NumberingTypeMgr is limited by 8, but some languages have more items, so remove that limitation. Also fix the behavior of the 10th item. The old sidebar popup had a "None" item, whose id was 10 (defined by DEFAULT_NONE from include/svx/nbdtmg.hxx), and that causes now the 10th item to behave as on/off toggle. Since we don't have a "None" item anymore, get rid of that behavior completely. Change-Id: I5546ca637f9951cc093a7bbf8fda11dc35341d4e
2015-05-20bin/rename-sw-abbreviations.shlibreoffice-5-0-branch-pointChristian Lohmaier
renames the most annoying abbreviations in Writer (and partially in the shared code too). Change-Id: I9a62759138126c1537cc5c985ba05cf54d6132d9
2015-03-26convert NUM_ constants to enum clasNoel Grandin
Change-Id: Id41ea91aaf618c7f3f323698c09caa7c8df2290a
2014-12-02loplugin: cstylecastNoel Grandin
Change-Id: Id70cf0a2412de5d9b202b8209f0376c2f62a0669
2014-11-23fdo#86546 Open the right tab for more bullets and numberingMaxim Monastirsky
Change-Id: Ib8dda6eab89c92fa9bea98e3570896ea02692585
2014-11-11callcatcher: dropping SwChapterNumRules binary Load/Store has knock-on effectCaolán McNamara
Change-Id: I2567026af23dd5fc42812b90bd6098c4c74a4f92
2014-11-09fdo#85804 Introduce bullets and numbering popupsMaxim Monastirsky
Change-Id: I39ea402a3ce3296f55ea127b0139e89954e41252
2014-09-12Turn SfxItemState into a C++11 scoped enumerationStephan Bergmann
...to gain further confidence in the claim "that none of the existing code tries to uses combinations of these enum values" (d92602c5b13d0a60439d86c5a033d124178726ca "more fixes for SfxItemState") Change-Id: I987922d945e8738e38adfde83b869adf3ff35b13 Reviewed-on: https://gerrit.libreoffice.org/11384 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2014-07-26Massive 'Dialogdiet fail' and similar to 'Dialog creation failed'Matteo Casalin
Change-Id: I6ca6914e80c186699df42253de46a3690c5130f2
2014-07-26More proper integer types, constifyMatteo Casalin
Change-Id: I52733936d2d38c5c22c054cf6e0bc323a74344ae
2014-06-14Avoid possible memory leaks in case of exceptionsTakeshi Abe
Change-Id: I32d1e15cb9f050e3cd05babbd2f21c57f3ccb5e7
2014-05-27sw: move sw/source/core/uibase to sw/source/uibaseMichael Stahl
It's too confusing to have UI code inside of core; the important part is that it's separated from the optional UI code in swui library. Change-Id: I640a52723d5802faf08f3b8eaa03cd937fd93449