[Libreoffice-commits] core.git: cui/source cui/uiconfig cui/UIConfig_cui.mk

Caolán McNamara caolanm at redhat.com
Sun Feb 2 02:46:23 PST 2014


 cui/UIConfig_cui.mk                  |    1 
 cui/source/inc/cuires.hrc            |    5 
 cui/source/inc/helpid.hrc            |    2 
 cui/source/inc/optlingu.hxx          |   24 +--
 cui/source/options/optlingu.cxx      |  161 +++++++++------------
 cui/source/options/optlingu.hrc      |   45 ------
 cui/source/options/optlingu.src      |  114 +--------------
 cui/uiconfig/ui/editmodulesdialog.ui |  257 +++++++++++++++++++++++++++++++++++
 8 files changed, 357 insertions(+), 252 deletions(-)

New commits:
commit e1ce4f050a164480917dd69b2008bcc5c4259b15
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Feb 2 10:22:22 2014 +0000

    convert edit modules dialog to .ui
    
    Change-Id: Ic9d06ff7ae5c1f5f9b50732943c38b8666680b9d

diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index 6f43adc..397b2a0 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -39,6 +39,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
 	cui/uiconfig/ui/cuiimapdlg \
 	cui/uiconfig/ui/dimensionlinestabpage \
 	cui/uiconfig/ui/editdictionarydialog \
+	cui/uiconfig/ui/editmodulesdialog \
 	cui/uiconfig/ui/embossdialog \
 	cui/uiconfig/ui/eventassigndialog \
 	cui/uiconfig/ui/eventassignpage \
diff --git a/cui/source/inc/cuires.hrc b/cui/source/inc/cuires.hrc
index f3580e6..292287d 100644
--- a/cui/source/inc/cuires.hrc
+++ b/cui/source/inc/cuires.hrc
@@ -151,7 +151,6 @@
 #define RID_SVXDLG_JAVA_CLASSPATH           (RID_SVX_START + 255)
 #define RID_SVXERR_JRE_NOT_RECOGNIZED       (RID_SVX_START + 256)
 #define RID_SVXERR_JRE_FAILED_VERSION       (RID_SVX_START + 257)
-#define RID_SVXDLG_EDIT_MODULES             (RID_SVX_START +  831)
 #define RID_SVXSTR_PATH_NAME_START          (RID_SVX_START + 1003)
 #define RID_SVXBMP_LOCK                     (RID_SVX_START + 118)
 #define RID_SVXSTR_READONLY_CONFIG_TIP      (RID_SVX_START + 1026)
@@ -441,6 +440,10 @@
 #define RID_SVXSTR_CHG_SMARTART                             (RID_SVX_START + 1251)
 
 #define RID_SVXSTR_PPI                                      (RID_SVX_START + 1252)
+#define RID_SVXSTR_SPELL                                    (RID_SVX_START + 1253)
+#define RID_SVXSTR_HYPH                                     (RID_SVX_START + 1254)
+#define RID_SVXSTR_THES                                     (RID_SVX_START + 1255)
+#define RID_SVXSTR_GRAMMAR                                  (RID_SVX_START + 1256)
 
 #endif
 
diff --git a/cui/source/inc/helpid.hrc b/cui/source/inc/helpid.hrc
index df92b8a..2f11a84 100644
--- a/cui/source/inc/helpid.hrc
+++ b/cui/source/inc/helpid.hrc
@@ -26,8 +26,6 @@
 
 #define HID_OPTIONS_LINGU "CUI_HID_OPTIONS_LINGU"
 #define HID_OPTIONS_DICT_EDIT "CUI_HID_OPTIONS_DICT_EDIT"
-#define HID_CLB_EDIT_MODULES_MODULES "CUI_HID_CLB_EDIT_MODULES_MODULES"
-#define HID_EDIT_MODULES "CUI_HID_EDIT_MODULES"
 #define HID_OPTIONS_COLORCONFIG_SAVE_SCHEME "CUI_HID_OPTIONS_COLORCONFIG_SAVE_SCHEME"
 #define HID_OFADLG_OPTIONS_TREE "CUI_HID_OFADLG_OPTIONS_TREE"
 #define UID_OFA_CONNPOOL_DRIVERLIST_BACK "CUI_UID_OFA_CONNPOOL_DRIVERLIST_BACK"
