[Libreoffice-commits] core.git: 7 commits - cui/AllLangResTarget_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk drawinglayer/source extras/source include/sfx2 include/svx svx/source

Caolán McNamara caolanm at redhat.com
Thu Jan 23 06:11:31 PST 2014


 cui/AllLangResTarget_cui.mk                         |    1 
 cui/UIConfig_cui.mk                                 |    2 
 cui/source/customize/acccfg.cxx                     |    6 
 cui/source/customize/cfgutil.cxx                    |  110 ++++++--
 cui/source/customize/macropg.cxx                    |    2 
 cui/source/inc/acccfg.hxx                           |    8 
 cui/source/inc/cfgutil.hxx                          |   26 +-
 cui/source/inc/helpid.hrc                           |    3 
 cui/source/inc/macroass.hxx                         |    6 
 cui/source/tabpages/macroass.cxx                    |  120 +++------
 cui/source/tabpages/macroass.hrc                    |   71 -----
 cui/source/tabpages/macroass.src                    |  107 --------
 cui/uiconfig/ui/eventassigndialog.ui                |   82 ++++++
 cui/uiconfig/ui/eventassignpage.ui                  |  246 ++++++++++++++++++++
 drawinglayer/source/primitive2d/cropprimitive2d.cxx |  172 +++++--------
 extras/source/glade/libreoffice-catalog.xml.in      |   12 
 include/sfx2/macropg.hxx                            |  129 ----------
 include/svx/sdr/contact/viewcontactofgraphic.hxx    |    3 
 svx/source/sdr/contact/viewcontactofgraphic.cxx     |    8 
 19 files changed, 557 insertions(+), 557 deletions(-)

New commits:
commit bb250c58320874d2a830b49375173240fc12ee4b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jan 23 13:38:29 2014 +0000

    remove dangling old sfx2 copy of macropg.hxx
    
    Change-Id: I9a1e2d9b3c526e70fb1c598198e399d2f854761b

