[Libreoffice-commits] core.git: Branch 'feature/gsoc15-open-remote-files-dialog' - 478 commits - accessibility/inc accessibility/source animations/source avmedia/source basctl/source basic/source bin/find-duplicated-sids.py bin/find-unused-defines.awk bin/find-unused-defines.sh bin/find-unused-typedefs.py bin/find-unused-typedefs.sh bin/gbuild-to-ide canvas/source chart2/inc chart2/Library_chartcontroller.mk chart2/source chart2/uiconfig comphelper/source compilerplugins/clang config_host/config_version.h.in configmgr/source configure.ac connectivity/source cppcanvas/source cppuhelper/source cppuhelper/test cppu/qa cppu/source cui/source dbaccess/inc dbaccess/source desktop/source download.lst drawinglayer/source dtrans/source dtrans/test editeng/qa editeng/source embeddedobj/source embeddedobj/test embedserv/source eventattacher/source extensions/source extensions/test external/boost external/clucene external/firebird external/libetonyek external/libmwaw external/libodfgen external/librevenge ex ternal/libvisio external/libwpd external/libwpg external/libwps external/neon extras/source filter/source forms/source formula/source fpicker/source fpicker/uiconfig framework/inc framework/source .gitignore helpcompiler/inc helpcontent2 hwpfilter/source i18nlangtag/source i18npool/inc i18npool/source idlc/inc idlc/source idl/inc idl/source include/basic include/canvas include/com include/comphelper include/connectivity include/cppcanvas include/dbaccess include/editeng include/filter include/formula include/i18nlangtag include/i18nutil include/LibreOfficeKit include/o3tl include/oox include/osl include/registry include/rtl include/sal include/sfx2 include/sot include/svl include/svtools include/svx include/systools include/toolkit include/tools include/tubes include/ucbhelper include/unotest include/unotools include/vcl include/xmloff include/xmlscript instsetoo_native/CustomTarget_setup.mk instsetoo_native/inc_common io/source io/test jurt/com l10ntools/inc l10ntools/source libreo fficekit/qa libreofficekit/source lingucomponent/source lotuswordpro/source offapi/com offapi/UnoApi_offapi.mk officecfg/registry onlineupdate/source oox/inc oox/source package/inc package/source postprocess/CustomTarget_registry.mk postprocess/Rdb_services.mk pyuno/Library_pyuno.mk pyuno/source qadevOOo/tests readlicense_oo/license reportbuilder/java reportdesign/source RepositoryExternal.mk rsc/inc rsc/source salhelper/source sal/osl sal/qa sax/qa sax/test scaddins/source sc/CppunitTest_sc_core.mk sc/inc sc/Module_sc.mk scp2/inc sc/qa scripting/source sc/source sc/uiconfig sdext/inc sdext/source sd/inc sd/qa sd/source sd/uiconfig sfx2/inc sfx2/Library_sfx.mk sfx2/source shell/inc shell/qa shell/source slideshow/inc slideshow/source slideshow/test smoketest/smoketest.cxx solenv/bin solenv/gbuild solenv/gdb sot/source starmath/inc starmath/source stoc/source stoc/test store/source svl/qa svl/source svtools/inc svtools/source svtools/uiconfig svx/inc svx/Library_svx.mk svx/source svx /uiconfig sw/CppunitTest_sw_odfexport.mk sw/CppunitTest_sw_uiwriter.mk sw/inc sw/qa sw/source sw/uiconfig toolkit/source tools/source ucbhelper/source ucb/source udkapi/com UnoControls/source unotest/source unoxml/source uui/source vbahelper/source vcl/generic vcl/inc vcl/opengl vcl/osx vcl/source vcl/unx vcl/win vcl/workben wizards/com wizards/source writerfilter/inc writerfilter/source xmlhelp/source xmloff/inc xmloff/source xmlscript/source xmlsecurity/source

Szymon Kłos eszkadev at gmail.com
Sat Aug 8 02:40:43 PDT 2015


Rebased ref, commits from common ancestor:
commit 797e619962889d3e8bec1673a6a5c50bc2d3ceb4
Author: Szymon Kłos <eszkadev at gmail.com>
Date:   Fri Aug 7 18:32:32 2015 +0200

    added New Folder button
    
    Change-Id: I4b1ef03e707fdfb3d1968dca9f48c548f872612c

diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx
index 80abcac..20ce343 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -183,6 +183,7 @@ RemoteFilesDialog::RemoteFilesDialog( vcl::Window* pParent, WinBits nBits )
     get( m_pServices_lb, "services_lb" );
     get( m_pFilter_lb, "filter_lb" );
     get( m_pName_ed, "name_ed" );
+    get( m_pNewFolder, "new_folder" );
 
     m_eMode = ( nBits & WB_SAVEAS ) ? REMOTEDLG_MODE_SAVE : REMOTEDLG_MODE_OPEN;
     m_eType = ( nBits & WB_PATH ) ? REMOTEDLG_TYPE_PATHDLG : REMOTEDLG_TYPE_FILEDLG;
@@ -196,10 +197,20 @@ RemoteFilesDialog::RemoteFilesDialog( vcl::Window* pParent, WinBits nBits )
     m_pName_ed->Enable( false );
 
     if( m_eMode == REMOTEDLG_MODE_OPEN )
+    {
         get( m_pOk_btn, "open" );
+
+        m_pNewFolder->Hide();
+    }
     else
+    {
         get( m_pOk_btn, "save" );
 
+        m_aImages = ImageList( fpicker::SvtResId( RID_FILEPICKER_IMAGES ) );
+        m_pNewFolder->SetModeImage( m_aImages.GetImage( IMG_FILEDLG_CREATEFOLDER ) );
+        m_pNewFolder->SetClickHdl( LINK( this, RemoteFilesDialog, NewFolderHdl ) );
+    }
+
     m_pOk_btn->Show();
     m_pOk_btn->Enable( false );
 
@@ -324,6 +335,7 @@ void RemoteFilesDialog::dispose()
     m_pServices_lb.clear();
     m_pFilter_lb.clear();
     m_pName_ed.clear();
+    m_pNewFolder.clear();
 
     ModalDialog::dispose();
 }
@@ -872,6 +884,34 @@ IMPL_LINK ( RemoteFilesDialog, SelectBreadcrumbHdl, Breadcrumb*, pPtr )
     return 1;
 }
 
+IMPL_LINK_NOARG ( RemoteFilesDialog, NewFolderHdl )
+{
+    m_pFileView->EndInplaceEditing( false );
+
+    SmartContent aContent( m_pFileView->GetViewURL() );
+    OUString aTitle;
+    aContent.getTitle( aTitle );
+    ScopedVclPtrInstance< QueryFolderNameDialog > aDlg( this, aTitle, fpicker::SVT_RESSTR( STR_SVT_NEW_FOLDER ) );
+    bool bHandled = false;
+
+    while( !bHandled )
+    {
+        if( aDlg->Execute() == RET_OK )
+        {
+            OUString aUrl = aContent.createFolder( aDlg->GetName() );
+            if( !aUrl.isEmpty() )
+            {
+                m_pFileView->CreatedFolder( aUrl, aDlg->GetName() );
+                bHandled = true;
+            }
+        }
+        else
+            bHandled = true;
+    }
+
+    return 1;
+}
+
 IMPL_LINK_NOARG ( RemoteFilesDialog, OkHdl )
 {
     // auto extension
diff --git a/fpicker/source/office/RemoteFilesDialog.hxx b/fpicker/source/office/RemoteFilesDialog.hxx
index 0d61f41..a63bef3 100644
--- a/fpicker/source/office/RemoteFilesDialog.hxx
+++ b/fpicker/source/office/RemoteFilesDialog.hxx
@@ -37,6 +37,9 @@
 
 #include "fpdialogbase.hxx"
 #include "fpsofficeResMgr.hxx"
+#include "OfficeFilePicker.hrc"
+#include "QueryFolderName.hxx"
+#include "iodlg.hrc"
 
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::uno;
@@ -141,6 +144,7 @@ private:
     VclPtr< MenuButton > m_pAddService_btn;
     VclPtr< ListBox > m_pServices_lb;
     VclPtr< Breadcrumb > m_pPath;
+    VclPtr<PushButton> m_pNewFolder;
     VclPtr< Splitter > m_pSplitter;
     VclPtr< FolderTree > m_pTreeView;
     VclPtr< SvtFileView > m_pFileView;
@@ -149,6 +153,8 @@ private:
     VclPtr< Edit > m_pName_ed;
     PopupMenu* m_pAddMenu;
 
+    ImageList m_aImages;
+
     std::vector< ServicePtr > m_aServices;
     std::vector< std::pair< OUString, OUString > > m_aFilters;
 
@@ -184,6 +190,8 @@ private:
 
     DECL_LINK( SelectBreadcrumbHdl, Breadcrumb * );
 
+    DECL_LINK( NewFolderHdl, void * );
+
     DECL_LINK( OkHdl, void * );
     DECL_LINK( CancelHdl, void * );
 };
diff --git a/fpicker/uiconfig/ui/remotefilesdialog.ui b/fpicker/uiconfig/ui/remotefilesdialog.ui
index 8bf57a3..7c0c923 100644
--- a/fpicker/uiconfig/ui/remotefilesdialog.ui
+++ b/fpicker/uiconfig/ui/remotefilesdialog.ui
@@ -138,12 +138,44 @@
           </packing>
         </child>
         <child>
-          <object class="GtkBox" id="breadcrumb_container">
+          <object class="GtkBox" id="box2">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
-            <property name="hexpand">True</property>
+            <property name="spacing">6</property>
             <child>
-              <placeholder/>
+              <object class="GtkBox" id="breadcrumb_container">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="valign">center</property>
+                <property name="hexpand">True</property>
+                <child>
+                  <placeholder/>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="new_folder">
+                <property name="use_action_appearance">False</property>
+                <property name="width_request">25</property>
+                <property name="height_request">25</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="has_tooltip">True</property>
+                <property name="tooltip_markup" translatable="yes">Create New Folder</property>
+                <property name="tooltip_text" translatable="yes">Create New Folder</property>
+                <property name="margin_left">6</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
             </child>
           </object>
           <packing>
commit 5babe6dee790003b64c259765582d46c14638d69
Author: Szymon Kłos <eszkadev at gmail.com>
Date:   Fri Aug 7 14:54:39 2015 +0200

    avoid name conflict: SvtResId
    
    Change-Id: I5fbde751c9d6b0d9be7d6dd50abfb99bb14a3512

diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx
index 11278f2..80abcac 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -206,7 +206,7 @@ RemoteFilesDialog::RemoteFilesDialog( vcl::Window* pParent, WinBits nBits )
     m_pOk_btn->SetClickHdl( LINK( this, RemoteFilesDialog, OkHdl ) );
     m_pCancel_btn->SetClickHdl( LINK( this, RemoteFilesDialog, CancelHdl ) );
 
-    m_sRootLabel = ResId( STR_SVT_ROOTLABEL, *ResMgrHolder::getOrCreate() );
+    m_sRootLabel = fpicker::SvtResId( STR_SVT_ROOTLABEL );
     m_pPath = VclPtr<Breadcrumb>::Create( get< vcl::Window >( "breadcrumb_container" ) );
     m_pPath->set_hexpand( true );
     m_pPath->SetClickHdl( LINK( this, RemoteFilesDialog, SelectBreadcrumbHdl ) );