diff --git a/cui/source/inc/optlingu.hxx b/cui/source/inc/optlingu.hxx
index 299ae12..52bcac4 100644
--- a/cui/source/inc/optlingu.hxx
+++ b/cui/source/inc/optlingu.hxx
@@ -52,19 +52,15 @@ class SvxLinguData_Impl;
 
 class SvxEditModulesDlg : public ModalDialog
 {
-    FixedLine           aModulesFL;
-    FixedText           aLanguageFT;
-    SvxLanguageBox      aLanguageLB;
+    SvxLanguageBox*     m_pLanguageLB;
 
-    SvxCheckListBox     aModulesCLB;
-    PushButton          aPrioUpPB;
-    PushButton          aPrioDownPB;
-    PushButton          aBackPB;
-    FixedHyperlink      aMoreDictsLink;
+    SvxCheckListBox*    m_pModulesCLB;
+    PushButton*         m_pPrioUpPB;
+    PushButton*         m_pPrioDownPB;
+    PushButton*         m_pBackPB;
+    FixedHyperlink*     m_pMoreDictsLink;
 
-    FixedLine           aButtonsFL;
-    HelpButton          aHelpPB;
-    OKButton            aClosePB;
+    CloseButton*        m_pClosePB;
 
     OUString            sSpell;
     OUString            sHyph;
@@ -78,9 +74,9 @@ class SvxEditModulesDlg : public ModalDialog
 
     SvTreeListEntry*    CreateEntry(OUString& rTxt, sal_uInt16 nCol);
 
-    DECL_LINK( SelectHdl_Impl, SvxCheckListBox * );
-    DECL_LINK( UpDownHdl_Impl, PushButton * );
-    DECL_LINK( ClickHdl_Impl, PushButton * );
+    DECL_LINK(SelectHdl_Impl, SvxCheckListBox *);
+    DECL_LINK(UpDownHdl_Impl, PushButton *);
+    DECL_LINK(ClickHdl_Impl, void *);
     DECL_LINK(BackHdl_Impl, void *);
     DECL_LINK( SelectHdlLB_Impl, ListBox * );
     DECL_LINK( LangSelectHdl_Impl, ListBox* );
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index 20c7974..16b891b 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -55,7 +55,6 @@
 #include <svl/intitem.hxx>
 #include <sfx2/viewfrm.hxx>
 #include <vcl/svapp.hxx>
-#include "optlingu.hrc"
 
 #include <svx/svxdlg.hxx>
 #include <editeng/optitems.hxx>
@@ -1113,8 +1112,6 @@ SvxLinguTabPage::SvxLinguTabPage( Window* pParent, const SfxItemSet& rSet ) :
     if ( SvtExtendedSecurityOptions().GetOpenHyperlinkMode()
             != SvtExtendedSecurityOptions::OPEN_NEVER )
     {
-        m_pMoreDictsLink->SetURL( OUString(
-             "http://extensions.libreoffice.org/dictionaries/"  ) );
         m_pMoreDictsLink->SetClickHdl( LINK( this, SvxLinguTabPage, OpenURLHdl_Impl ) );
     }
     else
@@ -1876,63 +1873,55 @@ void SvxLinguTabPage::HideGroups( sal_uInt16 nGrp )
     }
 }
 
