summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Le Garrec <legarrec.vincent@gmail.com>2018-01-15 23:20:29 +0100
committerVincent Le Garrec <legarrec.vincent@gmail.com>2018-01-15 23:20:29 +0100
commit98a44dbadab9fee22ddebebb0b3e08691b818021 (patch)
treeb6b149032f7a3b2b0468eb9868006a2f37703a35
parentc61d6a88c0f991b70c4bf19466eb671523f84aae (diff)
Add event to draw checkbox
When box is checked, the drawingarea is visible instead of the showchar. Change-Id: I1f1219eb0087a8aff4d70c856c4b2823249b0ceb
-rw-r--r--cui/source/dialogs/cuicharmap.cxx19
-rw-r--r--cui/source/inc/cuicharmap.hxx3
2 files changed, 22 insertions, 0 deletions
diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx
index ef849a56f8d6..4c6a2b3a3d82 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -64,6 +64,8 @@ SvxCharacterMap::SvxCharacterMap( vcl::Window* pParent, const SfxItemSet* pSet,
get(m_pShowSet, "showcharset");
get(m_pSearchSet, "searchcharset");
get(m_pShowChar, "showchar");
+ get(m_pDrawChk, "drawcheckbutton");
+ get(m_pDrawingArea, "drawingarea");
m_pShowChar->SetCentered(true);
if (m_bHasInsert) get(m_pOKBtn, "insert");
else get(m_pOKBtn, "ok");
@@ -188,6 +190,8 @@ void SvxCharacterMap::dispose()
m_pSubsetText.clear();
m_pSubsetLB.clear();
m_pShowChar.clear();
+ m_pDrawChk.clear();
+ m_pDrawingArea.clear();
m_pHexCodeText.clear();
m_pDecimalCodeText.clear();
m_pCharName.clear();
@@ -486,6 +490,8 @@ void SvxCharacterMap::init()
m_pShowSet->SetPreSelectHdl( LINK( this, SvxCharacterMap, CharPreSelectHdl ) );
m_pShowSet->SetFavClickHdl( LINK( this, SvxCharacterMap, FavClickHdl ) );
+ m_pDrawChk->SetClickHdl( LINK( this, SvxCharacterMap, DrawToggleHdl ) );
+
m_pSearchSet->SetDoubleClickHdl( LINK( this, SvxCharacterMap, SearchCharDoubleClickHdl ) );
m_pSearchSet->SetSelectHdl( LINK( this, SvxCharacterMap, SearchCharSelectHdl ) );
m_pSearchSet->SetHighlightHdl( LINK( this, SvxCharacterMap, SearchCharHighlightHdl ) );
@@ -939,6 +945,19 @@ IMPL_LINK_NOARG(SvxCharacterMap, InsertClickHdl, Button*, void)
EndDialog(RET_OK);
}
+IMPL_LINK_NOARG(SvxCharacterMap, DrawToggleHdl, Button*, void)
+{
+ if (m_pDrawChk->IsChecked())
+ {
+ m_pDrawingArea->Show();
+ m_pShowChar->Hide();
+ }
+ else
+ {
+ m_pDrawingArea->Hide();
+ m_pShowChar->Show();
+ }
+}
IMPL_STATIC_LINK(SvxCharacterMap, LoseFocusHdl, Control&, pItem, void)
{
diff --git a/cui/source/inc/cuicharmap.hxx b/cui/source/inc/cuicharmap.hxx
index b1a06b4540e3..7e2619efc10b 100644
--- a/cui/source/inc/cuicharmap.hxx
+++ b/cui/source/inc/cuicharmap.hxx
@@ -78,6 +78,8 @@ private:
VclPtr<FixedText> m_pSubsetText;
VclPtr<ListBox> m_pSubsetLB;
VclPtr<SvxShowText> m_pShowChar;
+ VclPtr<CheckBox> m_pDrawChk;
+ VclPtr<vcl::Window> m_pDrawingArea;
VclPtr<Edit> m_pSearchText;
VclPtr<Edit> m_pHexCodeText;
VclPtr<Edit> m_pDecimalCodeText;
@@ -105,6 +107,7 @@ private:
DECL_LINK(SubsetSelectHdl, ListBox&, void);
DECL_LINK(CharDoubleClickHdl, SvxShowCharSet*,void);
DECL_LINK(CharSelectHdl, SvxShowCharSet*, void);
+ DECL_LINK(DrawToggleHdl, Button*, void);
DECL_LINK(CharHighlightHdl, SvxShowCharSet*, void);
DECL_LINK(CharPreSelectHdl, SvxShowCharSet*, void);
DECL_LINK(FavClickHdl, SvxShowCharSet*,void);