[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source cui/uiconfig vcl/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Dec 4 12:10:04 UTC 2018


 cui/source/inc/autocdlg.hxx           |   60 +++---
 cui/source/tabpages/autocdlg.cxx      |  303 +++++++++++-----------------------
 cui/uiconfig/ui/applylocalizedpage.ui |  226 ++++++++++++++-----------
 vcl/source/app/salvtables.cxx         |   20 ++
 4 files changed, 279 insertions(+), 330 deletions(-)

New commits:
commit d07193a25bc057f687a68f487204df3ce999f96c
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Dec 3 13:48:34 2018 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Dec 4 13:09:43 2018 +0100

    weld OfaQuoteTabPage
    
    Change-Id: I7da18597e85a03d96197f32862686a49f9d8e153
    Reviewed-on: https://gerrit.libreoffice.org/64504
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/cui/source/inc/autocdlg.hxx b/cui/source/inc/autocdlg.hxx
index 6dc3a39548f8..0f85612dc1f7 100644
--- a/cui/source/inc/autocdlg.hxx
+++ b/cui/source/inc/autocdlg.hxx
@@ -320,54 +320,48 @@ class OfaQuoteTabPage : public SfxTabPage
     using TabPage::ActivatePage;
 
 private:
-    /// For anything but writer
-    VclPtr<SvxCheckListBox> m_pCheckLB;
-
-    /// Just for writer
-    VclPtr<OfaACorrCheckListBox>   m_pSwCheckLB;
-
     OUString        sNonBrkSpace;
     OUString        sOrdinal;
 
-    std::unique_ptr<SvLBoxButtonData> m_xCheckButtonData;
-
-    VclPtr<CheckBox>   m_pSingleTypoCB;
-    VclPtr<PushButton> m_pSglStartQuotePB;
-    VclPtr<FixedText>  m_pSglStartExFT;
-    VclPtr<PushButton> m_pSglEndQuotePB;
-    VclPtr<FixedText>  m_pSglEndExFT;
-    VclPtr<PushButton> m_pSglStandardPB;
-
-    VclPtr<CheckBox>   m_pDoubleTypoCB;
-    VclPtr<PushButton> m_pDblStartQuotePB;
-    VclPtr<FixedText>  m_pDblStartExFT;
-    VclPtr<PushButton> m_pDblEndQuotePB;
-    VclPtr<FixedText>  m_pDblEndExFT;
-    VclPtr<PushButton> m_pDblStandardPB;
-
-    OUString    m_sStandard;
-
-
     sal_UCS4    cSglStartQuote;
     sal_UCS4    cSglEndQuote;
 
     sal_UCS4    cStartQuote;
     sal_UCS4    cEndQuote;
 
-    DECL_LINK( QuoteHdl, Button*, void );
-    DECL_LINK( StdQuoteHdl, Button*, void );
+    std::unique_ptr<weld::CheckButton> m_xSingleTypoCB;
+    std::unique_ptr<weld::Button> m_xSglStartQuotePB;
+    std::unique_ptr<weld::Label> m_xSglStartExFT;
+    std::unique_ptr<weld::Button> m_xSglEndQuotePB;
+    std::unique_ptr<weld::Label> m_xSglEndExFT;
+    std::unique_ptr<weld::Button> m_xSglStandardPB;
+    std::unique_ptr<weld::CheckButton> m_xDoubleTypoCB;
+    std::unique_ptr<weld::Button> m_xDblStartQuotePB;
+    std::unique_ptr<weld::Label> m_xDblStartExFT;
+    std::unique_ptr<weld::Button> m_xDblEndQuotePB;
+    std::unique_ptr<weld::Label> m_xDblEndExFT;
+    std::unique_ptr<weld::Button> m_xDblStandardPB;
+    std::unique_ptr<weld::Label> m_xStandard;
+    /// For anything but writer
+    std::unique_ptr<weld::TreeView> m_xCheckLB;
+    /// Just for writer
+    std::unique_ptr<weld::TreeView> m_xSwCheckLB;
+
+
+    DECL_LINK(QuoteHdl, weld::Button&, void);
+    DECL_LINK(StdQuoteHdl, weld::Button&, void);
 
     OUString            ChangeStringExt_Impl( sal_UCS4 );
 
-    SvTreeListEntry* CreateEntry(OUString& rTxt, sal_uInt16 nCol);
+    static void CreateEntry(weld::TreeView& rLstBox, const OUString& rTxt,
+                            sal_uInt16 nCol, sal_uInt16 nTextCol);
 
-                        OfaQuoteTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
+    OfaQuoteTabPage(TabPageParent pParent, const SfxItemSet& rSet);
 public:
-                        virtual ~OfaQuoteTabPage() override;
-    virtual void        dispose() override;
+    virtual ~OfaQuoteTabPage() override;
 
-    static VclPtr<SfxTabPage>  Create( TabPageParent pParent,
-                                const SfxItemSet* rAttrSet);
+    static VclPtr<SfxTabPage> Create(TabPageParent pParent,
+                                     const SfxItemSet* rAttrSet);
 
     virtual bool        FillItemSet( SfxItemSet* rSet ) override;
     virtual void        Reset( const SfxItemSet* rSet ) override;
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 27f0d3945c14..e3870bd2fa3b 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -319,62 +319,6 @@ public:
 
 /*********************************************************************/
 /*                                                                   */
-/*  changed LBoxString                                               */
-/*                                                                   */
-/*********************************************************************/
-
-class OfaImpBrwString : public SvLBoxString
-{
-public:
-
-    explicit OfaImpBrwString( const OUString& rStr ) : SvLBoxString(rStr){}
-
-    virtual void Paint(const Point& rPos, SvTreeListBox& rDev, vcl::RenderContext& rRenderContext,
-                       const SvViewDataEntry* pView, const SvTreeListEntry& rEntry) override;
-};
-
-void OfaImpBrwString::Paint(const Point& rPos, SvTreeListBox& /*rDev*/, vcl::RenderContext& rRenderContext,
-                            const SvViewDataEntry* /*pView*/, const SvTreeListEntry& rEntry)
-{
-    rRenderContext.DrawText(rPos, GetText());
-    if (rEntry.GetUserData())
-    {
-        ImpUserData* pUserData = static_cast<ImpUserData*>(rEntry.GetUserData());
-        Point aNewPos(rPos);
-        aNewPos.AdjustX(rRenderContext.GetTextWidth(GetText()) );
-        vcl::Font aOldFont(rRenderContext.GetFont());
-        vcl::Font aFont(aOldFont);
-        if (pUserData->pFont)
-        {
-            aFont = *pUserData->pFont;
-            aFont.SetColor(aOldFont.GetColor());
-            aFont.SetFontSize(aOldFont.GetFontSize());
-        }
-        aFont.SetWeight(WEIGHT_BOLD);
-
-        bool bFett = true;
-        sal_Int32 nPos = 0;
-        do {
-            OUString sTxt(pUserData->pString->getToken(0, 1, nPos));
-
-            if (bFett)
-                rRenderContext.SetFont(aFont);
-
-            rRenderContext.DrawText(aNewPos, sTxt);
-
-            if (-1 != nPos)
-                aNewPos.AdjustX(rRenderContext.GetTextWidth(sTxt) );
-
-            if (bFett)
-                rRenderContext.SetFont(aOldFont);
-
-            bFett = !bFett;
-        } while(-1 != nPos);
-    }
-}
-
-/*********************************************************************/
-/*                                                                   */
 /*  use TabPage autoformat                                           */
 /*                                                                   */
 /*********************************************************************/
@@ -1691,66 +1635,44 @@ enum OfaQuoteOptions
     REPLACE_1ST
 };
 
