[Libreoffice-commits] core.git: chart2/source cui/source cui/uiconfig extras/source include/sfx2 include/svx include/vcl package/source sc/source sd/source sfx2/source sfx2/uiconfig sfx2/UIConfig_sfx.mk starmath/inc starmath/source starmath/uiconfig svx/inc svx/source svx/uiconfig svx/UIConfig_svx.mk sw/source vcl/inc vcl/source vcl/unx

Caolán McNamara caolanm at redhat.com
Fri Mar 30 12:32:38 UTC 2018


 chart2/source/controller/main/ChartController_TextEdit.cxx |    3 
 cui/source/dialogs/colorpicker.cxx                         |   39 
 cui/source/dialogs/cuicharmap.cxx                          |  664 ++++++-------
 cui/source/factory/cuiexp.cxx                              |    1 
 cui/source/factory/dlgfact.cxx                             |   22 
 cui/source/factory/dlgfact.hxx                             |   19 
 cui/source/factory/init.cxx                                |   10 
 cui/source/inc/cuicharmap.hxx                              |  109 +-
 cui/source/tabpages/autocdlg.cxx                           |   26 
 cui/source/tabpages/chardlg.cxx                            |    8 
 cui/source/tabpages/numpages.cxx                           |   18 
 cui/uiconfig/ui/specialcharacters.ui                       |  328 +++---
 extras/source/glade/libreoffice-catalog.xml.in             |   14 
 include/sfx2/charmapcontrol.hxx                            |    8 
 include/sfx2/charwin.hxx                                   |   69 +
 include/svx/charmap.hxx                                    |   67 -
 include/svx/searchcharmap.hxx                              |   16 
 include/svx/strings.hrc                                    |    5 
 include/svx/svxdlg.hxx                                     |    4 
 include/vcl/layout.hxx                                     |   73 +
 include/vcl/weld.hxx                                       |   68 +
 package/source/xstor/xstorage.cxx                          |    7 
 sc/source/ui/view/cellsh1.cxx                              |    2 
 sc/source/ui/view/viewutil.cxx                             |    2 
 sd/source/ui/func/fubullet.cxx                             |    2 
 sfx2/UIConfig_sfx.mk                                       |    1 
 sfx2/source/control/charmapcontrol.cxx                     |    2 
 sfx2/source/control/charwin.cxx                            |  265 ++++-
 sfx2/uiconfig/ui/charmapcontrol.ui                         |   64 -
 sfx2/uiconfig/ui/charviewmenu.ui                           |   25 
 starmath/inc/dialog.hxx                                    |  130 +-
 starmath/source/dialog.cxx                                 |  656 +++++-------
 starmath/uiconfig/smath/ui/symdefinedialog.ui              |  329 +++---
 svx/UIConfig_svx.mk                                        |    1 
 svx/inc/uiobject.hxx                                       |    5 
 svx/source/accessibility/charmapacc.cxx                    |  306 -----
 svx/source/dialog/charmap.cxx                              |  329 ++----
 svx/source/dialog/searchcharmap.cxx                        |  104 --
 svx/source/inc/charmapacc.hxx                              |   62 -
 svx/source/uitest/uiobject.cxx                             |   18 
 svx/uiconfig/ui/charsetmenu.ui                             |   41 
 sw/source/ui/misc/insfnote.cxx                             |    2 
 sw/source/ui/misc/srtdlg.cxx                               |    3 
 sw/source/uibase/shells/annotsh.cxx                        |    2 
 sw/source/uibase/shells/drwtxtsh.cxx                       |    2 
 sw/source/uibase/shells/textsh.cxx                         |    2 
 vcl/inc/unx/gtk/gtkframe.hxx                               |    4 
 vcl/source/app/salvtables.cxx                              |  234 ++++
 vcl/unx/gtk/gtksalframe.cxx                                |    8 
 vcl/unx/gtk3/gtk3gtkframe.cxx                              |    8 
 vcl/unx/gtk3/gtk3gtkinst.cxx                               |  565 ++++++++++-
 51 files changed, 2804 insertions(+), 1948 deletions(-)

New commits:
commit 374599f8c26713905a310673d2b429083321186a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 22 13:41:50 2018 +0000

    weld SvxCharacterMap dialog
    
    and SmSymDefineDialog
    
    There's a whole bunch of interrelated stuff which needs to work at the same
    time.
    
    add menu support, keyboard support, better mouse support,
    a gtk scrollable adaptor to support pseudo scrolling drawing bodge,
    plugable uitest support for custom widgets, plugable a11y support
    for custom widgets via the existing atk_object_wrapper_new wrapper
    for XAccessible
    
    In this specific case, change SvxCharacterMap from something that has an
    internal scrollbar to a scrolledwindow where the scrollbar is external, which
    drops the need for the a11y impl of SvxCharacterMap to emulate being a scrolled
    window and internal table and just needs the table a11y impl
    
    Change-Id: Ia2743d6958021c525a1900154dcbb69ae33fc400
    Reviewed-on: https://gerrit.libreoffice.org/52084
    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/chart2/source/controller/main/ChartController_TextEdit.cxx b/chart2/source/controller/main/ChartController_TextEdit.cxx
index f3c59f6c9d21..89cc3ca0e513 100644
--- a/chart2/source/controller/main/ChartController_TextEdit.cxx
+++ b/chart2/source/controller/main/ChartController_TextEdit.cxx
@@ -166,7 +166,8 @@ void ChartController::executeDispatch_InsertSpecialCharacter()
     vcl::Font aCurFont = m_pDrawViewWrapper->getOutliner()->GetRefDevice()->GetFont();
     aSet.Put( SvxFontItem( aCurFont.GetFamilyType(), aCurFont.GetFamilyName(), aCurFont.GetStyleName(), aCurFont.GetPitch(), aCurFont.GetCharSet(), SID_ATTR_CHAR_FONT ) );
 
-    ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog( GetChartWindow(), aSet, false ));
+    vcl::Window* pWin = GetChartWindow();
+    ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog(pWin ? pWin->GetFrameWeld() : nullptr, aSet, false));
     OSL_ENSURE( pDlg, "Couldn't create SvxCharacterMap dialog" );
     if( pDlg->Execute() == RET_OK )
     {
diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx
index 87605abe22d5..2b9459b6db80 100644
--- a/cui/source/dialogs/colorpicker.cxx
+++ b/cui/source/dialogs/colorpicker.cxx
@@ -227,9 +227,9 @@ public:
 
     DECL_LINK(DoPaint, weld::DrawingArea::draw_args, void);
     DECL_LINK(DoResize, const Size& rSize, void);
-    DECL_LINK(DoButtonDown, const Point& rMEvt, void);
-    DECL_LINK(DoMouseMove, const Point& rMEvt, void);
-    DECL_LINK(DoButtonUp, const Point& rMEvt, void);
+    DECL_LINK(DoButtonDown, const MouseEvent& rMEvt, void);
+    DECL_LINK(DoMouseMove, const MouseEvent& rMEvt, void);
+    DECL_LINK(DoButtonUp, const MouseEvent& rMEvt, void);
 
     void UpdateBitmap();
     void ShowPosition( const Point& rPos, bool bUpdate );
@@ -438,22 +438,24 @@ void ColorFieldControl::ShowPosition( const Point& rPos, bool bUpdate )
     }
 }
 
-IMPL_LINK(ColorFieldControl, DoButtonDown, const Point&, rMEvt, void)
+IMPL_LINK(ColorFieldControl, DoButtonDown, const MouseEvent&, rMEvt, void)
 {
     m_xDrawingArea->connect_mouse_move(LINK(this, ColorFieldControl, DoMouseMove));
-    ShowPosition(rMEvt, true);
+    m_xDrawingArea->grab_add();
+    ShowPosition(rMEvt.GetPosPixel(), true);
     Modify();
 }
 
-IMPL_LINK(ColorFieldControl, DoMouseMove, const Point&, rMEvt, void)
+IMPL_LINK(ColorFieldControl, DoMouseMove, const MouseEvent&, rMEvt, void)
 {
-    ShowPosition(rMEvt, true);
+    ShowPosition(rMEvt.GetPosPixel(), true);
     Modify();
 }
 
-IMPL_LINK_NOARG(ColorFieldControl, DoButtonUp, const Point&, void)
+IMPL_LINK_NOARG(ColorFieldControl, DoButtonUp, const MouseEvent&, void)
 {
-    m_xDrawingArea->connect_mouse_move(Link<const Point&, void>());
+    m_xDrawingArea->grab_remove();
+    m_xDrawingArea->connect_mouse_move(Link<const MouseEvent&, void>());
 }
 
 IMPL_LINK(ColorFieldControl, DoPaint, weld::DrawingArea::draw_args, aPayload, void)
@@ -522,9 +524,9 @@ public:
     ColorSliderControl(weld::DrawingArea* pDrawingArea);
     ~ColorSliderControl();
 
-    DECL_LINK(DoButtonDown, const Point& rMEvt, void);
-    DECL_LINK(DoMouseMove, const Point& rMEvt, void);
-    DECL_LINK(DoButtonUp, const Point& rMEvt, void);
+    DECL_LINK(DoButtonDown, const MouseEvent& rMEvt, void);
+    DECL_LINK(DoMouseMove, const MouseEvent& rMEvt, void);
+    DECL_LINK(DoButtonUp, const MouseEvent& rMEvt, void);
     DECL_LINK(DoPaint, weld::DrawingArea::draw_args, void);
     DECL_LINK(DoResize, const Size& rSize, void);
 
@@ -661,25 +663,24 @@ void ColorSliderControl::ChangePosition(long nY)
     mdValue = double(nHeight - nY) / double(nHeight);
 }
 
-IMPL_LINK(ColorSliderControl, DoButtonDown, const Point&, rMEvt, void)
+IMPL_LINK(ColorSliderControl, DoButtonDown, const MouseEvent&, rMEvt, void)
 {
     m_xDrawingArea->connect_mouse_move(LINK(this, ColorSliderControl, DoMouseMove));
-    ChangePosition(rMEvt.Y());
+    ChangePosition(rMEvt.GetPosPixel().Y());
     Modify();
 }
 
-IMPL_LINK(ColorSliderControl, DoMouseMove, const Point&, rMEvt, void)
+IMPL_LINK(ColorSliderControl, DoMouseMove, const MouseEvent&, rMEvt, void)
 {
-    ChangePosition(rMEvt.Y());
+    ChangePosition(rMEvt.GetPosPixel().Y());
     Modify();
 }
 
-IMPL_LINK_NOARG(ColorSliderControl, DoButtonUp, const Point&, void)
+IMPL_LINK_NOARG(ColorSliderControl, DoButtonUp, const MouseEvent&, void)
 {
-    m_xDrawingArea->connect_mouse_move(Link<const Point&, void>());
+    m_xDrawingArea->connect_mouse_move(Link<const MouseEvent&, void>());
 }
 
