[Libreoffice-commits] core.git: include/svtools include/svx include/vcl solenv/sanitizers svtools/source svx/source svx/uiconfig

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Thu Jan 23 16:27:12 UTC 2020


 include/svtools/valueset.hxx           |    3 
 include/svx/bmpmask.hxx                |   67 +-
 include/vcl/customweld.hxx             |    2 
 solenv/sanitizers/ui/svx.suppr         |    1 
 svtools/source/control/valueset.cxx    |   20 
 svx/source/dialog/_bmpmask.cxx         |  557 ++++++++++++------------
 svx/uiconfig/ui/dockingcolorreplace.ui |  739 +++++++++++++++++++--------------
 7 files changed, 757 insertions(+), 632 deletions(-)

New commits:
commit d03c46eba1bd1d3399ee3d4e6af1c9e16c2c1718
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Jan 23 13:13:03 2020 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Jan 23 17:26:35 2020 +0100

    weld SvxBmpMask
    
    Change-Id: Ied627a0c6b1c85bac8fd0cafc21ae1acceaf2bcc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87281
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/include/svtools/valueset.hxx b/include/svtools/valueset.hxx
index 0f40dc3a04da..ad5d408475f9 100644
--- a/include/svtools/valueset.hxx
+++ b/include/svtools/valueset.hxx
@@ -480,7 +480,7 @@ public:
     virtual void    Hide() override;
     virtual OUString RequestHelp(tools::Rectangle& rHelpRect) override;
 
-    void            Select();
+    virtual void    Select();
     virtual void    UserDraw( const UserDrawEvent& rUDEvt );
 
     OUString const & GetText() const { return maText; }
@@ -541,6 +541,7 @@ public:
 
     void            SetItemImage( sal_uInt16 nItemId, const Image& rImage );
     Image           GetItemImage( sal_uInt16 nItemId ) const;
+    void            SetItemColor( sal_uInt16 nItemId, const Color& rColor );
     Color           GetItemColor( sal_uInt16 nItemId ) const;
     void            SetItemData( sal_uInt16 nItemId, void* pData );
     void*           GetItemData( sal_uInt16 nItemId ) const;
diff --git a/include/svx/bmpmask.hxx b/include/svx/bmpmask.hxx
index 92f2fb25b13d..dde83d149812 100644
--- a/include/svx/bmpmask.hxx
+++ b/include/svx/bmpmask.hxx
@@ -34,13 +34,10 @@
 #include <memory>
 
 namespace vcl { class Window; }
+namespace weld { class CustomWeld; }
 
-class CheckBox;
-class MetricField;
-class PushButton;
 class SfxBindings;
 class SfxModule;