-SvTreeListEntry* OfaQuoteTabPage::CreateEntry(OUString& rTxt, sal_uInt16 nCol)
+void OfaQuoteTabPage::CreateEntry(weld::TreeView& rCheckLB, const OUString& rTxt, sal_uInt16 nCol, sal_uInt16 nTextCol)
 {
-    SvTreeListEntry* pEntry = new SvTreeListEntry;
-
-    if (!m_xCheckButtonData)
-    {
-        m_xCheckButtonData.reset(new SvLBoxButtonData(m_pSwCheckLB));
-        m_pSwCheckLB->SetCheckButtonData(m_xCheckButtonData.get());
-    }
-
-    pEntry->AddItem(o3tl::make_unique<SvLBoxContextBmp>(Image(), Image(), false));
-
-    if (nCol == CBCOL_SECOND)
-        pEntry->AddItem(o3tl::make_unique<SvLBoxString>(""));
-    else
-        pEntry->AddItem(o3tl::make_unique<SvLBoxButton>(SvLBoxButtonKind::EnabledCheckbox, m_xCheckButtonData.get()));
-
-    if (nCol == CBCOL_FIRST)
-        pEntry->AddItem(o3tl::make_unique<SvLBoxString>(""));
-    else
-        pEntry->AddItem(o3tl::make_unique<SvLBoxButton>(SvLBoxButtonKind::EnabledCheckbox, m_xCheckButtonData.get()));
-
-    pEntry->AddItem(o3tl::make_unique<OfaImpBrwString>(rTxt));
-
-    return pEntry;
+    rCheckLB.insert(nullptr, -1, nullptr, nullptr, nullptr,
+                    nullptr, nullptr, false);
+    const int nRow = rCheckLB.n_children() - 1;
+    if (nCol == CBCOL_FIRST || nCol == CBCOL_BOTH)
+        rCheckLB.set_toggle(nRow, false, CBCOL_FIRST);
+    if (nCol == CBCOL_SECOND || nCol == CBCOL_BOTH)
+        rCheckLB.set_toggle(nRow, false, CBCOL_SECOND);
+    rCheckLB.set_text(nRow, rTxt, nTextCol);
 }
 
-OfaQuoteTabPage::OfaQuoteTabPage(vcl::Window* pParent, const SfxItemSet& rSet)
-    : SfxTabPage(pParent, "ApplyLocalizedPage", "cui/ui/applylocalizedpage.ui", &rSet)
+OfaQuoteTabPage::OfaQuoteTabPage(TabPageParent pParent, const SfxItemSet& rSet)
+    : SfxTabPage(pParent, "cui/ui/applylocalizedpage.ui", "ApplyLocalizedPage", &rSet)
     , sNonBrkSpace(CuiResId(RID_SVXSTR_NON_BREAK_SPACE))
     , sOrdinal(CuiResId(RID_SVXSTR_ORDINAL))
     , cSglStartQuote(0)
     , cSglEndQuote(0)
     , cStartQuote(0)
     , cEndQuote(0)