-
 IMPL_LINK(ColorSliderControl, DoPaint, weld::DrawingArea::draw_args, aPayload, void)
 {
     vcl::RenderContext& rRenderContext = aPayload.first;
diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx
index 2aa6c6cb060e..ea36b0c0bc8c 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -32,6 +32,7 @@
 #include <vcl/builderfactory.hxx>
 #include <vcl/fontcharmap.hxx>
 #include <svl/stritem.hxx>
+#include <o3tl/make_unique.hxx>
 #include <officecfg/Office/Common.hxx>
 #include <comphelper/processfactory.hxx>
 #include <comphelper/propertysequence.hxx>
@@ -52,71 +53,72 @@
 
 using namespace css;
 
-// class SvxCharacterMap =================================================
-
-SvxCharacterMap::SvxCharacterMap( vcl::Window* pParent, const SfxItemSet* pSet, bool bInsert )
-    : SfxModalDialog(pParent, "SpecialCharactersDialog", "cui/ui/specialcharacters.ui")
+SvxCharacterMap::SvxCharacterMap(weld::Window* pParent, const SfxItemSet* pSet, bool bInsert)
+    : GenericDialogController(pParent, "cui/ui/specialcharacters.ui", "SpecialCharactersDialog")
+    , m_xVirDev(VclPtr<VirtualDevice>::Create())
     , pSubsetMap( nullptr )
     , isSearchMode(true)
     , m_bHasInsert(bInsert)
     , mxContext(comphelper::getProcessComponentContext())
+    , m_xOKBtn(bInsert ? m_xBuilder->weld_button("insert") : m_xBuilder->weld_button("ok"))
+    , m_xFontText(m_xBuilder->weld_label("fontft"))
+    , m_xFontLB(m_xBuilder->weld_combo_box_text("fontlb"))
+    , m_xSubsetText(m_xBuilder->weld_label("subsetft"))
+    , m_xSubsetLB(m_xBuilder->weld_combo_box_text("subsetlb"))
+    , m_xSearchText(m_xBuilder->weld_entry("search"))
+    , m_xHexCodeText(m_xBuilder->weld_entry("hexvalue"))
+    , m_xDecimalCodeText(m_xBuilder->weld_entry("decimalvalue"))
+    , m_xFavouritesBtn(m_xBuilder->weld_button("favbtn"))
+    , m_xCharName(m_xBuilder->weld_label("charname"))
+    , m_xRecentGrid(m_xBuilder->weld_widget("viewgrid"))
+    , m_xFavGrid(m_xBuilder->weld_widget("favgrid"))
+    , m_xShowChar(new SvxShowText(*m_xBuilder, "showchar", m_xVirDev))
+    , m_xRecentCharView{o3tl::make_unique<SvxCharView>(*m_xBuilder, "viewchar1", m_xVirDev),
+                        o3tl::make_unique<SvxCharView>(*m_xBuilder, "viewchar2", m_xVirDev),
+                        o3tl::make_unique<SvxCharView>(*m_xBuilder, "viewchar3", m_xVirDev),
+                        o3tl::make_unique<SvxCharView>(*m_xBuilder, "viewchar4", m_xVirDev),
+                        o3tl::make_unique<SvxCharView>(*m_xBuilder, "viewchar5", m_xVirDev),
+                        o3tl::make_unique<SvxCharView>(*m_xBuilder, "viewchar6", m_xVirDev),
+                        o3tl::make_unique<SvxCharView>(*m_xBuilder, "viewchar7", m_xVirDev),
+                        o3tl::make_unique<SvxCharView>(*m_xBuilder, "viewchar8", m_xVirDev),
+                        o3tl::make_unique<SvxCharView>(*m_xBuilder, "viewchar9", m_xVirDev),
+                        o3tl::make_unique<SvxCharView>(*m_xBuilder, "viewchar10", m_xVirDev),
+                        o3tl::make_unique<SvxCharView>(*m_xBuilder, "viewchar11", m_xVirDev),
+                        o3tl::make_unique<SvxCharView>(*m_xBuilder, "viewchar12", m_xVirDev),
+                        o3tl::make_unique<SvxCharView>(*m_xBuilder, "viewchar13", m_xVirDev),
+                        o3tl::make_unique<SvxCharView>(*m_xBuilder, "viewchar14", m_xVirDev),
+                        o3tl::make_unique<SvxCharView>(*m_xBuilder, "viewchar15", m_xVirDev),
+                        o3tl::make_unique<SvxCharView>(*m_xBuilder, "viewchar16", m_xVirDev)}
+    , m_xFavCharView{o3tl::make_unique<SvxCharView>(*m_xBuilder, "favchar1", m_xVirDev),
+                     o3tl::make_unique<SvxCharView>(*m_xBuilder, "favchar2", m_xVirDev),
+                     o3tl::make_unique<SvxCharView>(*m_xBuilder, "favchar3", m_xVirDev),
+                     o3tl::make_unique<SvxCharView>(*m_xBuilder, "favchar4", m_xVirDev),
+                     o3tl::make_unique<SvxCharView>(*m_xBuilder, "favchar5", m_xVirDev),
+                     o3tl::make_unique<SvxCharView>(*m_xBuilder, "favchar6", m_xVirDev),
+                     o3tl::make_unique<SvxCharView>(*m_xBuilder, "favchar7", m_xVirDev),
+                     o3tl::make_unique<SvxCharView>(*m_xBuilder, "favchar8", m_xVirDev),
+                     o3tl::make_unique<SvxCharView>(*m_xBuilder, "favchar9", m_xVirDev),
+                     o3tl::make_unique<SvxCharView>(*m_xBuilder, "favchar10", m_xVirDev),
+                     o3tl::make_unique<SvxCharView>(*m_xBuilder, "favchar11", m_xVirDev),
+                     o3tl::make_unique<SvxCharView>(*m_xBuilder, "favchar12", m_xVirDev),
+                     o3tl::make_unique<SvxCharView>(*m_xBuilder, "favchar13", m_xVirDev),
+                     o3tl::make_unique<SvxCharView>(*m_xBuilder, "favchar14", m_xVirDev),
+                     o3tl::make_unique<SvxCharView>(*m_xBuilder, "favchar15", m_xVirDev),
+                     o3tl::make_unique<SvxCharView>(*m_xBuilder, "favchar16", m_xVirDev)}
+    , m_xShowSet(new SvxShowCharSet(*m_xBuilder, "showcharset", "showscroll", m_xVirDev))
+    , m_xSearchSet(new SvxSearchCharSet(*m_xBuilder, "searchcharset", "searchscroll", m_xVirDev))
 {
-    get(m_pShowSet, "showcharset");
-    get(m_pSearchSet, "searchcharset");
-    get(m_pShowChar, "showchar");
-    m_pShowChar->SetCentered(true);
-    if (m_bHasInsert) get(m_pOKBtn, "insert");
-    else get(m_pOKBtn, "ok");
-    get(m_pFontText, "fontft");
-    get(m_pFontLB, "fontlb");
-    m_pFontLB->SetStyle(m_pFontLB->GetStyle() | WB_SORT);
-    get(m_pSubsetText, "subsetft");
-    get(m_pSubsetLB, "subsetlb");
+    m_xShowChar->SetCentered(true);
+    m_xFontLB->make_sorted();
     //lock the size request of this widget to the width of all possible entries
-    fillAllSubsets(*m_pSubsetLB);
-    m_pSubsetLB->set_width_request(m_pSubsetLB->get_preferred_size().Width());
-    get(m_pHexCodeText, "hexvalue");    get(m_pDecimalCodeText, "decimalvalue");
-    get(m_pFavouritesBtn, "favbtn");
-    get(m_pCharName, "charname");
-    m_pCharName->set_height_request(m_pCharName->GetTextHeight()*3);
-    m_pCharName->SetPaintTransparent(true);
-    get(m_pSearchText, "search");
+    fillAllSubsets(*m_xSubsetLB);
+    m_xSubsetLB->set_size_request(m_xSubsetLB->get_preferred_size().Width(), -1);
+    m_xCharName->set_size_request(m_xShowChar->get_preferred_size().Width(), m_xCharName->get_text_height() * 4);
     //lock the size request of this widget to the width of the original .ui string
-    m_pHexCodeText->set_width_request(m_pHexCodeText->get_preferred_size().Width());
-
-    get( m_pRecentCharView[0], "viewchar1" );
-    get( m_pRecentCharView[1], "viewchar2" );
-    get( m_pRecentCharView[2], "viewchar3" );
-    get( m_pRecentCharView[3], "viewchar4" );
-    get( m_pRecentCharView[4], "viewchar5" );
-    get( m_pRecentCharView[5], "viewchar6" );
-    get( m_pRecentCharView[6], "viewchar7" );
-    get( m_pRecentCharView[7], "viewchar8" );
-    get( m_pRecentCharView[8], "viewchar9" );
-    get( m_pRecentCharView[9], "viewchar10" );
-    get( m_pRecentCharView[10], "viewchar11" );
-    get( m_pRecentCharView[11], "viewchar12" );
-    get( m_pRecentCharView[12], "viewchar13" );
-    get( m_pRecentCharView[13], "viewchar14" );
-    get( m_pRecentCharView[14], "viewchar15" );
-    get( m_pRecentCharView[15], "viewchar16" );
-
-    get( m_pFavCharView[0], "favchar1" );
-    get( m_pFavCharView[1], "favchar2" );
-    get( m_pFavCharView[2], "favchar3" );
-    get( m_pFavCharView[3], "favchar4" );
-    get( m_pFavCharView[4], "favchar5" );
-    get( m_pFavCharView[5], "favchar6" );
-    get( m_pFavCharView[6], "favchar7" );
-    get( m_pFavCharView[7], "favchar8" );
-    get( m_pFavCharView[8], "favchar9" );
-    get( m_pFavCharView[9], "favchar10" );
-    get( m_pFavCharView[10], "favchar11" );
-    get( m_pFavCharView[11], "favchar12" );
-    get( m_pFavCharView[12], "favchar13" );
-    get( m_pFavCharView[13], "favchar14" );
-    get( m_pFavCharView[14], "favchar15" );
-    get( m_pFavCharView[15], "favchar16" );
+    m_xHexCodeText->set_size_request(m_xHexCodeText->get_preferred_size().Width(), -1);
+    //so things don't jump around if all the children are hidden
+    m_xRecentGrid->set_size_request(-1, m_xRecentCharView[0]->get_preferred_size().Height());
+    m_xFavGrid->set_size_request(-1, m_xFavCharView[0]->get_preferred_size().Height());
 
     init();
 
@@ -144,84 +146,49 @@ SvxCharacterMap::SvxCharacterMap( vcl::Window* pParent, const SfxItemSet* pSet,
         SetCharFont( aTmpFont );
     }
 
-    CreateOutputItemSet( pSet ? *pSet->GetPool() : SfxGetpApp()->GetPool() );
-    m_pShowSet->Show();
-    m_pSearchSet->Hide();
-}
-
-SvxCharacterMap::~SvxCharacterMap()
-{
-    disposeOnce();
+    m_xOutputSet.reset(new SfxAllItemSet(pSet ? *pSet->GetPool() : SfxGetpApp()->GetPool()));
+    m_xShowSet->Show();
+    m_xSearchSet->Hide();
 }
 
-short SvxCharacterMap::Execute()
+short SvxCharacterMap::execute()
 {
     if( SvxShowCharSet::getSelectedChar() == ' ')
     {
-        m_pOKBtn->Disable();
+        m_xOKBtn->set_sensitive(false);
         setFavButtonState(OUString(), OUString());
     }
     else
     {
-        sal_UCS4 cChar = m_pShowSet->GetSelectCharacter();
+        sal_UCS4 cChar = m_xShowSet->GetSelectCharacter();
         // using the new UCS4 constructor
         OUString aOUStr( &cChar, 1 );
-        m_pShowChar->SetText(aOUStr);
+        m_xShowChar->SetText(aOUStr);
 
-        setFavButtonState(aOUStr, m_pShowChar->GetFont().GetFamilyName());
-        m_pOKBtn->Enable();
+        setFavButtonState(aOUStr, m_xShowChar->GetFont().GetFamilyName());
+        m_xOKBtn->set_sensitive(true);
     }
 
-    return SfxModalDialog::Execute();
+    return run();
 }
 
-void SvxCharacterMap::dispose()
-{
-    for(int i = 0; i < 16; i++)
-        m_pRecentCharView[i].clear();
-
-    m_pShowSet.clear();
-    m_pSearchSet.clear();
-    m_pOKBtn.clear();
-    m_pFontText.clear();
-    m_pFontLB.clear();
-    m_pSubsetText.clear();
-    m_pSubsetLB.clear();
-    m_pShowChar.clear();
-    m_pHexCodeText.clear();
-    m_pDecimalCodeText.clear();
-    m_pCharName.clear();
-
-    maRecentCharList.clear();
-    maRecentCharFontList.clear();
-    maFavCharList.clear();
-    maFavCharFontList.clear();
-
-    m_pFavouritesBtn.clear();
-    m_pSearchText.clear();
-
-    SfxModalDialog::dispose();
-}
-
-
 void SvxCharacterMap::SetChar( sal_UCS4 c )
 {
-    m_pShowSet->SelectCharacter( c );
-
+    m_xShowSet->SelectCharacter( c );
     setFavButtonState(OUString(&c, 1), aFont.GetFamilyName());
 }
 
 
 sal_UCS4 SvxCharacterMap::GetChar() const
 {
-   return (m_pShowChar->GetText()).toChar();
+   return (m_xShowChar->GetText()).toChar();
 }
 
 
 void SvxCharacterMap::DisableFontSelection()
 {
-    m_pFontText->Disable();
-    m_pFontLB->Disable();
+    m_xFontText->set_sensitive(false);
+    m_xFontLB->set_sensitive(false);
 }
 
 
@@ -270,17 +237,17 @@ void SvxCharacterMap::updateRecentCharControl()
         it != maRecentCharList.end() || it2 != maRecentCharFontList.end();
         ++it, ++it2, i++)
     {
-        m_pRecentCharView[i]->SetText(*it);
-        vcl::Font rFont = m_pRecentCharView[i]->GetControlFont();
+        m_xRecentCharView[i]->SetText(*it);
+        vcl::Font rFont = m_xRecentCharView[i]->GetFont();
         rFont.SetFamilyName( *it2 );
-        m_pRecentCharView[i]->SetFont(rFont);
-        m_pRecentCharView[i]->Show();
+        m_xRecentCharView[i]->SetFont(rFont);
+        m_xRecentCharView[i]->Show();
     }
 
     for(; i < 16 ; i++)
     {
-        m_pRecentCharView[i]->SetText(OUString());
-        m_pRecentCharView[i]->Hide();
+        m_xRecentCharView[i]->SetText(OUString());
+        m_xRecentCharView[i]->Hide();
     }
 }
 
