[Libreoffice-commits] core.git: cui/source include/sfx2 sfx2/source
Caolán McNamara
caolanm at redhat.com
Tue May 1 11:36:28 UTC 2018
cui/source/dialogs/cuicharmap.cxx | 7 -------
cui/source/inc/cuicharmap.hxx | 1 -
include/sfx2/charwin.hxx | 2 ++
sfx2/source/control/charwin.cxx | 12 ++++++++++++
4 files changed, 14 insertions(+), 8 deletions(-)
New commits:
commit 05a650d02bb7cbd838a0a3767e22069faacc81e4
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Apr 30 21:19:05 2018 +0100
update when gaining/losing focus
Change-Id: I0f650502f43a4c1c27b0eb8b3ddab857d5c64480
Reviewed-on: https://gerrit.libreoffice.org/53674
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx
index ac0fffe42bdf..ae4eedfb84ba 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -485,12 +485,10 @@ void SvxCharacterMap::init()
m_xRecentCharView[i]->setMouseClickHdl(LINK(this,SvxCharacterMap, CharClickHdl));
m_xRecentCharView[i]->setClearClickHdl(LINK(this,SvxCharacterMap, RecentClearClickHdl));
m_xRecentCharView[i]->setClearAllClickHdl(LINK(this,SvxCharacterMap, RecentClearAllClickHdl));
- m_xRecentCharView[i]->connect_focus_out(LINK(this,SvxCharacterMap, LoseFocusHdl));
m_xFavCharView[i]->SetHasInsert(m_bHasInsert);
m_xFavCharView[i]->setMouseClickHdl(LINK(this,SvxCharacterMap, CharClickHdl));
m_xFavCharView[i]->setClearClickHdl(LINK(this,SvxCharacterMap, FavClearClickHdl));
m_xFavCharView[i]->setClearAllClickHdl(LINK(this,SvxCharacterMap, FavClearAllClickHdl));
- m_xFavCharView[i]->connect_focus_out(LINK(this,SvxCharacterMap, LoseFocusHdl));
}
setCharName(90);
@@ -901,11 +899,6 @@ IMPL_LINK_NOARG(SvxCharacterMap, InsertClickHdl, weld::Button&, void)
m_xDialog->response(RET_OK);
}
-IMPL_STATIC_LINK(SvxCharacterMap, LoseFocusHdl, weld::Widget&, rItem, void)
-{
- dynamic_cast<weld::DrawingArea&>(rItem).queue_draw();
-}
-
IMPL_LINK_NOARG(SvxCharacterMap, FavSelectHdl, weld::Button&, void)
{
if (m_xFavouritesBtn->get_label().match(CuiResId(RID_SVXSTR_ADD_FAVORITES)))
diff --git a/cui/source/inc/cuicharmap.hxx b/cui/source/inc/cuicharmap.hxx
index db77b34ec3cb..86bc53052827 100644
--- a/cui/source/inc/cuicharmap.hxx
+++ b/cui/source/inc/cuicharmap.hxx
@@ -127,7 +127,6 @@ private:
DECL_LINK(RecentClearAllClickHdl, SvxCharView*, void);
DECL_LINK(FavClearAllClickHdl, SvxCharView*, void);
DECL_LINK(InsertClickHdl, weld::Button&, void);
- DECL_STATIC_LINK(SvxCharacterMap, LoseFocusHdl, weld::Widget&, void);
DECL_LINK(FavSelectHdl, weld::Button&, void);
DECL_LINK(SearchUpdateHdl, weld::Entry&, void);
DECL_LINK(SearchFieldGetFocusHdl, weld::Widget&, void);
diff --git a/include/sfx2/charwin.hxx b/include/sfx2/charwin.hxx
index 88335d00a1a8..992df5206e11 100644
--- a/include/sfx2/charwin.hxx
+++ b/include/sfx2/charwin.hxx
@@ -45,6 +45,8 @@ private:
DECL_LINK(DoResize, const Size& rSize, void);
DECL_LINK(DoMouseButtonDown, const MouseEvent&, void);
DECL_LINK(DoKeyDown, const KeyEvent&, bool);
+ DECL_LINK(DoGetFocus, weld::Widget&, void);
+ DECL_LINK(DoLoseFocus, weld::Widget&, void);
public:
SvxCharView(weld::Builder& rBuilder, const OString& rId, const VclPtr<VirtualDevice>& rVirDev);
diff --git a/sfx2/source/control/charwin.cxx b/sfx2/source/control/charwin.cxx
index d2a723938a13..a1c0abc6672d 100644
--- a/sfx2/source/control/charwin.cxx
+++ b/sfx2/source/control/charwin.cxx
@@ -39,6 +39,8 @@ SvxCharView::SvxCharView(weld::Builder& rBuilder, const OString& rId, const VclP
mxDrawingArea->connect_draw(LINK(this, SvxCharView, DoPaint));
mxDrawingArea->connect_mouse_press(LINK(this, SvxCharView, DoMouseButtonDown));
mxDrawingArea->connect_key_press(LINK(this, SvxCharView, DoKeyDown));
+ mxDrawingArea->connect_focus_in(LINK(this, SvxCharView, DoGetFocus));
+ mxDrawingArea->connect_focus_out(LINK(this, SvxCharView, DoLoseFocus));
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
vcl::Font aFont = rStyleSettings.GetLabelFont();
@@ -51,6 +53,16 @@ SvxCharView::SvxCharView(weld::Builder& rBuilder, const OString& rId, const VclP
mxVirDev->Pop();
}
+IMPL_LINK_NOARG(SvxCharView, DoGetFocus, weld::Widget&, void)
+{
+ mxDrawingArea->queue_draw();
+}
+
+IMPL_LINK_NOARG(SvxCharView, DoLoseFocus, weld::Widget&, void)
+{
+ mxDrawingArea->queue_draw();
+}
+
IMPL_LINK(SvxCharView, DoMouseButtonDown, const MouseEvent&, rMEvt, void)
{
if ( rMEvt.IsLeft() )
More information about the Libreoffice-commits
mailing list