2012-05-03 16:55:22 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
/*
|
|
|
|
* Version: MPL 1.1 / GPLv3+ / LGPLv3+
|
|
|
|
*
|
|
|
|
* The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
* the License or as specified alternatively below. You may obtain a copy of
|
|
|
|
* the License at http://www.mozilla.org/MPL/
|
|
|
|
*
|
|
|
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
* for the specific language governing rights and limitations under the
|
|
|
|
* License.
|
|
|
|
*
|
|
|
|
* Major Contributor(s):
|
|
|
|
* [ Copyright (C) 2012 SUSE <cbosdonnat@suse.com> (initial developer) ]
|
|
|
|
*
|
|
|
|
* All Rights Reserved.
|
|
|
|
*
|
|
|
|
* For minor contributions see the git repository.
|
|
|
|
*
|
|
|
|
* Alternatively, the contents of this file may be used under the terms of
|
|
|
|
* either the GNU General Public License Version 3 or later (the "GPLv3+"), or
|
|
|
|
* the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
|
|
|
|
* in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
|
|
|
|
* instead of those above.
|
|
|
|
*/
|
|
|
|
|
2012-07-11 11:37:25 +02:00
|
|
|
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
|
2012-10-02 15:03:12 +02:00
|
|
|
#include <com/sun/star/task/InteractionHandler.hpp>
|
2012-07-11 11:37:25 +02:00
|
|
|
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
|
|
|
|
#include <com/sun/star/ucb/XContentAccess.hpp>
|
|
|
|
#include <com/sun/star/sdbc/XResultSet.hpp>
|
|
|
|
#include <com/sun/star/sdbc/XRow.hpp>
|
|
|
|
|
2012-08-03 18:12:51 -04:30
|
|
|
#include <comphelper/processfactory.hxx>
|
2012-06-04 10:13:17 +02:00
|
|
|
#include <rtl/uri.hxx>
|
2012-07-11 11:37:25 +02:00
|
|
|
#include <ucbhelper/content.hxx>
|
|
|
|
#include <ucbhelper/commandenvironment.hxx>
|
2012-06-04 10:13:17 +02:00
|
|
|
|
2012-05-03 16:55:22 +02:00
|
|
|
#include "PlaceEditDialog.hxx"
|
|
|
|
#include "ServerDetailsControls.hxx"
|
|
|
|
|
|
|
|
using namespace std;
|
2012-07-11 11:37:25 +02:00
|
|
|
using namespace com::sun::star::lang;
|
|
|
|
using namespace com::sun::star::sdbc;
|
|
|
|
using namespace com::sun::star::task;
|
|
|
|
using namespace com::sun::star::ucb;
|
|
|
|
using namespace com::sun::star::uno;
|
2012-05-03 16:55:22 +02:00
|
|
|
|
2012-11-13 11:14:24 +01:00
|
|
|
DetailsContainer::DetailsContainer( VclBuilderContainer* pBuilder, const rtl::OString& rFrame )
|
2012-05-03 16:55:22 +02:00
|
|
|
{
|
2012-11-13 11:14:24 +01:00
|
|
|
pBuilder->get( m_pFrame, rFrame );
|
2012-05-03 16:55:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
DetailsContainer::~DetailsContainer( )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void DetailsContainer::show( bool bShow )
|
|
|
|
{
|
2012-11-13 11:14:24 +01:00
|
|
|
m_pFrame->Show( bShow );
|
2012-05-03 16:55:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
INetURLObject DetailsContainer::getUrl( )
|
|
|
|
{
|
|
|
|
// Don't use that class directly: make it smarter by subclassing it.
|
|
|
|
return INetURLObject( );
|
|
|
|
}
|
|
|
|
|
|
|
|
bool DetailsContainer::setUrl( const INetURLObject& )
|
|
|
|
{
|
|
|
|
// That class doesn't contain any logic... it defers the dirty work
|
|
|
|
// to the sub classes.
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
void DetailsContainer::notifyChange( )
|
|
|
|
{
|
|
|
|
m_aChangeHdl.Call( this );
|
|
|
|
}
|
|
|
|
|
|
|
|
IMPL_LINK( DetailsContainer, ValueChangeHdl, void *, EMPTYARG )
|
|
|
|
{
|
|
|
|
notifyChange( );
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2012-11-13 11:14:24 +01:00
|
|
|
HostDetailsContainer::HostDetailsContainer( VclBuilderContainer* pBuilder, sal_uInt16 nPort, rtl::OUString sScheme ) :
|
|
|
|
DetailsContainer( pBuilder, "HostDetails" ),
|
2012-05-03 16:55:22 +02:00
|
|
|
m_nDefaultPort( nPort ),
|
|
|
|
m_sScheme( sScheme )
|
|
|
|
{
|
2012-11-13 11:14:24 +01:00
|
|
|
pBuilder->get( m_pEDHost, "host" );
|
|
|
|
m_pEDHost->SetModifyHdl( LINK( this, DetailsContainer, ValueChangeHdl ) );
|
|
|
|
|
|
|
|
pBuilder->get( m_pEDPort, "port" );
|
|
|
|
m_pEDPort->SetModifyHdl( LINK( this, DetailsContainer, ValueChangeHdl ) );
|
|
|
|
|
|
|
|
pBuilder->get( m_pEDPath, "path" );
|
|
|
|
m_pEDPath->SetModifyHdl( LINK( this, DetailsContainer, ValueChangeHdl ) );
|
|
|
|
|
|
|
|
show( false );
|
2012-05-03 16:55:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void HostDetailsContainer::show( bool bShow )
|
|
|
|
{
|
|
|
|
DetailsContainer::show( bShow );
|
|
|
|
if ( bShow )
|
2012-11-13 11:14:24 +01:00
|
|
|
m_pEDPort->SetValue( m_nDefaultPort );
|
2012-05-03 16:55:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
INetURLObject HostDetailsContainer::getUrl( )
|
|
|
|
{
|
2012-11-13 11:14:24 +01:00
|
|
|
rtl::OUString sHost = rtl::OUString( m_pEDHost->GetText() ).trim( );
|
|
|
|
sal_Int64 nPort = m_pEDPort->GetValue();
|
|
|
|
rtl::OUString sPath = rtl::OUString( m_pEDPath->GetText() ).trim( );
|
2012-05-03 16:55:22 +02:00
|
|
|
|
|
|
|
rtl::OUString sUrl;
|
|
|
|
if ( !sHost.isEmpty( ) )
|
|
|
|
{
|
|
|
|
sUrl = m_sScheme + "://" + sHost;
|
|
|
|
if ( nPort != m_nDefaultPort )
|
|
|
|
sUrl += ":" + rtl::OUString::valueOf( nPort );
|
|
|
|
if ( !sPath.isEmpty( ) )
|
2012-07-12 22:10:17 +02:00
|
|
|
if ( sPath.indexOf( '/' ) != 0 )
|
2012-05-03 16:55:22 +02:00
|
|
|
sUrl += "/";
|
|
|
|
sUrl += sPath;
|
|
|
|
}
|
|
|
|
|
|
|
|
return INetURLObject( sUrl );
|
|
|
|
}
|
|
|
|
|
|
|
|
bool HostDetailsContainer::setUrl( const INetURLObject& rUrl )
|
|
|
|
{
|
|
|
|
bool bSuccess = false;
|
|
|
|
|
|
|
|
bSuccess = verifyScheme( INetURLObject::GetScheme( rUrl.GetProtocol( ) ) );
|
|
|
|
|
|
|
|
if ( bSuccess )
|
|
|
|
{
|
2012-11-13 11:14:24 +01:00
|
|
|
m_pEDHost->SetText( rUrl.GetHost( ) );
|
|
|
|
m_pEDPort->SetValue( rUrl.GetPort( ) );
|
|
|
|
m_pEDPath->SetText( rUrl.GetURLPath() );
|
2012-05-03 16:55:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
return bSuccess;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool HostDetailsContainer::verifyScheme( const rtl::OUString& sScheme )
|
|
|
|
{
|
|
|
|
return sScheme.equals( m_sScheme + "://" );
|
|
|
|
}
|
|
|
|
|
2012-11-13 11:14:24 +01:00
|
|
|
DavDetailsContainer::DavDetailsContainer( VclBuilderContainer* pBuilder ) :
|
|
|
|
HostDetailsContainer( pBuilder, 80, "http" )
|
2012-05-03 16:55:22 +02:00
|
|
|
{
|
2012-11-13 11:14:24 +01:00
|
|
|
pBuilder->get( m_pCBDavs, "webdavs" );
|
|
|
|
m_pCBDavs->SetToggleHdl( LINK( this, DavDetailsContainer, ToggledDavsHdl ) );
|
2012-05-03 16:55:22 +02:00
|
|
|
|
2012-11-13 11:14:24 +01:00
|
|
|
show( false );
|
2012-05-03 16:55:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void DavDetailsContainer::show( bool bShow )
|
|
|
|
{
|
|
|
|
HostDetailsContainer::show( bShow );
|
2012-11-13 11:14:24 +01:00
|
|
|
|
|
|
|
m_pCBDavs->Show( bShow );
|
|
|
|
|
2012-05-03 16:55:22 +02:00
|
|
|
if ( bShow )
|
2012-11-13 11:14:24 +01:00
|
|
|
m_pCBDavs->Check( false );
|
2012-05-03 16:55:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
bool DavDetailsContainer::verifyScheme( const rtl::OUString& rScheme )
|
|
|
|
{
|
|
|
|
bool bValid = false;
|
|
|
|
if ( rScheme.equals( "http://" ) )
|
|
|
|
{
|
|
|
|
bValid = true;
|
2012-11-13 11:14:24 +01:00
|
|
|
m_pCBDavs->Check( false );
|
2012-05-03 16:55:22 +02:00
|
|
|
}
|
|
|
|
else if ( rScheme.equals( "https://" ) )
|
|
|
|
{
|
|
|
|
bValid = true;
|
2012-11-13 11:14:24 +01:00
|
|
|
m_pCBDavs->Check( true );
|
2012-05-03 16:55:22 +02:00
|
|
|
}
|
|
|
|
return bValid;
|
|
|
|
}
|
|
|
|
|
|
|
|
IMPL_LINK( DavDetailsContainer, ToggledDavsHdl, CheckBox*, pCheckBox )
|
|
|
|
{
|
|
|
|
// Change default port if needed
|
|
|
|
sal_Bool bCheckedDavs = pCheckBox->IsChecked();
|
2012-11-13 11:14:24 +01:00
|
|
|
if ( m_pEDPort->GetValue() == 80 && bCheckedDavs == sal_True)
|
|
|
|
m_pEDPort->SetValue( 443 );
|
|
|
|
else if ( m_pEDPort->GetValue() == 443 && bCheckedDavs == sal_False )
|
|
|
|
m_pEDPort->SetValue( 80 );
|
2012-05-03 16:55:22 +02:00
|
|
|
|
|
|
|
rtl::OUString sScheme( "http" );
|
|
|
|
if ( bCheckedDavs )
|
|
|
|
sScheme = "https";
|
|
|
|
setScheme( sScheme );
|
|
|
|
|
|
|
|
notifyChange( );
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2012-11-13 11:14:24 +01:00
|
|
|
SmbDetailsContainer::SmbDetailsContainer( VclBuilderContainer* pBuilder ) :
|
|
|
|
DetailsContainer( pBuilder, "SmbDetails" )
|
|
|
|
{
|
|
|
|
pBuilder->get( m_pEDHost, "smbHost" );
|
|
|
|
m_pEDHost->SetModifyHdl( LINK( this, DetailsContainer, ValueChangeHdl ) );
|
|
|
|
|
|
|
|
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 );
|
|
|
|
}
|
|
|
|
|
2012-05-03 16:55:22 +02:00
|
|
|
INetURLObject SmbDetailsContainer::getUrl( )
|
|
|
|
{
|
2012-11-13 11:14:24 +01:00
|
|
|
rtl::OUString sHost = rtl::OUString( m_pEDHost->GetText() ).trim( );
|
|
|
|
rtl::OUString sShare = rtl::OUString( m_pEDShare->GetText() ).trim( );
|
|
|
|
rtl::OUString sPath = rtl::OUString( m_pEDPath->GetText() ).trim( );
|
2012-05-03 16:55:22 +02:00
|
|
|
|
|
|
|
rtl::OUString sUrl;
|
|
|
|
if ( !sHost.isEmpty( ) )
|
|
|
|
{
|
|
|
|
sUrl = "smb://" + sHost + "/";
|
|
|
|
if ( !sShare.isEmpty( ) )
|
|
|
|
sUrl += sShare;
|
|
|
|
if ( !sPath.isEmpty( ) )
|
2012-07-12 22:10:17 +02:00
|
|
|
if ( sPath.indexOf( '/' ) != 0 )
|
2012-05-03 16:55:22 +02:00
|
|
|
sUrl += "/";
|
|
|
|
sUrl += sPath;
|
|
|
|
}
|
|
|
|
|
|
|
|
return INetURLObject( sUrl );
|
|
|
|
}
|
|
|
|
|
|
|
|
bool SmbDetailsContainer::setUrl( const INetURLObject& rUrl )
|
|
|
|
{
|
|
|
|
bool bSuccess = rUrl.GetProtocol() == INET_PROT_SMB;
|
|
|
|
|
|
|
|
if ( bSuccess )
|
|
|
|
{
|
|
|
|
rtl::OUString sShare = rUrl.getName( 0 );
|
|
|
|
rtl::OUString sFullPath = rUrl.GetURLPath( );
|
|
|
|
rtl::OUString sPath;
|
|
|
|
if ( sFullPath.getLength( ) > sShare.getLength( ) )
|
|
|
|
{
|
|
|
|
sal_Int32 nPos = sShare.getLength( );
|
|
|
|
if ( nPos != 0 )
|
|
|
|
++nPos;
|
|
|
|
sPath = sFullPath.copy( nPos );
|
|
|
|
}
|
|
|
|
|
2012-11-13 11:14:24 +01:00
|
|
|
m_pEDHost->SetText( rUrl.GetHost( ) );
|
|
|
|
m_pEDShare->SetText( sShare );
|
|
|
|
m_pEDPath->SetText( sPath );
|
2012-05-03 16:55:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
return bSuccess;
|
|
|
|
}
|
|
|
|
|
2012-11-13 11:14:24 +01:00
|
|
|
CmisDetailsContainer::CmisDetailsContainer( VclBuilderContainer* pBuilder ) :
|
|
|
|
DetailsContainer( pBuilder, "CmisDetails" ),
|
2012-07-11 11:37:25 +02:00
|
|
|
m_sUsername( ),
|
|
|
|
m_xCmdEnv( )
|
|
|
|
{
|
2012-10-02 15:03:12 +02:00
|
|
|
Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
|
2012-10-04 14:36:34 +02:00
|
|
|
Reference< XInteractionHandler > xGlobalInteractionHandler(
|
|
|
|
InteractionHandler::createWithParent(xContext, 0), UNO_QUERY );
|
2012-07-11 11:37:25 +02:00
|
|
|
m_xCmdEnv = new ucbhelper::CommandEnvironment( xGlobalInteractionHandler, Reference< XProgressHandler >() );
|
2012-11-13 11:14:24 +01:00
|
|
|
|
|
|
|
pBuilder->get( m_pEDBinding, "binding" );
|
|
|
|
m_pEDBinding->SetModifyHdl( LINK( this, DetailsContainer, ValueChangeHdl ) );
|
|
|
|
|
|
|
|
pBuilder->get( m_pLBRepository, "repositories" );
|
|
|
|
m_pLBRepository->SetSelectHdl( LINK( this, CmisDetailsContainer, SelectRepoHdl ) );
|
|
|
|
|
|
|
|
pBuilder->get( m_pBTRepoRefresh, "repositoriesRefresh" );
|
|
|
|
m_pBTRepoRefresh->SetClickHdl( LINK( this, CmisDetailsContainer, RefreshReposHdl ) );
|
|
|
|
|
|
|
|
show( false );
|
2012-07-11 11:37:25 +02:00
|
|
|
}
|
|
|
|
|
2012-05-31 14:18:55 +02:00
|
|
|
INetURLObject CmisDetailsContainer::getUrl( )
|
|
|
|
{
|
2012-11-13 11:14:24 +01:00
|
|
|
rtl::OUString sBindingUrl = rtl::OUString( m_pEDBinding->GetText() ).trim( );
|
2012-05-31 14:18:55 +02:00
|
|
|
|
|
|
|
rtl::OUString sUrl;
|
2012-07-11 11:37:25 +02:00
|
|
|
if ( !sBindingUrl.isEmpty( ) && !m_sRepoId.isEmpty() )
|
2012-05-31 14:18:55 +02:00
|
|
|
{
|
2012-06-04 10:13:17 +02:00
|
|
|
rtl::OUString sEncodedBinding = rtl::Uri::encode(
|
2012-07-11 11:37:25 +02:00
|
|
|
sBindingUrl + "#" + m_sRepoId,
|
2012-07-02 14:27:38 +02:00
|
|
|
rtl_UriCharClassRelSegment,
|
2012-06-04 10:13:17 +02:00
|
|
|
rtl_UriEncodeKeepEscapes,
|
|
|
|
RTL_TEXTENCODING_UTF8 );
|
2012-10-16 12:53:31 +02:00
|
|
|
sUrl = "vnd.libreoffice.cmis://" + sEncodedBinding;
|
2012-05-31 14:18:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
return INetURLObject( sUrl );
|
|
|
|
}
|
|
|
|
|
|
|
|
bool CmisDetailsContainer::setUrl( const INetURLObject& rUrl )
|
|
|
|
{
|
2012-10-16 12:53:31 +02:00
|
|
|
bool bSuccess = rUrl.GetProtocol() == INET_PROT_CMIS;
|
2012-05-31 14:18:55 +02:00
|
|
|
|
|
|
|
if ( bSuccess )
|
|
|
|
{
|
2012-06-04 10:13:17 +02:00
|
|
|
rtl::OUString sBindingUrl;
|
2012-05-31 14:18:55 +02:00
|
|
|
rtl::OUString sRepositoryId;
|
|
|
|
|
2012-06-04 10:13:17 +02:00
|
|
|
rtl::OUString sDecodedHost = rUrl.GetHost( INetURLObject::DECODE_WITH_CHARSET );
|
|
|
|
INetURLObject aHostUrl( sDecodedHost );
|
|
|
|
sBindingUrl = aHostUrl.GetURLNoMark( );
|
|
|
|
sRepositoryId = aHostUrl.GetMark( );
|
2012-05-31 14:18:55 +02:00
|
|
|
|
2012-11-13 11:14:24 +01:00
|
|
|
m_pEDBinding->SetText( sBindingUrl );
|
2012-05-31 14:18:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
return bSuccess;
|
|
|
|
}
|
|
|
|
|
2012-07-11 11:37:25 +02:00
|
|
|
void CmisDetailsContainer::setUsername( const rtl::OUString& rUsername )
|
|
|
|
{
|
|
|
|
m_sUsername = rtl::OUString( rUsername );
|
|
|
|
}
|
|
|
|
|
|
|
|
void CmisDetailsContainer::selectRepository( )
|
|
|
|
{
|
|
|
|
// Get the repo ID and call the Change listener
|
2012-11-13 11:14:24 +01:00
|
|
|
sal_uInt16 nPos = m_pLBRepository->GetSelectEntryPos( );
|
2012-07-11 11:37:25 +02:00
|
|
|
m_sRepoId = m_aRepoIds[nPos];
|
|
|
|
|
|
|
|
notifyChange( );
|
|
|
|
}
|
|
|
|
|
|
|
|
IMPL_LINK( CmisDetailsContainer, RefreshReposHdl, void *, EMPTYARG )
|
|
|
|
{
|
2012-11-13 11:14:24 +01:00
|
|
|
rtl::OUString sBindingUrl = rtl::OUString( m_pEDBinding->GetText() ).trim( );
|
2012-07-11 11:37:25 +02:00
|
|
|
|
|
|
|
// Clean the listbox
|
2012-11-13 11:14:24 +01:00
|
|
|
m_pLBRepository->Clear( );
|
2012-07-11 11:37:25 +02:00
|
|
|
m_aRepoIds.clear( );
|
|
|
|
|
|
|
|
// Compute the URL
|
|
|
|
rtl::OUString sUrl;
|
|
|
|
if ( !sBindingUrl.isEmpty( ) )
|
|
|
|
{
|
|
|
|
rtl::OUString sEncodedBinding = rtl::Uri::encode(
|
|
|
|
sBindingUrl,
|
|
|
|
rtl_UriCharClassRelSegment,
|
|
|
|
rtl_UriEncodeKeepEscapes,
|
|
|
|
RTL_TEXTENCODING_UTF8 );
|
2012-10-16 12:53:31 +02:00
|
|
|
sUrl = "vnd.libreoffice.cmis://" + sEncodedBinding;
|
2012-07-11 11:37:25 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// Get the Content
|
2012-09-14 18:08:57 +02:00
|
|
|
::ucbhelper::Content aCnt( sUrl, m_xCmdEnv, comphelper::getProcessComponentContext() );
|
2012-07-11 11:37:25 +02:00
|
|
|
Sequence< rtl::OUString > aProps( 1 );
|
|
|
|
aProps[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) );
|
|
|
|
|
|
|
|
try
|
|
|
|
{
|
|
|
|
Reference< XResultSet > xResultSet( aCnt.createCursor( aProps ), UNO_QUERY_THROW );
|
|
|
|
Reference< XContentAccess > xAccess( xResultSet, UNO_QUERY_THROW );
|
|
|
|
while ( xResultSet->next() )
|
|
|
|
{
|
|
|
|
rtl::OUString sURL = xAccess->queryContentIdentifierString( );
|
|
|
|
INetURLObject aURL( sURL );
|
|
|
|
rtl::OUString sId = aURL.GetURLPath( INetURLObject::DECODE_WITH_CHARSET );
|
|
|
|
sId = sId.copy( 1 );
|
|
|
|
m_aRepoIds.push_back( sId );
|
|
|
|
|
|
|
|
Reference< XRow > xRow( xResultSet, UNO_QUERY );
|
|
|
|
rtl::OUString sName = xRow->getString( 1 );
|
2012-11-13 11:14:24 +01:00
|
|
|
m_pLBRepository->InsertEntry( sName );
|
2012-07-11 11:37:25 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
catch ( const Exception& )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
// Auto-select the first one
|
2012-11-13 11:14:24 +01:00
|
|
|
if ( m_pLBRepository->GetEntryCount( ) > 0 )
|
2012-07-11 11:37:25 +02:00
|
|
|
{
|
2012-11-13 11:14:24 +01:00
|
|
|
m_pLBRepository->SelectEntryPos( 0 );
|
2012-07-11 11:37:25 +02:00
|
|
|
selectRepository( );
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
IMPL_LINK( CmisDetailsContainer, SelectRepoHdl, void *, EMPTYARG )
|
|
|
|
{
|
|
|
|
selectRepository( );
|
|
|
|
return 0;
|
|
|
|
}
|
2012-05-31 14:18:55 +02:00
|
|
|
|
2012-05-03 16:55:22 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|