diff options
author | Justin Luth <justin.luth@collabora.com> | 2023-01-09 14:18:15 -0500 |
---|---|---|
committer | Justin Luth <jluth@mail.com> | 2023-01-12 00:04:06 +0000 |
commit | d07b1cc8148140bd3a78103da668d002b9d266ab (patch) | |
tree | 20ffd20651c7d6b0639603053052cae546ff8a25 /svx/source/tbxctrls | |
parent | 613baf1573757f8af594eda2460076b4eaad7c64 (diff) |
Revert "tdf#56258 svx SetOutline: convert to toggle"
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>
Diffstat (limited to 'svx/source/tbxctrls')
-rw-r--r-- | svx/source/tbxctrls/bulletsnumbering.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/svx/source/tbxctrls/bulletsnumbering.cxx b/svx/source/tbxctrls/bulletsnumbering.cxx index 413cbc183025..a9195cd5a695 100644 --- a/svx/source/tbxctrls/bulletsnumbering.cxx +++ b/svx/source/tbxctrls/bulletsnumbering.cxx @@ -215,7 +215,12 @@ void SAL_CALL NumberingToolBoxControl::initialize( const css::uno::Sequence< css ToolBox* pToolBox = nullptr; ToolBoxItemId nId; if (getToolboxId(nId, &pToolBox)) - pToolBox->SetItemBits(nId, pToolBox->GetItemBits(nId) | ToolBoxItemBits::DROPDOWN); + { + ToolBoxItemBits nBits = mePageType == NumberingPageType::OUTLINE + ? ToolBoxItemBits::DROPDOWNONLY + : ToolBoxItemBits::DROPDOWN; + pToolBox->SetItemBits( nId, pToolBox->GetItemBits( nId ) | nBits ); + } } OUString SAL_CALL NumberingToolBoxControl::getImplementationName() |