@@ -377,23 +344,22 @@ void SvxCharacterMap::updateFavCharControl()
         it != maFavCharList.end() || it2 != maFavCharFontList.end();
         ++it, ++it2, i++)
     {
-        m_pFavCharView[i]->SetText(*it);
-        vcl::Font rFont = m_pFavCharView[i]->GetControlFont();
+        m_xFavCharView[i]->SetText(*it);
+        vcl::Font rFont = m_xFavCharView[i]->GetFont();
         rFont.SetFamilyName( *it2 );
-        m_pFavCharView[i]->SetFont(rFont);
-        m_pFavCharView[i]->Show();
+        m_xFavCharView[i]->SetFont(rFont);
+        m_xFavCharView[i]->Show();
     }
 
     for(; i < 16 ; i++)
     {
-        m_pFavCharView[i]->SetText(OUString());
-        m_pFavCharView[i]->Hide();
+        m_xFavCharView[i]->SetText(OUString());
+        m_xFavCharView[i]->Hide();
     }
-    m_pShowSet->getFavCharacterList();
-    m_pSearchSet->getFavCharacterList();
+    m_xShowSet->getFavCharacterList();
+    m_xSearchSet->getFavCharacterList();
 }
 
-
 void SvxCharacterMap::deleteFavCharacterFromList(const OUString& sTitle, const OUString& rFont)
 {
     auto itChar = std::find_if(maFavCharList.begin(),
@@ -426,10 +392,9 @@ void SvxCharacterMap::deleteFavCharacterFromList(const OUString& sTitle, const O
     batch->commit();
 }
 
-
 void SvxCharacterMap::init()
 {
-    aFont = GetFont();
+    aFont = m_xVirDev->GetFont();
     aFont.SetTransparent( true );
     aFont.SetFamily( FAMILY_DONTKNOW );
     aFont.SetPitch( PITCH_DONTKNOW );
@@ -437,28 +402,27 @@ void SvxCharacterMap::init()
 
     OUString aDefStr( aFont.GetFamilyName() );
     OUString aLastName;
-    int nCount = GetDevFontCount();
+    int nCount = m_xVirDev->GetDevFontCount();
     for ( int i = 0; i < nCount; i++ )
     {
-        OUString aFontName( GetDevFont( i ).GetFamilyName() );
-        if ( aFontName != aLastName )
+        OUString aFontName( m_xVirDev->GetDevFont( i ).GetFamilyName() );
+        if (aFontName != aLastName)
         {
             aLastName = aFontName;
-            const sal_Int32 nPos = m_pFontLB->InsertEntry( aFontName );
-            m_pFontLB->SetEntryData( nPos, reinterpret_cast<void*>(i) );
+            m_xFontLB->append(OUString::number(i), aFontName);
         }
     }
     // the font may not be in the list =>
     // try to find a font name token in list and select found font,
     // else select topmost entry
-    bool bFound = (m_pFontLB->GetEntryPos( aDefStr ) == LISTBOX_ENTRY_NOTFOUND );
-    if( !bFound )
+    bool bFound = (m_xFontLB->find_text(aDefStr) == -1);
+    if (!bFound)
     {
         sal_Int32 nIndex = 0;
         do
         {
             OUString aToken = aDefStr.getToken(0, ';', nIndex);
-            if ( m_pFontLB->GetEntryPos( aToken ) != LISTBOX_ENTRY_NOTFOUND )
+            if (m_xFontLB->find_text(aToken) != -1)
             {
                 aDefStr = aToken;
                 bFound = true;
@@ -468,47 +432,46 @@ void SvxCharacterMap::init()
         while ( nIndex >= 0 );
     }
 
-    if ( bFound )
-        m_pFontLB->SelectEntry( aDefStr );
-    else if ( m_pFontLB->GetEntryCount() )
-        m_pFontLB->SelectEntryPos(0);
-    FontSelectHdl(*m_pFontLB);
-
-    m_pFontLB->SetSelectHdl( LINK( this, SvxCharacterMap, FontSelectHdl ) );
-    m_pSubsetLB->SetSelectHdl( LINK( this, SvxCharacterMap, SubsetSelectHdl ) );
-    m_pOKBtn->SetClickHdl( LINK( this, SvxCharacterMap, InsertClickHdl ) );
-    m_pOKBtn->Show();
-
-
-    m_pShowSet->SetDoubleClickHdl( LINK( this, SvxCharacterMap, CharDoubleClickHdl ) );
-    m_pShowSet->SetSelectHdl( LINK( this, SvxCharacterMap, CharSelectHdl ) );
-    m_pShowSet->SetHighlightHdl( LINK( this, SvxCharacterMap, CharHighlightHdl ) );
-    m_pShowSet->SetPreSelectHdl( LINK( this, SvxCharacterMap, CharPreSelectHdl ) );
-    m_pShowSet->SetFavClickHdl( LINK( this, SvxCharacterMap, FavClickHdl ) );
-
-    m_pSearchSet->SetDoubleClickHdl( LINK( this, SvxCharacterMap, SearchCharDoubleClickHdl ) );
-    m_pSearchSet->SetSelectHdl( LINK( this, SvxCharacterMap, SearchCharSelectHdl ) );
-    m_pSearchSet->SetHighlightHdl( LINK( this, SvxCharacterMap, SearchCharHighlightHdl ) );
-    m_pSearchSet->SetPreSelectHdl( LINK( this, SvxCharacterMap, SearchCharPreSelectHdl ) );
-    m_pSearchSet->SetFavClickHdl( LINK( this, SvxCharacterMap, FavClickHdl ) );
-
-    m_pDecimalCodeText->SetModifyHdl( LINK( this, SvxCharacterMap, DecimalCodeChangeHdl ) );
-    m_pHexCodeText->SetModifyHdl( LINK( this, SvxCharacterMap, HexCodeChangeHdl ) );
-    m_pFavouritesBtn->SetClickHdl( LINK(this, SvxCharacterMap, FavSelectHdl));
+    if (bFound)
+        m_xFontLB->set_active(aDefStr);
+    else if (m_xFontLB->get_count() )
+        m_xFontLB->set_active(0);
+    FontSelectHdl(*m_xFontLB);
+
+    m_xFontLB->connect_changed(LINK( this, SvxCharacterMap, FontSelectHdl));
+    m_xSubsetLB->connect_changed(LINK( this, SvxCharacterMap, SubsetSelectHdl));
+    m_xOKBtn->connect_clicked(LINK(this, SvxCharacterMap, InsertClickHdl));
+    m_xOKBtn->show();
+
+    m_xShowSet->SetDoubleClickHdl( LINK( this, SvxCharacterMap, CharDoubleClickHdl ) );
+    m_xShowSet->SetSelectHdl( LINK( this, SvxCharacterMap, CharSelectHdl ) );
+    m_xShowSet->SetHighlightHdl( LINK( this, SvxCharacterMap, CharHighlightHdl ) );
+    m_xShowSet->SetPreSelectHdl( LINK( this, SvxCharacterMap, CharPreSelectHdl ) );
+    m_xShowSet->SetFavClickHdl( LINK( this, SvxCharacterMap, FavClickHdl ) );
+
+    m_xSearchSet->SetDoubleClickHdl( LINK( this, SvxCharacterMap, SearchCharDoubleClickHdl ) );
+    m_xSearchSet->SetSelectHdl( LINK( this, SvxCharacterMap, SearchCharSelectHdl ) );
+    m_xSearchSet->SetHighlightHdl( LINK( this, SvxCharacterMap, SearchCharHighlightHdl ) );
+    m_xSearchSet->SetPreSelectHdl( LINK( this, SvxCharacterMap, SearchCharPreSelectHdl ) );
+    m_xSearchSet->SetFavClickHdl( LINK( this, SvxCharacterMap, FavClickHdl ) );
+
+    m_xDecimalCodeText->connect_changed( LINK( this, SvxCharacterMap, DecimalCodeChangeHdl ) );
+    m_xHexCodeText->connect_changed( LINK( this, SvxCharacterMap, HexCodeChangeHdl ) );
+    m_xFavouritesBtn->connect_clicked( LINK(this, SvxCharacterMap, FavSelectHdl));
 
     if( SvxShowCharSet::getSelectedChar() == ' ')
     {
-        m_pOKBtn->Disable();
+        m_xOKBtn->set_sensitive(false);
     }
     else
     {
-        sal_UCS4 cChar = m_pShowSet->GetSelectCharacter();
+        sal_UCS4 cChar = m_xShowSet->GetSelectCharacter();
         // using the new UCS4 constructor
         OUString aOUStr( &cChar, 1 );
-        m_pShowChar->SetText(aOUStr);
+        m_xShowChar->SetText(aOUStr);
 
         setFavButtonState(aOUStr, aDefStr);
-        m_pOKBtn->Enable();
+        m_xOKBtn->set_sensitive(true);
     }
 
     getRecentCharacterList();
@@ -519,23 +482,22 @@ 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));
-        m_pFavCharView[i]->SetLoseFocusHdl(LINK(this,SvxCharacterMap, LoseFocusHdl));
+        m_xRecentCharView[i]->SetHasInsert(m_bHasInsert);
+        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);
 
-    m_pSearchText->SetGetFocusHdl(LINK( this, SvxCharacterMap, SearchFieldGetFocusHdl ));
-    m_pSearchText->SetUpdateDataHdl(LINK( this, SvxCharacterMap, SearchUpdateHdl ));
-    m_pSearchText->EnableUpdateData();
+    m_xSearchText->connect_focus_in(LINK( this, SvxCharacterMap, SearchFieldGetFocusHdl ));
+    m_xSearchText->connect_changed(LINK(this, SvxCharacterMap, SearchUpdateHdl));
 }
 
 bool SvxCharacterMap::isFavChar(const OUString& sTitle, const OUString& rFont)
@@ -560,24 +522,24 @@ void SvxCharacterMap::setFavButtonState(const OUString& sTitle, const OUString&
 {
     if(sTitle.isEmpty() || rFont.isEmpty())
     {
-        m_pFavouritesBtn->Disable();
+        m_xFavouritesBtn->set_sensitive(false);
         return;
     }
     else
-        m_pFavouritesBtn->Enable();
+        m_xFavouritesBtn->set_sensitive(true);
 
     if(isFavChar(sTitle, rFont))
     {
-        m_pFavouritesBtn->SetText(CuiResId(RID_SVXSTR_REMOVE_FAVORITES));
+        m_xFavouritesBtn->set_label(CuiResId(RID_SVXSTR_REMOVE_FAVORITES));
     }
     else
     {
         if(maFavCharList.size() == 16)
         {
-            m_pFavouritesBtn->Disable();
+            m_xFavouritesBtn->set_sensitive(false);
         }
 
-        m_pFavouritesBtn->SetText(CuiResId(RID_SVXSTR_ADD_FAVORITES));
+        m_xFavouritesBtn->set_label(CuiResId(RID_SVXSTR_ADD_FAVORITES));
     }
 }
 
@@ -586,33 +548,29 @@ void SvxCharacterMap::SetCharFont( const vcl::Font& rFont )
 {
     // first get the underlying info in order to get font names
     // like "Times New Roman;Times" resolved
-    vcl::Font aTmp( GetFontMetric( rFont ) );
+    vcl::Font aTmp(m_xVirDev->GetFontMetric(rFont));
 
-    if (aTmp.GetFamilyName() == "StarSymbol" && m_pFontLB->GetEntryPos(aTmp.GetFamilyName()) == LISTBOX_ENTRY_NOTFOUND)
+    if (aTmp.GetFamilyName() == "StarSymbol" && m_xFontLB->find_text(aTmp.GetFamilyName()) == -1)
     {
         //if for some reason, like font in an old document, StarSymbol is requested and its not available, then
         //try OpenSymbol instead
         aTmp.SetFamilyName("OpenSymbol");
     }
 
-    if ( m_pFontLB->GetEntryPos( aTmp.GetFamilyName() ) == LISTBOX_ENTRY_NOTFOUND )
+    if (m_xFontLB->find_text(aTmp.GetFamilyName()) == -1)
         return;
 
-    m_pFontLB->SelectEntry( aTmp.GetFamilyName() );
+    m_xFontLB->set_active(aTmp.GetFamilyName());
     aFont = aTmp;
-    FontSelectHdl(*m_pFontLB);
-
-    // for compatibility reasons
-    ModalDialog::SetFont( aFont );
+    FontSelectHdl(*m_xFontLB);
 }
 
-
-void SvxCharacterMap::fillAllSubsets(ListBox &rListBox)
+void SvxCharacterMap::fillAllSubsets(weld::ComboBoxText& rListBox)
 {
     SubsetMap aAll(nullptr);
-    rListBox.Clear();
+    rListBox.clear();
     for (auto & subset : aAll.GetSubsetMap())
-        rListBox.InsertEntry( subset.GetName() );
+        rListBox.append_text(subset.GetName());
 }
 
 
@@ -635,27 +593,21 @@ void SvxCharacterMap::insertCharToDoc(const OUString& sGlyph)
         updateRecentCharacterList(sGlyph, aFont.GetFamilyName());
 
     } else {
-        SfxItemSet* pSet = GetOutputSetImpl();
-        if ( pSet )
-        {
-            sal_Int32 tmp = 0;
-            sal_UCS4 cChar = sGlyph.iterateCodePoints(&tmp);
-            const SfxItemPool* pPool = pSet->GetPool();
-            pSet->Put( SfxStringItem( pPool->GetWhich(SID_CHARMAP), sGlyph ) );
-            pSet->Put( SvxFontItem( aFont.GetFamilyType(), aFont.GetFamilyName(),
-                aFont.GetStyleName(), aFont.GetPitch(), aFont.GetCharSet(), pPool->GetWhich(SID_ATTR_CHAR_FONT) ) );
-            pSet->Put( SfxStringItem( pPool->GetWhich(SID_FONT_NAME), aFont.GetFamilyName() ) );
-            pSet->Put( SfxInt32Item( pPool->GetWhich(SID_ATTR_CHAR), cChar ) );
-        }
+        sal_Int32 tmp = 0;
+        sal_UCS4 cChar = sGlyph.iterateCodePoints(&tmp);
+        const SfxItemPool* pPool = m_xOutputSet->GetPool();
+        m_xOutputSet->Put( SfxStringItem( pPool->GetWhich(SID_CHARMAP), sGlyph ) );
+        m_xOutputSet->Put( SvxFontItem( aFont.GetFamilyType(), aFont.GetFamilyName(),
+            aFont.GetStyleName(), aFont.GetPitch(), aFont.GetCharSet(), pPool->GetWhich(SID_ATTR_CHAR_FONT) ) );
+        m_xOutputSet->Put( SfxStringItem( pPool->GetWhich(SID_FONT_NAME), aFont.GetFamilyName() ) );
+        m_xOutputSet->Put( SfxInt32Item( pPool->GetWhich(SID_ATTR_CHAR), cChar ) );
     }
 }
 
