[Libreoffice-commits] core.git: dbaccess/AllLangResTarget_dbu.mk dbaccess/source dbaccess/uiconfig dbaccess/UIConfig_dbaccess.mk extras/source include/svtools svtools/source

Palenik Mihály palenik.mihaly at gmail.com
Wed Jul 2 01:47:37 PDT 2014


 dbaccess/AllLangResTarget_dbu.mk               |    1 
 dbaccess/UIConfig_dbaccess.mk                  |    1 
 dbaccess/source/ui/dlg/CollectionView.cxx      |   73 +++-----
 dbaccess/source/ui/dlg/CollectionView.hrc      |   43 ----
 dbaccess/source/ui/dlg/CollectionView.src      |  151 -----------------
 dbaccess/source/ui/dlg/dbadmin2.src            |   10 +
 dbaccess/source/ui/imagelists/dbimagelists.src |   14 +
 dbaccess/source/ui/inc/CollectionView.hxx      |   17 -
 dbaccess/uiconfig/ui/collectionviewdialog.ui   |  219 +++++++++++++++++++++++++
 extras/source/glade/libreoffice-catalog.xml.in |    3 
 include/svtools/fileview.hxx                   |    4 
 include/svtools/svtools.hrc                    |    2 
 svtools/source/contnr/fileview.cxx             |   31 ++-
 svtools/source/contnr/templwin.cxx             |    2 
 svtools/source/contnr/templwin.src             |    5 
 15 files changed, 313 insertions(+), 263 deletions(-)

