From 16ea2665cdfa0b3d7b0d7abcdaae8d60f7654d24 Mon Sep 17 00:00:00 2001 From: Szymon Kłos Date: Wed, 24 Sep 2014 10:30:32 +0200 Subject: fdo#64302: Writer’s Special Character dialog could be simpler MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ia321a9df77a8741245378e5b995b3bc6922266e8 Reviewed-on: https://gerrit.libreoffice.org/11621 Reviewed-by: Samuel Mehrbrodt Tested-by: Samuel Mehrbrodt --- cui/source/dialogs/cuicharmap.cxx | 31 ----- cui/source/inc/cuicharmap.hxx | 6 +- cui/uiconfig/ui/specialcharacters.ui | 247 +++++++++++++++-------------------- 3 files changed, 103 insertions(+), 181 deletions(-) (limited to 'cui') diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx index ca9ca03a15c4..5227bcf92cfb 100644 --- a/cui/source/dialogs/cuicharmap.cxx +++ b/cui/source/dialogs/cuicharmap.cxx @@ -53,8 +53,6 @@ SvxCharacterMap::SvxCharacterMap( vcl::Window* pParent, bool bOne_, const SfxIte m_pShowChar->SetCentered(true); get(m_pShowText, "showtext"); get(m_pOKBtn, "ok"); - get(m_pDeleteBtn, "delete"); - get(m_pDeleteLastBtn, "deletelast"); get(m_pFontText, "fontft"); get(m_pFontLB, "fontlb"); m_pFontLB->SetStyle(m_pFontLB->GetStyle() | WB_SORT); @@ -67,8 +65,6 @@ SvxCharacterMap::SvxCharacterMap( vcl::Window* pParent, bool bOne_, const SfxIte //lock the size request of this widget to the width of the original .ui string m_pCharCodeText->set_width_request(m_pCharCodeText->get_preferred_size().Width()); get(m_pSymbolText, "symboltext"); - //lock the size request of this widget to double the height of the label - m_pShowText->set_height_request(m_pSymbolText->get_preferred_size().Height() * 3); SFX_ITEMSET_ARG( pSet, pItem, SfxBoolItem, FN_PARAM_1, false ); if ( pItem ) @@ -318,8 +314,6 @@ void SvxCharacterMap::init() { m_pSymbolText->Hide(); m_pShowText->Hide(); - m_pDeleteBtn->Hide(); - m_pDeleteLastBtn->Hide(); } OUString aDefStr( aFont.GetName() ); @@ -368,8 +362,6 @@ void SvxCharacterMap::init() m_pShowSet->SetSelectHdl( LINK( this, SvxCharacterMap, CharSelectHdl ) ); m_pShowSet->SetHighlightHdl( LINK( this, SvxCharacterMap, CharHighlightHdl ) ); m_pShowSet->SetPreSelectHdl( LINK( this, SvxCharacterMap, CharPreSelectHdl ) ); - m_pDeleteLastBtn->SetClickHdl( LINK( this, SvxCharacterMap, DeleteLastHdl ) ); - m_pDeleteBtn->SetClickHdl( LINK( this, SvxCharacterMap, DeleteHdl ) ); if( SvxShowCharSet::getSelectedChar() == ' ') m_pOKBtn->Disable(); @@ -526,7 +518,6 @@ IMPL_LINK_NOARG(SvxCharacterMap, CharSelectHdl) } m_pOKBtn->Enable(); - m_pDeleteLastBtn->Enable(); return 0; } @@ -586,26 +577,4 @@ IMPL_LINK_NOARG(SvxCharacterMap, CharPreSelectHdl) return 0; } - - -IMPL_LINK_NOARG(SvxCharacterMap, DeleteLastHdl) -{ - OUString aCurrentText = m_pShowText->GetText(); - m_pShowText->SetText( aCurrentText.copy( 0, aCurrentText.getLength() - 1 ) ); - if ( m_pShowText->GetText() == "" ) - { - m_pOKBtn->Disable(); - m_pDeleteLastBtn->Disable(); - } - return 0; -} - -IMPL_LINK_NOARG(SvxCharacterMap, DeleteHdl) -{ - m_pShowText->SetText( OUString() ); - m_pOKBtn->Disable(); - m_pDeleteLastBtn->Disable(); - return 0; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/inc/cuicharmap.hxx b/cui/source/inc/cuicharmap.hxx index a4d95279c2ac..ebc6df7e86e5 100644 --- a/cui/source/inc/cuicharmap.hxx +++ b/cui/source/inc/cuicharmap.hxx @@ -69,10 +69,8 @@ private: void init(); SvxShowCharSet* m_pShowSet; - SvxShowText* m_pShowText; + Edit* m_pShowText; OKButton* m_pOKBtn; - PushButton* m_pDeleteLastBtn; - PushButton* m_pDeleteBtn; FixedText* m_pFontText; ListBox* m_pFontLB; FixedText* m_pSubsetText; @@ -91,8 +89,6 @@ private: DECL_LINK(CharSelectHdl, void *); DECL_LINK(CharHighlightHdl, void *); DECL_LINK(CharPreSelectHdl, void *); - DECL_LINK(DeleteLastHdl, void *); - DECL_LINK(DeleteHdl, void *); void fillAllSubsets(ListBox &rListBox); diff --git a/cui/uiconfig/ui/specialcharacters.ui b/cui/uiconfig/ui/specialcharacters.ui index 961021fdae58..edfbc30fa40b 100644 --- a/cui/uiconfig/ui/specialcharacters.ui +++ b/cui/uiconfig/ui/specialcharacters.ui @@ -59,35 +59,6 @@ 2 - - - Delete _Last - True - True - True - True - - - False - True - 3 - - - - - gtk-delete - True - True - True - True - bottom - - - False - True - 4 - - False @@ -97,80 +68,26 @@ - + True False - vertical + True + True + 6 + 6 - + True False True - True - 6 - 6 + 12 - + True False - True - 12 - - - True - False - Font - True - fontlb - - - 0 - 0 - 1 - 1 - - - - - True - False - Subset - True - subsetlb - - - 2 - 0 - 1 - 1 - - - - - True - False - True - - - 1 - 0 - 1 - 1 - - - - - True - False - True - - - 3 - 0 - 1 - 1 - - + Font + True + fontlb 0 @@ -180,57 +97,66 @@ - + + True + False + Subset + True + subsetlb + + + 2 + 0 + 1 + 1 + + + + True False True - True - - - True - False - True - U+FFFF(65535) - - - 0 - 1 - 1 - 1 - - - - - 100 - 150 - True - False - True - True - - - 0 - 0 - 1 - 1 - - 1 - 1 + 0 1 1 - - 400 - 250 + True - True + False True - True + + + 3 + 0 + 1 + 1 + + + + + 0 + 0 + 1 + 1 + + + + + True + False + True + True + + + True + False + True + U+FFFF(65535) 0 @@ -240,13 +166,43 @@ - + + 100 + 150 + True + False + True + True + + + 0 + 0 + 1 + 1 + - True - True - 0 + 1 + 1 + 1 + 1 + + + + + 400 + 250 + True + True + True + True + + + 0 + 1 + 1 + 1 @@ -268,27 +224,29 @@ - + True - False + True center + - False - False + True + True 1 - False - True - 1 + 0 + 2 + 1 + 1 - True + False True 1 @@ -299,7 +257,6 @@ ok cancel help - delete -- cgit