-
-IMPL_LINK_NOARG(SvxCharacterMap, FontSelectHdl, ListBox&, void)
+IMPL_LINK_NOARG(SvxCharacterMap, FontSelectHdl, weld::ComboBoxText&, void)
 {
-    const sal_Int32 nPos = m_pFontLB->GetSelectedEntryPos();
-    const sal_uInt16 nFont = static_cast<sal_uInt16>(reinterpret_cast<sal_uLong>(m_pFontLB->GetEntryData( nPos )));
-    aFont = GetDevFont( nFont );
+    const sal_uInt32 nFont = m_xFontLB->get_active_id().toUInt32();
+    aFont = m_xVirDev->GetDevFont(nFont);
     aFont.SetWeight( WEIGHT_DONTKNOW );
     aFont.SetItalic( ITALIC_NONE );
     aFont.SetWidthType( WIDTH_DONTKNOW );
@@ -663,13 +615,13 @@ IMPL_LINK_NOARG(SvxCharacterMap, FontSelectHdl, ListBox&, void)
     aFont.SetFamily( FAMILY_DONTKNOW );
 
     // notify children using this font
-    m_pShowSet->SetFont( aFont );
-    m_pSearchSet->SetFont( aFont );
-    m_pShowChar->SetFont( aFont );
-    if(isSearchMode)
+    m_xShowSet->SetFont( aFont );
+    m_xSearchSet->SetFont( aFont );
+    m_xShowChar->SetFont( aFont );
+    if (isSearchMode)
     {
-        SearchUpdateHdl(*m_pSearchText);
-        SearchCharHighlightHdl(m_pSearchSet);
+        SearchUpdateHdl(*m_xSearchText);
+        SearchCharHighlightHdl(m_xSearchSet.get());
     }
 
     // setup unicode subset listbar with font specific subsets,
@@ -677,50 +629,50 @@ IMPL_LINK_NOARG(SvxCharacterMap, FontSelectHdl, ListBox&, void)
     // TODO: get info from the Font once it provides it
     delete pSubsetMap;
     pSubsetMap = nullptr;
-    m_pSubsetLB->Clear();
+    m_xSubsetLB->clear();
 
     bool bNeedSubset = (aFont.GetCharSet() != RTL_TEXTENCODING_SYMBOL);
-    if( bNeedSubset )
+    if (bNeedSubset)
     {
         FontCharMapRef xFontCharMap( new FontCharMap() );
-        m_pShowSet->GetFontCharMap( xFontCharMap );
+        m_xShowSet->GetFontCharMap( xFontCharMap );
         pSubsetMap = new SubsetMap( xFontCharMap );
 
         // update subset listbox for new font's unicode subsets
         bool bFirst = true;
         for (auto const& subset : pSubsetMap->GetSubsetMap())
         {
-            const sal_Int32 nPos_ = m_pSubsetLB->InsertEntry( subset.GetName() );
-            m_pSubsetLB->SetEntryData( nPos_, const_cast<Subset *>(&subset) );
+            m_xSubsetLB->append(OUString::number(reinterpret_cast<sal_uInt64>(&subset)), subset.GetName());
             // NOTE: subset must live at least as long as the selected font
-            if( bFirst )
-                m_pSubsetLB->SelectEntryPos( nPos_ );
+            if (bFirst)
+                m_xSubsetLB->set_active(0);
             bFirst = false;
         }
-        if( m_pSubsetLB->GetEntryCount() <= 1 )
+
+        if (m_xSubsetLB->get_count() <= 1)
             bNeedSubset = false;
     }
 
-    m_pSubsetText->Enable(bNeedSubset);
-    m_pSubsetLB->Enable(bNeedSubset);
+    m_xSubsetText->set_sensitive(bNeedSubset);
+    m_xSubsetLB->set_sensitive(bNeedSubset);
 }
 
 void SvxCharacterMap::toggleSearchView(bool state)
 {
     isSearchMode = state;
-    m_pHexCodeText->SetReadOnly(state);
-    m_pDecimalCodeText->SetReadOnly(state);
-    m_pSubsetLB->Enable(!state);
+    m_xHexCodeText->set_editable(!state);
+    m_xDecimalCodeText->set_editable(!state);
+    m_xSubsetLB->set_sensitive(!state);
 
     if(state)
     {
-        m_pSearchSet->Show();
-        m_pShowSet->Hide();
+        m_xSearchSet->Show();
+        m_xShowSet->Hide();
     }
     else
     {
-        m_pSearchSet->Hide();
-        m_pShowSet->Show();
+        m_xSearchSet->Hide();
+        m_xShowSet->Show();
     }
 }
 
@@ -733,34 +685,35 @@ void SvxCharacterMap::setCharName(sal_UCS4 nDecimalValue)
     char buffer[100];
     u_charName(nDecimalValue, U_UNICODE_CHAR_NAME, buffer, sizeof(buffer), &errorCode);
     if (U_SUCCESS(errorCode))
-        m_pCharName->SetText(OUString::createFromAscii(buffer));
+        m_xCharName->set_label(OUString::createFromAscii(buffer));
 }
 
-IMPL_LINK_NOARG(SvxCharacterMap, SubsetSelectHdl, ListBox&, void)
+IMPL_LINK_NOARG(SvxCharacterMap, SubsetSelectHdl, weld::ComboBoxText&, void)
 {
-    const sal_Int32 nPos = m_pSubsetLB->GetSelectedEntryPos();
-    const Subset* pSubset = static_cast<const Subset*> (m_pSubsetLB->GetEntryData(nPos));
+    const sal_Int32 nPos = m_xSubsetLB->get_active();
+    const Subset* pSubset = reinterpret_cast<const Subset*>(m_xSubsetLB->get_active_id().toUInt64());
+
     if( pSubset && !isSearchMode)
     {
         sal_UCS4 cFirst = pSubset->GetRangeMin();
-        m_pShowSet->SelectCharacter( cFirst );
+        m_xShowSet->SelectCharacter( cFirst );
 
         setFavButtonState(OUString(&cFirst, 1), aFont.GetFamilyName());
-        m_pSubsetLB->SelectEntryPos( nPos );
+        m_xSubsetLB->set_active(nPos);
     }
     else if( pSubset && isSearchMode)
     {
-        m_pSearchSet->SelectCharacter( pSubset );
+        m_xSearchSet->SelectCharacter( pSubset );
 
         const Subset* curSubset = nullptr;
         if( pSubsetMap )
-            curSubset = pSubsetMap->GetSubsetByUnicode( m_pSearchSet->GetSelectCharacter() );
+            curSubset = pSubsetMap->GetSubsetByUnicode( m_xSearchSet->GetSelectCharacter() );
         if( curSubset )
-            m_pSubsetLB->SelectEntry( curSubset->GetName() );
+            m_xSubsetLB->set_active(curSubset->GetName());
         else
-            m_pSubsetLB->SetNoSelection();
+            m_xSubsetLB->set_active(-1);
 
-        sal_UCS4 sChar = m_pSearchSet->GetSelectCharacter();
+        sal_UCS4 sChar = m_xSearchSet->GetSelectCharacter();
         setFavButtonState(OUString(&sChar, 1), aFont.GetFamilyName());
     }
 }
@@ -840,23 +793,22 @@ IMPL_LINK_NOARG(SvxCharacterMap, FavClearAllClickHdl, SvxCharView*, void)
     updateFavCharControl();
 }
 
-IMPL_LINK_NOARG(SvxCharacterMap, SearchFieldGetFocusHdl, Control&, void)
+IMPL_LINK_NOARG(SvxCharacterMap, SearchFieldGetFocusHdl, weld::Widget&, void)
 {
-    m_pOKBtn->Disable();
+    m_xOKBtn->set_sensitive(false);
 }
 
