[Libreoffice-commits] .: 5 commits - cui/AllLangResTarget_cui.mk cui/source cui/uiconfig cui/UI_cui.mk cui/util sfx2/source vcl/inc vcl/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Oct 31 07:18:45 PDT 2012


 cui/AllLangResTarget_cui.mk            |    1 
 cui/UI_cui.mk                          |    1 
 cui/source/customize/selector.cxx      |  294 ++++++++++++---------------
 cui/source/customize/selector.hrc      |   45 ----
 cui/source/customize/selector.src      |  183 ----------------
 cui/source/dialogs/cuires.src          |   47 ++++
 cui/source/factory/dlgfact.cxx         |   11 -
 cui/source/inc/cuires.hrc              |   23 +-
 cui/source/inc/helpid.hrc              |    3 
 cui/source/inc/selector.hxx            |   56 ++---
 cui/uiconfig/ui/macroselectordialog.ui |  358 +++++++++++++++++++++++++++++++++
 cui/util/hidother.src                  |    3 
 sfx2/source/appl/appserv.cxx           |   21 +
 vcl/inc/vcl/vclmedit.hxx               |    2 
 vcl/source/edit/vclmedit.cxx           |   11 -
 vcl/source/window/builder.cxx          |    2 
 16 files changed, 616 insertions(+), 445 deletions(-)

New commits:
commit 22e9d19d750420015771b4b92fbbdeb4bc956233
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Oct 31 14:14:19 2012 +0000

    fix old big fat leak in macro and organizer dialogs
    
    Change-Id: Ie8a6c2a8850ad3dd6cd2be878aedfbf81d2473f7

diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 1fc5279..fc109ad 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -1232,7 +1232,10 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
 
                 short nDialogResult = pDlg->Execute();
                 if ( !nDialogResult )
+                {
+                    delete pDlg;
                     break;
+                }
 
                 Sequence< Any > args;
                 Sequence< sal_Int16 > outIndex;
@@ -1250,6 +1253,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
                     xScriptContext = xController;
 
                 SfxObjectShell::CallXScript( xScriptContext, pDlg->GetScriptURL(), args, ret, outIndex, outArgs );
+                delete pDlg;
             }
             while ( false );
             rReq.Done();
@@ -1275,6 +1279,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
             if( pDlg )
             {
                 pDlg->Execute();
+                delete pDlg;
             }
             else
             {
commit 918d15412980cd8e8c0bc5e2b1413907708aab1f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Oct 31 14:10:33 2012 +0000

    fix fractured indent
    
    Change-Id: I7c7f951b352ed2e9ef7604a5be324223f21e96dd

diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index c008ca2..1fc5279 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -351,7 +351,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
                     RID_SVXDLG_CUSTOMIZE,
                     NULL, &aSet, xFrame );
 
