/unotools/

distro/cib/libreoffice-5-3'>distro/cib/libreoffice-5-3 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/svx/source/tbxctrls/bulletsnumbering.cxx
AgeCommit message (Collapse)Author
2023-04-02Avoid conversions between OUString and OString in VCLMike Kaganski
Standardize on OUString, which is the main internal string class. Convert from/to OUString only when communicating with respective external APIs. Removes about 200 conversions from the code. Change-Id: I96ecee7c6fd271bb76639220e96d69d2964bed26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149930 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-03-30tdf#146748 Change 'More Numbering/Bullets' options to 'Customize'Arvind K
Change-Id: Ia9ae20b8c73ddd762424c99eedbaf145fed81935 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148142 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2023-01-12Revert "tdf#56258 svx SetOutline: convert to toggle"Justin Luth
This reverts 7.6 commit a9b666b6b839735919923d8911f7e1efe0eb87b0. This causes too many unexpected things for the user. The biggest problem is that it does not join the previous list like the other numbering does. I suppose I could fix that by first calling a UNO command that joins/turns on numbering. However, that is a bit more dangerous with outline, since it modifies spacing / numbering on all levels, and joining can unexpected skip empty paragraphs etc. So best to just always treat the button as a dropdown to indicate to the user that they are applying an outline change. For the present I decided to leave the lighted-up aspect in place, so show that the outline is in effect. In terms of removing the list, which was the main reason for the change in the first place, there are several workarounds. The user has the option to go to "more choices" and remove, or select an all-1s choice and then remove that. Using the bullets button also is an easy option since it seems less restricted than numbering. The overall risk is no different from before, except that it is easier to make those kinds of levels now that the outline button is always available on the toolbar. Change-Id: I64e13f203ae65b2d2b28560ba747ca99d1456578 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145240 Tested-by: Justin Luth <jluth@mail.com> Reviewed-by: Justin Luth <jluth@mail.com>
2023-01-06tdf#56258 svx SetOutline: convert to toggleJustin Luth
The "Outline Format" toolbar button is normally hidden. It didn't check state like the bullet and toggle numbering do. This patch adds that - so it lights up when the text contains a numbering list that matches a valid outline choice. I also added a toggle aspect to the button. Toggling ON is not great. It works fine if there is no numbering yet, but if you are in an outline and toggle off, it won't toggle back on to the same list - it starts a new one. I don't think there is much that can be done about that, since the removal delete the level information too, and outlines are all about multiple levels of numbering. The proper response to an errant toggle off is (multiple) undo(s), not toggle back on. (In the ideal world, it would popup the dropdown choices). Toggling ON does nothing when there are already bullets or numbering. The proper response is to use the dropdown if the desire is to change to an outline format. Toggling OFF is only possible when we are on a valid outline. This is extremely important because otherwise it isn't clear how to remove Outline Numbering's mix of bullets and numbers. (When the selection contains one list with both bullet and number levels, the number and bullet buttons do nothing.) Although not perfect, this is not a bad user experience, so I'm going to push the full patch to gerrit. There is one known obscure case that troubles all methods. If the selection spans multiple list definitions and ends on an un-numbered paragraph, then the toggle-on will happen. It is possible to just not do any toggling and ALWAYS show the dropdown action, but that isn't very consistent with the other related buttons. Change-Id: I6d927604e49711f1da8549be9f3dbf8b8133a06b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145061 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2022-05-03Just use Any ctor instead of makeAny in svxStephan Bergmann
Change-Id: I59b1b3f817a9028f132456ea5094f38f88674d00 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133768 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-03-11use strong_int for item ids in vcl::ToolBoxNoel
(*) fix bug in SfxToolBoxControl::StateChanged where it was using the slot id instead of the toolbox item id (*) I left the logic in SbaTableQueryBrowser alone, but it looks suspicious, casting slot ids to toolbox ids Change-Id: Ied229164c27fb4456b0515c6fdcbd1682766a1a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112186 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-24tdf#138430 scrolled windows need to have auto scrolling disabledCaolán McNamara
Change-Id: I8a622f00238d3d20d21d2439d6fc4fb13358f0c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106485 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-23tdf#138430 toolbar bullet dropdown should have a scrolledwindowCaolán McNamara
as should the matching dialog pages Change-Id: Ib327d3c02d1bc5ae11a6a76d52c9e17803f05534 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106427 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-25rename SvtValueSet back to ValueSetCaolán McNamara
Change-Id: I51ab96ffef7acc0d416d13ac8e380e49381f4d1d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92902 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-03-13Revert "loplugin:constfields in svx"Noel Grandin
This reverts commit 1a6397030381a45f27ab7a2a02e6e6d0f9987c84. Change-Id: Iaa706bb4ea3144ef57ab359b982400abc589b97e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90454 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-10tdf#42949 Fix IWYU warnings in svx/source/[t-x]*/*cxxGabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I8d8a3e13932b004678b305f9a6883062854f9201 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90140 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-02-26tdf#130952 crash launching bullets and numbering from sidebar more... dropdownCaolán McNamara
Change-Id: I242c7281a891a8e52d9fa4e5ee2d20ba56d62fdc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89528 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-16rename a createPopupWindow so we can remove 'using createPopupWindow'Caolán McNamara
Change-Id: I6e24d3f796b4b958513166ba2fd9e63239729375 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86886 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2020-01-13rename NumValueSet back to SvxNumValueSetCaolán McNamara
Change-Id: I05cd8e336f818e80de40abb40cf739a7cbb540d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86665 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-12EndPopupMode at end instead of startCaolán McNamara
Change-Id: I8b5b5957ea6adf2b5b637da41fbe96ce9add03e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86642 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-10make welded toolbars on-demand that were previously on-demandCaolán McNamara
Change-Id: I795723260deb317093e83d951d968e0b3d3a1850 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86531 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-08add a scheme to host welded toolbar dropdown windows in unwelded toolbarsCaolán McNamara
Change-Id: I72c9896798740a760eac479bdccaf7825872c01b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86420 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-08weld ListsPropertyPanelCaolán McNamara
Change-Id: I8fdf25a7e34bf3cf2b25a8b1a19af95a3a08af2e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86348 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2019-12-03remove some useless comment linesNoel Grandin
which merely announce that the next declaration is a class Change-Id: Ifdb1398bcd99816b13e0b3769b46d0562bfbc1dc Reviewed-on: https://gerrit.libreoffice.org/84229 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-22Extend loplugin:external to warn about classesStephan Bergmann
...following up on 314f15bff08b76bf96acf99141776ef64d2f1355 "Extend loplugin:external to warn about enums". Cases where free functions were moved into an unnamed namespace along with a class, to not break ADL, are in: filter/source/svg/svgexport.cxx sc/source/filter/excel/xelink.cxx sc/source/filter/excel/xilink.cxx svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx All other free functions mentioning moved classes appear to be harmless and not give rise to (silent, even) ADL breakage. (One remaining TODO in compilerplugins/clang/external.cxx is that derived classes are not covered by computeAffectedTypes, even though they could also be affected by ADL-breakage--- but don't seem to be in any acutal case across the code base.) For friend declarations using elaborate type specifiers, like class C1 {}; class C2 { friend class C1; }; * If C2 (but not C1) is moved into an unnamed namespace, the friend declaration must be changed to not use an elaborate type specifier (i.e., "friend C1;"; see C++17 [namespace.memdef]/3: "If the name in a friend declaration is neither qualified nor a template-id and the declaration is a function or an elaborated-type-specifier, the lookup to determine whether the entity has been previously declared shall not consider any scopes outside the innermost enclosing namespace.") * If C1 (but not C2) is moved into an unnamed namespace, the friend declaration must be changed too, see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71882> "elaborated-type-specifier friend not looked up in unnamed namespace". Apart from that, to keep changes simple and mostly mechanical (which should help avoid regressions), out-of-line definitions of class members have been left in the enclosing (named) namespace. But explicit specializations of class templates had to be moved into the unnamed namespace to appease <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92598> "explicit specialization of template from unnamed namespace using unqualified-id in enclosing namespace". Also, accompanying declarations (of e.g. typedefs or static variables) that could arguably be moved into the unnamed namespace too have been left alone. And in some cases, mention of affected types in blacklists in other loplugins needed to be adapted. And sc/qa/unit/mark_test.cxx uses a hack of including other .cxx, one of which is sc/source/core/data/segmenttree.cxx where e.g. ScFlatUInt16SegmentsImpl is not moved into an unnamed namespace (because it is declared in sc/inc/segmenttree.hxx), but its base ScFlatSegmentsImpl is. GCC warns about such combinations with enabled-by-default -Wsubobject-linkage, but "The compiler doesn’t give this warning for types defined in the main .C file, as those are unlikely to have multiple definitions." (<https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gcc/Warning-Options.html>) The warned-about classes also don't have multiple definitions in the given test, so disable the warning when including the .cxx. Change-Id: Ib694094c0d8168be68f8fe90dfd0acbb66a3f1e4 Reviewed-on: https://gerrit.libreoffice.org/83239 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>