New commits:
commit a5cc3ce566f1a1ebd5995582efed104fb2793fb0
Author: Palenik Mihály <palenik.mihaly at gmail.com>
Date:   Mon Jun 30 15:53:56 2014 +0200

    Convert DLG_COLLECTION_VIEW to .ui
    
    Conflicts:
    	include/svtools/fileview.hxx
    	svtools/source/contnr/fileview.cxx
    
    Change-Id: I78b590410ec4e55eeecd2da8ab79738f05e403b5
    Reviewed-on: https://gerrit.libreoffice.org/9981
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/dbaccess/AllLangResTarget_dbu.mk b/dbaccess/AllLangResTarget_dbu.mk
index 5e7448e..9cc5850 100644
--- a/dbaccess/AllLangResTarget_dbu.mk
+++ b/dbaccess/AllLangResTarget_dbu.mk
@@ -38,7 +38,6 @@ $(eval $(call gb_SrsTarget_add_files,dbaccess/dbu,\
     dbaccess/source/ui/control/undosqledit.src \
     dbaccess/source/ui/dlg/admincontrols.src \
     dbaccess/source/ui/dlg/AutoControls.src \
-    dbaccess/source/ui/dlg/CollectionView.src \
     dbaccess/source/ui/dlg/ConnectionPage.src \
     dbaccess/source/ui/dlg/dbadmin2.src \
     dbaccess/source/ui/dlg/dbadminsetup.src \
diff --git a/dbaccess/UIConfig_dbaccess.mk b/dbaccess/UIConfig_dbaccess.mk
index 8919127..197e4a3 100644
--- a/dbaccess/UIConfig_dbaccess.mk
+++ b/dbaccess/UIConfig_dbaccess.mk
@@ -14,6 +14,7 @@ $(eval $(call gb_UIConfig_add_uifiles,dbaccess, \
     dbaccess/uiconfig/ui/advancedsettingsdialog \
     dbaccess/uiconfig/ui/applycolpage \
     dbaccess/uiconfig/ui/choosedatasourcedialog \
+    dbaccess/uiconfig/ui/collectionviewdialog \
     dbaccess/uiconfig/ui/colwidthdialog \
     dbaccess/uiconfig/ui/copytablepage \
     dbaccess/uiconfig/ui/dbaseindexdialog \
diff --git a/dbaccess/source/ui/dlg/CollectionView.cxx b/dbaccess/source/ui/dlg/CollectionView.cxx
index 379e0a2..6d82fc5 100644
--- a/dbaccess/source/ui/dlg/CollectionView.cxx
+++ b/dbaccess/source/ui/dlg/CollectionView.cxx
@@ -18,7 +18,6 @@
  */
 
 #include "CollectionView.hxx"
-#include "CollectionView.hrc"
 #include <tools/debug.hxx>
 #include <tools/diagnose_ex.h>
 #include "moduledbu.hxx"
@@ -60,42 +59,36 @@ OCollectionView::OCollectionView( Window * pParent
                                  ,const Reference< XContent>& _xContent
                                  ,const OUString& _sDefaultName
                                  ,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext)
-    : ModalDialog( pParent, ModuleRes(DLG_COLLECTION_VIEW))
-    , m_aFTCurrentPath( this, ModuleRes( FT_EXPLORERFILE_CURRENTPATH ) )
-    , m_aNewFolder(     this, ModuleRes( BTN_EXPLORERFILE_NEWFOLDER ) )
-    , m_aUp(            this, ModuleRes( BTN_EXPLORERFILE_UP ) )
-    , m_aView(          this, ModuleRes( CTRL_VIEW ), FILEVIEW_SHOW_ONLYTITLE )
-    , m_aFTName(        this, ModuleRes( FT_EXPLORERFILE_FILENAME ) )
-    , m_aName(          this, ModuleRes( ED_EXPLORERFILE_FILENAME ) )
-    , m_aFL(            this, ModuleRes( FL_1 ) )
-    , m_aPB_OK(         this, ModuleRes( BTN_EXPLORERFILE_SAVE ) )
-    , m_aPB_CANCEL(     this, ModuleRes( PB_CANCEL ) )
-    , m_aPB_HELP(       this, ModuleRes( PB_HELP ) )
-    , m_sPath(          ModuleRes( STR_PATHNAME ) )
+    : ModalDialog( pParent, "CollectionView", "dbaccess/ui/collectionviewdialog.ui")
     , m_xContent(_xContent)
     , m_xContext(_rxContext)
     , m_bCreateForm(true)
 {
-    FreeResource();
+    get(m_pFTCurrentPath, "currentPathLabel");
+    get(m_pNewFolder, "newFolderButton");
+    get(m_pUp, "upButton");
+    get(m_pView, "viewTreeview");
+    get(m_pName, "fileNameEntry");
+    get(m_pPB_OK, "ok");
 
     OSL_ENSURE(m_xContent.is(),"No valid content!");
-    m_aView.Initialize(m_xContent,OUString());
-    m_aFTCurrentPath.SetStyle( m_aFTCurrentPath.GetStyle() | WB_PATHELLIPSIS );
+    m_pView->Initialize(m_xContent,OUString());
+    m_pFTCurrentPath->SetStyle( m_pFTCurrentPath->GetStyle() | WB_PATHELLIPSIS );
     initCurrentPath();
 
-    m_aName.SetText(_sDefaultName);
-    m_aName.GrabFocus();
+    m_pName->SetText(_sDefaultName);
+    m_pName->GrabFocus();
 
-    m_aNewFolder.SetStyle( m_aNewFolder.GetStyle() | WB_NOPOINTERFOCUS );
-    m_aUp.SetModeImage(Image(ModuleRes(IMG_NAVIGATION_BTN_UP_SC)));
-    m_aNewFolder.SetModeImage(Image(ModuleRes(IMG_NAVIGATION_CREATEFOLDER_SC)));
+    m_pNewFolder->SetStyle( m_pNewFolder->GetStyle() | WB_NOPOINTERFOCUS );
+    m_pUp->SetModeImage(Image(ModuleRes(IMG_NAVIGATION_BTN_UP_SC)));
+    m_pNewFolder->SetModeImage(Image(ModuleRes(IMG_NAVIGATION_CREATEFOLDER_SC)));
 
-    m_aView.SetDoubleClickHdl( LINK( this, OCollectionView, Dbl_Click_FileView ) );
-    m_aView.EnableAutoResize();
-    m_aView.EnableDelete(true);
-    m_aUp.SetClickHdl( LINK( this, OCollectionView, Up_Click ) );
-    m_aNewFolder.SetClickHdl( LINK( this, OCollectionView, NewFolder_Click ) );
-    m_aPB_OK.SetClickHdl( LINK( this, OCollectionView, Save_Click ) );
+    m_pView->SetDoubleClickHdl( LINK( this, OCollectionView, Dbl_Click_FileView ) );
+    m_pView->EnableAutoResize();
+    m_pView->EnableDelete(true);
+    m_pUp->SetClickHdl( LINK( this, OCollectionView, Up_Click ) );
+    m_pNewFolder->SetClickHdl( LINK( this, OCollectionView, NewFolder_Click ) );
+    m_pPB_OK->SetClickHdl( LINK( this, OCollectionView, Save_Click ) );
 }
 
 OCollectionView::~OCollectionView( )
@@ -105,12 +98,12 @@ OCollectionView::~OCollectionView( )
 
 IMPL_LINK_NOARG(OCollectionView, Save_Click)
 {
-    OUString sName = m_aName.GetText();
+    OUString sName = m_pName->GetText();
     if ( sName.isEmpty() )
         return 0;
     try
     {
-        OUString sSubFolder = m_aView.GetCurrentURL();
+        OUString sSubFolder = m_pView->GetCurrentURL();
         sal_Int32 nIndex = sName.lastIndexOf('/') + 1;
         if ( nIndex )
         {
@@ -127,7 +120,7 @@ IMPL_LINK_NOARG(OCollectionView, Save_Click)
                         xChild.set(m_xContent,UNO_QUERY);
                     }
                 }
-                m_aView.Initialize(m_xContent,OUString());
+                m_pView->Initialize(m_xContent,OUString());
                 initCurrentPath();
             }
             sSubFolder = sName.copy(0,nIndex-1);
@@ -180,7 +173,7 @@ IMPL_LINK_NOARG(OCollectionView, Save_Click)
                 if ( aBox.Execute() != RET_YES )
                     return 0;
             }
-            m_aName.SetText(sName);
+            m_pName->SetText(sName);
             EndDialog( sal_True );
         }
     }
@@ -197,7 +190,7 @@ IMPL_LINK_NOARG(OCollectionView, NewFolder_Click)
     {
         Reference<XHierarchicalNameContainer> xNameContainer(m_xContent,UNO_QUERY);
         if ( dbaui::insertHierachyElement(this,m_xContext,xNameContainer,OUString(),m_bCreateForm) )
-            m_aView.Initialize(m_xContent,OUString());
+            m_pView->Initialize(m_xContent,OUString());
     }
     catch( const SQLException& )
     {
@@ -221,11 +214,11 @@ IMPL_LINK_NOARG(OCollectionView, Up_Click)
             if ( xNameAccess.is() )
             {
                 m_xContent.set(xNameAccess,UNO_QUERY);
-                m_aView.Initialize(m_xContent,OUString());
+                m_pView->Initialize(m_xContent,OUString());
                 initCurrentPath();
             }
             else
-                m_aUp.Disable();
+                m_pUp->Disable();
         }
     }
     catch( const Exception& )