-                  if ( pDlg )
+                if ( pDlg )
                 {
                     const short nRet = pDlg->Execute();
 
@@ -528,13 +528,13 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
         // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
         case SID_ABOUT:
         {
-             SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
+            SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
             if ( pFact )
             {
                 VclAbstractDialog* pDlg = pFact->CreateVclDialog( 0, RID_DEFAULTABOUT );
                 pDlg->Execute();
                 delete pDlg;
-            bDone = true;
+                bDone = true;
             }
             break;
         }
@@ -1039,8 +1039,8 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
             {
                 VclAbstractDialog* pDlg =
                     pFact->CreateFrameDialog( NULL, xFrame, rReq.GetSlot(), sPageURL );
-                  short nRet = pDlg->Execute();
-                  delete pDlg;
+                short nRet = pDlg->Execute();
+                delete pDlg;
                 SfxViewFrame* pView = SfxViewFrame::GetFirst();
                 while ( pView )
                 {
@@ -1315,9 +1315,9 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
                 if ( pSet && pSet->GetItemState( pSetPool->GetWhich( SID_AUTO_CORRECT_DLG ), sal_False, &pItem ) == SFX_ITEM_SET )
                     aSet.Put( *pItem );
 
-                  SfxAbstractTabDialog* pDlg = pFact->CreateTabDialog( RID_OFA_AUTOCORR_DLG, NULL, &aSet, NULL );
-                  pDlg->Execute();
-                  delete pDlg;
+                SfxAbstractTabDialog* pDlg = pFact->CreateTabDialog( RID_OFA_AUTOCORR_DLG, NULL, &aSet, NULL );
+                pDlg->Execute();
+                delete pDlg;
             }
 
             break;
commit 79b9cd76f88c2b7f808aaedffb7cbd5dd5889f65
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Oct 31 12:07:45 2012 +0000

    convert run macro to .ui
    
    Change-Id: I4e83afa3d164ba0ae8640f4b5f2712b88c1e305f

diff --git a/cui/AllLangResTarget_cui.mk b/cui/AllLangResTarget_cui.mk
index 6a395fc..4128699 100644
--- a/cui/AllLangResTarget_cui.mk
+++ b/cui/AllLangResTarget_cui.mk
@@ -53,7 +53,6 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\
     cui/source/customize/cfg.src \
     cui/source/customize/eventdlg.src \
     cui/source/customize/macropg.src \
-    cui/source/customize/selector.src \
     cui/source/dialogs/about.src \
     cui/source/dialogs/colorpicker.src \
     cui/source/dialogs/commonlingui.src \
diff --git a/cui/UI_cui.mk b/cui/UI_cui.mk
index 57a1f8d..6f316fa 100644
--- a/cui/UI_cui.mk
+++ b/cui/UI_cui.mk
@@ -16,6 +16,7 @@ $(eval $(call gb_UI_add_uifiles,cui,\
 	cui/uiconfig/ui/insertfloatingframe \
 	cui/uiconfig/ui/insertoleobject \
 	cui/uiconfig/ui/insertplugin \
+	cui/uiconfig/ui/macroselectordialog \
 	cui/uiconfig/ui/positionpage \
 	cui/uiconfig/ui/specialcharacters \
 	cui/uiconfig/ui/thesaurus \
diff --git a/cui/source/customize/selector.cxx b/cui/source/customize/selector.cxx
index 9c5cae3..039c14e 100644
--- a/cui/source/customize/selector.cxx
+++ b/cui/source/customize/selector.cxx
@@ -20,9 +20,9 @@
 #include <vcl/help.hxx>
 #include <vcl/msgbox.hxx>
 #include <vcl/metric.hxx>
+#include <vcl/vclmedit.hxx>
 #include "selector.hxx"
 #include <dialmgr.hxx>
-#include "selector.hrc"
 #include <svx/fmresids.hrc> // for RID_SVXIMG_...
 #include <svx/dialmgr.hxx>  // for RID_SVXIMG_...
 #include <cuires.hrc>
@@ -67,29 +67,47 @@ using namespace ::com::sun::star::container;
 #include <tools/diagnose_ex.h>
 
 /*
- * The implementations of SvxConfigFunctionListBox_Impl and
- * SvxConfigGroupListBox_Impl are copied from sfx2/source/dialog/cfg.cxx
+ * The implementations of SvxConfigFunctionListBox and
+ * SvxConfigGroupListBox are copied from sfx2/source/dialog/cfg.cxx
  */
-SvxConfigFunctionListBox_Impl::SvxConfigFunctionListBox_Impl( Window* pParent, const ResId& rResId)
+SvxConfigFunctionListBox::SvxConfigFunctionListBox( Window* pParent, const ResId& rResId)
     : SvTreeListBox( pParent, rResId )
     , pCurEntry( 0 )
     , m_pDraggingEntry( 0 )
 {
     SetStyle( GetStyle() | WB_CLIPCHILDREN | WB_HSCROLL | WB_SORT );
+    Init();
+}
+
+SvxConfigFunctionListBox::SvxConfigFunctionListBox(Window* pParent)
+    : SvTreeListBox(pParent, WB_CLIPCHILDREN | WB_HSCROLL | WB_SORT)
+    , pCurEntry(0)
+    , m_pDraggingEntry(0)
+{
+    Init();
+}
+
+void SvxConfigFunctionListBox::Init()
+{
     GetModel()->SetSortMode( SortAscending );
 
     // Timer for the BallonHelp
     aTimer.SetTimeout( 200 );
     aTimer.SetTimeoutHdl(
-        LINK( this, SvxConfigFunctionListBox_Impl, TimerHdl ) );
+        LINK( this, SvxConfigFunctionListBox, TimerHdl ) );
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxConfigFunctionListBox(Window *pParent, VclBuilder::stringmap &)
+{
+    return new SvxConfigFunctionListBox(pParent);
 }
 
-SvxConfigFunctionListBox_Impl::~SvxConfigFunctionListBox_Impl()
+SvxConfigFunctionListBox::~SvxConfigFunctionListBox()
 {
     ClearAll();
 }
 
-SvTreeListEntry* SvxConfigFunctionListBox_Impl::GetLastSelectedEntry()
+SvTreeListEntry* SvxConfigFunctionListBox::GetLastSelectedEntry()
 {
     if ( m_pDraggingEntry != NULL )
     {
@@ -101,7 +119,7 @@ SvTreeListEntry* SvxConfigFunctionListBox_Impl::GetLastSelectedEntry()
     }
 }
 
-void SvxConfigFunctionListBox_Impl::MouseMove( const MouseEvent& rMEvt )
+void SvxConfigFunctionListBox::MouseMove( const MouseEvent& rMEvt )
 {
     Point aMousePos = rMEvt.GetPosPixel();
     pCurEntry = GetCurEntry();
@@ -116,7 +134,7 @@ void SvxConfigFunctionListBox_Impl::MouseMove( const MouseEvent& rMEvt )
 }
 
 
-IMPL_LINK_NOARG(SvxConfigFunctionListBox_Impl, TimerHdl)
+IMPL_LINK_NOARG(SvxConfigFunctionListBox, TimerHdl)
 {
     aTimer.Stop();
     Point aMousePos = GetPointerPosPixel();
@@ -126,13 +144,13 @@ IMPL_LINK_NOARG(SvxConfigFunctionListBox_Impl, TimerHdl)
     return 0L;
 }
 
-void SvxConfigFunctionListBox_Impl::ClearAll()
+void SvxConfigFunctionListBox::ClearAll()
 {
     aArr.clear();
     Clear();
 }
 
-String SvxConfigFunctionListBox_Impl::GetHelpText( SvTreeListEntry *pEntry )
+String SvxConfigFunctionListBox::GetHelpText( SvTreeListEntry *pEntry )
 {
     SvxGroupInfo_Impl *pInfo =
         pEntry ? (SvxGroupInfo_Impl*) pEntry->GetUserData(): 0;
@@ -156,41 +174,41 @@ String SvxConfigFunctionListBox_Impl::GetHelpText( SvTreeListEntry *pEntry )
     return String();
 }
 
-void SvxConfigFunctionListBox_Impl::FunctionSelected()
+void SvxConfigFunctionListBox::FunctionSelected()
 {
     Help::ShowBalloon( this, Point(), String() );
 }
 
 // drag and drop support
-DragDropMode SvxConfigFunctionListBox_Impl::NotifyStartDrag(
+DragDropMode SvxConfigFunctionListBox::NotifyStartDrag(
     TransferDataContainer& /*aTransferDataContainer*/, SvTreeListEntry* pEntry )
 {
     m_pDraggingEntry = pEntry;
     return GetDragDropMode();
 }
 
-void SvxConfigFunctionListBox_Impl::DragFinished( sal_Int8 /*nDropAction*/ )
+void SvxConfigFunctionListBox::DragFinished( sal_Int8 /*nDropAction*/ )
 {
     m_pDraggingEntry = NULL;
 }
 
 sal_Int8
-SvxConfigFunctionListBox_Impl::AcceptDrop( const AcceptDropEvent& /*rEvt*/ )
+SvxConfigFunctionListBox::AcceptDrop( const AcceptDropEvent& /*rEvt*/ )
 {
     return DND_ACTION_NONE;
 }
 
-SvxConfigGroupListBox_Impl::SvxConfigGroupListBox_Impl(
+SvxConfigGroupListBox::SvxConfigGroupListBox(
     Window* pParent, const ResId& rResId,
     bool _bShowSlots, const Reference< frame::XFrame >& xFrame )
         : SvTreeListBox( pParent, rResId )
-        , m_bShowSlots( _bShowSlots ),
-    m_hdImage(ResId(IMG_HARDDISK,*rResId.GetResMgr())),
-    m_libImage(ResId(IMG_LIB,*rResId.GetResMgr())),
-    m_macImage(ResId(IMG_MACRO,*rResId.GetResMgr())),
-    m_docImage(ResId(IMG_DOC,*rResId.GetResMgr())),
-    m_sMyMacros(String(ResId(STR_MYMACROS,*rResId.GetResMgr()))),
-    m_sProdMacros(String(ResId(STR_PRODMACROS,*rResId.GetResMgr())))
+        , m_bShowSlots( _bShowSlots )
+    , m_hdImage(CUI_RES(RID_CUIIMG_HARDDISK))
+    , m_libImage(CUI_RES(RID_CUIIMG_LIB))
+    , m_macImage(CUI_RES(RID_CUIIMG_MACRO))
+    , m_docImage(CUI_RES(RID_CUIIMG_DOC))
+    , m_sMyMacros(CUI_RESSTR(RID_SVXSTR_MYMACROS))
+    , m_sProdMacros(CUI_RESSTR(RID_SVXSTR_PRODMACROS))
 {
     FreeResource();
 
@@ -209,13 +227,36 @@ SvxConfigGroupListBox_Impl::SvxConfigGroupListBox_Impl(
     );
 }
 
+SvxConfigGroupListBox::SvxConfigGroupListBox(Window* pParent)
+    : SvTreeListBox(pParent,
+            WB_CLIPCHILDREN | WB_HSCROLL | WB_HASBUTTONS | WB_HASLINES | WB_HASLINESATROOT | WB_HASBUTTONSATROOT)
+    , m_bShowSlots(false)
+    , m_hdImage(CUI_RES(RID_CUIIMG_HARDDISK))
+    , m_libImage(CUI_RES(RID_CUIIMG_LIB))
+    , m_macImage(CUI_RES(RID_CUIIMG_MACRO))
+    , m_docImage(CUI_RES(RID_CUIIMG_DOC))
+    , m_sMyMacros(CUI_RESSTR(RID_SVXSTR_MYMACROS))
+    , m_sProdMacros(CUI_RESSTR(RID_SVXSTR_PRODMACROS))
+{
+    ImageList aNavigatorImages( SVX_RES( RID_SVXIMGLIST_FMEXPL ) );
+
+    SetNodeBitmaps(
+        aNavigatorImages.GetImage( RID_SVXIMG_COLLAPSEDNODE ),
+        aNavigatorImages.GetImage( RID_SVXIMG_EXPANDEDNODE )
+    );
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxConfigGroupListBox(Window *pParent, VclBuilder::stringmap &)
+{
+    return new SvxConfigGroupListBox(pParent);
+}
 
-SvxConfigGroupListBox_Impl::~SvxConfigGroupListBox_Impl()
+SvxConfigGroupListBox::~SvxConfigGroupListBox()
 {
     ClearAll();
 }
 
-void SvxConfigGroupListBox_Impl::ClearAll()
+void SvxConfigGroupListBox::ClearAll()
 {
     aArr.clear();
     Clear();
@@ -275,9 +316,9 @@ namespace
     }
 }
 
-void SvxConfigGroupListBox_Impl::fillScriptList( const Reference< browse::XBrowseNode >& _rxRootNode, SvTreeListEntry* _pParentEntry, bool _bCheapChildrenOnDemand )
+void SvxConfigGroupListBox::fillScriptList( const Reference< browse::XBrowseNode >& _rxRootNode, SvTreeListEntry* _pParentEntry, bool _bCheapChildrenOnDemand )
 {
-    OSL_PRECOND( _rxRootNode.is(), "SvxConfigGroupListBox_Impl::fillScriptList: invalid root node!" );
+    OSL_PRECOND( _rxRootNode.is(), "SvxConfigGroupListBox::fillScriptList: invalid root node!" );
     if ( !_rxRootNode.is() )
         return;
 
@@ -384,8 +425,11 @@ void SvxConfigGroupListBox_Impl::fillScriptList( const Reference< browse::XBrows
     }
 }
 
-void SvxConfigGroupListBox_Impl::Init()
+void SvxConfigGroupListBox::Init(bool bShowSlots, const Reference< frame::XFrame >& xFrame)
 {
+    m_bShowSlots = bShowSlots;
+    m_xFrame.set(xFrame);
+
     SetUpdateMode(sal_False);
     ClearAll();
 
@@ -507,8 +551,7 @@ void SvxConfigGroupListBox_Impl::Init()
             SvxGroupInfo_Impl *pInfo =
                 new SvxGroupInfo_Impl( SVX_CFGGROUP_SCRIPTCONTAINER, 0, rootNode );
 
-            String aTitle =
-                String( CUI_RES( STR_SELECTOR_MACROS ) );
+            String aTitle = CUI_RESSTR(RID_SVXSTR_PRODMACROS);
 
             SvTreeListEntry *pNewEntry = InsertEntry( aTitle, NULL );
             pNewEntry->SetUserData( pInfo );
@@ -524,7 +567,7 @@ void SvxConfigGroupListBox_Impl::Init()
     SetUpdateMode( sal_True );
 }
 
-Image SvxConfigGroupListBox_Impl::GetImage(
+Image SvxConfigGroupListBox::GetImage(
     Reference< browse::XBrowseNode > node,
     Reference< XComponentContext > xCtx,
     bool bIsRootNode
@@ -586,7 +629,7 @@ Image SvxConfigGroupListBox_Impl::GetImage(
 }
 
 Reference< XInterface  >
-SvxConfigGroupListBox_Impl::getDocumentModel(
+SvxConfigGroupListBox::getDocumentModel(
     Reference< XComponentContext >& xCtx, OUString& docName )
 {
     Reference< XInterface > xModel;
@@ -618,7 +661,7 @@ SvxConfigGroupListBox_Impl::getDocumentModel(
     return xModel;
 }
 
-void SvxConfigGroupListBox_Impl::GroupSelected()
+void SvxConfigGroupListBox::GroupSelected()
 {
     SvTreeListEntry *pEntry = FirstSelected();
     SvxGroupInfo_Impl *pInfo = (SvxGroupInfo_Impl*) pEntry->GetUserData();
@@ -796,7 +839,7 @@ void SvxConfigGroupListBox_Impl::GroupSelected()
     pFunctionListBox->SetUpdateMode(sal_True);
 }
 
-sal_Bool SvxConfigGroupListBox_Impl::Expand( SvTreeListEntry* pParent )
+sal_Bool SvxConfigGroupListBox::Expand( SvTreeListEntry* pParent )
 {
     sal_Bool bRet = SvTreeListBox::Expand( pParent );
     if ( bRet )
@@ -827,7 +870,7 @@ sal_Bool SvxConfigGroupListBox_Impl::Expand( SvTreeListEntry* pParent )
     return bRet;
 }
 
-void SvxConfigGroupListBox_Impl::RequestingChildren( SvTreeListEntry *pEntry )
+void SvxConfigGroupListBox::RequestingChildren( SvTreeListEntry *pEntry )
 {
     SvxGroupInfo_Impl *pInfo = (SvxGroupInfo_Impl*) pEntry->GetUserData();
     pInfo->bWasOpened = sal_True;
@@ -857,115 +900,52 @@ void SvxConfigGroupListBox_Impl::RequestingChildren( SvTreeListEntry *pEntry )
  */
 
 SvxScriptSelectorDialog::SvxScriptSelectorDialog(
-  Window* pParent, sal_Bool bShowSlots, const Reference< frame::XFrame >& xFrame )
-    :
-    ModelessDialog( pParent, CUI_RES( RID_DLG_SCRIPTSELECTOR ) ),
-    aDialogDescription( this, CUI_RES( TXT_SELECTOR_DIALOG_DESCRIPTION ) ),
-    aGroupText( this, CUI_RES( TXT_SELECTOR_CATEGORIES ) ),
-    aCategories( this, CUI_RES( BOX_SELECTOR_CATEGORIES ), bShowSlots, xFrame ),
-    aFunctionText( this, CUI_RES( TXT_SELECTOR_COMMANDS ) ),
-    aCommands( this, CUI_RES( BOX_SELECTOR_COMMANDS ) ),
-    aOKButton( this, CUI_RES( BTN_SELECTOR_OK ) ),
-    aCancelButton( this, CUI_RES( BTN_SELECTOR_CANCEL ) ),
-    aHelpButton( this, CUI_RES( BTN_SELECTOR_HELP ) ),
-    aDescription( this, CUI_RES( GRP_SELECTOR_DESCRIPTION ) ),
-    aDescriptionText( this, CUI_RES( TXT_SELECTOR_DESCRIPTION ) ),
-    m_bShowSlots( bShowSlots )
+    Window* pParent, sal_Bool bShowSlots, const Reference< frame::XFrame >& xFrame)
+    : ModelessDialog(pParent, "MacroSelectorDialog", "cui/ui/macroselectordialog.ui")
+    , m_bShowSlots(bShowSlots)
 {
-
-    ResMgr& rMgr = CUI_MGR();
-
-    // If we are showing Slot API commands update labels in the UI, and
-    // enable drag'n'drop
-    if ( m_bShowSlots )
+    get<FixedText>("libraryft")->Show(!m_bShowSlots);
+    get<FixedText>("categoryft")->Show(m_bShowSlots);
+    get<FixedText>("macronameft")->Show(!m_bShowSlots);
+    get<FixedText>("commandsft")->Show(m_bShowSlots);
+    get(m_pDescriptionText, "description");
+    get(m_pCommands, "commands");
+    if (m_bShowSlots)
     {
-        aGroupText.SetText( String( ResId( STR_SELECTOR_CATEGORIES, rMgr ) ) );
-        aOKButton.SetText( String( ResId( STR_SELECTOR_ADD, rMgr ) ) );
-        aCancelButton.SetText( String( ResId( STR_SELECTOR_CLOSE, rMgr ) ) );
-        aFunctionText.SetText( String( ResId( STR_SELECTOR_COMMANDS, rMgr ) ) );
-        SetDialogDescription(
-            String( ResId( STR_SELECTOR_ADD_COMMANDS_DESCRIPTION, rMgr ) ) );
-        SetText( String( ResId( STR_SELECTOR_ADD_COMMANDS, rMgr ) ) );
-
-        aCommands.SetDragDropMode( SV_DRAGDROP_APP_COPY );
+        // If we are showing Slot API commands update labels in the UI, and
+        // enable drag'n'drop
+        SetText(CUI_RESSTR(RID_SVXSTR_SELECTOR_ADD_COMMANDS));
+        m_pCommands->SetDragDropMode( SV_DRAGDROP_APP_COPY );
+
+        get(m_pCancelButton, "close");
+        get(m_pDialogDescription, "helptoolbar");
+        get(m_pOKButton, "add");
     }
+    else
+    {
+        get(m_pCancelButton, "cancel");
+        get(m_pDialogDescription, "helpmacro");
+        get(m_pOKButton, "ok");
+    }
+    m_pCancelButton->Show();
+    m_pDialogDescription->Show();
+    m_pOKButton->Show();
 
-    ResizeControls();
-
-    aCategories.SetFunctionListBox( &aCommands );
-    aCategories.Init();
+    get(m_pCategories, "categories");
+    m_pCategories->SetFunctionListBox(m_pCommands);
+    m_pCategories->Init(bShowSlots, xFrame);
 
-    aCategories.SetSelectHdl(
+    m_pCategories->SetSelectHdl(
             LINK( this, SvxScriptSelectorDialog, SelectHdl ) );
-    aCommands.SetSelectHdl( LINK( this, SvxScriptSelectorDialog, SelectHdl ) );
-    aCommands.SetDoubleClickHdl( LINK( this, SvxScriptSelectorDialog, FunctionDoubleClickHdl ) );
+    m_pCommands->SetSelectHdl( LINK( this, SvxScriptSelectorDialog, SelectHdl ) );
+    m_pCommands->SetDoubleClickHdl( LINK( this, SvxScriptSelectorDialog, FunctionDoubleClickHdl ) );
 
-    aOKButton.SetClickHdl( LINK( this, SvxScriptSelectorDialog, ClickHdl ) );
-    aCancelButton.SetClickHdl( LINK( this, SvxScriptSelectorDialog, ClickHdl ) );
+    m_pOKButton->SetClickHdl( LINK( this, SvxScriptSelectorDialog, ClickHdl ) );
+    m_pCancelButton->SetClickHdl( LINK( this, SvxScriptSelectorDialog, ClickHdl ) );
 
-    UpdateUI();
-    FreeResource();
-}
+    m_sDefaultDesc = m_pDescriptionText->GetText();
 
-void SvxScriptSelectorDialog::ResizeControls()
-{
-    Point p, newp;
-    Size s, news;
-    long gap;
-
-    sal_uInt16 style = TEXT_DRAW_MULTILINE | TEXT_DRAW_TOP |
-                   TEXT_DRAW_LEFT | TEXT_DRAW_WORDBREAK;
-
-    // get dimensions of dialog instructions control
-    p = aDialogDescription.GetPosPixel();
-    s = aDialogDescription.GetSizePixel();
-
-    // get dimensions occupied by text in the control
-    Rectangle rect =
-        GetTextRect( Rectangle( p, s ), aDialogDescription.GetText(), style );
-    news = rect.GetSize();
-
-    // the gap is the difference between the control height and its text height
-    gap = s.Height() - news.Height();
-
-    // resize the dialog instructions control
-    news = Size( s.Width(), s.Height() - gap );
-    aDialogDescription.SetSizePixel( news );
-
-    // resize other controls to fill the gap
-    p = aGroupText.GetPosPixel();
-    newp = Point( p.X(), p.Y() - gap );
-    aGroupText.SetPosPixel( newp );
-
-    p = aCategories.GetPosPixel();
-    newp = Point( p.X(), p.Y() - gap );
-    aCategories.SetPosPixel( newp );
-    s = aCategories.GetSizePixel();
-    news = Size( s.Width(), s.Height() + gap );
-    aCategories.SetSizePixel( news );
-
-    p = aFunctionText.GetPosPixel();
-    newp = Point( p.X(), p.Y() - gap );
-    aFunctionText.SetPosPixel( newp );
-
-    p = aCommands.GetPosPixel();
-    newp = Point( p.X(), p.Y() - gap );
-    aCommands.SetPosPixel( newp );
-    s = aCommands.GetSizePixel();
-    news = Size( s.Width(), s.Height() + gap );
-    aCommands.SetSizePixel( news );
-
-    p = aOKButton.GetPosPixel();
-    newp = Point( p.X(), p.Y() - gap );
-    aOKButton.SetPosPixel( newp );
-
-    p = aCancelButton.GetPosPixel();
-    newp = Point( p.X(), p.Y() - gap );
-    aCancelButton.SetPosPixel( newp );
-
-    p = aHelpButton.GetPosPixel();
-    newp = Point( p.X(), p.Y() - gap );
-    aHelpButton.SetPosPixel( newp );
+    UpdateUI();
 }
 
 SvxScriptSelectorDialog::~SvxScriptSelectorDialog()
@@ -974,13 +954,13 @@ SvxScriptSelectorDialog::~SvxScriptSelectorDialog()
 
 IMPL_LINK( SvxScriptSelectorDialog, SelectHdl, Control*, pCtrl )
 {
-    if ( pCtrl == &aCategories )
+    if (pCtrl == m_pCategories)
     {
-        aCategories.GroupSelected();
+        m_pCategories->GroupSelected();
     }
-    else if ( pCtrl == &aCommands )
+    else if (pCtrl == m_pCommands)
     {
-        aCommands.FunctionSelected();
+        m_pCommands->FunctionSelected();
     }
     UpdateUI();
     return 0;
@@ -989,8 +969,8 @@ IMPL_LINK( SvxScriptSelectorDialog, SelectHdl, Control*, pCtrl )
 IMPL_LINK( SvxScriptSelectorDialog, FunctionDoubleClickHdl, Control*, pCtrl )
 {
     (void)pCtrl;
-    if ( aOKButton.IsEnabled() )
-        return ClickHdl( &aOKButton );
+    if (m_pOKButton->IsEnabled())
+        return ClickHdl(m_pOKButton);
     return 0;
 }
 
@@ -1002,22 +982,22 @@ SvxScriptSelectorDialog::UpdateUI()
     OUString url = GetScriptURL();
     if ( url != NULL && !url.isEmpty() )
     {
-        String rMessage =
-            aCommands.GetHelpText( aCommands.FirstSelected() );
-        aDescriptionText.SetText( rMessage );
+        OUString sMessage =
+            m_pCommands->GetHelpText(m_pCommands->FirstSelected());
+        m_pDescriptionText->SetText(sMessage.isEmpty() ? m_sDefaultDesc : sMessage);
 
-        aOKButton.Enable( sal_True );
+        m_pOKButton->Enable( sal_True );
     }
     else
     {
-        aDescriptionText.SetText( String() );
-        aOKButton.Enable( sal_False );
+        m_pDescriptionText->SetText(m_sDefaultDesc);
+        m_pOKButton->Enable( sal_False );
     }
 }
 
 IMPL_LINK( SvxScriptSelectorDialog, ClickHdl, Button *, pButton )
 {
-    if ( pButton == &aCancelButton )
+    if (pButton == m_pCancelButton)
     {
         // If we are displaying Slot API commands then the dialog is being
         // run from Tools/Configure and we should not close it, just hide it
@@ -1030,7 +1010,7 @@ IMPL_LINK( SvxScriptSelectorDialog, ClickHdl, Button *, pButton )
             Hide();
         }
     }
-    else if ( pButton == &aOKButton )
+    else if (pButton == m_pOKButton)
     {
         GetAddHdl().Call( this );
 
@@ -1043,12 +1023,12 @@ IMPL_LINK( SvxScriptSelectorDialog, ClickHdl, Button *, pButton )
         else
         {
             // Select the next entry in the list if possible
-            SvTreeListEntry* current = aCommands.FirstSelected();
-            SvTreeListEntry* next = aCommands.NextSibling( current );
+            SvTreeListEntry* current = m_pCommands->FirstSelected();
+            SvTreeListEntry* next = m_pCommands->NextSibling( current );
 
             if ( next != NULL )
             {
-                aCommands.Select( next );
+                m_pCommands->Select( next );
             }
         }
     }
@@ -1059,13 +1039,13 @@ IMPL_LINK( SvxScriptSelectorDialog, ClickHdl, Button *, pButton )
 void
 SvxScriptSelectorDialog::SetRunLabel()
 {
-    aOKButton.SetText( String( CUI_RES( STR_SELECTOR_RUN ) ) );
+    m_pOKButton->SetText(CUI_RESSTR(RID_SVXSTR_SELECTOR_RUN));
 }
 
 void
 SvxScriptSelectorDialog::SetDialogDescription( const String& rDescription )
 {
-    aDialogDescription.SetText( rDescription );
+    m_pDialogDescription->SetText( rDescription );
 }
 
 String
@@ -1073,7 +1053,7 @@ SvxScriptSelectorDialog::GetScriptURL() const
 {
     OUString result;
 
-    SvTreeListEntry *pEntry = const_cast< SvxScriptSelectorDialog* >( this )->aCommands.GetLastSelectedEntry();
+    SvTreeListEntry *pEntry = const_cast< SvxScriptSelectorDialog* >( this )->m_pCommands->GetLastSelectedEntry();
     if ( pEntry )
     {
         SvxGroupInfo_Impl *pData = (SvxGroupInfo_Impl*) pEntry->GetUserData();
@@ -1091,13 +1071,13 @@ SvxScriptSelectorDialog::GetScriptURL() const
 String
 SvxScriptSelectorDialog::GetSelectedDisplayName()
 {
-    return aCommands.GetEntryText( aCommands.GetLastSelectedEntry() );
+    return m_pCommands->GetEntryText( m_pCommands->GetLastSelectedEntry() );
 }
 
 String
 SvxScriptSelectorDialog::GetSelectedHelpText()
 {
-    return aCommands.GetHelpText( aCommands.GetLastSelectedEntry() );
+    return m_pCommands->GetHelpText( m_pCommands->GetLastSelectedEntry() );
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/customize/selector.hrc b/cui/source/customize/selector.hrc
deleted file mode 100644
index 0e35802..0000000
--- a/cui/source/customize/selector.hrc
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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 TXT_SELECTOR_DIALOG_DESCRIPTION 1
-#define TXT_SELECTOR_CATEGORIES 2
-#define BOX_SELECTOR_CATEGORIES 3
-#define TXT_SELECTOR_COMMANDS 4
-#define BOX_SELECTOR_COMMANDS 5
-#define BTN_SELECTOR_OK 6
-#define BTN_SELECTOR_CANCEL 7
-#define BTN_SELECTOR_HELP 8
-#define GRP_SELECTOR_DESCRIPTION 9
-#define TXT_SELECTOR_DESCRIPTION 10
-
-#define IMG_HARDDISK                   1
-#define IMG_LIB                        3
-#define IMG_MACRO                      5
-#define IMG_DOC                        7
-
-#define STR_SELECTOR_ADD 310
-#define STR_SELECTOR_CLOSE 311
-#define STR_SELECTOR_COMMANDS 312
-#define STR_SELECTOR_ADD_COMMANDS 313
-#define STR_SELECTOR_ADD_COMMANDS_DESCRIPTION 314
-#define STR_SELECTOR_MACROS 315
-#define STR_SELECTOR_CATEGORIES 316
-#define STR_BASICMACROS 317
-#define STR_SELECTOR_RUN 318
-#define STR_MYMACROS                    319
-#define STR_PRODMACROS                  320
diff --git a/cui/source/customize/selector.src b/cui/source/customize/selector.src
deleted file mode 100644
index 533e91e..0000000
--- a/cui/source/customize/selector.src
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * 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 .
- */
-#include "helpid.hrc"
-#include <cuires.hrc>
-#include "selector.hrc"
-
-#define MASKCOLOR  MaskColor = \
-    Color { Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; };
-
-#define FIXEDTEXT_DIALOG_DESCRIPTION \
-Text [ en-US ] = "Select the library that contains the macro you want. Then select the macro under 'Macro name'." ;\
-
-String STR_SELECTOR_ADD_COMMANDS
-{
-  TEXT [ en-US ] = "Add Commands" ;
-};
-
-String STR_SELECTOR_MACROS
-{
-  Text [ en-US ] = "%PRODUCTNAME Macros" ;
-};
-
-String STR_SELECTOR_CATEGORIES
-{
-    Text [ en-US ] = "~Category" ;
-};
-
-String STR_SELECTOR_COMMANDS
-{
-  Text [ en-US ] = "Commands" ;
-};
-
-String STR_SELECTOR_ADD
-{
-  TEXT [ en-US ] = "Add" ;
-};
-
-String STR_SELECTOR_RUN
-{
-  TEXT [ en-US ] = "Run" ;
-
-};
-
-String STR_SELECTOR_CLOSE
-{
-  TEXT [ en-US ] = "Close" ;
-
-};
-
-String STR_SELECTOR_ADD_COMMANDS_DESCRIPTION
-{
-  TEXT [ en-US ] = "To add a command to a toolbar, select the category and then the command. Then drag the command to the Commands list of the Toolbars tab page in the Customize dialog.";
-};
-
-String STR_BASICMACROS
-{
-    Text [ en-US ] = "BASIC Macros" ;
-};
-
-
-ModelessDialog RID_DLG_SCRIPTSELECTOR
-{
-  OutputSize = TRUE ;
-  Size = MAP_APPFONT ( 256 , 233 ) ;
-  Text [ en-US ] = "Macro Selector" ;
-  HelpId = HID_SELECTOR_DIALOG;
-  SvLook = TRUE ;
-  Moveable = TRUE ;
-  Hide = TRUE;
-  FixedText TXT_SELECTOR_DIALOG_DESCRIPTION
-  {
-    Pos = MAP_APPFONT ( 6 , 8 ) ;
-    Size = MAP_APPFONT ( 190 , 48 ) ;
-    Group = TRUE ;
-    Left = TRUE ;
-    WordBreak = TRUE ;
-    FIXEDTEXT_DIALOG_DESCRIPTION
-  };
-  FixedText TXT_SELECTOR_CATEGORIES
-  {
-    Pos = MAP_APPFONT ( 6 , 62 ) ;
-    Size = MAP_APPFONT ( 83 , 8 ) ;
-    Group = TRUE ;
-    Left = TRUE ;
-    Text [ en-US ] = "Library" ;
-  };
-  Control BOX_SELECTOR_CATEGORIES
-  {
-    Border = TRUE ;
-    Pos = MAP_APPFONT ( 6 , 73 ) ;
-    Size = MAP_APPFONT ( 83 , 89 ) ;
-    TabStop = TRUE;
-    HelpId = HID_SELECTOR_CATEGORIES;
-    String STR_MYMACROS
-    {
-        Text [ en-US ] = "My Macros";
-    };
-    String STR_PRODMACROS
-    {
-        Text [ en-US ] = "%PRODUCTNAME Macros";
-    };
-    Image IMG_HARDDISK
-    {
-        ImageBitmap = Bitmap { File = "harddisk_16.bmp" ; };
-        MASKCOLOR
-    };
-    Image IMG_LIB
-    {
-        ImageBitmap = Bitmap { File = "im30820.png"; };
-        MASKCOLOR
-    };
-    Image IMG_MACRO
-    {
-        ImageBitmap = Bitmap { File = "im30821.png"; };
-        MASKCOLOR
-    };
-    Image IMG_DOC
-    {
-        ImageBitmap = Bitmap { File = "im30826.png"; };
-        MASKCOLOR
-    };
-  };
-  FixedText TXT_SELECTOR_COMMANDS
-  {
-    Pos = MAP_APPFONT ( 101 , 62 ) ;
-    Size = MAP_APPFONT ( 93 , 8 ) ;
-    Left = TRUE ;
-    Text [ en-US ] = "Macro name" ;
-  };
-  Control BOX_SELECTOR_COMMANDS
-  {
-    Border = TRUE ;
-    Pos = MAP_APPFONT ( 101 , 73 ) ;
-    Size = MAP_APPFONT ( 93 , 89 ) ;
-    TabStop = TRUE;
-    HelpId = HID_SELECTOR_COMMANDS;
-  };
-  OKButton BTN_SELECTOR_OK
-  {
-    Pos = MAP_APPFONT ( 200 , 73 ) ;
-    Size = MAP_APPFONT ( 50 , 14 ) ;
-    DefButton = TRUE;
-  };
-  CancelButton BTN_SELECTOR_CANCEL
-  {
-    Pos = MAP_APPFONT ( 200 , 90 ) ;
-    Size = MAP_APPFONT ( 50 , 14 ) ;
-  };
-  HelpButton BTN_SELECTOR_HELP
-  {
-    Pos = MAP_APPFONT ( 200 , 107 ) ;
-    Size = MAP_APPFONT ( 50 , 14 ) ;
-  };
-  FixedLine GRP_SELECTOR_DESCRIPTION
-  {
-    Pos = MAP_APPFONT ( 6 , 168 ) ;
-    Size = MAP_APPFONT ( 224 , 8 ) ;
-    Group = TRUE ;
-    Text [ en-US ] = "Description" ;
-  };
-  FixedText TXT_SELECTOR_DESCRIPTION
-  {
-    Pos = MAP_APPFONT ( 12 , 179 ) ;
-    Size = MAP_APPFONT ( 224 , 48 ) ;
-    WordBreak = TRUE ;
-  };
-};
- // ********************************************************************** EOF
diff --git a/cui/source/dialogs/cuires.src b/cui/source/dialogs/cuires.src
index 91c0f5e..2e6e6ed 100644
--- a/cui/source/dialogs/cuires.src
+++ b/cui/source/dialogs/cuires.src
@@ -19,4 +19,51 @@ String RID_SVXSTR_SELECT_FILE_IFRAME
     Text [ en-US ] = "Select File for Floating Frame" ;
 };
 
+String RID_SVXSTR_MYMACROS
+{
+    Text [ en-US ] = "My Macros";
+};
+
+String RID_SVXSTR_PRODMACROS
+{
+    Text [ en-US ] = "%PRODUCTNAME Macros";
+};
+
+String RID_SVXSTR_SELECTOR_ADD_COMMANDS
+{
+  TEXT [ en-US ] = "Add Commands" ;
+};
+
+String RID_SVXSTR_SELECTOR_RUN
+{
+  TEXT [ en-US ] = "Run" ;
+};
+
+#define MASKCOLOR  MaskColor = \
+    Color { Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; };
+
+Image RID_CUIIMG_HARDDISK
+{
+    ImageBitmap = Bitmap { File = "harddisk_16.bmp" ; };
+    MASKCOLOR
+};
+
+Image RID_CUIIMG_LIB
+{
+    ImageBitmap = Bitmap { File = "im30820.png"; };
+    MASKCOLOR
+};
+
+Image RID_CUIIMG_MACRO
+{
+    ImageBitmap = Bitmap { File = "im30821.png"; };
+    MASKCOLOR
+};
+
+Image RID_CUIIMG_DOC
+{
+    ImageBitmap = Bitmap { File = "im30826.png"; };
+    MASKCOLOR
+};
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 3c01929..ebd3d64 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -1208,15 +1208,8 @@ AbstractScriptSelectorDialog*
 AbstractDialogFactory_Impl::CreateScriptSelectorDialog(
     Window* pParent, sal_Bool bShowSlots, const Reference< frame::XFrame >& _rxFrame )
 {
-    SvxScriptSelectorDialog* pDlg = NULL;
-
-    pDlg = new SvxScriptSelectorDialog( pParent, bShowSlots, _rxFrame );
-
-    if (pDlg)
-    {
-        return new AbstractScriptSelectorDialog_Impl( pDlg );
-    }
-    return 0;
+    SvxScriptSelectorDialog* pDlg = new SvxScriptSelectorDialog(pParent, bShowSlots, _rxFrame);
+    return new AbstractScriptSelectorDialog_Impl(pDlg);
 }
 
 String AbstractScriptSelectorDialog_Impl::GetScriptURL() const
diff --git a/cui/source/inc/cuires.hrc b/cui/source/inc/cuires.hrc
index 8a0c560..710f6cf 100644
--- a/cui/source/inc/cuires.hrc
+++ b/cui/source/inc/cuires.hrc
@@ -24,6 +24,16 @@
 
 // Resource-Id's ------------------------------------------------------------
 
+#define RID_SVX_MSGBOX_JAVA_RESTART         (RID_SVX_START + 0)
+#define RID_SVX_MSGBOX_OPTIONS_RESTART      (RID_SVX_START + 1)
+#define RID_SVX_MSGBOX_LANGUAGE_RESTART     (RID_SVX_START + 2)
+#define RID_CUI_DIALOG_COLORPICKER          (RID_SVX_START + 3)
+
+#define RID_CUIIMG_HARDDISK                 (RID_SVX_START + 4)
+#define RID_CUIIMG_LIB                      (RID_SVX_START + 5)
+#define RID_CUIIMG_MACRO                    (RID_SVX_START + 6)
+#define RID_CUIIMG_DOC                      (RID_SVX_START + 7)
+
 // Gallery
 #define RID_CUI_GALLERY_START               (RID_SVX_START + 360)
 //      RID_CUI_GALLERY_END                 (RID_SVX_START + 410)
@@ -157,15 +167,12 @@
 #define RID_SVXSTR_COLOR_CONFIG_SAVE2       (RID_SVX_START + 854)
 #define RID_SVXSTR_COLOR_CONFIG_DELETE      (RID_SVX_START + 855)
 #define RID_SVXSTR_OPT_DOUBLE_DICTS         (RID_SVX_START + 320)
-#define RID_SVX_MSGBOX_LANGUAGE_RESTART     ( RID_SVX_START +  2 )
 #define RID_SVXERR_OPT_PROXYPORTS           (RID_SVX_START + 224)
 #define RID_SVXDLG_OPT_JAVASCRIPT_DISABLE   (RID_SVX_START + 225)
 #define RID_SVXDLG_JAVA_PARAMETER           (RID_SVX_START + 254)
 #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_SVX_MSGBOX_JAVA_RESTART         ( RID_SVX_START +  0 )
-#define RID_SVX_MSGBOX_OPTIONS_RESTART      ( RID_SVX_START +  1 )
 #define RID_SVXDLG_LNG_ED_NUM_PREBREAK      (RID_SVX_START +  830)
 #define RID_SVXDLG_EDIT_MODULES             (RID_SVX_START +  831)
 #define RID_SVXSTR_PATH_NAME_START          (RID_SVX_START + 1003)
@@ -315,7 +322,7 @@
 #define RID_SVXPAGE_EVENTS                  (RID_SVX_START + 295)
 #define RID_SVXPAGE_CONFIGGROUPBOX          (RID_SVX_START + 304)
 #define RID_SVXDLG_ASSIGNCOMPONENT          (RID_SVX_START + 297)
-#define RID_DLG_SCRIPTSELECTOR              (RID_SVX_START + 259)
+
 #define RID_SVXSTR_NEW_MENU                 (RID_SVX_START + 1039)
 #define RID_SVXSTR_NEW_TOOLBAR              (RID_SVX_START + 1040)
 #define RID_SVXSTR_MOVE_MENU                (RID_SVX_START + 1041)
@@ -418,9 +425,11 @@
 
 #define RID_SVXSTR_ERR_TEXTNOTFOUND                         (RID_SVX_START + 1195)
 #define RID_SVXSTR_SELECT_FILE_IFRAME                       (RID_SVX_START + 1196)
+#define RID_SVXSTR_MYMACROS                                 (RID_SVX_START + 1197)
+#define RID_SVXSTR_PRODMACROS                               (RID_SVX_START + 1198)
+#define RID_SVXSTR_SELECTOR_ADD_COMMANDS                    (RID_SVX_START + 1199)
+#define RID_SVXSTR_SELECTOR_RUN                             (RID_SVX_START + 1200)
 
-#define RID_SVXDLG_CERTPATH                                 (RID_SVX_START + 1198)
-
-#define RID_CUI_DIALOG_COLORPICKER                          (RID_SVX_START + 3)
+#define RID_SVXDLG_CERTPATH                                 (RID_SVX_START + 1201)
 
 #endif
diff --git a/cui/source/inc/helpid.hrc b/cui/source/inc/helpid.hrc
index 38ed220..8387eba 100644
--- a/cui/source/inc/helpid.hrc
+++ b/cui/source/inc/helpid.hrc
@@ -170,11 +170,8 @@
 #define HID_SVX_CONFIG_EVENT "CUI_HID_SVX_CONFIG_EVENT"
 #define HID_CONFIG_EVENT_OFFICE_BASED "CUI_HID_CONFIG_EVENT_OFFICE_BASED"
 #define HID_CONFIG_EVENT_DOCUMENT_BASED "CUI_HID_CONFIG_EVENT_DOCUMENT_BASED"
-#define HID_SELECTOR_DIALOG "CUI_HID_SELECTOR_DIALOG"
-#define HID_SELECTOR_CATEGORIES "CUI_HID_SELECTOR_CATEGORIES"
 #define HID_SVX_CONFIG_TOOLBAR "CUI_HID_SVX_CONFIG_TOOLBAR"
 #define HID_SVX_CONFIG_TOOLBAR_CONTENTS "CUI_HID_SVX_CONFIG_TOOLBAR_CONTENTS"
-#define HID_SELECTOR_COMMANDS "CUI_HID_SELECTOR_COMMANDS"
 #define HID_GALLERY_EDIT_MSNAME "CUI_HID_GALLERY_EDIT_MSNAME"
 #define HID_SVX_CONFIG_MENU "CUI_HID_SVX_CONFIG_MENU"
 #define HID_SVX_CONFIG_MENU_CONTENTS "CUI_HID_SVX_CONFIG_MENU_CONTENTS"
diff --git a/cui/source/inc/selector.hxx b/cui/source/inc/selector.hxx
index c4a8c7e..28459b3 100644
--- a/cui/source/inc/selector.hxx
+++ b/cui/source/inc/selector.hxx
@@ -89,9 +89,9 @@ public:
     virtual Image GetImage( const rtl::OUString& rCommandURL ) = 0;
 };
 
-class SvxConfigFunctionListBox_Impl : public SvTreeListBox
+class SvxConfigFunctionListBox : public SvTreeListBox
 {
-friend class SvxConfigGroupListBox_Impl;
+friend class SvxConfigGroupListBox;
     Timer                           aTimer;
     SvTreeListEntry*                    pCurEntry;
     SvxGroupInfoArr_Impl            aArr;
@@ -100,13 +100,16 @@ friend class SvxConfigGroupListBox_Impl;
     DECL_LINK(TimerHdl, void *);
     virtual void                    MouseMove( const MouseEvent& rMEvt );
 
+    void Init();
+
 public:
-                                    SvxConfigFunctionListBox_Impl( Window*, const ResId& );
-                                    ~SvxConfigFunctionListBox_Impl();
+                                    SvxConfigFunctionListBox(Window*, const ResId&);
+                                    SvxConfigFunctionListBox(Window* pParent);
+                                    ~SvxConfigFunctionListBox();
     void                            ClearAll();
     String                          GetHelpText( SvTreeListEntry *pEntry );
     using Window::GetHelpText;
-    SvTreeListEntry*                    GetLastSelectedEntry();
+    SvTreeListEntry*                GetLastSelectedEntry();
     void                            FunctionSelected();
 
     // drag n drop methods
@@ -118,12 +121,12 @@ public:
     virtual void        DragFinished( sal_Int8 );
 };
 
-class SvxConfigGroupListBox_Impl : public SvTreeListBox
+class SvxConfigGroupListBox : public SvTreeListBox
 {
     SvxGroupInfoArr_Impl            aArr;
     bool                            m_bShowSlots;
 
-    SvxConfigFunctionListBox_Impl*  pFunctionListBox;
+    SvxConfigFunctionListBox*  pFunctionListBox;
     ImageProvider*                  m_pImageProvider;
 
     ::com::sun::star::uno::Reference
@@ -162,21 +165,23 @@ protected:
     using SvListView::Expand;
 
 public:
-            SvxConfigGroupListBox_Impl (
+            SvxConfigGroupListBox (
                 Window* pParent, const ResId&,
                 bool _bShowSlots,
                 const ::com::sun::star::uno::Reference
                     < ::com::sun::star::frame::XFrame >& xFrame
             );
+            SvxConfigGroupListBox(Window* pParent);
+            ~SvxConfigGroupListBox();
 
-            ~SvxConfigGroupListBox_Impl();
+    void    Init(bool bShowSlots, const ::com::sun::star::uno::Reference
+                    < ::com::sun::star::frame::XFrame >& xFrame);
 
-    void    Init();
     void    Open( SvTreeListEntry*, sal_Bool );
     void    ClearAll();
     void    GroupSelected();
 
-    void    SetFunctionListBox( SvxConfigFunctionListBox_Impl *pBox )
+    void    SetFunctionListBox( SvxConfigFunctionListBox *pBox )
         { pFunctionListBox = pBox; }
 
     void    SetImageProvider( ImageProvider* provider )
@@ -185,26 +190,21 @@ public:
 
 class SvxScriptSelectorDialog : public ModelessDialog
 {
-    FixedText                       aDialogDescription;
-    FixedText                       aGroupText;
-    SvxConfigGroupListBox_Impl      aCategories;
-    FixedText                       aFunctionText;
-    SvxConfigFunctionListBox_Impl   aCommands;
-    OKButton                        aOKButton;
-    CancelButton                    aCancelButton;
-    HelpButton                      aHelpButton;
-    FixedLine                       aDescription;
-    FixedText                       aDescriptionText;
-
-    sal_Bool                            m_bShowSlots;
+    FixedText*                      m_pDialogDescription;
+    SvxConfigGroupListBox*          m_pCategories;
+    SvxConfigFunctionListBox*       m_pCommands;
+    PushButton*                     m_pOKButton;
+    PushButton*                     m_pCancelButton;
+    VclMultiLineEdit*               m_pDescriptionText;
+    OUString                        m_sDefaultDesc;
+    sal_Bool                        m_bShowSlots;
     Link                            m_aAddHdl;
 
     DECL_LINK( ClickHdl, Button * );
     DECL_LINK( SelectHdl, Control* );
     DECL_LINK( FunctionDoubleClickHdl, Control* );
 
-    void                                UpdateUI();
-    void                                ResizeControls();
+    void                            UpdateUI();
 
 public:
 
@@ -220,8 +220,10 @@ public:
     void        SetAddHdl( const Link& rLink ) { m_aAddHdl = rLink; }
     const Link& GetAddHdl() const { return m_aAddHdl; }
 
-    void        SetImageProvider( ImageProvider* provider )
-        { aCategories.SetImageProvider( provider ); }
+    void        SetImageProvider(ImageProvider* provider)
+    {
+        m_pCategories->SetImageProvider(provider);
+    }
 
     String      GetScriptURL() const;
     String      GetSelectedDisplayName();
diff --git a/cui/uiconfig/ui/macroselectordialog.ui b/cui/uiconfig/ui/macroselectordialog.ui
new file mode 100644
index 0000000..104b45e
--- /dev/null
+++ b/cui/uiconfig/ui/macroselectordialog.ui
@@ -0,0 +1,358 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkDialog" id="MacroSelectorDialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">5</property>
+    <property name="title" translatable="yes">Macro Selector</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="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="can_focus">False</property>
+            <property name="orientation">vertical</property>
+            <property name="layout_style">start</property>
+            <child>
+              <object class="GtkButton" id="ok">
+                <property name="label">gtk-ok</property>
+                <property name="use_action_appearance">False</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="no_show_all">True</property>
+                <property name="use_action_appearance">False</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="add">
+                <property name="label">Add</property>
+                <property name="use_action_appearance">False</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="no_show_all">True</property>
+                <property name="use_action_appearance">False</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="cancel">
+                <property name="label">gtk-cancel</property>
+                <property name="use_action_appearance">False</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="no_show_all">True</property>
+                <property name="use_action_appearance">False</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="close">
+                <property name="label">gtk-close</property>
+                <property name="use_action_appearance">False</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="no_show_all">True</property>
+                <property name="use_action_appearance">False</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>
+            <child>
+              <object class="GtkButton" id="help">
+                <property name="label">gtk-help</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">4</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="GtkBox" id="box1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="orientation">vertical</property>
+            <property name="spacing">11</property>
+            <child>
+              <object class="GtkLabel" id="helpmacro">
+                <property name="can_focus">False</property>
+                <property name="no_show_all">True</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Select the library that contains the macro you want. Then select the macro under 'Macro name'.</property>
+                <property name="wrap">True</property>
+                <property name="max_width_chars">60</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="helptoolbar">
+                <property name="can_focus">False</property>
+                <property name="no_show_all">True</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">To add a command to a toolbar, select the category and then the command. Then drag the command to the Commands list of the Toolbars tab page in the Customize dialog.</property>
+                <property name="wrap">True</property>
+                <property name="max_width_chars">60</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkBox" id="box2">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="homogeneous">True</property>
+                <child>
+                  <object class="GtkFrame" id="frame2">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</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="cuilo:SvxConfigGroupListBox" id="categories">
+                            <property name="height_request">300</property>
+                            <property name="width_request">200</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkBox" id="box3">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <child>
+                          <object class="GtkLabel" id="libraryft">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Library</property>
+                            <attributes>
+                              <attribute name="weight" value="bold"/>
+                            </attributes>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="categoryft">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Category</property>
+                            <attributes>
+                              <attribute name="weight" value="bold"/>
+                            </attributes>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </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="frame3">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</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="cuilo:SvxConfigFunctionListBox" id="commands">
+                            <property name="height_request">300</property>
+                            <property name="width_request">200</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkBox" id="box4">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <child>
+                          <object class="GtkLabel" id="macronameft">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Macro name</property>
+                            <property name="track_visited_links">False</property>
+                            <attributes>
+                              <attribute name="weight" value="bold"/>
+                            </attributes>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="commandsft">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Commands</property>
+                            <property name="track_visited_links">False</property>
+                            <attributes>
+                              <attribute name="weight" value="bold"/>
+                            </attributes>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">2</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="top_padding">6</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkScrolledWindow" id="scrolledwindow1">
+                        <property name="height_request">100</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="hexpand">True</property>
+                        <property name="vexpand">True</property>
+                        <property name="shadow_type">in</property>
+                        <child>
+                          <object class="GtkTextView" id="description">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="editable">False</property>
+                            <property name="wrap_mode">word</property>
+                            <property name="cursor_visible">False</property>
+                          </object>
+                        </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">Description</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">3</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">add</action-widget>
+      <action-widget response="0">cancel</action-widget>
+      <action-widget response="0">close</action-widget>
+      <action-widget response="0">help</action-widget>
+    </action-widgets>
+  </object>
+</interface>
diff --git a/cui/util/hidother.src b/cui/util/hidother.src
index 8d13058..5f75101 100644
--- a/cui/util/hidother.src
+++ b/cui/util/hidother.src
@@ -149,9 +149,6 @@ hidspecial HID_REDLINING_EDIT               { HelpID = HID_REDLINING_EDIT; };
 hidspecial HID_REDLINING_NEXT               { HelpID = HID_REDLINING_NEXT; };
 hidspecial HID_REDLINING_PREV               { HelpID = HID_REDLINING_PREV; };
 hidspecial HID_SCRIPTSBOX             { HelpId = HID_SCRIPTSBOX; };
-hidspecial HID_SELECTOR_CATEGORIES    { HelpId = HID_SELECTOR_CATEGORIES; };
-hidspecial HID_SELECTOR_COMMANDS      { HelpId = HID_SELECTOR_COMMANDS; };
-hidspecial HID_SELECTOR_DIALOG        { HelpId = HID_SELECTOR_DIALOG; };
 hidspecial HID_SPLDLG_BUTTON_CHANGE             { HelpID =  HID_SPLDLG_BUTTON_CHANGE      ; };
 hidspecial HID_SPLDLG_BUTTON_CHANGEALL          { HelpID =  HID_SPLDLG_BUTTON_CHANGEALL   ; };
 hidspecial HID_SPLDLG_BUTTON_CLOSE              { HelpID =  HID_SPLDLG_BUTTON_CLOSE       ; };
commit 502be5d920d4ebdec95d2c8dde5b0996b826a8e8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Oct 31 11:39:47 2012 +0000

    default ScrolledWindow to autoscroll
    
    Change-Id: I5297e4b9480066000bf6d72e54a5d8117528b90c

diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index abe6e27..c7ee09e 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -547,7 +547,7 @@ public:
     VclScrolledWindow(Window *pParent)
         : Window(WINDOW_SCROLLWINDOW)
     {
-        ImplInit(pParent, WB_HIDE, NULL);
+        ImplInit(pParent, WB_HIDE | WB_AUTOHSCROLL | WB_AUTOVSCROLL, NULL);
     }
 };
 
commit b57f978104ab72592d047b0188191d5c78c24220
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Oct 31 11:15:09 2012 +0000

    support cursor-visible property
    
    Change-Id: I2dfb2fa16c64035ef529cec650df7e4bd9c80483

diff --git a/vcl/inc/vcl/vclmedit.hxx b/vcl/inc/vcl/vclmedit.hxx
index 0264b4a..bdc5e25 100644
--- a/vcl/inc/vcl/vclmedit.hxx
+++ b/vcl/inc/vcl/vclmedit.hxx
@@ -138,6 +138,8 @@ public:
 
     void            SetTextSelectable( sal_Bool bTextSelectable );
     void            EnableCursor( sal_Bool bEnable );
+
+    virtual bool set_property(const rtl::OString &rKey, const rtl::OString &rValue);
 };
 
 inline sal_uLong VclMultiLineEdit::IsUpdateDataEnabled() const
diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx
index bee4278..da1ba59 100644
--- a/vcl/source/edit/vclmedit.cxx
+++ b/vcl/source/edit/vclmedit.cxx
@@ -29,7 +29,7 @@
 #include <memory>
 
 #include <tools/rc.h>
-
+#include <vcl/builder.hxx>
 #include <vcl/decoview.hxx>
 #include <vcl/svapp.hxx>
 
@@ -1574,4 +1574,13 @@ void VclMultiLineEdit::EnableCursor( sal_Bool bEnable )
     GetTextView()->EnableCursor( bEnable );
 }
 
+bool VclMultiLineEdit::set_property(const rtl::OString &rKey, const rtl::OString &rValue)
+{
+    if (rKey.equalsL(RTL_CONSTASCII_STRINGPARAM("cursor-visible")))
+        EnableCursor(toBool(rValue));
+    else
+        return Edit::set_property(rKey, rValue);
+    return true;
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list