-{
-    get(m_pCheckLB, "checklist");
-
-    SvSimpleTableContainer *pListContainer = get<SvSimpleTableContainer>("list");
-    Size aControlSize(252 , 85);
-    aControlSize = LogicToPixel(aControlSize, MapMode(MapUnit::MapAppFont));
-    pListContainer->set_width_request(aControlSize.Width());
-    pListContainer->set_height_request(aControlSize.Height());
-    m_pSwCheckLB = VclPtr<OfaACorrCheckListBox>::Create(*pListContainer);
-
-    get(m_pSingleTypoCB, "singlereplace");
-    get(m_pSglStartQuotePB, "startsingle");
-    get(m_pSglStartExFT, "singlestartex");
-    get(m_pSglEndQuotePB, "endsingle");
-    get(m_pSglEndExFT, "singleendex");
-    get(m_pSglStandardPB, "defaultsingle");
-
-    get(m_pDoubleTypoCB, "doublereplace");
-    get(m_pDblStartQuotePB, "startdouble");
-    get(m_pDblStartExFT, "doublestartex");
-    get(m_pDblEndQuotePB, "enddouble");
-    get(m_pDblEndExFT, "doubleendex");
-    get(m_pDblStandardPB, "defaultdouble");
-
-    m_sStandard = get<FixedText>("singlestartex")->GetText();
+    , m_xSingleTypoCB(m_xBuilder->weld_check_button("singlereplace"))
+    , m_xSglStartQuotePB(m_xBuilder->weld_button("startsingle"))
+    , m_xSglStartExFT(m_xBuilder->weld_label("singlestartex"))
+    , m_xSglEndQuotePB(m_xBuilder->weld_button("endsingle"))
+    , m_xSglEndExFT(m_xBuilder->weld_label("singleendex"))
+    , m_xSglStandardPB(m_xBuilder->weld_button("defaultsingle"))
+    , m_xDoubleTypoCB(m_xBuilder->weld_check_button("doublereplace"))
+    , m_xDblStartQuotePB(m_xBuilder->weld_button("startdouble"))
+    , m_xDblStartExFT(m_xBuilder->weld_label("doublestartex"))
+    , m_xDblEndQuotePB(m_xBuilder->weld_button("enddouble"))
+    , m_xDblEndExFT(m_xBuilder->weld_label("doubleendex"))
+    , m_xDblStandardPB(m_xBuilder->weld_button("defaultdouble"))
+    , m_xStandard(m_xBuilder->weld_label("singlestartex"))
+    , m_xCheckLB(m_xBuilder->weld_tree_view("checklist"))
+    , m_xSwCheckLB(m_xBuilder->weld_tree_view("list"))
+{
+    m_xSwCheckLB->set_size_request(m_xSwCheckLB->get_approximate_digit_width() * 50,
+                                   m_xSwCheckLB->get_height_rows(6));
 
     bool bShowSWOptions = false;
 
@@ -1760,30 +1682,26 @@ OfaQuoteTabPage::OfaQuoteTabPage(vcl::Window* pParent, const SfxItemSet& rSet)
 
     if ( bShowSWOptions )
     {
-        static long const aStaticTabs[]=
-        {
-            0, 20, 40
-        };
-
-        m_pSwCheckLB->SetStyle(m_pSwCheckLB->GetStyle() | WB_HSCROLL| WB_VSCROLL);
-
-        m_pSwCheckLB->SvSimpleTable::SetTabs(SAL_N_ELEMENTS(aStaticTabs), aStaticTabs);
-        OUString sHeader = get<vcl::Window>("m")->GetText() + "\t" + get<vcl::Window>("t")->GetText() + "\t";
-        m_pSwCheckLB->InsertHeaderEntry( sHeader, HEADERBAR_APPEND,
-                        HeaderBarItemBits::CENTER | HeaderBarItemBits::VCENTER | HeaderBarItemBits::FIXEDPOS | HeaderBarItemBits::FIXED);
-        m_pCheckLB->Hide();
+        std::vector<int> aWidths;
+        aWidths.push_back(m_xSwCheckLB->get_pixel_size(m_xSwCheckLB->get_column_title(0)).Width() * 2);
+        aWidths.push_back(m_xSwCheckLB->get_pixel_size(m_xSwCheckLB->get_column_title(1)).Width() * 2);
+        m_xSwCheckLB->set_column_fixed_widths(aWidths);
+        m_xCheckLB->hide();
     }
     else
     {
-        m_pSwCheckLB->HideTable();
+        std::vector<int> aWidths;
+        aWidths.push_back(m_xSwCheckLB->get_approximate_digit_width() * 3 + 6);
+        m_xCheckLB->set_column_fixed_widths(aWidths);
+        m_xSwCheckLB->hide();
     }
 
-    m_pDblStartQuotePB->SetClickHdl(LINK(this,    OfaQuoteTabPage, QuoteHdl));
-    m_pDblEndQuotePB->SetClickHdl(LINK(this,      OfaQuoteTabPage, QuoteHdl));
-    m_pSglStartQuotePB->SetClickHdl(LINK(this, OfaQuoteTabPage, QuoteHdl));
-    m_pSglEndQuotePB->SetClickHdl(LINK(this,   OfaQuoteTabPage, QuoteHdl));
-    m_pDblStandardPB->SetClickHdl(LINK(this,   OfaQuoteTabPage, StdQuoteHdl));
-    m_pSglStandardPB->SetClickHdl(LINK(this,   OfaQuoteTabPage, StdQuoteHdl));
+    m_xDblStartQuotePB->connect_clicked(LINK(this, OfaQuoteTabPage, QuoteHdl));
+    m_xDblEndQuotePB->connect_clicked(LINK(this, OfaQuoteTabPage, QuoteHdl));
+    m_xSglStartQuotePB->connect_clicked(LINK(this, OfaQuoteTabPage, QuoteHdl));
+    m_xSglEndQuotePB->connect_clicked(LINK(this, OfaQuoteTabPage, QuoteHdl));
+    m_xDblStandardPB->connect_clicked(LINK(this, OfaQuoteTabPage, StdQuoteHdl));
+    m_xSglStandardPB->connect_clicked(LINK(this, OfaQuoteTabPage, StdQuoteHdl));
 }
 
 OfaQuoteTabPage::~OfaQuoteTabPage()
@@ -1791,30 +1709,10 @@ OfaQuoteTabPage::~OfaQuoteTabPage()
     disposeOnce();
 }
 