@@ -242,7 +235,7 @@ IMPL_LINK_NOARG(OCollectionView, Dbl_Click_FileView)
         Reference<XNameAccess> xNameAccess(m_xContent,UNO_QUERY);
         if ( xNameAccess.is() )
         {
-            OUString sSubFolder = m_aView.GetCurrentURL();
+            OUString sSubFolder = m_pView->GetCurrentURL();
             sal_Int32 nIndex = sSubFolder.lastIndexOf('/') + 1;
             sSubFolder = sSubFolder.getToken(0,'/',nIndex);
             if ( !sSubFolder.isEmpty() )
@@ -253,7 +246,7 @@ IMPL_LINK_NOARG(OCollectionView, Dbl_Click_FileView)
                 if ( xContent.is() )
                 {
                     m_xContent = xContent;
-                    m_aView.Initialize(m_xContent,OUString());
+                    m_pView->Initialize(m_xContent,OUString());
                     initCurrentPath();
                 }
             }
@@ -281,9 +274,9 @@ void OCollectionView::initCurrentPath()
             if ( m_bCreateForm && sCID.getLength() != s_sFormsCID.getLength())
                 sPath = sCID.copy(s_sFormsCID.getLength());
             else if ( !m_bCreateForm && sCID.getLength() != s_sReportsCID.getLength() )
-                sPath = sCID.copy(s_sReportsCID.getLength());
+                sPath = sCID.copy(s_sReportsCID.getLength() - 2);
 