@@ -710,7 +710,7 @@ IMPL_LINK_TYPED ( RemoteFilesDialog, EditServiceMenuHdl, MenuButton *, pButton,
 
         if( nPos >= 0 )
         {
-            OUString sMsg = ResId( STR_SVT_DELETESERVICE, *ResMgrHolder::getOrCreate() );
+            OUString sMsg = fpicker::SvtResId( STR_SVT_DELETESERVICE );
             sMsg = sMsg.replaceFirst( "$servicename$", m_pServices_lb->GetSelectEntry() );
             ScopedVclPtrInstance< MessageDialog > aBox( this, sMsg, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO );
 
@@ -921,7 +921,7 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, OkHdl )
     {
         if( m_eMode == REMOTEDLG_MODE_SAVE )
         {
-            OUString sMsg = ResId( STR_SVT_ALREADYEXISTOVERWRITE, *ResMgrHolder::getOrCreate() );
+            OUString sMsg = fpicker::SvtResId( STR_SVT_ALREADYEXISTOVERWRITE );
             sMsg = sMsg.replaceFirst( "$filename$", sName );
             ScopedVclPtrInstance< MessageDialog > aBox( this, sMsg, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO );
             if( aBox->Execute() != RET_YES )
diff --git a/fpicker/source/office/fpsofficeResMgr.hxx b/fpicker/source/office/fpsofficeResMgr.hxx
index 76b4538..359fc88 100644
--- a/fpicker/source/office/fpsofficeResMgr.hxx
+++ b/fpicker/source/office/fpsofficeResMgr.hxx
@@ -13,7 +13,7 @@
 #include <osl/getglobalmutex.hxx>
 #include <tools/resmgr.hxx>
 
-namespace
+namespace fpicker
 {
     struct ResMgrHolder
     {
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 6b5eaa7..6d1e1a1 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -100,6 +100,7 @@ using namespace ::com::sun::star::ucb;
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::task;
 using namespace ::com::sun::star::sdbc;
+using namespace ::fpicker;
 using namespace ::utl;
 using namespace ::svt;
 
commit 9001f2a38f5bb12f65dc3ab7b0561bb5a6291121
Author: Szymon Kłos <eszkadev at gmail.com>
Date:   Thu Aug 6 11:11:00 2015 +0200

    Rework of the 'Add service' dialog
    
    Change-Id: Ie53352367a92468fb7b1bfbe106230327e4a6599

diff --git a/include/svtools/ServerDetailsControls.hxx b/include/svtools/ServerDetailsControls.hxx
index 16b8e23..20e69f6 100644
--- a/include/svtools/ServerDetailsControls.hxx
+++ b/include/svtools/ServerDetailsControls.hxx
@@ -24,14 +24,20 @@
 
 class DetailsContainer
 {
-    private:
-        Link<>             m_aChangeHdl;
-        VclPtr<VclGrid>    m_pFrame;
-        VclPtr<VclGrid>    m_pCommon;
-        bool               m_bIsActive;
+    protected:
+        Link<>                 m_aChangeHdl;
+        VclPtr<VclGrid>        m_pDetailsGrid;
+        VclPtr<VclHBox>        m_pHostBox;
+        VclPtr<Edit>           m_pEDHost;
+        VclPtr<FixedText>      m_pFTHost;
+        VclPtr<NumericField>   m_pEDPort;
+        VclPtr<FixedText>      m_pFTPort;
+        VclPtr<Edit>           m_pEDRoot;
+        VclPtr<FixedText>      m_pFTRoot;
+        bool                   m_bIsActive;
 
     public:
-        DetailsContainer( VclBuilderContainer* pBuilder, const OString& rFrame );
+        DetailsContainer( VclBuilderContainer* pBuilder );
         virtual ~DetailsContainer( );
 
         void setChangeHdl( const Link<>& rLink ) { m_aChangeHdl = rLink; }
@@ -60,11 +66,7 @@ class HostDetailsContainer : public DetailsContainer
     private:
         sal_uInt16 m_nDefaultPort;
         OUString m_sScheme;
-
-    protected:
-        VclPtr<Edit>           m_pEDHost;
-        VclPtr<NumericField>   m_pEDPort;
-        VclPtr<Edit>           m_pEDPath;
+        OUString m_sHost;
 
     public:
         HostDetailsContainer( VclBuilderContainer* pBuilder, sal_uInt16 nPort, const OUString& sScheme );
@@ -104,9 +106,8 @@ class DavDetailsContainer : public HostDetailsContainer
 class SmbDetailsContainer : public DetailsContainer
 {
     private:
-        VclPtr<Edit>           m_pEDHost;
         VclPtr<Edit>           m_pEDShare;
-        VclPtr<Edit>           m_pEDPath;
+        VclPtr<FixedText>      m_pFTShare;
 
     public:
         SmbDetailsContainer( VclBuilderContainer* pBuilder );
@@ -114,6 +115,7 @@ class SmbDetailsContainer : public DetailsContainer
 
         virtual INetURLObject getUrl( ) SAL_OVERRIDE;
         virtual bool setUrl( const INetURLObject& rUrl ) SAL_OVERRIDE;
+        virtual void show( bool bShow = true ) SAL_OVERRIDE;
 };
 
 class CmisDetailsContainer : public DetailsContainer
@@ -125,10 +127,10 @@ class CmisDetailsContainer : public DetailsContainer
         OUString m_sRepoId;
         OUString m_sBinding;
 
-        VclPtr<Edit>       m_pEDBinding;
+        VclPtr<VclHBox>    m_pRepositoryBox;
+        VclPtr<FixedText>  m_pFTRepository;
         VclPtr<ListBox>    m_pLBRepository;
         VclPtr<Button>     m_pBTRepoRefresh;
-        VclPtr<Edit>       m_pEDRoot;
 
     public:
         CmisDetailsContainer( VclBuilderContainer* pBuilder, OUString const & sBinding );
diff --git a/svtools/source/dialogs/ServerDetailsControls.cxx b/svtools/source/dialogs/ServerDetailsControls.cxx
index f585666..49d9645 100644
--- a/svtools/source/dialogs/ServerDetailsControls.cxx
+++ b/svtools/source/dialogs/ServerDetailsControls.cxx
@@ -31,23 +31,30 @@ using namespace com::sun::star::task;
 using namespace com::sun::star::ucb;
 using namespace com::sun::star::uno;
 
-DetailsContainer::DetailsContainer( VclBuilderContainer* pBuilder, const OString& rFrame ) :
+DetailsContainer::DetailsContainer( VclBuilderContainer* pBuilder ) :
     m_bIsActive ( true )
 {
-    pBuilder->get( m_pFrame, rFrame );
-    pBuilder->get( m_pCommon, "CommonDetails" );
+    pBuilder->get( m_pDetailsGrid, "Details" );
+    pBuilder->get( m_pHostBox, "HostDetails" );
+    pBuilder->get( m_pEDHost, "host" );
+    pBuilder->get( m_pFTHost, "hostLabel" );
+    pBuilder->get( m_pEDPort, "port-nospin" );
+    pBuilder->get( m_pFTPort, "portLabel" );
+    pBuilder->get( m_pEDRoot, "path" );
+    pBuilder->get( m_pFTRoot, "pathLabel" );
 }
 
 DetailsContainer::~DetailsContainer( )
 {
 }
 
-void DetailsContainer::show( bool bShow )
+void DetailsContainer::show( bool )
 {
-    m_pFrame->Show( bShow );
+    m_pDetailsGrid->Enable( m_bIsActive );
 
-    m_pFrame->Enable( m_bIsActive );
-    m_pCommon->Enable( m_bIsActive );
+    m_pEDHost->SetModifyHdl( LINK( this, DetailsContainer, ValueChangeHdl ) );
+    m_pEDPort->SetModifyHdl( LINK( this, DetailsContainer, ValueChangeHdl ) );
+    m_pEDRoot->SetModifyHdl( LINK( this, DetailsContainer, ValueChangeHdl ) );
 }
 
 INetURLObject DetailsContainer::getUrl( )
@@ -80,34 +87,34 @@ IMPL_LINK_NOARG( DetailsContainer, ValueChangeHdl )
 }
 
 HostDetailsContainer::HostDetailsContainer( VclBuilderContainer* pBuilder, sal_uInt16 nPort, const OUString& sScheme ) :
-    DetailsContainer( pBuilder, "HostDetails" ),
+    DetailsContainer( pBuilder ),
     m_nDefaultPort( nPort ),
     m_sScheme( sScheme )
 {
-    pBuilder->get( m_pEDHost, "host" );
-    m_pEDHost->SetModifyHdl( LINK( this, DetailsContainer, ValueChangeHdl ) );
-
-    pBuilder->get( m_pEDPort, "port-nospin" );
-    m_pEDPort->SetModifyHdl( LINK( this, DetailsContainer, ValueChangeHdl ) );
-
-    pBuilder->get( m_pEDPath, "path" );
-    m_pEDPath->SetModifyHdl( LINK( this, DetailsContainer, ValueChangeHdl ) );
-
     show( false );
 }
 
 void HostDetailsContainer::show( bool bShow )
 {
+    m_pFTHost->Show( bShow );
+    m_pHostBox->Show( bShow );
+    m_pEDRoot->Show( bShow );
+    m_pFTRoot->Show( bShow );
+
     DetailsContainer::show( bShow );
+
     if ( bShow )
+    {
         m_pEDPort->SetValue( m_nDefaultPort );
+        m_pEDHost->SetText( m_sHost );
+    }
 }
 
 INetURLObject HostDetailsContainer::getUrl( )
 {
     OUString sHost = m_pEDHost->GetText().trim( );
     sal_Int64 nPort = m_pEDPort->GetValue();
-    OUString sPath = m_pEDPath->GetText().trim( );
+    OUString sPath = m_pEDRoot->GetText().trim( );
 
     OUString sUrl;
     if ( !sHost.isEmpty( ) )
@@ -132,7 +139,7 @@ bool HostDetailsContainer::setUrl( const INetURLObject& rUrl )
     {
         m_pEDHost->SetText( rUrl.GetHost( ) );
         m_pEDPort->SetValue( rUrl.GetPort( ) );
-        m_pEDPath->SetText( rUrl.GetURLPath() );
+        m_pEDRoot->SetText( rUrl.GetURLPath() );
     }
 
     return bSuccess;
@@ -198,17 +205,13 @@ IMPL_LINK( DavDetailsContainer, ToggledDavsHdl, CheckBox*, pCheckBox )
 }
 
 SmbDetailsContainer::SmbDetailsContainer( VclBuilderContainer* pBuilder ) :
-    DetailsContainer( pBuilder, "SmbDetails" )
+    DetailsContainer( pBuilder )
 {
-    pBuilder->get( m_pEDHost, "smbHost" );
-    m_pEDHost->SetModifyHdl( LINK( this, DetailsContainer, ValueChangeHdl ) );
+    pBuilder->get( m_pEDShare, "share" );
+    pBuilder->get( m_pFTShare, "shareLabel" );
 
-    pBuilder->get( m_pEDShare, "smbShare" );
     m_pEDShare->SetModifyHdl( LINK( this, DetailsContainer, ValueChangeHdl ) );
 
-    pBuilder->get( m_pEDPath, "smbPath" );
-    m_pEDPath->SetModifyHdl( LINK( this, DetailsContainer, ValueChangeHdl ) );
-
     show( false );
 }
 
@@ -216,7 +219,7 @@ INetURLObject SmbDetailsContainer::getUrl( )
 {
     OUString sHost = m_pEDHost->GetText().trim( );
     OUString sShare = m_pEDShare->GetText().trim( );
-    OUString sPath = m_pEDPath->GetText().trim( );
+    OUString sPath = m_pEDRoot->GetText().trim( );
 
     OUString sUrl;
     if ( !sHost.isEmpty( ) )
@@ -252,14 +255,27 @@ bool SmbDetailsContainer::setUrl( const INetURLObject& rUrl )
 
         m_pEDHost->SetText( rUrl.GetHost( ) );
         m_pEDShare->SetText( sShare );
-        m_pEDPath->SetText( sPath );
+        m_pEDRoot->SetText( sPath );
     }
 
     return bSuccess;
 }
 
+void SmbDetailsContainer::show( bool bShow )
+{
+    m_pEDShare->Show( bShow );
+    m_pFTShare->Show( bShow );
+    m_pEDRoot->Show( bShow );
+    m_pFTRoot->Show( bShow );
+
+    m_pFTHost->Show( bShow );
+    m_pHostBox->Show( bShow );
+    m_pEDPort->Enable( !bShow );
+    m_pFTPort->Enable( !bShow );
+}
+
 CmisDetailsContainer::CmisDetailsContainer( VclBuilderContainer* pBuilder, OUString const & sBinding ) :
-    DetailsContainer( pBuilder, "CmisDetails" ),
+    DetailsContainer( pBuilder ),
     m_sUsername( ),
     m_xCmdEnv( ),
     m_aRepoIds( ),
@@ -271,39 +287,50 @@ CmisDetailsContainer::CmisDetailsContainer( VclBuilderContainer* pBuilder, OUStr
         InteractionHandler::createWithParent(xContext, 0), UNO_QUERY );
     m_xCmdEnv = new ucbhelper::CommandEnvironment( xGlobalInteractionHandler, Reference< XProgressHandler >() );
 
-    pBuilder->get( m_pEDBinding, "binding" );
+    pBuilder->get( m_pFTRepository, "repositoryLabel" );
     pBuilder->get( m_pLBRepository, "repositories" );
     pBuilder->get( m_pBTRepoRefresh, "repositoriesRefresh" );
-
-    pBuilder->get( m_pEDRoot, "cmisPath" );
+    pBuilder->get( m_pRepositoryBox, "RepositoryDetails" );
 
     show( false );
 }
 
 void CmisDetailsContainer::show( bool bShow )
 {
-    m_pEDBinding->SetModifyHdl( LINK( this, DetailsContainer, ValueChangeHdl ) );
     m_pLBRepository->SetSelectHdl( LINK( this, CmisDetailsContainer, SelectRepoHdl ) );
     m_pBTRepoRefresh->SetClickHdl( LINK( this, CmisDetailsContainer, RefreshReposHdl ) );
-    m_pEDRoot->SetModifyHdl( LINK( this, DetailsContainer, ValueChangeHdl ) );
 
-    m_pEDBinding->SetText( m_sBinding );
+    m_pEDHost->SetText( m_sBinding );
 
     if( ( m_sBinding == GDRIVE_BASE_URL )
             || m_sBinding.startsWith( ALFRESCO_CLOUD_BASE_URL )
             || ( m_sBinding == ONEDRIVE_BASE_URL ) )
     {
-        DetailsContainer::show( false );
+        m_pFTHost->Show( false );
+        m_pHostBox->Show( false );
+        m_pFTRepository->Show( false );
+        m_pRepositoryBox->Show( false );
+        m_pEDRoot->Show( false );
+        m_pFTRoot->Show( false );
     }
     else
     {
-        DetailsContainer::show( bShow );
+        m_pFTHost->Show( bShow );
+        m_pHostBox->Show( bShow );
+        m_pFTRepository->Show( bShow );
+        m_pRepositoryBox->Show( bShow );
+        m_pEDRoot->Show( bShow );
+        m_pFTRoot->Show( bShow );
     }
+
+    DetailsContainer::show( bShow );
+    m_pEDPort->Enable( !bShow );
+    m_pFTPort->Enable( !bShow );
 }
 
 INetURLObject CmisDetailsContainer::getUrl( )
 {
-    OUString sBindingUrl = m_pEDBinding->GetText().trim( );
+    OUString sBindingUrl = m_pEDHost->GetText().trim( );
     OUString sPath = m_pEDRoot->GetText().trim( );
 
     bool bSkip = true;
@@ -344,7 +371,7 @@ bool CmisDetailsContainer::setUrl( const INetURLObject& rUrl )
         m_sBinding = aHostUrl.GetURLNoMark( );
         m_sRepoId = aHostUrl.GetMark( );
 
-        m_pEDBinding->SetText( m_sBinding );
+        m_pEDHost->SetText( m_sBinding );
         m_pEDRoot->SetText( rUrl.GetURLPath() );
     }
     return bSuccess;
@@ -368,7 +395,7 @@ void CmisDetailsContainer::selectRepository( )
 
 IMPL_LINK_NOARG( CmisDetailsContainer, RefreshReposHdl  )
 {
-    OUString sBindingUrl = m_pEDBinding->GetText().trim( );
+    OUString sBindingUrl = m_pEDHost->GetText().trim( );
 
     OUString sEncodedUsername = "";
 
diff --git a/svtools/uiconfig/ui/placeedit.ui b/svtools/uiconfig/ui/placeedit.ui
index e2b1c30..ec5c41e 100644
--- a/svtools/uiconfig/ui/placeedit.ui
+++ b/svtools/uiconfig/ui/placeedit.ui
@@ -162,7 +162,7 @@
           </packing>
         </child>
         <child>
-          <object class="GtkGrid" id="HostDetails">
+          <object class="GtkGrid" id="Details">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <property name="row_spacing">6</property>
@@ -181,21 +181,6 @@
               </packing>
             </child>
             <child>
-              <object class="GtkCheckButton" id="webdavs">
-                <property name="label" translatable="yes">Secure connection</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="hexpand">True</property>
-                <property name="xalign">0</property>
-                <property name="draw_indicator">True</property>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">2</property>
-                <property name="width">3</property>
-              </packing>
-            </child>
-            <child>
               <object class="GtkLabel" id="pathLabel">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
@@ -206,7 +191,7 @@
               </object>
               <packing>
                 <property name="left_attach">0</property>
-                <property name="top_attach">1</property>
+                <property name="top_attach">6</property>
               </packing>
             </child>
             <child>
@@ -218,112 +203,77 @@
               </object>
               <packing>
                 <property name="left_attach">1</property>
-                <property name="top_attach">1</property>
-                <property name="width">3</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="host">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="hexpand">True</property>
-                <property name="invisible_char">●</property>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">0</property>
+                <property name="top_attach">6</property>
               </packing>
             </child>
             <child>
-              <object class="GtkLabel" id="portLabel">
+              <object class="GtkLabel" id="shareLabel">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="xalign">0</property>
-                <property name="label" translatable="yes">Port:</property>
+                <property name="label" translatable="yes">Share:</property>
                 <property name="use_underline">True</property>
-                <property name="mnemonic_widget">port-nospin</property>
               </object>
               <packing>
-                <property name="left_attach">2</property>
-                <property name="top_attach">0</property>
+                <property name="left_attach">0</property>
+                <property name="top_attach">2</property>
               </packing>
             </child>
             <child>
-              <object class="GtkSpinButton" id="port-nospin">
+              <object class="GtkEntry" id="share">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="max_length">4</property>
+                <property name="hexpand">True</property>
                 <property name="invisible_char">●</property>
-                <property name="max_width_chars">4</property>
-                <property name="text" translatable="yes">0</property>
-                <property name="adjustment">adjustment1</property>
-                <property name="numeric">True</property>
               </object>
               <packing>
-                <property name="left_attach">3</property>
-                <property name="top_attach">0</property>
+                <property name="left_attach">1</property>
+                <property name="top_attach">2</property>
               </packing>
             </child>
             <child>
-              <placeholder/>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkGrid" id="SmbDetails">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="row_spacing">6</property>
-            <property name="column_spacing">12</property>
-            <child>
-              <object class="GtkLabel" id="label9">
+              <object class="GtkLabel" id="repositoryLabel">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="xalign">0</property>
-                <property name="label" translatable="yes">Host:</property>
+                <property name="label" translatable="yes">Repository:</property>
                 <property name="use_underline">True</property>
-                <property name="mnemonic_widget">smbHost</property>
               </object>
               <packing>
                 <property name="left_attach">0</property>
-                <property name="top_attach">0</property>
+                <property name="top_attach">3</property>
               </packing>
             </child>
             <child>
-              <object class="GtkLabel" id="label10">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
+              <object class="GtkCheckButton" id="webdavs">
+                <property name="label" translatable="yes">Secure connection</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="hexpand">True</property>
                 <property name="xalign">0</property>
-                <property name="label" translatable="yes">Share:</property>
-                <property name="use_underline">True</property>
-                <property name="mnemonic_widget">smbShare</property>
+                <property name="draw_indicator">True</property>
               </object>
               <packing>
-                <property name="left_attach">0</property>
+                <property name="left_attach">1</property>
                 <property name="top_attach">1</property>
               </packing>
             </child>
             <child>
-              <object class="GtkLabel" id="label11">
+              <object class="GtkLabel" id="loginLabel">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="xalign">0</property>
-                <property name="label" translatable="yes">Root:</property>
+                <property name="label" translatable="yes">User:</property>
                 <property name="use_underline">True</property>
-                <property name="mnemonic_widget">smbPath</property>
+                <property name="mnemonic_widget">login</property>
               </object>
               <packing>
                 <property name="left_attach">0</property>
-                <property name="top_attach">2</property>
+                <property name="top_attach">4</property>
               </packing>
             </child>
             <child>
-              <object class="GtkEntry" id="smbHost">
+              <object class="GtkEntry" id="login">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="hexpand">True</property>
@@ -331,23 +281,25 @@
               </object>
               <packing>
                 <property name="left_attach">1</property>
-                <property name="top_attach">0</property>
+                <property name="top_attach">4</property>
               </packing>
             </child>
             <child>
-              <object class="GtkEntry" id="smbShare">
+              <object class="GtkLabel" id="nameLabel">
                 <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="hexpand">True</property>
-                <property name="invisible_char">●</property>
+                <property name="can_focus">False</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Label:</property>
+                <property name="use_underline">True</property>
+                <property name="mnemonic_widget">name</property>
               </object>
               <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">1</property>
+                <property name="left_attach">0</property>
+                <property name="top_attach">5</property>
               </packing>
             </child>
             <child>
-              <object class="GtkEntry" id="smbPath">
+              <object class="GtkEntry" id="name">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="hexpand">True</property>
@@ -355,56 +307,59 @@
               </object>
               <packing>
                 <property name="left_attach">1</property>
-                <property name="top_attach">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="position">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkGrid" id="CmisDetails">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="row_spacing">6</property>
-            <property name="column_spacing">12</property>
-            <child>
-              <object class="GtkLabel" id="bindingLabel">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Host:</property>
-                <property name="use_underline">True</property>
-                <property name="mnemonic_widget">binding</property>
-              </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">0</property>
+                <property name="top_attach">5</property>
               </packing>
             </child>
             <child>
-              <object class="GtkLabel" id="repositoryLabel">
+              <object class="GtkBox" id="HostDetails">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Repository:</property>
-                <property name="use_underline">True</property>
-                <property name="mnemonic_widget">repositories</property>
-              </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="binding">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="hexpand">True</property>
-                <property name="invisible_char">●</property>
+                <property name="spacing">6</property>
+                <child>
+                  <object class="GtkEntry" id="host">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="hexpand">True</property>
+                    <property name="invisible_char">●</property>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="portLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Port:</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="port-nospin">
+                    <property name="width_request">50</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="max_length">4</property>
+                    <property name="invisible_char">●</property>
+                    <property name="max_width_chars">4</property>
+                    <property name="text" translatable="yes">0</property>
+                    <property name="adjustment">adjustment1</property>
+                    <property name="numeric">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
               </object>
               <packing>
                 <property name="left_attach">1</property>
@@ -412,10 +367,10 @@
               </packing>
             </child>
             <child>
-              <object class="GtkGrid" id="grid6">
+              <object class="GtkBox" id="RepositoryDetails">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="column_spacing">6</property>
+                <property name="spacing">6</property>
                 <child>
                   <object class="GtkComboBox" id="repositories">
                     <property name="visible">True</property>
@@ -423,8 +378,9 @@
                     <property name="hexpand">True</property>
                   </object>
                   <packing>
-                    <property name="left_attach">0</property>
-                    <property name="top_attach">0</property>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
                   </packing>
                 </child>
                 <child>
@@ -435,111 +391,25 @@
                     <property name="image">image1</property>
                   </object>
                   <packing>
-                    <property name="left_attach">1</property>
-                    <property name="top_attach">0</property>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
                   </packing>
                 </child>
               </object>
               <packing>
                 <property name="left_attach">1</property>
-                <property name="top_attach">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="rootLabel">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Root:</property>
-                <property name="use_underline">True</property>
-                <property name="mnemonic_widget">cmisPath</property>
-              </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">2</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="cmisPath">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="invisible_char">●</property>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="position">3</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkGrid" id="CommonDetails">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="row_spacing">6</property>
-            <property name="column_spacing">12</property>
-            <child>
-              <object class="GtkLabel" id="label16">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">User:</property>
-                <property name="use_underline">True</property>
-                <property name="mnemonic_widget">login</property>
-              </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="login">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="hexpand">True</property>
-                <property name="invisible_char">●</property>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="labelLabel">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Label:</property>
-                <property name="use_underline">True</property>
-                <property name="mnemonic_widget">name</property>
-              </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">1</property>
+                <property name="top_attach">3</property>
               </packing>
             </child>
             <child>
-              <object class="GtkEntry" id="name">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="hexpand">True</property>
-                <property name="invisible_char">●</property>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">1</property>
-              </packing>
+              <placeholder/>
             </child>
           </object>
           <packing>
             <property name="expand">False</property>
             <property name="fill">True</property>
-            <property name="position">4</property>
+            <property name="position">1</property>
           </packing>
         </child>
       </object>
commit f41db93693540f02ce2b8d1bac95ca6310cd5eae
Author: Szymon Kłos <eszkadev at gmail.com>
Date:   Wed Aug 5 11:56:06 2015 +0200

    Show unavailable services with disabled controls
    
    Change-Id: I9fe25bc5e8ce31cd848c4f6434b747be96a8006a

diff --git a/include/svtools/ServerDetailsControls.hxx b/include/svtools/ServerDetailsControls.hxx
index 8043d46..16b8e23 100644
--- a/include/svtools/ServerDetailsControls.hxx
+++ b/include/svtools/ServerDetailsControls.hxx
@@ -25,8 +25,10 @@
 class DetailsContainer
 {
     private:
-        Link<> m_aChangeHdl;
-        VclPtr<VclGrid>       m_pFrame;
+        Link<>             m_aChangeHdl;
+        VclPtr<VclGrid>    m_pFrame;
+        VclPtr<VclGrid>    m_pCommon;
+        bool               m_bIsActive;
 
     public:
         DetailsContainer( VclBuilderContainer* pBuilder, const OString& rFrame );
@@ -46,6 +48,8 @@ class DetailsContainer
 
         virtual void setUsername( const OUString& /*rUsername*/ ) { };
 
+        virtual void setActive( bool bActive = true );
+
     protected:
         void notifyChange( );
         DECL_LINK ( ValueChangeHdl, void * );
diff --git a/svtools/source/dialogs/PlaceEditDialog.cxx b/svtools/source/dialogs/PlaceEditDialog.cxx
index 125a817..8ead056 100644
--- a/svtools/source/dialogs/PlaceEditDialog.cxx
+++ b/svtools/source/dialogs/PlaceEditDialog.cxx
@@ -150,18 +150,20 @@ void PlaceEditDialog::InitDetails( )
     for ( sal_Int32 i = 0; i < aTypesUrlsList.getLength( ) && aTypesNamesList.getLength( ); ++i )
     {
         OUString sUrl = aTypesUrlsList[i];
-        if ( !( sUrl == GDRIVE_BASE_URL && bSkipGDrive ) &&
-             !( sUrl.startsWith( ALFRESCO_CLOUD_BASE_URL ) && bSkipAlfresco ) &&
-             !( sUrl == ONEDRIVE_BASE_URL && bSkipOneDrive ) )
-        {
-            nPos = m_pLBServerType->InsertEntry( aTypesNamesList[i], nPos );
+        nPos = m_pLBServerType->InsertEntry( aTypesNamesList[i], nPos );
 
-            std::shared_ptr<DetailsContainer> xCmisDetails(std::make_shared<CmisDetailsContainer>(this, sUrl));
-            xCmisDetails->setChangeHdl( LINK( this, PlaceEditDialog, EditHdl ) );
-            m_aDetailsContainers.push_back(xCmisDetails);
+        std::shared_ptr<DetailsContainer> xCmisDetails(std::make_shared<CmisDetailsContainer>(this, sUrl));
+        xCmisDetails->setChangeHdl( LINK( this, PlaceEditDialog, EditHdl ) );
+        m_aDetailsContainers.push_back(xCmisDetails);
 
-            nPos++;
+        if ( ( sUrl == GDRIVE_BASE_URL && bSkipGDrive ) ||
+             ( sUrl.startsWith( ALFRESCO_CLOUD_BASE_URL ) && bSkipAlfresco ) ||
+             ( sUrl == ONEDRIVE_BASE_URL && bSkipOneDrive ) )
+        {
+            xCmisDetails->setActive( false );
         }
+
+        nPos++;
     }
 
     // Create WebDAV / FTP / SSH details control
diff --git a/svtools/source/dialogs/ServerDetailsControls.cxx b/svtools/source/dialogs/ServerDetailsControls.cxx
index a5b40e0..f585666 100644
--- a/svtools/source/dialogs/ServerDetailsControls.cxx
+++ b/svtools/source/dialogs/ServerDetailsControls.cxx
@@ -31,9 +31,11 @@ using namespace com::sun::star::task;
 using namespace com::sun::star::ucb;
 using namespace com::sun::star::uno;
 
-DetailsContainer::DetailsContainer( VclBuilderContainer* pBuilder, const OString& rFrame )
+DetailsContainer::DetailsContainer( VclBuilderContainer* pBuilder, const OString& rFrame ) :
+    m_bIsActive ( true )
 {
     pBuilder->get( m_pFrame, rFrame );
+    pBuilder->get( m_pCommon, "CommonDetails" );
 }
 
 DetailsContainer::~DetailsContainer( )
@@ -43,6 +45,9 @@ DetailsContainer::~DetailsContainer( )
 void DetailsContainer::show( bool bShow )
 {
     m_pFrame->Show( bShow );
+
+    m_pFrame->Enable( m_bIsActive );
+    m_pCommon->Enable( m_bIsActive );
 }
 
 INetURLObject DetailsContainer::getUrl( )
@@ -63,6 +68,11 @@ void DetailsContainer::notifyChange( )
     m_aChangeHdl.Call( this );
 }
 
+void DetailsContainer::setActive( bool bActive )
+{
+    m_bIsActive = bActive;
+}
+
 IMPL_LINK_NOARG( DetailsContainer, ValueChangeHdl )
 {
     notifyChange( );
diff --git a/svtools/uiconfig/ui/placeedit.ui b/svtools/uiconfig/ui/placeedit.ui
index 4fb556b..e2b1c30 100644
--- a/svtools/uiconfig/ui/placeedit.ui
+++ b/svtools/uiconfig/ui/placeedit.ui
@@ -478,9 +478,10 @@
           </packing>
         </child>
         <child>
-          <object class="GtkGrid" id="UserDetails">
+          <object class="GtkGrid" id="CommonDetails">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
+            <property name="row_spacing">6</property>
             <property name="column_spacing">12</property>
             <child>
               <object class="GtkLabel" id="label16">
@@ -508,18 +509,6 @@
                 <property name="top_attach">0</property>
               </packing>
             </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="position">4</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkGrid" id="LabelGrid">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="column_spacing">6</property>
             <child>
               <object class="GtkLabel" id="labelLabel">
                 <property name="visible">True</property>
@@ -531,7 +520,7 @@
               </object>
               <packing>
                 <property name="left_attach">0</property>
-                <property name="top_attach">0</property>
+                <property name="top_attach">1</property>
               </packing>
             </child>
             <child>
@@ -543,14 +532,14 @@
               </object>
               <packing>
                 <property name="left_attach">1</property>
-                <property name="top_attach">0</property>
+                <property name="top_attach">1</property>
               </packing>
             </child>
           </object>
           <packing>
             <property name="expand">False</property>
             <property name="fill">True</property>
-            <property name="position">5</property>
+            <property name="position">4</property>
           </packing>
         </child>
       </object>
commit 8bce1734a42128caf33a9561fb5627517a620cd9
Author: Szymon Kłos <eszkadev at gmail.com>
Date:   Wed Aug 5 11:13:09 2015 +0200

    Port field without buttons, max 4 chars
    
    Change-Id: I4ddc294dba5ad66a11ff260e8942977d0a6a292f

diff --git a/svtools/source/dialogs/ServerDetailsControls.cxx b/svtools/source/dialogs/ServerDetailsControls.cxx
index 71eab33..a5b40e0 100644
--- a/svtools/source/dialogs/ServerDetailsControls.cxx
+++ b/svtools/source/dialogs/ServerDetailsControls.cxx
@@ -77,7 +77,7 @@ HostDetailsContainer::HostDetailsContainer( VclBuilderContainer* pBuilder, sal_u
     pBuilder->get( m_pEDHost, "host" );
     m_pEDHost->SetModifyHdl( LINK( this, DetailsContainer, ValueChangeHdl ) );
 
-    pBuilder->get( m_pEDPort, "port" );
+    pBuilder->get( m_pEDPort, "port-nospin" );
     m_pEDPort->SetModifyHdl( LINK( this, DetailsContainer, ValueChangeHdl ) );
 
     pBuilder->get( m_pEDPath, "path" );
diff --git a/svtools/uiconfig/ui/placeedit.ui b/svtools/uiconfig/ui/placeedit.ui
index 272c096..4fb556b 100644
--- a/svtools/uiconfig/ui/placeedit.ui
+++ b/svtools/uiconfig/ui/placeedit.ui
@@ -241,7 +241,7 @@
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">Port:</property>
                 <property name="use_underline">True</property>
-                <property name="mnemonic_widget">port</property>
+                <property name="mnemonic_widget">port-nospin</property>
               </object>
               <packing>
                 <property name="left_attach">2</property>
@@ -249,10 +249,12 @@
               </packing>
             </child>
             <child>
-              <object class="GtkSpinButton" id="port">
+              <object class="GtkSpinButton" id="port-nospin">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
+                <property name="max_length">4</property>
                 <property name="invisible_char">●</property>
+                <property name="max_width_chars">4</property>
                 <property name="text" translatable="yes">0</property>
                 <property name="adjustment">adjustment1</property>
                 <property name="numeric">True</property>
commit c60eede752047b49ecd5930e53ed203314b8e6f8
Author: Szymon Kłos <eszkadev at gmail.com>
Date:   Wed Aug 5 10:46:43 2015 +0200

    Port field on the same line as Host
    
    Change-Id: Iddf611e372772cbe5c38aecc81f4d43412d653da

diff --git a/svtools/uiconfig/ui/placeedit.ui b/svtools/uiconfig/ui/placeedit.ui
index 5434102..272c096 100644
--- a/svtools/uiconfig/ui/placeedit.ui
+++ b/svtools/uiconfig/ui/placeedit.ui
@@ -191,7 +191,8 @@
               </object>
               <packing>
                 <property name="left_attach">1</property>
-                <property name="top_attach">3</property>
+                <property name="top_attach">2</property>
+                <property name="width">3</property>
               </packing>
             </child>
             <child>
@@ -205,7 +206,7 @@
               </object>
               <packing>
                 <property name="left_attach">0</property>
-                <property name="top_attach">2</property>
+                <property name="top_attach">1</property>
               </packing>
             </child>
             <child>
@@ -217,7 +218,20 @@
               </object>
               <packing>
                 <property name="left_attach">1</property>
-                <property name="top_attach">2</property>
+                <property name="top_attach">1</property>
+                <property name="width">3</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkEntry" id="host">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="hexpand">True</property>
+                <property name="invisible_char">●</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="top_attach">0</property>
               </packing>
             </child>
             <child>
@@ -230,8 +244,8 @@
                 <property name="mnemonic_widget">port</property>
               </object>
               <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">1</property>
+                <property name="left_attach">2</property>
+                <property name="top_attach">0</property>
               </packing>
             </child>
             <child>
@@ -244,19 +258,7 @@
                 <property name="numeric">True</property>
               </object>
               <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="host">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="hexpand">True</property>
-                <property name="invisible_char">●</property>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
+                <property name="left_attach">3</property>
                 <property name="top_attach">0</property>
               </packing>
             </child>
commit 4b652a863f3eaabaf85b8897bbd1676f9db2c472
Author: Szymon Kłos <eszkadev at gmail.com>
Date:   Tue Aug 4 15:34:51 2015 +0200

    The Add Service dialog width changed to 400+ px
    
    Change-Id: Ied97043e0649c552190b490d41f60579db523625

diff --git a/svtools/uiconfig/ui/placeedit.ui b/svtools/uiconfig/ui/placeedit.ui
index f0cf611..5434102 100644
--- a/svtools/uiconfig/ui/placeedit.ui
+++ b/svtools/uiconfig/ui/placeedit.ui
@@ -33,6 +33,7 @@
     </data>
   </object>
   <object class="GtkDialog" id="PlaceEditDialog">
+    <property name="width_request">400</property>
     <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes">File Services</property>
commit 0d9c7740d213c51d59c83603e9c3efa245cb3960
Author: Szymon Kłos <eszkadev at gmail.com>
Date:   Tue Aug 4 15:06:37 2015 +0200

    no selection after deletion of a service
    
    Change-Id: Id59a55a2af74851ff7b2fa8d6af30350347eb4c6

diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx
index f998633..11278f2 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -719,15 +719,8 @@ IMPL_LINK_TYPED ( RemoteFilesDialog, EditServiceMenuHdl, MenuButton *, pButton,
                 m_aServices.erase( m_aServices.begin() + nPos );
                 m_pServices_lb->RemoveEntry( nSelected );
 
-                if( m_pServices_lb->GetEntryCount() > 0 )
-                {
-                    m_pServices_lb->SelectEntryPos( 0 );
-                }
-                else
-                {
-                    m_pServices_lb->SetNoSelection();
-                    m_pAddService_btn->SetPopupMenu( NULL );
-                }
+                m_pServices_lb->SetNoSelection();
+                m_pAddService_btn->SetPopupMenu( NULL );
 
                 m_bIsUpdated = true;
             }
commit 4aeaeefb76389a2f520cc1886413d92c28af5583
Author: Szymon Kłos <eszkadev at gmail.com>
Date:   Tue Aug 4 15:03:19 2015 +0200

    do not show Add Service dialog on start
    
    Change-Id: I4548856d6df0e1ae7d57850a5e479635c62b97c0

diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx
index 0806c81..f998633 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -342,11 +342,6 @@ void RemoteFilesDialog::Resize()
 
 short RemoteFilesDialog::Execute()
 {
-    if( m_pServices_lb->GetEntryCount() == 0 )
-    {
-        Show();
-        AddServiceHdl( NULL );
-    }
     if( m_pServices_lb->GetEntryCount() > 0 )
     {
         Show();
commit 44a9641babb726084f41e3ee8b617af5bbb4e1d1
Author: Szymon Kłos <eszkadev at gmail.com>
Date:   Mon Aug 3 16:47:29 2015 +0200

    delete entry in the context menu
    
    Change-Id: Ib315dbc27b8b278ffce4bb24f4c4b60e5cb4d709

diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx
index 4ec8569..0806c81 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -226,6 +226,7 @@ RemoteFilesDialog::RemoteFilesDialog( vcl::Window* pParent, WinBits nBits )
     m_pFileView->EnableAutoResize();
     m_pFileView->SetDoubleClickHdl( LINK( this, RemoteFilesDialog, DoubleClickHdl ) );
     m_pFileView->SetSelectHdl( LINK( this, RemoteFilesDialog, SelectHdl ) );
+    m_pFileView->EnableDelete( true );
 
     m_pSplitter = VclPtr< Splitter >::Create( m_pContainer, WB_HSCROLL );
     m_pSplitter->SetBackground( Wallpaper( Application::GetSettings().GetStyleSettings().GetFaceColor() ) );
commit 5c65a2dbf675836943a78e33141e16745a65aa7c
Author: Szymon Kłos <eszkadev at gmail.com>
Date:   Mon Aug 3 16:33:25 2015 +0200

    don't show edit menu when there is no selected service
    
    Change-Id: I6b5f713926383d776aa687801f6bef239c9675cb

diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx
index 5233a62..4ec8569 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -354,6 +354,7 @@ short RemoteFilesDialog::Execute()
     if( !m_bIsConnected )
     {
         m_pServices_lb->SetNoSelection();
+        m_pAddService_btn->SetPopupMenu( NULL );
     }
 
     short nRet = SvtFileDialog_Base::Execute();
@@ -654,6 +655,7 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, SelectServiceHdl )
     if( nPos >= 0 )
     {
         OUString sURL = m_aServices[nPos]->GetUrl();
+        m_pAddService_btn->SetPopupMenu( m_pAddMenu );
 
         m_bServiceChanged = true;
         OpenURL( sURL );
commit 653fde5d871f2d989e3e26194b5b823ef1de5c0f
Author: Szymon Kłos <eszkadev at gmail.com>
Date:   Mon Aug 3 14:59:58 2015 +0200

    FolderTree: changed root node name ('Root')
    
    Change-Id: I495965e065366880b364578a02af7092d6efbad4

diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx
index 0e26283..5233a62 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -1099,12 +1099,11 @@ void RemoteFilesDialog::UpdateControls( const OUString& rURL )
     if( nPos >= 0 && m_bServiceChanged && rURL == m_aServices[nPos]->GetUrl() )
     {
         OUString sURL = m_aServices[nPos]->GetUrl();
-        OUString sName = m_aServices[nPos]->GetName();
 
         m_pPath->SetRootName( m_sRootLabel );
         m_pTreeView->Clear();
 
-        SvTreeListEntry* pRoot = m_pTreeView->InsertEntry( sName, NULL, true );
+        SvTreeListEntry* pRoot = m_pTreeView->InsertEntry( m_sRootLabel, NULL, true );
         OUString* sData = new OUString( rURL );
         pRoot->SetUserData( static_cast< void* >( sData ) );
 
commit b225fd878e8c92687be2c93eaef634853d1a7e10
Author: Szymon Kłos <eszkadev at gmail.com>
Date:   Mon Aug 3 14:56:14 2015 +0200

    FolderTree width 100 -> 150
    
    Change-Id: I2d349c19a11679b0c58a1efbd134837f5c3aabdd

diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx
index b32f196..0e26283 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -233,7 +233,7 @@ RemoteFilesDialog::RemoteFilesDialog( vcl::Window* pParent, WinBits nBits )
     m_pSplitter->Show();
 
     m_pTreeView = VclPtr< FolderTree >::Create( m_pContainer, WB_BORDER );
-    Size aSize( 100, 200 );
+    Size aSize( 150, 200 );
     m_pTreeView->set_height_request( aSize.Height() );
     m_pTreeView->set_width_request( aSize.Width() );
     m_pTreeView->SetSizePixel( aSize );
commit 43c38e0ef0215e452ed95aef3b24250443150c58
Author: Szymon Kłos <eszkadev at gmail.com>
Date:   Mon Aug 3 14:50:44 2015 +0200

    don't invalidate the dialog after every typed character
    
    Change-Id: Ib422edf3b615fec6513887283595f647f5bc197e

diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx
index 40b9c75..b32f196 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -814,7 +814,8 @@ IMPL_LINK_NOARG( RemoteFilesDialog, FileNameGetFocusHdl )
 IMPL_LINK_NOARG( RemoteFilesDialog, FileNameModifyHdl )
 {
     m_pFileView->SetNoSelection();
-    EnableControls();
+    if( !m_pOk_btn->IsEnabled() )
+        EnableControls();
 
     return 1;
 }
commit 4460b7bce6e34cd0a24b8f06aa2c2157ce413985
Author: Szymon Kłos <eszkadev at gmail.com>
Date:   Mon Aug 3 14:43:32 2015 +0200

    Breadcrumb: changed first entry label ('Root')
    
    Change-Id: Id15bc1ef92fdab22ba3332dc9b42fb9c785298b4

diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx
index dde7eeb..40b9c75 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -206,6 +206,7 @@ RemoteFilesDialog::RemoteFilesDialog( vcl::Window* pParent, WinBits nBits )
     m_pOk_btn->SetClickHdl( LINK( this, RemoteFilesDialog, OkHdl ) );
     m_pCancel_btn->SetClickHdl( LINK( this, RemoteFilesDialog, CancelHdl ) );
 
+    m_sRootLabel = ResId( STR_SVT_ROOTLABEL, *ResMgrHolder::getOrCreate() );
     m_pPath = VclPtr<Breadcrumb>::Create( get< vcl::Window >( "breadcrumb_container" ) );
     m_pPath->set_hexpand( true );
     m_pPath->SetClickHdl( LINK( this, RemoteFilesDialog, SelectBreadcrumbHdl ) );
@@ -1099,7 +1100,7 @@ void RemoteFilesDialog::UpdateControls( const OUString& rURL )
         OUString sURL = m_aServices[nPos]->GetUrl();
         OUString sName = m_aServices[nPos]->GetName();
 
-        m_pPath->SetRootName( sName );
+        m_pPath->SetRootName( m_sRootLabel );
         m_pTreeView->Clear();
 
         SvTreeListEntry* pRoot = m_pTreeView->InsertEntry( sName, NULL, true );
diff --git a/fpicker/source/office/RemoteFilesDialog.hxx b/fpicker/source/office/RemoteFilesDialog.hxx
index ea6af5f..0d61f41 100644
--- a/fpicker/source/office/RemoteFilesDialog.hxx
+++ b/fpicker/source/office/RemoteFilesDialog.hxx
@@ -127,6 +127,7 @@ private:
 
     OUString m_sPath;
     OUString m_sStdDir;
+    OUString m_sRootLabel;
     OUString m_sLastServiceUrl;
     unsigned int m_nCurrentFilter;
 
diff --git a/fpicker/source/office/iodlg.src b/fpicker/source/office/iodlg.src
index bc43b98..775b6ee 100644
--- a/fpicker/source/office/iodlg.src
+++ b/fpicker/source/office/iodlg.src
@@ -110,6 +110,11 @@ String STR_SVT_DELETESERVICE
     Text [ en-US ] = "Are you sure you want to delete the service?\n\"$servicename$\"" ;
 };
 
+String STR_SVT_ROOTLABEL
+{
+    Text [ en-US ] = "Root" ;
+};
+
 String STR_SVT_NEW_FOLDER
 {
     Text [ en-US ] = "Folder" ;
diff --git a/include/vcl/fpicker.hrc b/include/vcl/fpicker.hrc
index 7d4bd16..896d9c8 100644
--- a/include/vcl/fpicker.hrc
+++ b/include/vcl/fpicker.hrc
@@ -28,6 +28,7 @@
 #define STR_SVT_FOLDERPICKER_DEFAULT_DESCRIPTION    (STR_SVT_FILEPICKER_START+13)
 #define STR_SVT_ALREADYEXISTOVERWRITE               (STR_SVT_FILEPICKER_START+14)
 #define STR_SVT_DELETESERVICE                       (STR_SVT_FILEPICKER_START+15)
+#define STR_SVT_ROOTLABEL                           (STR_SVT_FILEPICKER_START+16)
 
 #endif
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 1d2ea0fdc6eecf4e2d45b3183e7891fc44014ae0
Author: Szymon Kłos <eszkadev at gmail.com>
Date:   Mon Aug 3 14:28:42 2015 +0200

    changed label text (File name)
    
    Change-Id: Ida5bcd0287b49b7e6e97a7573e9cf12f25d95f6d

diff --git a/fpicker/uiconfig/ui/remotefilesdialog.ui b/fpicker/uiconfig/ui/remotefilesdialog.ui
index c9a6ac0..8bf57a3 100644
--- a/fpicker/uiconfig/ui/remotefilesdialog.ui
+++ b/fpicker/uiconfig/ui/remotefilesdialog.ui
@@ -194,7 +194,7 @@
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="xalign">0</property>
-                <property name="label" translatable="yes">Full name</property>
+                <property name="label" translatable="yes">File name</property>
               </object>
               <packing>
                 <property name="left_attach">0</property>
commit d2c198b3da32c063432d064268e465b3d8061a7a
Author: Szymon Kłos <eszkadev at gmail.com>
Date:   Mon Aug 3 13:19:51 2015 +0200

    remember user settings
    
    Change-Id: I69c4672646365ca4cbeb04d6956741ffe365ad35

diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx
index cdb38ec..dde7eeb 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -249,6 +249,9 @@ RemoteFilesDialog::RemoteFilesDialog( vcl::Window* pParent, WinBits nBits )
     m_pContainer->Show();
     m_pContainer->Enable( false );
 
+    m_sIniKey = "RemoteFilesDialog";
+    InitSize();
+
     m_pName_ed->SetGetFocusHdl( LINK( this, RemoteFilesDialog, FileNameGetFocusHdl ) );
     m_pName_ed->SetModifyHdl( LINK( this, RemoteFilesDialog, FileNameModifyHdl ) );
 
@@ -273,6 +276,17 @@ void RemoteFilesDialog::dispose()
 {
     m_pFileView->SetSelectHdl( Link<>() );
 
+    // save window state
+    if( !m_sIniKey.isEmpty() )
+    {
+        SvtViewOptions aDlgOpt( E_DIALOG, m_sIniKey );
+        aDlgOpt.SetWindowState( OStringToOUString( GetWindowState(), osl_getThreadTextEncoding() ) );
+        OUString sUserData = m_pFileView->GetConfigString();
+        aDlgOpt.SetUserItem( OUString( "UserData" ),
+                             makeAny( sUserData ) );
+    }
+
+    // save services
     std::shared_ptr< comphelper::ConfigurationChanges > batch( comphelper::ConfigurationChanges::create( m_context ) );
 
     officecfg::Office::Common::Misc::FilePickerLastService::set( m_sLastServiceUrl, batch );
@@ -381,6 +395,25 @@ OUString lcl_GetServiceType( ServicePtr pService )
     }
 }
 
+void RemoteFilesDialog::InitSize()
+{
+    if( m_sIniKey.isEmpty() )
+        return;
+
+    // initialize from config
+    SvtViewOptions aDlgOpt( E_DIALOG, m_sIniKey );
+
+    if( aDlgOpt.Exists() )
+    {
+        SetWindowState( OUStringToOString( aDlgOpt.GetWindowState(), osl_getThreadTextEncoding() ) );
+
+        Any aUserData = aDlgOpt.GetUserItem( OUString( "UserData" ) );
+        OUString sCfgStr;
+        if( aUserData >>= sCfgStr )
+            m_pFileView->SetConfigString( sCfgStr );
+    }
+}
+
 void RemoteFilesDialog::FillServicesListbox()
 {
     m_pServices_lb->Clear();
diff --git a/fpicker/source/office/RemoteFilesDialog.hxx b/fpicker/source/office/RemoteFilesDialog.hxx
index 2bb7c35..ea6af5f 100644
--- a/fpicker/source/office/RemoteFilesDialog.hxx
+++ b/fpicker/source/office/RemoteFilesDialog.hxx
@@ -19,6 +19,8 @@
 #include <tools/errinf.hxx>
 #include <tools/resid.hxx>
 
+#include <unotools/viewoptions.hxx>
+
 #include <vcl/button.hxx>
 #include <vcl/fpicker.hrc>
 #include <vcl/menubtn.hxx>
@@ -121,6 +123,8 @@ private:
     bool m_bIsConnected;
     bool m_bServiceChanged;
 
+    OUString m_sIniKey;
+
     OUString m_sPath;
     OUString m_sStdDir;
     OUString m_sLastServiceUrl;
@@ -147,6 +151,8 @@ private:
     std::vector< ServicePtr > m_aServices;
     std::vector< std::pair< OUString, OUString > > m_aFilters;
 
+    void InitSize();
+
     void FillServicesListbox();
 
     /* If failure returns < 0 */
commit a194fd8b57538be1c43b305ae8e73306a94f5de5
Author: Szymon Kłos <eszkadev at gmail.com>
Date:   Thu Jul 30 15:11:22 2015 +0200

    clear string (cached url) in correct place
    
    Change-Id: Ib7ff8200b768ef3a2a50c42f0ebf165185cfeeba

diff --git a/svtools/source/contnr/foldertree.cxx b/svtools/source/contnr/foldertree.cxx
index 2f1d7fb..a7185e2 100644
--- a/svtools/source/contnr/foldertree.cxx
+++ b/svtools/source/contnr/foldertree.cxx
@@ -75,12 +75,12 @@ void FolderTree::FillTreeEntry( SvTreeListEntry* pEntry )
                 }
             }
         }
-    }
-    else
-    {
-        // this dir was updated recently
-        // next time read this remote folder
-        m_sLastUpdatedDir = "";
+        else
+        {
+            // this dir was updated recently
+            // next time read this remote folder
+            m_sLastUpdatedDir = "";
+        }
     }
 }
 
commit fb059246cb12b2670a1997484c9eba9e61a614b6
Author: Szymon Kłos <eszkadev at gmail.com>
Date:   Thu Jul 30 13:57:20 2015 +0200

    'Wait' cursor while expanding a tree node
    
    Change-Id: Iad79fa16bc4c7f7086d2adca6ea417f6e1959e61

diff --git a/svtools/source/contnr/foldertree.cxx b/svtools/source/contnr/foldertree.cxx
index f783a5b..2f1d7fb 100644
--- a/svtools/source/contnr/foldertree.cxx
+++ b/svtools/source/contnr/foldertree.cxx
@@ -27,7 +27,14 @@ FolderTree::FolderTree( vcl::Window* pParent, WinBits nBits )
 
 void FolderTree::RequestingChildren( SvTreeListEntry* pEntry )
 {
+    EnableChildPointerOverwrite( true );
+    SetPointer( PointerStyle::Wait );
+    Invalidate(InvalidateFlags::Update);
+
     FillTreeEntry( pEntry );
+
+    SetPointer( PointerStyle::Arrow );
+    EnableChildPointerOverwrite( false );
 }
 
 void FolderTree::FillTreeEntry( SvTreeListEntry* pEntry )
commit a400c1dff01b3a0a7b113acd3ed758fee5b8175c
Author: Szymon Kłos <eszkadev at gmail.com>
Date:   Thu Jul 30 12:41:38 2015 +0200

    append '(Remote)' in the titlebar when remote file is opened
    
    Change-Id: Idf0a9594406601154319ae17e42ece4bf2d56dc9

diff --git a/framework/inc/classes/resource.hrc b/framework/inc/classes/resource.hrc
index 2b1ea1c..c7fc394 100644
--- a/framework/inc/classes/resource.hrc
+++ b/framework/inc/classes/resource.hrc
@@ -52,6 +52,7 @@
 #define STR_LANGSTATUS_HINT                     (RID_STR_START+25)
 #define STR_OPEN_REMOTE                         (RID_STR_START+26)
 #define STR_REMOTE_FILE                         (RID_STR_START+27)
+#define STR_REMOTE_TITLE                        (RID_STR_START+28)
 
 #define POPUPMENU_TOOLBAR_QUICKCUSTOMIZATION    (RID_MENU_START+0)
 
diff --git a/framework/source/classes/resource.src b/framework/source/classes/resource.src
index 44e0c70..570e288 100644
--- a/framework/source/classes/resource.src
+++ b/framework/source/classes/resource.src
@@ -124,6 +124,11 @@ String STR_REMOTE_FILE
     Text [ en-US ] = "Save Remote File...";
 };
 
+String STR_REMOTE_TITLE
+{
+    Text [ en-US ] = " (Remote)";
+};
+
 String STR_TOOLBAR_TITLE_ADDON
 {
     Text [ en-US ] = "Add-On %num%";
diff --git a/framework/source/fwe/helper/titlehelper.cxx b/framework/source/fwe/helper/titlehelper.cxx
index d8c44d3..64d547e 100644
--- a/framework/source/fwe/helper/titlehelper.cxx
+++ b/framework/source/fwe/helper/titlehelper.cxx
@@ -18,6 +18,8 @@
  */
 
 #include <framework/titlehelper.hxx>
+#include <classes/fwkresid.hxx>
+#include <classes/resource.hrc>
 #include <services.h>
 #include <properties.h>
 
@@ -409,6 +411,7 @@ void TitleHelper::impl_updateTitleForController (const css::uno::Reference< css:
         nLeasedNumber = xNumbers->leaseNumber (xOwner);
 
     css::uno::Reference< css::frame::XTitle > xModelTitle(xController->getModel (), css::uno::UNO_QUERY);
+    css::uno::Reference< css::frame::XModel > xModel(xController->getModel (), css::uno::UNO_QUERY);
     if (!xModelTitle.is ())
         xModelTitle.set(xController, css::uno::UNO_QUERY);
     if (xModelTitle.is ())
@@ -419,6 +422,16 @@ void TitleHelper::impl_updateTitleForController (const css::uno::Reference< css:
             sTitle.appendAscii (" : ");
             sTitle.append      ((::sal_Int32)nLeasedNumber);
         }
+        if (xModel.is ())
+        {
+            INetURLObject aURL (xModel->getURL ());
+            if (aURL.GetProtocol () != INetProtocol::File
+                && aURL.GetProtocol () != INetProtocol::NotValid)
+            {
+                OUString sRemoteText (FwkResId (STR_REMOTE_TITLE));
+                sTitle.append (sRemoteText);
+            }
+        }
     }
     else
     {
commit c947021fad48bcfcd8e49852f49a6018a9d1be53
Author: Szymon Kłos <eszkadev at gmail.com>
Date:   Wed Jul 29 14:13:58 2015 +0200

    save mode improvements
    
    Change-Id: I14953eafb3fbd840df5f9c890b55855e14a1fd9a

diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx
index 5a32d76..cdb38ec 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -757,8 +757,11 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, SelectHdl )
             }
             else
             {
-                m_sPath.clear();
-                m_pName_ed->SetText( "" );
+                if( m_eMode == REMOTEDLG_MODE_OPEN )
+                {
+                    m_sPath.clear();
+                    m_pName_ed->SetText( "" );
+                }
             }
 
             EnableControls();
@@ -883,24 +886,10 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, OkHdl )
 
     bool bExists = false;
 
-    Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
-    Reference< XInteractionHandler > xInteractionHandler(
-                    InteractionHandler::createWithParent( xContext, 0 ), UNO_QUERY_THROW );
-    Reference< XCommandEnvironment > xEnv = new ::ucbhelper::CommandEnvironment(
-                    xInteractionHandler, Reference< XProgressHandler >() );
-    ::ucbhelper::Content m_aContent( m_sPath, xEnv, xContext );
-
-    try
-    {
-        if( bFileDlg )
-            bExists = m_aContent.isDocument();
-        else
-            bExists = m_aContent.isFolder();
-    }
-    catch( const Exception& )
-    {
-        bExists = false;
-    }
+    if( bFileDlg )
+        bExists = ContentIsDocument(m_sPath);
+    else
+        bExists = ContentIsFolder(m_sPath);
 
     if ( bExists )
     {
@@ -917,6 +906,8 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, OkHdl )
     {
         if( m_eMode == REMOTEDLG_MODE_OPEN )
             return 0;
+        if( m_eMode == REMOTEDLG_MODE_SAVE && ContentIsFolder(m_sPath) )
+            return 0;
     }
 
     EndDialog( RET_OK );
@@ -1157,7 +1148,25 @@ bool RemoteFilesDialog::ContentIsFolder( const OUString& rURL )
     return false;
 }
 
+bool RemoteFilesDialog::ContentIsDocument( const OUString& rURL )
+{
+    try
+    {
+        Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
+        Reference< XInteractionHandler > xInteractionHandler(
+                        InteractionHandler::createWithParent( xContext, 0 ), UNO_QUERY_THROW );
+        Reference< XCommandEnvironment > xEnv = new ::ucbhelper::CommandEnvironment( xInteractionHandler, Reference< XProgressHandler >() );
+        ::ucbhelper::Content aContent( rURL, xEnv, xContext );
+
+        return aContent.isDocument();
+    }
+    catch( const Exception& )
+    {
+        // a content doesn't exist
+    }
 
+    return false;
+}
 
 sal_Int32 RemoteFilesDialog::getTargetColorDepth()
 {
diff --git a/fpicker/source/office/RemoteFilesDialog.hxx b/fpicker/source/office/RemoteFilesDialog.hxx
index 5e45873..2bb7c35 100644
--- a/fpicker/source/office/RemoteFilesDialog.hxx
+++ b/fpicker/source/office/RemoteFilesDialog.hxx
@@ -80,6 +80,7 @@ public:
     virtual const OUString& GetPath() SAL_OVERRIDE;
     virtual std::vector<OUString> GetPathList() const SAL_OVERRIDE;
     virtual bool ContentIsFolder( const OUString& rURL ) SAL_OVERRIDE;
+    virtual bool ContentIsDocument( const OUString& rURL );
 
     virtual OUString getCurrentFileText() const SAL_OVERRIDE;
     virtual void setCurrentFileText( const OUString& rText, bool bSelectAll = false ) SAL_OVERRIDE;
commit 03c24edf1e40ddf73eb9c8f3b5c03e3ee031a698
Author: Szymon Kłos <eszkadev at gmail.com>
Date:   Wed Jul 29 12:42:12 2015 +0200

    set no selection when user aborted auth
    
    Change-Id: I15c865306948d4fe321b188324ad298fee322a6a

diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx
index 6078db4..5a32d76 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -336,6 +336,10 @@ short RemoteFilesDialog::Execute()
         Show();
         SelectServiceHdl( NULL );
     }
+    if( !m_bIsConnected )
+    {
+        m_pServices_lb->SetNoSelection();
+    }
 
     short nRet = SvtFileDialog_Base::Execute();
 
commit 8adc26210de8b4e2642821e8d7be878a1937c271
Author: Szymon Kłos <eszkadev at gmail.com>
Date:   Wed Jul 29 11:09:44 2015 +0200

    path must contain user name
    
    Change-Id: Ic8c98e724645d49fd9c6da796f9e060aa784246f

diff --git a/svtools/source/control/breadcrumb.cxx b/svtools/source/control/breadcrumb.cxx
index 5ae725d..53e1780 100644
--- a/svtools/source/control/breadcrumb.cxx
+++ b/svtools/source/control/breadcrumb.cxx
@@ -74,8 +74,12 @@ void Breadcrumb::SetURL( const OUString& rURL )
     INetURLObject aURL( rURL );
     aURL.setFinalSlash();
 
+    OUString sUser = aURL.GetUser( INetURLObject::NO_DECODE );
     OUString sPath = aURL.GetURLPath(INetURLObject::DECODE_WITH_CHARSET);
-    OUString sRootPath = INetURLObject::GetScheme( aURL.GetProtocol() ) + aURL.GetHost();
+    OUString sRootPath = INetURLObject::GetScheme( aURL.GetProtocol() )
+                        + sUser
+                        + ( sUser.isEmpty() ? OUString() : "@" )
+                        + aURL.GetHost();
 
     int nSegments = aURL.getSegmentCount();
     unsigned int nPos = 0;
commit 4f90829b880d23f97777358462b4b4376cc2ef3a
Author: Szymon Kłos <eszkadev at gmail.com>
Date:   Wed Jul 29 10:18:20 2015 +0200

    CMIS: remember new session for each user
    
    Change-Id: I7d0a72e48b8f9056e8761cae8939e2b8f6dbdd24

diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx
index 3ee3518..d23ce6e 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -339,7 +339,7 @@ namespace cmis
         // Look for a cached session, key is binding url + repo id
         OUString sSessionId = m_aURL.getBindingUrl( ) + m_aURL.getRepositoryId( );
         if ( NULL == m_pSession )
-            m_pSession = m_pProvider->getSession( sSessionId );
+            m_pSession = m_pProvider->getSession( sSessionId, m_aURL.getUsername( ) );
 
         if ( NULL == m_pSession )
         {
@@ -411,7 +411,7 @@ namespace cmis
                 }
                 else
                 {
-                    m_pProvider->registerSession(sSessionId, m_pSession);
+                    m_pProvider->registerSession(sSessionId, m_aURL.getUsername( ), m_pSession);
                 }
             }
             else
@@ -2019,14 +2019,20 @@ namespace cmis
                 {
                     // TODO Cache the objects
 
+                    INetURLObject aURL( m_sURL );
+                    OUString sUser = aURL.GetUser( INetURLObject::NO_DECODE );
+
                     URL aUrl( m_sURL );
                     OUString sPath( m_sObjectPath );
                     if ( !sPath.endsWith("/") )
                         sPath += "/";
                     sPath += STD_TO_OUSTR( ( *it )->getName( ) );
                     OUString sId = STD_TO_OUSTR( ( *it )->getId( ) );
+
                     aUrl.setObjectId( sId );
                     aUrl.setObjectPath( sPath );
+                    aUrl.setUsername( sUser );
+
                     uno::Reference< ucb::XContentIdentifier > xId = new ucbhelper::ContentIdentifier( aUrl.asString( ) );
                     uno::Reference< ucb::XContent > xContent = new Content( m_xContext, m_pProvider, xId, *it );
 
diff --git a/ucb/source/ucp/cmis/cmis_provider.cxx b/ucb/source/ucp/cmis/cmis_provider.cxx
index a41b52c..c9819b5 100644
--- a/ucb/source/ucp/cmis/cmis_provider.cxx
+++ b/ucb/source/ucp/cmis/cmis_provider.cxx
@@ -59,10 +59,11 @@ ContentProvider::queryContent(
     return xContent;
 }
 
-libcmis::Session* ContentProvider::getSession( const OUString& sBindingUrl )
+libcmis::Session* ContentProvider::getSession( const OUString& sBindingUrl, const OUString& sUsername )
 {
     libcmis::Session* pSession = NULL;
-    std::map< OUString, libcmis::Session* >::iterator it = m_aSessionCache.find( sBindingUrl );
+    std::map< std::pair< OUString, OUString >, libcmis::Session* >::iterator it
+            = m_aSessionCache.find( std::pair< OUString, OUString >( sBindingUrl, sUsername ) );
     if ( it != m_aSessionCache.end( ) )
     {
         pSession = it->second;
@@ -70,9 +71,13 @@ libcmis::Session* ContentProvider::getSession( const OUString& sBindingUrl )
     return pSession;
 }
 
-void ContentProvider::registerSession( const OUString& sBindingUrl, libcmis::Session* pSession )
+void ContentProvider::registerSession( const OUString& sBindingUrl, const OUString& sUsername, libcmis::Session* pSession )
 {
-    m_aSessionCache.insert( std::pair< OUString, libcmis::Session* >( sBindingUrl, pSession ) );
+    m_aSessionCache.insert( std::pair< std::pair< OUString, OUString >, libcmis::Session* >
+                            (
+                                std::pair< OUString, OUString >( sBindingUrl, sUsername ),
+                                pSession
+                            ) );
 }
 
 ContentProvider::ContentProvider(
diff --git a/ucb/source/ucp/cmis/cmis_provider.hxx b/ucb/source/ucp/cmis/cmis_provider.hxx
index efbd439..1dcad0a 100644
--- a/ucb/source/ucp/cmis/cmis_provider.hxx
+++ b/ucb/source/ucp/cmis/cmis_provider.hxx
@@ -20,7 +20,7 @@ namespace cmis
 class ContentProvider : public ::ucbhelper::ContentProviderImplHelper
 {
 private:
-    std::map< OUString, libcmis::Session* > m_aSessionCache;
+    std::map< std::pair< OUString, OUString >, libcmis::Session* > m_aSessionCache;
 
 public:
     explicit ContentProvider( const ::com::sun::star::uno::Reference<
@@ -64,8 +64,8 @@ public:
         throw( ::com::sun::star::ucb::IllegalIdentifierException,
                ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
 
-    libcmis::Session* getSession( const OUString& sBindingUrl );
-    void registerSession( const OUString& sBindingUrl, libcmis::Session* pSession );
+    libcmis::Session* getSession( const OUString& sBindingUrl, const OUString& sUsername );
+    void registerSession( const OUString& sBindingUrl, const OUString& sUsername, libcmis::Session* pSession );
 };
 
 }
diff --git a/ucb/source/ucp/cmis/cmis_url.cxx b/ucb/source/ucp/cmis/cmis_url.cxx
index ff0763c..533ebf2 100644
--- a/ucb/source/ucp/cmis/cmis_url.cxx
+++ b/ucb/source/ucp/cmis/cmis_url.cxx
@@ -53,6 +53,11 @@ namespace cmis
         m_sId = sId;
     }
 
+    void URL::setUsername( const OUString& sUser )
+    {
+        m_sUser = sUser;
+    }
+
     OUString URL::asString( )
     {
         OUString sUrl;
@@ -61,7 +66,9 @@ namespace cmis
                 rtl_UriCharClassRelSegment,
                 rtl_UriEncodeKeepEscapes,
                 RTL_TEXTENCODING_UTF8 );
-        sUrl = "vnd.libreoffice.cmis://" + sEncodedBinding;
+        sUrl = "vnd.libreoffice.cmis://" +
+                ( m_sUser.isEmpty() ? OUString( ) : (m_sUser + "@") ) +
+                sEncodedBinding;
 
         if ( !m_sPath.isEmpty( ) )
         {
diff --git a/ucb/source/ucp/cmis/cmis_url.hxx b/ucb/source/ucp/cmis/cmis_url.hxx
index 14a32c00..c09b509 100644
--- a/ucb/source/ucp/cmis/cmis_url.hxx
+++ b/ucb/source/ucp/cmis/cmis_url.hxx
@@ -38,6 +38,7 @@ namespace cmis
             const OUString& getPassword() const { return m_sPass; }
             void setObjectPath( const OUString& sPath );
             void setObjectId( const OUString& sId );
+            void setUsername( const OUString& sUser );
 
             OUString asString( );
     };
commit b8ebc0f24653e1f54cadf5755a65e94d807f4e84
Author: Szymon Kłos <eszkadev at gmail.com>
Date:   Tue Jul 28 10:30:58 2015 +0200

    reuse data from SvtFileView in the FolderTree
    
    Change-Id: I5a830459e7d5d9c71b7997b9014dde048b317d81

diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx
index 5681efd..6078db4 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -1078,8 +1078,6 @@ void RemoteFilesDialog::UpdateControls( const OUString& rURL )
         OUString* sData = new OUString( rURL );
         pRoot->SetUserData( static_cast< void* >( sData ) );
 
-        m_pTreeView->Expand( pRoot );
-
         m_pName_ed->GrabFocus();
 
         m_sLastServiceUrl = sURL;
@@ -1088,8 +1086,13 @@ void RemoteFilesDialog::UpdateControls( const OUString& rURL )
     }
 
     m_pPath->SetURL( rURL );
+
     m_pTreeView->SetSelectHdl( Link<>() );
-    m_pTreeView->SetTreePath( rURL );
+
+    // read cached data for this url and fill the tree
+    const ::std::vector< std::pair< OUString, OUString > >& rFolders = m_pFileView->GetSubFolders();
+    m_pTreeView->FillTreeEntry( rURL, rFolders );
+
     m_pTreeView->SetSelectHdl( LINK( this, RemoteFilesDialog, TreeSelectHdl ) );
 
     m_bIsConnected = true;
diff --git a/include/svtools/fileview.hxx b/include/svtools/fileview.hxx
index 6bb6415..6946975 100644
--- a/include/svtools/fileview.hxx
+++ b/include/svtools/fileview.hxx
@@ -173,6 +173,8 @@ public:
 
     void                    EndInplaceEditing( bool _bCancel );
 
+    ::std::vector< std::pair< OUString, OUString > > GetSubFolders();
+
 protected:
     virtual void            StateChanged( StateChangedType nStateChange ) SAL_OVERRIDE;
 };
diff --git a/include/svtools/foldertree.hxx b/include/svtools/foldertree.hxx
index 4be22b9..ccf0382 100644
--- a/include/svtools/foldertree.hxx
+++ b/include/svtools/foldertree.hxx
@@ -42,12 +42,15 @@ private:
     Image m_aFolderImage;
     Image m_aFolderExpandedImage;
 
+    OUString m_sLastUpdatedDir;
+
 public:
     FolderTree( vcl::Window* pParent, WinBits nBits );
 
     virtual void RequestingChildren( SvTreeListEntry* pEntry ) SAL_OVERRIDE;
 
     void FillTreeEntry( SvTreeListEntry* pEntry );
+    void FillTreeEntry( const OUString & rUrl, const ::std::vector< std::pair< OUString, OUString > >& rFolders );
     void SetTreePath( OUString const & sUrl );
     void SetBlackList( const ::com::sun::star::uno::Sequence< OUString >& rBlackList );
 };
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index 38fa3c4..08874fc 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -1387,6 +1387,21 @@ OUString SvtFileView::GetConfigString() const
     return sRet;
 }
 
