cui/source/inc/cuitabarea.hxx                              |   35 
 cui/source/tabpages/tpcolor.cxx                            |  650 +-----
 cui/uiconfig/ui/colorpage.ui                               | 1348 ++++++-------
 include/svx/Palette.hxx                                    |   10 
 include/svx/PaletteManager.hxx                             |    6 
 include/svx/dialogs.hrc                                    |    2 
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |   21 
 svx/source/tbxctrls/PaletteManager.cxx                     |   54 
 svx/source/tbxctrls/tbcontrl.cxx                           |    5 
 svx/source/tbxctrls/tbcontrl.src                           |    4 
 10 files changed, 926 insertions(+), 1209 deletions(-)

New commits:
commit 571866eaba914742a48938abb6c8495e97868bf1
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Tue Aug 2 23:53:38 2016 +0530

    [GSoC] Rework of color tab
    
    New Features -
    
    1. Multiple Palettes in color tab.
    2. Remember the selected palette.
    3. Recent colors.
    4. Custom colors.
    
    Change-Id: I36a438a0c282059ddcbda35f934fcd90337fd451
    Reviewed-on: https://gerrit.libreoffice.org/26868
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Yousuf Philips <philip...@hotmail.com>
    Tested-by: Yousuf Philips <philip...@hotmail.com>
    Reviewed-by: Tomaž Vajngerl <qui...@gmail.com>

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 8eb92b9..25c0924 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -31,6 +31,8 @@
 #include <svx/hexcolorcontrol.hxx>
 #include <svx/SvxColorValueSet.hxx>
 #include <svx/SvxPresetListBox.hxx>
+#include <svx/Palette.hxx>
+#include <svx/PaletteManager.hxx>
 
 class SdrModel;
 class SdrView;
@@ -671,28 +673,16 @@ class SvxColorTabPage : public SfxTabPage
     using TabPage::DeactivatePage;
 
 private:
-    static const XPropertyListType meType = XCOLOR_LIST;
+    XPropertyListType   meType;
 
     VclPtr<Window>             mpTopDlg;
-    VclPtr<CheckBox>           m_pBoxEmbed;
-    VclPtr<PushButton>         m_pBtnLoad;
-    VclPtr<PushButton>         m_pBtnSave;
-    VclPtr<FixedText>          m_pTableName;
-
-    DECL_LINK_TYPED( EmbedToggleHdl_Impl, CheckBox&, void );
-    DECL_LINK_TYPED( ClickLoadHdl_Impl, Button*, void );
-    DECL_LINK_TYPED( ClickSaveHdl_Impl, Button*, void  );
-
-    XPropertyListRef GetList();
-    bool GetEmbed();
-    void SetEmbed( bool bEmbed );
-    void UpdateTableName();
-    void EnableSave( bool bCanSave );
 
     SvxColorTabPageShadow *pShadow;
-    VclPtr<ColorLB>            m_pLbColor;
 
+    PaletteManager             maPaletteManager;
+    VclPtr<ListBox>            m_pSelectPalette;
     VclPtr<SvxColorValueSet>   m_pValSetColorList;
+    VclPtr<SvxColorValueSet>   m_pValSetRecentList;
 
     VclPtr<SvxXRectPreview>    m_pCtlPreviewOld;
     VclPtr<SvxXRectPreview>    m_pCtlPreviewNew;
@@ -723,9 +713,8 @@ private:
     VclPtr<MetricField>        m_pKpreset;
 
     VclPtr<PushButton>         m_pBtnAdd;
-    VclPtr<PushButton>         m_pBtnModify;
-    VclPtr<PushButton>         m_pBtnWorkOn;
     VclPtr<PushButton>         m_pBtnDelete;
+    VclPtr<PushButton>         m_pBtnWorkOn;
 
     const SfxItemSet&   rOutAttrs;
 
@@ -754,26 +743,26 @@ private:
     sal_uInt16  PercentToColor_Impl( sal_uInt16 nPercent );
 
     void ImpColorCountChanged();
-
+    void FillPaletteLB();
 
     DECL_LINK_TYPED( ClickAddHdl_Impl, Button*, void );
-    DECL_LINK_TYPED( ClickModifyHdl_Impl, Button*, void );
-    DECL_LINK_TYPED( ClickDeleteHdl_Impl, Button*, void );
     DECL_LINK_TYPED( ClickWorkOnHdl_Impl, Button*, void );
+    DECL_LINK_TYPED( ClickDeleteHdl_Impl, Button*, void );
 
-    DECL_LINK_TYPED( SelectColorLBHdl_Impl, ListBox&, void );
+    DECL_LINK_TYPED( SelectPaletteLBHdl, ListBox&, void );
     DECL_LINK_TYPED( SelectValSetHdl_Impl, ValueSet*, void );
     DECL_LINK_TYPED( SelectColorModeHdl_Impl, RadioButton&, void );
     void ChangeColor(const Color &rNewColor);
     void SetColorModel(ColorModel eModel);
     void ChangeColorModel();
     void UpdateColorValues();
-    sal_Int32 SearchColorList(OUString const & aColorName);
+    static sal_Int32 SearchColorList(OUString const & aColorName);
     DECL_LINK_TYPED( ModifiedHdl_Impl, Edit&, void );
 
     long CheckChanges_Impl();
 
     void UpdateModified();
+    css::uno::Reference< css::uno::XComponentContext > m_context;
 public:
     SvxColorTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs );
     virtual ~SvxColorTabPage();
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index 82599b0..4c70df8 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -45,243 +45,13 @@
 #include <cuitabline.hxx>
 #include <svx/dialmgr.hxx>
 #include <svx/dialogs.hrc>
+#include <osl/file.hxx>
+#include <svx/Palette.hxx>
+#include <cppu/unotype.hxx>
+#include <officecfg/Office/Common.hxx>
 
 using namespace com::sun::star;
 