-
-IMPL_LINK_NOARG(SvxCharacterMap, SearchUpdateHdl, Edit&, void)
+IMPL_LINK_NOARG(SvxCharacterMap, SearchUpdateHdl, weld::Entry&, void)
 {
-    if(!m_pSearchText->GetText().isEmpty())
+    if (!m_xSearchText->get_text().isEmpty())
     {
-        m_pSearchSet->ClearPreviousData();
-        OUString aKeyword = m_pSearchText->GetText();
+        m_xSearchSet->ClearPreviousData();
+        OUString aKeyword = m_xSearchText->get_text();
 
         toggleSearchView(true);
 
         FontCharMapRef xFontCharMap(new FontCharMap());
-        m_pSearchSet->GetFontCharMap(xFontCharMap);
+        m_xSearchSet->GetFontCharMap(xFontCharMap);
 
         sal_UCS4 sChar = xFontCharMap->GetFirstChar();
         while(sChar != xFontCharMap->GetLastChar())
@@ -868,7 +820,7 @@ IMPL_LINK_NOARG(SvxCharacterMap, SearchUpdateHdl, Edit&, void)
             {
                 OUString sName = OUString::createFromAscii(buffer);
                 if(!sName.isEmpty() && sName.toAsciiLowerCase().indexOf(aKeyword.toAsciiLowerCase()) >= 0)
-                    m_pSearchSet->AppendCharToList(sChar);
+                    m_xSearchSet->AppendCharToList(sChar);
             }
             sChar = xFontCharMap->GetNextChar(sChar);
         }
@@ -880,11 +832,8 @@ IMPL_LINK_NOARG(SvxCharacterMap, SearchUpdateHdl, Edit&, void)
         {
             OUString sName = OUString::createFromAscii(buffer);
             if(!sName.isEmpty() && sName.toAsciiLowerCase().indexOf(aKeyword.toAsciiLowerCase()) >= 0)
-                m_pSearchSet->AppendCharToList(sChar);
+                m_xSearchSet->AppendCharToList(sChar);
         }
-
-        m_pSearchSet->Resize();
-
     }
     else
     {
@@ -895,12 +844,12 @@ IMPL_LINK_NOARG(SvxCharacterMap, SearchUpdateHdl, Edit&, void)
 
 IMPL_LINK(SvxCharacterMap, CharClickHdl, SvxCharView*, rView, void)
 {
-    m_pShowChar->SetText( rView->GetText() );
-    m_pShowChar->SetFont(rView->GetFont());
-    m_pShowChar->Update();
+    m_xShowChar->SetText( rView->GetText() );
+    m_xShowChar->SetFont(rView->GetFont());
+    m_xShowChar->queue_draw();
 
     setFavButtonState(rView->GetText(), rView->GetFont().GetFamilyName());//check state
-    rView->GrabFocus();
+    rView->grab_focus();
 
     // Get the hexadecimal code
     OUString charValue = rView->GetText();
@@ -911,17 +860,17 @@ IMPL_LINK(SvxCharacterMap, CharClickHdl, SvxCharView*, rView, void)
     // Get the decimal code
     OUString aDecimalText = OUString::number(cChar);
 
-    m_pHexCodeText->SetText( aHexText );
-    m_pDecimalCodeText->SetText( aDecimalText );
+    m_xHexCodeText->set_text(aHexText);
+    m_xDecimalCodeText->set_text(aDecimalText);
     setCharName(cChar);
 
-    rView->Invalidate();
-    m_pOKBtn->Enable();
+    rView->queue_draw();
+    m_xOKBtn->set_sensitive(true);
 }
 
 IMPL_LINK_NOARG(SvxCharacterMap, CharDoubleClickHdl, SvxShowCharSet*, void)
 {
-    sal_UCS4 cChar = m_pShowSet->GetSelectCharacter();
+    sal_UCS4 cChar = m_xShowSet->GetSelectCharacter();
     // using the new UCS4 constructor
     OUString aOUStr( &cChar, 1 );
     setFavButtonState(aOUStr, aFont.GetFamilyName());
@@ -930,7 +879,7 @@ IMPL_LINK_NOARG(SvxCharacterMap, CharDoubleClickHdl, SvxShowCharSet*, void)
 
 IMPL_LINK_NOARG(SvxCharacterMap, SearchCharDoubleClickHdl, SvxShowCharSet*, void)
 {
-    sal_UCS4 cChar = m_pSearchSet->GetSelectCharacter();
+    sal_UCS4 cChar = m_xSearchSet->GetSelectCharacter();
     // using the new UCS4 constructor
     OUString aOUStr( &cChar, 1 );
     setFavButtonState(aOUStr, aFont.GetFamilyName());
@@ -939,38 +888,37 @@ IMPL_LINK_NOARG(SvxCharacterMap, SearchCharDoubleClickHdl, SvxShowCharSet*, void
 
 IMPL_LINK_NOARG(SvxCharacterMap, CharSelectHdl, SvxShowCharSet*, void)
 {
-    m_pOKBtn->Enable();
+    m_xOKBtn->set_sensitive(true);
 }
 
 IMPL_LINK_NOARG(SvxCharacterMap, SearchCharSelectHdl, SvxShowCharSet*, void)
 {
-    m_pOKBtn->Enable();
+    m_xOKBtn->set_sensitive(true);
 }
 
-IMPL_LINK_NOARG(SvxCharacterMap, InsertClickHdl, Button*, void)
+IMPL_LINK_NOARG(SvxCharacterMap, InsertClickHdl, weld::Button&, void)
 {
-   insertCharToDoc(m_pShowChar->GetText());
-   EndDialog(RET_OK);
+   insertCharToDoc(m_xShowChar->GetText());
+   m_xDialog->response(RET_OK);
 }
 
-
-IMPL_STATIC_LINK(SvxCharacterMap, LoseFocusHdl, Control&, pItem, void)
+IMPL_STATIC_LINK(SvxCharacterMap, LoseFocusHdl, weld::Widget&, rItem, void)
 {
-    pItem.Invalidate();
+    dynamic_cast<weld::DrawingArea&>(rItem).queue_draw();
 }
 
-IMPL_LINK_NOARG(SvxCharacterMap, FavSelectHdl, Button*, void)
+IMPL_LINK_NOARG(SvxCharacterMap, FavSelectHdl, weld::Button&, void)
 {
-    if(m_pFavouritesBtn->GetText().match(CuiResId(RID_SVXSTR_ADD_FAVORITES)))
+    if (m_xFavouritesBtn->get_label().match(CuiResId(RID_SVXSTR_ADD_FAVORITES)))
     {
-        updateFavCharacterList(m_pShowChar->GetText(), m_pShowChar->GetFont().GetFamilyName());
-        setFavButtonState(m_pShowChar->GetText(), m_pShowChar->GetFont().GetFamilyName());
+        updateFavCharacterList(m_xShowChar->GetText(), m_xShowChar->GetFont().GetFamilyName());
+        setFavButtonState(m_xShowChar->GetText(), m_xShowChar->GetFont().GetFamilyName());
     }
     else
     {
-        deleteFavCharacterFromList(m_pShowChar->GetText(), m_pShowChar->GetFont().GetFamilyName());
-        m_pFavouritesBtn->SetText(CuiResId(RID_SVXSTR_ADD_FAVORITES));
-        m_pFavouritesBtn->Disable();
+        deleteFavCharacterFromList(m_xShowChar->GetText(), m_xShowChar->GetFont().GetFamilyName());
+        m_xFavouritesBtn->set_label(CuiResId(RID_SVXSTR_ADD_FAVORITES));
+        m_xFavouritesBtn->set_sensitive(false);
     }
 
     updateFavCharControl();
@@ -987,7 +935,7 @@ IMPL_LINK_NOARG(SvxCharacterMap, CharHighlightHdl, SvxShowCharSet*, void)
     OUString aText;
     OUString aHexText;
     OUString aDecimalText;
-    sal_UCS4 cChar = m_pShowSet->GetSelectCharacter();
+    sal_UCS4 cChar = m_xShowSet->GetSelectCharacter();
     bool bSelect = (cChar > 0);
 
     // show char sample
@@ -1000,16 +948,16 @@ IMPL_LINK_NOARG(SvxCharacterMap, CharHighlightHdl, SvxShowCharSet*, void)
         if( pSubsetMap )
             pSubset = pSubsetMap->GetSubsetByUnicode( cChar );
         if( pSubset )
-            m_pSubsetLB->SelectEntry( pSubset->GetName() );
+            m_xSubsetLB->set_active(pSubset->GetName());
         else
-            m_pSubsetLB->SetNoSelection();
+            m_xSubsetLB->set_active(-1);
     }
 
-    if(m_pShowSet->HasFocus())
+    if (m_xShowSet->HasFocus())
     {
-        m_pShowChar->SetText( aText );
-        m_pShowChar->SetFont( aFont );
-        m_pShowChar->Update();
+        m_xShowChar->SetText( aText );
+        m_xShowChar->SetFont( aFont );
+        m_xShowChar->queue_draw();
 
         setFavButtonState(aText, aFont.GetFamilyName());
     }
@@ -1025,10 +973,10 @@ IMPL_LINK_NOARG(SvxCharacterMap, CharHighlightHdl, SvxShowCharSet*, void)
     }
 
     // Update the hex and decimal codes only if necessary
-    if (m_pHexCodeText->GetText() != aHexText)
-        m_pHexCodeText->SetText( aHexText );
-    if (m_pDecimalCodeText->GetText() != aDecimalText)
-        m_pDecimalCodeText->SetText( aDecimalText );
+    if (m_xHexCodeText->get_text() != aHexText)
+        m_xHexCodeText->set_text( aHexText );
+    if (m_xDecimalCodeText->get_text() != aDecimalText)
+        m_xDecimalCodeText->set_text( aDecimalText );
 }
 
 IMPL_LINK_NOARG(SvxCharacterMap, SearchCharHighlightHdl, SvxShowCharSet*, void)
@@ -1036,7 +984,7 @@ IMPL_LINK_NOARG(SvxCharacterMap, SearchCharHighlightHdl, SvxShowCharSet*, void)
     OUString aText;
     OUString aHexText;
     OUString aDecimalText;
-    sal_UCS4 cChar = m_pSearchSet->GetSelectCharacter();
+    sal_UCS4 cChar = m_xSearchSet->GetSelectCharacter();
     bool bSelect = (cChar > 0);
 
     // show char sample
@@ -1050,25 +998,25 @@ IMPL_LINK_NOARG(SvxCharacterMap, SearchCharHighlightHdl, SvxShowCharSet*, void)
         setCharName(cChar);
 
         // Update the hex and decimal codes only if necessary
-        if (m_pHexCodeText->GetText() != aHexText)
-            m_pHexCodeText->SetText( aHexText );
-        if (m_pDecimalCodeText->GetText() != aDecimalText)
-            m_pDecimalCodeText->SetText( aDecimalText );
+        if (m_xHexCodeText->get_text() != aHexText)
+            m_xHexCodeText->set_text(aHexText);
+        if (m_xDecimalCodeText->get_text() != aDecimalText)
+            m_xDecimalCodeText->set_text( aDecimalText );
 
         const Subset* pSubset = nullptr;
         if( pSubsetMap )
             pSubset = pSubsetMap->GetSubsetByUnicode( cChar );
         if( pSubset )
-            m_pSubsetLB->SelectEntry( pSubset->GetName() );
+            m_xSubsetLB->set_active(pSubset->GetName());
         else
-            m_pSubsetLB->SetNoSelection();
+            m_xSubsetLB->set_active(-1);
     }
 
-    if(m_pSearchSet->HasFocus())
+    if(m_xSearchSet->HasFocus())
     {
-        m_pShowChar->SetText( aText );
-        m_pShowChar->SetFont( aFont );
-        m_pShowChar->Update();
+        m_xShowChar->SetText( aText );
+        m_xShowChar->SetFont( aFont );
+        m_xShowChar->queue_draw();
 
         setFavButtonState(aText, aFont.GetFamilyName());
     }
@@ -1080,28 +1028,28 @@ void SvxCharacterMap::selectCharByCode(Radix radix)
     switch(radix)
     {
         case Radix::decimal:
-            aCodeString = m_pDecimalCodeText->GetText();
+            aCodeString = m_xDecimalCodeText->get_text();
             break;
         case Radix::hexadecimal:
-            aCodeString = m_pHexCodeText->GetText();
+            aCodeString = m_xHexCodeText->get_text();
             break;
     }
     // Convert the code back to a character using the appropriate radix
     sal_UCS4 cChar = aCodeString.toUInt32(static_cast<sal_Int16> (radix));
     // Use FontCharMap::HasChar(sal_UCS4 cChar) to see if the desired character is in the font
     FontCharMapRef xFontCharMap(new FontCharMap());
-    m_pShowSet->GetFontCharMap(xFontCharMap);
+    m_xShowSet->GetFontCharMap(xFontCharMap);
     if (xFontCharMap->HasChar(cChar))
         // Select the corresponding character
         SetChar(cChar);
 }
 
-IMPL_LINK_NOARG(SvxCharacterMap, DecimalCodeChangeHdl, Edit&, void)
+IMPL_LINK_NOARG(SvxCharacterMap, DecimalCodeChangeHdl, weld::Entry&, void)
 {
     selectCharByCode(Radix::decimal);
 }
 
-IMPL_LINK_NOARG(SvxCharacterMap, HexCodeChangeHdl, Edit&, void)
+IMPL_LINK_NOARG(SvxCharacterMap, HexCodeChangeHdl, weld::Entry&, void)
 {
     selectCharByCode(Radix::hexadecimal);
 }
@@ -1111,15 +1059,15 @@ IMPL_LINK_NOARG(SvxCharacterMap, CharPreSelectHdl, SvxShowCharSet*, void)
     // adjust subset selection
     if( pSubsetMap )
     {
-        sal_UCS4 cChar = m_pShowSet->GetSelectCharacter();
+        sal_UCS4 cChar = m_xShowSet->GetSelectCharacter();
 
         setFavButtonState(OUString(&cChar, 1), aFont.GetFamilyName());
         const Subset* pSubset = pSubsetMap->GetSubsetByUnicode( cChar );
         if( pSubset )
-            m_pSubsetLB->SelectEntry( pSubset->GetName() );
+            m_xSubsetLB->set_active(pSubset->GetName());
     }
 
-    m_pOKBtn->Enable();
+    m_xOKBtn->set_sensitive(true);
 }
 
 IMPL_LINK_NOARG(SvxCharacterMap, SearchCharPreSelectHdl, SvxShowCharSet*, void)
@@ -1127,32 +1075,42 @@ IMPL_LINK_NOARG(SvxCharacterMap, SearchCharPreSelectHdl, SvxShowCharSet*, void)
     // adjust subset selection
     if( pSubsetMap )
     {
-        sal_UCS4 cChar = m_pSearchSet->GetSelectCharacter();
+        sal_UCS4 cChar = m_xSearchSet->GetSelectCharacter();
 
         setFavButtonState(OUString(&cChar, 1), aFont.GetFamilyName());
         const Subset* pSubset = pSubsetMap->GetSubsetByUnicode( cChar );
         if( pSubset )
-            m_pSubsetLB->SelectEntry( pSubset->GetName() );
+            m_xSubsetLB->set_active(pSubset->GetName());
     }
 
-    m_pOKBtn->Enable();
+    m_xOKBtn->set_sensitive(true);
 }
 
-
-
 // class SvxShowText =====================================================
-
-SvxShowText::SvxShowText(vcl::Window* pParent)
-    : Control(pParent, WB_BORDER)
+SvxShowText::SvxShowText(weld::Builder& rBuilder, const OString& rId, const VclPtr<VirtualDevice>& rVirDev)
+    : m_xDrawingArea(rBuilder.weld_drawing_area(rId))
+    , m_xVirDev(rVirDev)
     , mnY(0)
     , mbCenter(false)
-{}
-
-VCL_BUILDER_FACTORY(SvxShowText)
+{
+    m_xDrawingArea->connect_size_allocate(LINK(this, SvxShowText, DoResize));
+    m_xDrawingArea->connect_draw(LINK(this, SvxShowText, DoPaint));
+
+    vcl::Font aFont = m_xVirDev->GetFont();
+    Size aFontSize(aFont.GetFontSize().Width() * 5, aFont.GetFontSize().Height() * 5);
+    aFont.SetFontSize(aFontSize);
+    m_xVirDev->Push(PUSH_ALLFONT);
+    m_xVirDev->SetFont(aFont);
+    m_xDrawingArea->set_size_request(m_xVirDev->approximate_digit_width() + 2 * 12,
+                                     m_xVirDev->LogicToPixel(aFontSize).Height() * 2);
+    m_xVirDev->Pop();
+}
 