-SvxEditModulesDlg::SvxEditModulesDlg(Window* pParent, SvxLinguData_Impl& rData) :
-    ModalDialog( pParent, CUI_RES(RID_SVXDLG_EDIT_MODULES ) ),
-    aModulesFL      ( this, CUI_RES( FL_EDIT_MODULES_OPTIONS ) ),
-    aLanguageFT     ( this, CUI_RES( FT_EDIT_MODULES_LANGUAGE ) ),
-    aLanguageLB     ( this, CUI_RES( LB_EDIT_MODULES_LANGUAGE ), sal_False ),
-    aModulesCLB     ( this, CUI_RES( CLB_EDIT_MODULES_MODULES ) ),
-    aPrioUpPB       ( this, CUI_RES( PB_EDIT_MODULES_PRIO_UP ) ),
-    aPrioDownPB     ( this, CUI_RES( PB_EDIT_MODULES_PRIO_DOWN ) ),
-    aBackPB         ( this, CUI_RES( PB_EDIT_MODULES_PRIO_BACK ) ),
-    aMoreDictsLink  ( this, CUI_RES( FT_EDIT_MODULES_NEWDICTSLINK ) ),
-    aButtonsFL      ( this, CUI_RES( FL_EDIT_MODULES_BUTTONS ) ),
-    aHelpPB         ( this, CUI_RES( PB_HELP ) ),
-    aClosePB        ( this, CUI_RES( PB_OK ) ),
-    sSpell          (       CUI_RES( ST_SPELL ) ),
-    sHyph           (       CUI_RES( ST_HYPH ) ),
-    sThes           (       CUI_RES( ST_THES ) ),
-    sGrammar        (       CUI_RES( ST_GRAMMAR ) ),
-    rLinguData      ( rData )
+SvxEditModulesDlg::SvxEditModulesDlg(Window* pParent, SvxLinguData_Impl& rData)
+    : ModalDialog( pParent, "EditModulesDialog",
+        "cui/ui/editmodulesdialog.ui")
+    , sSpell(CUI_RES(RID_SVXSTR_SPELL))
+    , sHyph(CUI_RES(RID_SVXSTR_HYPH))
+    , sThes(CUI_RES(RID_SVXSTR_THES))
+    , sGrammar(CUI_RES(RID_SVXSTR_GRAMMAR))
+    , rLinguData(rData)
 {
+    get(m_pClosePB, "close");
+    get(m_pMoreDictsLink, "moredictslink");
+    get(m_pBackPB, "back");
+    get(m_pPrioDownPB, "down");
+    get(m_pPrioUpPB, "up");
+    get(m_pModulesCLB, "lingudicts");
+    Size aListSize(m_pModulesCLB->LogicToPixel(Size(166, 120), MAP_APPFONT));
+    m_pModulesCLB->set_height_request(aListSize.Height());
+    m_pModulesCLB->set_width_request(aListSize.Width());
+    get(m_pLanguageLB, "language");
+    m_pLanguageLB->SetStyle(m_pLanguageLB->GetStyle() | WB_SORT);
+
     pCheckButtonData = NULL;
-    FreeResource();
 
     pDefaultLinguData = new SvxLinguData_Impl( rLinguData );
 
-    aModulesCLB.SetStyle( aModulesCLB.GetStyle()|WB_CLIPCHILDREN|WB_HSCROLL|WB_FORCE_MAKEVISIBLE );
-    aModulesCLB.SetHighlightRange();
-    aModulesCLB.SetHelpId(HID_CLB_EDIT_MODULES_MODULES );
-    aModulesCLB.SetSelectHdl( LINK( this, SvxEditModulesDlg, SelectHdl_Impl ));
-    aModulesCLB.SetCheckButtonHdl( LINK( this, SvxEditModulesDlg, BoxCheckButtonHdl_Impl) );
+    m_pModulesCLB->SetStyle( m_pModulesCLB->GetStyle()|WB_CLIPCHILDREN|WB_HSCROLL|WB_FORCE_MAKEVISIBLE );
+    m_pModulesCLB->SetHighlightRange();
+    m_pModulesCLB->SetSelectHdl( LINK( this, SvxEditModulesDlg, SelectHdl_Impl ));
+    m_pModulesCLB->SetCheckButtonHdl( LINK( this, SvxEditModulesDlg, BoxCheckButtonHdl_Impl) );
 
-    aClosePB   .SetClickHdl( LINK( this, SvxEditModulesDlg, ClickHdl_Impl ));
-    aPrioUpPB  .SetClickHdl( LINK( this, SvxEditModulesDlg, UpDownHdl_Impl ));
-    aPrioDownPB.SetClickHdl( LINK( this, SvxEditModulesDlg, UpDownHdl_Impl ));
-    aBackPB    .SetClickHdl( LINK( this, SvxEditModulesDlg, BackHdl_Impl ));
+    m_pClosePB->SetClickHdl( LINK( this, SvxEditModulesDlg, ClickHdl_Impl ));
+    m_pPrioUpPB->SetClickHdl( LINK( this, SvxEditModulesDlg, UpDownHdl_Impl ));
+    m_pPrioDownPB->SetClickHdl( LINK( this, SvxEditModulesDlg, UpDownHdl_Impl ));
+    m_pBackPB->SetClickHdl( LINK( this, SvxEditModulesDlg, BackHdl_Impl ));
     // in case of not installed language modules
-    aPrioUpPB  .Enable( false );
-    aPrioDownPB.Enable( false );
+    m_pPrioUpPB->Enable( false );
+    m_pPrioDownPB->Enable( false );
 
     if ( SvtExtendedSecurityOptions().GetOpenHyperlinkMode()
             != SvtExtendedSecurityOptions::OPEN_NEVER )
     {
-        aMoreDictsLink.SetURL( OUString(
-             "http://extensions.libreoffice.org/dictionaries/" ) );
-        aMoreDictsLink.SetClickHdl( LINK( this, SvxEditModulesDlg, OpenURLHdl_Impl ) );
+        m_pMoreDictsLink->SetClickHdl( LINK( this, SvxEditModulesDlg, OpenURLHdl_Impl ) );
     }
     else
     {
-        aMoreDictsLink.Hide();
-        long nPos = aMoreDictsLink.GetPosPixel().Y() + aMoreDictsLink.GetSizePixel().Height();
-        Size aSize = aModulesCLB.GetSizePixel();
-        aSize.Height() += ( nPos - ( aModulesCLB.GetPosPixel().Y() + aSize.Height() ) );
-        aModulesCLB.SetSizePixel( aSize );
+        m_pMoreDictsLink->Hide();
     }
 
-    //
     //fill language box
-    //
     Sequence< sal_Int16 > aAvailLang;
     uno::Reference< XAvailableLocales > xAvail( rLinguData.GetManager(), UNO_QUERY );
     if (xAvail.is())
@@ -1942,19 +1931,19 @@ SvxEditModulesDlg::SvxEditModulesDlg(Window* pParent, SvxLinguData_Impl& rData)
     }
     const Sequence< Locale >& rLoc = rLinguData.GetAllSupportedLocales();
     const Locale* pLocales = rLoc.getConstArray();