-XPropertyListRef SvxColorTabPage::GetList()
-{
-    SvxAreaTabDialog* pArea = dynamic_cast< SvxAreaTabDialog* >( 
mpTopDlg.get() );
-    SvxLineTabDialog* pLine = dynamic_cast< SvxLineTabDialog* >( 
mpTopDlg.get() );
-
-    XColorListRef pList;
-    if( pArea )
-        pList = pArea->GetNewColorList();
-    if( pLine )
-        pList = pLine->GetNewColorList();
-
-    if( !pList.is() ) {
-        if( pArea )
-            pList = pArea->GetColorList();
-        if( pLine )
-            pList = pLine->GetColorList();
-    }
-
-    // URGH - abstract this nicely ... for re-using SvxLoadSaveEmbed
-    if( !pList.is() ) {
-        pList = GetColorList();
-    }
-
-    return XPropertyListRef( static_cast< XPropertyList * >( pList.get() ) );
-}
-
-void SvxColorTabPage::SetEmbed( bool bEmbed )
-{
-    XPropertyListRef pList = GetList();
-    if( pList.is() )
-        pList->SetEmbedInDocument( bEmbed );
-    m_pBoxEmbed->Check( bEmbed );
-}
-
-bool SvxColorTabPage::GetEmbed()
-{
-    XPropertyListRef pList = GetList();
-    return pList.is() && pList->IsEmbedInDocument();
-}
-
-IMPL_LINK_NOARG_TYPED(SvxColorTabPage, EmbedToggleHdl_Impl, CheckBox&, void)
-{
-    SetEmbed( m_pBoxEmbed->IsChecked() );
-}
-
-void SvxColorTabPage::UpdateTableName()
-{
-    // Truncate the name if necessary ...
-    OUString aString( CUI_RES( RID_SVXSTR_TABLE ) );
-    aString += ": ";
-
-    XPropertyListRef pList = GetList();
-    if( !pList.is() )
-        return;
-
-    INetURLObject aURL( pList->GetPath() );
-    aURL.Append( pList->GetName() );
-
-    if ( aURL.getBase().getLength() > 18 )
-    {
-        aString += aURL.getBase().copy( 0, 15 );
-        aString += "...";
-    }
-    else
-        aString += aURL.getBase();
-
-    m_pTableName->SetText( aString );
-}
-
-
-IMPL_LINK_NOARG_TYPED(SvxColorTabPage, ClickLoadHdl_Impl, Button*, void)
-{
-    sal_uInt16 nReturn = RET_YES;
-    bool bLoaded = false;
-
-    if( IsModified() && GetList()->Count() > 0 )
-    {
-        nReturn = ScopedVclPtrInstance<MessageDialog>(GetParentDialog()
-                                ,"AskSaveList"
-                                ,"cui/ui/querysavelistdialog.ui")->Execute();
-
-        if ( nReturn == RET_YES )
-            GetList()->Save();
-    }
-
-    if ( nReturn != RET_CANCEL )
-    {
-        ::sfx2::FileDialogHelper aDlg( 
css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE );
-        OUString aStrFilterType( XPropertyList::GetDefaultExtFilter( meType ) 
);
-        aDlg.AddFilter( aStrFilterType, aStrFilterType );
-
-        OUString aPalettePath(SvtPathOptions().GetPalettePath());
-        OUString aLastDir;
-        sal_Int32 nIndex = 0;
-        do
-        {
-            aLastDir = aPalettePath.getToken(0, ';', nIndex);
-        }
-        while (nIndex >= 0);
-
-        INetURLObject aFile(aLastDir);
-        aDlg.SetDisplayDirectory( aFile.GetMainURL( INetURLObject::NO_DECODE ) 
);
-
-        if ( aDlg.Execute() == ERRCODE_NONE )
-        {
-            XColorListRef pList = XPropertyList::AsColorList(
-                XPropertyList::CreatePropertyListFromURL(
-                    meType, aDlg.GetPath()));
-            if( pList->Load() )
-            {
-                // check whether the table may be deleted:
-                SvxAreaTabDialog* pArea = dynamic_cast< SvxAreaTabDialog* >( 
mpTopDlg.get() );
-                SvxLineTabDialog* pLine = dynamic_cast< SvxLineTabDialog* >( 
mpTopDlg.get() );
-
-                // FIXME: want to have a generic set and get method by type ...
-                if( pArea )
-                    pArea->SetNewColorList(pList);
-                else if( pLine )
-                    pLine->SetNewColorList(pList);
-                else
-                    SetColorList(pList);
-
-                bLoaded = true;
-                UpdateTableName();
-
-                AddState( ChangeType::CHANGED );
-                SetModified( false );
-                SetEmbed( true );
-            }
-            else
-            {
-                ScopedVclPtrInstance<MessageDialog>(mpTopDlg
-                              ,"NoLoadedFileDialog"
-                              ,"cui/ui/querynoloadedfiledialog.ui")->Execute();
-            }
-        }
-    }
-    Update( bLoaded );
-}
-
-void SvxColorTabPage::EnableSave( bool bCanSave )
-{
-    if ( bCanSave )
-        m_pBtnSave->Enable();
-    else
-        m_pBtnSave->Disable();
-}
-
-
-IMPL_LINK_NOARG_TYPED(SvxColorTabPage, ClickSaveHdl_Impl, Button*, void)
-{
-    ::sfx2::FileDialogHelper aDlg(
-        css::ui::dialogs::TemplateDescription::FILESAVE_SIMPLE );
-
-    OUString aStrFilterType( XPropertyList::GetDefaultExtFilter( meType ) );
-    aDlg.AddFilter( aStrFilterType, aStrFilterType );
-
-    OUString aPalettePath(SvtPathOptions().GetPalettePath());
-    OUString aLastDir;
-    sal_Int32 nIndex = 0;
-    do
-    {
-        aLastDir = aPalettePath.getToken(0, ';', nIndex);
-    }
-    while (nIndex >= 0);
-
-    INetURLObject aFile(aLastDir);
-    SAL_WARN_IF( aFile.GetProtocol() == INetProtocol::NotValid, 
"cui.tabpages", "invalid URL" );
-
-    XPropertyListRef pList = GetList();
-
-    if( !pList->GetName().isEmpty() )
-    {
-        aFile.Append( pList->GetName() );
-
-        if( aFile.getExtension().isEmpty() )
-            aFile.SetExtension( XPropertyList::GetDefaultExt( meType ) );
-    }
-
-    aDlg.SetDisplayDirectory( aFile.GetMainURL( INetURLObject::NO_DECODE ) );
-    if ( aDlg.Execute() == ERRCODE_NONE )
-    {
-        INetURLObject aURL( aDlg.GetPath() );
-        INetURLObject aPathURL( aURL );
-
-        aPathURL.removeSegment();
-        aPathURL.removeFinalSlash();
-
-        pList->SetName( aURL.getName() );
-        pList->SetPath( aPathURL.GetMainURL( INetURLObject::NO_DECODE ) );
-
-        if( pList->Save() )
-        {
-            UpdateTableName();
-            AddState( ChangeType::SAVED );
-            SetModified( false );
-        }
-        else
-        {
-            ScopedVclPtrInstance<MessageDialog>(mpTopDlg
-                          ,"NoSaveFileDialog"
-                          ,"cui/ui/querynosavefiledialog.ui")->Execute();
-        }
-    }
-}
-
-void SvxColorTabPage::Update(bool bLoaded)
-{
-    pColorList = XColorListRef( static_cast<XColorList *>( GetList().get() ) );
-
-    if (bLoaded)
-    {
-        m_pLbColor->Clear();
-        m_pValSetColorList->Clear();
-        Construct();
-        Reset( &rOutAttrs );
-
-        if( m_pLbColor->GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND )
-            m_pLbColor->SelectEntryPos( 0 );
-        else
-            m_pLbColor->SelectEntryPos( m_pLbColor->GetSelectEntryPos() );
-
-        sal_Int32 nPos = m_pLbColor->GetSelectEntryPos();
-        if( nPos != LISTBOX_ENTRY_NOTFOUND )
-        {
-            XColorEntry* pEntry = pColorList->GetColor( nPos );
-            ChangeColor(pEntry->GetColor());
-        }
-        SelectColorLBHdl_Impl( *m_pLbColor );
-    }
-
-    UpdateModified();
-}
-
 // FIXME: you have to hate yourself for this - all this
 // horrible and broadly unused pointer based coupling
 // needs to die. cf SetupForViewFrame
@@ -305,6 +75,7 @@ struct SvxColorTabPageShadow
 
 SvxColorTabPage::SvxColorTabPage(vcl::Window* pParent, const SfxItemSet& 
rInAttrs)
     : SfxTabPage(pParent, "ColorPage", "cui/ui/colorpage.ui", &rInAttrs)
+    , meType( XCOLOR_LIST )
     , mpTopDlg( GetParentDialog() )
     , pShadow             ( new SvxColorTabPageShadow() )
     , rOutAttrs           ( rInAttrs )