-void SvxShowText::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle&)
+IMPL_LINK(SvxShowText, DoPaint, weld::DrawingArea::draw_args, aPayload, void)
 {
-    rRenderContext.SetFont(maFont);
+    vcl::RenderContext& rRenderContext = aPayload.first;
+
+    rRenderContext.SetFont(m_aFont);
 
     Color aTextCol = rRenderContext.GetTextColor();
     Color aFillCol = rRenderContext.GetFillColor();
@@ -1164,10 +1122,9 @@ void SvxShowText::Paint(vcl::RenderContext& rRenderContext, const ::tools::Recta
     rRenderContext.SetFillColor(aWindowColor);
 
     const OUString aText = GetText();
-    const Size aSize(GetOutputSizePixel());
 
-    long nAvailWidth = aSize.Width();
-    long nWinHeight = GetOutputSizePixel().Height();
+    long nAvailWidth = m_aSize.Width();
+    long nWinHeight = m_aSize.Height();
 
     bool bGotBoundary = true;
     bool bShrankFont = false;
@@ -1192,14 +1149,14 @@ void SvxShowText::Paint(vcl::RenderContext& rRenderContext, const ::tools::Recta
         aFontSize.setHeight( nFontHeight );
         aFont.SetFontSize(aFontSize);
         rRenderContext.SetFont(aFont);
-        mnY = (nWinHeight - GetTextHeight()) / 2;
+        mnY = (nWinHeight - rRenderContext.GetTextHeight()) / 2;
         bShrankFont = true;
     }
 
     Point aPoint(2, mnY);
     // adjust position using ink boundary if possible
     if (!bGotBoundary)
-        aPoint.setX( (aSize.Width() - rRenderContext.GetTextWidth(aText)) / 2 );
+        aPoint.setX( (m_aSize.Width() - rRenderContext.GetTextWidth(aText)) / 2 );
     else
     {
         // adjust position before it gets out of bounds
@@ -1207,7 +1164,7 @@ void SvxShowText::Paint(vcl::RenderContext& rRenderContext, const ::tools::Recta
 
         // shift back vertically if needed
         int nYLDelta = aBoundRect.Top();
-        int nYHDelta = aSize.Height() - aBoundRect.Bottom();
+        int nYHDelta = m_aSize.Height() - aBoundRect.Bottom();
         if( nYLDelta <= 0 )
             aPoint.AdjustY( -(nYLDelta - 1) );
         else if( nYHDelta <= 0 )
@@ -1216,13 +1173,13 @@ void SvxShowText::Paint(vcl::RenderContext& rRenderContext, const ::tools::Recta
         if (mbCenter)
         {
             // move glyph to middle of cell
-            aPoint.setX( -aBoundRect.Left() + (aSize.Width() - aBoundRect.GetWidth()) / 2 );
+            aPoint.setX( -aBoundRect.Left() + (m_aSize.Width() - aBoundRect.GetWidth()) / 2 );
         }
         else
         {
             // shift back horizontally if needed
             int nXLDelta = aBoundRect.Left();
-            int nXHDelta = aSize.Width() - aBoundRect.Right();
+            int nXHDelta = m_aSize.Width() - aBoundRect.Right();
             if( nXLDelta <= 0 )
                 aPoint.AdjustX( -(nXLDelta - 1) );
             else if( nXHDelta <= 0 )
@@ -1230,7 +1187,7 @@ void SvxShowText::Paint(vcl::RenderContext& rRenderContext, const ::tools::Recta
         }
     }
 
-    rRenderContext.DrawRect(tools::Rectangle(Point(0, 0), Size(GetOutputSizePixel().Width(), GetOutputSizePixel().Height())));
+    rRenderContext.DrawRect(tools::Rectangle(Point(0, 0), m_aSize));
     rRenderContext.DrawText(aPoint, aText);
     rRenderContext.SetTextColor(aTextCol);
     rRenderContext.SetFillColor(aFillCol);
@@ -1241,39 +1198,32 @@ void SvxShowText::Paint(vcl::RenderContext& rRenderContext, const ::tools::Recta
 
 void SvxShowText::SetFont( const vcl::Font& rFont )
 {
-    long nWinHeight = GetOutputSizePixel().Height();
-    maFont = vcl::Font(rFont);
-    maFont.SetWeight(WEIGHT_NORMAL);
-    maFont.SetAlignment(ALIGN_TOP);
-    maFont.SetFontSize(PixelToLogic(Size(0, nWinHeight / 2)));
-    maFont.SetTransparent(true);
-    Control::SetFont(maFont);
+    long nWinHeight = m_aSize.Height();
 
-    mnY = (nWinHeight - GetTextHeight()) / 2;
+    m_aFont = vcl::Font(rFont);
+    m_aFont.SetWeight(WEIGHT_NORMAL);
+    m_aFont.SetAlignment(ALIGN_TOP);
+    m_aFont.SetFontSize(m_xVirDev->PixelToLogic(Size(0, nWinHeight / 2)));
+    m_aFont.SetTransparent(true);
 
-    Invalidate();
-}
+    m_xVirDev->Push(PUSH_ALLFONT);
+    m_xVirDev->SetFont(m_aFont);
+    mnY = (nWinHeight - m_xVirDev->GetTextHeight()) / 2;
+    m_xVirDev->Pop();
 
-Size SvxShowText::GetOptimalSize() const
-{
-    const vcl::Font &rFont = GetFont();
-    const Size rFontSize = rFont.GetFontSize();
-    long nWinHeight = LogicToPixel(rFontSize).Height() * 2;
-    return Size( GetTextWidth( GetText() ) + 2 * 12, nWinHeight );
+    m_xDrawingArea->queue_draw();
 }
 
-void SvxShowText::Resize()
+IMPL_LINK(SvxShowText, DoResize, const Size&, rSize, void)
 {
-    Control::Resize();
+    m_aSize = rSize;
     SetFont(GetFont()); //force recalculation of size
 }
 
-
-void SvxShowText::SetText( const OUString& rText )
+void SvxShowText::SetText(const OUString& rText)
 {
-    Control::SetText( rText );
-    Invalidate();
+    m_sText = rText;
+    queue_draw();
 }
 
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/factory/cuiexp.cxx b/cui/source/factory/cuiexp.cxx
index 94c5a165815d..9a8a26bcbd03 100644
--- a/cui/source/factory/cuiexp.cxx
+++ b/cui/source/factory/cuiexp.cxx
@@ -38,6 +38,7 @@
 #include <postdlg.hxx>
 #include <passwdomdlg.hxx>
 #include <screenshotannotationdlg.hxx>
+#include <cuicharmap.hxx>
 #include <cuihyperdlg.hxx>
 #include <cfgutil.hxx>
 #include <SpellDialog.hxx>
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 5b4830a36af6..0acd2ccd46e9 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -149,6 +149,21 @@ short AbstractPasswordToOpenModifyDialog_Impl::Execute()
     return m_xDlg->run();
 }
 
+short AbstractSvxCharacterMapDialog_Impl::Execute()
+{
+    return m_xDlg->run();
+}
+
+const SfxItemSet* AbstractSvxCharacterMapDialog_Impl::GetOutputItemSet() const
+{
+    return m_xDlg->GetOutputItemSet();
+}
+
+void AbstractSvxCharacterMapDialog_Impl::SetText(const OUString& rStr)
+{
+    m_xDlg->set_title(rStr);
+}
+
 IMPL_ABSTDLG_BASE(AbstractScreenshotAnnotationDlg_Impl);
 
 
@@ -1217,12 +1232,9 @@ VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateSvxLineTabDialog(
     return VclPtr<CuiAbstractTabDialog_Impl>::Create( pDlg );
 }
 
-VclPtr<SfxAbstractDialog> AbstractDialogFactory_Impl::CreateCharMapDialog( vcl::Window* pParent,
-                                                                        const SfxItemSet& rAttr,
-                                                                        bool bInsert )
+VclPtr<SfxAbstractDialog> AbstractDialogFactory_Impl::CreateCharMapDialog(weld::Window* pParent, const SfxItemSet& rAttr, bool bInsert)
 {
-    SfxModalDialog* pDlg = VclPtr<SvxCharacterMap>::Create(pParent, &rAttr, bInsert);
-    return VclPtr<CuiAbstractSfxDialog_Impl>::Create(pDlg);
+    return VclPtr<AbstractSvxCharacterMapDialog_Impl>::Create(new SvxCharacterMap(pParent, &rAttr, bInsert));
 }
 
 VclPtr<SfxAbstractDialog> AbstractDialogFactory_Impl::CreateEventConfigDialog( vcl::Window* pParent,
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 3aa4d92b90ce..4a77f17607ee 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -471,6 +471,21 @@ public:
     virtual bool      IsRecommendToOpenReadonly() const override;
 };
 
+class SvxCharacterMap;
+class AbstractSvxCharacterMapDialog_Impl : public SfxAbstractDialog
+{
+protected:
+    std::unique_ptr<SvxCharacterMap> m_xDlg;
+public:
+    explicit AbstractSvxCharacterMapDialog_Impl(SvxCharacterMap* p)
+        : m_xDlg(p)
+    {
+    }
+    virtual short Execute() override;
+    virtual const SfxItemSet* GetOutputItemSet() const override;
+    virtual void  SetText(const OUString& rStr) override;
+};
+
 class ScreenshotAnnotationDlg;
 class AbstractScreenshotAnnotationDlg_Impl : public AbstractScreenshotAnnotationDlg
 {
@@ -487,9 +502,9 @@ public:
                                             const SfxItemSet& rAttr,
                                             const SdrView* pView,
                                             sal_uInt32 nResId ) override;
-    virtual VclPtr<SfxAbstractDialog>    CreateCharMapDialog( vcl::Window* pParent,
+    virtual VclPtr<SfxAbstractDialog>    CreateCharMapDialog(weld::Window* pParent,
                                                              const SfxItemSet& rAttr,
-                                                             bool bInsert ) override;
+                                                             bool bInsert) override;
     virtual VclPtr<SfxAbstractDialog>    CreateEventConfigDialog( vcl::Window* pParent,
                                                              const SfxItemSet& rAttr,
                                                              const css::uno::Reference< css::frame::XFrame >& _rxFrame
diff --git a/cui/source/factory/init.cxx b/cui/source/factory/init.cxx
index 9fc291ec0607..40de5c83a4d3 100644
--- a/cui/source/factory/init.cxx
+++ b/cui/source/factory/init.cxx
@@ -26,12 +26,12 @@ extern "C"
 SAL_DLLPUBLIC_EXPORT bool GetSpecialCharsForEdit(vcl::Window* i_pParent, const vcl::Font& i_rFont, OUString& o_rResult)
 {
     bool bRet = false;
-    ScopedVclPtrInstance<SvxCharacterMap> aDlg(i_pParent);
-    aDlg->DisableFontSelection();
-    aDlg->SetCharFont(i_rFont);
-    if ( aDlg->Execute() == RET_OK )
+    SvxCharacterMap aDlg(i_pParent ? i_pParent->GetFrameWeld() : nullptr);
+    aDlg.DisableFontSelection();
+    aDlg.SetCharFont(i_rFont);
+    if (aDlg.execute() == RET_OK)
     {
-        sal_UCS4 cChar = aDlg->GetChar();
+        sal_UCS4 cChar = aDlg.GetChar();
         // using the new UCS4 constructor
         OUString aOUStr( &cChar, 1 );
         o_rResult = aOUStr;
diff --git a/cui/source/inc/cuicharmap.hxx b/cui/source/inc/cuicharmap.hxx
index b1a06b4540e3..74928b37a83e 100644
--- a/cui/source/inc/cuicharmap.hxx
+++ b/cui/source/inc/cuicharmap.hxx
@@ -24,7 +24,9 @@
 #include <vcl/button.hxx>
 #include <vcl/fixed.hxx>
 #include <vcl/lstbox.hxx>
+#include <vcl/weld.hxx>
 #include <sfx2/basedlgs.hxx>
+#include <svl/itemset.hxx>
 #include <svx/charmap.hxx>
 #include <svx/searchcharmap.hxx>
 #include <sfx2/charwin.hxx>
@@ -39,70 +41,75 @@ namespace svx
     struct SvxShowCharSetItem;
 }
 
-class SvxShowText : public Control
+class SvxShowText
 {
+private:
+    std::unique_ptr<weld::DrawingArea> m_xDrawingArea;
+    VclPtr<VirtualDevice> m_xVirDev;
+    Size m_aSize;
+    OUString m_sText;
+    long mnY;
+    bool mbCenter;
+    vcl::Font m_aFont;
+
+    DECL_LINK(DoPaint, weld::DrawingArea::draw_args, void);
+    DECL_LINK(DoResize, const Size& rSize, void);
 public:
-    SvxShowText(vcl::Window* pParent);
+    SvxShowText(weld::Builder& rBuilder, const OString& rId, const VclPtr<VirtualDevice>& rVirDev);
 
-    void            SetFont( const vcl::Font& rFont );
-    void            SetText( const OUString& rText ) override;
+    void            SetFont(const vcl::Font& rFont);
+    vcl::Font       GetFont() const { return m_aFont; }
+    void            SetText(const OUString& rText);
+    OUString        GetText() const { return m_sText; }
     void            SetCentered(bool bCenter) { mbCenter = bCenter; }
 
-    virtual void    Resize() override;
-
-    virtual Size    GetOptimalSize() const override;
-
-protected:
-    virtual void    Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle&) override;
-
-private:
-    long            mnY;
-    bool            mbCenter;
-    vcl::Font       maFont;
-
+    void            queue_draw() { m_xDrawingArea->queue_draw(); }
+    Size            get_preferred_size() const { return m_xDrawingArea->get_preferred_size(); }
 };
 
 /** The main purpose of this dialog is to enable the use of characters
     that are not easily accessible from the keyboard. */
-class SvxCharacterMap : public SfxModalDialog
+class SvxCharacterMap : public weld::GenericDialogController
 {
 private:
 
     void            init();
 
-    VclPtr<SvxShowCharSet> m_pShowSet;
-    VclPtr<SvxSearchCharSet> m_pSearchSet;
-    VclPtr<PushButton>     m_pOKBtn;
-    VclPtr<FixedText>      m_pFontText;
-    VclPtr<ListBox>        m_pFontLB;
-    VclPtr<FixedText>      m_pSubsetText;
-    VclPtr<ListBox>        m_pSubsetLB;
-    VclPtr<SvxShowText>    m_pShowChar;
-    VclPtr<Edit>           m_pSearchText;
-    VclPtr<Edit>           m_pHexCodeText;
-    VclPtr<Edit>           m_pDecimalCodeText;
-    VclPtr<Button>         m_pFavouritesBtn;
-    VclPtr<SvxCharView>    m_pRecentCharView[16];
-    VclPtr<SvxCharView>    m_pFavCharView[16];
-    VclPtr<VclMultiLineEdit>      m_pCharName;
-
+    VclPtr<VirtualDevice> m_xVirDev;
     vcl::Font           aFont;
     const SubsetMap*    pSubsetMap;
     bool                isSearchMode;
     bool                m_bHasInsert;
-
     std::deque<OUString> maRecentCharList;
     std::deque<OUString> maRecentCharFontList;
-
     std::deque<OUString> maFavCharList;
     std::deque<OUString> maFavCharFontList;
-
     uno::Reference< uno::XComponentContext > mxContext;
 
+    std::unique_ptr<weld::Button>   m_xOKBtn;
+    std::unique_ptr<weld::Label>    m_xFontText;
+    std::unique_ptr<weld::ComboBoxText> m_xFontLB;
+    std::unique_ptr<weld::Label>    m_xSubsetText;
+    std::unique_ptr<weld::ComboBoxText> m_xSubsetLB;
+    std::unique_ptr<weld::Entry>    m_xSearchText;
+    std::unique_ptr<weld::Entry>    m_xHexCodeText;
+    std::unique_ptr<weld::Entry>    m_xDecimalCodeText;
+    std::unique_ptr<weld::Button>   m_xFavouritesBtn;
+    std::unique_ptr<weld::Label>    m_xCharName;
+    std::unique_ptr<weld::Widget>   m_xRecentGrid;
+    std::unique_ptr<weld::Widget>   m_xFavGrid;
+    std::unique_ptr<SvxShowText>    m_xShowChar;
+    std::unique_ptr<SvxCharView>    m_xRecentCharView[16];
+    std::unique_ptr<SvxCharView>    m_xFavCharView[16];
+    std::unique_ptr<SvxShowCharSet> m_xShowSet;
+    std::unique_ptr<SvxSearchCharSet> m_xSearchSet;
+
+    std::unique_ptr<SfxAllItemSet>  m_xOutputSet;
+
     enum class Radix : sal_Int16 {decimal = 10, hexadecimal=16};
 
-    DECL_LINK(FontSelectHdl, ListBox&, void);
-    DECL_LINK(SubsetSelectHdl, ListBox&, void);
+    DECL_LINK(FontSelectHdl, weld::ComboBoxText&, void);
+    DECL_LINK(SubsetSelectHdl, weld::ComboBoxText&, void);
     DECL_LINK(CharDoubleClickHdl, SvxShowCharSet*,void);
     DECL_LINK(CharSelectHdl, SvxShowCharSet*, void);
     DECL_LINK(CharHighlightHdl, SvxShowCharSet*, void);
@@ -112,27 +119,29 @@ private:
     DECL_LINK(SearchCharSelectHdl, SvxShowCharSet*, void);
     DECL_LINK(SearchCharHighlightHdl, SvxShowCharSet*, void);
     DECL_LINK(SearchCharPreSelectHdl, SvxShowCharSet*, void);
-    DECL_LINK(DecimalCodeChangeHdl, Edit&, void);
-    DECL_LINK(HexCodeChangeHdl, Edit&, void);
+    DECL_LINK(DecimalCodeChangeHdl, weld::Entry&, void);
+    DECL_LINK(HexCodeChangeHdl, weld::Entry&, void);
     DECL_LINK(CharClickHdl, SvxCharView*, void);
     DECL_LINK(RecentClearClickHdl, SvxCharView*, void);
     DECL_LINK(FavClearClickHdl, SvxCharView*, void);
     DECL_LINK(RecentClearAllClickHdl, SvxCharView*, void);
     DECL_LINK(FavClearAllClickHdl, SvxCharView*, void);
-    DECL_LINK(InsertClickHdl, Button*, void);
-    DECL_STATIC_LINK(SvxCharacterMap, LoseFocusHdl, Control&, void);
-    DECL_LINK(FavSelectHdl, Button*, void);
-    DECL_LINK(SearchUpdateHdl, Edit&, void);
-    DECL_LINK(SearchFieldGetFocusHdl, Control&, 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);
 
-    static void fillAllSubsets(ListBox &rListBox);
+    static void fillAllSubsets(weld::ComboBoxText& rListBox);
     void selectCharByCode(Radix radix);
 
 public:
-                    SvxCharacterMap( vcl::Window* pParent, const SfxItemSet* pSet=nullptr, const bool bInsert=true);
-    virtual         ~SvxCharacterMap() override;
-    virtual short Execute() override;
-    virtual void    dispose() override;
+    SvxCharacterMap(weld::Window* pParent, const SfxItemSet* pSet=nullptr, const bool bInsert=true);
+    short execute();
+
+    void set_title(const OUString& rTitle) { m_xDialog->set_title(rTitle); }
+
+    const SfxItemSet* GetOutputItemSet() const { return m_xOutputSet.get(); }
 
     void            DisableFontSelection();
 
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index d65a0a05bafc..6e4ca0f34290 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -727,15 +727,15 @@ IMPL_LINK_NOARG(OfaSwAutoFmtOptionsPage, EditHdl, Button*, void)
     if( nSelEntryPos == REPLACE_BULLETS ||
         nSelEntryPos == APPLY_NUMBERING)
     {
-        ScopedVclPtrInstance< SvxCharacterMap > pMapDlg(this, nullptr, false);
+        SvxCharacterMap aMapDlg(GetFrameWeld(), nullptr, false);
         ImpUserData* pUserData = static_cast<ImpUserData*>(m_pCheckLB->FirstSelected()->GetUserData());
-        pMapDlg->SetCharFont(*pUserData->pFont);
-        pMapDlg->SetChar( (*pUserData->pString)[0] );
-        if(RET_OK == pMapDlg->Execute())
+        aMapDlg.SetCharFont(*pUserData->pFont);
+        aMapDlg.SetChar( (*pUserData->pString)[0] );
+        if (RET_OK == aMapDlg.execute())
         {
-            vcl::Font aFont(pMapDlg->GetCharFont());
+            vcl::Font aFont(aMapDlg.GetCharFont());
             *pUserData->pFont = aFont;
-            sal_UCS4 aChar = pMapDlg->GetChar();
+            sal_UCS4 aChar = aMapDlg.GetChar();
             // using the UCS4 constructor
             OUString aOUStr( &aChar, 1 );
             *pUserData->pString = aOUStr;
@@ -2047,10 +2047,10 @@ IMPL_LINK( OfaQuoteTabPage, QuoteHdl, Button*, pBtn, void )
     else if (pBtn == m_pDblEndQuotePB)
         nMode = DBL_END;
     // start character selection dialog
-    ScopedVclPtrInstance< SvxCharacterMap > pMap( this, nullptr, false );
-    pMap->SetCharFont( OutputDevice::GetDefaultFont(DefaultFontType::LATIN_TEXT,
+    SvxCharacterMap aMap(GetFrameWeld(), nullptr, false);
+    aMap.SetCharFont( OutputDevice::GetDefaultFont(DefaultFontType::LATIN_TEXT,
                         LANGUAGE_ENGLISH_US, GetDefaultFontFlags::OnlyOne ));
-    pMap->SetText(nMode < SGL_END ? CuiResId(RID_SVXSTR_STARTQUOTE)  : CuiResId(RID_SVXSTR_ENDQUOTE) );
+    aMap.set_title(nMode < SGL_END ? CuiResId(RID_SVXSTR_STARTQUOTE)  : CuiResId(RID_SVXSTR_ENDQUOTE));
     sal_UCS4 cDlg;
     SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect();
     LanguageType eLang = Application::GetSettings().GetLanguageTag().getLanguageType();
@@ -2082,11 +2082,11 @@ IMPL_LINK( OfaQuoteTabPage, QuoteHdl, Button*, pBtn, void )
             break;
 
     }
-    pMap->SetChar(  cDlg );
-    pMap->DisableFontSelection();
-    if(pMap->Execute() == RET_OK)
+    aMap.SetChar(  cDlg );
+    aMap.DisableFontSelection();
+    if (aMap.execute() == RET_OK)
     {
-        sal_UCS4 cNewChar = pMap->GetChar();
+        sal_UCS4 cNewChar = aMap.GetChar();
         switch( nMode )
         {
             case SGL_START:
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 2ad91da8ac53..3c6afa8943a5 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -3205,12 +3205,12 @@ void SvxCharTwoLinesPage::Initialize()
 void SvxCharTwoLinesPage::SelectCharacter( ListBox* pBox )
 {
     bool bStart = pBox == m_pStartBracketLB;
-    VclPtrInstance< SvxCharacterMap > aDlg( this, nullptr, false );
-    aDlg->DisableFontSelection();
+    SvxCharacterMap aDlg(GetFrameWeld(), nullptr, false);
+    aDlg.DisableFontSelection();
 
-    if ( aDlg->Execute() == RET_OK )
+    if (aDlg.execute() == RET_OK)
     {
-        sal_Unicode cChar = static_cast<sal_Unicode>(aDlg->GetChar());
+        sal_Unicode cChar = static_cast<sal_Unicode>(aDlg.GetChar());
         SetBracket( cChar, bStart );
     }
     else
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 2577fd8fbef4..816ae9795343 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -2036,7 +2036,7 @@ IMPL_LINK_NOARG(SvxNumOptionsTabPage, PopupActivateHdl_Impl, MenuButton *, void)
 
 IMPL_LINK_NOARG(SvxNumOptionsTabPage, BulletHdl_Impl, Button*, void)
 {
-    VclPtrInstance< SvxCharacterMap > pMap( this, nullptr, false );
+    SvxCharacterMap aMap(GetFrameWeld(), nullptr, false);
 
     sal_uInt16 nMask = 1;
     const vcl::Font* pFmtFont = nullptr;
@@ -2065,16 +2065,16 @@ IMPL_LINK_NOARG(SvxNumOptionsTabPage, BulletHdl_Impl, Button*, void)
 
     }
 
-    if(pFmtFont)
-        pMap->SetCharFont(*pFmtFont);
+    if (pFmtFont)
+        aMap.SetCharFont(*pFmtFont);
     else
-        pMap->SetCharFont(aActBulletFont);
-    if(bSameBullet)
-        pMap->SetChar( cBullet );
-    if(pMap->Execute() == RET_OK)
+        aMap.SetCharFont(aActBulletFont);
+    if (bSameBullet)
+        aMap.SetChar(cBullet);
+    if (aMap.execute() == RET_OK)
     {
         // change Font Numrules
-        aActBulletFont = pMap->GetCharFont();
+        aActBulletFont = aMap.GetCharFont();
 
         sal_uInt16 _nMask = 1;
         for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++)
@@ -2083,7 +2083,7 @@ IMPL_LINK_NOARG(SvxNumOptionsTabPage, BulletHdl_Impl, Button*, void)
             {
                 SvxNumberFormat aNumFmt(pActNum->GetLevel(i));
                 aNumFmt.SetBulletFont(&aActBulletFont);
-                aNumFmt.SetBulletChar( static_cast<sal_Unicode>(pMap->GetChar()) );
+                aNumFmt.SetBulletChar( static_cast<sal_Unicode>(aMap.GetChar()) );
                 pActNum->SetLevel(i, aNumFmt);
             }
             _nMask <<= 1;
diff --git a/cui/uiconfig/ui/specialcharacters.ui b/cui/uiconfig/ui/specialcharacters.ui
index 7e70cb06cc16..2185a83ec79b 100644
--- a/cui/uiconfig/ui/specialcharacters.ui
+++ b/cui/uiconfig/ui/specialcharacters.ui
@@ -1,13 +1,14 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.18.3 -->
+<!-- Generated with glade 3.20.2 -->
 <interface domain="cui">
   <requires lib="gtk+" version="3.18"/>
-  <requires lib="" version="3.0"/>
-  <!-- interface-local-resource-path /home/akki/libreoffice/extras/source/glade -->
   <object class="GtkDialog" id="SpecialCharactersDialog">
     <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes" context="specialcharacters|SpecialCharactersDialog">Special Characters</property>
+    <property name="modal">True</property>
+    <property name="default_width">0</property>
+    <property name="default_height">0</property>
     <property name="type_hint">dialog</property>
     <child internal-child="vbox">
       <object class="GtkBox" id="dialog-vbox1">
@@ -18,12 +19,11 @@
           <object class="GtkButtonBox" id="dialog-action_area1">
             <property name="can_focus">False</property>
             <property name="layout_style">end</property>
-            <!-- OK and Insert buttons are the same button. The correct one is set to visible incode. -->
             <child>
               <object class="GtkButton" id="insert">
                 <property name="label" translatable="yes" context="specialcharacters|insert">_Insert</property>
-                <property name="visible">False</property>
                 <property name="can_focus">True</property>
+                <property name="can_default">True</property>
                 <property name="has_default">True</property>
                 <property name="receives_default">True</property>
                 <property name="use_underline">True</property>
@@ -37,8 +37,8 @@
             <child>
               <object class="GtkButton" id="ok">
                 <property name="label">gtk-ok</property>
-                <property name="visible">False</property>
                 <property name="can_focus">True</property>
+                <property name="can_default">True</property>
                 <property name="has_default">True</property>
                 <property name="receives_default">True</property>
                 <property name="use_underline">True</property>
@@ -57,7 +57,6 @@
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
                 <property name="use_stock">True</property>
-                <property name="xalign">0.50999999046325684</property>
               </object>
               <packing>
                 <property name="expand">False</property>
@@ -100,7 +99,6 @@
               <object class="GtkGrid" id="grid2">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="hexpand">True</property>
                 <property name="column_spacing">12</property>
                 <child>
                   <object class="GtkLabel" id="subsetft">
@@ -116,60 +114,66 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkComboBox" id="fontlb">
+                  <object class="GtkLabel" id="fontft">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="hexpand">True</property>
+                    <property name="halign">start</property>
+                    <property name="label" translatable="yes" context="specialcharacters|fontft">Font:</property>
+                    <property name="use_underline">True</property>
                   </object>
                   <packing>
                     <property name="left_attach">1</property>
-                    <property name="top_attach">1</property>
+                    <property name="top_attach">0</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkLabel" id="fontft">
+                  <object class="GtkLabel" id="srchft">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="halign">start</property>
-                    <property name="label" translatable="yes" context="specialcharacters|fontft">Font:</property>
-                    <property name="use_underline">True</property>
+                    <property name="label" translatable="yes" context="specialcharacters|srchft">Search:</property>
                   </object>
                   <packing>
-                    <property name="left_attach">1</property>
+                    <property name="left_attach">0</property>
                     <property name="top_attach">0</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkComboBox" id="subsetlb">
+                  <object class="GtkEntry" id="search">
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
+                    <property name="can_focus">True</property>
                     <property name="hexpand">True</property>
                   </object>
                   <packing>
-                    <property name="left_attach">2</property>
+                    <property name="left_attach">0</property>
                     <property name="top_attach">1</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkLabel" id="srchft">
+                  <object class="GtkComboBoxText" id="subsetlb">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="halign">start</property>
-                    <property name="label" translatable="yes" context="specialcharacters|srchft">Search:</property>
+                    <property name="hexpand">True</property>
                   </object>
                   <packing>
-                    <property name="left_attach">0</property>
-                    <property name="top_attach">0</property>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">1</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkEntry" id="search">
+                  <object class="GtkComboBoxText" id="fontlb">
                     <property name="visible">True</property>
-                    <property name="can_focus">True</property>
+                    <property name="can_focus">False</property>
                     <property name="hexpand">True</property>
+                    <property name="has_entry">True</property>
+                    <child internal-child="entry">
+                      <object class="GtkEntry">
+                        <property name="can_focus">True</property>
+                      </object>
+                    </child>
                   </object>
                   <packing>
-                    <property name="left_attach">0</property>
+                    <property name="left_attach">1</property>
                     <property name="top_attach">1</property>
                   </packing>
                 </child>
@@ -184,16 +188,13 @@
               <object class="GtkGrid" id="grid3">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="hexpand">True</property>
                 <property name="vexpand">True</property>
                 <property name="row_spacing">6</property>
                 <child>
-                  <object class="cuilo-SvxShowText" id="showchar">
-                    <property name="width_request">80</property>
-                    <property name="height_request">150</property>
+                  <object class="GtkDrawingArea" id="showchar">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="hexpand">True</property>
+                    <property name="events">GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
                     <property name="vexpand">True</property>
                   </object>
                   <packing>
@@ -214,8 +215,8 @@
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="halign">start</property>
-                        <property name="xalign">0</property>
                         <property name="label" translatable="yes" context="specialcharacters|hexlabel">Hexadecimal:</property>
+                        <property name="xalign">0</property>
                       </object>
                       <packing>
                         <property name="left_attach">0</property>
@@ -265,8 +266,8 @@
                       <object class="GtkLabel" id="decimallabel">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="xalign">0</property>
                         <property name="label" translatable="yes" context="specialcharacters|decimallabel">Decimal:</property>
+                        <property name="xalign">0</property>
                       </object>
                       <packing>
                         <property name="left_attach">0</property>
@@ -307,13 +308,13 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkTextView" id="charname">
+                  <object class="GtkLabel" id="charname">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="editable">False</property>
-                    <property name="wrap_mode">word</property>
-                    <property name="justification">center</property>
-                    <property name="cursor_visible">False</property>
+                    <property name="use_underline">True</property>
+                    <property name="wrap">True</property>
+                    <property name="mnemonic_widget">showchar</property>
+                    <property name="yalign">0</property>
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
@@ -347,14 +348,15 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkBox" id="box3">
+                  <object class="GtkBox" id="viewgrid">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
+                    <property name="spacing">2</property>
                     <child>
-                      <object class="sfxlo-SvxCharView" id="viewchar1">
-                        <property name="width_request">40</property>
-                        <property name="height_request">35</property>
+                      <object class="GtkDrawingArea" id="viewchar1">
                         <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
                       </object>
                       <packing>
                         <property name="expand">False</property>
@@ -363,10 +365,10 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="sfxlo-SvxCharView" id="viewchar2">
-                        <property name="width_request">40</property>
-                        <property name="height_request">35</property>
+                      <object class="GtkDrawingArea" id="viewchar2">
                         <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
                       </object>
                       <packing>
                         <property name="expand">False</property>
@@ -375,10 +377,10 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="sfxlo-SvxCharView" id="viewchar3">
-                        <property name="width_request">40</property>
-                        <property name="height_request">35</property>
+                      <object class="GtkDrawingArea" id="viewchar3">
                         <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
                       </object>
                       <packing>
                         <property name="expand">False</property>
@@ -387,10 +389,10 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="sfxlo-SvxCharView" id="viewchar4">
-                        <property name="width_request">40</property>
-                        <property name="height_request">35</property>
+                      <object class="GtkDrawingArea" id="viewchar4">
                         <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
                       </object>
                       <packing>
                         <property name="expand">False</property>
@@ -399,10 +401,10 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="sfxlo-SvxCharView" id="viewchar5">
-                        <property name="width_request">40</property>
-                        <property name="height_request">35</property>
+                      <object class="GtkDrawingArea" id="viewchar5">
                         <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
                       </object>
                       <packing>
                         <property name="expand">False</property>
@@ -411,10 +413,10 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="sfxlo-SvxCharView" id="viewchar6">
-                        <property name="width_request">40</property>
-                        <property name="height_request">35</property>
+                      <object class="GtkDrawingArea" id="viewchar6">
                         <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
                       </object>
                       <packing>
                         <property name="expand">False</property>
@@ -423,10 +425,10 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="sfxlo-SvxCharView" id="viewchar7">
-                        <property name="width_request">40</property>
-                        <property name="height_request">35</property>
+                      <object class="GtkDrawingArea" id="viewchar7">
                         <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
                       </object>
                       <packing>
                         <property name="expand">False</property>
@@ -435,10 +437,10 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="sfxlo-SvxCharView" id="viewchar8">
-                        <property name="width_request">40</property>
-                        <property name="height_request">35</property>
+                      <object class="GtkDrawingArea" id="viewchar8">
                         <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
                       </object>
                       <packing>
                         <property name="expand">False</property>
@@ -447,10 +449,10 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="sfxlo-SvxCharView" id="viewchar9">
-                        <property name="width_request">40</property>
-                        <property name="height_request">35</property>
+                      <object class="GtkDrawingArea" id="viewchar9">
                         <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
                       </object>
                       <packing>
                         <property name="expand">False</property>
@@ -459,10 +461,10 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="sfxlo-SvxCharView" id="viewchar10">
-                        <property name="width_request">40</property>
-                        <property name="height_request">35</property>
+                      <object class="GtkDrawingArea" id="viewchar10">
                         <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
                       </object>
                       <packing>
                         <property name="expand">False</property>
@@ -471,10 +473,10 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="sfxlo-SvxCharView" id="viewchar11">
-                        <property name="width_request">40</property>
-                        <property name="height_request">35</property>
+                      <object class="GtkDrawingArea" id="viewchar11">
                         <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
                       </object>
                       <packing>
                         <property name="expand">False</property>
@@ -483,10 +485,10 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="sfxlo-SvxCharView" id="viewchar12">
-                        <property name="width_request">40</property>
-                        <property name="height_request">35</property>
+                      <object class="GtkDrawingArea" id="viewchar12">
                         <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
                       </object>
                       <packing>
                         <property name="expand">False</property>
@@ -495,10 +497,10 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="sfxlo-SvxCharView" id="viewchar13">
-                        <property name="width_request">40</property>
-                        <property name="height_request">35</property>
+                      <object class="GtkDrawingArea" id="viewchar13">
                         <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
                       </object>
                       <packing>
                         <property name="expand">False</property>
@@ -507,10 +509,10 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="sfxlo-SvxCharView" id="viewchar14">
-                        <property name="width_request">40</property>
-                        <property name="height_request">35</property>
+                      <object class="GtkDrawingArea" id="viewchar14">
                         <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
                       </object>
                       <packing>
                         <property name="expand">False</property>
@@ -519,10 +521,10 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="sfxlo-SvxCharView" id="viewchar15">
-                        <property name="width_request">40</property>
-                        <property name="height_request">35</property>
+                      <object class="GtkDrawingArea" id="viewchar15">
                         <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
                       </object>
                       <packing>
                         <property name="expand">False</property>
@@ -531,10 +533,10 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="sfxlo-SvxCharView" id="viewchar16">
-                        <property name="width_request">40</property>
-                        <property name="height_request">35</property>
+                      <object class="GtkDrawingArea" id="viewchar16">
                         <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
                       </object>
                       <packing>
                         <property name="expand">False</property>
@@ -578,14 +580,15 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkGrid" id="grid6">
+                  <object class="GtkGrid" id="favgrid">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
+                    <property name="column_spacing">2</property>
                     <child>
-                      <object class="sfxlo-SvxCharView" id="favchar1">
-                        <property name="width_request">40</property>
-                        <property name="height_request">35</property>
+                      <object class="GtkDrawingArea" id="favchar1">
                         <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
                       </object>
                       <packing>
                         <property name="left_attach">0</property>
@@ -593,10 +596,10 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="sfxlo-SvxCharView" id="favchar2">
-                        <property name="width_request">40</property>
-                        <property name="height_request">35</property>
+                      <object class="GtkDrawingArea" id="favchar2">
                         <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
                       </object>
                       <packing>
                         <property name="left_attach">1</property>
@@ -604,10 +607,10 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="sfxlo-SvxCharView" id="favchar4">
-                        <property name="width_request">40</property>
-                        <property name="height_request">35</property>
+                      <object class="GtkDrawingArea" id="favchar4">
                         <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
                       </object>
                       <packing>
                         <property name="left_attach">3</property>
@@ -615,10 +618,10 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="sfxlo-SvxCharView" id="favchar3">
-                        <property name="width_request">40</property>
-                        <property name="height_request">35</property>
+                      <object class="GtkDrawingArea" id="favchar3">
                         <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
                       </object>
                       <packing>
                         <property name="left_attach">2</property>
@@ -626,10 +629,10 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="sfxlo-SvxCharView" id="favchar5">
-                        <property name="width_request">40</property>
-                        <property name="height_request">35</property>
+                      <object class="GtkDrawingArea" id="favchar5">
                         <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK</property>

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list