-void OfaQuoteTabPage::dispose()
-{
-    m_xCheckButtonData.reset();
-    m_pSwCheckLB.disposeAndClear();
-    m_pCheckLB.disposeAndClear();
-    m_pSingleTypoCB.clear();
-    m_pSglStartQuotePB.clear();
-    m_pSglStartExFT.clear();
-    m_pSglEndQuotePB.clear();
-    m_pSglEndExFT.clear();
-    m_pSglStandardPB.clear();
-    m_pDoubleTypoCB.clear();
-    m_pDblStartQuotePB.clear();
-    m_pDblStartExFT.clear();
-    m_pDblEndQuotePB.clear();
-    m_pDblEndExFT.clear();
-    m_pDblStandardPB.clear();
-    SfxTabPage::dispose();
-}
-
-VclPtr<SfxTabPage> OfaQuoteTabPage::Create( TabPageParent pParent,
-                                            const SfxItemSet* rAttrSet)
+VclPtr<SfxTabPage> OfaQuoteTabPage::Create(TabPageParent pParent,
+                                           const SfxItemSet* rAttrSet)
 {
-    return VclPtr<OfaQuoteTabPage>::Create(pParent.pParent, *rAttrSet);
+    return VclPtr<OfaQuoteTabPage>::Create(pParent, *rAttrSet);
 }
 
 bool OfaQuoteTabPage::FillItemSet( SfxItemSet*  )
@@ -1823,33 +1721,33 @@ bool OfaQuoteTabPage::FillItemSet( SfxItemSet*  )
 
     ACFlags nFlags = pAutoCorrect->GetFlags();
 
-    if (m_pCheckLB->IsVisible())
+    if (m_xCheckLB->get_visible())
     {
-        sal_uLong nPos = 0;
-        pAutoCorrect->SetAutoCorrFlag(ACFlags::AddNonBrkSpace, m_pCheckLB->IsChecked(nPos++));
-        pAutoCorrect->SetAutoCorrFlag(ACFlags::ChgOrdinalNumber, m_pCheckLB->IsChecked(nPos++));
+        int nPos = 0;
+        pAutoCorrect->SetAutoCorrFlag(ACFlags::AddNonBrkSpace, m_xCheckLB->get_toggle(nPos++));
+        pAutoCorrect->SetAutoCorrFlag(ACFlags::ChgOrdinalNumber, m_xCheckLB->get_toggle(nPos++));
     }
 
     bool bModified = false;
-    if (m_pSwCheckLB->IsVisible())
+    if (m_xSwCheckLB->get_visible())
     {
         SvxSwAutoFormatFlags *pOpt = &pAutoCorrect->GetSwFlags();
 
-        bool bCheck = m_pSwCheckLB->IsChecked(ADD_NONBRK_SPACE);
+        bool bCheck = m_xSwCheckLB->get_toggle(ADD_NONBRK_SPACE);
         bModified |= pOpt->bAddNonBrkSpace != bCheck;
         pOpt->bAddNonBrkSpace = bCheck;
         pAutoCorrect->SetAutoCorrFlag(ACFlags::AddNonBrkSpace,
-                            m_pSwCheckLB->IsChecked(ADD_NONBRK_SPACE, CBCOL_SECOND));
+                            m_xSwCheckLB->get_toggle(ADD_NONBRK_SPACE, CBCOL_SECOND));
 
-        bCheck = m_pSwCheckLB->IsChecked(REPLACE_1ST);
+        bCheck = m_xSwCheckLB->get_toggle(REPLACE_1ST);
         bModified |= pOpt->bChgOrdinalNumber != bCheck;
         pOpt->bChgOrdinalNumber = bCheck;
         pAutoCorrect->SetAutoCorrFlag(ACFlags::ChgOrdinalNumber,
-                        m_pSwCheckLB->IsChecked(REPLACE_1ST, CBCOL_SECOND));
+                        m_xSwCheckLB->get_toggle(REPLACE_1ST, CBCOL_SECOND));
     }
 
