summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/sfx2/strings.hrc3
-rw-r--r--sfx2/inc/charmapcontrol.hxx1
-rw-r--r--sfx2/source/control/charmapcontrol.cxx6
3 files changed, 10 insertions, 0 deletions
diff --git a/include/sfx2/strings.hrc b/include/sfx2/strings.hrc
index 9927afe17e93..794d1a4b7af6 100644
--- a/include/sfx2/strings.hrc
+++ b/include/sfx2/strings.hrc
@@ -348,6 +348,9 @@
#define STR_SPREADSHEET NC_("STR_SPREADSHEET", "Spreadsheet")
#define STR_PRESENTATION NC_("STR_PRESENTATION", "Presentation")
#define STR_DRAWING NC_("STR_DRAWING", "Drawing")
+#define STR_RECENT NC_("STR_RECENT", "Recently used")
+#define STR_NORECENT NC_("STR_NORECENT", "No recent characters")
+
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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)