-    aLanguageLB.Clear();
+    m_pLanguageLB->Clear();
     for(long i = 0; i < rLoc.getLength(); i++)
     {
         sal_Int16 nLang = LanguageTag::convertToLanguageType( pLocales[i] );
-        aLanguageLB.InsertLanguage( nLang, lcl_SeqHasLang( aAvailLang, nLang ) );
+        m_pLanguageLB->InsertLanguage( nLang, lcl_SeqHasLang( aAvailLang, nLang ) );
     }
     LanguageType eSysLang = MsLangId::getSystemLanguage();
-    aLanguageLB.SelectLanguage( eSysLang );
-    if(!aLanguageLB.IsLanguageSelected( eSysLang ) )
-        aLanguageLB.SelectEntryPos(0);
+    m_pLanguageLB->SelectLanguage( eSysLang );
+    if(!m_pLanguageLB->IsLanguageSelected( eSysLang ) )
+        m_pLanguageLB->SelectEntryPos(0);
 
-    aLanguageLB.SetSelectHdl( LINK( this, SvxEditModulesDlg, LangSelectHdl_Impl ));
-    LangSelectHdl_Impl(&aLanguageLB);
+    m_pLanguageLB->SetSelectHdl( LINK( this, SvxEditModulesDlg, LangSelectHdl_Impl ));
+    LangSelectHdl_Impl(m_pLanguageLB);
 }
 
 
@@ -1969,8 +1958,8 @@ SvTreeListEntry* SvxEditModulesDlg::CreateEntry( OUString& rTxt, sal_uInt16 nCol
     SvTreeListEntry* pEntry = new SvTreeListEntry;
     if( !pCheckButtonData )
     {
-        pCheckButtonData = new SvLBoxButtonData( &aModulesCLB );
-        pCheckButtonData->SetLink( aModulesCLB.GetCheckButtonHdl() );
+        pCheckButtonData = new SvLBoxButtonData(m_pModulesCLB);
+        pCheckButtonData->SetLink( m_pModulesCLB->GetCheckButtonHdl() );
     }
 
     OUString sEmpty;
@@ -1986,7 +1975,7 @@ SvTreeListEntry* SvxEditModulesDlg::CreateEntry( OUString& rTxt, sal_uInt16 nCol
 
 IMPL_LINK( SvxEditModulesDlg, SelectHdl_Impl, SvxCheckListBox *, pBox )
 {
-    if (&aModulesCLB == pBox)
+    if (m_pModulesCLB == pBox)
     {
         sal_Bool bDisableUp = sal_True;
         sal_Bool bDisableDown = sal_True;
@@ -2008,8 +1997,8 @@ IMPL_LINK( SvxEditModulesDlg, SelectHdl_Impl, SvxCheckListBox *, pBox )
                             GetEntry(nCurPos - 1)->GetUserData())->IsParent();
                 }
             }
-            aPrioUpPB.Enable(!bDisableUp);
-            aPrioDownPB.Enable(!bDisableDown);
+            m_pPrioUpPB->Enable(!bDisableUp);
+            m_pPrioDownPB->Enable(!bDisableDown);
         }
     }
     else
