summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorShyamPraveenSingh <shyampraveensingh@gmail.com>2020-11-25 10:31:13 +0530
committerHeiko Tietze <heiko.tietze@documentfoundation.org>2020-12-02 16:58:27 +0100
commitb6c69a02222e3b6860efadb294a5b4d924bed819 (patch)
tree1004bb8202fb488d9fe7c2020b6d638c475e887b /sfx2
parenta9665403cd997c1c593efc52682a87ffb3c1e87a (diff)
Resolves tdf#137547 CharmapCtrl label depending on recent chars
Label shows now "No recent characters" if none has been used Change-Id: Ica3e4da077758ce848775eaa9b658f8322278b47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106557 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/inc/charmapcontrol.hxx1
-rw-r--r--sfx2/source/control/charmapcontrol.cxx6
2 files changed, 7 insertions, 0 deletions
diff --git a/sfx2/inc/charmapcontrol.hxx b/sfx2/inc/charmapcontrol.hxx
index 0902f17fa94f..039fed4aae4b 100644
--- a/sfx2/inc/charmapcontrol.hxx
+++ b/sfx2/inc/charmapcontrol.hxx
@@ -49,6 +49,7 @@ private:
SvxCharView m_aRecentCharView[16];
SvxCharView m_aFavCharView[16];
+ std::unique_ptr<weld::Label> m_xRecentLabel;
std::unique_ptr<weld::Button> m_xDlgBtn;
std::unique_ptr<weld::CustomWeld> m_xRecentCharView[16];
std::unique_ptr<weld::CustomWeld> m_xFavCharView[16];
diff --git a/sfx2/source/control/charmapcontrol.cxx b/sfx2/source/control/charmapcontrol.cxx
index 56af57524a88..7987fb6aa600 100644
--- a/sfx2/source/control/charmapcontrol.cxx
+++ b/sfx2/source/control/charmapcontrol.cxx
@@ -22,6 +22,8 @@
#include <charmapcontrol.hxx>
#include <sfx2/charmappopup.hxx>
#include <sfx2/viewfrm.hxx>
+#include <sfx2/strings.hrc>
+#include <sfx2/sfxresid.hxx>
using namespace css;
@@ -61,6 +63,7 @@ SfxCharmapCtrl::SfxCharmapCtrl(CharmapPopup* pControl, weld::Widget* pParent)
SvxCharView(m_xVirDev),
SvxCharView(m_xVirDev),
SvxCharView(m_xVirDev)}
+ , m_xRecentLabel(m_xBuilder->weld_label("label2"))
, m_xDlgBtn(m_xBuilder->weld_button("specialchardlg"))
, m_xRecentCharView{std::make_unique<weld::CustomWeld>(*m_xBuilder, "viewchar1", m_aRecentCharView[0]),
std::make_unique<weld::CustomWeld>(*m_xBuilder, "viewchar2", m_aRecentCharView[1]),
@@ -175,6 +178,9 @@ void SfxCharmapCtrl::updateRecentCharControl()
m_aRecentCharView[i].SetText(OUString());
m_aRecentCharView[i].Hide();
}
+
+ //checking if the characters are recently used or no
+ m_xRecentLabel->set_label(m_aRecentCharList.size() > 0 ? SfxResId(STR_RECENT) : SfxResId(STR_NORECENT));
}
IMPL_LINK(SfxCharmapCtrl, CharClickHdl, SvxCharView*, pView, void)