-    pAutoCorrect->SetAutoCorrFlag(ACFlags::ChgQuotes, m_pDoubleTypoCB->IsChecked());
-    pAutoCorrect->SetAutoCorrFlag(ACFlags::ChgSglQuotes, m_pSingleTypoCB->IsChecked());
+    pAutoCorrect->SetAutoCorrFlag(ACFlags::ChgQuotes, m_xDoubleTypoCB->get_active());
+    pAutoCorrect->SetAutoCorrFlag(ACFlags::ChgSglQuotes, m_xSingleTypoCB->get_active());
     bool bReturn = nFlags != pAutoCorrect->GetFlags();
     if(cStartQuote != pAutoCorrect->GetStartDoubleQuote())
     {
@@ -1896,55 +1794,55 @@ void OfaQuoteTabPage::Reset( const SfxItemSet* )
     const ACFlags nFlags = pAutoCorrect->GetFlags();
 
     // Initialize the Sw options
-    if (m_pSwCheckLB->IsVisible())
+    if (m_xSwCheckLB->get_visible())
     {
         SvxSwAutoFormatFlags *pOpt = &pAutoCorrect->GetSwFlags();
 
-        m_pSwCheckLB->SetUpdateMode( false );
-        m_pSwCheckLB->Clear();
+        m_xSwCheckLB->freeze();
+        m_xSwCheckLB->clear();
 
-        m_pSwCheckLB->GetModel()->Insert(CreateEntry(sNonBrkSpace, CBCOL_BOTH ));
-        m_pSwCheckLB->GetModel()->Insert(CreateEntry(sOrdinal, CBCOL_BOTH ));
+        CreateEntry(*m_xSwCheckLB, sNonBrkSpace, CBCOL_BOTH, 2);
+        CreateEntry(*m_xSwCheckLB, sOrdinal, CBCOL_BOTH, 2);
 
-        m_pSwCheckLB->CheckEntryPos( ADD_NONBRK_SPACE, CBCOL_FIRST,    pOpt->bAddNonBrkSpace );
-        m_pSwCheckLB->CheckEntryPos( ADD_NONBRK_SPACE, CBCOL_SECOND,   bool(nFlags & ACFlags::AddNonBrkSpace) );
-        m_pSwCheckLB->CheckEntryPos( REPLACE_1ST, CBCOL_FIRST,    pOpt->bChgOrdinalNumber );
-        m_pSwCheckLB->CheckEntryPos( REPLACE_1ST, CBCOL_SECOND,   bool(nFlags & ACFlags::ChgOrdinalNumber) );
+        m_xSwCheckLB->set_toggle(ADD_NONBRK_SPACE, pOpt->bAddNonBrkSpace, CBCOL_FIRST);
+        m_xSwCheckLB->set_toggle(ADD_NONBRK_SPACE, bool(nFlags & ACFlags::AddNonBrkSpace), CBCOL_SECOND);
+        m_xSwCheckLB->set_toggle(REPLACE_1ST, pOpt->bChgOrdinalNumber, CBCOL_FIRST);
+        m_xSwCheckLB->set_toggle(REPLACE_1ST, bool(nFlags & ACFlags::ChgOrdinalNumber), CBCOL_SECOND);
 
-        m_pSwCheckLB->SetUpdateMode( true );
+        m_xSwCheckLB->thaw();
     }
 
     // Initialize the non Sw options
-    if (m_pCheckLB->IsVisible())
+    if (m_xCheckLB->get_visible())
     {
-        m_pCheckLB->SetUpdateMode(false);
-        m_pCheckLB->Clear();
+        m_xCheckLB->freeze();
+        m_xCheckLB->clear();
 
-        m_pCheckLB->InsertEntry( sNonBrkSpace );
-        m_pCheckLB->InsertEntry( sOrdinal );
+        CreateEntry(*m_xCheckLB, sNonBrkSpace, CBCOL_FIRST, 1);
+        CreateEntry(*m_xCheckLB, sOrdinal, CBCOL_FIRST, 1);
 
-        sal_uLong nPos = 0;
-        m_pCheckLB->CheckEntryPos( nPos++, bool(nFlags & ACFlags::AddNonBrkSpace) );
-        m_pCheckLB->CheckEntryPos( nPos++, bool(nFlags & ACFlags::ChgOrdinalNumber) );
+        int nPos = 0;
+        m_xCheckLB->set_toggle(nPos++, bool(nFlags & ACFlags::AddNonBrkSpace));
+        m_xCheckLB->set_toggle(nPos++, bool(nFlags & ACFlags::ChgOrdinalNumber));
 
-        m_pCheckLB->SetUpdateMode(true);
+        m_xCheckLB->thaw();
     }
 
     // Initialize the quote stuffs
-    m_pDoubleTypoCB->Check(bool(nFlags & ACFlags::ChgQuotes));
-    m_pSingleTypoCB->Check(bool(nFlags & ACFlags::ChgSglQuotes));
-    m_pDoubleTypoCB->SaveValue();
-    m_pSingleTypoCB->SaveValue();
+    m_xDoubleTypoCB->set_active(bool(nFlags & ACFlags::ChgQuotes));
+    m_xSingleTypoCB->set_active(bool(nFlags & ACFlags::ChgSglQuotes));
+    m_xDoubleTypoCB->save_state();
+    m_xSingleTypoCB->save_state();
 
     cStartQuote = pAutoCorrect->GetStartDoubleQuote();
     cEndQuote = pAutoCorrect->GetEndDoubleQuote();
     cSglStartQuote = pAutoCorrect->GetStartSingleQuote();
     cSglEndQuote = pAutoCorrect->GetEndSingleQuote();
 
-    m_pSglStartExFT->SetText(ChangeStringExt_Impl(cSglStartQuote));
-    m_pSglEndExFT->SetText(ChangeStringExt_Impl(cSglEndQuote));
-    m_pDblStartExFT->SetText(ChangeStringExt_Impl(cStartQuote));
-    m_pDblEndExFT->SetText(ChangeStringExt_Impl(cEndQuote));
+    m_xSglStartExFT->set_label(ChangeStringExt_Impl(cSglStartQuote));
+    m_xSglEndExFT->set_label(ChangeStringExt_Impl(cSglEndQuote));
+    m_xDblStartExFT->set_label(ChangeStringExt_Impl(cStartQuote));
+    m_xDblEndExFT->set_label(ChangeStringExt_Impl(cEndQuote));
 }
 
 #define SGL_START       0
@@ -1953,14 +1851,14 @@ void OfaQuoteTabPage::Reset( const SfxItemSet* )
 #define DBL_END         3
 
 
-IMPL_LINK( OfaQuoteTabPage, QuoteHdl, Button*, pBtn, void )
+IMPL_LINK(OfaQuoteTabPage, QuoteHdl, weld::Button&, rBtn, void)
 {
     sal_uInt16 nMode = SGL_START;
-    if (pBtn == m_pSglEndQuotePB)
+    if (&rBtn == m_xSglEndQuotePB.get())
         nMode = SGL_END;
-    else if (pBtn == m_pDblStartQuotePB)
+    else if (&rBtn == m_xDblStartQuotePB.get())
         nMode = DBL_START;
-    else if (pBtn == m_pDblEndQuotePB)
+    else if (&rBtn == m_xDblEndQuotePB.get())
         nMode = DBL_END;
     // start character selection dialog
     SvxCharacterMap aMap(GetDialogFrameWeld(), nullptr, false);
@@ -2007,48 +1905,47 @@ IMPL_LINK( OfaQuoteTabPage, QuoteHdl, Button*, pBtn, void )
         {
             case SGL_START:
                 cSglStartQuote = cNewChar;
-                m_pSglStartExFT->SetText(ChangeStringExt_Impl(cNewChar));
+                m_xSglStartExFT->set_label(ChangeStringExt_Impl(cNewChar));
             break;
             case SGL_END:
                 cSglEndQuote = cNewChar;
-                m_pSglEndExFT->SetText(ChangeStringExt_Impl(cNewChar));
+                m_xSglEndExFT->set_label(ChangeStringExt_Impl(cNewChar));
             break;
             case DBL_START:
                 cStartQuote = cNewChar;
-                m_pDblStartExFT->SetText(ChangeStringExt_Impl(cNewChar));
+                m_xDblStartExFT->set_label(ChangeStringExt_Impl(cNewChar));
             break;
             case DBL_END:
                 cEndQuote = cNewChar;
-                m_pDblEndExFT->SetText(ChangeStringExt_Impl(cNewChar));
+                m_xDblEndExFT->set_label(ChangeStringExt_Impl(cNewChar));
             break;
         }
     }
 }
 