@@ -319,17 +90,14 @@ SvxColorTabPage::SvxColorTabPage(vcl::Window* pParent, 
const SfxItemSet& rInAttr
     , aXFillAttr( static_cast<XOutdevItemPool*>( rInAttrs.GetPool() ))
     , rXFSet( aXFillAttr.GetItemSet() )
     , eCM( CM_RGB )
+    , m_context(comphelper::getProcessComponentContext())
 {
-    get(m_pBoxEmbed, "embed");
-    get(m_pBtnLoad, "load");
-    get(m_pBtnSave, "save");
-    get(m_pTableName, "colortableft");
-
-    get(m_pLbColor, "colorlb");
+    get(m_pSelectPalette, "paletteselector");
     get(m_pValSetColorList, "colorset");
-    Size aSize = LogicToPixel(Size(94 , 117), MAP_APPFONT);
+    Size aSize = LogicToPixel(Size(100 , 120), MAP_APPFONT);
     m_pValSetColorList->set_width_request(aSize.Width());
     m_pValSetColorList->set_height_request(aSize.Height());
+    get(m_pValSetRecentList, "recentcolorset");
     get(m_pCtlPreviewOld, "oldpreview");
     get(m_pCtlPreviewNew, "newpreview");
     aSize = LogicToPixel(Size(34 , 25), MAP_APPFONT);
@@ -360,17 +128,8 @@ SvxColorTabPage::SvxColorTabPage(vcl::Window* pParent, 
const SfxItemSet& rInAttr
     get(m_pKcustom, "K_custom");
     get(m_pKpreset, "K_preset-nospin");
     get(m_pBtnAdd, "add");
-    get(m_pBtnModify, "modify");
-    get(m_pBtnWorkOn, "edit");
     get(m_pBtnDelete, "delete");
-
-    m_pBoxEmbed->SetToggleHdl( LINK( this, SvxColorTabPage, 
EmbedToggleHdl_Impl ) );
-
-    m_pBtnLoad->SetClickHdl( LINK( this, SvxColorTabPage, ClickLoadHdl_Impl ) 
);
-    m_pBtnSave->SetClickHdl( LINK( this, SvxColorTabPage, ClickSaveHdl_Impl ) 
);
-
-    SetEmbed( GetEmbed() );
-    UpdateTableName();
+    get(m_pBtnWorkOn, "edit");
 
     // this page needs ExchangeSupport
     SetExchangeSupport();
@@ -382,10 +141,10 @@ SvxColorTabPage::SvxColorTabPage(vcl::Window* pParent, 
const SfxItemSet& rInAttr
     m_pCtlPreviewNew->SetAttributes( aXFillAttr.GetItemSet() );
 
     // set handler
-    m_pLbColor->SetSelectHdl(
-        LINK( this, SvxColorTabPage, SelectColorLBHdl_Impl ) );
-    m_pValSetColorList->SetSelectHdl(
-        LINK( this, SvxColorTabPage, SelectValSetHdl_Impl ) );
+    m_pSelectPalette->SetSelectHdl( LINK(this, SvxColorTabPage, 
SelectPaletteLBHdl) );
+    Link<ValueSet*, void> aValSelectLink = LINK( this, SvxColorTabPage, 
SelectValSetHdl_Impl );
+    m_pValSetColorList->SetSelectHdl( aValSelectLink );
+    m_pValSetRecentList->SetSelectHdl( aValSelectLink );
 
     Link<Edit&,void> aLink = LINK( this, SvxColorTabPage, ModifiedHdl_Impl );
     m_pRcustom->SetModifyHdl( aLink );
@@ -405,9 +164,11 @@ SvxColorTabPage::SvxColorTabPage(vcl::Window* pParent, 
const SfxItemSet& rInAttr
     ChangeColorModel();
 
     m_pBtnAdd->SetClickHdl( LINK( this, SvxColorTabPage, ClickAddHdl_Impl ) );
-    m_pBtnModify->SetClickHdl( LINK( this, SvxColorTabPage, 
ClickModifyHdl_Impl ) );
     m_pBtnWorkOn->SetClickHdl( LINK( this, SvxColorTabPage, 
ClickWorkOnHdl_Impl ) );
     m_pBtnDelete->SetClickHdl( LINK( this, SvxColorTabPage, 
ClickDeleteHdl_Impl ) );
+    // disable modify buttons
+    // Color palettes can't be modified
+    m_pBtnDelete->Disable();
 
     // disable preset color values
     m_pRGBpreset->Disable();
@@ -416,6 +177,13 @@ SvxColorTabPage::SvxColorTabPage(vcl::Window* pParent, 
const SfxItemSet& rInAttr
     // ValueSet
     m_pValSetColorList->SetStyle( m_pValSetColorList->GetStyle() | 
WB_ITEMBORDER );
     m_pValSetColorList->Show();
+
+    m_pValSetRecentList->SetStyle( m_pValSetColorList->GetStyle() | 
WB_ITEMBORDER );
+    m_pValSetRecentList->Show();
+    maPaletteManager.ReloadRecentColorSet( *m_pValSetRecentList );
+    aSize = 
m_pValSetRecentList->layoutAllVisible(maPaletteManager.GetRecentColorCount());
+    m_pValSetRecentList->set_height_request(aSize.Height());
+    m_pValSetRecentList->set_width_request(aSize.Width());
 }
 
 SvxColorTabPage::~SvxColorTabPage()
@@ -428,12 +196,9 @@ void SvxColorTabPage::dispose()
     delete pShadow;
     pShadow = nullptr;
     mpTopDlg.clear();
-    m_pBoxEmbed.clear();
-    m_pBtnLoad.clear();
-    m_pBtnSave.clear();
-    m_pTableName.clear();
-    m_pLbColor.clear();
+    m_pSelectPalette.clear();
     m_pValSetColorList.clear();
+    m_pValSetRecentList.clear();
     m_pCtlPreviewOld.clear();
     m_pCtlPreviewNew.clear();
     m_pRbRGB.clear();
@@ -459,9 +224,8 @@ void SvxColorTabPage::dispose()
     m_pKcustom.clear();
     m_pKpreset.clear();
     m_pBtnAdd.clear();
-    m_pBtnModify.clear();
-    m_pBtnWorkOn.clear();
     m_pBtnDelete.clear();
+    m_pBtnWorkOn.clear();
     SfxTabPage::dispose();
 }
 
@@ -470,17 +234,29 @@ void SvxColorTabPage::ImpColorCountChanged()
     if (!pColorList.is())
         return;
     m_pValSetColorList->SetColCount(SvxColorValueSet::getColumnCount());
+    m_pValSetRecentList->SetColCount(SvxColorValueSet::getColumnCount());
 }
 
+void SvxColorTabPage::FillPaletteLB()
+{
+    m_pSelectPalette->Clear();
+    std::vector<OUString> aPaletteList = maPaletteManager.GetPaletteList();
+    for( std::vector<OUString>::iterator it = aPaletteList.begin(); it != 
aPaletteList.end(); ++it )
+    {
+        m_pSelectPalette->InsertEntry( *it );
+    }
+    OUString aPaletteName( 
officecfg::Office::Common::UserColors::PaletteName::get() );
+    m_pSelectPalette->SelectEntry(aPaletteName);
+    SelectPaletteLBHdl( *m_pSelectPalette );
+}
 
 void SvxColorTabPage::Construct()
 {
     if (pColorList.is())
     {
-        m_pLbColor->Fill(pColorList);
-        m_pValSetColorList->addEntriesForXColorList(*pColorList);
+        FillPaletteLB();
+        SelectPaletteLBHdl( *m_pSelectPalette );
         ImpColorCountChanged();
-        UpdateTableName();
     }
 }
 
@@ -494,8 +270,7 @@ void SvxColorTabPage::ActivatePage( const SfxItemSet& )
         {
             if( *pPageType == PT_COLOR && *pPos != LISTBOX_ENTRY_NOTFOUND )
             {
-                m_pLbColor->SelectEntryPos( *pPos );
-                m_pValSetColorList->SelectItem( 
m_pLbColor->GetSelectEntryPos() + 1 );
+                m_pValSetColorList->SelectItem( m_pValSetColorList->GetItemId( 
static_cast<size_t>(*pPos) ) );
                 XColorEntry* pEntry = pColorList->GetColor( *pPos );
                 aPreviousColor = pEntry->GetColor();
                 ChangeColor(pEntry->GetColor());
@@ -523,14 +298,12 @@ void SvxColorTabPage::ActivatePage( const SfxItemSet& )
             m_pCtlPreviewOld->SetAttributes( aXFillAttr.GetItemSet() );
             m_pCtlPreviewOld->Invalidate();
 
-            SelectColorLBHdl_Impl( *m_pLbColor );
+            SelectValSetHdl_Impl( m_pValSetColorList );
 
             *pPageType = PT_COLOR;
             *pPos = LISTBOX_ENTRY_NOTFOUND;
         }
     }
-    else
-        m_pBoxEmbed->Hide();
 }
 
 DeactivateRC SvxColorTabPage::DeactivatePage( SfxItemSet* _pSet )
@@ -547,60 +320,34 @@ DeactivateRC SvxColorTabPage::DeactivatePage( SfxItemSet* 
_pSet )
 
 long SvxColorTabPage::CheckChanges_Impl()
 {
-    // used to NOT lose changes
-    sal_Int32 nPos = m_pLbColor->GetSelectEntryPos();
-    if( nPos != LISTBOX_ENTRY_NOTFOUND )
+    if( ColorToPercent_Impl( aCurrentColor.GetRed() ) != ColorToPercent_Impl( 
aPreviousColor.GetRed() ) ||
+        ColorToPercent_Impl( aCurrentColor.GetGreen() ) != 
ColorToPercent_Impl( aPreviousColor.GetGreen() ) ||
+        ColorToPercent_Impl( aCurrentColor.GetBlue() ) != ColorToPercent_Impl( 
aPreviousColor.GetBlue() ) )
     {
-        Color aColor = pColorList->GetColor( nPos )->GetColor();
-
-        // aNewColor, because COL_USER != COL_something, even if RGB values 
are the same
-        // Color aNewColor( aColor.GetRed(), aColor.GetGreen(), 
aColor.GetBlue() );
-
-        if( ColorToPercent_Impl( aCurrentColor.GetRed() ) != 
ColorToPercent_Impl( aColor.GetRed() ) ||
-            ColorToPercent_Impl( aCurrentColor.GetGreen() ) != 
ColorToPercent_Impl( aColor.GetGreen() ) ||
-            ColorToPercent_Impl( aCurrentColor.GetBlue() ) != 
ColorToPercent_Impl( aColor.GetBlue() ) )
-        {
-            ResMgr& rMgr = CUI_MGR();
-            Image aWarningBoxImage = WarningBox::GetStandardImage();
-            ScopedVclPtrInstance<SvxMessDialog> aMessDlg( GetParentDialog(),
-                                                          SVX_RESSTR( 
RID_SVXSTR_COLOR ),
-                                                          ResId( 
RID_SVXSTR_ASK_CHANGE_COLOR, rMgr ),
-                                                          &aWarningBoxImage );
-            aMessDlg->SetButtonText( SvxMessDialogButton::N1,
+        ResMgr& rMgr = CUI_MGR();
+        Image aWarningBoxImage = WarningBox::GetStandardImage();
+        ScopedVclPtrInstance<SvxMessDialog> aMessDlg( GetParentDialog(),
+                        SVX_RESSTR( RID_SVXSTR_COLOR ),
+                        ResId( RID_SVXSTR_ASK_CHANGE_COLOR, rMgr ),
+                        &aWarningBoxImage );
+        aMessDlg->SetButtonText( SvxMessDialogButton::N1,
                                     ResId( RID_SVXSTR_CHANGE, rMgr ) );
-            aMessDlg->SetButtonText( SvxMessDialogButton::N2,
+        aMessDlg->SetButtonText( SvxMessDialogButton::N2,
                                     ResId( RID_SVXSTR_ADD, rMgr ) );
+        aMessDlg->DisableButton( SvxMessDialogButton::N1 );
 
-            short nRet = aMessDlg->Execute();
+        short nRet = aMessDlg->Execute();
 
-            switch( nRet )
+        switch( nRet )
+        {
+            case RET_BTN_2:
             {
-                case RET_BTN_1:
-                {
-                    ClickModifyHdl_Impl( nullptr );
-                    aColor = pColorList->GetColor( nPos )->GetColor();
-                }
-                break;
-
-                case RET_BTN_2:
-                {
-                    ClickAddHdl_Impl( nullptr );
-                    nPos = m_pLbColor->GetSelectEntryPos();
-                    aColor = pColorList->GetColor( nPos )->GetColor();
-                }
-                break;
-
-                case RET_CANCEL:
-                break;
+                ClickAddHdl_Impl( nullptr );
             }
-        }
-    }
-    if( nDlgType == 0 ) // area dialog
-    {
-        nPos = m_pLbColor->GetSelectEntryPos();
-        if( nPos != LISTBOX_ENTRY_NOTFOUND )
-        {
-            *pPos = nPos;
+            break;
+
+            case RET_CANCEL:
+            break;
         }
     }
     return 0;
@@ -612,33 +359,17 @@ bool SvxColorTabPage::FillItemSet( SfxItemSet* rSet )
     if( ( nDlgType != 0 ) ||
         ( *pPageType == PT_COLOR && !*pbAreaTP ) )
     {
-        OUString aString;
-        Color  aColor;
-
-        sal_Int32 nPos = m_pLbColor->GetSelectEntryPos();
-        if( nPos != LISTBOX_ENTRY_NOTFOUND )
-        {
-            aColor  = pColorList->GetColor( nPos )->GetColor();
-            aString = m_pLbColor->GetSelectEntry();
-        }
-        else
-        {
-            aColor.SetColor (aCurrentColor.GetColor());
-        }
-        rSet->Put( XFillColorItem( aString, aColor ) );
+        maPaletteManager.AddRecentColor( aCurrentColor );
+        rSet->Put( XFillColorItem( OUString(), aCurrentColor ) );
         rSet->Put( XFillStyleItem( drawing::FillStyle_SOLID ) );
     }
-
     return true;
 }
 
 void SvxColorTabPage::UpdateModified()
 {
     bool bEnable = pColorList.is() && pColorList->Count();
-    m_pBtnModify->Enable( bEnable );
     m_pBtnWorkOn->Enable( bEnable );
-    m_pBtnDelete->Enable( bEnable );
-    EnableSave( bEnable );
 }
 
 void SvxColorTabPage::Reset( const SfxItemSet* rSet )
@@ -652,12 +383,6 @@ void SvxColorTabPage::Reset( const SfxItemSet* rSet )
         XFillColorItem aColorItem( static_cast<const 
XFillColorItem&>(rSet->Get( XATTR_FILLCOLOR )) );
         aPreviousColor = aColorItem.GetColorValue();
         aNewColor = aColorItem.GetColorValue();
-        m_pLbColor->SelectEntry(aNewColor);
-        auto pos = m_pLbColor->GetSelectEntryPos();
-        if (pos != LISTBOX_ENTRY_NOTFOUND)
-        {
-            m_pValSetColorList->SelectItem( pos + 1 );
-        }
     }
 
     // set color model
@@ -759,80 +484,29 @@ IMPL_LINK_NOARG_TYPED(SvxColorTabPage, ClickAddHdl_Impl, 
Button*, void)
 
     if (!nError)
     {
-        XColorEntry* pEntry = new XColorEntry( aCurrentColor, aName );
-
-        pColorList->Insert( pEntry, pColorList->Count() );
-
-        m_pLbColor->Append( *pEntry );
-        m_pValSetColorList->InsertItem( m_pValSetColorList->GetItemCount() + 
1, pEntry->GetColor(), pEntry->GetName() );
-        m_pValSetColorList->Resize();
+        m_pSelectPalette->SelectEntryPos(0);
+        SelectPaletteLBHdl( *m_pSelectPalette );
+        std::shared_ptr<comphelper::ConfigurationChanges> 
batch(comphelper::ConfigurationChanges::create(m_context));
+        css::uno::Sequence< sal_Int32 > 
aCustomColorList(officecfg::Office::Common::UserColors::CustomColor::get());
+        css::uno::Sequence< OUString > 
aCustomColorNameList(officecfg::Office::Common::UserColors::CustomColorName::get());
+        sal_Int32 nSize = aCustomColorList.getLength();
+        aCustomColorList.realloc( nSize + 1 );
+        aCustomColorNameList.realloc( nSize + 1 );
+        aCustomColorList[nSize] = aCurrentColor.GetColor();
+        aCustomColorNameList[nSize] = aName;
+        
officecfg::Office::Common::UserColors::CustomColor::set(aCustomColorList, 
batch);
+        
officecfg::Office::Common::UserColors::CustomColorName::set(aCustomColorNameList,
 batch);
+        batch->commit();
+        sal_uInt16 nId = m_pValSetColorList->GetItemId(nSize - 1);
+        m_pValSetColorList->InsertItem( nId + 1 , aCurrentColor, aName );
+        m_pValSetColorList->SelectItem( nId + 1 );
+        m_pBtnDelete->Enable();
         ImpColorCountChanged();
-
-        m_pLbColor->SelectEntryPos( m_pLbColor->GetEntryCount() - 1 );
-
-        *pnColorListState |= ChangeType::MODIFIED;
-
-        SelectColorLBHdl_Impl( *m_pLbColor );
     }
 
     UpdateModified();
 }
 
-
-IMPL_LINK_NOARG_TYPED(SvxColorTabPage, ClickModifyHdl_Impl, Button*, void)
-{
-    sal_Int32 nPos = m_pLbColor->GetSelectEntryPos();
-
-    if( nPos != LISTBOX_ENTRY_NOTFOUND )
-    {
-        ResMgr& rMgr = CUI_MGR();
-        OUString aDesc( ResId( RID_SVXSTR_DESC_COLOR, rMgr ) );
-        OUString aName( m_pLbColor->GetSelectEntry() );
-
-        SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-        std::unique_ptr<AbstractSvxNameDialog> 
pDlg(pFact->CreateSvxNameDialog( GetParentDialog(), aName, aDesc ));
-        assert(pFact && "Dialog Creation Failed");
-
-        bool bLoop = true;
-
-        while( bLoop && pDlg->Execute() == RET_OK )
-        {
-            pDlg->GetName( aName );
-            sal_Int32 nColorPos = SearchColorList(aName);
-            bool bValidColorName = (nColorPos == nPos) || (nColorPos == 
LISTBOX_ENTRY_NOTFOUND);
-
-            if( bValidColorName )
-            {
-                bLoop = false;
-                // #123497# Need to replace the existing entry with a new one 
(old returned needs to be deleted)
-                XColorEntry* pEntry = new XColorEntry(aCurrentColor, aName);
-                delete pColorList->Replace(pEntry, nPos);
-
-                m_pLbColor->Modify( *pEntry, nPos );
-                m_pLbColor->SelectEntryPos( nPos );
-
-                m_pValSetColorList->Clear();
-                m_pValSetColorList->addEntriesForXColorList( *pColorList );
-                m_pValSetColorList->SelectItem( nPos + 1 );
-
-                m_pCtlPreviewOld->Invalidate();
-
-                *pnColorListState |= ChangeType::MODIFIED;
-            }
-
-            // if yes, it is repeated and a new name is demanded
-            else
-            {
-                ScopedVclPtrInstance<MessageDialog> aWarningBox( 
GetParentDialog()
-                                                                 
,"DuplicateNameDialog"
-                                                                 
,"cui/ui/queryduplicatedialog.ui");
-                aWarningBox->Execute();
-            }
-        }
-    }
-}
-
-
 IMPL_LINK_NOARG_TYPED(SvxColorTabPage, ClickWorkOnHdl_Impl, Button*, void)
 {
     std::unique_ptr<SvColorDialog> pColorDlg(new SvColorDialog( 
GetParentDialog() ));
@@ -854,87 +528,100 @@ IMPL_LINK_NOARG_TYPED(SvxColorTabPage, 
ClickWorkOnHdl_Impl, Button*, void)
     }
 }
 
-
 IMPL_LINK_NOARG_TYPED(SvxColorTabPage, ClickDeleteHdl_Impl, Button*, void)
 {
-    sal_Int32 nPos = m_pLbColor->GetSelectEntryPos();
-
-    if( nPos != LISTBOX_ENTRY_NOTFOUND )
+    sal_uInt16 nId = m_pValSetColorList->GetSelectItemId();
+    size_t nPos = m_pValSetColorList->GetSelectItemPos();
+    if(m_pSelectPalette->GetSelectEntryPos() == 0 && nPos != 
VALUESET_ITEM_NOTFOUND )
     {
-        ScopedVclPtrInstance< MessageDialog > aQueryBox( 
GetParentDialog(),"AskDelColorDialog","cui/ui/querydeletecolordialog.ui");
-
-        if( aQueryBox->Execute() == RET_YES )
+        std::shared_ptr<comphelper::ConfigurationChanges> 
batch(comphelper::ConfigurationChanges::create(m_context));
+        css::uno::Sequence< sal_Int32 > 
aCustomColorList(officecfg::Office::Common::UserColors::CustomColor::get());
+        css::uno::Sequence< OUString > 
aCustomColorNameList(officecfg::Office::Common::UserColors::CustomColorName::get());
+        sal_Int32 nSize = aCustomColorList.getLength() - 1;
+        for(sal_Int32 nIndex = static_cast<sal_Int32>(nPos);nIndex < 
nSize;nIndex++)
         {
-            XColorEntry* pEntry = pColorList->Remove( nPos );
-            assert( pEntry && "ColorEntry not found !" );
-            delete pEntry;
-
-            // update Listbox and ValueSet
-            m_pLbColor->RemoveEntry( nPos );
-            m_pValSetColorList->Clear();
-            m_pValSetColorList->addEntriesForXColorList(*pColorList);
-            m_pValSetColorList->Resize();
-            ImpColorCountChanged();
-            //FillValueSet_Impl(*m_pValSetColorList);
-
-            // positioning
-            long nColorCount = pColorList->Count();
-            if( nColorCount != 0 )
-            {
-                if( nPos >= nColorCount  )
-                    nPos = nColorCount - 1;
-                m_pLbColor->SelectEntryPos( nPos );
-            }
-            else
-                m_pLbColor->SetNoSelection();
-
-            SelectColorLBHdl_Impl( *m_pLbColor );
-
-            m_pCtlPreviewOld->Invalidate();
-
-            *pnColorListState |= ChangeType::MODIFIED;
+            aCustomColorList[nIndex] = aCustomColorList[nIndex+1];
+            aCustomColorNameList[nIndex] = aCustomColorNameList[nIndex+1];
         }
+        aCustomColorList.realloc(nSize);
+        aCustomColorNameList.realloc(nSize);
+        
officecfg::Office::Common::UserColors::CustomColor::set(aCustomColorList, 
batch);
+        
officecfg::Office::Common::UserColors::CustomColorName::set(aCustomColorNameList,
 batch);
+        batch->commit();
+        m_pValSetColorList->RemoveItem(nId);
+        if(m_pValSetColorList->GetItemCount() != 0)
+        {
+            nId = m_pValSetColorList->GetItemId(0);
+            m_pValSetColorList->SelectItem(nId);
+            SelectValSetHdl_Impl( m_pValSetColorList );
+        }
+        else
+            m_pBtnDelete->Disable();
     }
-    UpdateModified();
 }
 
-
-IMPL_LINK_NOARG_TYPED(SvxColorTabPage, SelectColorLBHdl_Impl, ListBox&, void)
+IMPL_LINK_NOARG_TYPED(SvxColorTabPage, SelectPaletteLBHdl, ListBox&, void)
 {
-    sal_Int32 nPos = m_pLbColor->GetSelectEntryPos();
-    if( nPos != LISTBOX_ENTRY_NOTFOUND )
-    {
-        m_pValSetColorList->SelectItem( nPos + 1 );
+    m_pValSetColorList->Clear();
+    sal_Int32 nPos = m_pSelectPalette->GetSelectEntryPos();
+    maPaletteManager.SetPalette( nPos );
+    maPaletteManager.ReloadColorSet( *m_pValSetColorList );
 
-        rXFSet.Put( XFillColorItem( OUString(),
-                                    m_pLbColor->GetSelectEntryColor() ) );
-        m_pCtlPreviewNew->SetAttributes( aXFillAttr.GetItemSet() );
-        m_pCtlPreviewNew->Invalidate();
-
-        XColorEntry* pEntry = pColorList->GetColor(nPos);
-        ChangeColor(pEntry->GetColor());
+    if(nPos != maPaletteManager.GetPaletteCount() - 1 && nPos != 0)
+    {
+        XColorListRef pList = XPropertyList::AsColorList(
+                                XPropertyList::CreatePropertyListFromURL(
+                                meType, 
maPaletteManager.GetSelectedPalettePath()));
+        pList->SetName(maPaletteManager.GetPaletteName());
+        if(pList->Load())
+        {
+            SvxAreaTabDialog* pArea = dynamic_cast< SvxAreaTabDialog* >( 
mpTopDlg.get() );
+            SvxLineTabDialog* pLine = dynamic_cast< SvxLineTabDialog* >( 
mpTopDlg.get() );
+            pColorList = pList;
+            if( pArea )
+                pArea->SetNewColorList(pList);
+            else if( pLine )
+                pLine->SetNewColorList(pList);
+            else
+                SetColorList(pList);
+            AddState( ChangeType::CHANGED );
+            SetModified( false );
+        }
     }
-}
+    if(nPos != 0)
+        m_pBtnDelete->Disable();
 
+    m_pValSetColorList->Resize();
+}
 
-IMPL_LINK_NOARG_TYPED(SvxColorTabPage, SelectValSetHdl_Impl, ValueSet*, void)
+IMPL_LINK_TYPED(SvxColorTabPage, SelectValSetHdl_Impl, ValueSet*, pValSet, 
void)
 {
-    sal_Int32 nPos = m_pValSetColorList->GetSelectItemId();
-    if( nPos != LISTBOX_ENTRY_NOTFOUND )
+    sal_Int32 nPos = pValSet->GetSelectItemId();
+    if( nPos != 0 )
     {
-        m_pLbColor->SelectEntryPos( nPos - 1 );
+        Color aColor = pValSet->GetItemColor( nPos );
 
-        rXFSet.Put( XFillColorItem( OUString(),
-                                    m_pLbColor->GetSelectEntryColor() ) );
+        rXFSet.Put( XFillColorItem( OUString(), aColor ) );
         m_pCtlPreviewNew->SetAttributes( aXFillAttr.GetItemSet() );
         m_pCtlPreviewNew->Invalidate();
+        ChangeColor(aColor);
 
-        XColorEntry* pEntry = pColorList->GetColor(nPos-1);
-        ChangeColor(pEntry->GetColor());
+        if(pValSet == m_pValSetColorList)
+        {
+            m_pValSetRecentList->SetNoSelection();
+            if(m_pSelectPalette->GetSelectEntryPos() == 0 && 
m_pValSetColorList->GetSelectItemId() != 0)
+                m_pBtnDelete->Enable();
+            else
+                m_pBtnDelete->Disable();
+        }
+        if(pValSet == m_pValSetRecentList)
+        {
+            m_pValSetColorList->SetNoSelection();
+            m_pBtnDelete->Disable();
+        }
     }
 }
 
-
 void SvxColorTabPage::ConvertColorValues (Color& rColor, ColorModel eModell)
 {
     switch (eModell)
@@ -967,6 +654,7 @@ IMPL_LINK_TYPED(SvxColorTabPage, SelectColorModeHdl_Impl, 
RadioButton&, rRadioBu
 
 void SvxColorTabPage::ChangeColor(const Color &rNewColor)
 {
+    aPreviousColor = rNewColor;
     aCurrentColor = rNewColor;
     UpdateColorValues();
     // fill ItemSet and pass it on to XOut
@@ -1043,13 +731,14 @@ void SvxColorTabPage::UpdateColorValues()
 
 sal_Int32 SvxColorTabPage::SearchColorList(OUString const & aColorName)
 {
-    long nCount = pColorList->Count();
+    css::uno::Sequence< OUString > 
aCustomColorNameList(officecfg::Office::Common::UserColors::CustomColorName::get());
+    long nCount = aCustomColorNameList.getLength();
     bool bValidColorName = true;
     sal_Int32 nPos = LISTBOX_ENTRY_NOTFOUND;
 
     for(long i = 0;i < nCount && bValidColorName;i++)
     {
-        if(aColorName == pColorList->GetColor( i )->GetName())
+        if(aColorName == aCustomColorNameList[i])
         {
             nPos = i;
             bValidColorName = false;
@@ -1058,22 +747,6 @@ sal_Int32 SvxColorTabPage::SearchColorList(OUString const 
& aColorName)
     return nPos;
 }
 
-//void SvxColorTabPage::FillValueSet_Impl( ValueSet& rVs )
-//{
-//    long nCount = pColorList->Count();
-//    XColorEntry* pColorEntry;
-
-//    if( nCount > 104 )
-//        rVs.SetStyle( rVs.GetStyle() | WB_VSCROLL );
-
-//    for( long i = 0; i < nCount; i++ )
-//    {
-//        pColorEntry = pColorList->GetColor( i );
-//        rVs.InsertItem( i + 1, pColorEntry->GetColor(), 
pColorEntry->GetName() );
-//    }
-//}
-
-
 // A RGB value is converted to a CMYK value - not in an ideal way as
 // R is converted into C, G into M and B into Y. The K value is held in an
 // extra variable. For further color models one should develop own
@@ -1186,8 +859,6 @@ void SvxColorTabPage::SaveToViewFrame( SfxViewFrame 
*pViewFrame )
     if( !pColorList.is() )
         return;
 
-    pColorList->Save();
-
     if( !pViewFrame )
         return;
 
@@ -1222,4 +893,3 @@ void SvxColorTabPage::SetColorList( const XColorListRef& 
pColList )
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
-
diff --git a/cui/uiconfig/ui/colorpage.ui b/cui/uiconfig/ui/colorpage.ui
index bb9823f5..dd908c5 100644
--- a/cui/uiconfig/ui/colorpage.ui
+++ b/cui/uiconfig/ui/colorpage.ui
@@ -13,15 +13,10 @@
     <property name="step_increment">1</property>
     <property name="page_increment">10</property>
   </object>
-  <object class="GtkImage" id="image1">
+  <object class="GtkImage" id="image3">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
-    <property name="pixbuf">res/sc05501.png</property>
-  </object>
-  <object class="GtkImage" id="image2">
-    <property name="visible">True</property>
-    <property name="can_focus">False</property>
-    <property name="pixbuf">res/sc05502.png</property>
+    <property name="pixbuf">res/sc10350.png</property>
   </object>
   <object class="GtkBox" id="ColorPage">
     <property name="visible">True</property>
@@ -29,44 +24,119 @@
     <property name="hexpand">True</property>
     <property name="vexpand">True</property>
     <property name="border_width">6</property>
-    <property name="orientation">vertical</property>
+    <property name="spacing">6</property>
     <child>
       <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="label_xalign">0</property>
         <property name="shadow_type">none</property>
         <child>
           <object class="GtkAlignment" id="alignment1">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
-            <property name="hexpand">True</property>
-            <property name="vexpand">True</property>
             <property name="top_padding">6</property>
             <property name="left_padding">12</property>
             <child>
-              <object class="GtkBox" id="box2">
+              <object class="GtkGrid" id="grid2">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="hexpand">True</property>
-                <property name="vexpand">True</property>
-                <property name="spacing">12</property>
+                <property name="halign">start</property>
+                <property name="valign">start</property>
+                <property name="row_spacing">6</property>
                 <child>
-                  <object class="GtkGrid" id="grid2">
+                  <object class="GtkBox" id="box7">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="vexpand">True</property>
-                    <property name="row_spacing">6</property>
-                    <property name="column_spacing">12</property>
+                    <property name="orientation">vertical</property>
+                    <property name="spacing">3</property>
                     <child>
-                      <object class="GtkLabel" id="label6">
+                      <object class="GtkLabel" id="label21">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="xalign">0</property>
-                        <property name="label" 
translatable="yes">C_olor:</property>
-                        <property name="use_underline">True</property>
+                        <property name="yalign">0</property>
+                        <property name="label" translatable="yes">Palette 
:</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkComboBox" id="paletteselector">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
+                        <property name="position">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>
+                  <object class="GtkBox" id="box6">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="orientation">vertical</property>
+                    <property name="spacing">3</property>
+                    <child>
+                      <object class="GtkLabel" id="label20">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Recent 
Colors</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="svxcorelo-SvxColorValueSet" 
id="recentcolorset">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="vexpand">True</property>
+                  </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">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>
+                  <object class="GtkGrid" id="grid1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="column_spacing">3</property>
+                    <property name="column_homogeneous">True</property>
+                    <child>
+                      <object class="GtkButton" id="add">
+                        <property name="label">gtk-add</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="use_stock">True</property>
                       </object>
                       <packing>
                         <property name="left_attach">0</property>
@@ -76,10 +146,43 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="svxlo-ColorLB" id="colorlb">
+                      <object class="GtkRadioButton" id="RGB">
+                        <property name="label" 
translatable="yes">RGB</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="xalign">0</property>
+                        <property name="active">True</property>
+                        <property name="draw_indicator">True</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>
+                      <object class="GtkRadioButton" id="CMYK">
+                        <property name="label" 
translatable="yes">CMYK</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="xalign">0</property>
+                        <property name="active">True</property>
+                        <property name="draw_indicator">True</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="top_attach">1</property>
+                        <property name="width">1</property>
+                        <property name="height">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="delete">
+                        <property name="label" 
translatable="yes">Delete</property>
                         <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="halign">start</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
                       </object>
                       <packing>
                         <property name="left_attach">1</property>
@@ -88,40 +191,209 @@
                         <property name="height">1</property>
                       </packing>
                     </child>
+                  </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>
+                  <object class="GtkBox" id="box2">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="valign">start</property>
+                    <property name="orientation">vertical</property>
                     <child>
-                      <object class="GtkGrid" id="grid3">
+                      <object class="svxcorelo-SvxColorValueSet" id="colorset">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="vexpand">True</property>
+                  </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</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>
+            </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">Colors</property>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+            </attributes>
+          </object>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">True</property>
+        <property name="position">0</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkFrame" id="frame2">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="halign">start</property>
+        <property name="label_xalign">0</property>
+        <property name="shadow_type">none</property>
+        <child>
+          <object class="GtkAlignment" id="alignment2">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="top_padding">6</property>
+            <property name="left_padding">12</property>
+            <child>
+              <object class="GtkBox" id="box1">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="orientation">vertical</property>
+                <property name="spacing">12</property>
+                <child>
+                  <object class="GtkBox" id="box4">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="orientation">vertical</property>
+                    <child>
+                      <object class="svxlo-SvxXRectPreview" id="oldpreview">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
+                        <property name="hexpand">True</property>
                         <property name="vexpand">True</property>
-                        <property name="row_spacing">6</property>
-                        <child>
-                          <object class="GtkLabel" id="colortableft">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">Color 
table:</property>
+                        <child internal-child="accessible">
+                          <object class="AtkObject" id="oldpreview-atkobject">
+                            <property name="AtkObject::accessible-name" 
translatable="yes">Old Color</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="svxcorelo-SvxColorValueSet" 
id="colorset">
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkGrid" id="rgbpreset">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">center</property>
+                    <property name="valign">start</property>
+                    <property name="vexpand">True</property>
+                    <property name="row_spacing">6</property>
+                    <property name="column_spacing">6</property>
+                    <child>
+                      <object class="GtkLabel" id="label7">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">B</property>
+                        <property name="use_underline">True</property>
+                        <property name="mnemonic_widget">B_custom</property>
+                      </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>
+                      <object class="GtkLabel" id="label8">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">G</property>
+                        <property name="use_underline">True</property>
+                        <property name="mnemonic_widget">G_custom</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>
+                      <object class="GtkLabel" id="label9">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">R</property>
+                        <property name="use_underline">True</property>
+                        <property name="mnemonic_widget">R_custom</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="label18">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" 
translatable="yes">Hex</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>
+                      <object class="svxcorelo-HexColorControl" 
id="hex_preset">
+                            <property name="width_request">6</property>
                             <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="hexpand">True</property>
-                            <property name="vexpand">True</property>
+                            <property name="can_focus">True</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>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="top_attach">3</property>
+                        <property name="width">1</property>
+                        <property name="height">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkSpinButton" id="R_preset-nospin">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="adjustment">adjustment2</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="GtkSpinButton" id="G_preset-nospin">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="adjustment">adjustment2</property>
                       </object>
                       <packing>
                         <property name="left_attach">1</property>
@@ -131,25 +403,197 @@
                       </packing>
                     </child>
                     <child>
-                      <placeholder/>
+                      <object class="GtkSpinButton" id="B_preset-nospin">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="adjustment">adjustment2</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="top_attach">2</property>
+                        <property name="width">1</property>
+                        <property name="height">1</property>
+                      </packing>
                     </child>
                   </object>
                   <packing>
                     <property name="expand">False</property>
-                    <property name="fill">False</property>
-                    <property name="position">0</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkGrid" id="grid1">
-                    <property name="visible">True</property>
+                  <object class="GtkGrid" id="cmykpreset">
                     <property name="can_focus">False</property>
                     <property name="halign">center</property>
                     <property name="valign">start</property>
-                    <property name="hexpand">True</property>
+                    <property name="vexpand">True</property>
                     <property name="row_spacing">6</property>
                     <property name="column_spacing">6</property>
                     <child>
+                      <object class="GtkLabel" id="label10">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">_C</property>
+                        <property name="use_underline">True</property>
+                        <property name="mnemonic_widget">C_custom:0%</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="label16">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">_K</property>
+                        <property name="use_underline">True</property>
+                        <property name="mnemonic_widget">K_custom: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>
+                      <object class="GtkLabel" id="label17">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">_Y</property>
+                        <property name="use_underline">True</property>
+                      </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>
+                      <object class="GtkSpinButton" id="C_preset-nospin:0%">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="adjustment">adjustment1</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="GtkSpinButton" id="M_preset-nospin:0%">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="adjustment">adjustment1</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="top_attach">1</property>
+                        <property name="width">1</property>
+                        <property name="height">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkSpinButton" id="Y_preset-nospin:0%">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="adjustment">adjustment1</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="top_attach">2</property>
+                        <property name="width">1</property>
+                        <property name="height">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkSpinButton" id="K_preset-nospin:0%">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="adjustment">adjustment1</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="top_attach">3</property>
+                        <property name="width">1</property>
+                        <property name="height">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="label15">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">_M</property>
+                        <property name="use_underline">True</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>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+          </object>
+        </child>
+        <child type="label">
+          <object class="GtkLabel" id="label5">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">Active</property>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+            </attributes>
+          </object>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">True</property>
+        <property name="fill">True</property>
+        <property name="position">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkFrame" id="frame3">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="halign">start</property>
+        <property name="label_xalign">0</property>
+        <property name="shadow_type">none</property>
+        <child>
+          <object class="GtkAlignment" id="alignment3">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="top_padding">6</property>
+            <property name="left_padding">12</property>
+            <child>
+              <object class="GtkBox" id="box3">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="valign">start</property>
+                <property name="orientation">vertical</property>
+                <property name="spacing">12</property>
+                <child>
+                  <object class="GtkBox" id="box5">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="orientation">vertical</property>
+                    <child>
                       <object class="svxlo-SvxXRectPreview" id="newpreview">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
@@ -162,23 +606,77 @@
                         </child>
                       </object>
                       <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkGrid" id="rgbcustom">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">center</property>
+                    <property name="valign">start</property>
+                    <property name="vexpand">True</property>
+                    <property name="row_spacing">6</property>
+                    <property name="column_spacing">6</property>
+                    <child>
+                      <object class="GtkSpinButton" id="B_custom">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="invisible_char">•</property>
+                        <property name="adjustment">adjustment2</property>
+                      </object>
+                      <packing>
                         <property name="left_attach">1</property>
-                        <property name="top_attach">1</property>
+                        <property name="top_attach">2</property>
                         <property name="width">1</property>
                         <property name="height">1</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="svxlo-SvxXRectPreview" id="oldpreview">
+                      <object class="GtkSpinButton" id="R_custom">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="invisible_char">•</property>
+                        <property name="adjustment">adjustment2</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="GtkLabel" id="label4">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="hexpand">True</property>
-                        <property name="vexpand">True</property>
-                        <child internal-child="accessible">
-                          <object class="AtkObject" id="oldpreview-atkobject">
-                            <property name="AtkObject::accessible-name" 
translatable="yes">Old Color</property>
-                          </object>
-                        </child>
+                        <property name="label" translatable="yes">_B</property>
+                        <property name="use_underline">True</property>
+                        <property name="mnemonic_widget">B_custom</property>
+                      </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>
+                      <object class="GtkLabel" id="label3">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">_G</property>
+                        <property name="use_underline">True</property>
+                        <property name="mnemonic_widget">G_custom</property>
                       </object>
                       <packing>
                         <property name="left_attach">0</property>
@@ -188,13 +686,12 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkRadioButton" id="RGB">
-                        <property name="label" 
translatable="yes">RGB</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="xalign">0</property>
-                        <property name="active">True</property>
-                        <property name="draw_indicator">True</property>
+                      <object class="GtkLabel" id="label2">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">_R</property>
+                        <property name="use_underline">True</property>
+                        <property name="mnemonic_widget">R_custom</property>
                       </object>
                       <packing>
                         <property name="left_attach">0</property>
@@ -204,275 +701,38 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkRadioButton" id="CMYK">
-                        <property name="label" 
translatable="yes">CMYK</property>
+                      <object class="GtkSpinButton" id="G_custom">
+                        <property name="visible">True</property>
                         <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="xalign">0</property>
-                        <property name="active">True</property>
-                        <property name="draw_indicator">True</property>
+                        <property name="invisible_char">•</property>
+                        <property name="adjustment">adjustment2</property>
                       </object>
                       <packing>
                         <property name="left_attach">1</property>
-                        <property name="top_attach">0</property>
+                        <property name="top_attach">1</property>
                         <property name="width">1</property>
                         <property name="height">1</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkGrid" id="rgbcustom">
+                      <object class="GtkLabel" id="label19">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="halign">end</property>
-                        <property name="valign">start</property>
-                        <property name="row_spacing">6</property>
-                        <property name="column_spacing">6</property>
-                        <property name="row_homogeneous">True</property>
-                        <child>
-                          <object class="GtkSpinButton" id="B_custom">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="invisible_char">•</property>
-                            <property name="adjustment">adjustment2</property>
-                          </object>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="top_attach">2</property>
-                            <property name="width">1</property>
-                            <property name="height">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkSpinButton" id="R_custom">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="invisible_char">•</property>
-                            <property name="adjustment">adjustment2</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="GtkLabel" id="label4">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="label" 
translatable="yes">_B</property>
-                            <property name="use_underline">True</property>
-                            <property 
name="mnemonic_widget">B_custom</property>
-                          </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>
-                          <object class="GtkLabel" id="label3">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="label" 
translatable="yes">_G</property>
-                            <property name="use_underline">True</property>
-                            <property 
name="mnemonic_widget">G_custom</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>
-                          <object class="GtkLabel" id="label2">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="label" 
translatable="yes">_R</property>
-                            <property name="use_underline">True</property>
-                            <property 
name="mnemonic_widget">R_custom</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="GtkSpinButton" id="G_custom">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="invisible_char">•</property>
-                            <property name="adjustment">adjustment2</property>
-                          </object>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="top_attach">1</property>
-                            <property name="width">1</property>
-                            <property name="height">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel" id="label19">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="label" 
translatable="yes">_Hex</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>
-                          <object class="svxcorelo-HexColorControl" 
id="hex_custom">
-                            <property name="width_request">6</property>
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                          </object>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="top_attach">3</property>
-                            <property name="width">1</property>
-                            <property name="height">1</property>
-                          </packing>
-                        </child>
+                        <property name="label" 
translatable="yes">_Hex</property>
                       </object>
                       <packing>
-                        <property name="left_attach">1</property>
-                        <property name="top_attach">2</property>
+                        <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>
-                      <object class="GtkGrid" id="cmykcustom">
-                        <property name="can_focus">False</property>
-                        <property name="no_show_all">True</property>
-                        <property name="halign">end</property>
-                        <property name="valign">start</property>
-                        <property name="row_spacing">6</property>
-                        <property name="column_spacing">6</property>
-                        <property name="row_homogeneous">True</property>
-                        <child>
-                          <object class="GtkLabel" id="label11">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="label" 
translatable="yes">_C</property>
-                            <property name="use_underline">True</property>
-                            <property 
name="mnemonic_widget">C_custom:0%</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="label12">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="label" 
translatable="yes">_M</property>
-                            <property name="use_underline">True</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>
-                          <object class="GtkLabel" id="label13">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="label" 
translatable="yes">_K</property>
-                            <property name="use_underline">True</property>
-                            <property 
name="mnemonic_widget">K_custom: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>
-                          <object class="GtkSpinButton" id="C_custom:0%">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="invisible_char">•</property>
-                            <property name="adjustment">adjustment1</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="GtkSpinButton" id="K_custom:0%">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="invisible_char">•</property>
-                            <property name="adjustment">adjustment1</property>
-                          </object>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="top_attach">3</property>
-                            <property name="width">1</property>
-                            <property name="height">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel" id="label14">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="label" 
translatable="yes">_Y</property>
-                            <property name="use_underline">True</property>
-                          </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>
-                          <object class="GtkSpinButton" id="M_custom:0%">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="invisible_char">•</property>
-                            <property name="adjustment">adjustment1</property>
-                          </object>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="top_attach">1</property>
-                            <property name="width">1</property>
-                            <property name="height">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkSpinButton" id="Y_custom:0%">
+                      <object class="svxcorelo-HexColorControl" 
id="hex_custom">
+                            <property name="width_request">6</property>
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
-                            <property name="invisible_char">•</property>
-                            <property name="adjustment">adjustment1</property>
                           </object>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="top_attach">2</property>
-                            <property name="width">1</property>
-                            <property name="height">1</property>
-                          </packing>
-                        </child>
-                      </object>
                       <packing>
                         <property name="left_attach">1</property>
                         <property name="top_attach">3</property>
@@ -480,432 +740,168 @@
                         <property name="height">1</property>
                       </packing>
                     </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkGrid" id="cmykcustom">
+                    <property name="can_focus">False</property>
+                    <property name="no_show_all">True</property>
+                    <property name="halign">center</property>
+                    <property name="valign">start</property>
+                    <property name="vexpand">True</property>
+                    <property name="row_spacing">6</property>
+                    <property name="column_spacing">6</property>
                     <child>
-                      <object class="GtkGrid" id="cmykpreset">
+                      <object class="GtkLabel" id="label11">
+                        <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="halign">end</property>
-                        <property name="valign">start</property>
-                        <property name="row_spacing">6</property>
-                        <property name="column_spacing">6</property>
-                        <property name="row_homogeneous">True</property>
-                        <child>
-                          <object class="GtkLabel" id="label10">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="label" 
translatable="yes">_C</property>
-                            <property name="use_underline">True</property>
-                            <property 
name="mnemonic_widget">C_custom:0%</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="label15">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="label" 
translatable="yes">_M</property>
-                            <property name="use_underline">True</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>
-                          <object class="GtkLabel" id="label16">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="label" 
translatable="yes">_K</property>
-                            <property name="use_underline">True</property>
-                            <property 
name="mnemonic_widget">K_custom: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>
-                          <object class="GtkLabel" id="label17">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="label" 
translatable="yes">_Y</property>
-                            <property name="use_underline">True</property>
-                          </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>
-                          <object class="GtkSpinButton" 
id="C_preset-nospin:0%">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="adjustment">adjustment1</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="GtkSpinButton" 
id="M_preset-nospin:0%">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="adjustment">adjustment1</property>
-                          </object>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="top_attach">1</property>
-                            <property name="width">1</property>
-                            <property name="height">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkSpinButton" 
id="Y_preset-nospin:0%">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="adjustment">adjustment1</property>
-                          </object>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="top_attach">2</property>
-                            <property name="width">1</property>
-                            <property name="height">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkSpinButton" 
id="K_preset-nospin:0%">

... etc. - the rest is truncated
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to