cui/source/dialogs/cuicharmap.cxx | 2 ++ include/sfx2/charwin.hxx | 2 ++ sfx2/source/control/charwin.cxx | 8 +++++++- 3 files changed, 11 insertions(+), 1 deletion(-)
New commits: commit 37c719d92b8645aef68925c2dab669a4d1d83e85 Author: Mark Vecsernyes <[email protected]> Date: Wed Dec 6 14:16:47 2017 +0100 tdf#114122 - Double click in special character dialog inserts a character Change-Id: I8f8db851363344091294e2af43aba289ac160d98 Reviewed-on: https://gerrit.libreoffice.org/45952 Tested-by: Jenkins <[email protected]> Reviewed-by: Tamás Zolnai <[email protected]> diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx index 96d8cb73e3e6..31c259188431 100644 --- a/cui/source/dialogs/cuicharmap.cxx +++ b/cui/source/dialogs/cuicharmap.cxx @@ -519,10 +519,12 @@ void SvxCharacterMap::init() for(int i = 0; i < 16; i++) { + m_pRecentCharView[i]->SetHasInsert(m_bHasInsert); m_pRecentCharView[i]->setMouseClickHdl(LINK(this,SvxCharacterMap, CharClickHdl)); m_pRecentCharView[i]->setClearClickHdl(LINK(this,SvxCharacterMap, RecentClearClickHdl)); m_pRecentCharView[i]->setClearAllClickHdl(LINK(this,SvxCharacterMap, RecentClearAllClickHdl)); m_pRecentCharView[i]->SetLoseFocusHdl(LINK(this,SvxCharacterMap, LoseFocusHdl)); + m_pFavCharView[i]->SetHasInsert(m_bHasInsert); m_pFavCharView[i]->setMouseClickHdl(LINK(this,SvxCharacterMap, CharClickHdl)); m_pFavCharView[i]->setClearClickHdl(LINK(this,SvxCharacterMap, FavClearClickHdl)); m_pFavCharView[i]->setClearAllClickHdl(LINK(this,SvxCharacterMap, FavClearAllClickHdl)); diff --git a/include/sfx2/charwin.hxx b/include/sfx2/charwin.hxx index fa0f58a55c4e..f8c01a141ecc 100644 --- a/include/sfx2/charwin.hxx +++ b/include/sfx2/charwin.hxx @@ -30,6 +30,7 @@ public: void SetFont( const vcl::Font& rFont ); void SetText( const OUString& rText ) override; + void SetHasInsert( bool bInsert ); void InsertCharToDoc(); void createContextMenu(); @@ -55,6 +56,7 @@ private: long mnY; Point maPosition; vcl::Font maFont; + bool maHasInsert; Link<SvxCharView*, void> maMouseClickHdl; Link<SvxCharView*, void> maClearClickHdl; diff --git a/sfx2/source/control/charwin.cxx b/sfx2/source/control/charwin.cxx index 8bd37fc67452..9d0f45e4ae62 100644 --- a/sfx2/source/control/charwin.cxx +++ b/sfx2/source/control/charwin.cxx @@ -34,6 +34,7 @@ SvxCharView::SvxCharView(vcl::Window* pParent) : Control(pParent, WB_TABSTOP | WB_BORDER) , mnY(0) , maPosition(0,0) + , maHasInsert(true) { } @@ -45,7 +46,7 @@ void SvxCharView::MouseButtonDown( const MouseEvent& rMEvt ) if ( rMEvt.IsLeft() ) { - if ( !(rMEvt.GetClicks() % 2) ) + if ( !(rMEvt.GetClicks() % 2) && maHasInsert ) { InsertCharToDoc(); } @@ -260,3 +261,8 @@ void SvxCharView::SetText( const OUString& rText ) Control::SetText( rText ); Invalidate(); } + +void SvxCharView::SetHasInsert( bool bInsert ) +{ + maHasInsert = bInsert; +}
_______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
