[Libreoffice-commits] .: 2 commits - sfx2/AllLangResTarget_sfx2.mk sfx2/inc sfx2/source sfx2/uiconfig sfx2/UI_sfx.mk

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Dec 11 08:43:47 PST 2012


 sfx2/AllLangResTarget_sfx2.mk                |    1 
 sfx2/UI_sfx.mk                               |    1 
 sfx2/inc/docvor.hxx                          |    6 
 sfx2/inc/orgmgr.hxx                          |    8 
 sfx2/source/doc/doc.hrc                      |    2 
 sfx2/source/doc/docvor.cxx                   |  252 +++++++++++++------------
 sfx2/source/doc/docvor.hrc                   |   59 ------
 sfx2/source/doc/docvor.src                   |  253 -------------------------
 sfx2/source/inc/helpid.hrc                   |   12 -
 sfx2/source/view/orgmgr.cxx                  |    7 
 sfx2/uiconfig/ui/templatemanagementdialog.ui |  263 +++++++++++++++++++++++----
 11 files changed, 364 insertions(+), 500 deletions(-)

New commits:
commit 06ef6fe699c5765bf53f94b25b8c56aaf6a205ca
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Dec 11 15:37:33 2012 +0000

    convert Template Management dialog to .ui
    
    Change-Id: Ifebd5ad91d1c8b456c458b01738261dfe34a6f83