-            m_aFTCurrentPath.SetText(sPath);
+            m_pFTCurrentPath->SetText(sPath);
             Reference<XChild> xChild(m_xContent,UNO_QUERY);
             bEnable = xChild.is() && Reference<XNameAccess>(xChild->getParent(),UNO_QUERY).is();
         }
@@ -292,12 +285,12 @@ void OCollectionView::initCurrentPath()
     {
         DBG_UNHANDLED_EXCEPTION();
     }
-    m_aUp.Enable(bEnable);
+    m_pUp->Enable(bEnable);
 }
 
 OUString OCollectionView::getName() const
 {
-    return m_aName.GetText();
+    return m_pName->GetText();
 }
 
 }   // namespace dbaui
diff --git a/dbaccess/source/ui/dlg/CollectionView.hrc b/dbaccess/source/ui/dlg/CollectionView.hrc
deleted file mode 100644
index 2fc2e91..0000000
--- a/dbaccess/source/ui/dlg/CollectionView.hrc
+++ /dev/null
@@ -1,43 +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 DBAUI_COLLECTIONVIEW_HRC
-#define DBAUI_COLLECTIONVIEW_HRC
-
-#define CTRL_VIEW           1
-
-#define PB_CANCEL           1
-#define PB_HELP             1
-
-#define ED_EXPLORERFILE_FILENAME    1
-
-#define FT_EXPLORERFILE_CURRENTPATH 1
-#define FT_EXPLORERFILE_FILENAME    2
-
-#define BTN_EXPLORERFILE_NEWFOLDER  1
-#define BTN_EXPLORERFILE_UP         2
-#define BTN_EXPLORERFILE_SAVE       3
-
-#define STR_PATHNAME                1
-
-#define FL_1                        1
-
-#endif //DBAUI_COLLECTIONVIEW_HRC
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/CollectionView.src b/dbaccess/source/ui/dlg/CollectionView.src
deleted file mode 100644
index 0385315..0000000
--- a/dbaccess/source/ui/dlg/CollectionView.src
+++ /dev/null
@@ -1,151 +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 "dbu_dlg.hrc"
-#include "dbaccess_helpid.hrc"
-#include "CollectionView.hrc"
-
-#define WIN_X   200
-#define WIN_Y   192
-
-#define CHECKBOX_HEIGHT     8
-#define FIXEDTEXT_HEIGHT    8
-#define RELATED_CONTROLS    4
-#define UNRELATED_CONTROLS  7
-#define EDIT_HEIGHT         12
-#define BUTTON_HEIGHT       14
-#define FIXEDLINE_HEIGHT    1
-#define IMG_SIZE            15
-
-ModalDialog DLG_COLLECTION_VIEW
-{
-    OutputSize = TRUE ;
-    SVLook = TRUE ;
-    Moveable = TRUE ;
-    Closeable = TRUE ;
-    HelpId = HID_EXPLORERDLG_COLLECTION ;
-
-    Size = MAP_APPFONT ( WIN_X , WIN_Y ) ;
-    Text [ en-US ] = "Save" ;
-
-    FixedText FT_EXPLORERFILE_CURRENTPATH
-    {
-        Pos = MAP_APPFONT ( UNRELATED_CONTROLS , UNRELATED_CONTROLS ) ;
-        Size = MAP_APPFONT ( 100 , FIXEDTEXT_HEIGHT ) ;
-        NoLabel = TRUE ;
-    };
-    ImageButton BTN_EXPLORERFILE_NEWFOLDER
-    {
-        HelpID = "dbaccess:ImageButton:DLG_COLLECTION_VIEW:BTN_EXPLORERFILE_NEWFOLDER";
-        TabStop = FALSE ;
-        Pos = MAP_APPFONT ( WIN_X - UNRELATED_CONTROLS -  RELATED_CONTROLS - 2*IMG_SIZE, UNRELATED_CONTROLS ) ;
-        Size = MAP_APPFONT ( IMG_SIZE , IMG_SIZE ) ;
-        QuickHelpText [ en-US ] = "Create New Directory" ;
-    };
-    ImageButton BTN_EXPLORERFILE_UP
-    {
-        HelpID = "dbaccess:ImageButton:DLG_COLLECTION_VIEW:BTN_EXPLORERFILE_UP";
-        TabStop = TRUE ;
-        Pos = MAP_APPFONT ( WIN_X - UNRELATED_CONTROLS - IMG_SIZE, UNRELATED_CONTROLS ) ;
-        Size = MAP_APPFONT ( IMG_SIZE , IMG_SIZE ) ;
-        QuickHelpText [ en-US ] = "Up One Level" ;
-    };
-
-    Control CTRL_VIEW
-    {
-        TabStop = TRUE ;
-        Pos = MAP_APPFONT ( UNRELATED_CONTROLS , 2*UNRELATED_CONTROLS + IMG_SIZE) ;
-        Size = MAP_APPFONT ( WIN_X - 2*UNRELATED_CONTROLS , WIN_Y - 6*UNRELATED_CONTROLS - BUTTON_HEIGHT - IMG_SIZE - EDIT_HEIGHT - FIXEDTEXT_HEIGHT) ;
-        Border = TRUE ;
-    };
-
-    FixedText FT_EXPLORERFILE_FILENAME
-    {
-        Pos = MAP_APPFONT ( UNRELATED_CONTROLS , WIN_Y - 3*UNRELATED_CONTROLS - BUTTON_HEIGHT - FIXEDLINE_HEIGHT - EDIT_HEIGHT ) ;
-        Size = MAP_APPFONT ( 50 , FIXEDTEXT_HEIGHT ) ;
-        Text [ en-US ] = "File ~name:" ;
-    };
-    Edit ED_EXPLORERFILE_FILENAME
-    {
-        HelpID = "dbaccess:Edit:DLG_COLLECTION_VIEW:ED_EXPLORERFILE_FILENAME";
-        Pos = MAP_APPFONT ( RELATED_CONTROLS + UNRELATED_CONTROLS + 50 , WIN_Y - 3*UNRELATED_CONTROLS - BUTTON_HEIGHT - FIXEDLINE_HEIGHT - EDIT_HEIGHT) ;
-        Size = MAP_APPFONT ( WIN_X - RELATED_CONTROLS - 2*UNRELATED_CONTROLS - 50 , EDIT_HEIGHT ) ;
-        Border = TRUE ;
-        TabStop = TRUE ;
-    };
-
-    FixedLine FL_1
-    {
-        Pos = MAP_APPFONT ( 0 , WIN_Y - 2*UNRELATED_CONTROLS - BUTTON_HEIGHT - FIXEDLINE_HEIGHT) ;
-        Size = MAP_APPFONT ( WIN_X , FIXEDLINE_HEIGHT ) ;
-    };
-
-    PushButton BTN_EXPLORERFILE_SAVE
-    {
-        HelpID = "dbaccess:PushButton:DLG_COLLECTION_VIEW:BTN_EXPLORERFILE_SAVE";
-        Pos = MAP_APPFONT ( WIN_X - 2*UNRELATED_CONTROLS - RELATED_CONTROLS - 150, WIN_Y - UNRELATED_CONTROLS - BUTTON_HEIGHT ) ;
-        Size = MAP_APPFONT ( 50 , BUTTON_HEIGHT ) ;
-        DefButton = TRUE ;
-        TabStop = TRUE ;
-        Text [ en-US ] = "Save" ;
-    };
-
-    CancelButton PB_CANCEL
-    {
-        TabStop = TRUE ;
-        Pos = MAP_APPFONT ( WIN_X - 2*UNRELATED_CONTROLS - 100, WIN_Y - UNRELATED_CONTROLS - BUTTON_HEIGHT ) ;
-        Size = MAP_APPFONT ( 50 , BUTTON_HEIGHT ) ;
-    };
-
-    HelpButton PB_HELP
-    {
-        TabStop = TRUE ;
-        Pos = MAP_APPFONT ( WIN_X - UNRELATED_CONTROLS - 50, WIN_Y - UNRELATED_CONTROLS - BUTTON_HEIGHT ) ;
-        Size = MAP_APPFONT ( 50 , BUTTON_HEIGHT ) ;
-    };
-
-    String STR_PATHNAME
-    {
-        Text [ en-US ] = "~Path:" ;
-    };
-};
-
-String STR_NEW_FOLDER
-{
-    Text [ en-US ] = "Folder" ;
-};
-
-Image IMG_NAVIGATION_BTN_UP_SC
-{
-    ImageBitmap = Bitmap { File = "fp010"; };
-    MaskColor = Color { Red = 0xFFFF; Green = 0x0; Blue = 0xFFFF; };
-};
-
-Image IMG_NAVIGATION_CREATEFOLDER_SC
-{
-    ImageBitmap = Bitmap { File = "fp015"; };
-    MaskColor = Color { Red = 0xFFFF; Green = 0x0; Blue = 0xFFFF; };
-};
-
-String STR_ALREADYEXISTOVERWRITE
-{
-    Text [ en-US ] = "The file already exists. Overwrite?" ;
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/dbadmin2.src b/dbaccess/source/ui/dlg/dbadmin2.src
index d90d6db..b3d3a78 100644
--- a/dbaccess/source/ui/dlg/dbadmin2.src
+++ b/dbaccess/source/ui/dlg/dbadmin2.src
@@ -39,4 +39,14 @@ String STR_COULD_NOT_CREATE_DIRECTORY
     Text [ en-US ] = "The directory $name$ could not be created.";
 };
 
