include/svx/cuicharmap.hxx |  108 ++++++++++++++++++++++-----------------------
 1 file changed, 53 insertions(+), 55 deletions(-)

New commits:
commit 0764e84ca5158d87c3e0fc1301715481f28269ca
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Wed Apr 16 17:12:14 2025 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu Apr 17 08:01:09 2025 +0200

    rearrange SvxCharacterMap class definition
    
    Clean it up a little and make most of it private, doesn't need to be public
    
    Change-Id: Ifc5d14faadcfedb4443a60694296b6b4a63c828d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184289
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    Tested-by: Jenkins

diff --git a/include/svx/cuicharmap.hxx b/include/svx/cuicharmap.hxx
index 44779c02ddef..3bd815cb42e9 100644
--- a/include/svx/cuicharmap.hxx
+++ b/include/svx/cuicharmap.hxx
@@ -64,36 +64,29 @@ public:
     that are not easily accessible from the keyboard. */
 class SVX_DLLPUBLIC SvxCharacterMap final : public SfxDialogController
 {
-private:
-    void init();
+public:
+    SvxCharacterMap(weld::Widget* pParent, const SfxItemSet* pSet,
+                    css::uno::Reference<css::frame::XFrame> xFrame);
 
-    ScopedVclPtr<VirtualDevice> m_xVirDev;
-    vcl::Font aFont;
-    std::unique_ptr<const SubsetMap> pSubsetMap;
-    bool isSearchMode;
-    css::uno::Reference<css::frame::XFrame> m_xFrame;
+    // for explicit use before AsyncRun
+    void prepForRun();
 
-    SfxCharmapContainer m_aCharmapContents;
+    virtual short run() override;
 
-    SvxShowText m_aShowChar;
+    void set_title(const OUString& rTitle) { m_xDialog->set_title(rTitle); }
 
-    std::unique_ptr<weld::Button> m_xOKBtn;
-    std::unique_ptr<weld::Label> m_xFontText;
-    std::unique_ptr<weld::ComboBox> m_xFontLB;
-    std::unique_ptr<weld::Label> m_xSubsetText;
-    std::unique_ptr<weld::ComboBox> 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::CustomWeld> m_xShowChar;
-    std::unique_ptr<SvxShowCharSet> m_xShowSet;
-    std::unique_ptr<weld::CustomWeld> m_xShowSetArea;
-    std::unique_ptr<SvxSearchCharSet> m_xSearchSet;
-    std::unique_ptr<weld::CustomWeld> m_xSearchSetArea;
+    const SfxItemSet* GetOutputItemSet() const { return m_xOutputSet.get(); }
 
-    std::unique_ptr<SfxAllItemSet> m_xOutputSet;
+    void DisableFontSelection();
+
+    const vcl::Font& GetCharFont() const { return aFont; }
+    void SetCharFont(const vcl::Font& rFont);
+
+    void SetChar(sal_UCS4);
+    sal_UCS4 GetChar() const;
+
+private:
+    void init();
 
     enum class Radix : sal_Int16
     {
@@ -104,6 +97,18 @@ private:
     // inserts the character that is currently selected in the given 
SvxShowCharSet
     void insertSelectedCharacter(const SvxShowCharSet* pCharSet);
 
+    static void fillAllSubsets(weld::ComboBox& rListBox);
+
+    void selectCharByCode(Radix radix);
+
+    void insertCharToDoc(const OUString& sChar);
+
+    void setFavButtonState(std::u16string_view sTitle, std::u16string_view 
rFont);
+
+    void setCharName(sal_UCS4 nDecimalValue);
+
+    void toggleSearchView(bool state);
+
     DECL_DLLPRIVATE_LINK(FontSelectHdl, weld::ComboBox&, void);
     DECL_DLLPRIVATE_LINK(SubsetSelectHdl, weld::ComboBox&, void);
     DECL_DLLPRIVATE_LINK(CharDoubleClickHdl, SvxShowCharSet*, void);
@@ -122,37 +127,30 @@ private:
     DECL_DLLPRIVATE_LINK(SearchFieldGetFocusHdl, weld::Widget&, void);
     DECL_DLLPRIVATE_LINK(UpdateFavHdl, void*, void);
 
-    static void fillAllSubsets(weld::ComboBox& rListBox);
-    void selectCharByCode(Radix radix);
-
-public:
-    SvxCharacterMap(weld::Widget* pParent, const SfxItemSet* pSet,
-                    css::uno::Reference<css::frame::XFrame> xFrame);
-
-    // for explicit use before AsyncRun
-    void prepForRun();
-
-    virtual short run() override;
-
-    void set_title(const OUString& rTitle) { m_xDialog->set_title(rTitle); }
-
-    const SfxItemSet* GetOutputItemSet() const { return m_xOutputSet.get(); }
-
-    void DisableFontSelection();
-
-    const vcl::Font& GetCharFont() const { return aFont; }
-    void SetCharFont(const vcl::Font& rFont);
-
-    void SetChar(sal_UCS4);
-    sal_UCS4 GetChar() const;
-
-    void insertCharToDoc(const OUString& sChar);
-
-    void setFavButtonState(std::u16string_view sTitle, std::u16string_view 
rFont);
-
-    void setCharName(sal_UCS4 nDecimalValue);
+    ScopedVclPtr<VirtualDevice> m_xVirDev;
+    vcl::Font aFont;
+    std::unique_ptr<const SubsetMap> pSubsetMap;
+    bool isSearchMode;
+    css::uno::Reference<css::frame::XFrame> m_xFrame;
+    SfxCharmapContainer m_aCharmapContents;
+    SvxShowText m_aShowChar;
+    std::unique_ptr<SfxAllItemSet> m_xOutputSet;
 
-    void toggleSearchView(bool state);
+    std::unique_ptr<weld::Button> m_xOKBtn;
+    std::unique_ptr<weld::Label> m_xFontText;
+    std::unique_ptr<weld::ComboBox> m_xFontLB;
+    std::unique_ptr<weld::Label> m_xSubsetText;
+    std::unique_ptr<weld::ComboBox> 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::CustomWeld> m_xShowChar;
+    std::unique_ptr<SvxShowCharSet> m_xShowSet;
+    std::unique_ptr<weld::CustomWeld> m_xShowSetArea;
+    std::unique_ptr<SvxSearchCharSet> m_xSearchSet;
+    std::unique_ptr<weld::CustomWeld> m_xSearchSetArea;
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */

Reply via email to