Bug 148629 - The "Demote" command is always active in Draw (and Impress), but does not do anything on non-list paragraphs
Summary: The "Demote" command is always active in Draw (and Impress), but does not do ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
7.4.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: difficultyMedium, easyHack, skillCpp, topicUI
Depends on:
Blocks: Impress-Outline-View
  Show dependency treegraph
 
Reported: 2022-04-16 23:53 UTC by sdc.blanco
Modified: 2022-04-22 10:06 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
simple document to use for testing Demote command (15.93 KB, application/vnd.oasis.opendocument.graphics)
2022-04-16 23:53 UTC, sdc.blanco
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sdc.blanco 2022-04-16 23:53:41 UTC
Created attachment 179619 [details]
simple document to use for testing Demote command

1. Use attached file, which has two textboxes, one with an ordered list and one with a few lines of text, or make your own version.

2. Place cursor in a non-list paragraph.

3. Format > Lists > Demote

Actual: Command is active, nothing happens.

Expected: ??  maybe it shouldn't be active?


This ticket is filed under Draw, but same problem with Impress (and same command, .uno:OutlineRight), which is why only one ticket is filed for now.

STR in Impress.

1. Make a textbox with some text lines.
2. View > Toolbars > Outline
3. Click on Demote (right arrow)

Actual: Command is active, but nothing happens.

Also in 7.2.6.2

Additional information:
1. The Demote command in Writer is not active, in non-list paragraphs.
Comment 1 Julien Nabet 2022-04-17 09:02:25 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce this.
Comment 2 Julien Nabet 2022-04-17 10:30:46 UTC
Code pointer SID_OUTLINE_RIGHT in sd/source/ui/view/drtxtob.cxx TextObjectBar::GetAttrState
Comment 3 sdc.blanco 2022-04-17 10:51:05 UTC
will ask UXEval to clarify the "expected" behavior here.

In this connection, here are some observations: 
  - intent behind this bug report was primarily to remove a "blemish" in the UI. 
  - have no opinion about ideal or preferred behavior. 
  - others might see a value in using "Demote" more generally 
    (just as "Move Up" (and Down) operate on both text and list paragraphs).
  - note that when "Demote" is used with list paragraphs, the entry in the Undo 
    field is "indent" (when it should be something like "Promote").
  - This Undo field behavior may be an indication that "Promote" (right arrow) was
    -- at one time -- an "indent" function, and not a "list level" function 
    (even if there are no list levels in the Draw/Impress UI).  
  - I am not familiar with the Draw / Impress UI, but maybe it is 
    meaningful/useful to have a generic "indent" function in Draw and Impress.  
  - Note also, at present, Draw has minimal UI for accessing this command -- only   
    in Format > Lists > Demote, not in toolbar, no shortcut, while Impress at 
    least has the arrow in the Outline toolbar. So if this command was 
    generalized, it would relevant to consider the UI access.
Comment 4 Heiko Tietze 2022-04-22 10:06:44 UTC
Commands that are temporarily unavailable should become disabled. Writer disables the uno:DecrementLevel unless a list style is used. We should do the same on Draw/Impress.

Medium easyhack, some debugging needed. Code pointer in c2.