+String STR_ALREADYEXISTOVERWRITE
+{
+    Text [ en-US ] = "The file already exists. Overwrite?" ;
+};
+
+String STR_NEW_FOLDER
+{
+    Text [ en-US ] = "Folder" ;
+};
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/imagelists/dbimagelists.src b/dbaccess/source/ui/imagelists/dbimagelists.src
index a08629d..11d3926 100644
--- a/dbaccess/source/ui/imagelists/dbimagelists.src
+++ b/dbaccess/source/ui/imagelists/dbimagelists.src
@@ -147,4 +147,18 @@ Image REPORTFOLDER_TREE_ICON
     MASKCOLOR;
 };
 
+// new folder and parent folder
+
+Image IMG_NAVIGATION_BTN_UP_SC
+{
+    ImageBitmap = Bitmap { File = "fp010"; };
+    MaskColor = Color { Red = 0xFFFF; Green = 0x0; Blue = 0xFFFF; };
+};
+
+Image IMG_NAVIGATION_CREATEFOLDER_SC
+{
+    ImageBitmap = Bitmap { File = "fp015"; };
+    MaskColor = Color { Red = 0xFFFF; Green = 0x0; Blue = 0xFFFF; };
+};
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/CollectionView.hxx b/dbaccess/source/ui/inc/CollectionView.hxx
index 26dca92..6c6fecb 100644
--- a/dbaccess/source/ui/inc/CollectionView.hxx
+++ b/dbaccess/source/ui/inc/CollectionView.hxx
@@ -34,17 +34,12 @@ namespace dbaui
     */
     class OCollectionView : public ModalDialog
     {
-        FixedText       m_aFTCurrentPath;
-        ImageButton     m_aNewFolder;
-        ImageButton     m_aUp;
-        SvtFileView     m_aView;
-        FixedText       m_aFTName;
-        Edit            m_aName;
-        FixedLine       m_aFL;
-        PushButton      m_aPB_OK;
-        CancelButton    m_aPB_CANCEL;
-        HelpButton      m_aPB_HELP;
-        OUString        m_sPath;
+        FixedText*      m_pFTCurrentPath;
+        PushButton*    m_pNewFolder;
+        PushButton*    m_pUp;
+        SvtFileView*    m_pView;
+        Edit*           m_pName;
+        PushButton*     m_pPB_OK;
         ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent>                  m_xContent;
         ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >        m_xContext;
         Size            m_aDlgSize;
diff --git a/dbaccess/uiconfig/ui/collectionviewdialog.ui b/dbaccess/uiconfig/ui/collectionviewdialog.ui
new file mode 100644
index 0000000..b34397e
--- /dev/null
+++ b/dbaccess/uiconfig/ui/collectionviewdialog.ui
@@ -0,0 +1,219 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
+<interface>
+  <requires lib="gtk+" version="3.0"/>
+  <!-- interface-requires LibreOffice 1.0 -->
+  <object class="GtkDialog" id="CollectionView">
+    <property name="can_focus">False</property>
+    <property name="hexpand">True</property>
+    <property name="vexpand">True</property>
+    <property name="border_width">6</property>
+    <property name="title" translatable="yes">Save</property>
+    <property name="type_hint">dialog</property>
+    <child internal-child="vbox">
+      <object class="GtkBox" id="dialog-vbox1">
+        <property name="can_focus">False</property>
+        <property name="hexpand">True</property>
+        <property name="vexpand">True</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">12</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="ok">
+                <property name="label" translatable="yes">_Save</property>
+                <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_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="cancel">
+                <property name="label">gtk-cancel</property>
+                <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_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="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_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox" id="box1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="hexpand">True</property>
+            <property name="vexpand">True</property>
+            <property name="orientation">vertical</property>
+            <property name="spacing">6</property>
+            <child>
+              <object class="GtkBox" id="box2">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="hexpand">True</property>
+                <child>
+                  <object class="GtkLabel" id="currentPathLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">start</property>
+                    <property name="valign">start</property>
+                    <property name="hexpand">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="newFolderButton">
+                    <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="tooltip_text" translatable="yes">Create New Directory</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="upButton">
+                    <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="tooltip_text" translatable="yes">Up One Level</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="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="svtlo-SvtFileView" id="viewTreeview">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="hexpand">True</property>
+                <property name="vexpand">True</property>
+                <child internal-child="selection">
+                  <object class="GtkTreeSelection" id="treeview-selection1"/>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkBox" id="box3">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="hexpand">True</property>
+                <property name="spacing">12</property>
+                <child>
+                  <object class="GtkLabel" id="fileNameLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">File _name:</property>
+                    <property name="use_underline">True</property>
+                    <property name="mnemonic_widget">fileNameEntry</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkEntry" id="fileNameEntry">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="hexpand">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="0">ok</action-widget>
+      <action-widget response="0">cancel</action-widget>
+      <action-widget response="0">help</action-widget>
+    </action-widgets>
+  </object>
+</interface>
diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in
index 570a8dd..9b0bee1 100644
--- a/extras/source/glade/libreoffice-catalog.xml.in
+++ b/extras/source/glade/libreoffice-catalog.xml.in
@@ -361,6 +361,9 @@
     <glade-widget-class title="Table Container" name="svtlo-SvSimpleTableContainer"
                         generic-name="Simple Table Container" parent="GtkTreeView"
                         icon-name="widget-gtk-treeview"/>
+    <glade-widget-class title="File View" name="svtlo-SvtFileView"
+                        generic-name="File View" parent="GtkTreeView"
+                        icon-name="widget-gtk-treeview"/>
     <glade-widget-class title="Check List Box" name="svxcorelo-SvxCheckListBox"
                         generic-name="Check List Box" parent="GtkTreeView"
                         icon-name="widget-gtk-treeview"/>
diff --git a/include/svtools/fileview.hxx b/include/svtools/fileview.hxx
index ecb1c6c..6e88c6a 100644
--- a/include/svtools/fileview.hxx
+++ b/include/svtools/fileview.hxx
@@ -81,9 +81,11 @@ protected:
 
 public:
     SvtFileView( Window* pParent, WinBits nBits, bool bOnlyFolder, bool bMultiSelection );
-    SvtFileView( Window* pParent, const ResId& rResId, sal_uInt8 nFlags );
+    SvtFileView( Window* pParent, WinBits nBits, sal_uInt8 nFlags );
     virtual ~SvtFileView();
 
+    virtual Size GetOptimalSize() const SAL_OVERRIDE;
+
     const OUString&         GetViewURL() const;
     OUString                GetURL( SvTreeListEntry* pEntry ) const;
     OUString                GetCurrentURL() const;
diff --git a/include/svtools/svtools.hrc b/include/svtools/svtools.hrc
index 64a4e74..2b94447 100644
--- a/include/svtools/svtools.hrc
+++ b/include/svtools/svtools.hrc
@@ -52,7 +52,7 @@
 
 // doc template dialog
 #define DLG_DOCTEMPLATE                 (RID_SVTOOLS_START+50)
-#define CTRL_FILEVIEW                   (RID_SVTOOLS_START+51)
+// FREE
 #define STR_SVT_NEWDOC                  (RID_SVTOOLS_START+52)
 #define STR_SVT_MYDOCS                  (RID_SVTOOLS_START+53)
 #define STR_SVT_TEMPLATES               (RID_SVTOOLS_START+54)
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index 8a4444d..81bf2db 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -1094,12 +1094,7 @@ bool ViewTabListBox_Impl::Kill( const OUString& rContent )
     return bRet;
 }
 