-IMPL_LINK( OfaQuoteTabPage, StdQuoteHdl, Button*, pBtn, void )
+IMPL_LINK(OfaQuoteTabPage, StdQuoteHdl, weld::Button&, rBtn, void)
 {
-    if (pBtn == m_pDblStandardPB)
+    if (&rBtn == m_xDblStandardPB.get())
     {
         cStartQuote = 0;
-        m_pDblStartExFT->SetText(ChangeStringExt_Impl(0));
+        m_xDblStartExFT->set_label(ChangeStringExt_Impl(0));
         cEndQuote = 0;
-        m_pDblEndExFT->SetText(ChangeStringExt_Impl(0));
+        m_xDblEndExFT->set_label(ChangeStringExt_Impl(0));
 
     }
     else
     {
         cSglStartQuote = 0;
-        m_pSglStartExFT->SetText(ChangeStringExt_Impl(0));
+        m_xSglStartExFT->set_label(ChangeStringExt_Impl(0));
         cSglEndQuote = 0;
-        m_pSglEndExFT->SetText(ChangeStringExt_Impl(0));
+        m_xSglEndExFT->set_label(ChangeStringExt_Impl(0));
     }
 }
 
-
 OUString OfaQuoteTabPage::ChangeStringExt_Impl( sal_UCS4 cChar )
 {
     if (!cChar)
-        return m_sStandard;
+        return m_xStandard->get_label();
 
     // convert codepoint value to unicode-hex string
     sal_UCS4 aStrCodes[32] = { 0, ' ', '(', 'U', '+', '0' };
diff --git a/cui/uiconfig/ui/applylocalizedpage.ui b/cui/uiconfig/ui/applylocalizedpage.ui
index 0740bd266023..03dcbce8ba29 100644
--- a/cui/uiconfig/ui/applylocalizedpage.ui
+++ b/cui/uiconfig/ui/applylocalizedpage.ui
@@ -1,7 +1,29 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.22.1 -->
 <interface domain="cui">
   <requires lib="gtk+" version="3.18"/>
-  <requires lib="LibreOffice" version="1.0"/>
+  <object class="GtkTreeStore" id="liststore1">
+    <columns>
+      <!-- column-name check1 -->
+      <column type="gboolean"/>
+      <!-- column-name check2 -->
+      <column type="gboolean"/>
+      <!-- column-name text -->
+      <column type="gchararray"/>
+      <!-- column-name id -->
+      <column type="gchararray"/>
+    </columns>
+  </object>
+  <object class="GtkTreeStore" id="liststore2">
+    <columns>
+      <!-- column-name check1 -->
+      <column type="gboolean"/>
+      <!-- column-name text -->
+      <column type="gchararray"/>
+      <!-- column-name id -->
+      <column type="gchararray"/>
+    </columns>
+  </object>
   <object class="GtkBox" id="ApplyLocalizedPage">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
@@ -24,71 +46,133 @@
             <property name="vexpand">True</property>
             <property name="column_homogeneous">True</property>
             <child>
-              <object class="GtkLabel" id="m">
-                <property name="can_focus">False</property>
-                <property name="no_show_all">True</property>
-                <property name="label" translatable="yes" context="applylocalizedpage|m">[M]</property>
-              </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">0</property>
-                <property name="width">1</property>
-                <property name="height">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="t">
-                <property name="can_focus">False</property>
-                <property name="no_show_all">True</property>
-                <property name="label" translatable="yes" context="applylocalizedpage|t">[T]</property>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">0</property>
-                <property name="width">1</property>
-                <property name="height">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="svtlo-SvSimpleTableContainer" id="list:border">
+              <object class="GtkScrolledWindow">
                 <property name="visible">True</property>
-                <property name="can_focus">False</property>
+                <property name="can_focus">True</property>
                 <property name="hexpand">True</property>
                 <property name="vexpand">True</property>
-                <child internal-child="selection">
-                  <object class="GtkTreeSelection" id="Simple Table Container-selection1"/>
+                <property name="shadow_type">in</property>
+                <child>
+                  <object class="GtkTreeView" id="list">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="hexpand">True</property>
+                    <property name="vexpand">True</property>
+                    <property name="model">liststore1</property>
+                    <property name="search_column">0</property>
+                    <property name="show_expanders">False</property>
+                    <child internal-child="selection">
+                      <object class="GtkTreeSelection" id="Macro Library List-selection1"/>
+                    </child>
+                    <child>
+                      <object class="GtkTreeViewColumn" id="treeviewcolumn1">
+                        <property name="resizable">True</property>
+                        <property name="spacing">6</property>
+                        <property name="title" translatable="yes" context="applylocalizedpage|m">[M]</property>
+                        <property name="alignment">0.5</property>
+                        <child>
+                          <object class="GtkCellRendererToggle" id="cellrenderer1"/>
+                          <attributes>
+                            <attribute name="active">0</attribute>
+                          </attributes>
+                        </child>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkTreeViewColumn" id="treeviewcolumn2">
+                        <property name="resizable">True</property>
+                        <property name="spacing">6</property>
+                        <property name="title" translatable="yes" context="applylocalizedpage|t">[T]</property>
+                        <property name="alignment">0.5</property>
+                        <child>
+                          <object class="GtkCellRendererToggle" id="cellrenderer2"/>
+                          <attributes>
+                            <attribute name="active">1</attribute>
+                          </attributes>
+                        </child>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkTreeViewColumn" id="treeviewcolumn3">
+                        <property name="resizable">True</property>
+                        <property name="spacing">6</property>
+                        <child>
+                          <object class="GtkCellRendererText" id="cellrenderer3"/>
+                          <attributes>
+                            <attribute name="text">0</attribute>
+                          </attributes>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
                 </child>
               </object>
               <packing>
                 <property name="left_attach">0</property>
-                <property name="top_attach">1</property>
+                <property name="top_attach">0</property>
                 <property name="width">2</property>
-                <property name="height">1</property>
               </packing>
             </child>
             <child>
-              <object class="svxcorelo-SvxCheckListBox" id="checklist:border">
+              <object class="GtkScrolledWindow">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="hexpand">True</property>
                 <property name="vexpand">True</property>
-                <child internal-child="selection">
-                  <object class="GtkTreeSelection" id="Check List Box-selection1"/>
+                <property name="shadow_type">in</property>
+                <child>
+                  <object class="GtkTreeView" id="checklist">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="hexpand">True</property>
+                    <property name="vexpand">True</property>
+                    <property name="model">liststore2</property>
+                    <property name="headers_visible">False</property>
+                    <property name="search_column">0</property>
+                    <property name="show_expanders">False</property>
+                    <child internal-child="selection">
+                      <object class="GtkTreeSelection" id="Macro Library List-selection2"/>
+                    </child>
+                    <child>
+                      <object class="GtkTreeViewColumn" id="treeviewcolumn4">
+                        <property name="resizable">True</property>
+                        <property name="spacing">6</property>
+                        <property name="alignment">0.5</property>
+                        <child>
+                          <object class="GtkCellRendererToggle" id="cellrenderer5"/>
+                          <attributes>
+                            <attribute name="active">0</attribute>
+                          </attributes>
+                        </child>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkTreeViewColumn" id="treeviewcolumn5">
+                        <property name="resizable">True</property>
+                        <property name="spacing">6</property>
+                        <child>
+                          <object class="GtkCellRendererText" id="cellrenderer4"/>
+                          <attributes>
+                            <attribute name="text">0</attribute>
+                          </attributes>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
                 </child>
               </object>
               <packing>
                 <property name="left_attach">0</property>
-                <property name="top_attach">2</property>
+                <property name="top_attach">1</property>
                 <property name="width">2</property>
-                <property name="height">1</property>
               </packing>
             </child>
           </object>
           <packing>
             <property name="left_attach">0</property>
             <property name="top_attach">0</property>
-            <property name="width">1</property>
-            <property name="height">1</property>
           </packing>
         </child>
         <child>
@@ -126,24 +210,20 @@
                           <packing>
                             <property name="left_attach">0</property>
                             <property name="top_attach">0</property>
-                            <property name="width">1</property>
-                            <property name="height">1</property>
                           </packing>
                         </child>
                         <child>
                           <object class="GtkLabel" id="startquoteft">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
                             <property name="label" translatable="yes" context="applylocalizedpage|startquoteft">_Start quote:</property>
                             <property name="use_underline">True</property>
                             <property name="mnemonic_widget">startsingle</property>
+                            <property name="xalign">0</property>
                           </object>
                           <packing>
                             <property name="left_attach">0</property>
                             <property name="top_attach">1</property>
-                            <property name="width">1</property>
-                            <property name="height">1</property>
                           </packing>
                         </child>
                         <child>
@@ -166,30 +246,24 @@
                               <packing>
                                 <property name="left_attach">0</property>
                                 <property name="top_attach">0</property>
-                                <property name="width">1</property>
-                                <property name="height">1</property>
                               </packing>
                             </child>
                             <child>
                               <object class="GtkLabel" id="singlestartex">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
-                                <property name="xalign">0</property>
                                 <property name="label" translatable="yes" context="applylocalizedpage|singlestartex">Default</property>
+                                <property name="xalign">0</property>
                               </object>
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="top_attach">0</property>
-                                <property name="width">1</property>
-                                <property name="height">1</property>
                               </packing>
                             </child>
                           </object>
                           <packing>
                             <property name="left_attach">0</property>
                             <property name="top_attach">2</property>
-                            <property name="width">1</property>
-                            <property name="height">1</property>
                           </packing>
                         </child>
                         <child>
@@ -209,24 +283,20 @@
                           <packing>
                             <property name="left_attach">0</property>
                             <property name="top_attach">5</property>
-                            <property name="width">1</property>
-                            <property name="height">1</property>
                           </packing>
                         </child>
                         <child>
                           <object class="GtkLabel" id="endquoteft">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
                             <property name="label" translatable="yes" context="applylocalizedpage|endquoteft">_End quote:</property>
                             <property name="use_underline">True</property>
                             <property name="mnemonic_widget">endsingle</property>
+                            <property name="xalign">0</property>
                           </object>
                           <packing>
                             <property name="left_attach">0</property>
                             <property name="top_attach">3</property>
-                            <property name="width">1</property>
-                            <property name="height">1</property>
                           </packing>
                         </child>
                         <child>
@@ -249,30 +319,24 @@
                               <packing>
                                 <property name="left_attach">0</property>
                                 <property name="top_attach">0</property>
-                                <property name="width">1</property>
-                                <property name="height">1</property>
                               </packing>
                             </child>
                             <child>
                               <object class="GtkLabel" id="singleendex">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
-                                <property name="xalign">0</property>
                                 <property name="label" translatable="yes" context="applylocalizedpage|singleendex">Default</property>
+                                <property name="xalign">0</property>
                               </object>
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="top_attach">0</property>
-                                <property name="width">1</property>
-                                <property name="height">1</property>
                               </packing>
                             </child>
                           </object>
                           <packing>
                             <property name="left_attach">0</property>
                             <property name="top_attach">4</property>
-                            <property name="width">1</property>
-                            <property name="height">1</property>
                           </packing>
                         </child>
                       </object>
@@ -293,8 +357,6 @@
               <packing>
                 <property name="left_attach">0</property>
                 <property name="top_attach">0</property>
-                <property name="width">1</property>
-                <property name="height">1</property>
               </packing>
             </child>
             <child>
@@ -326,24 +388,20 @@
                           <packing>
                             <property name="left_attach">0</property>
                             <property name="top_attach">0</property>
-                            <property name="width">1</property>
-                            <property name="height">1</property>
                           </packing>
                         </child>
                         <child>
                           <object class="GtkLabel" id="label6">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
                             <property name="label" translatable="yes" context="applylocalizedpage|label6">_Start quote:</property>
                             <property name="use_underline">True</property>
                             <property name="mnemonic_widget">startdouble</property>
+                            <property name="xalign">0</property>
                           </object>
                           <packing>
                             <property name="left_attach">0</property>
                             <property name="top_attach">1</property>
-                            <property name="width">1</property>
-                            <property name="height">1</property>
                           </packing>
                         </child>
                         <child>
@@ -366,30 +424,24 @@
                               <packing>
                                 <property name="left_attach">0</property>
                                 <property name="top_attach">0</property>
-                                <property name="width">1</property>
-                                <property name="height">1</property>
                               </packing>
                             </child>
                             <child>
                               <object class="GtkLabel" id="doublestartex">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
-                                <property name="xalign">0</property>
                                 <property name="label" translatable="yes" context="applylocalizedpage|doublestartex">Default</property>
+                                <property name="xalign">0</property>
                               </object>
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="top_attach">0</property>
-                                <property name="width">1</property>
-                                <property name="height">1</property>
                               </packing>
                             </child>
                           </object>
                           <packing>
                             <property name="left_attach">0</property>
                             <property name="top_attach">2</property>
-                            <property name="width">1</property>
-                            <property name="height">1</property>
                           </packing>
                         </child>
                         <child>
@@ -409,24 +461,20 @@
                           <packing>
                             <property name="left_attach">0</property>
                             <property name="top_attach">5</property>
-                            <property name="width">1</property>
-                            <property name="height">1</property>
                           </packing>
                         </child>
                         <child>
                           <object class="GtkLabel" id="label8">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
                             <property name="label" translatable="yes" context="applylocalizedpage|label8">_End quote:</property>
                             <property name="use_underline">True</property>
                             <property name="mnemonic_widget">enddouble</property>
+                            <property name="xalign">0</property>
                           </object>
                           <packing>
                             <property name="left_attach">0</property>
                             <property name="top_attach">3</property>
-                            <property name="width">1</property>
-                            <property name="height">1</property>
                           </packing>
                         </child>
                         <child>
@@ -449,30 +497,24 @@
                               <packing>
                                 <property name="left_attach">0</property>
                                 <property name="top_attach">0</property>
-                                <property name="width">1</property>
-                                <property name="height">1</property>
                               </packing>
                             </child>
                             <child>
                               <object class="GtkLabel" id="doubleendex">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
-                                <property name="xalign">0</property>
                                 <property name="label" translatable="yes" context="applylocalizedpage|doubleendex">Default</property>
+                                <property name="xalign">0</property>
                               </object>
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="top_attach">0</property>
-                                <property name="width">1</property>
-                                <property name="height">1</property>
                               </packing>
                             </child>
                           </object>
                           <packing>
                             <property name="left_attach">0</property>
                             <property name="top_attach">4</property>
-                            <property name="width">1</property>
-                            <property name="height">1</property>
                           </packing>
                         </child>
                       </object>
@@ -493,16 +535,12 @@
               <packing>
                 <property name="left_attach">1</property>
                 <property name="top_attach">0</property>
-                <property name="width">1</property>
-                <property name="height">1</property>
               </packing>
             </child>
           </object>
           <packing>
             <property name="left_attach">0</property>
             <property name="top_attach">1</property>
-            <property name="width">1</property>
-            <property name="height">1</property>
           </packing>
         </child>
       </object>
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index c47745b99dcf..00bd884140e8 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -1877,6 +1877,26 @@ public:
         return OUString();
     }
 
+    virtual void show() override
+    {
+        SvHeaderTabListBox* pHeaderBox = dynamic_cast<SvHeaderTabListBox*>(m_xTreeView.get());
+        if (HeaderBar* pHeaderBar = pHeaderBox ? pHeaderBox->GetHeaderBar() : nullptr)
+        {
+            pHeaderBar->Show();
+        }
+        SalInstanceContainer::show();
+    }
+
+    virtual void hide() override
+    {
+        SvHeaderTabListBox* pHeaderBox = dynamic_cast<SvHeaderTabListBox*>(m_xTreeView.get());
+        if (HeaderBar* pHeaderBar = pHeaderBox ? pHeaderBox->GetHeaderBar() : nullptr)
+        {
+            pHeaderBar->Hide();
+        }
+        SalInstanceContainer::hide();
+    }
+
     virtual void insert(weld::TreeIter* pParent, int pos, const OUString* pStr, const OUString* pId,
                         const OUString* pIconName, VirtualDevice* pImageSurface, const OUString* pExpanderName,
                         bool bChildrenOnDemand) override


More information about the Libreoffice-commits mailing list