Created attachment 166449 [details] "Recent" should be "No Recent Character" Insert Special Character has ability to store recent inserted character. When no recent character inserted, the label "Recent" should be "No Recent Character" Step to reproduce: 1. Open Writer or Calc 2. In the Standard toolbar, click the Insert Special Character dropdown, cancel the action (press Esc e.g.)
After looking further, this request seems valid also against color chooser.
Yes, would be nicer to consider this a label rather than a heading.
Code pointer: sfx2/uiconfig/ui/charmapcontrol.ui: label2 sfx2/source/control/charmapcontrol.cxx: m_aRecentCharList.size()
Hi, I am a beginner and I would like to work on this bug. I just have to change the label from "Recent" to "No Recent Character" and "No Recent Color" for "Color"? And I cannot find the line "m_aRecentCharList.size()" in the file "sfx2/source/control/charmapcontrol.cxx"
First, you have to make the label available at code. Add std::unique_ptr<weld::Label> m_xRecentLabel; to the header file charmapcontrol.hxx. Load the control per ", m_xRecentLabel(m_xBuilder->weld_label("label2"))" in SfxCharmapCtrl::SfxCharmapCtrl() (sequence matters, so place the command where you added the label in the header file). Now you may set the label to either "Recent" or "No Recent Characters" depending on "m_aRecentCharList.size()>0". Add <sfx2/strings.hrc> to the includes, define the two string variables there, and use m_xRecentLabel->set_label(SfxResId(STR_RECENT)); (or STR_NORECENT respectively). Find a good place for this so the label is set initially and responds when recent items are deleted. If you want to continue, please use "take" at the field assignee and set status to assigned.
Sure I'd like to continue.
Can I work on this issue?
Hi! I am already working on this bug and I'm almost done. You can check out more un-assigned bug here: https://wiki.documentfoundation.org/Development/EasyHacks/by_Required_Skill/Skill_C%2B%2B
Okay..I will look into some other bugs..
Jenkins is showing me this error: error: use of undeclared identifier 'STR_RECENT' in file I have declared the identifiers there.
(In reply to Shyam Praveen Singh from comment #10) > Jenkins is showing me this error... https://gerrit.libreoffice.org/c/core/+/106557 tries to read some string but doesn't define it. Please add the new strings STR_RECENT and STR_NORECENT to sfx2/strings.hrc Not a developer but how do you call getRecent()/getNoRecent()? Also don't get the point of initializing m_aRecentCharList with these UI strings. I would expect something like SfxCharmapCtrl::updateRecentCharControl() //probably somewhere else ... m_xRecentLabel->set_label(m_aRecentCharList.size() > 0 ? SfxResId(STR_RECENT) : SfxResId(STR_NORECENT)); or if you don't like this compact code OUString sRecentLabel; if (m_aRecentCharList.size() > 0) sRecentLabel = SfxResId(STR_RECENT) else sRecentLabel = SfxResId(STR_NORECENT); m_xRecentLabel->set_label(sRecentLabel);
Okay, thanks! I will try to make changes and see if it works.
(In reply to Heiko Tietze from comment #11) > (In reply to Shyam Praveen Singh from comment #10) > > Jenkins is showing me this error... > > https://gerrit.libreoffice.org/c/core/+/106557 tries to read some string but > doesn't define it. Please add the new strings STR_RECENT and STR_NORECENT to > sfx2/strings.hrc > > Not a developer but how do you call getRecent()/getNoRecent()? Also don't > get the point of initializing m_aRecentCharList with these UI strings. I > would expect something like > > SfxCharmapCtrl::updateRecentCharControl() //probably somewhere else > ... > m_xRecentLabel->set_label(m_aRecentCharList.size() > 0 ? > SfxResId(STR_RECENT) : SfxResId(STR_NORECENT)); > > or if you don't like this compact code > > OUString sRecentLabel; > if (m_aRecentCharList.size() > 0) > sRecentLabel = SfxResId(STR_RECENT) > else > sRecentLabel = SfxResId(STR_NORECENT); > m_xRecentLabel->set_label(sRecentLabel); I removed the m_aRecentCharList from the UI strings. Also, got rid off getRecent and getNoRecent from the charmapcontrol.hxx and added the line m_xRecentLabel->set_label(m_aRecentCharList.size() > 0 ? > SfxResId(STR_RECENT) : SfxResId(STR_NORECENT)); inside fxCharmapCtrl::getRecentCharacterList I just cannot figure out how to include new strings STR_RECENT and STR_NORECENT to sfx2/strings.hrc https://gerrit.libreoffice.org/c/core/+/106557/4#message-136970d380158171237e2083c0d278c57bf8814b
(In reply to Shyam Praveen Singh from comment #13) > I just cannot figure out how to include new strings STR_RECENT and > STR_NORECENT to sfx2/strings.hrc Commented on Gerrit
ShyamPraveenSingh committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/b6c69a02222e3b6860efadb294a5b4d924bed819 Resolves tdf#137547 CharmapCtrl label depending on recent chars It will be available in 7.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
verified as fixed in: Version: 7.2.0.2 / LibreOffice Community Build ID: 614be4f5c67816389257027dc5e56c801a547089 CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: threaded and: Version: 7.3.0.0.alpha0+ / LibreOffice Community Build ID: 1dd4a80fa076bedb3a82821517036bad8dd79857 CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2021-07-26_22:41:19 Calc: threaded
(In reply to Rizal Muttaqin from comment #1) > After looking further, this request seems valid also against color chooser. Should I file a new separate ticket for color chooser?