-
-
-
-
 // class SvtFileView -----------------------------------------------------
-
 SvtFileView::SvtFileView( Window* pParent, WinBits nBits,
                           bool bOnlyFolder, bool bMultiSelection ) :
 
@@ -1125,9 +1120,9 @@ SvtFileView::SvtFileView( Window* pParent, WinBits nBits,
     pHeaderBar->SetEndDragHdl( LINK( this, SvtFileView, HeaderEndDrag_Impl ) );
 }
 
-SvtFileView::SvtFileView( Window* pParent, const ResId& rResId, sal_uInt8 nFlags ) :
+SvtFileView::SvtFileView( Window* pParent, WinBits nStyle, sal_uInt8 nFlags ) :
 
-    Control( pParent, rResId )
+    Control( pParent, nStyle )
 {
     Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
     Reference< XInteractionHandler > xInteractionHandler(
@@ -1143,8 +1138,6 @@ SvtFileView::SvtFileView( Window* pParent, const ResId& rResId, sal_uInt8 nFlags
     pHeaderBar->SetEndDragHdl( LINK( this, SvtFileView, HeaderEndDrag_Impl ) );
 }
 
-
-
 SvtFileView::~SvtFileView()
 {
     // use temp pointer to prevent access of deleted member (GetFocus())
@@ -1153,6 +1146,26 @@ SvtFileView::~SvtFileView()
     delete pTemp;
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvtFileView(Window *pParent,
+VclBuilder::stringmap &rMap)
+{
+    WinBits nBits = WB_CLIPCHILDREN|WB_LEFT|WB_VCENTER|WB_3DLOOK;
+
+    bool bDropdown = VclBuilder::extractDropdown(rMap);
+
+    if (bDropdown)
+        nBits |= WB_DROPDOWN;
+
+    return new SvtFileView(pParent, nBits, true, true);
+}
+
+
+
+Size SvtFileView::GetOptimalSize() const
+{
+    return LogicToPixel(Size(208, 50), MAP_APPFONT);
+}
+
 
 
 OUString SvtFileView::GetURL( SvTreeListEntry* pEntry ) const
diff --git a/svtools/source/contnr/templwin.cxx b/svtools/source/contnr/templwin.cxx
index 6141fae..13c9c05 100644
--- a/svtools/source/contnr/templwin.cxx
+++ b/svtools/source/contnr/templwin.cxx
@@ -411,7 +411,7 @@ SvtFileViewWindow_Impl::SvtFileViewWindow_Impl( SvtTemplateWindow* pParent ) :
     Window( pParent, WB_DIALOGCONTROL | WB_TABSTOP | WB_BORDER | WB_3DLOOK ),
 
     rParent             ( *pParent ),
-    aFileView           ( this, SvtResId( CTRL_FILEVIEW ), FILEVIEW_SHOW_NONE | FILEVIEW_SHOW_ONLYTITLE ),
+    aFileView           ( this, WB_TABSTOP | WB_3DLOOK, FILEVIEW_SHOW_NONE | FILEVIEW_SHOW_ONLYTITLE ),
     bIsTemplateFolder   ( false )
 
 {
diff --git a/svtools/source/contnr/templwin.src b/svtools/source/contnr/templwin.src
index 5343cca..7043f18 100644
--- a/svtools/source/contnr/templwin.src
+++ b/svtools/source/contnr/templwin.src
@@ -25,11 +25,6 @@
 // Magenta and Grey as mask colors
 #define MASK_COL_MAGENTA    Color { Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; };
 
-Control CTRL_FILEVIEW
-{
-    Pos = MAP_APPFONT ( 0 , 0 ) ;
-};
-
 String STR_SVT_NEWDOC
 {
     Text [ en-US ] = "New Document";


More information about the Libreoffice-commits mailing list