diff --git a/include/sfx2/macropg.hxx b/include/sfx2/macropg.hxx
deleted file mode 100644
index a641155..0000000
--- a/include/sfx2/macropg.hxx
+++ /dev/null
@@ -1,129 +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 .
- */
-#ifndef INCLUDED_SFX2_MACROPG_HXX
-#define INCLUDED_SFX2_MACROPG_HXX
-
-#include <sal/config.h>
-#include <sfx2/dllapi.h>
-
-#include <sfx2/basedlgs.hxx>
-#include <sfx2/tabdlg.hxx>
-#include <svl/macitem.hxx>
-#include <vcl/lstbox.hxx>
-#include <com/sun/star/frame/XFrame.hpp>
-
-class _SfxMacroTabPage;
-class SvTabListBox;
-class Edit;
-namespace rtl {
-    class OUString;
-}
-class SfxObjectShell;
-
-class SfxConfigFunctionListBox_Impl;
-
-class _HeaderTabListBox;
-class _SfxMacroTabPage_Impl;
-
-class SFX2_DLLPUBLIC _SfxMacroTabPage : public SfxTabPage
-{
-    SvxMacroTableDtor           aTbl;
-
-    DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, SelectEvent_Impl, SvTabListBox * );
-    DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, SelectGroup_Impl, ListBox * );
-    DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, SelectMacro_Impl, ListBox * );
-
-    DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, DoubleClickHdl_Impl, Control* );
-    DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, AssignDeleteHdl_Impl, PushButton * );
-
-    DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, ChangeScriptHdl_Impl, RadioButton * );
-    DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, GetFocus_Impl, Edit* );
-    DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, TimeOut_Impl, Timer* );
-
-protected:
-    _SfxMacroTabPage_Impl*      mpImpl;
-
-                                _SfxMacroTabPage( Window* pParent, const ResId& rId, const SfxItemSet& rItemSet );
-
-    void                        InitAndSetHandler();
-    void                        FillEvents();
-    void                        FillMacroList();
-    void                        EnableButtons( const rtl::OUString& rLanguage );
-
-public:
-
-    virtual                     ~_SfxMacroTabPage();
-
-    void                        AddEvent( const rtl::OUString & rEventName, sal_uInt16 nEventId );
-
-    const SvxMacroTableDtor&    GetMacroTbl() const;
-    void                        SetMacroTbl( const SvxMacroTableDtor& rTbl );
-
-    virtual void                ScriptChanged( const rtl::OUString& rLanguage );
-
-    // --------- Erben aus der Basis -------------
-    virtual sal_Bool                FillItemSet( SfxItemSet& rSet );
-    virtual void                Reset( const SfxItemSet& rSet );
-
-    void                        SetReadOnly( sal_Bool bSet );
-    sal_Bool                        IsReadOnly() const;
-    void                        SelectEvent( const rtl::OUString& rEventName, sal_uInt16 nEventId );
-};
-
-inline const SvxMacroTableDtor& _SfxMacroTabPage::GetMacroTbl() const
-{
-    return aTbl;
-}
-
-inline void _SfxMacroTabPage::SetMacroTbl( const SvxMacroTableDtor& rTbl )
-{
-    aTbl = rTbl;
-}
-
-class SFX2_DLLPUBLIC SfxMacroTabPage : public _SfxMacroTabPage
-{
-public:
-    SfxMacroTabPage(
-        Window* pParent,
-        const ResId& rId,
-        const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxDocumentFrame,
-        const SfxItemSet& rSet
-    );
-
-    // --------- Erben aus der Basis -------------
-    static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
-};
-
-class SFX2_DLLPUBLIC SfxMacroAssignDlg : public SfxNoLayoutSingleTabDialog
-{
-public:
-    SfxMacroAssignDlg(
-        Window* pParent,
-        const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxDocumentFrame,
-        SfxItemSet& rSet );
-    SfxMacroAssignDlg(
-        Window* pParent,
-        const SfxObjectShell* _pShell,
-        SfxItemSet& rSet );
-    virtual ~SfxMacroAssignDlg();
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 8e885d747a7f82e6d33213e6cd7390dac49fad57
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jan 23 12:57:03 2014 +0000

    drop now unused hids
    
    Change-Id: I1637b65b96f3ac74cd6d393b046442814c101865

diff --git a/cui/source/inc/helpid.hrc b/cui/source/inc/helpid.hrc
index 80990b5..50e7475 100644
--- a/cui/source/inc/helpid.hrc
+++ b/cui/source/inc/helpid.hrc
@@ -188,9 +188,6 @@
 #define HID_ACCELCONFIG_LISTBOX "CUI_HID_ACCELCONFIG_LISTBOX"
 #define HID_CONFIGGROUP_ACC_LISTBOX "CUI_HID_CONFIGGROUP_ACC_LISTBOX"
 #define HID_CONFIGFUNCTION_ACC_LISTBOX "CUI_HID_CONFIGFUNCTION_ACC_LISTBOX"
-#define HID_MACRO_LB_EVENT "CUI_HID_MACRO_LB_EVENT"
-#define HID_MACRO_GROUP "CUI_HID_MACRO_GROUP"
-#define HID_MACRO_MACROS "CUI_HID_MACRO_MACROS"
 #define HID_DIALOG_HANGULHANJA "CUI_HID_DIALOG_HANGULHANJA"
 #define HID_HANGULHANJA_EDIT_DLG "CUI_HID_HANGULHANJA_EDIT_DLG"
 #define HID_MULTIPATH "CUI_HID_MULTIPATH"
commit 95beca723e2f41681c8ee69a6d2db617f09514bf
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jan 23 12:53:37 2014 +0000

    make event assign dialog horizontal
    
    Change-Id: Iea4d43b8f3dc52b4ec77a145347552bbcf09f062

diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index 71fa803..d57d883 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -38,6 +38,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
 	cui/uiconfig/ui/cuiimapdlg \
 	cui/uiconfig/ui/dimensionlinestabpage \
 	cui/uiconfig/ui/editdictionarydialog \
+	cui/uiconfig/ui/eventassigndialog \
 	cui/uiconfig/ui/eventassignpage \
 	cui/uiconfig/ui/formatnumberdialog \
 	cui/uiconfig/ui/gradientpage \
diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx
index f968f25..6c99eab 100644
--- a/cui/source/tabpages/macroass.cxx
+++ b/cui/source/tabpages/macroass.cxx
@@ -469,7 +469,8 @@ SfxTabPage* SfxMacroTabPage::Create( Window* pParent, const SfxItemSet& rAttrSet
 
 SfxMacroAssignDlg::SfxMacroAssignDlg(Window* pParent,
     const Reference< XFrame >& rxDocumentFrame, const SfxItemSet& rSet)
-    : SfxSingleTabDialog(pParent, rSet)
+    : SfxSingleTabDialog(pParent, rSet, "EventAssignDialog",
+        "cui/ui/eventassigndialog.ui")
 {
     SfxMacroTabPage* pPage = CreateSfxMacroTabPage(get_content_area(), rSet);
     pPage->SetFrame( rxDocumentFrame );
diff --git a/cui/uiconfig/ui/eventassigndialog.ui b/cui/uiconfig/ui/eventassigndialog.ui
new file mode 100644
index 0000000..2121d6a
--- /dev/null
+++ b/cui/uiconfig/ui/eventassigndialog.ui
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.0 on Thu Jan 23 12:51:57 2014 -->
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkDialog" id="EventAssignDialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">6</property>
+    <property name="title" translatable="yes">Assign Macro</property>
+    <property name="type_hint">normal</property>
+    <child internal-child="vbox">
+      <object class="GtkBox" id="dialog-vbox1">
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">12</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="ok">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="help">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
+          <placeholder/>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="0">ok</action-widget>
+      <action-widget response="0">cancel</action-widget>
+      <action-widget response="0">help</action-widget>
+    </action-widgets>
+  </object>
+</interface>
commit df942dcf9d271cb95b17ad4b4616626e9b15b575
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jan 23 11:41:20 2014 +0000

    convert event assign page to .ui format
    
    Change-Id: I99312fdba95a868c836af6452abec31565f2d067

diff --git a/cui/AllLangResTarget_cui.mk b/cui/AllLangResTarget_cui.mk
index 4d16fd8..3650b3d 100644
--- a/cui/AllLangResTarget_cui.mk
+++ b/cui/AllLangResTarget_cui.mk
@@ -58,7 +58,6 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\
     cui/source/tabpages/autocdlg.src \
     cui/source/tabpages/border.src \
     cui/source/tabpages/frmdirlbox.src \
-    cui/source/tabpages/macroass.src \
     cui/source/tabpages/page.src \
     cui/source/tabpages/paragrph.src \
     cui/source/tabpages/strings.src \
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index 87ed9afe..71fa803 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -38,6 +38,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
 	cui/uiconfig/ui/cuiimapdlg \
 	cui/uiconfig/ui/dimensionlinestabpage \
 	cui/uiconfig/ui/editdictionarydialog \
+	cui/uiconfig/ui/eventassignpage \
 	cui/uiconfig/ui/formatnumberdialog \
 	cui/uiconfig/ui/gradientpage \
 	cui/uiconfig/ui/colorconfigwin \
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index 970d72f..419eead 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -726,7 +726,7 @@ SfxAcceleratorConfigPage::SfxAcceleratorConfigPage( Window* pParent, const SfxIt
     , aChangeButton           (this   , CUI_RES(BTN_ACC_CHANGE          ))
     , aRemoveButton           (this   , CUI_RES(BTN_ACC_REMOVE          ))
     , aGroupText              (this   , CUI_RES(TXT_ACC_GROUP           ))
-    , pGroupLBox(new SfxConfigGroupListBox( this, CUI_RES(BOX_ACC_GROUP), SFX_SLOT_ACCELCONFIG ))
+    , pGroupLBox(new SfxConfigGroupListBox( this, CUI_RES(BOX_ACC_GROUP) ))
     , aFunctionText           (this   , CUI_RES(TXT_ACC_FUNCTION        ))
     , pFunctionBox(new SfxConfigFunctionListBox( this, CUI_RES( BOX_ACC_FUNCTION )))
     , aKeyText                (this   , CUI_RES(TXT_ACC_KEY             ))
@@ -1184,7 +1184,7 @@ IMPL_LINK_NOARG(SfxAcceleratorConfigPage, RadioHdl)
     aEntriesBox.SetUpdateMode( sal_True );
     aEntriesBox.Invalidate();
 
-    pGroupLBox->Init(m_xContext, m_xFrame, m_sModuleLongName);
+    pGroupLBox->Init(m_xContext, m_xFrame, m_sModuleLongName, true);
 
     // pb: #133213# do not select NULL entries
     SvTreeListEntry* pEntry = aEntriesBox.GetEntry( 0, 0 );
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index ee0722a0..a221b8a 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -59,6 +59,7 @@
 #include <unotools/configmgr.hxx>
 #include "dialmgr.hxx"
 #include <svl/stritem.hxx>
+#include <vcl/builder.hxx>
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -248,7 +249,7 @@ void SfxStylesInfo_Impl::getLabel4Style(SfxStyleInfo_Impl& aStyle)
     return lStyles;
 }
 
-SfxConfigFunctionListBox::SfxConfigFunctionListBox( Window* pParent, const ResId& rResId)
+SfxConfigFunctionListBox::SfxConfigFunctionListBox(Window* pParent, const ResId& rResId)
     : SvTreeListBox( pParent, rResId )
     , pCurEntry( 0 )
     , pStylesInfo( 0 )
@@ -262,6 +263,31 @@ SfxConfigFunctionListBox::SfxConfigFunctionListBox( Window* pParent, const ResId
         LINK( this, SfxConfigFunctionListBox, TimerHdl ) );
 }
 
+SfxConfigFunctionListBox::SfxConfigFunctionListBox(Window* pParent, WinBits nStyle)
+    : SvTreeListBox( pParent, nStyle )
+    , pCurEntry( 0 )
+    , pStylesInfo( 0 )
+{
+    SetStyle( GetStyle() | WB_CLIPCHILDREN | WB_HSCROLL | WB_SORT );
+    GetModel()->SetSortMode( SortAscending );
+
+    // Timer for the BallonHelp
+    aTimer.SetTimeout( 200 );
+    aTimer.SetTimeoutHdl(
+        LINK( this, SfxConfigFunctionListBox, TimerHdl ) );
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSfxConfigFunctionListBox(Window *pParent, VclBuilder::stringmap &rMap)
+{
+    WinBits nWinBits = WB_TABSTOP;
+
+    OString sBorder = VclBuilder::extractCustomProperty(rMap);
+    if (!sBorder.isEmpty())
+       nWinBits |= WB_BORDER;
+
+    return new SfxConfigFunctionListBox(pParent, nWinBits);
+}
+
 SfxConfigFunctionListBox::~SfxConfigFunctionListBox()
 {
     ClearAll();
@@ -398,15 +424,32 @@ SvxConfigGroupBoxResource_Impl::SvxConfigGroupBoxResource_Impl() :
     FreeResource();
 }
 
-SfxConfigGroupListBox::SfxConfigGroupListBox(
-    Window* pParent, const ResId& rResId, sal_uLong nConfigMode )
-        : SvTreeListBox( pParent, rResId )
-        , pImp(new SvxConfigGroupBoxResource_Impl()), pFunctionListBox(0), nMode( nConfigMode ), pStylesInfo(0)
+SfxConfigGroupListBox::SfxConfigGroupListBox(Window* pParent, const ResId& rResId)
+    : SvTreeListBox( pParent, rResId )
+    , pImp(new SvxConfigGroupBoxResource_Impl()), pFunctionListBox(0), pStylesInfo(0)
 {
     SetStyle( GetStyle() | WB_CLIPCHILDREN | WB_HSCROLL | WB_HASBUTTONS | WB_HASLINES | WB_HASLINESATROOT | WB_HASBUTTONSATROOT );
     SetNodeBitmaps( pImp->m_collapsedImage, pImp->m_expandedImage );
 }
 
+SfxConfigGroupListBox::SfxConfigGroupListBox(Window* pParent, WinBits nStyle)
+    : SvTreeListBox(pParent, nStyle)
+    , pImp(new SvxConfigGroupBoxResource_Impl()), pFunctionListBox(0), pStylesInfo(0)
+{
+    SetStyle( GetStyle() | WB_CLIPCHILDREN | WB_HSCROLL | WB_HASBUTTONS | WB_HASLINES | WB_HASLINESATROOT | WB_HASBUTTONSATROOT );
+    SetNodeBitmaps( pImp->m_collapsedImage, pImp->m_expandedImage );
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSfxConfigGroupListBox(Window *pParent, VclBuilder::stringmap &rMap)
+{
+    WinBits nWinBits = WB_TABSTOP;
+
+    OString sBorder = VclBuilder::extractCustomProperty(rMap);
+    if (!sBorder.isEmpty())
+       nWinBits |= WB_BORDER;
+
+    return new SfxConfigGroupListBox(pParent, nWinBits);
+}
 
 SfxConfigGroupListBox::~SfxConfigGroupListBox()
 {
@@ -539,8 +582,9 @@ namespace
 
 //-----------------------------------------------
 void SfxConfigGroupListBox::Init(const css::uno::Reference< css::uno::XComponentContext >& xContext,
-                                      const css::uno::Reference< css::frame::XFrame >&          xFrame,
-                                      const OUString&                                        sModuleLongName)
+    const css::uno::Reference< css::frame::XFrame >& xFrame,
+    const OUString& sModuleLongName,
+    bool bEventMode)
 {
     SetUpdateMode(sal_False);
     ClearAll(); // Remove all old entries from treelist box
@@ -580,7 +624,7 @@ void SfxConfigGroupListBox::Init(const css::uno::Reference< css::uno::XComponent
 
     if ( rootNode.is() )
     {
-        if ( nMode )
+        if ( bEventMode )
         {
                 //We call acquire on the XBrowseNode so that it does not
                 //get autodestructed and become invalid when accessed later.
diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx
index 3542706..fa2fbc9 100644
--- a/cui/source/customize/macropg.cxx
+++ b/cui/source/customize/macropg.cxx
@@ -164,7 +164,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeMacroEventListBox(Window *p
 
 Size MacroEventListBox::GetOptimalSize() const
 {
-    return LogicToPixel(Size(192, 200), MapMode(MAP_APPFONT ));
+    return LogicToPixel(Size(192, 72), MapMode(MAP_APPFONT ));
 }
 
 void MacroEventListBox::Resize()
diff --git a/cui/source/inc/cfgutil.hxx b/cui/source/inc/cfgutil.hxx
index 666cc88..2325aaa 100644
--- a/cui/source/inc/cfgutil.hxx
+++ b/cui/source/inc/cfgutil.hxx
@@ -111,8 +111,9 @@ class SfxConfigFunctionListBox : public SvTreeListBox
     virtual void  MouseMove( const MouseEvent& rMEvt );
 
 public:
-                  SfxConfigFunctionListBox( Window*, const ResId& );
-                  ~SfxConfigFunctionListBox();
+    SfxConfigFunctionListBox(Window*, const ResId&);
+    SfxConfigFunctionListBox(Window*, WinBits nStyle);
+    ~SfxConfigFunctionListBox();
 
     void          ClearAll();
     using Window::GetHelpText;
@@ -130,7 +131,6 @@ class SfxConfigGroupListBox : public SvTreeListBox
     SvxConfigGroupBoxResource_Impl* pImp;
     SfxConfigFunctionListBox*  pFunctionListBox;
     SfxGroupInfoArr_Impl            aArr;
-    sal_uLong                       nMode;
 
     OUString m_sModuleLongName;
     css::uno::Reference< css::uno::XComponentContext > m_xContext;
@@ -165,15 +165,15 @@ protected:
     virtual sal_Bool        Expand( SvTreeListEntry* pParent );
 
 public:
-    SfxConfigGroupListBox ( Window* pParent,
-                                 const ResId&,
-                                 sal_uLong nConfigMode = 0 );
+    SfxConfigGroupListBox(Window* pParent, const ResId&);
+    SfxConfigGroupListBox(Window* pParent, WinBits nStyle);
     ~SfxConfigGroupListBox();
     void                ClearAll();
 
     void                Init(const css::uno::Reference< css::uno::XComponentContext >& xContext,
                              const css::uno::Reference< css::frame::XFrame >&          xFrame,
-                             const OUString&                                        sModuleLongName);
+                             const OUString&                                        sModuleLongName,
+                             bool bEventMode);
     void                SetFunctionListBox( SfxConfigFunctionListBox *pBox )
                         { pFunctionListBox = pBox; }
     void                Open( SvTreeListEntry*, sal_Bool );
diff --git a/cui/source/inc/macroass.hxx b/cui/source/inc/macroass.hxx
index 149197a..abe8254 100644
--- a/cui/source/inc/macroass.hxx
+++ b/cui/source/inc/macroass.hxx
@@ -47,7 +47,7 @@ class _SfxMacroTabPage : public SfxTabPage
 protected:
     _SfxMacroTabPage_Impl*      mpImpl;
 
-                                _SfxMacroTabPage( Window* pParent, const ResId& rId, const SfxItemSet& rItemSet );
+                                _SfxMacroTabPage( Window* pParent, const SfxItemSet& rItemSet );
 
     void                        InitAndSetHandler();
     void                        FillEvents();
@@ -91,7 +91,6 @@ class SfxMacroTabPage : public _SfxMacroTabPage
 public:
     SfxMacroTabPage(
         Window* pParent,
-        const ResId& rId,
         const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxDocumentFrame,
         const SfxItemSet& rSet
     );
@@ -100,14 +99,13 @@ public:
     static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
 };
 
-class SfxMacroAssignDlg : public SfxNoLayoutSingleTabDialog
+class SfxMacroAssignDlg : public SfxSingleTabDialog
 {
 public:
     SfxMacroAssignDlg(
         Window* pParent,
         const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxDocumentFrame,
         const SfxItemSet& rSet );
-    virtual ~SfxMacroAssignDlg();
 };
 
 #endif
diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx
index f1ec3a5..f968f25 100644
--- a/cui/source/tabpages/macroass.cxx
+++ b/cui/source/tabpages/macroass.cxx
@@ -29,7 +29,6 @@
 #include <sfx2/app.hxx>
 #include <sfx2/evntconf.hxx>
 #include <sfx2/objsh.hxx>
-#include "macroass.hrc"
 #include "cuires.hrc"
 #include <vcl/fixed.hxx>
 #include "headertablistbox.hxx"
@@ -42,60 +41,39 @@ using ::com::sun::star::frame::XFrame;
 class _SfxMacroTabPage_Impl
 {
 public:
-    _SfxMacroTabPage_Impl( void );
-    ~_SfxMacroTabPage_Impl();
+    _SfxMacroTabPage_Impl();
 
     OUString                        maStaticMacroLBLabel;
     PushButton*                     pAssignPB;
     PushButton*                     pDeletePB;
-    OUString*                       pStrEvent;
-    OUString*                       pAssignedMacro;
+    OUString                        sStrEvent;
+    OUString                        sAssignedMacro;
     MacroEventListBox*              pEventLB;
+    VclFrame*                       pGroupFrame;
     SfxConfigGroupListBox*          pGroupLB;
-    FixedText*                      pFT_MacroLBLabel;
+    VclFrame*                       pMacroFrame;
     SfxConfigFunctionListBox*       pMacroLB;
 
-    FixedText*                      pMacroFT;
-    OUString*                       pMacroStr;
-
     sal_Bool                            bReadOnly;
     Timer                           maFillGroupTimer;
     sal_Bool                            bGotEvents;
     bool m_bDummyActivated; ///< has this tab page already been activated
 };
 
-_SfxMacroTabPage_Impl::_SfxMacroTabPage_Impl( void ) :
-    pAssignPB( NULL ),
-    pDeletePB( NULL ),
-    pStrEvent( NULL ),
-    pAssignedMacro( NULL ),
-    pEventLB( NULL ),
-    pGroupLB( NULL ),
-    pFT_MacroLBLabel( NULL ),
-    pMacroLB( NULL ),
-    pMacroFT( NULL ),
-    pMacroStr( NULL ),
-    bReadOnly( sal_False ),
-    bGotEvents( sal_False )
+_SfxMacroTabPage_Impl::_SfxMacroTabPage_Impl()
+    : pAssignPB(NULL)
+    , pDeletePB(NULL)
+    , pEventLB(NULL)
+    , pGroupFrame(NULL)
+    , pGroupLB(NULL)
+    , pMacroFrame(NULL)
+    , pMacroLB(NULL)
+    , bReadOnly(false)
+    , bGotEvents(false)
     , m_bDummyActivated(false)
 {
 }
 
-_SfxMacroTabPage_Impl::~_SfxMacroTabPage_Impl()
-{
-    delete pAssignPB;
-    delete pDeletePB;
-    delete pStrEvent;
-    delete pAssignedMacro;
-    delete pEventLB;
-    delete pGroupLB;
-    delete pMacroLB;
-    delete pFT_MacroLBLabel;
-    delete pMacroFT;
-    delete pMacroStr;
-}
-
-
 static sal_uInt16 aPageRg[] = {
     SID_ATTR_MACROITEM, SID_ATTR_MACROITEM,
     0
@@ -157,9 +135,8 @@ void _SfxMacroTabPage::EnableButtons()
         mpImpl->pAssignPB->Enable( sal_False );
 }
 
-_SfxMacroTabPage::_SfxMacroTabPage( Window* pParent, const ResId& rResId, const SfxItemSet& rAttrSet )
-    : SfxTabPage( pParent, rResId, rAttrSet )
-
+_SfxMacroTabPage::_SfxMacroTabPage(Window* pParent, const SfxItemSet& rAttrSet)
+    : SfxTabPage(pParent, "EventAssignPage", "cui/ui/eventassignpage.ui", rAttrSet)
 {
     mpImpl = new _SfxMacroTabPage_Impl;
 }
@@ -189,11 +166,8 @@ void _SfxMacroTabPage::AddEvent( const OUString & rEventName, sal_uInt16 nEventI
 void _SfxMacroTabPage::ScriptChanged()
 {
     // get new areas and their functions
-    {
-        mpImpl->pGroupLB->Show();
-        mpImpl->pMacroLB->Show();
-        mpImpl->pMacroFT->SetText( *mpImpl->pMacroStr );
-    }
+    mpImpl->pGroupFrame->Show();
+    mpImpl->pMacroFrame->Show();
 
     EnableButtons();
 }
@@ -307,7 +281,7 @@ IMPL_STATIC_LINK( _SfxMacroTabPage, SelectGroup_Impl, ListBox*, EMPTYARG )
     OUString       aLabelText;
     if( !sScriptURI.isEmpty() )
         aLabelText = pImpl->maStaticMacroLBLabel;
-    pImpl->pFT_MacroLBLabel->SetText( aLabelText );
+    pImpl->pMacroFrame->set_label( aLabelText );
 
     pThis->EnableButtons();
     return 0;
@@ -404,9 +378,9 @@ void _SfxMacroTabPage::InitAndSetHandler()
     rListBox.SetSelectionMode( SINGLE_SELECTION );
     rListBox.SetTabs( &nTabs[0], MAP_APPFONT );
     Size aSize( nTabs[ 2 ], 0 );
-    rHeaderBar.InsertItem( ITEMID_EVENT, *mpImpl->pStrEvent, LogicToPixel( aSize, MapMode( MAP_APPFONT ) ).Width() );
+    rHeaderBar.InsertItem( ITEMID_EVENT, mpImpl->sStrEvent, LogicToPixel( aSize, MapMode( MAP_APPFONT ) ).Width() );
     aSize.Width() = 1764;       // don't know what, so 42^2 is best to use...
-    rHeaderBar.InsertItem( ITMEID_ASSMACRO, *mpImpl->pAssignedMacro, LogicToPixel( aSize, MapMode( MAP_APPFONT ) ).Width() );
+    rHeaderBar.InsertItem( ITMEID_ASSMACRO, mpImpl->sAssignedMacro, LogicToPixel( aSize, MapMode( MAP_APPFONT ) ).Width() );
     rListBox.SetSpaceBetweenEntries( 0 );
 
     mpImpl->pEventLB->Show();
@@ -426,7 +400,7 @@ void _SfxMacroTabPage::FillMacroList()
         ::com::sun::star::uno::Reference<
             ::com::sun::star::uno::XComponentContext >(),
         GetFrame(),
-        OUString() );
+        OUString(), false);
 }
 
 void _SfxMacroTabPage::FillEvents()
@@ -459,22 +433,19 @@ void _SfxMacroTabPage::FillEvents()
     }
 }
 
-SfxMacroTabPage::SfxMacroTabPage( Window* pParent, const ResId& rResId, const Reference< XFrame >& rxDocumentFrame, const SfxItemSet& rSet )
-    : _SfxMacroTabPage( pParent, rResId, rSet )
+SfxMacroTabPage::SfxMacroTabPage(Window* pParent, const Reference< XFrame >& rxDocumentFrame, const SfxItemSet& rSet )
+    : _SfxMacroTabPage( pParent, rSet )
 {
-    mpImpl->pStrEvent           = new OUString(                 CUI_RES( STR_EVENT ) );
-    mpImpl->pAssignedMacro      = new OUString(                 CUI_RES( STR_ASSMACRO ) );
-    mpImpl->pEventLB            = new MacroEventListBox( this,  CUI_RES( LB_EVENT ) );
-    mpImpl->pAssignPB           = new PushButton( this,         CUI_RES( PB_ASSIGN ) );
-    mpImpl->pDeletePB           = new PushButton( this,         CUI_RES( PB_DELETE ) );
-    mpImpl->pMacroFT            = new FixedText( this,          CUI_RES( FT_MACRO ) );
-    mpImpl->pGroupLB            = new SfxConfigGroupListBox_Impl( this,     CUI_RES( LB_GROUP ) );
-    mpImpl->pFT_MacroLBLabel    = new FixedText( this,          CUI_RES( FT_LABEL4LB_MACROS ) );
-    mpImpl->maStaticMacroLBLabel= mpImpl->pFT_MacroLBLabel->GetText();
-    mpImpl->pMacroLB            = new SfxConfigFunctionListBox_Impl( this,  CUI_RES( LB_MACROS ) );
-    mpImpl->pMacroStr           = new OUString(                 CUI_RES( STR_MACROS ) );
-
-    FreeResource();
+    mpImpl->sStrEvent = get<FixedText>("eventft")->GetText();
+    mpImpl->sAssignedMacro = get<FixedText>("assignft")->GetText();
+    get(mpImpl->pEventLB , "assignments");
+    get(mpImpl->pAssignPB, "assign");
+    get(mpImpl->pDeletePB, "delete");
+    get(mpImpl->pGroupFrame, "groupframe");
+    get(mpImpl->pGroupLB, "libraries");
+    get(mpImpl->pMacroFrame, "macroframe");
+    mpImpl->maStaticMacroLBLabel = mpImpl->pMacroFrame->get_label();
+    get(mpImpl->pMacroLB, "macros");
 
     SetFrame( rxDocumentFrame );
 
@@ -487,7 +458,7 @@ namespace
 {
     SfxMacroTabPage* CreateSfxMacroTabPage( Window* pParent, const SfxItemSet& rAttrSet )
     {
-        return new SfxMacroTabPage( pParent, CUI_RES( RID_SVXPAGE_EVENTASSIGN ), NULL, rAttrSet );
+        return new SfxMacroTabPage( pParent, NULL, rAttrSet );
     }
 }
 
@@ -496,18 +467,14 @@ SfxTabPage* SfxMacroTabPage::Create( Window* pParent, const SfxItemSet& rAttrSet
     return CreateSfxMacroTabPage(pParent, rAttrSet);
 }
 
-SfxMacroAssignDlg::SfxMacroAssignDlg( Window* pParent, const Reference< XFrame >& rxDocumentFrame, const SfxItemSet& rSet )
-    : SfxNoLayoutSingleTabDialog( pParent, rSet, 0 )
+SfxMacroAssignDlg::SfxMacroAssignDlg(Window* pParent,
+    const Reference< XFrame >& rxDocumentFrame, const SfxItemSet& rSet)
+    : SfxSingleTabDialog(pParent, rSet)
 {
-    SfxMacroTabPage* pPage = CreateSfxMacroTabPage(this, rSet);
+    SfxMacroTabPage* pPage = CreateSfxMacroTabPage(get_content_area(), rSet);
     pPage->SetFrame( rxDocumentFrame );
-    SetTabPage( pPage );
+    setTabPage( pPage );
     pPage->LaunchFillGroup();
 }
 
-SfxMacroAssignDlg::~SfxMacroAssignDlg()
-{
-}
-
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/tabpages/macroass.hrc b/cui/source/tabpages/macroass.hrc
deleted file mode 100644
index 0eb1cb5..0000000
--- a/cui/source/tabpages/macroass.hrc
+++ /dev/null
@@ -1,71 +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 .
- */
-
-#ifndef _MACROASS_HRC
-#define _MACROASS_HRC
-
-#include <svtools/controldims.hrc>
-
-#define     LB_EVENT                2
-#define     PB_ASSIGN               3
-#define     PB_DELETE               4
-#define     FT_MACRO                5
-#define     LB_GROUP                6
-#define     LB_MACROS               7
-    // FREE
-#define     FT_LABEL4LB_MACROS      9
-#define     STR_MACROS              11
-#define     STR_EVENT               13
-#define     STR_ASSMACRO            14
-
-
-// COL0<---------------WIDTH_1_2--------------->COL3<->COL4<----WIDTH4---->COL5
-//     <--WIDTH1-->COL1<-SPACE1->COL2<--WIDTH2->
-
-#define WIDTH_TP        260                                     // of whole tabpage
-#define COL5            (WIDTH_TP-RSC_SP_DLG_INNERBORDER_RIGHT)
-#define COL4            (COL5-RSC_CD_PUSHBUTTON_WIDTH)
-#define COL3            (COL4-RSC_SP_CTRL_X)
-#define COL0            (RSC_SP_TBPG_INNERBORDER_LEFT)
-#define WIDTH1_2        (COL3-COL0)                             // width of upper listbox
-#define SPACE1          4                                       // space between lower listboxes
-#define WIDTH1          ((WIDTH1_2-SPACE1)/2)                   // width of lower left listbox
-#define WIDTH2          (WIDTH1_2-WIDTH1-SPACE1)                // width of lower right listbox
-#define COL1            (COL0+WIDTH1)
-#define COL2            (COL1+SPACE1)
-
-#define HEIGHT_TP       185                                     // of whole tabpage
-#define HEIGHT0         62                                      // of upper listbox
-#define ROW0            6                                       // more than RSC_SP_FLGR_INNERBORDER_TOP cause of bad design
-#define ROW1            (ROW0+RSC_CD_PUSHBUTTON_HEIGHT)         // Assign button
-#define ROW2            (ROW1+RSC_SP_CTRL_GROUP_Y)
-#define ROW3            (ROW2+RSC_CD_PUSHBUTTON_HEIGHT)         // Remove button
-#define ROW4            (ROW3+RSC_SP_CTRL_GROUP_Y)
-#define ROW5            (ROW4+RSC_CD_DROPDOWN_HEIGHT)           // script type listbox (hidden)
-#define ROW6            (ROW0+HEIGHT0)
-#define ROW7            (ROW6+RSC_SP_CTRL_Y)
-#define HEIGHT_EXTRA7   (RSC_CD_FIXEDTEXT_HEIGHT)               // additional height for FT_LABEL4LB_MACROS
-#define ROW7A           (ROW7+HEIGHT_EXTRA7)
-#define ROW8            (ROW7+RSC_CD_FIXEDTEXT_HEIGHT+HEIGHT_EXTRA7)// label for lower listboxes (2 lines!)
-#define ROW9            (HEIGHT_TP-RSC_SP_TBPG_INNERBORDER_BOTTOM)
-#define HEIGHT8         (ROW9-ROW8)                             // of lower listboxes
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/tabpages/macroass.src b/cui/source/tabpages/macroass.src
deleted file mode 100644
index 1d95bd3..0000000
--- a/cui/source/tabpages/macroass.src
+++ /dev/null
@@ -1,107 +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 .
- */
-
-#include "macroass.hrc"
-#include "cuires.hrc"
-#include "helpid.hrc"
-#include <svx/dialogs.hrc>
-
-TabPage RID_SVXPAGE_EVENTASSIGN
-{
-    HelpID = "cui:TabPage:RID_SVXPAGE_EVENTASSIGN";
-    Hide = TRUE ;
-    SVLook = TRUE ;
-    DialogControl = TRUE ;
-    Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
-    Text [ en-US ] = "Assign Macro" ;
-    String STR_EVENT
-    {
-        Text [ en-US ] = "Event" ;
-    };
-    String STR_ASSMACRO
-    {
-        Text [ en-US ] = "Assigned macro";
-    };
-    Control LB_EVENT
-    {
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( COL0 , ROW0 ) ;
-        Size = MAP_APPFONT ( WIDTH1_2 , HEIGHT0 ) ;
-        TabStop = TRUE ;
-        DialogControl = TRUE ;
-        ClipChildren = TRUE ;
-        Disable = TRUE ;
-        Group = TRUE ;
-        HelpID = HID_MACRO_LB_EVENT ;
-    };
-    FixedText FT_MACRO
-    {
-        Pos = MAP_APPFONT ( COL0 , ROW7A  ) ;
-        Size = MAP_APPFONT ( WIDTH1 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
-        Group = TRUE ;
-    };
-    Control LB_GROUP
-    {
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( COL0 , ROW8  ) ;
-        Size = MAP_APPFONT ( WIDTH1 , HEIGHT8 ) ;
-        TabStop = TRUE ;
-        Group = TRUE ;
-        HelpId = HID_MACRO_GROUP ;
-    };
-    FixedText FT_LABEL4LB_MACROS
-    {
-        Pos = MAP_APPFONT ( COL2 , ROW7  ) ;
-        Size = MAP_APPFONT ( WIDTH1 , RSC_CD_FIXEDTEXT_HEIGHT + HEIGHT_EXTRA7 ) ;
-        WordBreak = TRUE;
-        Text [ en-US ] = "~Existing macros\n" ;
-    };
-    Control LB_MACROS
-    {
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( COL2 , ROW8  ) ;
-        Size = MAP_APPFONT ( WIDTH2 , HEIGHT8 ) ;
-        TabStop = TRUE ;
-        HelpId = HID_MACRO_MACROS ;
-    };
-    PushButton PB_ASSIGN
-    {
-        HelpID = "cui:PushButton:RID_SVXPAGE_EVENTASSIGN:PB_ASSIGN";
-        Pos = MAP_APPFONT ( COL4 , ROW0  ) ;
-        Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ;
-        Disable = TRUE ;
-        TabStop = TRUE ;
-        Text [ en-US ] = "~Assign" ;
-    };
-    PushButton PB_DELETE
-    {
-        HelpID = "cui:PushButton:RID_SVXPAGE_EVENTASSIGN:PB_DELETE";
-        Pos = MAP_APPFONT ( COL4 , ROW2  ) ;
-        Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ;
-        Disable = TRUE ;
-        TabStop = TRUE ;
-        Text [ en-US ] = "~Remove" ;
-    };
-    String STR_MACROS
-    {
-        Text [ en-US ] = "Macros" ;
-    };
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/uiconfig/ui/eventassignpage.ui b/cui/uiconfig/ui/eventassignpage.ui
new file mode 100644
index 0000000..b7e2c64
--- /dev/null
+++ b/cui/uiconfig/ui/eventassignpage.ui
@@ -0,0 +1,246 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.0 on Thu Jan 23 11:55:04 2014 -->
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <!-- interface-requires LibreOffice 1.0 -->
+  <object class="GtkGrid" id="EventAssignPage">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="hexpand">True</property>
+    <property name="vexpand">True</property>
+    <property name="row_spacing">12</property>
+    <property name="column_spacing">12</property>
+    <child>
+      <object class="GtkFrame" id="macroframe">
+        <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-SfxConfigFunctionListBox" id="macros:border">
+                <property name="width_request">280</property>
+                <property name="height_request">300</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <child internal-child="selection">
+                  <object class="GtkTreeSelection" id="Tree List-selection"/>
+                </child>
+              </object>
+            </child>
+          </object>
+        </child>
+        <child type="label">
+          <object class="GtkLabel" id="existingmacrosft">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">Existing macros</property>
+            <property name="track_visited_links">False</property>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+            </attributes>
+          </object>
+        </child>
+      </object>
+      <packing>
+        <property name="left_attach">1</property>
+        <property name="top_attach">1</property>
+        <property name="width">1</property>
+        <property name="height">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkFrame" id="groupframe">
+        <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-SfxConfigGroupListBox" id="libraries:border">
+                <property name="width_request">280</property>
+                <property name="height_request">300</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <child internal-child="selection">
+                  <object class="GtkTreeSelection" id="Macro Library List-selection"/>
+                </child>
+              </object>
+            </child>
+          </object>
+        </child>
+        <child type="label">
+          <object class="GtkLabel" id="macrotoft">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0</property>
+            <property name="label" translatable="yes">Macro from</property>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+            </attributes>
+          </object>
+        </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>
+    <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="GtkGrid" id="grid1">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <child>
+                  <object class="cuilo-MacroEventListBox" id="assignments:border">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="vexpand">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkGrid" id="grid2">
+                    <property name="can_focus">False</property>
+                    <property name="no_show_all">True</property>
+                    <property name="column_homogeneous">True</property>
+                    <child>
+                      <object class="GtkLabel" id="eventft">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Event</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">0</property>
+                        <property name="top_attach">0</property>
+                        <property name="width">1</property>
+                        <property name="height">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="assignft">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Assigned Action</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="top_attach">0</property>
+                        <property name="width">1</property>
+                        <property name="height">1</property>
+                      </packing>
+                    </child>
+                  </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>
+            </child>
+          </object>
+        </child>
+        <child type="label">
+          <object class="GtkLabel" id="libraryft1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">Assignments</property>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+            </attributes>
+          </object>
+        </child>
+      </object>
+      <packing>
+        <property name="left_attach">0</property>
+        <property name="top_attach">0</property>
+        <property name="width">2</property>
+        <property name="height">1</property>
+      </packing>
+    </child>
+    <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="assign">
+            <property name="label" translatable="yes">Assign</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="delete">
+            <property name="label">Remove</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">2</property>
+        <property name="top_attach">0</property>
+        <property name="width">1</property>
+        <property name="height">2</property>
+      </packing>
+    </child>
+  </object>
+  <object class="GtkSizeGroup" id="sizegroup1">
+    <widgets>
+      <widget name="macroframe"/>
+      <widget name="groupframe"/>
+    </widgets>
+  </object>
+</interface>
diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in
index 22003b8..659be28 100644
--- a/extras/source/glade/libreoffice-catalog.xml.in
+++ b/extras/source/glade/libreoffice-catalog.xml.in
@@ -18,9 +18,6 @@
     <glade-widget-class title="Font PickListBox" name="smlo-SmFontPickListBox"
                         generic-name="SmFontPickListBox" parent="GtkComboBoxText"
                         icon-name="widget-gtk-comboboxtext"/>
-    <glade-widget-class title="Macro EventListBox" name="cuilo-MacroEventListBox"
-                        generic-name="Macro EventListBox" parent="GtkComboBoxText"
-                        icon-name="widget-gtk-comboboxtext"/>
     <glade-widget-class title="Thesaurus View" name="cuilo-ThesaurusAlternativesCtrl"
                         generic-name="ThesaurusAlternativesCtrl" parent="GtkTextView"
                         icon-name="widget-gtk-textview"/>
@@ -310,6 +307,15 @@
     <glade-widget-class title="SwDBTreeList" name="swlo-SwDBTreeList"
                         generic-name="SwDBTreeList" parent="GtkTreeView"
                         icon-name="widget-gtk-treeview"/>
+    <glade-widget-class title="Macro EventListBox" name="cuilo-MacroEventListBox"
+                        generic-name="Macro EventListBox" parent="GtkTreeView"
+                        icon-name="widget-gtk-treeview"/>
+    <glade-widget-class title="ConfigGroup ListBox" name="cuilo-SfxConfigGroupListBox"
+                        generic-name="ConfigGroup ListBox" parent="GtkTreeView"
+                        icon-name="widget-gtk-treeview"/>
+    <glade-widget-class title="ConfigGroupFunction ListBox" name="cuilo-SfxConfigFunctionListBox"
+                        generic-name="ConfigGroupFunction ListBox" parent="GtkTreeView"
+                        icon-name="widget-gtk-treeview"/>
     <glade-widget-class title="Paragraph Preview" name="svxlo-SvxParaPrevWindow"
                         generic-name="Paragraph Preview Window" parent="GtkDrawingArea"
                         icon-name="widget-gtk-drawingarea"/>
commit 272bc403e0803483e4f9d1d7b880b97e803d15b0
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jan 23 12:08:58 2014 +0000

    rename SfxConfigFunctionListBox_Impl to SfxConfigFunctionListBox
    
    Change-Id: I753744adf106d515abdc5caf2b29c53962aeae71

diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index 5cbae2b..970d72f 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -728,7 +728,7 @@ SfxAcceleratorConfigPage::SfxAcceleratorConfigPage( Window* pParent, const SfxIt
     , aGroupText              (this   , CUI_RES(TXT_ACC_GROUP           ))
     , pGroupLBox(new SfxConfigGroupListBox( this, CUI_RES(BOX_ACC_GROUP), SFX_SLOT_ACCELCONFIG ))
     , aFunctionText           (this   , CUI_RES(TXT_ACC_FUNCTION        ))
-    , pFunctionBox(new SfxConfigFunctionListBox_Impl( this, CUI_RES( BOX_ACC_FUNCTION )))
+    , pFunctionBox(new SfxConfigFunctionListBox( this, CUI_RES( BOX_ACC_FUNCTION )))
     , aKeyText                (this   , CUI_RES(TXT_ACC_KEY             ))
     , aKeyBox                 (this   , CUI_RES(BOX_ACC_KEY             ))
     , aFunctionsGroup         (this   , CUI_RES(GRP_ACC_FUNCTIONS       ))
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index 6123c67..ee0722a0 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -248,7 +248,7 @@ void SfxStylesInfo_Impl::getLabel4Style(SfxStyleInfo_Impl& aStyle)
     return lStyles;
 }
 
-SfxConfigFunctionListBox_Impl::SfxConfigFunctionListBox_Impl( Window* pParent, const ResId& rResId)
+SfxConfigFunctionListBox::SfxConfigFunctionListBox( Window* pParent, const ResId& rResId)
     : SvTreeListBox( pParent, rResId )
     , pCurEntry( 0 )
     , pStylesInfo( 0 )
@@ -259,19 +259,19 @@ SfxConfigFunctionListBox_Impl::SfxConfigFunctionListBox_Impl( Window* pParent, c
     // Timer for the BallonHelp
     aTimer.SetTimeout( 200 );
     aTimer.SetTimeoutHdl(
-        LINK( this, SfxConfigFunctionListBox_Impl, TimerHdl ) );
+        LINK( this, SfxConfigFunctionListBox, TimerHdl ) );
 }
 
-SfxConfigFunctionListBox_Impl::~SfxConfigFunctionListBox_Impl()
+SfxConfigFunctionListBox::~SfxConfigFunctionListBox()
 {
     ClearAll();
 }
 
-void SfxConfigFunctionListBox_Impl::MouseMove( const MouseEvent& )
+void SfxConfigFunctionListBox::MouseMove( const MouseEvent& )
 {
 }
 
-IMPL_LINK( SfxConfigFunctionListBox_Impl, TimerHdl, Timer*, pTimer)
+IMPL_LINK( SfxConfigFunctionListBox, TimerHdl, Timer*, pTimer)
 /*  Description
     Timer-handler for showing a help-text. If the mouse pointer is
     still on the currently selected entry after the timer has run out,
@@ -282,7 +282,7 @@ IMPL_LINK( SfxConfigFunctionListBox_Impl, TimerHdl, Timer*, pTimer)
     return 0L;
 }
 
-void SfxConfigFunctionListBox_Impl::ClearAll()
+void SfxConfigFunctionListBox::ClearAll()
 /*  Description
     Deletes all entries in the FunctionListBox, all UserData and all
     possibly existing MacroInfo.
@@ -313,7 +313,7 @@ void SfxConfigFunctionListBox_Impl::ClearAll()
     Clear();
 }
 
-OUString SfxConfigFunctionListBox_Impl::GetSelectedScriptURI()
+OUString SfxConfigFunctionListBox::GetSelectedScriptURI()
 {
     SvTreeListEntry *pEntry = FirstSelected();
     if ( pEntry )
@@ -325,7 +325,7 @@ OUString SfxConfigFunctionListBox_Impl::GetSelectedScriptURI()
     return OUString();
 }
 
-OUString SfxConfigFunctionListBox_Impl::GetCurCommand()
+OUString SfxConfigFunctionListBox::GetCurCommand()
 {
     SvTreeListEntry *pEntry = FirstSelected();
     if (!pEntry)
@@ -336,7 +336,7 @@ OUString SfxConfigFunctionListBox_Impl::GetCurCommand()
     return pData->sCommand;
 }
 
-OUString SfxConfigFunctionListBox_Impl::GetCurLabel()
+OUString SfxConfigFunctionListBox::GetCurLabel()
 {
     SvTreeListEntry *pEntry = FirstSelected();
     if (!pEntry)
@@ -349,7 +349,7 @@ OUString SfxConfigFunctionListBox_Impl::GetCurLabel()
     return pData->sCommand;
 }
 
-void SfxConfigFunctionListBox_Impl::FunctionSelected()
+void SfxConfigFunctionListBox::FunctionSelected()
 /*  Description
     Resets the balloon-help because it shall
     always show the help-text of the selected entry.
@@ -357,7 +357,7 @@ void SfxConfigFunctionListBox_Impl::FunctionSelected()
 {
 }
 
-void SfxConfigFunctionListBox_Impl::SetStylesInfo(SfxStylesInfo_Impl* pStyles)
+void SfxConfigFunctionListBox::SetStylesInfo(SfxStylesInfo_Impl* pStyles)
 {
     pStylesInfo = pStyles;
 }
diff --git a/cui/source/inc/acccfg.hxx b/cui/source/inc/acccfg.hxx
index 18af441..3ee8898 100644
--- a/cui/source/inc/acccfg.hxx
+++ b/cui/source/inc/acccfg.hxx
@@ -47,7 +47,7 @@
 
 class SfxMacroInfoItem;
 class SfxConfigGroupListBox;
-class SfxConfigFunctionListBox_Impl;
+class SfxConfigFunctionListBox;
 class SfxAcceleratorConfigPage;
 class SfxStringItem;
 
@@ -124,7 +124,7 @@ private:
     FixedText                       aGroupText;
     SfxConfigGroupListBox*     pGroupLBox;
     FixedText                       aFunctionText;
-    SfxConfigFunctionListBox_Impl*  pFunctionBox;
+    SfxConfigFunctionListBox*  pFunctionBox;
     FixedText                       aKeyText;
     SvTreeListBox                   aKeyBox;
     FixedLine                       aFunctionsGroup;
diff --git a/cui/source/inc/cfgutil.hxx b/cui/source/inc/cfgutil.hxx
index c3e593f..666cc88 100644
--- a/cui/source/inc/cfgutil.hxx
+++ b/cui/source/inc/cfgutil.hxx
@@ -99,7 +99,7 @@ struct CuiMacroInfo
 
 typedef boost::ptr_vector<SfxGroupInfo_Impl> SfxGroupInfoArr_Impl;
 
-class SfxConfigFunctionListBox_Impl : public SvTreeListBox
+class SfxConfigFunctionListBox : public SvTreeListBox
 {
     friend class SfxConfigGroupListBox;
     Timer                aTimer;
@@ -111,8 +111,8 @@ class SfxConfigFunctionListBox_Impl : public SvTreeListBox
     virtual void  MouseMove( const MouseEvent& rMEvt );
 
 public:
-                  SfxConfigFunctionListBox_Impl( Window*, const ResId& );
-                  ~SfxConfigFunctionListBox_Impl();
+                  SfxConfigFunctionListBox( Window*, const ResId& );
+                  ~SfxConfigFunctionListBox();
 
     void          ClearAll();
     using Window::GetHelpText;
@@ -128,7 +128,7 @@ struct SvxConfigGroupBoxResource_Impl;
 class SfxConfigGroupListBox : public SvTreeListBox
 {
     SvxConfigGroupBoxResource_Impl* pImp;
-    SfxConfigFunctionListBox_Impl*  pFunctionListBox;
+    SfxConfigFunctionListBox*  pFunctionListBox;
     SfxGroupInfoArr_Impl            aArr;
     sal_uLong                       nMode;
 
@@ -174,7 +174,7 @@ public:
     void                Init(const css::uno::Reference< css::uno::XComponentContext >& xContext,
                              const css::uno::Reference< css::frame::XFrame >&          xFrame,
                              const OUString&                                        sModuleLongName);
-    void                SetFunctionListBox( SfxConfigFunctionListBox_Impl *pBox )
+    void                SetFunctionListBox( SfxConfigFunctionListBox *pBox )
                         { pFunctionListBox = pBox; }
     void                Open( SvTreeListEntry*, sal_Bool );
     void                GroupSelected();
diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx
index 67180a4..f1ec3a5 100644
--- a/cui/source/tabpages/macroass.cxx
+++ b/cui/source/tabpages/macroass.cxx
@@ -53,7 +53,7 @@ public:
     MacroEventListBox*              pEventLB;
     SfxConfigGroupListBox*          pGroupLB;
     FixedText*                      pFT_MacroLBLabel;
-    SfxConfigFunctionListBox_Impl*  pMacroLB;
+    SfxConfigFunctionListBox*       pMacroLB;
 
     FixedText*                      pMacroFT;
     OUString*                       pMacroStr;
commit 22a8a96bc5e98c7171e225f4e59990f624b734cc
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jan 23 12:06:11 2014 +0000

    rename SfxConfigGroupListBox_Impl as SfxConfigGroupListBox
    
    Change-Id: Id2e25b5feecc0bab5b4e926e5fe44320979d89ba

diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index 00c8c64..5cbae2b 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -726,7 +726,7 @@ SfxAcceleratorConfigPage::SfxAcceleratorConfigPage( Window* pParent, const SfxIt
     , aChangeButton           (this   , CUI_RES(BTN_ACC_CHANGE          ))
     , aRemoveButton           (this   , CUI_RES(BTN_ACC_REMOVE          ))
     , aGroupText              (this   , CUI_RES(TXT_ACC_GROUP           ))
-    , pGroupLBox(new SfxConfigGroupListBox_Impl( this, CUI_RES(BOX_ACC_GROUP), SFX_SLOT_ACCELCONFIG ))
+    , pGroupLBox(new SfxConfigGroupListBox( this, CUI_RES(BOX_ACC_GROUP), SFX_SLOT_ACCELCONFIG ))
     , aFunctionText           (this   , CUI_RES(TXT_ACC_FUNCTION        ))
     , pFunctionBox(new SfxConfigFunctionListBox_Impl( this, CUI_RES( BOX_ACC_FUNCTION )))
     , aKeyText                (this   , CUI_RES(TXT_ACC_KEY             ))
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index 3739737..6123c67 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -398,7 +398,7 @@ SvxConfigGroupBoxResource_Impl::SvxConfigGroupBoxResource_Impl() :
     FreeResource();
 }
 
-SfxConfigGroupListBox_Impl::SfxConfigGroupListBox_Impl(
+SfxConfigGroupListBox::SfxConfigGroupListBox(
     Window* pParent, const ResId& rResId, sal_uLong nConfigMode )
         : SvTreeListBox( pParent, rResId )
         , pImp(new SvxConfigGroupBoxResource_Impl()), pFunctionListBox(0), nMode( nConfigMode ), pStylesInfo(0)
@@ -408,12 +408,12 @@ SfxConfigGroupListBox_Impl::SfxConfigGroupListBox_Impl(
 }
 
 
-SfxConfigGroupListBox_Impl::~SfxConfigGroupListBox_Impl()
+SfxConfigGroupListBox::~SfxConfigGroupListBox()
 {
     ClearAll();
 }
 
-void SfxConfigGroupListBox_Impl::ClearAll()
+void SfxConfigGroupListBox::ClearAll()
 {
     sal_uInt16 nCount = aArr.size();
     for ( sal_uInt16 i=0; i<nCount; ++i )
@@ -433,13 +433,13 @@ void SfxConfigGroupListBox_Impl::ClearAll()
     Clear();
 }
 
-void SfxConfigGroupListBox_Impl::SetStylesInfo(SfxStylesInfo_Impl* pStyles)
+void SfxConfigGroupListBox::SetStylesInfo(SfxStylesInfo_Impl* pStyles)
 {
     pStylesInfo = pStyles;
 }
 
 //-----------------------------------------------
-void SfxConfigGroupListBox_Impl::InitModule()
+void SfxConfigGroupListBox::InitModule()
 {
     try
     {
@@ -475,12 +475,12 @@ void SfxConfigGroupListBox_Impl::InitModule()
 }
 
 //-----------------------------------------------
-void SfxConfigGroupListBox_Impl::InitBasic()
+void SfxConfigGroupListBox::InitBasic()
 {
 }
 
 //-----------------------------------------------
-void SfxConfigGroupListBox_Impl::InitStyles()
+void SfxConfigGroupListBox::InitStyles()
 {
 }
 
@@ -538,7 +538,7 @@ namespace
 }
 
 //-----------------------------------------------
-void SfxConfigGroupListBox_Impl::Init(const css::uno::Reference< css::uno::XComponentContext >& xContext,
+void SfxConfigGroupListBox::Init(const css::uno::Reference< css::uno::XComponentContext >& xContext,
                                       const css::uno::Reference< css::frame::XFrame >&          xFrame,
                                       const OUString&                                        sModuleLongName)
 {
@@ -708,7 +708,7 @@ void SfxConfigGroupListBox_Impl::Init(const css::uno::Reference< css::uno::XComp
     MakeVisible( GetEntry( 0,0 ) );
     SetUpdateMode( sal_True );
 }
-Image SfxConfigGroupListBox_Impl::GetImage(
+Image SfxConfigGroupListBox::GetImage(
     Reference< browse::XBrowseNode > node,
     Reference< XComponentContext > xCtx,
     bool bIsRootNode
@@ -774,7 +774,7 @@ Image SfxConfigGroupListBox_Impl::GetImage(
 }
 
 Reference< XInterface  >
-SfxConfigGroupListBox_Impl::getDocumentModel( Reference< XComponentContext >& xCtx, OUString& docName )
+SfxConfigGroupListBox::getDocumentModel( Reference< XComponentContext >& xCtx, OUString& docName )
 {
     Reference< XInterface > xModel;
     Reference< frame::XDesktop2 > desktop = frame::Desktop::create( xCtx );
@@ -802,7 +802,7 @@ SfxConfigGroupListBox_Impl::getDocumentModel( Reference< XComponentContext >& xC
 }
 
 //-----------------------------------------------
-OUString SfxConfigGroupListBox_Impl::MapCommand2UIName(const OUString& sCommand)
+OUString SfxConfigGroupListBox::MapCommand2UIName(const OUString& sCommand)
 {
     OUString sUIName;
     try
@@ -830,7 +830,7 @@ OUString SfxConfigGroupListBox_Impl::MapCommand2UIName(const OUString& sCommand)
 }
 
 //-----------------------------------------------
-void SfxConfigGroupListBox_Impl::GroupSelected()
+void SfxConfigGroupListBox::GroupSelected()
 /*  Description
     A function group or a basic module has been selected.
     All functions/macros are displayed in the functionlistbox.
@@ -960,7 +960,7 @@ void SfxConfigGroupListBox_Impl::GroupSelected()
     pFunctionListBox->SetUpdateMode(sal_True);
 }
 
-sal_Bool SfxConfigGroupListBox_Impl::Expand( SvTreeListEntry* pParent )
+sal_Bool SfxConfigGroupListBox::Expand( SvTreeListEntry* pParent )
 {
     sal_Bool bRet = SvTreeListBox::Expand( pParent );
     if ( bRet )
@@ -991,7 +991,7 @@ sal_Bool SfxConfigGroupListBox_Impl::Expand( SvTreeListEntry* pParent )
     return bRet;
 }
 
-void SfxConfigGroupListBox_Impl::RequestingChildren( SvTreeListEntry *pEntry )
+void SfxConfigGroupListBox::RequestingChildren( SvTreeListEntry *pEntry )
 /*  Description
     A basic or a library is opened.
 */
@@ -1119,13 +1119,13 @@ void SfxConfigGroupListBox_Impl::RequestingChildren( SvTreeListEntry *pEntry )
     }
 }
 
-void SfxConfigGroupListBox_Impl::SelectMacro( const SfxMacroInfoItem *pItem )
+void SfxConfigGroupListBox::SelectMacro( const SfxMacroInfoItem *pItem )
 {
     SelectMacro( pItem->GetBasicManager()->GetName(),
                  pItem->GetQualifiedName() );
 }
 
-void SfxConfigGroupListBox_Impl::SelectMacro( const OUString& rBasic,
+void SfxConfigGroupListBox::SelectMacro( const OUString& rBasic,
          const OUString& rMacro )
 {
     OUString aBasicName( rBasic );
diff --git a/cui/source/inc/acccfg.hxx b/cui/source/inc/acccfg.hxx
index 550de40..18af441 100644
--- a/cui/source/inc/acccfg.hxx
+++ b/cui/source/inc/acccfg.hxx
@@ -46,7 +46,7 @@
 #include "cfgutil.hxx"
 
 class SfxMacroInfoItem;
-class SfxConfigGroupListBox_Impl;
+class SfxConfigGroupListBox;
 class SfxConfigFunctionListBox_Impl;
 class SfxAcceleratorConfigPage;
 class SfxStringItem;
@@ -122,7 +122,7 @@ private:
     PushButton                      aChangeButton;
     PushButton                      aRemoveButton;
     FixedText                       aGroupText;
-    SfxConfigGroupListBox_Impl*     pGroupLBox;
+    SfxConfigGroupListBox*     pGroupLBox;
     FixedText                       aFunctionText;
     SfxConfigFunctionListBox_Impl*  pFunctionBox;
     FixedText                       aKeyText;
diff --git a/cui/source/inc/cfgutil.hxx b/cui/source/inc/cfgutil.hxx
index 2a4f30e..c3e593f 100644
--- a/cui/source/inc/cfgutil.hxx
+++ b/cui/source/inc/cfgutil.hxx
@@ -101,7 +101,7 @@ typedef boost::ptr_vector<SfxGroupInfo_Impl> SfxGroupInfoArr_Impl;
 
 class SfxConfigFunctionListBox_Impl : public SvTreeListBox
 {
-    friend class SfxConfigGroupListBox_Impl;
+    friend class SfxConfigGroupListBox;
     Timer                aTimer;
     SvTreeListEntry*         pCurEntry;
     SfxGroupInfoArr_Impl aArr;
@@ -125,7 +125,7 @@ public:
 };
 
 struct SvxConfigGroupBoxResource_Impl;
-class SfxConfigGroupListBox_Impl : public SvTreeListBox
+class SfxConfigGroupListBox : public SvTreeListBox
 {
     SvxConfigGroupBoxResource_Impl* pImp;
     SfxConfigFunctionListBox_Impl*  pFunctionListBox;
@@ -165,10 +165,10 @@ protected:
     virtual sal_Bool        Expand( SvTreeListEntry* pParent );
 
 public:
-    SfxConfigGroupListBox_Impl ( Window* pParent,
+    SfxConfigGroupListBox ( Window* pParent,
                                  const ResId&,
                                  sal_uLong nConfigMode = 0 );
-    ~SfxConfigGroupListBox_Impl();
+    ~SfxConfigGroupListBox();
     void                ClearAll();
 
     void                Init(const css::uno::Reference< css::uno::XComponentContext >& xContext,
diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx
index f5044ce..67180a4 100644
--- a/cui/source/tabpages/macroass.cxx
+++ b/cui/source/tabpages/macroass.cxx
@@ -51,7 +51,7 @@ public:
     OUString*                       pStrEvent;
     OUString*                       pAssignedMacro;
     MacroEventListBox*              pEventLB;
-    SfxConfigGroupListBox_Impl*     pGroupLB;
+    SfxConfigGroupListBox*          pGroupLB;
     FixedText*                      pFT_MacroLBLabel;
     SfxConfigFunctionListBox_Impl*  pMacroLB;
 
commit fb0cce507f9c83485da56847529d2fae4d53d9a3
Author: Armin Le Grand <alg at apache.org>
Date:   Thu Jan 23 02:12:41 2014 +0000

    Resolves: #i123950# unified and redefined CropPrimitive2D::get2DDecomposition
    
    (cherry picked from commit 08d42c4da0a3f6dc105080102c1b1de4bce987a1)
    
    Change-Id: I2d5f52de8e9fa595012a953affbaba9d54f4f2a9

diff --git a/drawinglayer/source/primitive2d/cropprimitive2d.cxx b/drawinglayer/source/primitive2d/cropprimitive2d.cxx
index 042710c..2ea6a1a 100644
--- a/drawinglayer/source/primitive2d/cropprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/cropprimitive2d.cxx
@@ -74,112 +74,78 @@ namespace drawinglayer
 
             if(getChildren().hasElements())
             {
-                // decompose to have current translate and scale
-                basegfx::B2DVector aScale, aTranslate;
-                double fRotate, fShearX;
-
-                getTransformation().decompose(aScale, aTranslate, fRotate, fShearX);
-
-                // detect 180 degree rotation, this is the same as mirrored in X and Y,
-                // thus change to mirroring. Prefer mirroring here. Use the equal call
-                // with getSmallValue here, the original which uses rtl::math::approxEqual
-                // is too correct here. Maybe this changes with enhanced precision in aw080
-                // to the better so that this can be reduced to the more precise call again
-                if(basegfx::fTools::equal(fabs(fRotate), F_PI, 0.000000001))
-                {
-                    aScale.setX(aScale.getX() * -1.0);
-                    aScale.setY(aScale.getY() * -1.0);
-                    fRotate = 0.0;
-                }
-
-                // create target translate and scale
-                const bool bMirroredX(aScale.getX() < 0.0);
-                const bool bMirroredY(aScale.getY() < 0.0);
-                basegfx::B2DVector aTargetScale(aScale);
-                basegfx::B2DVector aTargetTranslate(aTranslate);
-
-                if(bMirroredX)
-                {
-                    aTargetTranslate.setX(aTargetTranslate.getX() + getCropRight());
-                    aTargetScale.setX(aTargetScale.getX() - getCropLeft() - getCropRight());
-                }
-                else
-                {
-                    aTargetTranslate.setX(aTargetTranslate.getX() - getCropLeft());
-                    aTargetScale.setX(aTargetScale.getX() + getCropRight() + getCropLeft());
-                }
-
-                if(bMirroredY)
-                {
-                    aTargetTranslate.setY(aTargetTranslate.getY() + getCropBottom());
-                    aTargetScale.setY(aTargetScale.getY() - getCropTop() - getCropBottom());
-                }
-                else
-                {
-                    aTargetTranslate.setY(aTargetTranslate.getY() - getCropTop());
-                    aTargetScale.setY(aTargetScale.getY() + getCropBottom() + getCropTop());
-                }
-
-                // create ranges to make comparisons
-                const basegfx::B2DRange aCurrent(
-                    aTranslate.getX(), aTranslate.getY(),
-                    aTranslate.getX() + aScale.getX(), aTranslate.getY() + aScale.getY());
-                const basegfx::B2DRange aCropped(
-                    aTargetTranslate.getX(), aTargetTranslate.getY(),
-                    aTargetTranslate.getX() + aTargetScale.getX(), aTargetTranslate.getY() + aTargetScale.getY());
+                // get original object scale in unit coordinates (no mirroring)
+                const basegfx::B2DVector aObjectScale(basegfx::absolute(getTransformation() * basegfx::B2DVector(1.0, 1.0)));
 
-                if(aCropped.isEmpty())
+                // we handle cropping, so when no width or no height, content will be empty,
+                // so only do something when we have a width and a height
+                if(!aObjectScale.equalZero())
                 {
-                    // nothing to return since cropped content is completely empty
-                }
-                else if(aCurrent.equal(aCropped))
-                {
-                    // no crop, just use content
-                    xRetval = getChildren();
-                }
-                else
-                {
-                    // build new combined content transformation
-                    basegfx::B2DHomMatrix aNewObjectTransform(getTransformation());
-
-                    // remove content transform by inverting
-                    aNewObjectTransform.invert();
-
-                    // add target values and original shear/rotate
-                    aNewObjectTransform = basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix(
-                        aTargetScale.getX(),
-                        aTargetScale.getY(),
-                        fShearX,
-                        fRotate,
-                        aTargetTranslate.getX(),
-                        aTargetTranslate.getY())
-                            * aNewObjectTransform;
-
-                    // prepare TransformPrimitive2D with xPrimitive
-                    const Primitive2DReference xTransformPrimitive(
-                        new TransformPrimitive2D(
-                            aNewObjectTransform,
-                            getChildren()));
-
-                    if(aCurrent.isInside(aCropped))
-                    {
-                        // crop just shrunk so that its inside content,
-                        // no need to use a mask since not really cropped.
-                        xRetval = Primitive2DSequence(&xTransformPrimitive, 1);
-                    }
-                    else
+                    // calculate crop distances in unit coordinates. They are already combined with CropScaleFactor, thus
+                    // are relative only to object scale
+                    const double fBackScaleX(basegfx::fTools::equalZero(aObjectScale.getX()) ? 1.0 : 1.0 / fabs(aObjectScale.getX()));
+                    const double fBackScaleY(basegfx::fTools::equalZero(aObjectScale.getY()) ? 1.0 : 1.0 / fabs(aObjectScale.getY()));
+                    const double fLeft(getCropLeft() * fBackScaleX);
+                    const double fTop(getCropTop() * fBackScaleY);
+                    const double fRight(getCropRight() * fBackScaleX);
+                    const double fBottom(getCropBottom() * fBackScaleY);
+
+                    // calc new unit range for comparisons; the original range is the unit range
+                    const basegfx::B2DRange aUnitRange(0.0, 0.0, 1.0, 1.0);
+                    const basegfx::B2DRange aNewRange(
+                        -fLeft,
+                        -fTop,
+                        1.0 + fRight,
+                        1.0 + fBottom);
+
+                    // if we have no overlap the crop has removed everything, so we do only
+                    // have to create content if this is not the case
+                    if(aNewRange.overlaps(aUnitRange))
                     {
-                        // mask with original object's bounds
-                        basegfx::B2DPolyPolygon aMaskPolyPolygon(basegfx::tools::createUnitPolygon());
-                        aMaskPolyPolygon.transform(getTransformation());
-
-                        // create maskPrimitive with aMaskPolyPolygon and aMaskContentVector
-                        const Primitive2DReference xMask(
-                            new MaskPrimitive2D(
-                                aMaskPolyPolygon,
-                                Primitive2DSequence(&xTransformPrimitive, 1)));
-
-                        xRetval = Primitive2DSequence(&xMask, 1);
+                        // create new transform; first take out old transform to get
+                        // to unit coordinates by inverting. Inverting should be flawless
+                        // since we already cheched that object size is not zero in X or Y
+                        basegfx::B2DHomMatrix aNewTransform(getTransformation());
+
+                        aNewTransform.invert();
+
+                        // apply crop enlargement in unit coordinates
+                        aNewTransform = basegfx::tools::createScaleTranslateB2DHomMatrix(
+                            aNewRange.getRange(),
+                            aNewRange.getMinimum()) * aNewTransform;
+
+                        // apply original transformation. Since we have manipulated the crop
+                        // in unit coordinates we do not need to care about mirroring or
+                        // a corrected point for eventual shear or rotation, this all comes for
+                        // free
+                        aNewTransform = getTransformation() * aNewTransform;
+
+                        // prepare TransformPrimitive2D with xPrimitive
+                        const Primitive2DReference xTransformPrimitive(
+                            new TransformPrimitive2D(
+                                aNewTransform,
+                                getChildren()));
+
+                        if(aUnitRange.isInside(aNewRange))
+                        {
+                            // the new range is completely inside the old range (unit range),
+                            // so no masking is needed
+                            xRetval = Primitive2DSequence(&xTransformPrimitive, 1);
+                        }
+                        else
+                        {
+                            // mask with original object's bounds
+                            basegfx::B2DPolyPolygon aMaskPolyPolygon(basegfx::tools::createUnitPolygon());
+                            aMaskPolyPolygon.transform(getTransformation());
+
+                            // create maskPrimitive with aMaskPolyPolygon and aMaskContentVector
+                            const Primitive2DReference xMask(
+                                new MaskPrimitive2D(
+                                    aMaskPolyPolygon,
+                                    Primitive2DSequence(&xTransformPrimitive, 1)));
+
+                            xRetval = Primitive2DSequence(&xMask, 1);
+                        }
                     }
                 }
             }
diff --git a/include/svx/sdr/contact/viewcontactofgraphic.hxx b/include/svx/sdr/contact/viewcontactofgraphic.hxx
index 13fd07b..9b9e775 100644
--- a/include/svx/sdr/contact/viewcontactofgraphic.hxx
+++ b/include/svx/sdr/contact/viewcontactofgraphic.hxx
@@ -42,8 +42,7 @@ namespace sdr
             // helpers for constructing various primitive visualisations in various states
             drawinglayer::primitive2d::Primitive2DSequence createVIP2DSForPresObj(
                 const basegfx::B2DHomMatrix& rObjectMatrix,
-                const drawinglayer::attribute::SdrLineFillShadowTextAttribute& rAttribute,
-                const GraphicAttr& rLocalGrafInfo) const;
+                const drawinglayer::attribute::SdrLineFillShadowTextAttribute& rAttribute) const;
             drawinglayer::primitive2d::Primitive2DSequence createVIP2DSForDraft(
                 const basegfx::B2DHomMatrix& rObjectMatrix,
                 const drawinglayer::attribute::SdrLineFillShadowTextAttribute& rAttribute) const;
diff --git a/svx/source/sdr/contact/viewcontactofgraphic.cxx b/svx/source/sdr/contact/viewcontactofgraphic.cxx
index 0a1061a..de02fe2 100644
--- a/svx/source/sdr/contact/viewcontactofgraphic.cxx
+++ b/svx/source/sdr/contact/viewcontactofgraphic.cxx
@@ -83,8 +83,7 @@ namespace sdr
 
         drawinglayer::primitive2d::Primitive2DSequence ViewContactOfGraphic::createVIP2DSForPresObj(
             const basegfx::B2DHomMatrix& rObjectMatrix,
-            const drawinglayer::attribute::SdrLineFillShadowTextAttribute& rAttribute,
-            const GraphicAttr& rLocalGrafInfo) const
+            const drawinglayer::attribute::SdrLineFillShadowTextAttribute& rAttribute) const
         {
             drawinglayer::primitive2d::Primitive2DSequence xRetval;
             GraphicObject aEmptyGraphicObject;
@@ -133,11 +132,12 @@ namespace sdr
                     * aSmallerMatrix;
 
                 const GraphicObject& rGraphicObject = GetGrafObject().GetGraphicObject(false);
+                const GraphicAttr aLocalGrafInfo;
                 const drawinglayer::primitive2d::Primitive2DReference xReferenceB(new drawinglayer::primitive2d::SdrGrafPrimitive2D(
                     aSmallerMatrix,
                     drawinglayer::attribute::SdrLineFillShadowTextAttribute(),
                     rGraphicObject,
-                    rLocalGrafInfo));
+                    aLocalGrafInfo));
 
                 drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(xRetval, xReferenceB);
             }
@@ -373,7 +373,7 @@ namespace sdr
             {
                 // it's an EmptyPresObj, create the SdrGrafPrimitive2D without content and another scaled one
                 // with the content which is the placeholder graphic
-                xRetval = createVIP2DSForPresObj(aObjectMatrix, aAttribute, aLocalGrafInfo);
+                xRetval = createVIP2DSForPresObj(aObjectMatrix, aAttribute);
             }
             else if(visualisationUsesDraft())
             {


More information about the Libreoffice-commits mailing list