@@ -2022,7 +2011,7 @@ IMPL_LINK( SvxEditModulesDlg, SelectHdl_Impl, SvxCheckListBox *, pBox )
 
 IMPL_LINK( SvxEditModulesDlg, BoxCheckButtonHdl_Impl, SvTreeListBox *, pBox )
 {
-        pBox = &aModulesCLB;
+        pBox = m_pModulesCLB;
         SvTreeListEntry *pCurEntry = pBox->GetCurEntry();
         if (pCurEntry)
         {
@@ -2052,10 +2041,10 @@ IMPL_LINK( SvxEditModulesDlg, BoxCheckButtonHdl_Impl, SvTreeListBox *, pBox )
 
 IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox )
 {
-    LanguageType  eCurLanguage = aLanguageLB.GetSelectLanguage();
+    LanguageType  eCurLanguage = m_pLanguageLB->GetSelectLanguage();
     static Locale aLastLocale;
     Locale aCurLocale( LanguageTag::convertToLocale( eCurLanguage));
-    SvTreeList *pModel = aModulesCLB.GetModel();
+    SvTreeList *pModel = m_pModulesCLB->GetModel();
 
     if (pBox)
     {
@@ -2067,9 +2056,9 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox )
         sal_Int32 nStart = 0, nLocalIndex = 0;
         Sequence< OUString > aChange;
         bool bChanged = false;
-        for(sal_uInt16 i = 0; i < aModulesCLB.GetEntryCount(); i++)
+        for(sal_uInt16 i = 0; i < m_pModulesCLB->GetEntryCount(); i++)
         {
-            SvTreeListEntry *pEntry = aModulesCLB.GetEntry(i);
+            SvTreeListEntry *pEntry = m_pModulesCLB->GetEntry(i);
             ModuleUserData_Impl* pData = (ModuleUserData_Impl*)pEntry->GetUserData();
             if(pData->IsParent())
             {
@@ -2091,7 +2080,7 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox )
                     }
                 }
                 nLocalIndex = nStart = 0;
-                aChange.realloc(aModulesCLB.GetEntryCount());
+                aChange.realloc(m_pModulesCLB->GetEntryCount());
                 bChanged = false;
             }
             else
@@ -2099,8 +2088,8 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox )
                 OUString* pChange = aChange.getArray();
                 pChange[nStart] = pData->GetImplName();
                 bChanged |= pData->GetIndex() != nLocalIndex ||
-                    pData->IsChecked() != aModulesCLB.IsChecked(i);
-                if(aModulesCLB.IsChecked(i))
+                    pData->IsChecked() != m_pModulesCLB->IsChecked(i);
+                if(m_pModulesCLB->IsChecked(i))
                     nStart++;
                 ++nLocalIndex;
             }
@@ -2112,13 +2101,13 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox )
         }
     }
 
-    for(sal_uLong i = 0; i < aModulesCLB.GetEntryCount(); i++)
-        delete (ModuleUserData_Impl*)aModulesCLB.GetEntry(i)->GetUserData();
+    for(sal_uLong i = 0; i < m_pModulesCLB->GetEntryCount(); i++)
+        delete (ModuleUserData_Impl*)m_pModulesCLB->GetEntry(i)->GetUserData();
 
     //
     // display entries for new selected language
     //
