convert gallery theme properties dialog to .ui

Change-Id: I32c3be9e12d1b3dafa0dc9876657844bd77c9e95
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index 174b243..8679be2 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -44,6 +44,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
	cui/uiconfig/ui/effectspage \
	cui/uiconfig/ui/formatcellsdialog \
	cui/uiconfig/ui/gallerysearchprogress \
	cui/uiconfig/ui/gallerythemedialog \
	cui/uiconfig/ui/gallerythemeiddialog \
	cui/uiconfig/ui/gallerytitledialog \
	cui/uiconfig/ui/hangulhanjaadddialog \
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index b49e8a5..ea9afc1 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -589,17 +589,19 @@ IMPL_LINK_NOARG(GalleryIdDialog, ClickOkHdl)
// - GalleryThemeProperties -
// --------------------------

GalleryThemeProperties::GalleryThemeProperties( Window* pParent, ExchangeData* _pData, SfxItemSet* pItemSet  ) :
            SfxTabDialog    ( pParent, CUI_RES( RID_SVXTABDLG_GALLERYTHEME ), pItemSet ),
            pData           ( _pData )
GalleryThemeProperties::GalleryThemeProperties(Window* pParent,
    ExchangeData* _pData, SfxItemSet* pItemSet)
    : SfxTabDialog( pParent, "GalleryThemeDialog",
        "cui/ui/gallerythemedialog.ui", pItemSet)
    , pData(_pData)
    , m_nGeneralPageId(0)
    , m_nFilesPageId(0)
{
    FreeResource();

    AddTabPage( RID_SVXTABPAGE_GALLERY_GENERAL, TPGalleryThemeGeneral::Create, 0 );
    AddTabPage( RID_SVXTABPAGE_GALLERYTHEME_FILES, TPGalleryThemeProperties::Create, 0 );
    m_nGeneralPageId = AddTabPage("general", TPGalleryThemeGeneral::Create, 0);
    m_nFilesPageId = AddTabPage("files", TPGalleryThemeProperties::Create, 0);

    if( pData->pTheme->IsReadOnly() )
        RemoveTabPage( RID_SVXTABPAGE_GALLERYTHEME_FILES );
        RemoveTabPage(m_nFilesPageId);

    OUString aText( GetText() );

@@ -615,7 +617,7 @@ GalleryThemeProperties::GalleryThemeProperties( Window* pParent, ExchangeData* _

void GalleryThemeProperties::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
    if( RID_SVXTABPAGE_GALLERY_GENERAL == nId )
    if (nId == m_nGeneralPageId)
        ( (TPGalleryThemeGeneral&) rPage ).SetXChgData( pData );
    else
        ( (TPGalleryThemeProperties&) rPage ).SetXChgData( pData );
diff --git a/cui/source/dialogs/gallery.src b/cui/source/dialogs/gallery.src
index a80d604..d1a7413 100644
--- a/cui/source/dialogs/gallery.src
+++ b/cui/source/dialogs/gallery.src
@@ -24,30 +24,6 @@

#define MASKCOLOR MaskColor = Color { Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; };

TabDialog RID_SVXTABDLG_GALLERYTHEME
{
    OutputSize = TRUE ;
    SVLook = TRUE ;
    Text [ en-US ] = "Properties of " ;
    Moveable = TRUE ;
    TabControl 1
    {
        OutputSize = TRUE ;
        PageList =
        {
            PageItem
            {
                Identifier = RID_SVXTABPAGE_GALLERY_GENERAL ;
                Text [ en-US ] = "General" ;
            };
            PageItem
            {
                Identifier = RID_SVXTABPAGE_GALLERYTHEME_FILES ;
                Text [ en-US ] = "Files" ;
            };
        };
    };
};

/******************************************************************************/

diff --git a/cui/source/inc/cuigaldlg.hxx b/cui/source/inc/cuigaldlg.hxx
index 2e8d829..eb242ef 100644
--- a/cui/source/inc/cuigaldlg.hxx
+++ b/cui/source/inc/cuigaldlg.hxx
@@ -197,12 +197,13 @@ class GalleryThemeProperties : public SfxTabDialog
{
    ExchangeData*   pData;

    virtual void    PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
    sal_uInt16 m_nGeneralPageId;
    sal_uInt16 m_nFilesPageId;

    virtual void PageCreated(sal_uInt16 nId, SfxTabPage &rPage);

public:

                    GalleryThemeProperties( Window* pParent, ExchangeData* pData, SfxItemSet* pItemSet  );
                    ~GalleryThemeProperties() {}
    GalleryThemeProperties(Window* pParent, ExchangeData* pData, SfxItemSet* pItemSet);
};

class TPGalleryThemeGeneral : public SfxTabPage
diff --git a/cui/source/inc/gallery.hrc b/cui/source/inc/gallery.hrc
index 61b038a..e255e75 100644
--- a/cui/source/inc/gallery.hrc
+++ b/cui/source/inc/gallery.hrc
@@ -18,9 +18,7 @@
 */
#include <cuires.hrc>

// Gallery TabDialogs/TabPages
#define RID_SVXTABDLG_GALLERYTHEME              (RID_CUI_GALLERY_START + 2)

// Gallery TabPages
#define RID_SVXTABPAGE_GALLERY_GENERAL          (RID_CUI_GALLERY_START + 1)
#define RID_SVXTABPAGE_GALLERYTHEME_FILES       (RID_CUI_GALLERY_START + 4)

diff --git a/cui/uiconfig/ui/gallerythemedialog.ui b/cui/uiconfig/ui/gallerythemedialog.ui
new file mode 100644
index 0000000..8fe89d4
--- /dev/null
+++ b/cui/uiconfig/ui/gallerythemedialog.ui
@@ -0,0 +1,133 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
  <!-- interface-requires gtk+ 3.0 -->
  <object class="GtkDialog" id="GalleryThemeDialog">
    <property name="can_focus">False</property>
    <property name="border_width">6</property>
    <property name="title" translatable="yes">Properties of </property>
    <property name="type_hint">dialog</property>
    <child internal-child="vbox">
      <object class="GtkBox" id="dialog-vbox1">
        <property name="can_focus">False</property>
        <property name="orientation">vertical</property>
        <property name="spacing">12</property>
        <child internal-child="action_area">
          <object class="GtkButtonBox" id="dialog-action_area1">
            <property name="can_focus">False</property>
            <property name="layout_style">end</property>
            <child>
              <object class="GtkButton" id="ok">
                <property name="label">gtk-ok</property>
                <property name="visible">True</property>
                <property name="can_focus">True</property>
                <property name="can_default">True</property>
                <property name="has_default">True</property>
                <property name="receives_default">True</property>
                <property name="use_stock">True</property>
              </object>
              <packing>
                <property name="expand">False</property>
                <property name="fill">True</property>
                <property name="position">0</property>
              </packing>
            </child>
            <child>
              <object class="GtkButton" id="cancel">
                <property name="label">gtk-cancel</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="expand">False</property>
                <property name="fill">True</property>
                <property name="position">1</property>
              </packing>
            </child>
            <child>
              <object class="GtkButton" id="help">
                <property name="label">gtk-help</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="expand">False</property>
                <property name="fill">True</property>
                <property name="position">2</property>
              </packing>
            </child>
            <child>
              <object class="GtkButton" id="reset">
                <property name="label">gtk-revert-to-saved</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="expand">False</property>
                <property name="fill">True</property>
                <property name="position">3</property>
              </packing>
            </child>
          </object>
          <packing>
            <property name="expand">False</property>
            <property name="fill">True</property>
            <property name="pack_type">end</property>
            <property name="position">0</property>
          </packing>
        </child>
        <child>
          <object class="GtkNotebook" id="tabcontrol">
            <property name="visible">True</property>
            <property name="can_focus">True</property>
            <property name="hexpand">True</property>
            <property name="vexpand">True</property>
            <child>
              <placeholder/>
            </child>
            <child type="tab">
              <object class="GtkLabel" id="general">
                <property name="visible">True</property>
                <property name="can_focus">False</property>
                <property name="label" translatable="yes">General</property>
              </object>
              <packing>
                <property name="tab_fill">False</property>
              </packing>
            </child>
            <child>
              <placeholder/>
            </child>
            <child type="tab">
              <object class="GtkLabel" id="files">
                <property name="visible">True</property>
                <property name="can_focus">False</property>
                <property name="label" translatable="yes">Files</property>
              </object>
              <packing>
                <property name="position">1</property>
                <property name="tab_fill">False</property>
              </packing>
            </child>
          </object>
          <packing>
            <property name="expand">False</property>
            <property name="fill">True</property>
            <property name="position">1</property>
          </packing>
        </child>
      </object>
    </child>
    <action-widgets>
      <action-widget response="0">ok</action-widget>
      <action-widget response="0">cancel</action-widget>
      <action-widget response="0">help</action-widget>
      <action-widget response="0">reset</action-widget>
    </action-widgets>
  </object>
</interface>