Bug 127897 - Missing "Language->For Selection/Paragraph" under Tools
Summary: Missing "Language->For Selection/Paragraph" under Tools
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard: reviewed:2022
Keywords: difficultyMedium, easyHack, skillCpp
Depends on:
Blocks: Languages
  Show dependency treegraph
 
Reported: 2019-10-01 07:15 UTC by Mike Kaganski
Modified: 2023-08-20 03:53 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2019-10-01 07:15:33 UTC
Having Tools->Language->For Selection (and possibly For Paragraph) would be useful in Impress, like in Writer. Having the status bar displaying current selection languages (as in Writer, accompanying the menu function addition) would be also a nice addition (but maybe worth a different issue).

A related issue is that "[] Ignore system input languages" under Options->Language Settings->Languages has no effect in Impress, so its unchecked state does not allow to have typed text have language defined in system input (this problem should be filed separately).

The command "For Selection" should change the language of selected objects; when inside a frame, it should affect the marked text span.

This should be handled both in Impress and Draw (which share much of the code).

The "For All Text" command was added in tdf#64047.
Writer handles its commands in SwTextShell::Execute (sw/source/uibase/shells/textsh1.cxx; look for SID_LANGUAGE_STATUS).
Comment 1 V Stuart Foote 2019-10-01 14:19:46 UTC
+1
Comment 2 Heiko Tietze 2019-10-02 07:01:05 UTC
(In reply to Mike Kaganski from comment #0)
> Having Tools->Language->For Selection...

+1, so add "<menu:menuitem menu:id=".uno:SetLanguageSelectionMenu"/>" in sd/uiconfig/simpress/menubar/menubar.xml (and respectively in Draw); not sure that's enough given the last sentence below

> (and possibly For Paragraph)

What is a paragraph in Impress? -1 here

> Having the status bar displaying current selection languages

+1; there is a statusbar info but apparently it applies to the whole presentation

> A related issue is that "[] Ignore system input languages" under
> Options->Language Settings->Languages has no effect in Impress

Bug?

> The "For All Text" command was added in tdf#64047.
> Writer handles its commands in SwTextShell::Execute
> (sw/source/uibase/shells/textsh1.cxx; look for SID_LANGUAGE_STATUS).
Comment 3 Mike Kaganski 2019-10-02 07:16:19 UTC
(In reply to Heiko Tietze from comment #2)
> > (and possibly For Paragraph)
> 
> What is a paragraph in Impress? -1 here

In Impress, as in any other place, a paragraph is what is being managed by Format->Paragraph.

> > A related issue is that "[] Ignore system input languages" under
> > Options->Language Settings->Languages has no effect in Impress
> 
> Bug?

tdf#127898 already filed and added to See Also.
Comment 4 Yogesh Singh 2020-02-08 08:38:07 UTC
I am assigning it to myself. but I want to know do I also have to make changes in statusbar language status of impress/draw to resolve this bug.
Comment 5 Mike Kaganski 2020-02-08 08:42:24 UTC
(In reply to Yogesh Singh from comment #4)
> I am assigning it to myself. but I want to know do I also have to make
> changes in statusbar language status of impress/draw to resolve this bug.

Heiko: could you please tell what you think about this (I suppose that your comment 2 means this is part of this easy hack)?
Comment 6 Heiko Tietze 2020-02-18 09:28:59 UTC
(In reply to Mike Kaganski from comment #5)
> (In reply to Yogesh Singh from comment #4)
> > I am assigning it to myself. but I want to know do I also have to make
> > changes in statusbar language status of impress/draw to resolve this bug.
> 
> Heiko: could you please tell what you think about this (I suppose that your
> comment 2 means this is part of this easy hack)?

Huh, when it comes to the status bar it's a bit more tricky than hacking xml. A code pointer might be framework/source/uielement/langselectionstatusbarcontroller.cxx
Comment 7 Yogesh Singh 2020-02-19 08:28:35 UTC
(In reply to Heiko Tietze from comment #6)
> Huh, when it comes to the status bar it's a bit more tricky than hacking
> XML.
Your comment seems to point that to make relevant changes (for Tools->Language->For Selection) one only needs to change the menubar.xml file but I tried and I think that one also needs to make changes in /core/sd/source/ui/docshell/docshel3.cxx for it to work. otherwise changing XML only seems to add uielement and not logic/controller part.
for example, how will the program knows to open the character dialog box when clicked on Tools>For selection > more.
Also, I made the relevant changes in xml file, it sure brought up the option of Toools>Language>For Selection> but didn't had any real effects.
Comment 8 Mike Kaganski 2020-02-19 08:34:08 UTC
(In reply to Yogesh Singh from comment #7)
> I think that one also needs to make changes in
> /core/sd/source/ui/docshell/docshel3.cxx for it to work. otherwise changing
> XML only seems to add uielement and not logic/controller part.
> for example, how will the program knows to open the character dialog box
> when clicked on Tools>For selection > more.

You are absolutely right :-)
Comment 9 Hossein 2022-11-01 14:30:59 UTC
Re-evaluating the EasyHack in 2022

This enhancement is still relevant. The options "Tools->Language->For Selection" and "For Paragraph" are missing, and it would be useful to have them in Impress.