-    aModulesCLB.Clear();
+    m_pModulesCLB->Clear();
     if(LANGUAGE_DONTKNOW != eCurLanguage)
     {
         sal_uLong n;
@@ -2307,46 +2296,38 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox )
 
 IMPL_LINK( SvxEditModulesDlg, UpDownHdl_Impl, PushButton *, pBtn )
 {
-    sal_Bool bUp = &aPrioUpPB == pBtn;
-    sal_uInt16  nCurPos = aModulesCLB.GetSelectEntryPos();
+    sal_Bool bUp = m_pPrioUpPB == pBtn;
+    sal_uInt16  nCurPos = m_pModulesCLB->GetSelectEntryPos();
     SvTreeListEntry* pEntry;
     if (nCurPos != LISTBOX_ENTRY_NOTFOUND  &&
-        0 != (pEntry = aModulesCLB.GetEntry(nCurPos)))
+        0 != (pEntry = m_pModulesCLB->GetEntry(nCurPos)))
     {
-        aModulesCLB.SetUpdateMode(sal_False);
-        SvTreeList *pModel = aModulesCLB.GetModel();
+        m_pModulesCLB->SetUpdateMode(sal_False);
+        SvTreeList *pModel = m_pModulesCLB->GetModel();
 
         ModuleUserData_Impl* pData = (ModuleUserData_Impl*)pEntry->GetUserData();
-        OUString aStr(aModulesCLB.GetEntryText(pEntry));
+        OUString aStr(m_pModulesCLB->GetEntryText(pEntry));
         SvTreeListEntry* pToInsert = CreateEntry( aStr, CBCOL_FIRST );
         pToInsert->SetUserData( (void *)pData);
-        sal_Bool bIsChecked = aModulesCLB.IsChecked(nCurPos);
+        sal_Bool bIsChecked = m_pModulesCLB->IsChecked(nCurPos);
 
         pModel->Remove(pEntry);
 
         sal_uInt16 nDestPos = bUp ? nCurPos - 1 : nCurPos + 1;
         pModel->Insert(pToInsert, nDestPos);
-        aModulesCLB.CheckEntryPos(nDestPos, bIsChecked );
-        aModulesCLB.SelectEntryPos(nDestPos );
-        SelectHdl_Impl(&aModulesCLB);
-        aModulesCLB.SetUpdateMode(sal_True);
+        m_pModulesCLB->CheckEntryPos(nDestPos, bIsChecked );
+        m_pModulesCLB->SelectEntryPos(nDestPos );
+        SelectHdl_Impl(m_pModulesCLB);
+        m_pModulesCLB->SetUpdateMode(sal_True);
     }
     return 0;
 }
 
-IMPL_LINK( SvxEditModulesDlg, ClickHdl_Impl, PushButton *, pBtn )
+IMPL_LINK_NOARG(SvxEditModulesDlg, ClickHdl_Impl)
 {
-    if (&aClosePB == pBtn)
-    {
-        // store language config
-        LangSelectHdl_Impl(&aLanguageLB);
-        EndDialog( RET_OK );
-    }
-    else
-    {
-        OSL_FAIL( "pBtn unexpected value" );
-    }
-
+    // store language config
+    LangSelectHdl_Impl(m_pLanguageLB);
+    EndDialog( RET_OK );
     return 0;
 }
 
@@ -2361,7 +2342,7 @@ IMPL_LINK_NOARG(SvxEditModulesDlg, BackHdl_Impl)
 
 IMPL_LINK_NOARG(SvxEditModulesDlg, OpenURLHdl_Impl)
 {
-    OUString sURL( aMoreDictsLink.GetURL() );
+    OUString sURL( m_pMoreDictsLink->GetURL() );
     lcl_OpenURL( sURL );
     return 0;
 }