+::std::vector< std::pair< OUString, OUString > > SvtFileView::GetSubFolders()
+{
+    ::std::vector< std::pair< OUString, OUString > > aContent;
+
+    for( ::std::vector< SortingData_Impl* >::size_type i = 0; i < mpImp->maContent.size(); i++ )
+    {
+        if( mpImp->maContent[i]->mbIsFolder )
+        {
+            std::pair< OUString, OUString > aEntry( mpImp->maContent[i]->GetTitle(), mpImp->maContent[i]->maTargetURL );
+            aContent.push_back( aEntry );
+        }
+    }
+
+    return aContent;
+}
 
 void SvtFileView::SetConfigString( const OUString& rCfgStr )
 {
diff --git a/svtools/source/contnr/foldertree.cxx b/svtools/source/contnr/foldertree.cxx
index 7131340..f783a5b 100644
--- a/svtools/source/contnr/foldertree.cxx
+++ b/svtools/source/contnr/foldertree.cxx
@@ -34,21 +34,21 @@ void FolderTree::FillTreeEntry( SvTreeListEntry* pEntry )
 {
     if( pEntry )
     {
-        while (SvTreeListEntry* pChild = FirstChild(pEntry))
-        {
-            GetModel()->Remove(pChild);
-        }
+        OUString* pURL = static_cast< OUString* >( pEntry->GetUserData() );
 
-        ::std::vector< SortingData_Impl* > aContent;
+        if( pURL && m_sLastUpdatedDir != *pURL )
+        {
+            while (SvTreeListEntry* pChild = FirstChild(pEntry))
+            {
+                GetModel()->Remove(pChild);
+            }
 
-        ::rtl::Reference< ::svt::FileViewContentEnumerator >
-            xContentEnumerator(new FileViewContentEnumerator(
-            m_xEnv, aContent, m_aMutex, NULL));
+            ::std::vector< SortingData_Impl* > aContent;
 
-        OUString* pURL = static_cast< OUString* >( pEntry->GetUserData() );
+            ::rtl::Reference< ::svt::FileViewContentEnumerator >
+                xContentEnumerator(new FileViewContentEnumerator(
+                m_xEnv, aContent, m_aMutex, NULL));
 
-        if( pURL )
-        {
             FolderDescriptor aFolder( *pURL );
 
             EnumerationResult eResult =
@@ -69,6 +69,38 @@ void FolderTree::FillTreeEntry( SvTreeListEntry* pEntry )
             }
         }
     }
+    else
+    {
+        // this dir was updated recently
+        // next time read this remote folder
+        m_sLastUpdatedDir = "";
+    }
+}
+
+void FolderTree::FillTreeEntry( const OUString & rUrl, const ::std::vector< std::pair< OUString, OUString > >& rFolders )
+{
+    SetTreePath( rUrl );
+
+    SvTreeListEntry* pParent = GetCurEntry();
+
+    if( pParent && !IsExpanded( pParent ) )
+    {
+        while( GetChildCount( pParent ) > 0 )
+        {
+            SvTreeListEntry* pChild = FirstChild( pParent );
+            GetModel()->Remove( pChild );
+        }
+
+        for(::std::vector< std::pair< OUString, OUString > >::const_iterator it = rFolders.begin(); it != rFolders.end() ; ++it)
+        {
+            SvTreeListEntry* pNewEntry = InsertEntry( it->first, pParent, true  );
+            OUString* sData = new OUString( it->second );
+            pNewEntry->SetUserData( static_cast< void* >( sData ) );
+        }
+
+        m_sLastUpdatedDir = rUrl;
+        Expand( pParent );
+    }
 }
 
 void FolderTree::SetTreePath( OUString const & sUrl )
commit 6f98a0ab51cc5c860576b4ad44478b438cc5a5eb
Author: Thomas Klausner <wiz at NetBSD.org>
Date:   Fri Aug 7 18:24:45 2015 +0200

    Translate remaining German comments to English.
    
    Change-Id: I0b6b60bd4fa921993388340b8c16c533ba9f257f

diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx
index cc2d0f6..cd101bd 100644
--- a/sw/source/filter/ww8/ww8scan.hxx
+++ b/sw/source/filter/ww8/ww8scan.hxx
@@ -173,21 +173,21 @@ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, sal_uInt32 nStart, sal_Int32 nLen
 
 struct WW8FieldDesc
 {
-    long nLen;              ///< Gesamtlaenge ( zum Text ueberlesen )
-    WW8_CP nSCode;          ///< Anfang Befehlscode
-    WW8_CP nLCode;          ///< Laenge
-    WW8_CP nSRes;           ///< Anfang Ergebnis
-    WW8_CP nLRes;           ///< Laenge ( == 0, falls kein Ergebnis )
-    sal_uInt16 nId;             ///< WW-Id fuer Felder
-    sal_uInt8 nOpt;              ///< WW-Flags ( z.B.: vom User geaendert )
-    bool bCodeNest:1;       ///< Befehl rekursiv verwendet
-    bool bResNest:1;        ///< Befehl in Resultat eingefuegt
+    long nLen;              ///< total length (to skip over text)
+    WW8_CP nSCode;          ///< start of instructions code
+    WW8_CP nLCode;          ///< length
+    WW8_CP nSRes;           ///< start of result
+    WW8_CP nLRes;           ///< length ( == 0, if no result )
+    sal_uInt16 nId;             ///< WW-id for fields
+    sal_uInt8 nOpt;              ///< WW-Flags ( e.g.: changed by user )
+    bool bCodeNest:1;       ///< instruction used recursively
+    bool bResNest:1;        ///< instruction inserted into result
 };
 
 struct WW8PLCFxSave1
 {
     sal_uLong nPLCFxPos;
-    sal_uLong nPLCFxPos2;       ///< fuer PLCF_Cp_Fkp: PieceIter-Pos
+    sal_uLong nPLCFxPos2;       ///< for PLCF_Cp_Fkp: PieceIter-Pos
     long nPLCFxMemOfs;
     WW8_CP nStartCp;        ///< for cp based iterator like PAP and CHP
     long nCpOfs;
@@ -198,16 +198,16 @@ struct WW8PLCFxSave1
 };
 
 /**
-    u.a. fuer Felder, also genausoviele Attr wie Positionen,
-    falls Ctor-Param bNoEnd = false
+    among others for fields, that is, the same number of attr as positions,
+    if Ctor-Param bNoEnd = false
 */
-class WW8PLCFspecial        // Iterator fuer PLCFs
+class WW8PLCFspecial        // iterator for PLCFs
 {
 private:
-    sal_Int32* pPLCF_PosArray;  ///< Pointer auf Pos-Array und auf ganze Struktur
-    sal_uInt8*  pPLCF_Contents;  ///< Pointer auf Inhalts-Array-Teil des Pos-Array
-    long nIMax;             ///< Anzahl der Elemente
-    long nIdx;              ///< Merker, wo wir gerade sind
+    sal_Int32* pPLCF_PosArray;  ///< pointer to Pos-array and to the whole structure
+    sal_uInt8*  pPLCF_Contents;  ///< pointer to content-array-part of Pos-array
+    long nIMax;             ///< number of elements
+    long nIdx;              ///< marker where we currently are
     sal_uInt32 nStru;
 
 public:
@@ -217,8 +217,8 @@ public:
     long GetIdx() const { return nIdx; }
     void SetIdx( long nI ) { nIdx = nI; }
     long GetIMax() const { return nIMax; }
-    bool SeekPos(long nPos);            // geht ueber FC- bzw. CP-Wert
-                                        // bzw. naechste groesseren Wert
+    bool SeekPos(long nPos);            // walks over FC- or CP-value
+                                        // resp. next biggest value
     bool SeekPosExact(long nPos);
     sal_Int32 Where() const
         { return ( nIdx >= nIMax ) ? SAL_MAX_INT32 : pPLCF_PosArray[nIdx]; }
@@ -271,21 +271,21 @@ private:
     WW8SprmIter& operator=(const WW8SprmIter&) SAL_DELETED_FUNCTION;
 };
 
-/* u.a. fuer FKPs auf normale Attr., also ein Attr weniger als Positionen */
-class WW8PLCF                       // Iterator fuer PLCFs
+/* among others for FKPs to normal attr., i.e. one less attr than positions */
+class WW8PLCF                       // Iterator for PLCFs
 {
 private:
-    WW8_CP* pPLCF_PosArray; // Pointer auf Pos-Array und auf ganze Struktur
-    sal_uInt8* pPLCF_Contents;   // Pointer auf Inhalts-Array-Teil des Pos-Array
-    sal_Int32 nIMax;            // Anzahl der Elemente
+    WW8_CP* pPLCF_PosArray; // pointer to Pos-array and the whole structure
+    sal_uInt8* pPLCF_Contents;   // pointer to content-array-part of Pos-array
+    sal_Int32 nIMax;            // number of elements
     sal_Int32 nIdx;
     int nStru;
 
     void ReadPLCF(SvStream& rSt, WW8_FC nFilePos, sal_uInt32 nPLCF);
 
     /*
-        Falls im Dok ein PLC fehlt und die FKPs solo dastehen,
-        machen wir uns hiermit einen PLC:
+        If a PLC is missing in the doc and the FKPs stand alone,
+        we create a PLC with this:
     */
     void GeneratePLCF(SvStream& rSt, sal_Int32 nPN, sal_Int32 ncpN);
 
@@ -296,7 +296,7 @@ public:
         WW8_CP nStartPos = -1);
 
     /*
-        folgender Ctor generiert ggfs. einen PLC aus nPN und ncpN
+        the following ctor generates a PLC from nPN and ncpN, if necessary
     */
     WW8PLCF(SvStream& rSt, WW8_FC nFilePos, sal_Int32 nPLCF, int nStruct,
         WW8_CP nStartPos, sal_Int32 nPN, sal_Int32 ncpN);
@@ -322,8 +322,8 @@ class WW8PLCFpcd
 {
     friend class WW8PLCFpcd_Iter;
 
-    sal_Int32* pPLCF_PosArray;  // Pointer auf Pos-Array und auf ganze Struktur
-    sal_uInt8*  pPLCF_Contents;  // Pointer auf Inhalts-Array-Teil des Pos-Array
+    sal_Int32* pPLCF_PosArray;  // pointer to Pos-array and the whole structure
+    sal_uInt8*  pPLCF_Contents;  // pointer to content-array-part of Pos-array
     long nIMax;
     sal_uInt32 nStru;
 
@@ -333,7 +333,7 @@ public:
     ~WW8PLCFpcd(){ delete[] pPLCF_PosArray; }
 };
 
-/* mehrere WW8PLCFpcd_Iter koennen auf die gleiche WW8PLCFpcd zeigen !!!  */
+/* multiple WW8PLCFpcd_Iter may point to the same WW8PLCFpcd !!!  */
 class WW8PLCFpcd_Iter
 {
 private:
@@ -358,7 +358,7 @@ public:
     }
 };
 
