From 58fdb89bc384019e4eaf181a956fe4ca7ed5dd07 Mon Sep 17 00:00:00 2001 From: Cédric Bosdonnat Date: Mon, 17 Dec 2012 21:00:50 +0100 Subject: File picker: add Path field for CMIS like other protocols Change-Id: I9745831da13646d351858f221b1367374ebf737f --- svtools/inc/svtools/ServerDetailsControls.hxx | 1 + svtools/source/dialogs/ServerDetailsControls.cxx | 7 +- svtools/uiconfig/ui/placeedit.ui | 194 +++++++++++++---------- 3 files changed, 118 insertions(+), 84 deletions(-) (limited to 'svtools') diff --git a/svtools/inc/svtools/ServerDetailsControls.hxx b/svtools/inc/svtools/ServerDetailsControls.hxx index c6ab63f36637..1dfc05110b1e 100644 --- a/svtools/inc/svtools/ServerDetailsControls.hxx +++ b/svtools/inc/svtools/ServerDetailsControls.hxx @@ -143,6 +143,7 @@ class CmisDetailsContainer : public DetailsContainer ListBox* m_pLBRepository; Button* m_pBTRepoRefresh; ListBox* m_pLBServerType; + Edit* m_pEDPath; public: CmisDetailsContainer( VclBuilderContainer* pBuilder ); diff --git a/svtools/source/dialogs/ServerDetailsControls.cxx b/svtools/source/dialogs/ServerDetailsControls.cxx index 88f57e67ce8c..8b10c1038b23 100644 --- a/svtools/source/dialogs/ServerDetailsControls.cxx +++ b/svtools/source/dialogs/ServerDetailsControls.cxx @@ -293,6 +293,9 @@ CmisDetailsContainer::CmisDetailsContainer( VclBuilderContainer* pBuilder ) : pBuilder->get( m_pBTRepoRefresh, "repositoriesRefresh" ); m_pBTRepoRefresh->SetClickHdl( LINK( this, CmisDetailsContainer, RefreshReposHdl ) ); + pBuilder->get( m_pEDPath, "cmisPath" ); + m_pEDPath->SetModifyHdl( LINK( this, DetailsContainer, ValueChangeHdl ) ); + show( false ); // Load the ServerType entries @@ -308,6 +311,7 @@ CmisDetailsContainer::CmisDetailsContainer( VclBuilderContainer* pBuilder ) : INetURLObject CmisDetailsContainer::getUrl( ) { rtl::OUString sBindingUrl = rtl::OUString( m_pEDBinding->GetText() ).trim( ); + rtl::OUString sPath = rtl::OUString( m_pEDPath->GetText() ).trim( ); rtl::OUString sUrl; if ( !sBindingUrl.isEmpty( ) && !m_sRepoId.isEmpty() ) @@ -319,6 +323,7 @@ INetURLObject CmisDetailsContainer::getUrl( ) RTL_TEXTENCODING_UTF8 ); sUrl = "vnd.libreoffice.cmis://" + sEncodedBinding; } + sUrl += sPath; return INetURLObject( sUrl ); } @@ -338,8 +343,8 @@ bool CmisDetailsContainer::setUrl( const INetURLObject& rUrl ) sRepositoryId = aHostUrl.GetMark( ); m_pEDBinding->SetText( sBindingUrl ); + m_pEDPath->SetText( rUrl.GetURLPath() ); } - return bSuccess; } diff --git a/svtools/uiconfig/ui/placeedit.ui b/svtools/uiconfig/ui/placeedit.ui index 285b0234e6df..36dd3fab7387 100644 --- a/svtools/uiconfig/ui/placeedit.ui +++ b/svtools/uiconfig/ui/placeedit.ui @@ -250,128 +250,102 @@ - + True False 0 none - + True False 12 - + True False 6 6 - + True False start - Binding URL + Host 0 - 1 + 0 1 1 - + True False start - Repository + Share 0 - 2 + 1 1 1 - + True - True - True - + False + start + Path - 1 - 1 + 0 + 2 1 1 - + True - False - 6 - - - True - False - True - - - 0 - 0 - 1 - 1 - - - - - False - True - True - True - False - image1 - - - 1 - 0 - 1 - 1 - - + True + True + 1 - 2 + 0 1 1 - + True - False - start - Server Type + True + True + - 0 - 0 + 1 + 1 1 1 - + True - False + True + True + 1 - 0 + 2 1 1 @@ -381,7 +355,7 @@ - + True False Server Details @@ -398,70 +372,124 @@ - + True False 0 none - + True False 12 - + True False 6 6 - + True False start - Host + Binding URL 0 - 0 + 1 1 1 - + True False start - Share + Repository 0 + 2 + 1 + 1 + + + + + True + True + True + + + + 1 1 1 1 - + + True + False + 6 + + + True + False + True + + + 0 + 0 + 1 + 1 + + + + + False + True + True + True + False + image1 + + + 1 + 0 + 1 + 1 + + + + + 1 + 2 + 1 + 1 + + + + True False start - Path + Server Type 0 - 2 + 0 1 1 - + True - True - True - + False 1 @@ -471,29 +499,29 @@ - + True - True - True - + False + start + 0.49000000953674316 + Path - 1 - 1 + 0 + 3 1 1 - + True True - True 1 - 2 + 3 1 1 @@ -503,7 +531,7 @@ - + True False Server Details -- cgit