diff --git a/cui/source/options/optlingu.hrc b/cui/source/options/optlingu.hrc
deleted file mode 100644
index 524db02..0000000
--- a/cui/source/options/optlingu.hrc
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#define PB_OK                               70
-#define PB_HELP                             72
-
-#define ST_SPELL                            82
-#define ST_HYPH                             83
-#define ST_THES                             84
-#define ST_GRAMMAR                          85
-
-#define PB_EDIT_MODULES_PRIO_UP             309
-#define PB_EDIT_MODULES_PRIO_DOWN           310
-#define PB_EDIT_MODULES_PRIO_BACK           311
-
-#define FT_LINGU_DICS                       312
-#define CLB_LINGU_DICS                      313
-#define PB_LINGU_DICS_NEW_DIC               314
-#define PB_LINGU_DICS_EDIT_DIC              315
-#define PB_LINGU_DICS_DEL_DIC               316
-
-#define FL_EDIT_MODULES_OPTIONS             317
-#define FT_EDIT_MODULES_LANGUAGE            318
-#define LB_EDIT_MODULES_LANGUAGE            319
-#define CLB_EDIT_MODULES_MODULES            320
-#define FT_EDIT_MODULES_NEWDICTSLINK        321
-#define FL_EDIT_MODULES_BUTTONS             322
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/options/optlingu.src b/cui/source/options/optlingu.src
index a587004..5621f89 100644
--- a/cui/source/options/optlingu.src
+++ b/cui/source/options/optlingu.src
@@ -17,116 +17,30 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include "optlingu.hrc"
 #include "helpid.hrc"
 
 #include <svtools/controldims.hrc>
 #include <sfx2/sfx.hrc>
 #include <cuires.hrc>
 
-// RID_SVXDLG_EDIT_MODULES ---------------------------------------------------
+String RID_SVXSTR_SPELL
+{
+    Text [ en-US ] = "Spelling";
+};
 
-ModalDialog RID_SVXDLG_EDIT_MODULES
+String RID_SVXSTR_HYPH
 {
-    HelpID = HID_EDIT_MODULES ;
-    SVLook = TRUE ;
-    Moveable = TRUE ;
-    Size = MAP_APPFONT ( 240 , 197 ) ;
-    Text [ en-US ] = "Edit Modules";
+    Text [ en-US ] = "Hyphenation";
+};
 