-// PLCF-Typ:
+// PLCF-type:
 enum ePLCFT{ CHP=0, PAP, SEP, /*HED, FNR, ENR,*/ PLCF_END };
 
 //Its hardcoded that eFTN be the first one: A very poor hack, needs to be fixed
@@ -367,11 +367,11 @@ enum eExtSprm { eFTN = 256, eEDN = 257, eFLD = 258, eBKN = 259, eAND = 260, eATN
 /*
     pure virtual:
 */
-class WW8PLCFx              // virtueller Iterator fuer Piece Table Exceptions
+class WW8PLCFx              // virtual iterator for Piece Table Exceptions
 {
 private:
     ww::WordVersion meVer;  // Version number of FIB
-    bool bIsSprm;           // PLCF von Sprms oder von anderem ( Footnote, ... )
+    bool bIsSprm;           // PLCF of Sprms or other stuff ( Footnote, ... )
     WW8_FC nStartFc;
     bool bDirty;
 
@@ -412,10 +412,10 @@ class WW8PLCFx_PCDAttrs : public WW8PLCFx
 private:
     WW8PLCFpcd_Iter* pPcdI;
     WW8PLCFx_PCD* pPcd;
-    sal_uInt8** const pGrpprls;      // Attribute an Piece-Table
+    sal_uInt8** const pGrpprls;      // attribute of Piece-table
     SVBT32 aShortSprm;          // mini storage: can contain ONE sprm with
                                 // 1 byte param
-    sal_uInt16 nGrpprls;            // Attribut Anzahl davon
+    sal_uInt16 nGrpprls;            // attribute count of this
 
     WW8PLCFx_PCDAttrs(const WW8PLCFx_PCDAttrs&) SAL_DELETED_FUNCTION;
     WW8PLCFx_PCDAttrs& operator=(const WW8PLCFx_PCDAttrs&) SAL_DELETED_FUNCTION;
@@ -433,7 +433,7 @@ public:
     WW8PLCFpcd_Iter* GetIter() const { return pPcdI; }
 };
 
-class WW8PLCFx_PCD : public WW8PLCFx            // Iterator fuer Piece Table
+class WW8PLCFx_PCD : public WW8PLCFx            // iterator for Piece table
 {
 private:
     WW8PLCFpcd_Iter* pPcdI;
@@ -500,13 +500,13 @@ public:
         sal_uInt8 maRawData[512];
         std::vector<Entry> maEntries;
 
-        long nItemSize;     // entweder 1 Byte oder ein komplettes BX
+        long nItemSize;     // either 1 Byte or a complete BX
 
         // Offset in Stream where last read of 52 bytes took place
         long nFilePos;
-        sal_uInt8 mnIdx;         // Pos-Merker
+        sal_uInt8 mnIdx;         // Pos marker
         ePLCFT ePLCF;
-        sal_uInt8 mnIMax;         // Anzahl der Eintraege
+        sal_uInt8 mnIMax;         // number of entries
 
         wwSprmParser maSprmParser;
 
@@ -535,13 +535,13 @@ public:
         sal_uInt16 GetIstd() const { return maEntries[mnIdx].mnIStd; }
 
         /*
-            liefert einen echten Pointer auf das Sprm vom Typ nId,
-            falls ein solches im Fkp drin ist.
+            returns a real pointer to the Sprm of type nId,
+            if such a thing is in the Fkp.
         */
         sal_uInt8* GetLenAndIStdAndSprms(sal_Int32& rLen) const;
 
         /*
-            ruft GetLenAndIStdAndSprms() auf...
+            calls GetLenAndIStdAndSprms()...
         */
         const sal_uInt8* HasSprm( sal_uInt16 nId );
         bool HasSprm(sal_uInt16 nId, std::vector<const sal_uInt8 *> &rResult);
@@ -550,8 +550,8 @@ public:
     };
 
 private:
-    SvStream* pFKPStrm;         // Input-File
-    SvStream* pDataStrm;        // Input-File
+    SvStream* pFKPStrm;         // input file
+    SvStream* pDataStrm;        // input file
     WW8PLCF* pPLCF;
     WW8Fkp* pFkp;
 
@@ -597,7 +597,7 @@ public:
     bool HasFkp() const { return (0 != pFkp); }
 };
 
-/// Iterator fuer Piece Table Exceptions of Fkps arbeitet auf CPs (High-Level)
+/// iterator for Piece Table Exceptions of Fkps works on CPs (high-level)
 class WW8PLCFx_Cp_FKP : public WW8PLCFx_Fc_FKP
 {
 private:
@@ -661,7 +661,7 @@ public:
                     sal_uInt8*& p1,   sal_uInt8*& p2,   sal_uInt8*& p3,   sal_uInt8*& p4 ) const;
 };
 

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list