svtools/source/dialogs/PlaceEditDialog.cxx | 31 +++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-)
New commits: commit 5b0d03303f0a7ad5b6b6a7dcf4da943b62b4e4d5 Author: Szymon KÅos <eszka...@gmail.com> Date: Fri Jun 19 17:02:46 2015 +0200 The proper order of services in listbox Change-Id: Iacc1a53819e3865e23d6cb2ad241d578f30832a9 diff --git a/svtools/source/dialogs/PlaceEditDialog.cxx b/svtools/source/dialogs/PlaceEditDialog.cxx index a406935..26a7e8a 100644 --- a/svtools/source/dialogs/PlaceEditDialog.cxx +++ b/svtools/source/dialogs/PlaceEditDialog.cxx @@ -150,7 +150,7 @@ void PlaceEditDialog::InitDetails( ) !( sUrl.startsWith( ALFRESCO_CLOUD_BASE_URL ) && bSkipAlfresco ) && !( sUrl == ONEDRIVE_BASE_URL && bSkipOneDrive ) ) { - m_pLBServerType->InsertEntry( aTypesNamesList[i], i ); + nPos = m_pLBServerType->InsertEntry( aTypesNamesList[i], nPos ); std::shared_ptr<DetailsContainer> xCmisDetails(std::make_shared<CmisDetailsContainer>(this, sUrl)); xCmisDetails->setChangeHdl( LINK( this, PlaceEditDialog, EditHdl ) ); commit 27e3e2f87ada43a352f64df82ab3b6a234d8927b Author: Szymon KÅos <eszka...@gmail.com> Date: Fri Jun 19 15:06:58 2015 +0200 add service only if login was successful Change-Id: I0f326c3a7cc7cd8bd6d9c98b5ff2893ac47814ae diff --git a/svtools/source/dialogs/PlaceEditDialog.cxx b/svtools/source/dialogs/PlaceEditDialog.cxx index 12a5a49..a406935 100644 --- a/svtools/source/dialogs/PlaceEditDialog.cxx +++ b/svtools/source/dialogs/PlaceEditDialog.cxx @@ -185,23 +185,38 @@ void PlaceEditDialog::InitDetails( ) IMPL_LINK ( PlaceEditDialog, OKHdl, Button *, ) { - if (m_xCurrentDetails.get()) + if ( m_xCurrentDetails.get() ) { - OUString sUrl = m_xCurrentDetails->getUrl().GetHost(INetURLObject::DECODE_WITH_CHARSET); + OUString sUrl = m_xCurrentDetails->getUrl().GetHost( INetURLObject::DECODE_WITH_CHARSET ); OUString sGDriveHost( GDRIVE_BASE_URL ); OUString sAlfrescoHost( ALFRESCO_CLOUD_BASE_URL ); OUString sOneDriveHost( ONEDRIVE_BASE_URL ); - if( sUrl.compareTo(sGDriveHost, sGDriveHost.getLength()) == 0 - || sUrl.compareTo(sAlfrescoHost, sAlfrescoHost.getLength()) == 0 - || sUrl.compareTo(sOneDriveHost, sOneDriveHost.getLength()) == 0 ) + if ( sUrl.compareTo( sGDriveHost, sGDriveHost.getLength() ) == 0 + || sUrl.compareTo( sAlfrescoHost, sAlfrescoHost.getLength() ) == 0 + || sUrl.compareTo( sOneDriveHost, sOneDriveHost.getLength() ) == 0 ) { m_pBTRepoRefresh->Click(); + + sUrl = m_xCurrentDetails->getUrl().GetHost( INetURLObject::DECODE_WITH_CHARSET ); + INetURLObject aHostUrl( sUrl ); + OUString sRepoId = aHostUrl.GetMark(); + + if ( !sRepoId.isEmpty() ) + { + EndDialog( RET_OK ); + } + else + { + // TODO: repository id missing. Auth error? + } + } + else + { + EndDialog( RET_OK ); } } - EndDialog( RET_OK ); - return 1; }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits