[Libreoffice-commits] core.git: 3 commits - cui/source solenv/inc svtools/AllLangResTarget_svt.mk svtools/inc svtools/Library_svt.mk svtools/Package_inc.mk svtools/source uui/source

Andras Timar atimar at suse.com
Fri Mar 29 07:36:47 PDT 2013


 cui/source/dialogs/linkdlg.cxx      |   86 ++--
 solenv/inc/starview.hid             |  322 -----------------
 svtools/AllLangResTarget_svt.mk     |    1 
 svtools/Library_svt.mk              |    2 
 svtools/Package_inc.mk              |    2 
 svtools/inc/svtools/filedlg.hxx     |   57 ---
 svtools/source/dialogs/filedlg.cxx  |   61 ---
 svtools/source/dialogs/filedlg2.cxx |  653 ------------------------------------
 svtools/source/dialogs/filedlg2.hxx |  133 -------
 svtools/source/dialogs/filedlg2.src |   83 ----
 uui/source/logindlg.cxx             |   51 +-
 11 files changed, 71 insertions(+), 1380 deletions(-)

New commits:
commit f7f9b74163acd6811ccfaabb2a1d762225258e15
Author: Andras Timar <atimar at suse.com>
Date:   Fri Mar 29 07:29:34 2013 -0700

    replace PathDialog to xFolderPicker, remmove obsoleted PathDialog class
    
    and at the same time we got rid of tools/fsys.hxx dependency in svtools
    
    Change-Id: I5237529681a8b6ec32f41086af41ac575fbcff9b

diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx
index e5e06e4..db1dfaa 100644
--- a/cui/source/dialogs/linkdlg.cxx
+++ b/cui/source/dialogs/linkdlg.cxx
@@ -23,7 +23,6 @@
 
 #include <tools/urlobj.hxx>
 #include <svtools/svmedit.hxx>
-#include <svtools/filedlg.hxx>
 #include <vcl/dialog.hxx>
 #include <vcl/button.hxx>
 #include <vcl/fixed.hxx>
@@ -41,12 +40,17 @@
 #include <sfx2/lnkbase.hxx>
 #include <sfx2/objsh.hxx>
 
+#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
+#include <com/sun/star/ui/dialogs/FolderPicker.hpp>
+#include <comphelper/processfactory.hxx>
+
 #include <dialmgr.hxx>
 
 
 #define FILEOBJECT ( OBJECT_CLIENT_FILE & ~OBJECT_CLIENT_SO )
 
 using namespace sfx2;
+using namespace ::com::sun::star;
 
 class SvBaseLinkMemberList : private std::vector<SvBaseLink*> {
 public:
@@ -342,47 +346,55 @@ IMPL_LINK( SvBaseLinksDlg, ChangeSourceClickHdl, PushButton *, pPushButton )
     sal_uInt16 nSelectionCount = (sal_uInt16)Links().GetSelectionCount();
     if(nSelectionCount > 1)
     {
-        PathDialog aPathDlg( this );
-        String sType, sFile, sLinkName;
-        String  sFilter;
-        SvTreeListEntry* pEntry = Links().FirstSelected();
-        SvBaseLink* pLink = (SvBaseLink*)pEntry->GetUserData();
-        pLinkMgr->GetDisplayNames( pLink, &sType, &sFile, 0, 0 );
-        INetURLObject aUrl(sFile);
-        if(aUrl.GetProtocol() == INET_PROT_FILE)
-        {
-            rtl::OUString sOldPath(aUrl.PathToFileName());
-            sal_Int32 nLen = aUrl.GetName().getLength();
-            sOldPath = sOldPath.copy(0, sOldPath.getLength() - nLen);
-            aPathDlg.SetPath(sOldPath);
-        }
-        if(aPathDlg.Execute() == RET_OK)
+        try
         {
-            OUString aPath = aPathDlg.GetPath();
+            uno::Reference<ui::dialogs::XFolderPicker2> xFolderPicker = ui::dialogs::FolderPicker::create(comphelper::getProcessComponentContext());
 
-            for( sal_uInt16 i = 0; i < nSelectionCount; i++)
+            String sType, sFile, sLinkName;
+            String  sFilter;
+            SvTreeListEntry* pEntry = Links().FirstSelected();
+            SvBaseLink* pLink = (SvBaseLink*)pEntry->GetUserData();
+            pLinkMgr->GetDisplayNames( pLink, &sType, &sFile, 0, 0 );
+            INetURLObject aUrl(sFile);
+            if(aUrl.GetProtocol() == INET_PROT_FILE)
             {
-                pEntry = i==0 ?
+                OUString sOldPath(aUrl.PathToFileName());
+                sal_Int32 nLen = aUrl.GetName().getLength();
+                sOldPath = sOldPath.copy(0, sOldPath.getLength() - nLen);
+                xFolderPicker->setDisplayDirectory(sOldPath);
+            }
+            if (xFolderPicker->execute() == ui::dialogs::ExecutableDialogResults::OK)
+            {
+                OUString aPath = xFolderPicker->getDirectory();
+
+                for( sal_uInt16 i = 0; i < nSelectionCount; i++)
+                {
+                    pEntry = i==0 ?
                         Links().FirstSelected() :
-                            Links().NextSelected( pEntry );
-                DBG_ASSERT(pEntry,"Wo ist der Entry");
-                pLink = (SvBaseLink*)pEntry->GetUserData();
-                DBG_ASSERT(pLink,"Wo ist der Link");
-                pLinkMgr->GetDisplayNames( pLink, &sType, &sFile, &sLinkName, &sFilter );
-                INetURLObject aUrl_(sFile);
-                INetURLObject aUrl2(aPath, INET_PROT_FILE);
-                aUrl2.insertName( aUrl_.getName() );
-                String sNewLinkName;
-                MakeLnkName( sNewLinkName, 0 ,
-                        aUrl2.GetMainURL(INetURLObject::DECODE_TO_IURI), sLinkName, &sFilter);
-                pLink->SetLinkSourceName( sNewLinkName );
-                pLink->Update();
+                        Links().NextSelected( pEntry );
+                    DBG_ASSERT(pEntry,"Where is the entry?");
+                    pLink = (SvBaseLink*)pEntry->GetUserData();
+                    DBG_ASSERT(pLink,"Where is the link?");
+                    pLinkMgr->GetDisplayNames( pLink, &sType, &sFile, &sLinkName, &sFilter );
+                    INetURLObject aUrl_(sFile);
+                    INetURLObject aUrl2(aPath, INET_PROT_FILE);
+                    aUrl2.insertName( aUrl_.getName() );
+                    String sNewLinkName;
+                    MakeLnkName( sNewLinkName, 0 ,
+                            aUrl2.GetMainURL(INetURLObject::DECODE_TO_IURI), sLinkName, &sFilter);
+                    pLink->SetLinkSourceName( sNewLinkName );
+                    pLink->Update();
+                }
+                if( pLinkMgr->GetPersist() )
+                    pLinkMgr->GetPersist()->SetModified();
+                LinkManager* pNewMgr = pLinkMgr;
+                pLinkMgr = 0;
+                SetManager( pNewMgr );
             }
-            if( pLinkMgr->GetPersist() )
-                pLinkMgr->GetPersist()->SetModified();
-            LinkManager* pNewMgr = pLinkMgr;
-            pLinkMgr = 0;
-            SetManager( pNewMgr );
+        }
+        catch (uno::Exception & e)
+        {
+            SAL_WARN("cui.dialogs", "SvBaseLinksDlg: caught UNO exception: " << e.Message);
         }
     }
     else
diff --git a/svtools/AllLangResTarget_svt.mk b/svtools/AllLangResTarget_svt.mk
index 3ff3000..2355f8d 100644
--- a/svtools/AllLangResTarget_svt.mk
+++ b/svtools/AllLangResTarget_svt.mk
@@ -50,7 +50,6 @@ $(eval $(call gb_SrsTarget_add_files,svt/res,\
     svtools/source/control/ctrltool.src \
     svtools/source/control/filectrl.src \
     svtools/source/dialogs/addresstemplate.src \
-    svtools/source/dialogs/filedlg2.src \
     svtools/source/dialogs/formats.src \
     svtools/source/dialogs/so3res.src \
     svtools/source/dialogs/wizardmachine.src \
diff --git a/svtools/Library_svt.mk b/svtools/Library_svt.mk
index cc62192..fddc299 100644
--- a/svtools/Library_svt.mk
+++ b/svtools/Library_svt.mk
@@ -128,8 +128,6 @@ $(eval $(call gb_Library_add_exception_objects,svt,\
     svtools/source/control/valueset \
     svtools/source/dialogs/addresstemplate \
     svtools/source/dialogs/colrdlg \
-    svtools/source/dialogs/filedlg \
-    svtools/source/dialogs/filedlg2 \
     svtools/source/dialogs/insdlg \
     svtools/source/dialogs/mcvmath \
     svtools/source/dialogs/PlaceEditDialog \
diff --git a/svtools/Package_inc.mk b/svtools/Package_inc.mk
index b6eb684..105ca38 100644
--- a/svtools/Package_inc.mk
+++ b/svtools/Package_inc.mk
@@ -55,8 +55,6 @@ $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/embedtransfer.hxx,svto
 $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/extcolorcfg.hxx,svtools/extcolorcfg.hxx))
 $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/extensionlistbox.hxx,svtools/extensionlistbox.hxx))
 $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/filectrl.hxx,svtools/filectrl.hxx))
-$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/filedlg.hxx,svtools/filedlg.hxx))
-$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/filedlg2.hrc,svtools/filedlg2.hrc))
 $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/fileurlbox.hxx,svtools/fileurlbox.hxx))
 $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/fileview.hxx,svtools/fileview.hxx))
 $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/filechangedchecker.hxx,svtools/filechangedchecker.hxx))
diff --git a/svtools/inc/svtools/filedlg.hxx b/svtools/inc/svtools/filedlg.hxx
deleted file mode 100644
index 9beb0a3..0000000
--- a/svtools/inc/svtools/filedlg.hxx
+++ /dev/null
@@ -1,57 +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 SVT_FILEDLG_HXX
-#define SVT_FILEDLG_HXX
-
-#include "svtools/svtdllapi.h"
-
-#include <vcl/dialog.hxx>
-
-class Edit;
-class ImpSvFileDlg;
-
-// --------------
-// - SvPathDialog -
-// --------------
-
-class SVT_DLLPUBLIC PathDialog : public ModalDialog
-{
-private:
-    ImpSvFileDlg*       pImpFileDlg;    // Implementation
-    Link                aOKHdlLink;     // Link to OK-Handler
-
-public:
-                        PathDialog( Window* pParent, WinBits nWinStyle = 0, sal_Bool bCreateDir = sal_True );
-                        ~PathDialog();
-
-    virtual long        OK();
-
-    void                SetPath( const rtl::OUString& rNewPath );
-    rtl::OUString       GetPath() const;
-
-    void                SetOKHdl( const Link& rLink ) { aOKHdlLink = rLink; }
-    const Link&         GetOKHdl() const { return aOKHdlLink; }
-
-    virtual short       Execute();
-};
-
-#endif  // FILEDLG_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/dialogs/filedlg.cxx b/svtools/source/dialogs/filedlg.cxx
deleted file mode 100644
index 0bd9530..0000000
--- a/svtools/source/dialogs/filedlg.cxx
+++ /dev/null
@@ -1,61 +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 <svtools/filedlg.hxx>
-#include <filedlg2.hxx>
-
-PathDialog::PathDialog( Window* _pParent, WinBits nStyle, sal_Bool bCreateDir ) :
-    ModalDialog( _pParent, WB_STDMODAL | nStyle )
-{
-    pImpFileDlg = new ImpSvFileDlg;
-    pImpFileDlg->CreatePathDialog(this, bCreateDir);
-}
-
-PathDialog::~PathDialog()
-{
-    delete pImpFileDlg;
-}
-
-short PathDialog::Execute()
-{
-    pImpFileDlg->GetDialog()->PreExecute();
-    short n = ModalDialog::Execute();
-    return n;
-}
-
-rtl::OUString PathDialog::GetPath() const
-{
-    return pImpFileDlg->GetDialog()->GetPath();
-}
-
-void PathDialog::SetPath( const rtl::OUString& rPath )
-{
-    pImpFileDlg->GetDialog()->SetPath( rPath );
-}
-
-long PathDialog::OK()
-{
-    if( aOKHdlLink.IsSet() )
-        return aOKHdlLink.Call( this );
-    else
-        return sal_True;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/dialogs/filedlg2.cxx b/svtools/source/dialogs/filedlg2.cxx
deleted file mode 100644
index 44e5985..0000000
--- a/svtools/source/dialogs/filedlg2.cxx
+++ /dev/null
@@ -1,653 +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 <vcl/svapp.hxx>
-#include <vcl/button.hxx>
-#include <vcl/fixed.hxx>
-#include <vcl/edit.hxx>
-#include <vcl/lstbox.hxx>
-#include <svtools/svtresid.hxx>
-#include <filedlg2.hxx>
-#include <svtools/filedlg.hxx>
-#include <svtools/filedlg2.hrc>
-#include <vcl/msgbox.hxx>
-#include <osl/security.hxx>
-#include <comphelper/string.hxx>
-
-#include <svtools/stdctrl.hxx>
-
-#include <svtools/helpid.hrc>
-
-using namespace com::sun::star;
-using namespace com::sun::star::uno;
-
-typedef ::std::vector< OUString > OUStringList;
-
-#define INITCONTROL( p, ControlClass, nBits, aPos, aSize, aTitel, rHelpId ) \
-    p = new ControlClass( GetPathDialog(), WinBits( nBits ) ); \
-    p->SetHelpId( rHelpId ); \
-    p->SetPosSizePixel( aPos, aSize ); \
-    p->SetText( aTitel ); \
-    p->Show();
-
-
-inline sal_Bool IsPrintable( sal_Unicode c )
-{
-    return c >= 32 && c != 127 ? sal_True : sal_False;
-}
-
-long
-KbdListBox::PreNotify( NotifyEvent& rNEvt )
-{
-    if ( rNEvt.GetType() == EVENT_KEYINPUT )
-    {
-        KeyEvent aKeyEvt    = *rNEvt.GetKeyEvent();
-        sal_Unicode  cCharCode  = aKeyEvt.GetCharCode();
-
-        if ( IsPrintable ( cCharCode ) )
-        {
-            sal_uInt16 nCurrentPos = GetSelectEntryPos();
-            sal_uInt16 nEntries    = GetEntryCount();
-
-            for ( sal_uInt16 i = 1; i < nEntries; i++ )
-            {
-                OUString aEntry = GetEntry ( (i + nCurrentPos) % nEntries );
-                aEntry = comphelper::string::stripStart(aEntry, ' ').toAsciiUpperCase();
-                OUString aCompare = OUString(cCharCode).toAsciiUpperCase();
-
-                if ( aEntry.startsWith( aCompare ) )
-                {
-                    SelectEntryPos ( (i + nCurrentPos) % nEntries );
-                    break;
-                }
-            }
-        }
-        else if ( aKeyEvt.GetKeyCode().GetCode() == KEY_RETURN )
-        {
-            DoubleClick();
-        }
-    }
-
-    return ListBox::PreNotify ( rNEvt );
-}
-
-ImpPathDialog::ImpPathDialog( PathDialog* pDlg, RESOURCE_TYPE nType, sal_Bool bCreateDir )
-{
-    pSvPathDialog = pDlg;
-    nDirCount = 0;
-
-    // initialize Controls if not used as a base class
-    if ( nType == WINDOW_PATHDIALOG )
-    {
-        InitControls();
-        if( pNewDirBtn )
-            pNewDirBtn->Enable( bCreateDir );
-    }
-
-    pDlg->SetHelpId( HID_FILEDLG_PATHDLG );
-}
-
-ImpPathDialog::~ImpPathDialog()
-{
-    delete pEdit;
-    delete pDirTitel;
-    delete pDirList;
-    delete pDirPath;
-    delete pDriveList;
-    delete pDriveTitle;
-    delete pLoadBtn;
-    delete pOkBtn;
-    delete pCancelBtn;
-    delete pNewDirBtn;
-#   if defined(UNX)
-    delete pHomeBtn;
-#   endif
-}
-
-void ImpPathDialog::InitControls()
-{
-    PathDialog* pDlg = GetPathDialog();
-    pDlg->SetText( SVT_RESSTR(STR_FILEDLG_SELECT) );
-
-    Size a3Siz = pDlg->LogicToPixel( Size( 3, 3 ), MAP_APPFONT );
-    Size a6Siz = pDlg->LogicToPixel( Size( 6, 6 ), MAP_APPFONT );
-    Size aBtnSiz = pDlg->LogicToPixel( Size( 50, 14 ), MAP_APPFONT );
-    Size aFTSiz = pDlg->LogicToPixel( Size( 142, 10 ), MAP_APPFONT );
-    Size aEDSiz = pDlg->LogicToPixel( Size( 142, 12 ), MAP_APPFONT );
-    Point aPnt( a6Siz.Width(), a6Siz.Height() );
-    long nLbH1 = pDlg->LogicToPixel( Size( 0, 93 ), MAP_APPFONT ).Height();
-    long nH = 0;
-    OUString aEmptyStr;
-
-    INITCONTROL( pDirTitel, FixedText, 0,
-                 aPnt, aFTSiz, SVT_RESSTR( STR_FILEDLG_DIR ), HID_FILEDLG_DIR );
-    aPnt.Y() += aFTSiz.Height() + a3Siz.Height();
-
-    INITCONTROL( pEdit, Edit, WB_BORDER, aPnt, aEDSiz, aPath.GetFull(), HID_FILEDLG_EDIT );
-
-    aPnt.Y() += aEDSiz.Height() + a3Siz.Height();
-#ifndef UNX
-    long nLbH2 = pDlg->LogicToPixel( Size( 0, 60 ), MAP_APPFONT ).Height();
-    INITCONTROL( pDirList, KbdListBox, WB_AUTOHSCROLL | WB_BORDER,
-        aPnt, Size( aEDSiz.Width(), nLbH1 ), aEmptyStr, HID_FILEDLG_DIRS );
-    aPnt.Y() += nLbH1 + a6Siz.Height();
-    INITCONTROL( pDriveTitle, FixedText, 0,
-                 aPnt, aFTSiz, SVT_RESSTR( STR_FILEDLG_DRIVES ), HID_FILEDLG_DRIVE );
-    aPnt.Y() += aFTSiz.Height() + a3Siz.Height();
-    INITCONTROL( pDriveList, ListBox, WB_DROPDOWN,
-                 aPnt, Size( aEDSiz.Width(), nLbH2 ), aEmptyStr, HID_FILEDLG_DRIVES );
-    nH = aPnt.Y() + aEDSiz.Height() + a6Siz.Height();
-#else
-    long nNewH = nLbH1 + 3 * a3Siz.Height() +
-                 aFTSiz.Height() + aEDSiz.Height();
-    INITCONTROL( pDirList, KbdListBox, WB_AUTOHSCROLL | WB_BORDER,
-                 aPnt, Size( aEDSiz.Width(), nNewH ), aEmptyStr, HID_FILEDLG_DIRS );
-    nH = aPnt.Y() + nNewH + a6Siz.Height();
-    pDriveTitle = NULL;
-    pDriveList = NULL;
-#endif
-
-    long nExtraWidth = pDlg->GetTextWidth( String( RTL_CONSTASCII_USTRINGPARAM( "(W)" ) ) )+10;
-    String aOkStr = Button::GetStandardText( BUTTON_OK );
-    long nTextWidth = pDlg->GetTextWidth( aOkStr )+nExtraWidth;
-    if( nTextWidth > aBtnSiz.Width() )
-        aBtnSiz.Width() = nTextWidth;
-
-    String aCancelStr = Button::GetStandardText( BUTTON_CANCEL );
-    nTextWidth = pDlg->GetTextWidth( aCancelStr )+nExtraWidth;
-    if( nTextWidth > aBtnSiz.Width() )
-        aBtnSiz.Width() = nTextWidth;
-
-    String aNewDirStr( SVT_RESSTR( STR_FILEDLG_NEWDIR ) );
-    nTextWidth = pDlg->GetTextWidth( aNewDirStr )+nExtraWidth;
-    if( nTextWidth > aBtnSiz.Width() )
-        aBtnSiz.Width() = nTextWidth;
-#if defined(UNX)
-    String aHomeDirStr( SVT_RESSTR( STR_FILEDLG_HOME ) );
-    nTextWidth = pDlg->GetTextWidth( aHomeDirStr )+nExtraWidth;
-    if( nTextWidth > aBtnSiz.Width() )
-        aBtnSiz.Width() = nTextWidth;
-#endif
-
-    aPnt.X() = 2 * a6Siz.Width() + aEDSiz.Width();
-    aPnt.Y() = a6Siz.Height();
-    INITCONTROL( pOkBtn, PushButton, WB_DEFBUTTON,
-                 aPnt, aBtnSiz, aOkStr, "" );
-    aPnt.Y() += aBtnSiz.Height() + a3Siz.Height();
-    INITCONTROL( pCancelBtn, CancelButton, 0,
-                 aPnt, aBtnSiz, aCancelStr, "" );
-    aPnt.Y() += aBtnSiz.Height() + a3Siz.Height();
-    INITCONTROL( pNewDirBtn, PushButton, WB_DEFBUTTON,
-                 aPnt, aBtnSiz, aNewDirStr, HID_FILEDLG_NEWDIR );
-#if defined(UNX)
-    aPnt.Y() += aBtnSiz.Height() + a3Siz.Height();
-    INITCONTROL( pHomeBtn, PushButton, WB_DEFBUTTON,
-                 aPnt, aBtnSiz, aHomeDirStr, HID_FILEDLG_HOME );
-#else
-    pHomeBtn = NULL;
-#endif
-
-    pDirPath = 0;
-    pLoadBtn = 0;
-    // Dialogbreite == OKBtn-Position + OKBtn-Breite + Rand
-    long nW = aPnt.X() + aBtnSiz.Width() + a6Siz.Width();
-
-    pDlg->SetOutputSizePixel( Size( nW, nH ) );  // Groesse ggf. auch Resource wird geplaettet?
-
-    if (pDirList)
-        pDirList->SetDoubleClickHdl(LINK( this, ImpPathDialog, DblClickHdl) );
-
-    if (pDirList)
-        pDirList->SetSelectHdl( LINK( this, ImpPathDialog, SelectHdl ) );
-
-    if (pDriveList)
-        pDriveList->SetSelectHdl( LINK( this, ImpPathDialog, SelectHdl ) );
-
-    if (pOkBtn)
-        pOkBtn->SetClickHdl( LINK( this, ImpPathDialog, ClickHdl) );
-
-    if (pCancelBtn)
-        pCancelBtn->SetClickHdl( LINK( this, ImpPathDialog, ClickHdl) );
-
-    if (pHomeBtn)
-        pHomeBtn->SetClickHdl( LINK( this, ImpPathDialog, ClickHdl) );
-
-    if (pNewDirBtn)
-        pNewDirBtn->SetClickHdl( LINK( this, ImpPathDialog, ClickHdl) );
-
-    nOwnChildren = pDlg->GetChildCount();
-}
-
-
-
-IMPL_LINK( ImpPathDialog, SelectHdl, ListBox *, p )
-{
-    if( p == pDriveList )
-    {
-        OUString aDrive = OUString( pDriveList->GetSelectEntry().Copy(0, 2) ) + "\\";
-        SetPath( aDrive );
-    }
-    else if( p == pDirList )
-    {
-        // isolate the pure name of the entry
-        // removing trainling stuff and leading spaces
-        OUString aEntry( pDirList->GetSelectEntry() );
-        aEntry = comphelper::string::stripStart(aEntry, ' ');
-
-        sal_Int32 nPos = aEntry.indexOf( '/' );
-        if (nPos >= 0)
-            aEntry = aEntry.replaceAt( nPos, aEntry.getLength()-nPos, "" );
-
-        // build the absolute path to the selected item
-        DirEntry aNewPath;
-        aNewPath.ToAbs();
-
-        sal_uInt16 nCurPos = pDirList->GetSelectEntryPos();
-
-        // Wird nach oben gewechselt
-        if( nCurPos < nDirCount )
-            aNewPath = aNewPath[nDirCount-nCurPos-1];
-        else
-            aNewPath += String(aEntry);
-
-        pEdit->SetText( aNewPath.GetFull() );
-    }
-
-    return 0;
-}
-
-
-IMPL_LINK( ImpPathDialog, ClickHdl, Button*, pBtn )
-{
-    if ( pBtn == pOkBtn || pBtn == pLoadBtn )
-    {
-        DirEntry aFile( pEdit->GetText() );
-
-        // Existiert File / File ueberschreiben
-        if( IsFileOk( aFile ) )
-        {
-            // Ja, dann kompletten Pfad mit Filenamen merken und Dialog beenden
-            aPath = aFile;
-            aPath.ToAbs();
-            GetPathDialog()->EndDialog( sal_True );
-        }
-        else
-        {
-            DirEntry aCheck( aPath );
-            aCheck += aFile;
-            if( aCheck.Exists() )
-            {
-                aCheck.ToAbs();
-                SetPath( aCheck.GetFull() );
-                pEdit->SetSelection( Selection( 0x7FFFFFFF, 0x7FFFFFFF ) );
-            }
-        }
-    }
-    else if ( pBtn == pCancelBtn )
-    {
-        GetPathDialog()->EndDialog( sal_False );
-    }
-    else if ( pBtn == pHomeBtn )
-    {
-        ::rtl::OUString aHomeDir;
-        osl::Security aSecurity;
-        if ( aSecurity.getHomeDir( aHomeDir ) )
-        {
-            DirEntry aFile ( aHomeDir );
-            if ( IsFileOk( aFile ) )
-            {
-                aFile.ToAbs();
-                SetPath( aFile.GetFull() );
-            }
-        }
-    }
-    else if ( pBtn == pNewDirBtn )
-    {
-        DirEntry aFile( pEdit->GetText() );
-        if( ! aFile.Exists() && ! FileStat( aFile ).IsKind( FSYS_KIND_WILD ) )
-            aFile.MakeDir();
-
-        if( IsFileOk ( aFile ) )
-        {
-            aFile.ToAbs();
-            SetPath( aFile.GetFull() );
-        }
-    }
-
-    return 0;
-}
-
-
-IMPL_LINK( ImpPathDialog, DblClickHdl, ListBox*, pBox )
-{
-    // isolate the pure name of the entry
-    // removing trainling stuff and leading spaces
-    OUString aEntry( pBox->GetSelectEntry() );
-
-    aEntry = comphelper::string::stripStart(aEntry, ' ');
-    sal_Int32 nPos = aEntry.indexOf( '/' );
-    if (nPos >= 0)
-        aEntry = aEntry.replaceAt( nPos, aEntry.getLength()-nPos, "" );
-
-    // build the absolute path to the selected item
-    DirEntry aNewPath;
-    aNewPath.ToAbs();
-    if( pBox == pDirList )
-    {
-        sal_uInt16 nCurPos = pDirList->GetSelectEntryPos();
-
-        // Wenn es schon das aktuelle ist, dann mache nichts
-        if( nCurPos == nDirCount-1 )
-            return 0;
-
-        // Wird nach oben gewechselt
-        if( nCurPos < nDirCount )
-            aNewPath = aNewPath[nDirCount-nCurPos-1];
-        else
-            aNewPath += String(aEntry);
-    }
-    else
-        aNewPath += String(aEntry);
-
-    pSvPathDialog->EnterWait();
-
-    if( FileStat( aNewPath ).GetKind() & FSYS_KIND_DIR )
-    {
-        // Neuen Pfad setzen und Listboxen updaten
-        aPath = aNewPath;
-        if( !aPath.SetCWD( sal_True ) )
-        {
-            ErrorBox aBox( GetPathDialog(),
-                           WB_OK_CANCEL | WB_DEF_OK,
-                           SVT_RESSTR( STR_FILEDLG_CANTCHDIR ) );
-            if( aBox.Execute() == RET_CANCEL )
-                GetPathDialog()->EndDialog( sal_False );
-        }
-        UpdateEntries( sal_True );
-    }
-
-    pSvPathDialog->LeaveWait();
-    return 0;
-}
-
-void ImpPathDialog::UpdateEntries( const sal_Bool )
-{
-    OUString aTabString;
-    DirEntry aTmpPath;
-    aTmpPath.ToAbs();
-
-    nDirCount = aTmpPath.Level();
-
-    pDirList->SetUpdateMode( sal_False );
-    pDirList->Clear();
-
-    for( sal_uInt16 i = nDirCount; i > 0; i-- )
-    {
-        OUString aName = aTabString + aTmpPath[i-1].GetName();
-        pDirList->InsertEntry( aName );
-        aTabString += "  ";
-    }
-
-    // scan the directory
-    DirEntry aCurrent;
-    aCurrent.ToAbs();
-
-    Dir aDir( aCurrent, FSYS_KIND_DIR|FSYS_KIND_FILE );
-
-    sal_uInt16 nEntries = aDir.Count();
-    if( nEntries )
-    {
-        OUStringList aSortDirList;
-        const comphelper::string::NaturalStringSorter& rSorter =
-            ::vcl::unohelper::getNaturalStringSorterForAppLocale();
-        for ( sal_uInt16 n = 0; n < nEntries; n++ )
-        {
-            DirEntry& rEntry = aDir[n];
-            OUString aName( rEntry.GetName() );
-            if( aName.getLength() && ( aName[0] != '.' ) && rEntry.Exists() )
-            {
-                if( FileStat( rEntry ).GetKind() & FSYS_KIND_DIR )
-                {
-                    size_t l = 0;
-                    for( l = 0; l < aSortDirList.size(); l++ )
-                        if( rSorter.compare( aSortDirList[l], aName ) > 0 )
-                            break;
-                    if ( l < aSortDirList.size() ) {
-                        OUStringList::iterator it = aSortDirList.begin();
-                        ::std::advance( it, l );
-                        aSortDirList.insert( it, aName );
-                    } else {
-                        aSortDirList.push_back( aName );
-                    }
-                }
-            }
-        }
-
-        for( size_t l = 0; l < aSortDirList.size(); l++ )
-        {
-            OUString aEntryStr = aTabString + aSortDirList[l];
-            pDirList->InsertEntry( aEntryStr );
-        }
-    }
-
-    UpdateDirs( aTmpPath );
-}
-
-void ImpPathDialog::UpdateDirs( const DirEntry& rTmpPath )
-{
-    pDirList->SelectEntryPos( nDirCount-1 );
-    pDirList->SetTopEntry( nDirCount > 1
-                           ? nDirCount - 2
-                           : nDirCount - 1 );
-    pDirList->SetUpdateMode( sal_True );
-    pDirList->Invalidate();
-    pDirList->Update();
-
-    OUString aDirName = rTmpPath.GetFull();
-    if( pDirPath )
-        pDirPath->SetText( aDirName );
-    else
-        pEdit->SetText( aDirName );
-}
-
-sal_Bool ImpPathDialog::IsFileOk( const DirEntry& rDirEntry )
-{
-    if( FileStat( rDirEntry ).GetKind() & (FSYS_KIND_WILD | FSYS_KIND_DEV) )
-        return sal_False;
-    else
-    {
-        // Datei vorhanden ?
-        if( ! rDirEntry.Exists() )
-        {
-            OUString aQueryTxt( SVT_RESSTR( STR_FILEDLG_ASKNEWDIR ) );
-            aQueryTxt = aQueryTxt.replaceFirst( "%s", rDirEntry.GetFull() );
-            QueryBox aQuery( GetPathDialog(),
-                             WB_YES_NO | WB_DEF_YES,
-                             aQueryTxt  );
-            if( aQuery.Execute() == RET_YES )
-                rDirEntry.MakeDir();
-            else
-                return sal_False;
-        }
-        if( !FileStat( rDirEntry ).IsKind( FSYS_KIND_DIR ) )
-        {
-            OUString aBoxText = SVT_RESSTR( STR_FILEDLG_CANTOPENDIR ) + "\n[" + rDirEntry.GetFull() + "]" ;
-            InfoBox aBox( GetPathDialog(), aBoxText );
-            aBox.Execute();
-            return sal_False;
-        }
-    }
-    return GetPathDialog()->OK() != 0;
-}
-
-
-void ImpPathDialog::PreExecute()
-{
-    // Neues Verzeichnis setzen und Listboxen updaten
-    aPath.SetCWD( sal_True );
-    UpdateEntries( sal_True );
-
-    // Zusaetzliche Buttons anordnen
-    Point   aPos;
-    Size    aSize;
-    long    nDY;
-    if( pLoadBtn )
-    {
-        aPos  = pLoadBtn->GetPosPixel();
-        aSize = pLoadBtn->GetSizePixel();
-        nDY   = pLoadBtn->GetSizePixel().Height() * 2;
-    }
-    else
-    {
-        aPos  = pCancelBtn->GetPosPixel();
-        aSize = pCancelBtn->GetSizePixel();
-        nDY   = pCancelBtn->GetPosPixel().Y() - pOkBtn->GetPosPixel().Y();
-    }
-
-    // Standard-Controls anpassen
-    long nMaxWidth = 0;
-
-    // Maximale Breite ermitteln
-    sal_uInt16 nChildren = GetPathDialog()->GetChildCount();
-    sal_uInt16 n;
-    for ( n = nOwnChildren; n < nChildren; n++ )
-    {
-        Window* pChild = GetPathDialog()->GetChild( n );
-        pChild = pChild->GetWindow( WINDOW_CLIENT );
-        if( pChild->GetType() != WINDOW_WINDOW )
-        {
-            long nWidth = pChild->GetTextWidth( pChild->GetText() ) + 12;
-            if( nMaxWidth < nWidth )
-                nMaxWidth = nWidth;
-            nWidth = pChild->GetSizePixel().Width();
-            if( nMaxWidth < nWidth )
-                nMaxWidth = nWidth;
-        }
-    }
-
-    if( nMaxWidth > aSize.Width() )
-    {
-        Size aDlgSize = GetPathDialog()->GetOutputSizePixel();
-        GetPathDialog()->SetOutputSizePixel( Size( aDlgSize.Width()+nMaxWidth-aSize.Width(), aDlgSize.Height() ) );
-        aSize.setWidth(nMaxWidth);
-
-        if( pOkBtn )
-            pOkBtn->SetSizePixel( aSize );
-        if( pCancelBtn )
-            pCancelBtn->SetSizePixel( aSize );
-        if( pLoadBtn )
-            pLoadBtn->SetSizePixel( aSize );
-    }
-
-    for ( n = nOwnChildren; n < nChildren; n++ )
-    {
-        Window* pChild = GetPathDialog()->GetChild( n );
-        pChild = pChild->GetWindow( WINDOW_CLIENT );
-        if( pChild->GetType() != WINDOW_WINDOW )
-        {
-            aPos.Y() += nDY;
-            pChild->SetPosSizePixel( aPos, aSize );
-        }
-        else
-        {
-            Size aDlgSize = GetPathDialog()->GetOutputSizePixel();
-            long nExtra = Min( aDlgSize.Height(), (long)160);
-            GetPathDialog()->SetOutputSizePixel( Size( aDlgSize.Width()+nExtra, aDlgSize.Height() ) );
-            Size aSz( nExtra, nExtra );
-            aSz.Width() -= 8;
-            aSz.Height() -= 8;
-            Point aCtrlPos( aDlgSize.Width() + 2, (aDlgSize.Height()-aSz.Height())/2 );
-            pChild->SetPosSizePixel( aCtrlPos, aSz );
-        }
-    }
-
-    // Laufwerke-LB fuellen
-    if( pDriveList )
-    {
-        DirEntry aTmpDirEntry;
-        Dir aDir( aTmpDirEntry, FSYS_KIND_BLOCK );
-
-        sal_uInt16 nCount = aDir.Count(), i;
-        for( i = 0; i < nCount; ++i )
-        {
-            DirEntry& rEntry = aDir[i];
-            OUString aStr    = rEntry.GetFull( FSYS_STYLE_HOST, sal_False );
-
-            OUString aVolume = rEntry.GetVolume() ;
-            aStr = aStr.toAsciiUpperCase();
-            if ( aVolume.getLength() )
-            {
-                aStr = aStr + " " + aVolume;
-            }
-            pDriveList->InsertEntry( String(aStr) );
-
-        }
-        OUString aPathStr = aPath.GetFull();
-        aPathStr = aPathStr.toAsciiUpperCase();
-
-        for ( i = 0; i < pDriveList->GetEntryCount(); ++i )
-        {
-            OUString aEntry = pDriveList->GetEntry(i);
-            aEntry = aEntry.toAsciiUpperCase();
-            sal_Int32 nLen = aEntry.getLength();
-            nLen = nLen > 2 ? 2 : nLen;
-            if ( aEntry.compareTo( aPathStr, nLen ) == 0 )
-            {
-                pDriveList->SelectEntryPos(i);
-                break;
-            }
-        }
-    }
-}
-
-void ImpPathDialog::SetPath( OUString const & rPath )
-{
-    aPath = DirEntry( rPath );
-
-    pSvPathDialog->EnterWait();
-
-    DirEntry aFile( rPath );
-    // Falls der Pfad eine Wildcard oder einen Filenamen enthaelt
-    // -> abschneiden und merken
-    if( FileStat( aFile ).GetKind() & (FSYS_KIND_FILE | FSYS_KIND_WILD) || !aFile.Exists() )
-        aFile.CutName();
-
-    // Neue Maske und neues Verzeichnis setzen, und Listboxen updaten
-    pEdit->SetText( rPath );
-    aFile.SetCWD( sal_True );
-    UpdateEntries( sal_True );
-
-    pSvPathDialog->LeaveWait();
-}
-
-OUString ImpPathDialog::GetPath() const
-{
-    DirEntry aFile( pEdit->GetText() );
-    aFile.ToAbs();
-    return aFile.GetFull();
-}
-
-void ImpSvFileDlg::CreatePathDialog( PathDialog* pSvDlg, bool bCreate )
-{
-    delete pDlg;
-    pDlg = new ImpPathDialog( pSvDlg, WINDOW_PATHDIALOG, bCreate );
-}
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/dialogs/filedlg2.hxx b/svtools/source/dialogs/filedlg2.hxx
deleted file mode 100644
index 07cea59..0000000
--- a/svtools/source/dialogs/filedlg2.hxx
+++ /dev/null
@@ -1,133 +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 FILEDLG2_HXX
-#define FILEDLG2_HXX
-
-#include <tools/fsys.hxx>
-#include <vcl/button.hxx>
-#include <vcl/unohelp.hxx>
-#include <vector>
-
-class FixedText;
-class Edit;
-class ListBox;
-class ListBox;
-class Button;
-
-class PathDialog;
-class ImpPathDialog;
-
-struct ImpFilterItem
-{
-    String aName;
-    String aMask;
-
-    ImpFilterItem( const String & rFilter, const String & rMask )
-    {
-        aName = rFilter;
-        aMask = rMask;
-    }
-};
-
-typedef ::std::vector< ImpFilterItem* > ImpFilterList;
-#include <vcl/lstbox.hxx>
-
-class KbdListBox : public ListBox
-{
-public:
-
-                KbdListBox( Window* pParent, WinBits nStyle = WB_BORDER )
-                    : ListBox ( pParent, nStyle )
-                {};
-
-virtual long    PreNotify( NotifyEvent& rNEvt );
-
-};
-
-
-class ImpPathDialog
-{
-private:
-    PathDialog*         pSvPathDialog;
-    Edit*               pEdit;
-    FixedText*          pDirTitel;
-    KbdListBox*         pDirList;
-    FixedText*          pDirPath;
-    ListBox*            pDriveList;
-    FixedText*          pDriveTitle;
-    PushButton*         pLoadBtn;
-    PushButton*         pOkBtn;
-    PushButton*         pCancelBtn;
-    PushButton*         pHomeBtn;
-    PushButton*         pNewDirBtn;
-
-    sal_uInt16              nOwnChildren;
-
-    DirEntry            aPath;          // aktuell angewaehlter Pfad
-    sal_uInt16              nDirCount;      // Anzahl der Verzeichnis-
-                                        // Verschachtelungen
-protected:
-
-    virtual void        UpdateEntries( const sal_Bool bWithDirs );
-    void                UpdateDirs( const DirEntry& rTmpPath );
-
-    sal_Bool                IsFileOk( const DirEntry& rDirEntry );
-    void                InitControls();
-
-    DECL_LINK(          SelectHdl, ListBox * );
-    DECL_LINK(          DblClickHdl, ListBox * );
-    DECL_LINK(          ClickHdl, Button * );
-
-public:
-                        ImpPathDialog( PathDialog* pDlg, RESOURCE_TYPE nType, sal_Bool bCreateDir );
-    virtual             ~ImpPathDialog();
-
-    virtual void        SetPath( const OUString& rPath );
-    virtual OUString    GetPath() const;
-
-    virtual void        PreExecute();
-
-    PathDialog*     GetPathDialog() const   { return pSvPathDialog; }
-
-    void            SetOkButtonText( const String& rText ) { pOkBtn->SetText( rText ); }
-    void            SetCancelButtonText( const String& rText ) { pCancelBtn->SetText( rText ); }
-
-};
-
-class ImpSvFileDlg
-{
-private:
-    ImpPathDialog*  pDlg;
-
-public:
-                    ImpSvFileDlg()      { pDlg = 0; }
-                    ~ImpSvFileDlg()     { delete pDlg; }
-
-    ImpPathDialog*  GetDialog() const   { return pDlg; }
-    void            CreatePathDialog(PathDialog* pCreateFrom, bool bCreate);
-
-    void            SetOkButtonText( const String& rText ) { pDlg->SetOkButtonText( rText ); }  // ihr habts ja nicht anders gewollt
-    void            SetCancelButtonText( const String& rText ) { pDlg->SetCancelButtonText( rText ); }
-
-};
-
-#endif // FILEDLG2_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/dialogs/filedlg2.src b/svtools/source/dialogs/filedlg2.src
deleted file mode 100644
index 6b67e48..0000000
--- a/svtools/source/dialogs/filedlg2.src
+++ /dev/null
@@ -1,83 +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 <svtools/filedlg2.hrc>
-
-String STR_FILEDLG_SELECT
-{
-    Text [ en-US ] = "Select Directory" ;
-};
-String STR_FILEDLG_CANTCHDIR
-{
-    Text [ en-US ] = "Cannot change to directory" ;
-};
-String STR_FILEDLG_OPEN
-{
-    Text [ en-US ] = "Open" ;
-};
-String STR_FILEDLG_FILE
-{
-    Text [ en-US ] = "~File" ;
-};
-String STR_FILEDLG_DIR
-{
-    Text [ en-US ] = "~Directory" ;
-};
-String STR_FILEDLG_TYPE
-{
-    Text [ en-US ] = "File ~type" ;
-};
-String STR_FILEDLG_CANTOPENFILE
-{
-    Text [ en-US ] = "Can't open file" ;
-};
-String STR_FILEDLG_CANTOPENDIR
-{
-    Text [ en-US ] = "Can't open directory" ;
-};
-String STR_FILEDLG_OVERWRITE
-{
-    Text [ en-US ] = "This file already exists. \nOverwrite ?" ;
-};
-String STR_FILEDLG_GOUP
-{
-    Text [ en-US ] = "Up One Level" ;
-};
-String STR_FILEDLG_SAVE
-{
-    Text [ en-US ] = "Save" ;
-};
-String STR_FILEDLG_DRIVES
-{
-    Text [ en-US ] = "D~rive" ;
-};
-String STR_FILEDLG_HOME
-{
-    Text [ en-US ] = "User Directory" ;
-};
-String STR_FILEDLG_NEWDIR
-{
-    Text [ en-US ] = "Create Directory" ;
-};
-String STR_FILEDLG_ASKNEWDIR
-{
-    Text [ en-US ] = "Do you want the directory %s to be created ?" ;
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/uui/source/logindlg.cxx b/uui/source/logindlg.cxx
index f4e6fa9..aa25574 100644
--- a/uui/source/logindlg.cxx
+++ b/uui/source/logindlg.cxx
@@ -18,23 +18,24 @@
  */
 
 #include <comphelper/string.hxx>
-#include <svtools/filedlg.hxx>
 #include <vcl/msgbox.hxx>
 #include "logindlg.hxx"
 
 #include "logindlg.hrc"
 #include "ids.hrc"
 #include <tools/resid.hxx>
+#include <osl/file.hxx>
 
 #ifdef UNX
 #include <limits.h>
 #define _MAX_PATH PATH_MAX
 #endif
 
-// LoginDialog -------------------------------------------------------
+#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
+#include <com/sun/star/ui/dialogs/FolderPicker.hpp>
+#include <comphelper/processfactory.hxx>
 
-//............................................................................
-//............................................................................
+using namespace com::sun::star;
 
 static void lcl_Move( Window &rWin, long nOffset )
 {
@@ -184,7 +185,6 @@ void LoginDialog::HideControls_Impl( sal_uInt16 nFlags )
     }
 };
 
-// -----------------------------------------------------------------------
 void LoginDialog::EnableUseSysCredsControls_Impl( sal_Bool bUseSysCredsEnabled )
 {
     aErrorInfo.Enable( !bUseSysCredsEnabled );
@@ -201,8 +201,6 @@ void LoginDialog::EnableUseSysCredsControls_Impl( sal_Bool bUseSysCredsEnabled )
     aAccountED.Enable( !bUseSysCredsEnabled );
 }
 
-// -----------------------------------------------------------------------
-
 IMPL_LINK_NOARG(LoginDialog, OKHdl_Impl)
 {
     // trim the strings
@@ -212,30 +210,36 @@ IMPL_LINK_NOARG(LoginDialog, OKHdl_Impl)
     return 1;
 }
 
-// -----------------------------------------------------------------------
-
 IMPL_LINK_NOARG(LoginDialog, PathHdl_Impl)
 {
-    PathDialog* pDlg = new PathDialog( this, WB_3DLOOK );
-    pDlg->SetPath( aPathED.GetText() );
+    try
+    {
+        uno::Reference<ui::dialogs::XFolderPicker2> xFolderPicker = ui::dialogs::FolderPicker::create(comphelper::getProcessComponentContext());
+
+        OUString aPath( aPathED.GetText() );
+        osl::FileBase::getFileURLFromSystemPath( aPath, aPath );
+        xFolderPicker->setDisplayDirectory( aPath );
 
-    if ( pDlg->Execute() == RET_OK )
-        aPathED.SetText( pDlg->GetPath() );
+        if (xFolderPicker->execute() == ui::dialogs::ExecutableDialogResults::OK)
+        {
+            osl::FileBase::getSystemPathFromFileURL( xFolderPicker->getDirectory(), aPath );
+            aPathED.SetText( aPath );
+        }
+    }
+    catch (uno::Exception & e)
+    {
+        SAL_WARN("uui", "LoginDialog::PathHdl_Impl: caught UNO exception: " << e.Message);
+    }
 
-    delete pDlg;
     return 1;
 }
 
-// -----------------------------------------------------------------------
-
 IMPL_LINK_NOARG(LoginDialog, UseSysCredsHdl_Impl)
 {
     EnableUseSysCredsControls_Impl( aUseSysCredsCB.IsChecked() );
     return 1;
 }
 
-// -----------------------------------------------------------------------
-
 LoginDialog::LoginDialog
 (
     Window* pParent,
@@ -296,14 +300,10 @@ LoginDialog::LoginDialog
     HideControls_Impl( nFlags );
 };
 
-// -----------------------------------------------------------------------
-
 LoginDialog::~LoginDialog()
 {
 }
 
-// -----------------------------------------------------------------------
-
 void LoginDialog::SetUseSystemCredentials( sal_Bool bUse )
 {
     if ( aUseSysCredsCB.IsVisible() )
@@ -313,8 +313,6 @@ void LoginDialog::SetUseSystemCredentials( sal_Bool bUse )
     }
 }
 
-// -----------------------------------------------------------------------
-
 void LoginDialog::ClearPassword()
 {
     aPasswordED.SetText( String() );
@@ -325,15 +323,10 @@ void LoginDialog::ClearPassword()
         aPasswordED.GrabFocus();
 };
 
-// -----------------------------------------------------------------------
-
 void LoginDialog::ClearAccount()
 {
     aAccountED.SetText( String() );
     aAccountED.GrabFocus();
 };
 
-//............................................................................
-//............................................................................
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 37303d227d9b48ef6030388b1e70a8c8b8359367
Author: Andras Timar <atimar at suse.com>
Date:   Fri Mar 29 05:51:19 2013 -0700

    remove unused starview.hid
    
    Change-Id: I6b308c514eb214571aabb65cef2a10803c9f5b51

diff --git a/solenv/inc/starview.hid b/solenv/inc/starview.hid
deleted file mode 100644
index 651a830..0000000
--- a/solenv/inc/starview.hid
+++ /dev/null
@@ -1,322 +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 <stdio.h>
-
-#define leer 0
-
-#define application 1
-#define Application 1
-#define APPLICATION 1
-#define resource 2
-#define Resource 2
-#define RESOURCE 2
-#define string 3
-#define String 3
-#define STRING 3
-#define icon 4
-#define Icon 4
-#define ICON 4
-#define bitmap 5
-#define Bitmap 5
-#define BITMAP 5
-#define pointer 6
-#define Pointer 6
-#define POINTER 6
-#define brush 7
-#define Brush 7
-#define BRUSH 7
-#define color 8
-#define Color 8
-#define COLOR 8
-#define font 9
-#define Font 9
-#define FONT 9
-#define pen 10
-#define Pen 10
-#define PEN 10
-#define mapmode 11
-#define MapMode 11
-#define MAPMODE 11
-#define accel 12
-#define Accel 12
-#define ACCEL 12
-#define accelitem 13
-#define AccelItem 13
-#define ACCELITEM 13
-#define menu 14
-#define Menu 14
-#define MENU 14
-#define menuitem 15
-#define MenuItem 15
-#define MENUITEM 15
-#define outputdevice 16
-#define OutputDevice 16
-#define OUTPUTDEVICE 16
-#define keycode 17
-#define KeyCode 17
-#define KEYCODE 17
-#define time 18
-#define Time 18
-#define TIME 18
-#define date 19
-#define Date 19
-#define DATE 19
-#define international 20
-#define International 20
-#define INTERNATIONAL 20
-#define image 21
-#define Image 21
-#define IMAGE 21
-#define imagelist 22
-#define ImageList 22
-#define IMAGELIST 22
-#define messbox 23
-#define MessBox 23
-#define MESSBOX 23
-#define infobox 24
-#define InfoBox 24
-#define INFOBOX 24
-#define warningbox 25
-#define WarningBox 25
-#define WARNINGBOX 25
-#define errorbox 26
-#define ErrorBox 26
-#define ERRORBOX 26
-#define querybox 27
-#define QueryBox 27
-#define QUERYBOX 27
-#define window 28
-#define Window 28
-#define WINDOW 28
-#define syswindow 29
-#define SysWindow 29
-#define SYSWINDOW 29
-#define workwin 30
-#define WorkWin 30
-#define WORKWIN 30
-#define mdiwindow 31
-#define MdiWindow 31
-#define MDIWINDOW 31
-#define floatingwindow 32
-#define FloatingWindow 32
-#define FLOATINGWINDOW 32
-#define dialog 33
-#define Dialog 33
-#define DIALOG 33
-#define modelessdialog 34
-#define ModelessDialog 34
-#define MODELESSDIALOG 34
-#define modaldialog 35
-#define ModalDialog 35
-#define MODALDIALOG 35
-#define systemdialog 36
-#define SystemDialog 36
-#define SYSTEMDIALOG 36
-#define pathdialog 37
-#define PathDialog 37
-#define PATHDIALOG 37
-#define filedialog 38
-#define FileDialog 38
-#define FILEDIALOG 38
-#define printersetupdialog 39
-#define PrinterSetupDialog 39
-#define PRINTERSETUPDIALOG 39
-#define printdialog 40
-#define PrintDialog 40
-#define PRINTDIALOG 40
-#define colordialog 41
-#define ColorDialog 41
-#define COLORDIALOG 41
-#define fontdialog 42
-#define FontDialog 42
-#define FONTDIALOG 42
-#define control 43
-#define Control 43
-#define CONTROL 43
-#define button 44
-#define Button 44
-#define BUTTON 44
-#define pushbutton 45
-#define PushButton 45
-#define PUSHBUTTON 45
-#define okbutton 46
-#define OkButton 46
-#define OKButton 46
-#define OKBUTTON 46
-#define cancelbutton 47
-#define CancelButton 47
-#define CANCELBUTTON 47
-#define helpbutton 48
-#define HelpButton 48
-#define HELPBUTTON 48
-#define imagebutton 49
-#define ImageButton 49
-#define IMAGEBUTTON 49
-#define menubutton 50
-#define MenuButton 50
-#define MENUBUTTON 50
-#define morebutton 51
-#define MoreButton 51
-#define MOREBUTTON 51
-#define spinbutton 52
-#define SpinButton 52
-#define SPINBUTTON 52
-#define radiobutton 53
-#define RadioButton 53
-#define RADIOBUTTON 53
-#define checkbox 54
-#define CheckBox 54
-#define CHECKBOX 54
-#define tristatebox 55
-#define TriStateBox 55
-#define TRISTATEBOX 55
-#define edit 56
-#define Edit 56
-#define EDIT 56
-#define multilineedit 57
-#define MultiLineEdit 57
-#define MULTILINEEDIT 57
-#define combobox 58
-#define ComboBox 58
-#define COMBOBOX 58
-#define listbox 59
-#define ListBox 59
-#define LISTBOX 59
-#define multilistbox 60
-#define MultiListBox 60
-#define MULTILISTBOX 60
-#define text 61
-#define Text 61
-#define TEXT 61
-#define fixedline 62
-#define FixedLine 62
-#define FIXEDLINE 62
-#define fixedbitmap 63
-#define FixedBitmap 63
-#define FIXEDBITMAP 63
-#define fixedimage 64
-#define FixedImage 64
-#define FIXEDIMAGE 64
-#define fixedicon 65
-#define FixedIcon 65
-#define FIXEDICON 65
-#define groupBox 66
-#define GroupBox 66
-#define GROUPBOX 66
-#define scrollbar 67
-#define ScrollBar 67
-#define SCROLLBAR 67
-#define scrollbarbox 68
-#define ScrollBarBox 68
-#define SCROLLBARBOX 68
-#define splitter 69
-#define Splitter 69
-#define SPLITTER 69
-#define splitwindow 70
-#define SplitWindow 70
-#define SPLITWINDOW 70
-#define spinfield 71
-#define SpinField 71
-#define SPINFIELD 71
-#define patternfield 72
-#define PatternField 72
-#define PATTERNFIELD 72
-#define numericfield 73
-#define NumericField 73
-#define NUMERICFIELD 73
-#define metricfield 74
-#define MetricField 74
-#define METRICFIELD 74
-#define currencyfield 75
-#define CurrencyField 75
-#define CURRENCYFIELD 75
-#define datefield 76
-#define DateField 76
-#define DATEFIELD 76
-#define timefield 77
-#define TimeField 77
-#define TIMEFIELD 77
-#define patternbox 78
-#define PatternBox 78
-#define PATTERNBOX 78
-#define numericbox 79
-#define NumericBox 79
-#define NUMERICBOX 79
-#define metricbox 80
-#define MetricBox 80
-#define METRICBOX 80
-#define currencybox 81
-#define CurrencyBox 81
-#define CURRENCYBOX 81
-#define datebox 82
-#define DateBox 82
-#define DATEBOX 82
-#define timebox 83
-#define TimeBox 83
-#define TIMEBOX 83
-#define toolboxitem 84
-#define ToolBoxItem 84
-#define TOOLBOXITEM 84
-#define toolbox 85
-#define ToolBox 85
-#define TOOLBOX 85
-#define dockingwindow 86
-#define DockingWindow 86
-#define DOCKINGWINDOW 86
-#define statusbar 87
-#define StatusBar 87
-#define STATUSBAR 87
-#define tabpage 88
-#define TabPage 88
-#define TABPAGE 88
-#define tabcontrol 89
-#define TabControl 89
-#define TABCONTROL 89
-#define tabdialog 90
-#define TabDialog 90
-#define TABDIALOG 90
-#define tabcontrolitem 91
-#define TabControlItem 91
-#define TABCONTROLITEM 91
-#define treelistbox 92
-#define TreeListBox 92
-#define TREELISTBOX 92
-#define stringarray 93
-#define StringArray 93
-#define STRINGARRAY 93
-/* MH and OG */
-#define fixedtext	94
-#define FixedText	94
-#define FIXEDTEXT 94
-#define pageitem	95
-#define PageItem	95
-#define PAGEITEM 95
-#define accelerator	96
-#define Accelerator	96
-#define ACCELERATOR 96
-#define acceleratoritem	97
-#define AcceleratorItem	97
-#define ACCELERATORITEM 97
-
-#define SfxStyleFamilies 98
-#define SfxStyleFamilyItem 99
-#define SfxSlotInfo 100
-
-#define define 127
-
commit ed23cd5974d7d1e6adf1aa6ee6cf583fbf7a1ceb
Author: Andras Timar <atimar at suse.com>
Date:   Fri Mar 29 03:18:12 2013 -0700

    String to OUString
    
    Change-Id: I3292e489d0033f56c407af799e9c90d497e98744

diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx
index 592bbfc..e5e06e4 100644
--- a/cui/source/dialogs/linkdlg.cxx
+++ b/cui/source/dialogs/linkdlg.cxx
@@ -358,7 +358,7 @@ IMPL_LINK( SvBaseLinksDlg, ChangeSourceClickHdl, PushButton *, pPushButton )
         }
         if(aPathDlg.Execute() == RET_OK)
         {
-            String aPath = aPathDlg.GetPath();
+            OUString aPath = aPathDlg.GetPath();
 
             for( sal_uInt16 i = 0; i < nSelectionCount; i++)
             {


More information about the Libreoffice-commits mailing list