-class ToolBox;
 
 /*************************************************************************
 |*
@@ -86,40 +83,46 @@ class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxBmpMaskChildWindow final : public SfxChil
 class MaskData;
 class MaskSet;
 class BmpColorWindow;
-class SvxColorListBox;
+class ColorListBox;
 
 class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxBmpMask : public SfxDockingWindow
 {
     friend class MaskData;
     friend class MaskSet;
 
-    VclPtr<ToolBox>            m_pTbxPipette;
-    VclPtr<BmpColorWindow>     m_pCtlPipette;
-    VclPtr<PushButton>         m_pBtnExec;
-
-    VclPtr<CheckBox>           m_pCbx1;
-    VclPtr<MaskSet>            m_pQSet1;
-    VclPtr<MetricField>        m_pSp1;
-    VclPtr<SvxColorListBox>    m_pLbColor1;
-
-    VclPtr<CheckBox>           m_pCbx2;
-    VclPtr<MaskSet>            m_pQSet2;
-    VclPtr<MetricField>        m_pSp2;
-    VclPtr<SvxColorListBox>    m_pLbColor2;
-
-    VclPtr<CheckBox>           m_pCbx3;
-    VclPtr<MaskSet>            m_pQSet3;
-    VclPtr<MetricField>        m_pSp3;
-    VclPtr<SvxColorListBox>    m_pLbColor3;
-
-    VclPtr<CheckBox>           m_pCbx4;
-    VclPtr<MaskSet>            m_pQSet4;
-    VclPtr<MetricField>        m_pSp4;
-    VclPtr<SvxColorListBox>    m_pLbColor4;
-
-    std::unique_ptr<MaskData>  pData;
-    VclPtr<CheckBox>           m_pCbxTrans;
-    VclPtr<SvxColorListBox>    m_pLbColorTrans;
+    std::unique_ptr<weld::Toolbar> m_xTbxPipette;
+    std::unique_ptr<BmpColorWindow> m_xCtlPipette;
+    std::unique_ptr<weld::CustomWeld> m_xCtlPipetteWin;
+    std::unique_ptr<weld::Button> m_xBtnExec;
+
+    std::unique_ptr<weld::CheckButton> m_xCbx1;
+    std::unique_ptr<MaskSet> m_xQSet1;
+    std::unique_ptr<weld::CustomWeld> m_xQSetWin1;
+    std::unique_ptr<weld::MetricSpinButton> m_xSp1;
+    std::unique_ptr<ColorListBox> m_xLbColor1;
+
+    std::unique_ptr<weld::CheckButton> m_xCbx2;
+    std::unique_ptr<MaskSet> m_xQSet2;
+    std::unique_ptr<weld::CustomWeld> m_xQSetWin2;
+    std::unique_ptr<weld::MetricSpinButton> m_xSp2;
+    std::unique_ptr<ColorListBox> m_xLbColor2;
+
+    std::unique_ptr<weld::CheckButton> m_xCbx3;
+    std::unique_ptr<MaskSet> m_xQSet3;
+    std::unique_ptr<weld::CustomWeld> m_xQSetWin3;
+    std::unique_ptr<weld::MetricSpinButton> m_xSp3;
+    std::unique_ptr<ColorListBox> m_xLbColor3;
+
+    std::unique_ptr<weld::CheckButton> m_xCbx4;
+    std::unique_ptr<MaskSet> m_xQSet4;
+    std::unique_ptr<weld::CustomWeld> m_xQSetWin4;
+    std::unique_ptr<weld::MetricSpinButton> m_xSp4;
+    std::unique_ptr<ColorListBox> m_xLbColor4;
+
+    std::unique_ptr<weld::CheckButton> m_xCbxTrans;
+    std::unique_ptr<ColorListBox> m_xLbColorTrans;
+
+    std::unique_ptr<MaskData> m_xData;
 
     Color               aPipetteColor;
     SvxBmpMaskSelectItem aSelItem;
diff --git a/include/vcl/customweld.hxx b/include/vcl/customweld.hxx
index 148bd6ac6554..74792fb266f1 100644
--- a/include/vcl/customweld.hxx
+++ b/include/vcl/customweld.hxx
@@ -58,6 +58,8 @@ public:
     bool IsVisible() const { return m_pDrawingArea->get_visible(); }
     bool IsReallyVisible() const { return m_pDrawingArea->is_visible(); }
     bool IsEnabled() const { return m_pDrawingArea->get_sensitive(); }
+    void Enable() const { m_pDrawingArea->set_sensitive(true); }
+    void Disable() const { m_pDrawingArea->set_sensitive(false); }
     bool IsActive() const { return m_pDrawingArea->is_active(); }
     int GetTextHeight() const { return m_pDrawingArea->get_text_height(); }
     OUString GetAccessibleName() const { return m_pDrawingArea->get_accessible_name(); }
diff --git a/solenv/sanitizers/ui/svx.suppr b/solenv/sanitizers/ui/svx.suppr
index 4c89692d8ad1..60018f52fc85 100644
--- a/solenv/sanitizers/ui/svx.suppr
+++ b/solenv/sanitizers/ui/svx.suppr
@@ -16,7 +16,6 @@ svx/uiconfig/ui/crashreportdlg.ui://GtkTextView[@id='ed_bugreport'] no-labelled-
 svx/uiconfig/ui/dockingcolorreplace.ui://GtkLabel[@id='label2'] orphan-label
 svx/uiconfig/ui/dockingcolorreplace.ui://GtkLabel[@id='label3'] orphan-label
 svx/uiconfig/ui/dockingcolorreplace.ui://GtkLabel[@id='label4'] orphan-label
-svx/uiconfig/ui/dockingcolorreplace.ui://svxcorelo-SvxColorListBox[@id='color5'] no-labelled-by
 svx/uiconfig/ui/docrecoverybrokendialog.ui://GtkLabel[@id='label1'] orphan-label
 svx/uiconfig/ui/docrecoveryprogressdialog.ui://GtkLabel[@id='label2'] orphan-label
 svx/uiconfig/ui/docrecoveryrecoverdialog.ui://GtkLabel[@id='desc'] orphan-label
diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx
index d9ce31ad08c4..4c5fb740508c 100644
--- a/svtools/source/control/valueset.cxx
+++ b/svtools/source/control/valueset.cxx
@@ -3576,6 +3576,26 @@ void SvtValueSet::SetItemImage( sal_uInt16 nItemId, const Image& rImage )
         mbFormat = true;
 }
 
+void SvtValueSet::SetItemColor( sal_uInt16 nItemId, const Color& rColor )
+{
+    size_t nPos = GetItemPos( nItemId );
+
+    if ( nPos == VALUESET_ITEM_NOTFOUND )
+        return;
+
+    SvtValueSetItem* pItem = mItemList[nPos].get();
+    pItem->meType  = VALUESETITEM_COLOR;
+    pItem->maColor = rColor;
+
+    if ( !mbFormat && IsReallyVisible() && IsUpdateMode() )
+    {
+        const tools::Rectangle aRect = ImplGetItemRect(nPos);
+        Invalidate( aRect );
+    }
+    else
+        mbFormat = true;
+}
+
 Color SvtValueSet::GetItemColor( sal_uInt16 nItemId ) const
 {
     size_t nPos = GetItemPos( nItemId );
diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx
index dcd4fd91e495..42d234a9aa79 100644
--- a/svx/source/dialog/_bmpmask.cxx
+++ b/svx/source/dialog/_bmpmask.cxx
@@ -19,8 +19,6 @@
 
 #include <vcl/event.hxx>
 #include <vcl/metaact.hxx>
-#include <vcl/field.hxx>
-#include <vcl/toolbox.hxx>
 #include <vcl/virdev.hxx>
 #include <svtools/valueset.hxx>
 #include <svl/eitem.hxx>
@@ -54,15 +52,14 @@
 
 SFX_IMPL_DOCKINGWINDOW_WITHID( SvxBmpMaskChildWindow, SID_BMPMASK )
 
-class BmpColorWindow : public Control
+class BmpColorWindow : public weld::CustomWidgetController
 {
     Color       aColor;
 
 
 public:
-    explicit BmpColorWindow(vcl::Window* pParent)
-        : Control(pParent, WB_BORDER)
-        , aColor( COL_WHITE )
+    explicit BmpColorWindow()
+        : aColor( COL_WHITE )
     {
     }
 
@@ -72,62 +69,67 @@ public:
         Invalidate();
     }
 
-    virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& rRect ) override;
+    virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override;
 
-    virtual Size GetOptimalSize() const override
+    virtual void SetDrawingArea(weld::DrawingArea* pArea) override
     {
-        return LogicToPixel(Size(43, 14), MapMode(MapUnit::MapAppFont));
+        Size aSize(pArea->get_ref_device().LogicToPixel(Size(43, 14), MapMode(MapUnit::MapAppFont)));
+        CustomWidgetController::SetDrawingArea(pArea);
+        pArea->set_size_request(aSize.Width(), aSize.Height());
+        SetOutputSizePixel(aSize);
     }
 };
 
-class MaskSet : public ValueSet
+class MaskSet : public SvtValueSet
 {
     VclPtr<SvxBmpMask> pSvxBmpMask;
 
 public:
-    MaskSet(SvxBmpMask* pMask, vcl::Window* pParent);
-    virtual ~MaskSet() override { disposeOnce(); }
-    virtual void dispose() override { pSvxBmpMask.clear(); ValueSet::dispose(); }
+    MaskSet(SvxBmpMask* pMask);
     virtual void Select() override;
-    virtual void KeyInput( const KeyEvent& rKEvt ) override;
+    virtual bool KeyInput( const KeyEvent& rKEvt ) override;
     virtual void GetFocus() override;
-    virtual Size GetOptimalSize() const override
+    virtual void SetDrawingArea(weld::DrawingArea* pArea) override
     {
-        return LogicToPixel(Size(24, 12), MapMode(MapUnit::MapAppFont));
+        Size aSize(pArea->get_ref_device().LogicToPixel(Size(24, 12), MapMode(MapUnit::MapAppFont)));
+        SvtValueSet::SetDrawingArea(pArea);
+        pArea->set_size_request(aSize.Width(), aSize.Height());
+        SetOutputSizePixel(aSize);
+        SetHelpId(HID_BMPMASK_CTL_QCOL_1);
     }
-
     void onEditColor();
 };
 
-MaskSet::MaskSet(SvxBmpMask* pMask, vcl::Window* pParent)
-    : ValueSet(pParent, WB_TABSTOP)
+MaskSet::MaskSet(SvxBmpMask* pMask)
+    : SvtValueSet(nullptr)
     , pSvxBmpMask(pMask)
 {
-    SetHelpId(HID_BMPMASK_CTL_QCOL_1);
 }
 
 void MaskSet::Select()
 {
-    ValueSet::Select();
+    SvtValueSet::Select();
 
     pSvxBmpMask->onSelect( this );
 }
 
 void MaskSet::GetFocus()
 {
-    ValueSet::GetFocus();
+    SvtValueSet::GetFocus();
     SelectItem( 1 );
     pSvxBmpMask->onSelect( this );
 }
 
-void MaskSet::KeyInput( const KeyEvent& rKEvt )
+bool MaskSet::KeyInput( const KeyEvent& rKEvt )
 {
+    bool bRet = false;
+
     vcl::KeyCode aCode = rKEvt.GetKeyCode();
 
     // if the key has a modifier we don't care
     if( aCode.GetModifier() )
     {
-        ValueSet::KeyInput( rKEvt );
+        bRet = SvtValueSet::KeyInput( rKEvt );
     }
     else
     {
@@ -136,12 +138,13 @@ void MaskSet::KeyInput( const KeyEvent& rKEvt )
         {
             case KEY_SPACE:
                 onEditColor();
+                bRet = true;
                 break;
             default:
-                ValueSet::KeyInput( rKEvt );
+                bRet = SvtValueSet::KeyInput( rKEvt );
         }
-
     }
+    return bRet;
 }
 
 void MaskSet::onEditColor()
@@ -150,13 +153,13 @@ void MaskSet::onEditColor()
 
     aColorDlg.SetColor(GetItemColor(1));
 
-    if (aColorDlg.Execute(GetFrameWeld()))
+    if (aColorDlg.Execute(pSvxBmpMask->GetFrameWeld()))
         SetItemColor(1, aColorDlg.GetColor());
 }
 
 class MaskData
 {
-    VclPtr<SvxBmpMask>     pMask;
+    VclPtr<SvxBmpMask> pMask;
     bool            bIsReady;
     bool            bExecState;
     SfxBindings&    rBindings;
@@ -168,11 +171,11 @@ public:
     void        SetExecState( bool bState ) { bExecState = bState; }
     bool        IsExecReady() const { return bExecState; }
 
-                DECL_LINK( PipetteHdl, ToolBox*, void );
-                DECL_LINK( CbxHdl, Button*, void);
-                DECL_LINK( CbxTransHdl, Button*, void );
-                DECL_LINK( FocusLbHdl, Control&, void );
-                DECL_LINK(ExecHdl, Button*, void);
+                DECL_LINK( PipetteHdl, const OString&, void );
+                DECL_LINK( CbxHdl, weld::ToggleButton&, void);
+                DECL_LINK( CbxTransHdl, weld::ToggleButton&, void );
+                DECL_LINK( FocusLbHdl, weld::Widget&, void );
+                DECL_LINK(ExecHdl, weld::Button&, void);
 };
 
 
@@ -186,122 +189,115 @@ MaskData::MaskData( SvxBmpMask* pBmpMask, SfxBindings& rBind ) :
 {
 }
 
-IMPL_LINK( MaskData, PipetteHdl, ToolBox*, pTbx, void )
+IMPL_LINK( MaskData, PipetteHdl, const OString&, rId, void )
 {
     SfxBoolItem aBItem( SID_BMPMASK_PIPETTE,
-                        pTbx->IsItemChecked( pTbx->GetItemId(0) ) );
+                        pMask->m_xTbxPipette->get_item_active(rId) );
 
     rBindings.GetDispatcher()->ExecuteList(SID_BMPMASK_PIPETTE, OWN_CALLMODE,
             { &aBItem });
 }
 
-IMPL_LINK( MaskData, CbxHdl, Button*, pButton, void )
+IMPL_LINK( MaskData, CbxHdl, weld::ToggleButton&, rCbx, void )
 {
-    CheckBox* pCbx = static_cast<CheckBox*>(pButton);
-    bIsReady =  pMask->m_pCbx1->IsChecked() || pMask->m_pCbx2->IsChecked() ||
-                pMask->m_pCbx3->IsChecked() || pMask->m_pCbx4->IsChecked();
+    bIsReady =  pMask->m_xCbx1->get_active() || pMask->m_xCbx2->get_active() ||
+                pMask->m_xCbx3->get_active() || pMask->m_xCbx4->get_active();
 
     if ( bIsReady && IsExecReady() )
-        pMask->m_pBtnExec->Enable();
+        pMask->m_xBtnExec->set_sensitive(true);
     else
-        pMask->m_pBtnExec->Disable();
+        pMask->m_xBtnExec->set_sensitive(false);
 
     // When a checkbox is checked, the pipette is enabled
-    if ( pCbx->IsChecked() )
+    if ( rCbx.get_active() )
     {
         MaskSet* pSet = nullptr;
 
-        if (pCbx == pMask->m_pCbx1)
-            pSet = pMask->m_pQSet1;
-        else if (pCbx == pMask->m_pCbx2)
-            pSet = pMask->m_pQSet2;
-        else if (pCbx == pMask->m_pCbx3)
-            pSet = pMask->m_pQSet3;
-        else // if ( pCbx == pMask->m_pCbx4 )
-            pSet = pMask->m_pQSet4;
+        if (&rCbx == pMask->m_xCbx1.get())
+            pSet = pMask->m_xQSet1.get();
+        else if (&rCbx == pMask->m_xCbx2.get())
+            pSet = pMask->m_xQSet2.get();
+        else if (&rCbx == pMask->m_xCbx3.get())
+            pSet = pMask->m_xQSet3.get();
+        else // if ( &rCbx == pMask->m_xCbx4 )
+            pSet = pMask->m_xQSet4.get();
 
         pSet->SelectItem( 1 );
         pSet->Select();
 
-        pMask->m_pTbxPipette->CheckItem( pMask->m_pTbxPipette->GetItemId(0) );
-        PipetteHdl(pMask->m_pTbxPipette);
+        pMask->m_xTbxPipette->set_item_active("pipette", true);
+        PipetteHdl("pipette");
     }
 }
 
-
-IMPL_LINK( MaskData, CbxTransHdl, Button*, pButton, void )
+IMPL_LINK( MaskData, CbxTransHdl, weld::ToggleButton&, rCbx, void )
 {
-    CheckBox* pCbx = static_cast<CheckBox*>(pButton);
-    bIsReady = pCbx->IsChecked();
+    bIsReady = rCbx.get_active();
     if ( bIsReady )
     {
-        pMask->m_pQSet1->Disable();
-        pMask->m_pQSet2->Disable();
-        pMask->m_pQSet3->Disable();
-        pMask->m_pQSet4->Disable();
-        pMask->m_pCtlPipette->Disable();
-        pMask->m_pCbx1->Disable();
-        pMask->m_pSp1->Disable();
-        pMask->m_pCbx2->Disable();
-        pMask->m_pSp2->Disable();
-        pMask->m_pCbx3->Disable();
-        pMask->m_pSp3->Disable();
-        pMask->m_pCbx4->Disable();
-        pMask->m_pSp4->Disable();
-        pMask->m_pTbxPipette->Disable();
-
-        pMask->m_pLbColor1->Disable();
-        pMask->m_pLbColor2->Disable();
-        pMask->m_pLbColor3->Disable();
-        pMask->m_pLbColor4->Disable();
-        pMask->m_pLbColorTrans->Enable();
+        pMask->m_xQSet1->Disable();
+        pMask->m_xQSet2->Disable();
+        pMask->m_xQSet3->Disable();
+        pMask->m_xQSet4->Disable();
+        pMask->m_xCtlPipette->Disable();
+        pMask->m_xCbx1->set_sensitive(false);
+        pMask->m_xSp1->set_sensitive(false);
+        pMask->m_xCbx2->set_sensitive(false);
+        pMask->m_xSp2->set_sensitive(false);
+        pMask->m_xCbx3->set_sensitive(false);
+        pMask->m_xSp3->set_sensitive(false);
+        pMask->m_xCbx4->set_sensitive(false);
+        pMask->m_xSp4->set_sensitive(false);
+        pMask->m_xTbxPipette->set_sensitive(false);
+
+        pMask->m_xLbColor1->set_sensitive(false);
+        pMask->m_xLbColor2->set_sensitive(false);
+        pMask->m_xLbColor3->set_sensitive(false);
+        pMask->m_xLbColor4->set_sensitive(false);
+        pMask->m_xLbColorTrans->set_sensitive(true);
     }
     else
     {
-        pMask->m_pQSet1->Enable();
-        pMask->m_pQSet2->Enable();
-        pMask->m_pQSet3->Enable();
-        pMask->m_pQSet4->Enable();
-        pMask->m_pCtlPipette->Enable();
-        pMask->m_pCbx1->Enable();
-        pMask->m_pSp1->Enable();
-        pMask->m_pCbx2->Enable();
-        pMask->m_pSp2->Enable();
-        pMask->m_pCbx3->Enable();
-        pMask->m_pSp3->Enable();
-        pMask->m_pCbx4->Enable();
-        pMask->m_pSp4->Enable();
-        pMask->m_pTbxPipette->Enable();
-
-        pMask->m_pLbColor1->Enable();
-        pMask->m_pLbColor2->Enable();
-        pMask->m_pLbColor3->Enable();
-        pMask->m_pLbColor4->Enable();
-        pMask->m_pLbColorTrans->Disable();
-
-        bIsReady = pMask->m_pCbx1->IsChecked() || pMask->m_pCbx2->IsChecked() ||
-                   pMask->m_pCbx3->IsChecked() || pMask->m_pCbx4->IsChecked();
+        pMask->m_xQSet1->Enable();
+        pMask->m_xQSet2->Enable();
+        pMask->m_xQSet3->Enable();
+        pMask->m_xQSet4->Enable();
+        pMask->m_xCtlPipette->Enable();
+        pMask->m_xCbx1->set_sensitive(true);
+        pMask->m_xSp1->set_sensitive(true);
+        pMask->m_xCbx2->set_sensitive(true);
+        pMask->m_xSp2->set_sensitive(true);
+        pMask->m_xCbx3->set_sensitive(true);
+        pMask->m_xSp3->set_sensitive(true);
+        pMask->m_xCbx4->set_sensitive(true);
+        pMask->m_xSp4->set_sensitive(true);
+        pMask->m_xTbxPipette->set_sensitive(true);
+
+        pMask->m_xLbColor1->set_sensitive(true);
+        pMask->m_xLbColor2->set_sensitive(true);
+        pMask->m_xLbColor3->set_sensitive(true);
+        pMask->m_xLbColor4->set_sensitive(true);
+        pMask->m_xLbColorTrans->set_sensitive(false);
+
+        bIsReady = pMask->m_xCbx1->get_active() || pMask->m_xCbx2->get_active() ||
+                   pMask->m_xCbx3->get_active() || pMask->m_xCbx4->get_active();
     }
 
     if ( bIsReady && IsExecReady() )
-        pMask->m_pBtnExec->Enable();
+        pMask->m_xBtnExec->set_sensitive(true);
     else
-        pMask->m_pBtnExec->Disable();
+        pMask->m_xBtnExec->set_sensitive(false);
 }
 
-
-IMPL_LINK( MaskData, FocusLbHdl, Control&, rControl, void )
+IMPL_LINK( MaskData, FocusLbHdl, weld::Widget&, rLb, void )
 {
-    SvxColorListBox* pLb = static_cast<SvxColorListBox*>(&rControl);
-    // MT: bFireFox as API parameter is ugly, find better solution????
-    pMask->m_pQSet1->SelectItem( pLb == pMask->m_pLbColor1 ? 1 : 0 /* , false */ );
-    pMask->m_pQSet2->SelectItem( pLb == pMask->m_pLbColor2 ? 1 : 0 /* , false */ );
-    pMask->m_pQSet3->SelectItem( pLb == pMask->m_pLbColor3 ? 1 : 0 /* , false */ );
-    pMask->m_pQSet4->SelectItem( pLb == pMask->m_pLbColor4 ? 1 : 0 /* , false */ );
+    pMask->m_xQSet1->SelectItem( &rLb == &pMask->m_xLbColor1->get_widget() ? 1 : 0 /* , false */ );
+    pMask->m_xQSet2->SelectItem( &rLb == &pMask->m_xLbColor2->get_widget() ? 1 : 0 /* , false */ );
+    pMask->m_xQSet3->SelectItem( &rLb == &pMask->m_xLbColor3->get_widget() ? 1 : 0 /* , false */ );
+    pMask->m_xQSet4->SelectItem( &rLb == &pMask->m_xLbColor4->get_widget() ? 1 : 0 /* , false */ );
 }
 