-    FixedLine FL_EDIT_MODULES_OPTIONS
-    {
-        Pos = MAP_APPFONT ( RSC_SP_FLGR_INNERBORDER_LEFT , RSC_SP_FLGR_INNERBORDER_TOP ) ;
-        Size = MAP_APPFONT ( 240 - 2*RSC_SP_FLGR_INNERBORDER_LEFT , RSC_CD_FIXEDLINE_HEIGHT ) ;
-        Text [ en-US ] = "Options";
-    };
-    FixedText FT_EDIT_MODULES_LANGUAGE
-    {
-        Left = TRUE ;
-        Pos = MAP_APPFONT ( 12 , 16 ) ;
-        Size = MAP_APPFONT ( 68 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
-        Text [ en-US ] = "Language";
-    };
-    ListBox LB_EDIT_MODULES_LANGUAGE
-    {
-        HelpID = "cui:ListBox:RID_SVXDLG_EDIT_MODULES:LB_EDIT_MODULES_LANGUAGE";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 83 , 14 ) ;
-        Size = MAP_APPFONT ( 95 , 80 ) ;
-        DropDown = TRUE ;
-        Sort = TRUE ;
-    };
-    Control CLB_EDIT_MODULES_MODULES
-    {
-        Pos = MAP_APPFONT ( 12 , 32 ) ;
-        Size = MAP_APPFONT ( 166 , 120 ) ;
-        Border = TRUE ;
-        TabStop = TRUE ;
-    };
-    PushButton PB_EDIT_MODULES_PRIO_UP
-    {
-        HelpID = "cui:PushButton:RID_SVXDLG_EDIT_MODULES:PB_EDIT_MODULES_PRIO_UP";
-        Pos = MAP_APPFONT ( 184 , 32 ) ;
-        Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ;
-        TabStop = TRUE ;
-        Text [ en-US ] = "Move Up";
-    };
-    PushButton PB_EDIT_MODULES_PRIO_DOWN
-    {
-        HelpID = "cui:PushButton:RID_SVXDLG_EDIT_MODULES:PB_EDIT_MODULES_PRIO_DOWN";
-        Pos = MAP_APPFONT ( 184 , 49 ) ;
-        Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ;
-        TabStop = TRUE ;
-        Text [ en-US ] = "Move Down";
-    };
-    PushButton PB_EDIT_MODULES_PRIO_BACK
-    {
-        HelpID = "cui:PushButton:RID_SVXDLG_EDIT_MODULES:PB_EDIT_MODULES_PRIO_BACK";
-        Pos = MAP_APPFONT ( 184 , 66 ) ;
-        Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ;
-        TabStop = TRUE ;
-        Text [ en-US ] = "~Back";
-    };
-    FixedText FT_EDIT_MODULES_NEWDICTSLINK
-    {
-        Left = TRUE ;
-        Pos = MAP_APPFONT ( 12 , 155 ) ;
-        Size = MAP_APPFONT ( 169 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
-        Text [ en-US ] = "~Get more dictionaries online...";
-    };
-    FixedLine FL_EDIT_MODULES_BUTTONS
-    {
-        Pos = MAP_APPFONT ( 0 , 166 ) ;
-        Size = MAP_APPFONT ( 240 , RSC_CD_FIXEDLINE_HEIGHT ) ;
-    };
-    HelpButton PB_HELP
-    {
-        Pos = MAP_APPFONT ( 12, 177 ) ;
-        Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ;
-    };
-    OKButton PB_OK
-    {
-        Pos = MAP_APPFONT ( 184 , 177 ) ;
-        Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ;
-        Text [ en-US ] = "Close";
-    };
+String RID_SVXSTR_THES
+{
+    Text [ en-US ] = "Thesaurus";
+};
 
-    String ST_SPELL
-    {
-        Text [ en-US ] = "Spelling";
-    };
-    String ST_HYPH
-    {
-        Text [ en-US ] = "Hyphenation";
-    };
-    String ST_THES
-    {
-        Text [ en-US ] = "Thesaurus";
-    };
-    String ST_GRAMMAR
-    {
-        Text [ en-US ] = "Grammar";
-    };
+String RID_SVXSTR_GRAMMAR
+{
+    Text [ en-US ] = "Grammar";
 };
 
 String RID_SVXSTR_CAPITAL_WORDS
diff --git a/cui/uiconfig/ui/editmodulesdialog.ui b/cui/uiconfig/ui/editmodulesdialog.ui
new file mode 100644
index 0000000..b6d34fd
--- /dev/null
+++ b/cui/uiconfig/ui/editmodulesdialog.ui
@@ -0,0 +1,257 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
+<interface>
+  <!-- interface-requires LibreOffice 1.0 -->
+  <requires lib="gtk+" version="3.0"/>
+  <object class="GtkDialog" id="EditModulesDialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">6</property>
+    <property name="title" translatable="yes">Edit Modules</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="hexpand">True</property>
+        <property name="vexpand">True</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="close">
+                <property name="label">gtk-close</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="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>
+          </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="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="GtkGrid" id="grid1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="row_spacing">12</property>
+                    <child>
+                      <object class="GtkLinkButton" id="moredictslink">
+                        <property name="label" translatable="yes">Get more dictionaries online...</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="has_tooltip">True</property>
+                        <property name="relief">none</property>
+                        <property name="xalign">0</property>
+                        <property name="uri">http://extensions.libreoffice.org/dictionaries/</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="GtkBox" id="box1">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="spacing">12</property>
+                        <child>
+                          <object class="GtkLabel" id="label2">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">Language</property>
+                            <property name="use_underline">True</property>
+                            <property name="mnemonic_widget">language</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="svxcorelo-SvxLanguageBox" id="language">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="halign">start</property>
+                            <property name="hexpand">False</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">0</property>
+                        <property name="width">1</property>
+                        <property name="height">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkGrid" id="grid2">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="hexpand">True</property>
+                        <property name="vexpand">True</property>
+                        <property name="column_spacing">12</property>
+                        <child>
+                          <object class="GtkButtonBox" id="buttonbox1">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="orientation">vertical</property>
+                            <property name="spacing">6</property>
+                            <property name="layout_style">start</property>
+                            <child>
+                              <object class="GtkButton" id="up">
+                                <property name="label" translatable="yes">Move Up</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">True</property>
+                                <property name="use_underline">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="down">
+                                <property name="label" translatable="yes">Move Down</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">True</property>
+                                <property name="use_underline">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="back">
+                                <property name="label" translatable="yes">_Back</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">True</property>
+                                <property name="use_underline">True</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">True</property>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
+                          </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="svxcorelo-SvxCheckListBox" id="lingudicts:border">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="hexpand">True</property>
+                            <property name="vexpand">True</property>
+                            <child internal-child="selection">
+                              <object class="GtkTreeSelection" id="Check List Box-selection5"/>
+                            </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>
+                      </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">Options</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">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="0">close</action-widget>
+      <action-widget response="0">help</action-widget>
+    </action-widgets>
+  </object>
+</interface>


More information about the Libreoffice-commits mailing list