diff --git a/sfx2/AllLangResTarget_sfx2.mk b/sfx2/AllLangResTarget_sfx2.mk
index 81ff3c7..af2f5bc 100644
--- a/sfx2/AllLangResTarget_sfx2.mk
+++ b/sfx2/AllLangResTarget_sfx2.mk
@@ -69,7 +69,6 @@ $(eval $(call gb_SrsTarget_add_files,sfx/res,\
     sfx2/source/doc/doc.src \
     sfx2/source/doc/doctdlg.src \
     sfx2/source/doc/doctempl.src \
-    sfx2/source/doc/docvor.src \
     sfx2/source/doc/graphhelp.src \
     sfx2/source/doc/new.src \
     sfx2/source/doc/templatelocnames.src \
diff --git a/sfx2/UI_sfx.mk b/sfx2/UI_sfx.mk
index a6e2223..410931b 100644
--- a/sfx2/UI_sfx.mk
+++ b/sfx2/UI_sfx.mk
@@ -13,6 +13,7 @@ $(eval $(call gb_UI_add_uifiles,sfx,\
 	sfx2/uiconfig/ui/checkin \
 	sfx2/uiconfig/ui/password \
 	sfx2/uiconfig/ui/printeroptionsdialog \
+	sfx2/uiconfig/ui/templatemanagementdialog \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/sfx2/inc/docvor.hxx b/sfx2/inc/docvor.hxx
index 7d29a14..1627fa0 100644
--- a/sfx2/inc/docvor.hxx
+++ b/sfx2/inc/docvor.hxx
@@ -77,10 +77,12 @@ protected:
     virtual void            DragFinished( sal_Int8 nDropAction );
 
 public:
-        using SvListView::Select;
+    using SvListView::Select;
     enum DataEnum   { VIEW_TEMPLATES, VIEW_FILES } eViewType;
 
-    SfxOrganizeListBox_Impl( SfxOrganizeDlg_Impl* pDlg, Window* pParent, WinBits, DataEnum );
+    SfxOrganizeListBox_Impl(Window* pParent, WinBits nBits);
+
+    void Init(SfxOrganizeDlg_Impl* pArgDlg, DataEnum eType);
 
     DataEnum    GetViewType() const { return eViewType; }
     void        SetViewType(DataEnum eType) { eViewType = eType; }
diff --git a/sfx2/source/doc/doc.hrc b/sfx2/source/doc/doc.hrc
index f3edfa7..9d33eb6 100644
--- a/sfx2/source/doc/doc.hrc
+++ b/sfx2/source/doc/doc.hrc
@@ -37,7 +37,7 @@
 
 #define DLG_NEW_FILE                        (RID_SFX_DOC_START+1)
 #define DLG_DOC_TEMPLATE                    (RID_SFX_DOC_START+2)
-#define DLG_ORGANIZE                        (RID_SFX_DOC_START+3)
+
 #define DLG_TEMPLATE_MANAGER                (RID_SFX_DOC_START+4)
 
 #define BMP_STYLES_CLOSED                   (RID_SFX_DOC_START+ 0)
diff --git a/sfx2/source/doc/docvor.cxx b/sfx2/source/doc/docvor.cxx
index 11b164b..0719b33 100644
--- a/sfx2/source/doc/docvor.cxx
+++ b/sfx2/source/doc/docvor.cxx
@@ -55,7 +55,6 @@
 #include "sfx2/sfxresid.hxx"
 #include "doc.hrc"
 #include <sfx2/sfx.hrc>
-#include "docvor.hrc"
 #include <sfx2/docfilt.hxx>
 #include <sfx2/filedlghelper.hxx>
 #include <sfx2/fcontnr.hxx>
@@ -64,6 +63,21 @@
 #include "svtools/treelistentry.hxx"
 #include <comphelper/processfactory.hxx>
 
+#define ID_NEW                     1
+#define ID_DELETE                  2
+#define ID_EDIT                    3
+//seperator
+#define ID_COPY_FROM               5
+#define ID_COPY_TO                 6
+//seperator
+#define ID_PRINT                   8
+#define ID_PRINTER_SETUP           9
+//seperator
+#define ID_RESCAN                 11
+//seperator
+#define ID_DEFAULT_TEMPLATE       13
+#define ID_RESET_DEFAULT_TEMPLATE 14
+
 sal_Bool SfxOrganizeListBox_Impl::bDropMoveOk = sal_True;
 
 using namespace ::com::sun::star;
@@ -88,6 +102,11 @@ public:
 
 //=========================================================================
 
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSfxOrganizeListBox(Window *pParent,
+    VclBuilder::stringmap &)
+{
+    return new SfxOrganizeListBox_Impl(pParent, WB_BORDER | WB_TABSTOP | WB_HSCROLL);
+}
 
 inline void SfxOrganizeListBox_Impl::SetBitmaps(
     const Image &rOFolder, const Image &rCFolder, const Image &rODoc, const Image &rCDoc )
@@ -126,17 +145,15 @@ friend class SfxOrganizeListBox_Impl;
     sal_uInt16                  m_nIndex;
     String                  m_sExtension4Save;
 
-    SfxOrganizeListBox_Impl aLeftLb;
-    ListBox                 aLeftTypLb;
+    SfxOrganizeListBox_Impl* m_pLeftLb;
+    ListBox*                m_pLeftTypLb;
 
-    SfxOrganizeListBox_Impl aRightLb;
-    ListBox                 aRightTypLb;
+    SfxOrganizeListBox_Impl* m_pRightLb;
+    ListBox*                m_pRightTypLb;
 
-    OKButton                aOkBtn;
-    MenuButton              aEditBtn;
-    HelpButton              aHelpBtn;
-    PushButton              aAddressTemplateBtn;
-    PushButton              aFilesBtn;
+    MenuButton*             m_pEditBtn;
+    PushButton*             m_pAddressTemplateBtn;
+    PushButton*             m_pFilesBtn;
 
     Accelerator             aEditAcc;
 
@@ -159,7 +176,8 @@ friend class SfxOrganizeListBox_Impl;
     DECL_LINK( MenuSelect_Impl, Menu * );
     DECL_LINK( MenuActivate_Impl, Menu * );
     DECL_LINK( AddFiles_Impl, Button * );
-    DECL_LINK( OnAddressTemplateClicked, Button * );
+    DECL_LINK( OnAddressTemplateClicked, void * );
+    DECL_LINK( Close_Impl, void * );
 
     DECL_LINK(ImportHdl, void *);
     DECL_LINK(ExportHdl, void *);
@@ -176,7 +194,6 @@ public:
 
 SfxOrganizeDlg_Impl::SfxOrganizeDlg_Impl( SfxTemplateOrganizeDlg* pParent,
                                           SfxDocumentTemplates* pTempl ) :
-
     pSuspend            ( NULL ),
     pDialog             ( pParent ),
     pFocusBox           ( NULL ),
@@ -187,23 +204,31 @@ SfxOrganizeDlg_Impl::SfxOrganizeDlg_Impl( SfxTemplateOrganizeDlg* pParent,
     nDropAction         ( NO_DROP_ACTION ),
     bExecDropFinished   ( true ),
 
-    aLeftLb     ( this, pParent, WB_BORDER | WB_TABSTOP | WB_HSCROLL, SfxOrganizeListBox_Impl::VIEW_TEMPLATES ),
-    aLeftTypLb  (  pParent, SfxResId( LB_LEFT_TYP ) ),
-
-    aRightLb    ( this, pParent, WB_BORDER | WB_TABSTOP | WB_HSCROLL, SfxOrganizeListBox_Impl::VIEW_FILES ),
-    aRightTypLb ( pParent, SfxResId( LB_RIGHT_TYP ) ),
-
-    aOkBtn              ( pParent, SfxResId( BTN_OK ) ),
-    aEditBtn            ( pParent, SfxResId( BTN_EDIT ) ),
-    aHelpBtn            ( pParent, SfxResId( BTN_HELP ) ),
-    aAddressTemplateBtn ( pParent, SfxResId( BTN_ADDRESSTEMPLATE ) ),
-    aFilesBtn           ( pParent, SfxResId( BTN_FILES ) ),
-
-    aEditAcc    ( SfxResId( ACC_EDIT ) ),
     aMgr        ( pTempl ),
     pFileDlg    ( NULL )
 
 {
+    aEditAcc.InsertItem(ID_NEW, KeyCode(KEY_INSERT));
+    aEditAcc.InsertItem(ID_DELETE, KeyCode(KEY_DELETE));
+
+    pDialog->get(m_pLeftTypLb, "lefttype");
+    pDialog->get(m_pLeftLb, "leftorganizer");
+    m_pLeftLb->Init(this, SfxOrganizeListBox_Impl::VIEW_TEMPLATES);
+
+    //20 lines
+    m_pLeftLb->set_height_request(m_pLeftLb->GetEntryHeight() * 20);
+
+    pDialog->get(m_pRightTypLb, "righttype");
+    pDialog->get(m_pRightLb, "rightorganizer");
+    m_pRightLb->Init(this, SfxOrganizeListBox_Impl::VIEW_FILES);
+
+    pDialog->get(m_pEditBtn, "commands");
+    pDialog->get(m_pAddressTemplateBtn, "addressbook");
+    pDialog->get(m_pFilesBtn, "file");
+
+    PushButton *pClose = pDialog->get<PushButton>("close");
+    pClose->SetClickHdl(LINK(this,SfxOrganizeDlg_Impl, Close_Impl));
+
     // update the SfxDocumentTemplates the manager works with
     if ( aMgr.GetTemplates() )  // should never fail, but who knows ....
     {
@@ -221,9 +246,6 @@ SfxOrganizeDlg_Impl::SfxOrganizeDlg_Impl( SfxTemplateOrganizeDlg* pParent,
             // * always work with an own instance, even if we get only NULL in this ctor
     }
 
-    aLeftLb.SetHelpId( HID_CTL_ORGANIZER_LEFT );
-    aRightLb.SetHelpId( HID_CTL_ORGANIZER_RIGHT );
-
     String aWorkPath = SvtPathOptions().GetWorkPath();
     if ( aWorkPath.Len() )
     {
@@ -243,49 +265,49 @@ SfxOrganizeDlg_Impl::SfxOrganizeDlg_Impl( SfxTemplateOrganizeDlg* pParent,
 
     InitBitmaps();
 
-    aEditBtn.GetPopupMenu()->SetSelectHdl( LINK( this, SfxOrganizeDlg_Impl, MenuSelect_Impl ) );
-    aEditBtn.GetPopupMenu()->SetActivateHdl( LINK( this, SfxOrganizeDlg_Impl, MenuActivate_Impl ) );
+    m_pEditBtn->GetPopupMenu()->SetSelectHdl( LINK( this, SfxOrganizeDlg_Impl, MenuSelect_Impl ) );
+    m_pEditBtn->GetPopupMenu()->SetActivateHdl( LINK( this, SfxOrganizeDlg_Impl, MenuActivate_Impl ) );
     aEditAcc.SetSelectHdl( LINK( this, SfxOrganizeDlg_Impl, AccelSelect_Impl ) );
     GetpApp()->InsertAccel( &aEditAcc );
 
-    aFilesBtn.SetClickHdl(
+    m_pFilesBtn->SetClickHdl(
         LINK(this,SfxOrganizeDlg_Impl, AddFiles_Impl));
-    aAddressTemplateBtn.SetClickHdl(
+    m_pAddressTemplateBtn->SetClickHdl(
         LINK(this,SfxOrganizeDlg_Impl, OnAddressTemplateClicked));
-    aLeftTypLb.SetSelectHdl(
+    m_pLeftTypLb->SetSelectHdl(
         LINK(this, SfxOrganizeDlg_Impl, LeftListBoxSelect_Impl));
-    aRightTypLb.SetSelectHdl(
+    m_pRightTypLb->SetSelectHdl(
         LINK(this, SfxOrganizeDlg_Impl, RightListBoxSelect_Impl));
-    aLeftLb.SetGetFocusHdl(
+    m_pLeftLb->SetGetFocusHdl(
         LINK(this, SfxOrganizeDlg_Impl, GetFocus_Impl));
-    aRightLb.SetGetFocusHdl(
+    m_pRightLb->SetGetFocusHdl(
         LINK(this, SfxOrganizeDlg_Impl, GetFocus_Impl));
-    aLeftLb.SetPosSizePixel(pParent->LogicToPixel(Point(3, 6), MAP_APPFONT),
+    m_pLeftLb->SetPosSizePixel(pParent->LogicToPixel(Point(3, 6), MAP_APPFONT),
                             pParent->LogicToPixel(Size(94, 132), MAP_APPFONT));
-    aRightLb.SetPosSizePixel(pParent->LogicToPixel(Point(103, 6), MAP_APPFONT),
+    m_pRightLb->SetPosSizePixel(pParent->LogicToPixel(Point(103, 6), MAP_APPFONT),
                              pParent->LogicToPixel(Size(94, 132), MAP_APPFONT));
 
     if ( !SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::E_SDATABASE) )
-        aAddressTemplateBtn.Hide();
-    Font aFont(aLeftLb.GetFont());
+        m_pAddressTemplateBtn->Hide();
+    Font aFont(m_pLeftLb->GetFont());
     aFont.SetWeight(WEIGHT_NORMAL);
-    aLeftLb.SetFont(aFont);
-    aRightLb.SetFont(aFont);
-    const long nIndent = aLeftLb.GetIndent() / 2;
-    aLeftLb.SetIndent( (short)nIndent );
-    aRightLb.SetIndent( (short)nIndent );
-
-    aLeftLb.SetMgr(&aMgr);
-    aRightLb.SetMgr(&aMgr);
-    aLeftLb.Reset();
-    aRightLb.Reset();//SetModel(aLeftLb.GetModel());
-
-    aLeftLb.Show();
-    aRightLb.Show();
-
-    aLeftLb.SelectAll( sal_False );
-    aRightLb.SelectAll( sal_False );
-    aRightLb.GrabFocus();
+    m_pLeftLb->SetFont(aFont);
+    m_pRightLb->SetFont(aFont);
+    const long nIndent = m_pLeftLb->GetIndent() / 2;
+    m_pLeftLb->SetIndent( (short)nIndent );
+    m_pRightLb->SetIndent( (short)nIndent );
+
+    m_pLeftLb->SetMgr(&aMgr);
+    m_pRightLb->SetMgr(&aMgr);
+    m_pLeftLb->Reset();
+    m_pRightLb->Reset();//SetModel(m_pLeftLb->GetModel());
+
+    m_pLeftLb->Show();
+    m_pRightLb->Show();
+
+    m_pLeftLb->SelectAll( sal_False );
+    m_pRightLb->SelectAll( sal_False );
+    m_pRightLb->GrabFocus();
 }
 
 //-------------------------------------------------------------------------
@@ -299,13 +321,13 @@ SfxOrganizeDlg_Impl::~SfxOrganizeDlg_Impl()
 
 void SfxOrganizeDlg_Impl::InitBitmaps( void )
 {
-    Image   aOpenedFolderBmp( SfxResId( IMG_OPENED_FOLDER ) );
-    Image   aClosedFolderBmp( SfxResId( IMG_CLOSED_FOLDER ) );
-    Image   aOpenedDocBmp( SfxResId( IMG_OPENED_DOC ) );
-    Image   aClosedDocBmp( SfxResId( IMG_CLOSED_DOC ) );
+    const Image& rOpenedFolderBmp(pDialog->get<FixedImage>("folderop")->GetImage());
+    const Image& rClosedFolderBmp(pDialog->get<FixedImage>("foldercl")->GetImage());
+    const Image& rOpenedDocBmp(pDialog->get<FixedImage>("docop")->GetImage());
+    const Image& rClosedDocBmp(pDialog->get<FixedImage>("doccl")->GetImage());
 
-    aLeftLb.SetBitmaps( aOpenedFolderBmp, aClosedFolderBmp, aOpenedDocBmp, aClosedDocBmp );
-    aRightLb.SetBitmaps( aOpenedFolderBmp, aClosedFolderBmp, aOpenedDocBmp, aClosedDocBmp );
+    m_pLeftLb->SetBitmaps(rOpenedFolderBmp, rClosedFolderBmp, rOpenedDocBmp, rClosedDocBmp);
+    m_pRightLb->SetBitmaps(rOpenedFolderBmp, rClosedFolderBmp, rOpenedDocBmp, rClosedDocBmp);
 }
 
 //=========================================================================
@@ -1294,28 +1316,11 @@ SvTreeListEntry* SfxOrganizeListBox_Impl::InsertEntryByBmpType(
     return pEntry;
 }
 
-//-------------------------------------------------------------------------
-
-SfxOrganizeListBox_Impl::SfxOrganizeListBox_Impl
-(
-    SfxOrganizeDlg_Impl* pArgDlg,
-    Window* pParent,
-    WinBits nBits,
-    DataEnum eType
-) :
-
-    SvTreeListBox( pParent, nBits ),
-
-    pMgr        ( NULL ),
-    pDlg        ( pArgDlg ),
-    eViewType   ( eType )
-
-/*  [Description]
-
-    Constructor SfxOrganizeListBox
-
-*/
-
+SfxOrganizeListBox_Impl::SfxOrganizeListBox_Impl(Window* pParent, WinBits nBits)
+    : SvTreeListBox( pParent, nBits )
+    , pMgr( NULL )
+    , pDlg( NULL )
+    , eViewType( SfxOrganizeListBox_Impl::VIEW_TEMPLATES )
 {
     SetDragDropMode(
         SV_DRAGDROP_CTRL_MOVE | SV_DRAGDROP_CTRL_COPY |
@@ -1327,6 +1332,12 @@ SfxOrganizeListBox_Impl::SfxOrganizeListBox_Impl
     EnableContextMenuHandling();
 }
 
+void SfxOrganizeListBox_Impl::Init(SfxOrganizeDlg_Impl* pArgDlg, DataEnum eType)
+{
+    pDlg = pArgDlg;
+    eViewType = eType;
+}
+
 //-------------------------------------------------------------------------
 
 IMPL_LINK( SfxOrganizeListBox_Impl, OnAsyncExecuteDrop, ExecuteDropEvent*, pEvent )
@@ -1458,7 +1469,7 @@ const Image &SfxOrganizeListBox_Impl::GetOpenedBmp(sal_uInt16 nLevel) const
 
 PopupMenu* SfxOrganizeListBox_Impl::CreateContextMenu()
 {
-    return new PopupMenu( *( pDlg->aEditBtn.GetPopupMenu() ) );
+    return new PopupMenu( *( pDlg->m_pEditBtn->GetPopupMenu() ) );
 }
 
 //-------------------------------------------------------------------------
@@ -1877,10 +1888,10 @@ long SfxOrganizeDlg_Impl::Dispatch_Impl( sal_uInt16 nId, Menu* _pMenu )
         case ID_RESCAN:
             if ( !aMgr.Rescan() )
                 ErrorBox( pDialog, SfxResId( MSG_ERROR_RESCAN ) ).Execute();
-            if ( SfxOrganizeListBox_Impl::VIEW_TEMPLATES == aLeftLb.GetViewType() )
-                aLeftLb.Reset();
-            if ( SfxOrganizeListBox_Impl::VIEW_TEMPLATES == aRightLb.GetViewType() )
-                aRightLb.Reset();
+            if ( SfxOrganizeListBox_Impl::VIEW_TEMPLATES == m_pLeftLb->GetViewType() )
+                m_pLeftLb->Reset();
+            if ( SfxOrganizeListBox_Impl::VIEW_TEMPLATES == m_pRightLb->GetViewType() )
+                m_pRightLb->Reset();
             break;
 
         case ID_PRINT:
@@ -1931,9 +1942,9 @@ long SfxOrganizeDlg_Impl::Dispatch_Impl( sal_uInt16 nId, Menu* _pMenu )
             bHandled = sal_False;
     }
 
-    if ( !bHandled && ( nId > ID_RESET_DEFAULT_TEMPLATE && nId <= ID_RESET_DEFAULT_TEMPLATE_END ) )
+    if ( !bHandled && nId > ID_RESET_DEFAULT_TEMPLATE )
     {
-        Menu* pSubMenu = _pMenu ? _pMenu : aEditBtn.GetPopupMenu()->GetPopupMenu( ID_RESET_DEFAULT_TEMPLATE );
+        Menu* pSubMenu = _pMenu ? _pMenu : m_pEditBtn->GetPopupMenu()->GetPopupMenu( ID_RESET_DEFAULT_TEMPLATE );
         if ( pSubMenu )
         {
             String aServiceName = SfxObjectShell::GetServiceNameFromFactory( pSubMenu->GetItemCommand( nId ) );
@@ -2027,8 +2038,8 @@ IMPL_LINK( SfxOrganizeDlg_Impl, MenuActivate_Impl, Menu *, pMenu )
                        bEnable && eVT == SfxOrganizeListBox_Impl::VIEW_TEMPLATES &&
                        nDepth == nDocLevel );
     pMenu->EnableItem( ID_RESCAN,
-                       SfxOrganizeListBox_Impl::VIEW_TEMPLATES == aRightLb.GetViewType() ||
-                       SfxOrganizeListBox_Impl::VIEW_TEMPLATES == aLeftLb.GetViewType() );
+                       SfxOrganizeListBox_Impl::VIEW_TEMPLATES == m_pRightLb->GetViewType() ||
+                       SfxOrganizeListBox_Impl::VIEW_TEMPLATES == m_pLeftLb->GetViewType() );
     sal_Bool bPrint = bEnable && nDepth > pFocusBox->GetDocLevel();
     if ( bPrint && pPrt )
         bPrint = !pPrt->IsPrinting() && !pPrt->IsJobActive();
@@ -2062,7 +2073,6 @@ IMPL_LINK( SfxOrganizeDlg_Impl, MenuActivate_Impl, Menu *, pMenu )
             String aTitle = SvFileInformationManager::GetDescription(aObj);
             pSubMenu->InsertItem(nItemId, aTitle, SvFileInformationManager::GetImage(aObj, false));
             pSubMenu->SetItemCommand(nItemId++, *i);
-            DBG_ASSERT( nItemId <= ID_RESET_DEFAULT_TEMPLATE_END, "menu item id overflow" );
         }
         pMenu->SetPopupMenu( ID_RESET_DEFAULT_TEMPLATE, pSubMenu );
     }
@@ -2092,7 +2102,7 @@ IMPL_LINK( SfxOrganizeDlg_Impl, GetFocus_Impl, SfxOrganizeListBox_Impl *, pBox )
     if(pFocusBox && pFocusBox != pBox)
         pFocusBox->SelectAll(sal_False);
     pFocusBox = pBox;
-    aFilesBtn.Enable( SfxOrganizeListBox_Impl::VIEW_FILES ==
+    m_pFilesBtn->Enable( SfxOrganizeListBox_Impl::VIEW_FILES ==
                       pFocusBox->GetViewType() );
     return 0;
 }
@@ -2115,17 +2125,17 @@ IMPL_LINK( SfxOrganizeDlg_Impl, LeftListBoxSelect_Impl, ListBox *, pBox )
     const SfxOrganizeListBox_Impl::DataEnum
         eViewType = pBox->GetSelectEntryPos() == 0 ?
         SfxOrganizeListBox_Impl::VIEW_TEMPLATES : SfxOrganizeListBox_Impl::VIEW_FILES;
-    if(eViewType!= aLeftLb.GetViewType()) {
-        aLeftLb.SetViewType(eViewType);
-        if(aRightLb.GetViewType() == eViewType)
-            aLeftLb.SetModel(aRightLb.GetModel());
+    if(eViewType!= m_pLeftLb->GetViewType()) {
+        m_pLeftLb->SetViewType(eViewType);
+        if(m_pRightLb->GetViewType() == eViewType)
+            m_pLeftLb->SetModel(m_pRightLb->GetModel());
         else {
             // Models trennen
-            aLeftLb.DisconnectFromModel();
-            aLeftLb.Reset();
+            m_pLeftLb->DisconnectFromModel();
+            m_pLeftLb->Reset();
         }
     }
-    GetFocus_Impl(&aLeftLb);
+    GetFocus_Impl(m_pLeftLb);
     return 0;
 }
 
@@ -2147,33 +2157,38 @@ IMPL_LINK( SfxOrganizeDlg_Impl, RightListBoxSelect_Impl, ListBox *, pBox )
     const SfxOrganizeListBox_Impl::DataEnum eViewType =
         pBox->GetSelectEntryPos() == 0 ?
         SfxOrganizeListBox_Impl::VIEW_TEMPLATES : SfxOrganizeListBox_Impl::VIEW_FILES;
-    if(eViewType!= aRightLb.GetViewType())
+    if(eViewType!= m_pRightLb->GetViewType())
     {
-        aRightLb.SetViewType(eViewType);
-        if(aLeftLb.GetViewType() == eViewType)
-            aRightLb.SetModel(aLeftLb.GetModel());
+        m_pRightLb->SetViewType(eViewType);
+        if(m_pLeftLb->GetViewType() == eViewType)
+            m_pRightLb->SetModel(m_pLeftLb->GetModel());
         else
         {
             // Separate models
-            aRightLb.DisconnectFromModel();
-            aRightLb.Reset();
+            m_pRightLb->DisconnectFromModel();
+            m_pRightLb->Reset();
         }
     }
-    aRightLb.GrabFocus();
-    GetFocus_Impl(&aRightLb);
+    m_pRightLb->GrabFocus();
+    GetFocus_Impl(m_pRightLb);
     return 0;
 }
 
 //-------------------------------------------------------------------------
 
-IMPL_LINK( SfxOrganizeDlg_Impl, OnAddressTemplateClicked, Button *, pButton )
+IMPL_LINK_NOARG(SfxOrganizeDlg_Impl, OnAddressTemplateClicked)
 {
-    (void)pButton; //unused
     svt::AddressBookSourceDialog aDialog(pDialog, ::comphelper::getProcessServiceFactory());
     aDialog.Execute();
     return 0L;
 }
 
+IMPL_LINK_NOARG(SfxOrganizeDlg_Impl, Close_Impl)
+{
+    pDialog->EndDialog( sal_True );
+    return 0L;
+}
+
 //-------------------------------------------------------------------------
 
 IMPL_LINK( SfxOrganizeDlg_Impl, AddFiles_Impl, Button *, pButton )
@@ -2357,15 +2372,10 @@ short SfxTemplateOrganizeDlg::Execute()
 
 SfxTemplateOrganizeDlg::SfxTemplateOrganizeDlg(Window * pParent,
                                                 SfxDocumentTemplates *pTempl)
-:   ModalDialog( pParent, SfxResId(DLG_ORGANIZE)),
-    pImp( new SfxOrganizeDlg_Impl(this, pTempl) )
-
-/*  [Description]
-
-    Constructor
-*/
+    : ModalDialog(pParent, "TemplateManagementDialog",
+        "sfx/ui/templatemanagementdialog.ui")
+    , pImp( new SfxOrganizeDlg_Impl(this, pTempl) )
 {
-    FreeResource();
 }
 
 //-------------------------------------------------------------------------
diff --git a/sfx2/source/doc/docvor.hrc b/sfx2/source/doc/docvor.hrc
deleted file mode 100644
index f191ddd..0000000
--- a/sfx2/source/doc/docvor.hrc
+++ /dev/null
@@ -1,59 +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 IMG_OPENED_FOLDER       2
-#define IMG_CLOSED_FOLDER       1
-#define IMG_OPENED_DOC          3
-#define IMG_CLOSED_DOC          4
-
-#define ACC_EDIT 1
-#define ID_COPY 201
-#define ID_MOVE 202
-#define ID_DELETE 203
-#define ID_EDIT 204
-#define ID_COPY_FROM 211
-#define ID_RESCAN 220
-#define ID_COPY_TO 210
-#define ID_NEW 200
-#define ID_PRINT    240
-#define ID_PRINTER_SETUP    2341
-
-#define ID_DEFAULT_TEMPLATE 300
-#define ID_RESET_DEFAULT_TEMPLATE 301
-//!!! dont use the ids from 302 to 350, we need them as dynamic ids
-#define ID_RESET_DEFAULT_TEMPLATE_END (ID_RESET_DEFAULT_TEMPLATE+49)
-
-#define LB_RIGHT_TYP 11
-#define LB_RIGHT 10
-#define LB_LEFT_TYP 2
-#define BTN_EDIT 105
-#define BTN_FILES 3
-#define BTN_ADDRESSTEMPLATE 4
-#define LB_LEFT 1
-#define BTN_HELP 100
-
-#ifdef BTN_OK
-#undef BTN_OK
-#endif
-#define BTN_OK 100
-
-#ifdef BTN_CANCEL
-#undef BTN_CANCEL
-#endif
-#define BTN_CANCEL 101
-
diff --git a/sfx2/source/doc/docvor.src b/sfx2/source/doc/docvor.src
deleted file mode 100644
index 95a6aca..0000000
--- a/sfx2/source/doc/docvor.src
+++ /dev/null
@@ -1,253 +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 <sfx2/sfx.hrc>
-#include "doc.hrc"
-#include "docvor.hrc"
-#include "helpid.hrc"
-
-// DLG_ORGANIZE ----------------------------------------------------------
-
-#define MASKCOLOR   MaskColor = Color { Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; }
-
-ModalDialog DLG_ORGANIZE
-{
-    HelpId = CMD_SID_ORGANIZER ;
-    OutputSize = TRUE ;
-    SVLook = TRUE ;
-    Size = MAP_APPFONT ( 271 , 162 ) ;
-    Text [ en-US ] = "Template Management" ;
-    Moveable = TRUE ;
-    HelpButton BTN_HELP
-    {
-        Pos = MAP_APPFONT ( 205 , 43 ) ;
-        Size = MAP_APPFONT ( 60 , 14 ) ;
-        TabStop = TRUE ;
-    };
-    OKButton BTN_OK
-    {
-        Pos = MAP_APPFONT ( 205 , 6 ) ;
-        Size = MAP_APPFONT ( 60 , 14 ) ;
-        Text [ en-US ] = "Close" ;
-        TabStop = TRUE ;
-        DefButton = TRUE ;
-    };
-    PushButton BTN_FILES
-    {
-        HelpID = "sfx2:PushButton:DLG_ORGANIZE:BTN_FILES";
-        Pos = MAP_APPFONT ( 205 , 143 ) ;
-        Size = MAP_APPFONT ( 60 , 14 ) ;
-        Text [ en-US ] = "~File..." ;
-        TabStop = TRUE ;
-    };
-    PushButton BTN_ADDRESSTEMPLATE
-    {
-        HelpID = "sfx2:PushButton:DLG_ORGANIZE:BTN_ADDRESSTEMPLATE";
-        Pos = MAP_APPFONT ( 205 , 124 ) ;
-        Size = MAP_APPFONT ( 60 , 14 ) ;
-        Text [ en-US ] = "~Address Book..." ;
-    };
-    ListBox LB_LEFT_TYP
-    {
-        HelpID = "sfx2:ListBox:DLG_ORGANIZE:LB_LEFT_TYP";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 3 , 144 ) ;
-        Size = MAP_APPFONT ( 94 , 55 ) ;
-        TabStop = TRUE ;
-        DropDown = TRUE ;
-        CurPos = 0 ;
-        StringList [ en-US ] =
-        {
-            < "Templates" ; Default ; > ;
-            < "Documents" ; Default ; > ;
-        };
-    };
-    ListBox LB_RIGHT_TYP
-    {
-        HelpID = "sfx2:ListBox:DLG_ORGANIZE:LB_RIGHT_TYP";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 103 , 144 ) ;
-        Size = MAP_APPFONT ( 94 , 55 ) ;
-        TabStop = TRUE ;
-        DropDown = TRUE ;
-        CurPos = 1 ;
-        StringList [ en-US ] =
-        {
-            < "Templates" ; Default ; > ;
-            < "Documents" ; Default ; > ;
-        };
-    };
-    Control LB_LEFT
-    {
-        HelpId = HID_CTL_ORGANIZER_LEFT ;
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 3 , 6 ) ;
-        Size = MAP_APPFONT ( 94 , 132 ) ;
-        TabStop = TRUE ;
-        ClipChildren = TRUE ;
-    };
-    Control LB_RIGHT
-    {
-        HelpId = HID_CTL_ORGANIZER_RIGHT ;
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 103 , 6 ) ;
-        Size = MAP_APPFONT ( 94 , 132 ) ;
-        TabStop = TRUE ;
-        ClipChildren = TRUE ;
-    };
-    Accelerator ACC_EDIT
-    {
-        ItemList =
-        {
-            AcceleratorItem
-            {
-                Identifier = ID_NEW ;
-                Key = KeyCode
-                {
-                    Code = KEY_INSERT ;
-                };
-            };
-            AcceleratorItem
-            {
-                Identifier = ID_DELETE ;
-                Key = KeyCode
-                {
-                    Code = KEY_DELETE ;
-                };
-            };
-        };
-    };
-    MenuButton BTN_EDIT
-    {
-        HelpID = "sfx2:MenuButton:DLG_ORGANIZE:BTN_EDIT";
-        Pos = MAP_APPFONT ( 205 , 23 ) ;
-        Size = MAP_APPFONT ( 60 , 14 ) ;
-        Text [ en-US ] = "Commands" ;
-        TabStop = TRUE ;
-        ButtonMenu = Menu
-        {
-            ItemList =
-            {
-                MenuItem
-                {
-                    Identifier = ID_NEW ;
-                    HelpId = HID_ORGANIZE_NEW ;
-                    Text [ en-US ] = "~New" ;
-                    AccelKey = KeyCode
-                    {
-                        Code = KEY_INSERT ;
-                    };
-                };
-                MenuItem
-                {
-                    Identifier = ID_DELETE ;
-                    HelpId = HID_ORGANIZE_DELETE ;
-                    Text [ en-US ] = "~Delete" ;
-                    AccelKey = KeyCode
-                    {
-                        Code = KEY_DELETE ;
-                    };
-                };
-                MenuItem
-                {
-                    Identifier = ID_EDIT ;
-                    HelpId = HID_ORGANIZE_EDIT ;
-                    Text [ en-US ] = "~Edit" ;
-                };
-                MenuItem
-                {
-                    Separator = TRUE ;
-                };
-                MenuItem
-                {
-                    Identifier = ID_COPY_FROM ;
-                    HelpId = HID_ORGANIZE_COPY_FROM ;
-                    Text [ en-US ] = "Import Template..." ;
-                };
-                MenuItem
-                {
-                    Identifier = ID_COPY_TO ;
-                    HelpId = HID_ORGANIZE_COPY_TO ;
-                    Text [ en-US ] = "Export Template..." ;
-                };
-                MenuItem
-                {
-                    Separator = TRUE ;
-                };
-                MenuItem
-                {
-                    Identifier = ID_PRINT ;
-                    HelpId = HID_ORGANIZE_PRINT ;
-                    Text [ en-US ] = "~Print" ;
-                };
-                MenuItem
-                {
-                    Identifier = ID_PRINTER_SETUP ;
-                    HelpId = HID_ORGANIZE_PRINTER_SETUP ;
-                    Text [ en-US ] = "Printer Settings..." ;
-                };
-                MenuItem
-                {
-                    Separator = TRUE ;
-                };
-                MenuItem
-                {
-                    Identifier = ID_RESCAN ;
-                    HelpId = HID_ORGANIZE_RESCAN ;
-                    Text [ en-US ] = "Update" ;
-                };
-                MenuItem
-                {
-                    Separator = TRUE ;
-                };
-                MenuItem
-                {
-                    Identifier = ID_DEFAULT_TEMPLATE ;
-                    HelpId = HID_ORGANIZE_STDTEMPLATE_ADD ;
-                    Text [ en-US ] = "Set As Default Template" ;
-                };
-                MenuItem
-                {
-                    Identifier = ID_RESET_DEFAULT_TEMPLATE ;
-                    HelpId = HID_ORGANIZE_STDTEMPLATE_DEL ;
-                    Text [ en-US ] = "Reset Default Template" ;
-                };
-            };
-        };
-    };
-    Image IMG_OPENED_FOLDER
-    {
-        MASKCOLOR ;
-        ImageBitmap = Bitmap { File = "folderop.bmp" ; } ;
-    };
-    Image IMG_CLOSED_FOLDER
-    {
-        MASKCOLOR ;
-        ImageBitmap = Bitmap { File = "foldercl.bmp" ; } ;
-    };
-    Image IMG_OPENED_DOC
-    {
-        MASKCOLOR ;
-        ImageBitmap = Bitmap { File = "doccl.bmp" ; } ;
-    };
-    Image IMG_CLOSED_DOC
-    {
-        MASKCOLOR ;
-        ImageBitmap = Bitmap { File = "doccl.bmp" ; } ;
-    };
-};
diff --git a/sfx2/source/inc/helpid.hrc b/sfx2/source/inc/helpid.hrc
index 0a1f71f..8173784 100644
--- a/sfx2/source/inc/helpid.hrc
+++ b/sfx2/source/inc/helpid.hrc
@@ -31,8 +31,6 @@
 #define HID_DOCINFOUSER                                       "SFX2_HID_DOCINFOUSER"
 #define HID_DOCINFORELOAD                                     "SFX2_HID_DOCINFORELOAD"
 #define HID_BROWSERCONTROL                                    "SFX2_HID_BROWSERCONTROL"
-#define HID_CTL_ORGANIZER_LEFT                                "SFX2_HID_CTL_ORGANIZER_LEFT"
-#define HID_CTL_ORGANIZER_RIGHT                               "SFX2_HID_CTL_ORGANIZER_RIGHT"
 #define HID_PRINT_OPTIONS                                     "SFX2_HID_PRINT_OPTIONS"
 #define HID_PREVIEW_FRAME                                     "SFX2_HID_PREVIEW_FRAME"
 #define HID_DOCINFO_FRAME                                     "SFX2_HID_DOCINFO_FRAME"
@@ -57,14 +55,6 @@
 #define HID_EXPLORER_SRCH_LATEST_COUNT                        "SFX2_HID_EXPLORER_SRCH_LATEST_COUNT"
 #define HID_CONFIG_EVENT_OFFICE_BASED                         "SFX2_HID_CONFIG_EVENT_OFFICE_BASED"
 #define HID_CONFIG_EVENT_DOCUMENT_BASED                       "SFX2_HID_CONFIG_EVENT_DOCUMENT_BASED"
-#define HID_ORGANIZE_NEW                                      "SFX2_HID_ORGANIZE_NEW"
-#define HID_ORGANIZE_DELETE                                   "SFX2_HID_ORGANIZE_DELETE"
-#define HID_ORGANIZE_EDIT                                     "SFX2_HID_ORGANIZE_EDIT"
-#define HID_ORGANIZE_COPY_FROM                                "SFX2_HID_ORGANIZE_COPY_FROM"
-#define HID_ORGANIZE_COPY_TO                                  "SFX2_HID_ORGANIZE_COPY_TO"
-#define HID_ORGANIZE_PRINT                                    "SFX2_HID_ORGANIZE_PRINT"
-#define HID_ORGANIZE_PRINTER_SETUP                            "SFX2_HID_ORGANIZE_PRINTER_SETUP"
-#define HID_ORGANIZE_RESCAN                                   "SFX2_HID_ORGANIZE_RESCAN"
 #define HID_STYLIST_NEW                                       "SFX2_HID_STYLIST_NEW"
 #define HID_STYLIST_EDIT                                      "SFX2_HID_STYLIST_EDIT"
 #define HID_STYLIST_DELETE                                    "SFX2_HID_STYLIST_DELETE"
@@ -126,8 +116,6 @@
 #define HID_HELP_TABPAGE_SEARCH                               "SFX2_HID_HELP_TABPAGE_SEARCH"
 #define HID_HELP_TABPAGE_BOOKMARKS                            "SFX2_HID_HELP_TABPAGE_BOOKMARKS"
 #define HID_TBXCONTROL_FILENEW                                "SFX2_HID_TBXCONTROL_FILENEW"
-#define HID_ORGANIZE_STDTEMPLATE_ADD                          "SFX2_HID_ORGANIZE_STDTEMPLATE_ADD"
-#define HID_ORGANIZE_STDTEMPLATE_DEL                          "SFX2_HID_ORGANIZE_STDTEMPLATE_DEL"
 #define HID_HELP_TOOLBOXITEM_SEARCHDIALOG                     "SFX2_HID_HELP_TOOLBOXITEM_SEARCHDIALOG"
 #define HID_HELP_BOOKMARKS_OPEN                               "SFX2_HID_HELP_BOOKMARKS_OPEN"
 #define HID_HELP_BOOKMARKS_RENAME                             "SFX2_HID_HELP_BOOKMARKS_RENAME"
diff --git a/sfx2/uiconfig/ui/templatemanagementdialog.ui b/sfx2/uiconfig/ui/templatemanagementdialog.ui
index 31242ce..10c48da 100644
--- a/sfx2/uiconfig/ui/templatemanagementdialog.ui
+++ b/sfx2/uiconfig/ui/templatemanagementdialog.ui
@@ -9,7 +9,7 @@
     <child internal-child="vbox">
       <object class="GtkBox" id="dialog-vbox1">
         <property name="can_focus">False</property>
-        <property name="spacing">2</property>
+        <property name="spacing">12</property>
         <child internal-child="action_area">
           <object class="GtkButtonBox" id="dialog-action_area1">
             <property name="can_focus">False</property>
@@ -22,6 +22,8 @@
                 <property name="use_action_appearance">False</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_action_appearance">False</property>
                 <property name="use_stock">True</property>
@@ -33,16 +35,18 @@
               </packing>
             </child>
             <child>
-              <object class="GtkComboBoxText" id="13">
+              <object class="GtkButton" id="commands:commandmenu">
+                <property name="label" translatable="yes">Commands</property>
+                <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="entry_text_column">0</property>
-                <property name="id_column">1</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">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>
+                <property name="position">2</property>
               </packing>
             </child>
             <child>
@@ -58,11 +62,11 @@
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">True</property>
-                <property name="position">2</property>
+                <property name="position">3</property>
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="101">
+              <object class="GtkButton" id="addressbook">
                 <property name="label" translatable="yes">Address Book...</property>
                 <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
@@ -73,7 +77,7 @@
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">True</property>
-                <property name="position">3</property>
+                <property name="position">4</property>
                 <property name="secondary">True</property>
               </packing>
             </child>
@@ -89,7 +93,7 @@
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">True</property>
-                <property name="position">4</property>
+                <property name="position">5</property>
                 <property name="secondary">True</property>
               </packing>
             </child>
@@ -107,23 +111,33 @@
             <property name="can_focus">False</property>
             <property name="hexpand">True</property>
             <property name="vexpand">True</property>
-            <property name="spacing">30</property>
+            <property name="spacing">12</property>
             <property name="homogeneous">True</property>
             <child>
               <object class="GtkGrid" id="grid1">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="row_spacing">50</property>
+                <property name="row_spacing">12</property>
+                <child>
+                  <object class="GtkComboBox" id="lefttype">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="model">liststore1</property>
+                    <property name="active">0</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="GtkScrolledWindow" id="1">
-                    <property name="width_request">150</property>
-                    <property name="height_request">200</property>
+                  <object class="sfxlo:SfxOrganizeListBox" id="leftorganizer">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="shadow_type">in</property>
-                    <child>
-                      <placeholder/>
-                    </child>
+                    <property name="hexpand">True</property>
+                    <property name="vexpand">True</property>
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
@@ -133,15 +147,27 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkComboBoxText" id="11">
-                    <property name="visible">True</property>
+                  <object class="GtkImage" id="foldercl">
                     <property name="can_focus">False</property>
-                    <property name="entry_text_column">0</property>
-                    <property name="id_column">1</property>
+                    <property name="no_show_all">True</property>
+                    <property name="pixbuf">res/foldercl.png</property>
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
-                    <property name="top_attach">1</property>
+                    <property name="top_attach">2</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkImage" id="docop">
+                    <property name="can_focus">False</property>
+                    <property name="no_show_all">True</property>
+                    <property name="pixbuf">sfx2/res/doccl.png</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">3</property>
                     <property name="width">1</property>
                     <property name="height">1</property>
                   </packing>
@@ -157,17 +183,27 @@
               <object class="GtkGrid" id="grid2">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="row_spacing">50</property>
+                <property name="row_spacing">12</property>
                 <child>
-                  <object class="GtkScrolledWindow" id="2">
-                    <property name="width_request">150</property>
-                    <property name="height_request">200</property>
+                  <object class="GtkComboBox" id="righttype">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="model">liststore1</property>
+                    <property name="active">1</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="sfxlo:SfxOrganizeListBox" id="rightorganizer">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="shadow_type">in</property>
-                    <child>
-                      <placeholder/>
-                    </child>
+                    <property name="hexpand">True</property>
+                    <property name="vexpand">True</property>
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
@@ -177,15 +213,27 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkComboBoxText" id="12">
-                    <property name="visible">True</property>
+                  <object class="GtkImage" id="doccl">
                     <property name="can_focus">False</property>
-                    <property name="entry_text_column">0</property>
-                    <property name="id_column">1</property>
+                    <property name="no_show_all">True</property>
+                    <property name="pixbuf">sfx2/res/doccl.png</property>
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
-                    <property name="top_attach">1</property>
+                    <property name="top_attach">2</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkImage" id="folderop">
+                    <property name="can_focus">False</property>
+                    <property name="no_show_all">True</property>
+                    <property name="pixbuf">res/folderop.png</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">3</property>
                     <property name="width">1</property>
                     <property name="height">1</property>
                   </packing>
@@ -208,9 +256,148 @@
     </child>
     <action-widgets>
       <action-widget response="0">close</action-widget>
+      <action-widget response="0">commands:commandmenu</action-widget>
       <action-widget response="0">help</action-widget>
-      <action-widget response="0">101</action-widget>
+      <action-widget response="0">addressbook</action-widget>
       <action-widget response="0">file</action-widget>
     </action-widgets>
   </object>
+  <object class="GtkMenu" id="commandmenu">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <child>
+      <object class="GtkMenuItem" id="new">
+        <property name="use_action_appearance">False</property>
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes">_New</property>
+        <property name="use_underline">True</property>
+        <accelerator key="Insert" signal="activate"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkMenuItem" id="delete">
+        <property name="use_action_appearance">False</property>
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes">_Delete</property>
+        <property name="use_underline">True</property>
+        <accelerator key="Delete" signal="activate"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkMenuItem" id="edit">
+        <property name="use_action_appearance">False</property>
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes">_Edit</property>
+        <property name="use_underline">True</property>
+      </object>
+    </child>
+    <child>
+      <object class="GtkSeparatorMenuItem" id="menuitem4">
+        <property name="use_action_appearance">False</property>
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+      </object>
+    </child>
+    <child>
+      <object class="GtkMenuItem" id="copyfrom">
+        <property name="use_action_appearance">False</property>
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes">Import Template...</property>
+        <property name="use_underline">True</property>
+      </object>
+    </child>
+    <child>
+      <object class="GtkMenuItem" id="copyto">
+        <property name="use_action_appearance">False</property>
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes">Export Template...</property>
+        <property name="use_underline">True</property>
+      </object>
+    </child>
+    <child>
+      <object class="GtkSeparatorMenuItem" id="menuitem7">
+        <property name="use_action_appearance">False</property>
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+      </object>
+    </child>
+    <child>
+      <object class="GtkMenuItem" id="print">
+        <property name="use_action_appearance">False</property>
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes">_Print</property>
+        <property name="use_underline">True</property>
+      </object>
+    </child>
+    <child>
+      <object class="GtkMenuItem" id="printersetup">
+        <property name="use_action_appearance">False</property>
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes">Printer Settings</property>
+        <property name="use_underline">True</property>
+      </object>
+    </child>
+    <child>
+      <object class="GtkSeparatorMenuItem" id="menuitem10">
+        <property name="use_action_appearance">False</property>
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+      </object>
+    </child>
+    <child>
+      <object class="GtkMenuItem" id="rescan">
+        <property name="use_action_appearance">False</property>
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes">Update</property>
+        <property name="use_underline">True</property>
+      </object>
+    </child>
+    <child>
+      <object class="GtkSeparatorMenuItem" id="menuitem12">
+        <property name="use_action_appearance">False</property>
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+      </object>
+    </child>
+    <child>
+      <object class="GtkMenuItem" id="defaulttemplate">
+        <property name="use_action_appearance">False</property>
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes">Set As Default Template</property>
+        <property name="use_underline">True</property>
+      </object>
+    </child>
+    <child>
+      <object class="GtkMenuItem" id="menuitem14">
+        <property name="use_action_appearance">False</property>
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes">Reset Default Template</property>
+        <property name="use_underline">True</property>
+      </object>
+    </child>
+  </object>
+  <object class="GtkListStore" id="liststore1">
+    <columns>
+      <!-- column-name gchararray1 -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">Templates</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Documents</col>
+      </row>
+    </data>
+  </object>
 </interface>
commit 5e1a877170d336b9d055122ea5ed1adee7aed631
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Dec 11 14:20:24 2012 +0000

    pLeftBox and pRightBox unused, GetOther doesn't exist
    
    Change-Id: Ibc4034cf4eb2d610fdb6dcabb3d547bf2f9f1172

diff --git a/sfx2/inc/orgmgr.hxx b/sfx2/inc/orgmgr.hxx
index 48c3ae3..17b396e 100644
--- a/sfx2/inc/orgmgr.hxx
+++ b/sfx2/inc/orgmgr.hxx
@@ -52,17 +52,11 @@ class SfxOrganizeMgr
 private:
     SfxOrganizeMgr_Impl*        pImpl;
     SfxDocumentTemplates*       pTemplates;
-    SfxOrganizeListBox_Impl*    pLeftBox;
-    SfxOrganizeListBox_Impl*    pRightBox;
     sal_Bool                        bDeleteTemplates    :1;
     sal_Bool                        bModified           :1;
 
-    SfxOrganizeListBox_Impl*    GetOther( SfxOrganizeListBox_Impl* );
-
 public:
-    SfxOrganizeMgr( SfxOrganizeListBox_Impl* pLeft,
-                    SfxOrganizeListBox_Impl* pRight,
-                    SfxDocumentTemplates* pTempl = NULL );
+    SfxOrganizeMgr(SfxDocumentTemplates* pTempl = NULL);
     ~SfxOrganizeMgr();
 
     sal_Bool    Copy( sal_uInt16 nTargetRegion, sal_uInt16 nTargetIdx, sal_uInt16 nSourceRegion, sal_uInt16 nSourceIdx );
diff --git a/sfx2/source/doc/docvor.cxx b/sfx2/source/doc/docvor.cxx
index 18da272..11b164b 100644
--- a/sfx2/source/doc/docvor.cxx
+++ b/sfx2/source/doc/docvor.cxx
@@ -200,7 +200,7 @@ SfxOrganizeDlg_Impl::SfxOrganizeDlg_Impl( SfxTemplateOrganizeDlg* pParent,
     aFilesBtn           ( pParent, SfxResId( BTN_FILES ) ),
 
     aEditAcc    ( SfxResId( ACC_EDIT ) ),
-    aMgr        ( &aLeftLb, &aRightLb, pTempl ),
+    aMgr        ( pTempl ),
     pFileDlg    ( NULL )
 
 {
diff --git a/sfx2/source/view/orgmgr.cxx b/sfx2/source/view/orgmgr.cxx
index 0c4bb72..798731b 100644
--- a/sfx2/source/view/orgmgr.cxx
+++ b/sfx2/source/view/orgmgr.cxx
@@ -201,13 +201,9 @@ const String &SfxObjectList::GetBaseName(const _FileListEntry* p) const
 
 //-------------------------------------------------------------------------
 
-SfxOrganizeMgr::SfxOrganizeMgr( SfxOrganizeListBox_Impl *pLeft,
-                                SfxOrganizeListBox_Impl *pRight,
-                                SfxDocumentTemplates *pTempl) :
+SfxOrganizeMgr::SfxOrganizeMgr(SfxDocumentTemplates *pTempl) :
     pImpl(new SfxOrganizeMgr_Impl),
     pTemplates(pTempl? pTempl: new SfxDocumentTemplates),
-    pLeftBox(pLeft),
-    pRightBox(pRight),
     bDeleteTemplates(pTempl == 0),
     bModified(0)
 
@@ -241,7 +237,6 @@ SfxOrganizeMgr::~SfxOrganizeMgr()
     delete pImpl->pDocList;
     delete pImpl->pIntlWrapper;
     delete pImpl;
-    pLeftBox = pRightBox = NULL;
 }
 
 //-------------------------------------------------------------------------


More information about the Libreoffice-commits mailing list