-
-IMPL_LINK_NOARG(MaskData, ExecHdl, Button*, void)
+IMPL_LINK_NOARG(MaskData, ExecHdl, weld::Button&, void)
 {
     SfxBoolItem aBItem( SID_BMPMASK_EXEC, true );
     rBindings.GetDispatcher()->ExecuteList(SID_BMPMASK_EXEC, OWN_CALLMODE,
@@ -313,7 +309,7 @@ void BmpColorWindow::Paint( vcl::RenderContext& rRenderContext, const tools::Rec
     rRenderContext.Push(PushFlags::LINECOLOR | PushFlags::FILLCOLOR);
     rRenderContext.SetLineColor(aColor);
     rRenderContext.SetFillColor(aColor);
-    rRenderContext.DrawRect(tools::Rectangle(Point(), GetSizePixel()));
+    rRenderContext.DrawRect(tools::Rectangle(Point(), GetOutputSizePixel()));
     rRenderContext.Pop();
 }
 
@@ -350,114 +346,100 @@ SvxBmpMaskChildWindow::SvxBmpMaskChildWindow(vcl::Window* pParent_, sal_uInt16 n
 
 SvxBmpMask::SvxBmpMask(SfxBindings *pBindinx, SfxChildWindow *pCW, vcl::Window* pParent)
     : SfxDockingWindow(pBindinx, pCW, pParent, "DockingColorReplace",
-                       "svx/ui/dockingcolorreplace.ui" )
-    , pData(new MaskData(this, *pBindinx))
+                       "svx/ui/dockingcolorreplace.ui", true )
+    , m_xTbxPipette(m_xBuilder->weld_toolbar("toolbar"))
+    , m_xCtlPipette(new BmpColorWindow)
+    , m_xCtlPipetteWin(new weld::CustomWeld(*m_xBuilder, "toolcolor", *m_xCtlPipette))
+    , m_xBtnExec(m_xBuilder->weld_button("replace"))
+    , m_xCbx1(m_xBuilder->weld_check_button("cbx1"))
+    , m_xQSet1(new MaskSet(this))
+    , m_xQSetWin1(new weld::CustomWeld(*m_xBuilder, "qset1", *m_xQSet1))
+    , m_xSp1(m_xBuilder->weld_metric_spin_button("tol1", FieldUnit::PERCENT))
+    , m_xLbColor1(new ColorListBox(m_xBuilder->weld_menu_button("color1"), GetFrameWeld()))
+    , m_xCbx2(m_xBuilder->weld_check_button("cbx2"))
+    , m_xQSet2(new MaskSet(this))
+    , m_xQSetWin2(new weld::CustomWeld(*m_xBuilder, "qset2", *m_xQSet2))
+     , m_xSp2(m_xBuilder->weld_metric_spin_button("tol2", FieldUnit::PERCENT))
+    , m_xLbColor2(new ColorListBox(m_xBuilder->weld_menu_button("color2"), GetFrameWeld()))
+    , m_xCbx3(m_xBuilder->weld_check_button("cbx3"))
+    , m_xQSet3(new MaskSet(this))
+    , m_xQSetWin3(new weld::CustomWeld(*m_xBuilder, "qset3", *m_xQSet3))
+    , m_xSp3(m_xBuilder->weld_metric_spin_button("tol3", FieldUnit::PERCENT))
+    , m_xLbColor3(new ColorListBox(m_xBuilder->weld_menu_button("color3"), GetFrameWeld()))
+    , m_xCbx4(m_xBuilder->weld_check_button("cbx4"))
+    , m_xQSet4(new MaskSet(this))
+    , m_xQSetWin4(new weld::CustomWeld(*m_xBuilder, "qset4", *m_xQSet4))
+    , m_xSp4(m_xBuilder->weld_metric_spin_button("tol4", FieldUnit::PERCENT))
+    , m_xLbColor4(new ColorListBox(m_xBuilder->weld_menu_button("color4"), GetFrameWeld()))
+    , m_xCbxTrans(m_xBuilder->weld_check_button("cbx5"))
+    , m_xLbColorTrans(new ColorListBox(m_xBuilder->weld_menu_button("color5"), GetFrameWeld()))
+    , m_xData(new MaskData(this, *pBindinx))
     , aPipetteColor(COL_WHITE)
     , aSelItem(*this, *pBindinx)
 {
-    get(m_pTbxPipette, "toolbar");
-    m_pTbxPipette->SetItemBits(m_pTbxPipette->GetItemId(0),
-        ToolBoxItemBits::AUTOCHECK);
-    get(m_pBtnExec, "replace");
-    m_pCtlPipette = VclPtr<BmpColorWindow>::Create(get<Window>("toolgrid"));
-    m_pCtlPipette->Show();
-    m_pCtlPipette->set_grid_left_attach(1);
-    m_pCtlPipette->set_grid_top_attach(0);
-    m_pCtlPipette->set_hexpand(true);
-    get(m_pCbx1, "cbx1");
-    Window *pGrid = get<Window>("colorgrid");
-    m_pQSet1 = VclPtr<MaskSet>::Create(this, pGrid);
-    m_pQSet1->set_grid_left_attach(1);
-    m_pQSet1->set_grid_top_attach(1);
-    m_pQSet1->Show();
-    get(m_pSp1, "tol1");
-    get(m_pLbColor1, "color1");
-    m_pLbColor1->SetSlotId(SID_BMPMASK_COLOR);
-    get(m_pCbx2, "cbx2");
-    m_pQSet2 = VclPtr<MaskSet>::Create(this, pGrid);
-    m_pQSet2->set_grid_left_attach(1);
-    m_pQSet2->set_grid_top_attach(2);
-    m_pQSet2->Show();
-    get(m_pSp2, "tol2");
-    get(m_pLbColor2, "color2");
-    m_pLbColor2->SetSlotId(SID_BMPMASK_COLOR);
-    get(m_pCbx3, "cbx3");
-    m_pQSet3 = VclPtr<MaskSet>::Create(this, pGrid);
-    m_pQSet3->set_grid_left_attach(1);
-    m_pQSet3->set_grid_top_attach(3);
-    m_pQSet3->Show();
-    get(m_pSp3, "tol3");
-    get(m_pLbColor3, "color3");
-    m_pLbColor3->SetSlotId(SID_BMPMASK_COLOR);
-    get(m_pCbx4, "cbx4");
-    m_pQSet4   = VclPtr<MaskSet>::Create(this, pGrid);
-    m_pQSet4->set_grid_left_attach(1);
-    m_pQSet4->set_grid_top_attach(4);
-    m_pQSet4->Show();
-    get(m_pSp4, "tol4");
-    get(m_pLbColor4, "color4");
-    m_pLbColor4->SetSlotId(SID_BMPMASK_COLOR);
-    get(m_pCbxTrans, "cbx5");
-    get(m_pLbColorTrans, "color5");
-
-    m_pLbColorTrans->SelectEntry(COL_BLACK);
-    m_pLbColor1->SelectEntry(COL_TRANSPARENT);
-    m_pLbColor2->SelectEntry(COL_TRANSPARENT);
-    m_pLbColor3->SelectEntry(COL_TRANSPARENT);
-    m_pLbColor4->SelectEntry(COL_TRANSPARENT);
-
-    m_pTbxPipette->SetSelectHdl( LINK( pData.get(), MaskData, PipetteHdl ) );
-    m_pBtnExec->SetClickHdl( LINK( pData.get(), MaskData, ExecHdl ) );
-
-    m_pCbx1->SetClickHdl( LINK( pData.get(), MaskData, CbxHdl ) );
-    m_pCbx2->SetClickHdl( LINK( pData.get(), MaskData, CbxHdl ) );
-    m_pCbx3->SetClickHdl( LINK( pData.get(), MaskData, CbxHdl ) );
-    m_pCbx4->SetClickHdl( LINK( pData.get(), MaskData, CbxHdl ) );
-    m_pCbxTrans->SetClickHdl( LINK( pData.get(), MaskData, CbxTransHdl ) );
+    m_xLbColor1->SetSlotId(SID_BMPMASK_COLOR);
+    m_xLbColor2->SetSlotId(SID_BMPMASK_COLOR);
+    m_xLbColor3->SetSlotId(SID_BMPMASK_COLOR);
+    m_xLbColor4->SetSlotId(SID_BMPMASK_COLOR);
+
+    m_xLbColorTrans->SelectEntry(COL_BLACK);
+    m_xLbColor1->SelectEntry(COL_TRANSPARENT);
+    m_xLbColor2->SelectEntry(COL_TRANSPARENT);
+    m_xLbColor3->SelectEntry(COL_TRANSPARENT);
+    m_xLbColor4->SelectEntry(COL_TRANSPARENT);
+
+    m_xTbxPipette->connect_clicked( LINK( m_xData.get(), MaskData, PipetteHdl ) );
+    m_xBtnExec->connect_clicked( LINK( m_xData.get(), MaskData, ExecHdl ) );
+
+    m_xCbx1->connect_toggled( LINK( m_xData.get(), MaskData, CbxHdl ) );
+    m_xCbx2->connect_toggled( LINK( m_xData.get(), MaskData, CbxHdl ) );
+    m_xCbx3->connect_toggled( LINK( m_xData.get(), MaskData, CbxHdl ) );
+    m_xCbx4->connect_toggled( LINK( m_xData.get(), MaskData, CbxHdl ) );
+    m_xCbxTrans->connect_toggled( LINK( m_xData.get(), MaskData, CbxTransHdl ) );
 
     SetAccessibleNames ();
 
-    m_pLbColor1->SetGetFocusHdl( LINK( pData.get(), MaskData, FocusLbHdl ) );
-    m_pLbColor2->SetGetFocusHdl( LINK( pData.get(), MaskData, FocusLbHdl ) );
-    m_pLbColor3->SetGetFocusHdl( LINK( pData.get(), MaskData, FocusLbHdl ) );
-    m_pLbColor4->SetGetFocusHdl( LINK( pData.get(), MaskData, FocusLbHdl ) );
-    m_pLbColorTrans->Disable();
+    m_xLbColor1->connect_focus_in( LINK( m_xData.get(), MaskData, FocusLbHdl ) );
+    m_xLbColor2->connect_focus_in( LINK( m_xData.get(), MaskData, FocusLbHdl ) );
+    m_xLbColor3->connect_focus_in( LINK( m_xData.get(), MaskData, FocusLbHdl ) );
+    m_xLbColor4->connect_focus_in( LINK( m_xData.get(), MaskData, FocusLbHdl ) );
+    m_xLbColorTrans->set_sensitive(false);
 
     OUString sColorPalette (SvxResId( RID_SVXDLG_BMPMASK_STR_PALETTE));
     OUString sColorPaletteN;
 
-    m_pQSet1->SetStyle( m_pQSet1->GetStyle() | WB_DOUBLEBORDER | WB_ITEMBORDER );
-    m_pQSet1->SetColCount();
-    m_pQSet1->SetLineCount( 1 );
+    m_xQSet1->SetStyle( m_xQSet1->GetStyle() | WB_DOUBLEBORDER | WB_ITEMBORDER );
+    m_xQSet1->SetColCount();
+    m_xQSet1->SetLineCount( 1 );
     sColorPaletteN = sColorPalette + " 1";
-    m_pQSet1->InsertItem( 1, aPipetteColor, sColorPaletteN);
-    m_pQSet1->SelectItem( 1 );
+    m_xQSet1->InsertItem( 1, aPipetteColor, sColorPaletteN);
+    m_xQSet1->SelectItem( 1 );
 
-    m_pQSet2->SetStyle( m_pQSet2->GetStyle() | WB_DOUBLEBORDER | WB_ITEMBORDER );
-    m_pQSet2->SetColCount();
-    m_pQSet2->SetLineCount( 1 );
+    m_xQSet2->SetStyle( m_xQSet2->GetStyle() | WB_DOUBLEBORDER | WB_ITEMBORDER );
+    m_xQSet2->SetColCount();
+    m_xQSet2->SetLineCount( 1 );
     sColorPaletteN = sColorPalette + " 2";
-    m_pQSet2->InsertItem( 1, aPipetteColor, sColorPaletteN);
-    m_pQSet2->SelectItem( 0 );
+    m_xQSet2->InsertItem( 1, aPipetteColor, sColorPaletteN);
+    m_xQSet2->SelectItem( 0 );
 
-    m_pQSet3->SetStyle( m_pQSet3->GetStyle() | WB_DOUBLEBORDER | WB_ITEMBORDER );
-    m_pQSet3->SetColCount();
-    m_pQSet3->SetLineCount( 1 );
+    m_xQSet3->SetStyle( m_xQSet3->GetStyle() | WB_DOUBLEBORDER | WB_ITEMBORDER );
+    m_xQSet3->SetColCount();
+    m_xQSet3->SetLineCount( 1 );
     sColorPaletteN = sColorPalette + " 3";
-    m_pQSet3->InsertItem( 1, aPipetteColor, sColorPaletteN);
-    m_pQSet3->SelectItem( 0 );
+    m_xQSet3->InsertItem( 1, aPipetteColor, sColorPaletteN);
+    m_xQSet3->SelectItem( 0 );
 
-    m_pQSet4->SetStyle( m_pQSet4->GetStyle() | WB_DOUBLEBORDER | WB_ITEMBORDER );
-    m_pQSet4->SetColCount();
-    m_pQSet4->SetLineCount( 1 );
+    m_xQSet4->SetStyle( m_xQSet4->GetStyle() | WB_DOUBLEBORDER | WB_ITEMBORDER );
+    m_xQSet4->SetColCount();
+    m_xQSet4->SetLineCount( 1 );
     sColorPaletteN = sColorPalette + " 4";
-    m_pQSet4->InsertItem( 1, aPipetteColor, sColorPaletteN);
-    m_pQSet4->SelectItem( 0 );
+    m_xQSet4->InsertItem( 1, aPipetteColor, sColorPaletteN);
+    m_xQSet4->SelectItem( 0 );
 
-    m_pQSet1->Show();
-    m_pQSet2->Show();
-    m_pQSet3->Show();
-    m_pQSet4->Show();
+    m_xQSet1->Show();
+    m_xQSet2->Show();
+    m_xQSet3->Show();
+    m_xQSet4->Show();
 }
 
 SvxBmpMask::~SvxBmpMask()
@@ -467,28 +449,33 @@ SvxBmpMask::~SvxBmpMask()
 
 void SvxBmpMask::dispose()
 {
-    m_pQSet1.disposeAndClear();
-    m_pQSet2.disposeAndClear();
-    m_pQSet3.disposeAndClear();
-    m_pQSet4.disposeAndClear();
-    m_pCtlPipette.disposeAndClear();
-    pData.reset();
-    m_pTbxPipette.clear();
-    m_pBtnExec.clear();
-    m_pCbx1.clear();
-    m_pSp1.clear();
-    m_pLbColor1.clear();
-    m_pCbx2.clear();
-    m_pSp2.clear();
-    m_pLbColor2.clear();
-    m_pCbx3.clear();
-    m_pSp3.clear();
-    m_pLbColor3.clear();
-    m_pCbx4.clear();
-    m_pSp4.clear();
-    m_pLbColor4.clear();
-    m_pCbxTrans.clear();
-    m_pLbColorTrans.clear();
+    m_xQSetWin1.reset();
+    m_xQSet1.reset();
+    m_xQSetWin2.reset();
+    m_xQSet2.reset();
+    m_xQSetWin3.reset();
+    m_xQSet3.reset();
+    m_xQSetWin4.reset();
+    m_xQSet4.reset();
+    m_xCtlPipetteWin.reset();
+    m_xCtlPipette.reset();
+    m_xData.reset();
+    m_xTbxPipette.reset();
+    m_xBtnExec.reset();
+    m_xCbx1.reset();
+    m_xSp1.reset();
+    m_xLbColor1.reset();
+    m_xCbx2.reset();
+    m_xSp2.reset();
+    m_xLbColor2.reset();
+    m_xCbx3.reset();
+    m_xSp3.reset();
+    m_xLbColor3.reset();
+    m_xCbx4.reset();
+    m_xSp4.reset();
+    m_xLbColor4.reset();
+    m_xCbxTrans.reset();
+    m_xLbColorTrans.reset();
     aSelItem.dispose();
     SfxDockingWindow::dispose();
 }
@@ -497,17 +484,17 @@ void SvxBmpMask::dispose()
 void SvxBmpMask::onSelect( MaskSet* pSet )
 {
     // now deselect all other value sets
-    if( pSet != m_pQSet1 )
-        m_pQSet1->SelectItem( 0 );
+    if( pSet != m_xQSet1.get() )
+        m_xQSet1->SelectItem( 0 );
 
-    if( pSet != m_pQSet2 )
-        m_pQSet2->SelectItem( 0 );
+    if( pSet != m_xQSet2.get() )
+        m_xQSet2->SelectItem( 0 );
 
-    if( pSet != m_pQSet3 )
-        m_pQSet3->SelectItem( 0 );
+    if( pSet != m_xQSet3.get() )
+        m_xQSet3->SelectItem( 0 );
 
-    if( pSet != m_pQSet4 )
-        m_pQSet4->SelectItem( 0 );
+    if( pSet != m_xQSet4.get() )
+        m_xQSet4->SelectItem( 0 );
 }
 
 bool SvxBmpMask::Close()
@@ -522,52 +509,52 @@ bool SvxBmpMask::Close()
 void SvxBmpMask::SetColor( const Color& rColor )
 {
     aPipetteColor = rColor;
-    m_pCtlPipette->SetColor( aPipetteColor );
+    m_xCtlPipette->SetColor( aPipetteColor );
 }
 
 void SvxBmpMask::PipetteClicked()
 {
-    if( m_pQSet1->GetSelectedItemId() == 1 )
+    if( m_xQSet1->GetSelectedItemId() == 1 )
     {
-        m_pCbx1->Check();
-        pData->CbxHdl(m_pCbx1);
-        m_pQSet1->SetItemColor( 1, aPipetteColor );
-        m_pQSet1->SetFormat();
+        m_xCbx1->set_active(true);
+        m_xData->CbxHdl(*m_xCbx1);
+        m_xQSet1->SetItemColor( 1, aPipetteColor );
+        m_xQSet1->SetFormat();
     }
-    else if( m_pQSet2->GetSelectedItemId() == 1 )
+    else if( m_xQSet2->GetSelectedItemId() == 1 )
     {
-        m_pCbx2->Check();
-        pData->CbxHdl(m_pCbx2);
-        m_pQSet2->SetItemColor( 1, aPipetteColor );
-        m_pQSet2->SetFormat();
+        m_xCbx2->set_active(true);
+        m_xData->CbxHdl(*m_xCbx2);
+        m_xQSet2->SetItemColor( 1, aPipetteColor );
+        m_xQSet2->SetFormat();
     }
-    else if( m_pQSet3->GetSelectedItemId() == 1 )
+    else if( m_xQSet3->GetSelectedItemId() == 1 )
     {
-        m_pCbx3->Check();
-        pData->CbxHdl(m_pCbx3);
-        m_pQSet3->SetItemColor( 1, aPipetteColor );
-        m_pQSet3->SetFormat();
+        m_xCbx3->set_active(true);
+        m_xData->CbxHdl(*m_xCbx3);
+        m_xQSet3->SetItemColor( 1, aPipetteColor );
+        m_xQSet3->SetFormat();
     }
-    else if( m_pQSet4->GetSelectedItemId() == 1 )
+    else if( m_xQSet4->GetSelectedItemId() == 1 )
     {
-        m_pCbx4->Check();
-        pData->CbxHdl(m_pCbx4);
-        m_pQSet4->SetItemColor( 1, aPipetteColor );
-        m_pQSet4->SetFormat();
+        m_xCbx4->set_active(true);
+        m_xData->CbxHdl(*m_xCbx4);
+        m_xQSet4->SetItemColor( 1, aPipetteColor );
+        m_xQSet4->SetFormat();
     }
 
-    m_pTbxPipette->CheckItem( m_pTbxPipette->GetItemId(0), false );
-    pData->PipetteHdl(m_pTbxPipette);
+    m_xTbxPipette->set_item_active("pipette", false);
+    m_xData->PipetteHdl("pipette");
 }
 
 void SvxBmpMask::SetExecState( bool bEnable )
 {
-    pData->SetExecState( bEnable );
+    m_xData->SetExecState( bEnable );
 
-    if ( pData->IsExecReady() && pData->IsCbxReady() )
-        m_pBtnExec->Enable();
+    if ( m_xData->IsExecReady() && m_xData->IsCbxReady() )
+        m_xBtnExec->set_sensitive(true);
     else
-        m_pBtnExec->Disable();
+        m_xBtnExec->set_sensitive(false);
 }
 
 
@@ -575,32 +562,32 @@ sal_uInt16 SvxBmpMask::InitColorArrays( Color* pSrcCols, Color* pDstCols, sal_uI
 {
     sal_uInt16  nCount = 0;
 
-    if ( m_pCbx1->IsChecked() )
+    if ( m_xCbx1->get_active() )
     {
-        pSrcCols[nCount] = m_pQSet1->GetItemColor( 1 );
-        pDstCols[nCount] = m_pLbColor1->GetSelectEntryColor();
-        pTols[nCount++] = static_cast<sal_uInt8>(m_pSp1->GetValue());
+        pSrcCols[nCount] = m_xQSet1->GetItemColor( 1 );
+        pDstCols[nCount] = m_xLbColor1->GetSelectEntryColor();
+        pTols[nCount++] = static_cast<sal_uInt8>(m_xSp1->get_value(FieldUnit::PERCENT));
     }
 
-    if ( m_pCbx2->IsChecked() )
+    if ( m_xCbx2->get_active() )
     {
-        pSrcCols[nCount] = m_pQSet2->GetItemColor( 1 );
-        pDstCols[nCount] = m_pLbColor2->GetSelectEntryColor();
-        pTols[nCount++] = static_cast<sal_uInt8>(m_pSp2->GetValue());
+        pSrcCols[nCount] = m_xQSet2->GetItemColor( 1 );
+        pDstCols[nCount] = m_xLbColor2->GetSelectEntryColor();
+        pTols[nCount++] = static_cast<sal_uInt8>(m_xSp2->get_value(FieldUnit::PERCENT));
     }
 
-    if ( m_pCbx3->IsChecked() )
+    if ( m_xCbx3->get_active() )
     {
-        pSrcCols[nCount] = m_pQSet3->GetItemColor( 1 );
-        pDstCols[nCount] = m_pLbColor3->GetSelectEntryColor();
-        pTols[nCount++] = static_cast<sal_uInt8>(m_pSp3->GetValue());
+        pSrcCols[nCount] = m_xQSet3->GetItemColor( 1 );
+        pDstCols[nCount] = m_xLbColor3->GetSelectEntryColor();
+        pTols[nCount++] = static_cast<sal_uInt8>(m_xSp3->get_value(FieldUnit::PERCENT));
     }
 
-    if ( m_pCbx4->IsChecked() )
+    if ( m_xCbx4->get_active() )
     {
-        pSrcCols[nCount] = m_pQSet4->GetItemColor( 1 );
-        pDstCols[nCount] = m_pLbColor4->GetSelectEntryColor();
-        pTols[nCount++] = static_cast<sal_uIntPtr>(m_pSp4->GetValue());
+        pSrcCols[nCount] = m_xQSet4->GetItemColor( 1 );
+        pDstCols[nCount] = m_xLbColor4->GetSelectEntryColor();
+        pTols[nCount++] = static_cast<sal_uIntPtr>(m_xSp4->get_value(FieldUnit::PERCENT));
     }
 
     return nCount;
@@ -945,15 +932,15 @@ GDIMetaFile SvxBmpMask::ImpReplaceTransparency( const GDIMetaFile& rMtf, const C
 GDIMetaFile SvxBmpMask::GetMetaFile(const Graphic& rGraphic)
 {
     // Replace transparency?
-    if (m_pCbxTrans->IsChecked())
-        return ImpReplaceTransparency(rGraphic.GetGDIMetaFile(), m_pLbColorTrans->GetSelectEntryColor());
+    if (m_xCbxTrans->get_active())
+        return ImpReplaceTransparency(rGraphic.GetGDIMetaFile(), m_xLbColorTrans->GetSelectEntryColor());
     return ImpMask(rGraphic.GetGDIMetaFile());
 }
 
 Graphic SvxBmpMask::Mask( const Graphic& rGraphic )
 {
     Graphic     aGraphic( rGraphic );
-    const Color aReplColor( m_pLbColorTrans->GetSelectEntryColor() );
+    const Color aReplColor( m_xLbColorTrans->GetSelectEntryColor() );
 
     switch( rGraphic.GetType() )
     {
@@ -962,7 +949,7 @@ Graphic SvxBmpMask::Mask( const Graphic& rGraphic )
             if( rGraphic.IsAnimated() )
             {
                 // Replace transparency?
-                if ( m_pCbxTrans->IsChecked() )
+                if ( m_xCbxTrans->get_active() )
                     aGraphic = ImpReplaceTransparency( rGraphic.GetAnimation(), aReplColor );
                 else
                     aGraphic = ImpMask( rGraphic.GetAnimation() );
@@ -970,7 +957,7 @@ Graphic SvxBmpMask::Mask( const Graphic& rGraphic )
             else
             {
                 // Replace transparency?
-                if( m_pCbxTrans->IsChecked() )
+                if( m_xCbxTrans->get_active() )
                 {
                     BitmapEx aBmpEx = aGraphic.GetBitmapEx();
                     aBmpEx.ReplaceTransparency(aReplColor);
@@ -1039,7 +1026,7 @@ Graphic SvxBmpMask::Mask( const Graphic& rGraphic )
 
 bool SvxBmpMask::IsEyedropping() const
 {
-    return m_pTbxPipette->IsItemChecked( m_pTbxPipette->GetItemId(0) );
+    return m_xTbxPipette->get_item_active("pipette");
 }
 
 /** Set an accessible name for the source color check boxes.  Without this
@@ -1052,13 +1039,13 @@ void SvxBmpMask::SetAccessibleNames()
     OUString sColorPaletteN;
 
     sColorPaletteN = sColorPalette + " 1";
-    m_pQSet1->SetText (sColorPaletteN);
+    m_xQSet1->SetText (sColorPaletteN);
     sColorPaletteN = sColorPalette + " 2";
-    m_pQSet2->SetText (sColorPaletteN);
+    m_xQSet2->SetText (sColorPaletteN);
     sColorPaletteN = sColorPalette + " 3";
-    m_pQSet3->SetText (sColorPaletteN);
+    m_xQSet3->SetText (sColorPaletteN);
     sColorPaletteN = sColorPalette + " 4";
-    m_pQSet4->SetText (sColorPaletteN);
+    m_xQSet4->SetText (sColorPaletteN);
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/uiconfig/ui/dockingcolorreplace.ui b/svx/uiconfig/ui/dockingcolorreplace.ui
index 48d7825d15ec..54aa048a767b 100644
--- a/svx/uiconfig/ui/dockingcolorreplace.ui
+++ b/svx/uiconfig/ui/dockingcolorreplace.ui
@@ -1,412 +1,521 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.20.0 -->
+<!-- Generated with glade 3.22.1 -->
 <interface domain="svx">
   <requires lib="gtk+" version="3.18"/>
-  <requires lib="LibreOffice" version="1.0"/>
   <object class="GtkAdjustment" id="adjustment1">
     <property name="upper">99</property>
     <property name="value">10</property>
     <property name="step_increment">1</property>
     <property name="page_increment">10</property>
   </object>
-  <object class="GtkWindow" id="DockingColorReplace">
+  <object class="GtkAdjustment" id="adjustment2">
+    <property name="upper">99</property>
+    <property name="value">10</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment3">
+    <property name="upper">99</property>
+    <property name="value">10</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment4">
+    <property name="upper">99</property>
+    <property name="value">10</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkGrid" id="DockingColorReplace">
+    <property name="visible">True</property>
     <property name="can_focus">False</property>
     <property name="hexpand">True</property>
     <property name="vexpand">True</property>
-    <property name="border_width">6</property>
-    <property name="title" translatable="yes" context="dockingcolorreplace|DockingColorReplace">Color Replacer</property>
-    <property name="type_hint">dock</property>
+    <property name="row_spacing">24</property>
     <child>
-      <object class="GtkGrid" id="grid1">
+      <object class="GtkFrame" id="frame1">
         <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">24</property>
+        <property name="label_xalign">0</property>
+        <property name="shadow_type">none</property>
         <child>
-          <object class="GtkFrame" id="frame1">
+          <object class="GtkAlignment" id="alignment1">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <property name="hexpand">True</property>
-            <property name="label_xalign">0</property>
-            <property name="shadow_type">none</property>
+            <property name="top_padding">6</property>
+            <property name="left_padding">12</property>
             <child>
-              <object class="GtkAlignment" id="alignment1">
+              <object class="GtkGrid" id="colorgrid">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="hexpand">True</property>
-                <property name="top_padding">6</property>
-                <property name="left_padding">12</property>
+                <property name="row_spacing">6</property>
+                <property name="column_spacing">12</property>
                 <child>
-                  <object class="GtkGrid" id="colorgrid">
+                  <object class="GtkLabel" id="label2">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="hexpand">True</property>
-                    <property name="row_spacing">6</property>
-                    <property name="column_spacing">12</property>
-                    <child>
-                      <object class="GtkLabel" id="label2">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" translatable="yes" context="dockingcolorreplace|label2">Source color</property>
-                        <property name="xalign">0</property>
-                      </object>
-                      <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">0</property>
-                        <property name="width">2</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkLabel" id="label3">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" translatable="yes" context="dockingcolorreplace|label3">Tolerance</property>
-                        <property name="xalign">0</property>
-                      </object>
-                      <packing>
-                        <property name="left_attach">2</property>
-                        <property name="top_attach">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkLabel" id="label4">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" translatable="yes" context="dockingcolorreplace|label4">Replace with...</property>
-                        <property name="xalign">0</property>
-                      </object>
-                      <packing>
-                        <property name="left_attach">3</property>
-                        <property name="top_attach">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkCheckButton" id="cbx2">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="xalign">0</property>
-                        <property name="draw_indicator">True</property>
-                        <child internal-child="accessible">
-                          <object class="AtkObject" id="cbx2-atkobject">
-                            <property name="AtkObject::accessible-name" translatable="yes" context="dockingcolorreplace|cbx2-atkobject" comments="This string is used by the eyedropper dialog to denote a color in an image that will be replaced by another color.">Source Color 2</property>
-                          </object>
-                        </child>
+                    <property name="label" translatable="yes" context="dockingcolorreplace|label2">Source color</property>
+                    <property name="xalign">0</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                    <property name="width">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label3">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes" context="dockingcolorreplace|label3">Tolerance</property>
+                    <property name="xalign">0</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label4">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes" context="dockingcolorreplace|label4">Replace with...</property>
+                    <property name="xalign">0</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">3</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="cbx2">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_underline">True</property>
+                    <property name="xalign">0</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="label" translatable="no"></property>
+                    <child internal-child="accessible">
+                      <object class="AtkObject" id="cbx2-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes" context="dockingcolorreplace|cbx2-atkobject" comments="This string is used by the eyedropper dialog to denote a color in an image that will be replaced by another color.">Source Color 2</property>
                       </object>
-                      <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">2</property>
-                      </packing>
                     </child>
-                    <child>
-                      <object class="GtkCheckButton" id="cbx3">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="xalign">0</property>
-                        <property name="draw_indicator">True</property>
-                        <child internal-child="accessible">
-                          <object class="AtkObject" id="cbx3-atkobject">
-                            <property name="AtkObject::accessible-name" translatable="yes" context="dockingcolorreplace|cbx3-atkobject" comments="This string is used by the eyedropper dialog to denote a color in an image that will be replaced by another color.">Source Color 3</property>
-                          </object>
-                        </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="cbx3">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_underline">True</property>
+                    <property name="xalign">0</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="label" translatable="no"></property>
+                    <child internal-child="accessible">
+                      <object class="AtkObject" id="cbx3-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes" context="dockingcolorreplace|cbx3-atkobject" comments="This string is used by the eyedropper dialog to denote a color in an image that will be replaced by another color.">Source Color 3</property>
                       </object>
-                      <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">3</property>
-                      </packing>
                     </child>
-                    <child>
-                      <object class="GtkCheckButton" id="cbx4">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="xalign">0</property>
-                        <property name="use_underline">True</property>
-                        <property name="draw_indicator">True</property>
-                        <child internal-child="accessible">
-                          <object class="AtkObject" id="cbx4-atkobject">
-                            <property name="AtkObject::accessible-name" translatable="yes" context="dockingcolorreplace|cbx4-atkobject" comments="This string is used by the eyedropper dialog to denote a color in an image that will be replaced by another color.">Source Color 4</property>
-                          </object>
-                        </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="cbx4">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_underline">True</property>
+                    <property name="xalign">0</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="label" translatable="no"></property>
+                    <child internal-child="accessible">
+                      <object class="AtkObject" id="cbx4-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes" context="dockingcolorreplace|cbx4-atkobject" comments="This string is used by the eyedropper dialog to denote a color in an image that will be replaced by another color.">Source Color 4</property>
                       </object>
-                      <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">4</property>
-                      </packing>
                     </child>
-                    <child>
-                      <object class="GtkCheckButton" id="cbx1">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="xalign">0</property>
-                        <property name="use_underline">True</property>
-                        <property name="draw_indicator">True</property>
-                        <child internal-child="accessible">
-                          <object class="AtkObject" id="cbx1-atkobject">
-                            <property name="AtkObject::accessible-name" translatable="yes" context="dockingcolorreplace|cbx1-atkobject" comments="This string is used by the eyedropper dialog to denote a color in an image that will be replaced by another color.">Source Color 1</property>
-                          </object>
-                        </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="cbx1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_underline">True</property>
+                    <property name="xalign">0</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="label" translatable="no"></property>
+                    <child internal-child="accessible">
+                      <object class="AtkObject" id="cbx1-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes" context="dockingcolorreplace|cbx1-atkobject" comments="This string is used by the eyedropper dialog to denote a color in an image that will be replaced by another color.">Source Color 1</property>
                       </object>
-                      <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">1</property>
-                      </packing>
                     </child>
-                    <child>
-                      <object class="GtkCheckButton" id="cbx5">
-                        <property name="label" translatable="yes" context="dockingcolorreplace|cbx5">Tr_ansparency</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="xalign">0</property>
-                        <property name="use_underline">True</property>
-                        <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="cbx5">
+                    <property name="label" translatable="yes" context="dockingcolorreplace|cbx5">Tr_ansparency</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_underline">True</property>
+                    <property name="xalign">0</property>
+                    <property name="draw_indicator">True</property>
+                    <accessibility>
+                      <relation type="label-for" target="color5"/>
+                    </accessibility>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">5</property>
+                    <property name="width">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="tol1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="adjustment">adjustment1</property>
+                    <child internal-child="accessible">
+                      <object class="AtkObject" id="tol1-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes" context="dockingcolorreplace|tol1-atkobject">Tolerance 1</property>
                       </object>
-                      <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">5</property>
-                        <property name="width">3</property>
-                      </packing>
                     </child>
-                    <child>
-                      <object class="GtkSpinButton" id="tol1:0%">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="adjustment">adjustment1</property>
-                        <child internal-child="accessible">
-                          <object class="AtkObject" id="tol1:0%-atkobject">
-                            <property name="AtkObject::accessible-name" translatable="yes" context="dockingcolorreplace|tol1-atkobject">Tolerance 1</property>
-                          </object>
-                        </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="tol2">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="text">10</property>
+                    <property name="adjustment">adjustment2</property>
+                    <property name="value">10</property>
+                    <child internal-child="accessible">
+                      <object class="AtkObject" id="tol2-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes" context="dockingcolorreplace|tol2-atkobject">Tolerance 2</property>
                       </object>
-                      <packing>
-                        <property name="left_attach">2</property>
-                        <property name="top_attach">1</property>
-                      </packing>
                     </child>
-                    <child>
-                      <object class="GtkSpinButton" id="tol2:0%">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="text">10</property>
-                        <property name="adjustment">adjustment1</property>
-                        <property name="value">10</property>
-                        <child internal-child="accessible">
-                          <object class="AtkObject" id="tol2:0%-atkobject">
-                            <property name="AtkObject::accessible-name" translatable="yes" context="dockingcolorreplace|tol2-atkobject">Tolerance 2</property>
-                          </object>
-                        </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="tol3">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="text">10</property>
+                    <property name="adjustment">adjustment3</property>
+                    <property name="value">10</property>
+                    <child internal-child="accessible">
+                      <object class="AtkObject" id="tol3-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes" context="dockingcolorreplace|tol3-atkobject">Tolerance 3</property>
                       </object>
-                      <packing>
-                        <property name="left_attach">2</property>
-                        <property name="top_attach">2</property>
-                      </packing>
                     </child>
-                    <child>
-                      <object class="GtkSpinButton" id="tol3:0%">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="text">10</property>
-                        <property name="adjustment">adjustment1</property>
-                        <property name="value">10</property>
-                        <child internal-child="accessible">
-                          <object class="AtkObject" id="tol3:0%-atkobject">
-                            <property name="AtkObject::accessible-name" translatable="yes" context="dockingcolorreplace|tol3-atkobject">Tolerance 3</property>
-                          </object>
-                        </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="tol4">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="text">10</property>
+                    <property name="adjustment">adjustment4</property>
+                    <property name="value">10</property>
+                    <child internal-child="accessible">
+                      <object class="AtkObject" id="tol4-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes" context="dockingcolorreplace|tol4-atkobject">Tolerance 4</property>
                       </object>
-                      <packing>
-                        <property name="left_attach">2</property>
-                        <property name="top_attach">3</property>
-                      </packing>
                     </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkMenuButton" id="color1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="label" translatable="no"></property>
                     <child>
-                      <object class="GtkSpinButton" id="tol4:0%">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="text">10</property>
-                        <property name="adjustment">adjustment1</property>
-                        <property name="value">10</property>
-                        <child internal-child="accessible">
-                          <object class="AtkObject" id="tol4:0%-atkobject">
-                            <property name="AtkObject::accessible-name" translatable="yes" context="dockingcolorreplace|tol4-atkobject">Tolerance 4</property>
-                          </object>
-                        </child>
-                      </object>
-                      <packing>
-                        <property name="left_attach">2</property>
-                        <property name="top_attach">4</property>
-                      </packing>
+                      <placeholder/>
                     </child>
-                    <child>
-                      <object class="svxcorelo-SvxColorListBox" id="color1">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="hexpand">True</property>
-                        <child internal-child="accessible">
-                          <object class="AtkObject" id="color1-atkobject">
-                            <property name="AtkObject::accessible-name" translatable="yes" context="dockingcolorreplace|color1-atkobject">Replace with 1</property>
-                          </object>
-                        </child>
+                    <child internal-child="accessible">
+                      <object class="AtkObject" id="color1-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes" context="dockingcolorreplace|color1-atkobject">Replace with 1</property>
                       </object>
-                      <packing>
-                        <property name="left_attach">3</property>
-                        <property name="top_attach">1</property>
-                      </packing>
                     </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">3</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkMenuButton" id="color2">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="label" translatable="no"></property>
                     <child>
-                      <object class="svxcorelo-SvxColorListBox" id="color2">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="hexpand">True</property>
-                        <child internal-child="accessible">
-                          <object class="AtkObject" id="color2-atkobject">
-                            <property name="AtkObject::accessible-name" translatable="yes" context="dockingcolorreplace|color2-atkobject">Replace with 2</property>
-                          </object>
-                        </child>
-                      </object>
-                      <packing>
-                        <property name="left_attach">3</property>
-                        <property name="top_attach">2</property>
-                      </packing>
+                      <placeholder/>
                     </child>
-                    <child>
-                      <object class="svxcorelo-SvxColorListBox" id="color3">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="hexpand">True</property>
-                        <child internal-child="accessible">
-                          <object class="AtkObject" id="color3-atkobject">
-                            <property name="AtkObject::accessible-name" translatable="yes" context="dockingcolorreplace|color3-atkobject">Replace with 3</property>
-                          </object>
-                        </child>
+                    <child internal-child="accessible">
+                      <object class="AtkObject" id="color2-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes" context="dockingcolorreplace|color2-atkobject">Replace with 2</property>
                       </object>
-                      <packing>
-                        <property name="left_attach">3</property>
-                        <property name="top_attach">3</property>
-                      </packing>
                     </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">3</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkMenuButton" id="color3">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="label" translatable="no"></property>
                     <child>
-                      <object class="svxcorelo-SvxColorListBox" id="color4">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="hexpand">True</property>
-                        <child internal-child="accessible">
-                          <object class="AtkObject" id="color4-atkobject">
-                            <property name="AtkObject::accessible-name" translatable="yes" context="dockingcolorreplace|color4-atkobject">Replace with 4</property>
-                          </object>
-                        </child>
-                      </object>
-                      <packing>
-                        <property name="left_attach">3</property>
-                        <property name="top_attach">4</property>
-                      </packing>
+                      <placeholder/>
                     </child>
-                    <child>
-                      <object class="svxcorelo-SvxColorListBox" id="color5">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
+                    <child internal-child="accessible">
+                      <object class="AtkObject" id="color3-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes" context="dockingcolorreplace|color3-atkobject">Replace with 3</property>
                       </object>
-                      <packing>
-                        <property name="left_attach">3</property>
-                        <property name="top_attach">5</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <placeholder/>
                     </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">3</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkMenuButton" id="color4">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="label" translatable="no"></property>
                     <child>
                       <placeholder/>
                     </child>
-                    <child>
-                      <placeholder/>
+                    <child internal-child="accessible">
+                      <object class="AtkObject" id="color4-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes" context="dockingcolorreplace|color4-atkobject">Replace with 4</property>
+                      </object>
                     </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">3</property>
+                    <property name="top_attach">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkMenuButton" id="color5">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="label" translatable="no"></property>
                     <child>
                       <placeholder/>
                     </child>
+                    <accessibility>
+                      <relation type="labelled-by" target="cbx5"/>
+                    </accessibility>
                   </object>
+                  <packing>
+                    <property name="left_attach">3</property>
+                    <property name="top_attach">5</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkDrawingArea" id="qset1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="events">GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
+                    <property name="hexpand">True</property>
+                    <property name="vexpand">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkDrawingArea" id="qset2">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="events">GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
+                    <property name="hexpand">True</property>
+                    <property name="vexpand">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkDrawingArea" id="qset3">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="events">GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
+                    <property name="hexpand">True</property>
+                    <property name="vexpand">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkDrawingArea" id="qset4">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="events">GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
+                    <property name="hexpand">True</property>
+                    <property name="vexpand">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">4</property>
+                  </packing>
                 </child>
               </object>
             </child>
-            <child type="label">
-              <object class="GtkLabel" id="label1">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label" translatable="yes" context="dockingcolorreplace|label1">Colors</property>
-                <attributes>
-                  <attribute name="weight" value="bold"/>
-                </attributes>
-              </object>
-            </child>
+          </object>
+        </child>
+        <child type="label">
+          <object class="GtkLabel" id="label1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes" context="dockingcolorreplace|label1">Colors</property>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+            </attributes>
+          </object>
+        </child>
+      </object>
+      <packing>
+        <property name="left_attach">0</property>
+        <property name="top_attach">1</property>
+      </packing>
+    </child>
+    <child>
+      <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">24</property>
+        <child>
+          <object class="GtkButton" id="replace">
+            <property name="label" translatable="yes" context="dockingcolorreplace|replace">_Replace</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <property name="halign">center</property>
+            <property name="valign">center</property>
+            <property name="hexpand">True</property>
+            <property name="use_underline">True</property>
           </object>
           <packing>
-            <property name="left_attach">0</property>
-            <property name="top_attach">1</property>
+            <property name="left_attach">1</property>
+            <property name="top_attach">0</property>
           </packing>
         </child>
         <child>
-          <object class="GtkGrid" id="grid2">
+          <object class="GtkGrid" id="toolgrid">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
+            <property name="halign">center</property>
+            <property name="valign">center</property>
             <property name="hexpand">True</property>
-            <property name="column_spacing">24</property>
+            <property name="column_spacing">12</property>
             <child>
-              <object class="GtkButton" id="replace">
-                <property name="label" translatable="yes" context="dockingcolorreplace|replace">_Replace</property>
+              <object class="GtkToolbar" id="toolbar">
                 <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="halign">center</property>
-                <property name="valign">center</property>
-                <property name="hexpand">True</property>
-                <property name="use_underline">True</property>
+                <property name="can_focus">False</property>
+                <property name="show_arrow">False</property>
+                <child>
+                  <object class="GtkToggleToolButton" id="pipette">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes" context="dockingcolorreplace|pipette">Pipette</property>
+                    <property name="use_underline">True</property>
+                    <property name="icon_name">res/sc10350.png</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="homogeneous">True</property>
+                  </packing>
+                </child>
               </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="GtkGrid" id="toolgrid">
+              <object class="GtkScrolledWindow" id="toolcolorborder">
                 <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="halign">center</property>
-                <property name="valign">center</property>
+                <property name="can_focus">True</property>
                 <property name="hexpand">True</property>
-                <property name="column_spacing">12</property>
+                <property name="vexpand">True</property>
+                <property name="hscrollbar_policy">never</property>
+                <property name="vscrollbar_policy">never</property>
+                <property name="shadow_type">in</property>
                 <child>
-                  <object class="GtkToolbar" id="toolbar">
+                  <object class="GtkViewport">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="show_arrow">False</property>
                     <child>
-                      <object class="GtkToolButton" id="pipette">
+                      <object class="GtkDrawingArea" id="toolcolor">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="label" translatable="yes" context="dockingcolorreplace|pipette">Pipette</property>
-                        <property name="use_underline">True</property>
-                        <property name="icon_name">res/sc10350.png</property>
                       </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="homogeneous">True</property>
-                      </packing>
                     </child>
                   </object>
-                  <packing>
-                    <property name="left_attach">0</property>
-                    <property name="top_attach">0</property>
-                  </packing>
                 </child>
               </object>
               <packing>
-                <property name="left_attach">0</property>
+                <property name="left_attach">1</property>
                 <property name="top_attach">0</property>
               </packing>
             </child>
@@ -417,6 +526,10 @@
           </packing>
         </child>
       </object>
+      <packing>
+        <property name="left_attach">0</property>
+        <property name="top_attach">0</property>
+      </packing>
     </child>
   </object>
 </interface>


More information about the Libreoffice-commits mailing list