Impress Remote: allow removal of authorised remotes.
Previously authorising a device meant that it would have access forever -- we now list previously authorised remotes in the remote dialog, along with controls to allow removal of such remotes. Change-Id: I4179739f3a2ba0a8fe19c2a0cd0cbbece9cb4352
This commit is contained in:
@@ -148,7 +148,7 @@
|
|||||||
#define STR_SLIDE_TRANSITION_PANE RID_GLOB_START+228
|
#define STR_SLIDE_TRANSITION_PANE RID_GLOB_START+228
|
||||||
|
|
||||||
#define RID_SLIDESORTER_ICONS RID_GLOB_START+227
|
#define RID_SLIDESORTER_ICONS RID_GLOB_START+227
|
||||||
|
#define STR_DEAUTHORISE_CLIENT RID_GLOB_START+229
|
||||||
#endif // _SDGLOB_HRC
|
#endif // _SDGLOB_HRC
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||||
|
@@ -453,4 +453,9 @@ String STR_ENTER_PIN
|
|||||||
Text [ en-US ] = "Enter PIN:";
|
Text [ en-US ] = "Enter PIN:";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
String STR_DEAUTHORISE_CLIENT
|
||||||
|
{
|
||||||
|
Text [ en-US ] = "Remove client authorisation";
|
||||||
|
};
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||||
|
@@ -25,20 +25,6 @@ RemoteDialog::RemoteDialog( Window *pWindow )
|
|||||||
get(m_pButtonClose, "close");
|
get(m_pButtonClose, "close");
|
||||||
get(m_pClientBox, "tree");
|
get(m_pClientBox, "tree");
|
||||||
|
|
||||||
#ifdef ENABLE_SDREMOTE
|
|
||||||
RemoteServer::ensureDiscoverable();
|
|
||||||
|
|
||||||
vector<::boost::shared_ptr<ClientInfo>> aClients( RemoteServer::getClients() );
|
|
||||||
|
|
||||||
const vector<::boost::shared_ptr<ClientInfo>>::const_iterator aEnd( aClients.end() );
|
|
||||||
|
|
||||||
for ( vector<::boost::shared_ptr<ClientInfo>>::const_iterator aIt( aClients.begin() );
|
|
||||||
aIt != aEnd; ++aIt )
|
|
||||||
{
|
|
||||||
m_pClientBox->addEntry( *aIt );
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
m_pButtonConnect->SetClickHdl( LINK( this, RemoteDialog, HandleConnectButton ) );
|
m_pButtonConnect->SetClickHdl( LINK( this, RemoteDialog, HandleConnectButton ) );
|
||||||
SetCloseHdl( LINK( this, RemoteDialog, CloseHdl ) );
|
SetCloseHdl( LINK( this, RemoteDialog, CloseHdl ) );
|
||||||
m_pButtonClose->SetClickHdl( LINK( this, RemoteDialog, CloseHdl ) );
|
m_pButtonClose->SetClickHdl( LINK( this, RemoteDialog, CloseHdl ) );
|
||||||
|
@@ -17,6 +17,8 @@
|
|||||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
#include "svtools/controldims.hrc"
|
#include "svtools/controldims.hrc"
|
||||||
|
|
||||||
#include "RemoteDialogClientBox.hxx"
|
#include "RemoteDialogClientBox.hxx"
|
||||||
@@ -30,6 +32,8 @@
|
|||||||
|
|
||||||
#include "glob.hrc"
|
#include "glob.hrc"
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
using namespace ::com::sun::star;
|
using namespace ::com::sun::star;
|
||||||
|
|
||||||
namespace sd {
|
namespace sd {
|
||||||
@@ -72,12 +76,15 @@ ClientBox::ClientBox( Window* pParent, WinBits nStyle ) :
|
|||||||
m_nActiveHeight( 0 ),
|
m_nActiveHeight( 0 ),
|
||||||
m_nExtraHeight( 2 ),
|
m_nExtraHeight( 2 ),
|
||||||
m_aPinBox( this, 0 ),
|
m_aPinBox( this, 0 ),
|
||||||
|
m_aDeauthoriseButton( this ),
|
||||||
m_aScrollBar( this, WB_VERT )
|
m_aScrollBar( this, WB_VERT )
|
||||||
{
|
{
|
||||||
m_aScrollBar.SetScrollHdl( LINK( this, ClientBox, ScrollHdl ) );
|
m_aScrollBar.SetScrollHdl( LINK( this, ClientBox, ScrollHdl ) );
|
||||||
m_aScrollBar.EnableDrag();
|
m_aScrollBar.EnableDrag();
|
||||||
|
|
||||||
m_aPinBox.SetUseThousandSep(false);
|
m_aPinBox.SetUseThousandSep(false);
|
||||||
|
m_aDeauthoriseButton.SetText( SD_RESSTR(STR_DEAUTHORISE_CLIENT) );
|
||||||
|
m_aDeauthoriseButton.SetClickHdl( LINK( this, ClientBox, DeauthoriseHdl ) );
|
||||||
|
|
||||||
SetPaintTransparent( true );
|
SetPaintTransparent( true );
|
||||||
SetPosPixel( Point( RSC_SP_DLG_INNERBORDER_LEFT, RSC_SP_DLG_INNERBORDER_TOP ) );
|
SetPosPixel( Point( RSC_SP_DLG_INNERBORDER_LEFT, RSC_SP_DLG_INNERBORDER_TOP ) );
|
||||||
@@ -103,6 +110,8 @@ ClientBox::ClientBox( Window* pParent, WinBits nStyle ) :
|
|||||||
|
|
||||||
m_xRemoveListener = new ClientRemovedListener( this );
|
m_xRemoveListener = new ClientRemovedListener( this );
|
||||||
|
|
||||||
|
populateEntries();
|
||||||
|
|
||||||
Show();
|
Show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -332,18 +341,30 @@ void ClientBox::DrawRow( const Rectangle& rRect, const TClientBoxEntry pEntry )
|
|||||||
Size aSize = LogicToPixel( Size( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT ),
|
Size aSize = LogicToPixel( Size( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT ),
|
||||||
MapMode( MAP_APPFONT ) );
|
MapMode( MAP_APPFONT ) );
|
||||||
m_aPinBox.SetSizePixel( aSize );
|
m_aPinBox.SetSizePixel( aSize );
|
||||||
|
m_aDeauthoriseButton.SetSizePixel( m_aDeauthoriseButton.GetOptimalSize() );
|
||||||
const Rectangle aRect( GetEntryRect( m_nActive ) );
|
const Rectangle aRect( GetEntryRect( m_nActive ) );
|
||||||
Size aBtnSize( m_aPinBox.GetSizePixel() );
|
Size aBtnSize( m_aPinBox.GetSizePixel() );
|
||||||
Point aBtnPos( aRect.Left(),
|
Point aBtnPos( aRect.Left(),
|
||||||
aRect.Bottom() - TOP_OFFSET - aBtnSize.Height() );
|
aRect.Bottom() - TOP_OFFSET - aBtnSize.Height() );
|
||||||
OUString sPinText(SD_RESSTR(STR_ENTER_PIN));
|
|
||||||
DrawText( Rectangle( aBtnPos.X(), aBtnPos.Y(), rRect.Right(), rRect.Bottom() - TOP_OFFSET),
|
|
||||||
sPinText, 0 );
|
|
||||||
|
|
||||||
aBtnPos = Point( aRect.Left() + GetTextWidth( sPinText ),
|
bool bAlreadyAuthorised = pEntry->m_pClientInfo->mbIsAlreadyAuthorised;
|
||||||
aRect.Bottom() - TOP_OFFSET - aBtnSize.Height() );
|
|
||||||
|
|
||||||
|
if ( !bAlreadyAuthorised )
|
||||||
|
{
|
||||||
|
OUString sPinText(SD_RESSTR(STR_ENTER_PIN));
|
||||||
|
DrawText( Rectangle( aBtnPos.X(), aBtnPos.Y(), rRect.Right(), rRect.Bottom() - TOP_OFFSET),
|
||||||
|
sPinText, 0 );
|
||||||
|
|
||||||
|
aBtnPos = Point( aRect.Left() + GetTextWidth( sPinText ),
|
||||||
|
aRect.Bottom() - TOP_OFFSET - aBtnSize.Height() );
|
||||||
|
|
||||||
|
}
|
||||||
m_aPinBox.SetPosPixel( aBtnPos );
|
m_aPinBox.SetPosPixel( aBtnPos );
|
||||||
|
m_aPinBox.Show( !bAlreadyAuthorised );
|
||||||
|
|
||||||
|
aBtnPos.Move( 20, 0 );
|
||||||
|
m_aDeauthoriseButton.SetPosPixel( aBtnPos );
|
||||||
|
m_aDeauthoriseButton.Show( bAlreadyAuthorised );
|
||||||
|
|
||||||
// long nExtraHeight = 0;
|
// long nExtraHeight = 0;
|
||||||
|
|
||||||
@@ -476,6 +497,15 @@ void ClientBox::Paint( const Rectangle &/*rPaintRect*/ )
|
|||||||
|
|
||||||
const ::osl::MutexGuard aGuard( m_entriesMutex );
|
const ::osl::MutexGuard aGuard( m_entriesMutex );
|
||||||
|
|
||||||
|
// If we have just removed the last entry (via deauthorise)
|
||||||
|
// then we need to make sure we hide the button (usually
|
||||||
|
// this would all be dealt with in in DrawRow, but that
|
||||||
|
// won't be called for 0 items).
|
||||||
|
if ( m_vEntries.size() == 0 )
|
||||||
|
{
|
||||||
|
m_aDeauthoriseButton.Show( false );
|
||||||
|
}
|
||||||
|
|
||||||
typedef std::vector< TClientBoxEntry >::iterator ITER;
|
typedef std::vector< TClientBoxEntry >::iterator ITER;
|
||||||
for ( ITER iIndex = m_vEntries.begin(); iIndex < m_vEntries.end(); ++iIndex )
|
for ( ITER iIndex = m_vEntries.begin(); iIndex < m_vEntries.end(); ++iIndex )
|
||||||
{
|
{
|
||||||
@@ -671,6 +701,44 @@ long ClientBox::addEntry( ::boost::shared_ptr<ClientInfo> pClientInfo )
|
|||||||
return nPos;
|
return nPos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ClientBox::clearEntries()
|
||||||
|
{
|
||||||
|
selectEntry( -1 );
|
||||||
|
m_bHasActive = false;
|
||||||
|
|
||||||
|
const ::osl::MutexGuard aGuard( m_entriesMutex );
|
||||||
|
|
||||||
|
m_vEntries.clear();
|
||||||
|
if ( IsReallyVisible() )
|
||||||
|
Invalidate();
|
||||||
|
m_bNeedsRecalc = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ClientBox::populateEntries()
|
||||||
|
{
|
||||||
|
const ::osl::MutexGuard aGuard( m_entriesMutex );
|
||||||
|
|
||||||
|
clearEntries();
|
||||||
|
|
||||||
|
#ifdef ENABLE_SDREMOTE
|
||||||
|
RemoteServer::ensureDiscoverable();
|
||||||
|
|
||||||
|
vector<::boost::shared_ptr<ClientInfo>> aClients( RemoteServer::getClients() );
|
||||||
|
|
||||||
|
const vector<::boost::shared_ptr<ClientInfo>>::const_iterator aEnd( aClients.end() );
|
||||||
|
|
||||||
|
for ( vector<::boost::shared_ptr<ClientInfo>>::const_iterator aIt( aClients.begin() );
|
||||||
|
aIt != aEnd; ++aIt )
|
||||||
|
{
|
||||||
|
addEntry( *aIt );
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if ( IsReallyVisible() )
|
||||||
|
Invalidate();
|
||||||
|
m_bNeedsRecalc = true;
|
||||||
|
}
|
||||||
|
|
||||||
void ClientBox::DoScroll( long nDelta )
|
void ClientBox::DoScroll( long nDelta )
|
||||||
{
|
{
|
||||||
m_nTopIndex += nDelta;
|
m_nTopIndex += nDelta;
|
||||||
@@ -690,6 +758,20 @@ IMPL_LINK( ClientBox, ScrollHdl, ScrollBar*, pScrBar )
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IMPL_LINK_NOARG( ClientBox, DeauthoriseHdl )
|
||||||
|
{
|
||||||
|
long aSelected = GetActiveEntryIndex();
|
||||||
|
if ( aSelected < 0 )
|
||||||
|
return 1;
|
||||||
|
TClientBoxEntry aEntry = GetEntryData(aSelected);
|
||||||
|
|
||||||
|
#ifdef ENABLE_SDREMOTE
|
||||||
|
RemoteServer::deauthoriseClient( aEntry->m_pClientInfo );
|
||||||
|
#endif
|
||||||
|
populateEntries();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
} //namespace dp_gui
|
} //namespace dp_gui
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||||
|
@@ -23,6 +23,7 @@
|
|||||||
#include "rtl/ustring.hxx"
|
#include "rtl/ustring.hxx"
|
||||||
#include "vcl/scrbar.hxx"
|
#include "vcl/scrbar.hxx"
|
||||||
#include "vcl/fixed.hxx"
|
#include "vcl/fixed.hxx"
|
||||||
|
#include "vcl/button.hxx"
|
||||||
#include "vcl/dialog.hxx"
|
#include "vcl/dialog.hxx"
|
||||||
#include "vcl/field.hxx"
|
#include "vcl/field.hxx"
|
||||||
|
|
||||||
@@ -98,8 +99,10 @@ class ClientBox:
|
|||||||
long m_nExtraHeight;
|
long m_nExtraHeight;
|
||||||
Size m_aOutputSize;
|
Size m_aOutputSize;
|
||||||
Link m_aClickHdl;
|
Link m_aClickHdl;
|
||||||
|
Link m_aDeauthoriseHdl;
|
||||||
|
|
||||||
NumericBox m_aPinBox;
|
NumericBox m_aPinBox;
|
||||||
|
PushButton m_aDeauthoriseButton;
|
||||||
|
|
||||||
ScrollBar m_aScrollBar;
|
ScrollBar m_aScrollBar;
|
||||||
|
|
||||||
@@ -125,7 +128,7 @@ class ClientBox:
|
|||||||
void DeleteRemoved();
|
void DeleteRemoved();
|
||||||
|
|
||||||
DECL_DLLPRIVATE_LINK( ScrollHdl, ScrollBar* );
|
DECL_DLLPRIVATE_LINK( ScrollHdl, ScrollBar* );
|
||||||
|
DECL_DLLPRIVATE_LINK( DeauthoriseHdl, void * );
|
||||||
//Index starts with 1.
|
//Index starts with 1.
|
||||||
//Throws an com::sun::star::lang::IllegalArgumentException, when the index is invalid.
|
//Throws an com::sun::star::lang::IllegalArgumentException, when the index is invalid.
|
||||||
void checkIndex(sal_Int32 pos) const;
|
void checkIndex(sal_Int32 pos) const;
|
||||||
@@ -158,11 +161,13 @@ public:
|
|||||||
long addEntry( ::boost::shared_ptr<ClientInfo> pClientInfo );
|
long addEntry( ::boost::shared_ptr<ClientInfo> pClientInfo );
|
||||||
void updateEntry( const ::boost::shared_ptr<ClientInfo> pPackageInfo );
|
void updateEntry( const ::boost::shared_ptr<ClientInfo> pPackageInfo );
|
||||||
void removeEntry( const ::boost::shared_ptr<ClientInfo> pPackageInfo );
|
void removeEntry( const ::boost::shared_ptr<ClientInfo> pPackageInfo );
|
||||||
|
void clearEntries();
|
||||||
|
|
||||||
void prepareChecking();
|
void prepareChecking();
|
||||||
void checkEntries();
|
void checkEntries();
|
||||||
|
|
||||||
OUString getPin();
|
OUString getPin();
|
||||||
|
void populateEntries();
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -46,10 +46,15 @@ namespace sd
|
|||||||
OUString mName;
|
OUString mName;
|
||||||
OUString mAddress;
|
OUString mAddress;
|
||||||
|
|
||||||
|
bool mbIsAlreadyAuthorised;
|
||||||
|
|
||||||
enum PROTOCOL { NETWORK = 1, BLUETOOTH };
|
enum PROTOCOL { NETWORK = 1, BLUETOOTH };
|
||||||
ClientInfo( const OUString& rName, const OUString& rAddress ) :
|
ClientInfo( const OUString& rName,
|
||||||
|
const OUString& rAddress,
|
||||||
|
const bool bIsAlreadyAuthorised ) :
|
||||||
mName( rName ),
|
mName( rName ),
|
||||||
mAddress( rAddress ) {}
|
mAddress( rAddress ),
|
||||||
|
mbIsAlreadyAuthorised( bIsAlreadyAuthorised ) {}
|
||||||
|
|
||||||
virtual ~ClientInfo() {};
|
virtual ~ClientInfo() {};
|
||||||
};
|
};
|
||||||
@@ -71,6 +76,7 @@ namespace sd
|
|||||||
SD_DLLPUBLIC static std::vector< ::boost::shared_ptr< ClientInfo > > getClients();
|
SD_DLLPUBLIC static std::vector< ::boost::shared_ptr< ClientInfo > > getClients();
|
||||||
SD_DLLPUBLIC static bool connectClient( ::boost::shared_ptr< ClientInfo > pClient,
|
SD_DLLPUBLIC static bool connectClient( ::boost::shared_ptr< ClientInfo > pClient,
|
||||||
const OUString& aPin );
|
const OUString& aPin );
|
||||||
|
SD_DLLPUBLIC static void deauthoriseClient( ::boost::shared_ptr< ClientInfo > pClient );
|
||||||
|
|
||||||
/// ensure that discoverability (eg. for Bluetooth) is enabled
|
/// ensure that discoverability (eg. for Bluetooth) is enabled
|
||||||
SD_DLLPUBLIC static void ensureDiscoverable();
|
SD_DLLPUBLIC static void ensureDiscoverable();
|
||||||
|
@@ -54,9 +54,10 @@ namespace sd {
|
|||||||
|
|
||||||
ClientInfoInternal( const OUString& rName,
|
ClientInfoInternal( const OUString& rName,
|
||||||
const OUString& rAddress,
|
const OUString& rAddress,
|
||||||
|
const bool bIsAlreadyAuthorised,
|
||||||
BufferedStreamSocket *pSocket,
|
BufferedStreamSocket *pSocket,
|
||||||
const OUString& rPin ):
|
const OUString& rPin ):
|
||||||
ClientInfo( rName, rAddress ),
|
ClientInfo( rName, rAddress, bIsAlreadyAuthorised ),
|
||||||
mpStreamSocket( pSocket ),
|
mpStreamSocket( pSocket ),
|
||||||
mPin( rPin ) {}
|
mPin( rPin ) {}
|
||||||
};
|
};
|
||||||
@@ -127,8 +128,8 @@ void RemoteServer::execute()
|
|||||||
::boost::shared_ptr< ClientInfoInternal > pClient(
|
::boost::shared_ptr< ClientInfoInternal > pClient(
|
||||||
new ClientInfoInternal(
|
new ClientInfoInternal(
|
||||||
OStringToOUString( aName, RTL_TEXTENCODING_UTF8 ),
|
OStringToOUString( aName, RTL_TEXTENCODING_UTF8 ),
|
||||||
aAddress, pSocket, OStringToOUString( aPin,
|
aAddress, false, pSocket, OStringToOUString( aPin,
|
||||||
RTL_TEXTENCODING_UTF8 ) );
|
RTL_TEXTENCODING_UTF8 ) ) );
|
||||||
mAvailableClients.push_back( pClient );
|
mAvailableClients.push_back( pClient );
|
||||||
|
|
||||||
// Read off any additional non-empty lines
|
// Read off any additional non-empty lines
|
||||||
@@ -247,6 +248,23 @@ std::vector< ::boost::shared_ptr< ClientInfo > > RemoteServer::getClients()
|
|||||||
MutexGuard aGuard( sDataMutex );
|
MutexGuard aGuard( sDataMutex );
|
||||||
aClients.assign( spServer->mAvailableClients.begin(),
|
aClients.assign( spServer->mAvailableClients.begin(),
|
||||||
spServer->mAvailableClients.end() );
|
spServer->mAvailableClients.end() );
|
||||||
|
|
||||||
|
// We also need to provide authorised clients (no matter whether or not
|
||||||
|
// they are actually available), so that they can be de-authorised if
|
||||||
|
// necessary. We specifically want these to be at the end of the list
|
||||||
|
// since the user is more likely to be trying to connect a new remote
|
||||||
|
// than removing an existing remote.
|
||||||
|
// We can also be sure that pre-authorised clients will not be on the
|
||||||
|
// available clients list, as they get automatially connected if seen.
|
||||||
|
// TODO: we should probably add some sort of extra labelling to mark
|
||||||
|
// authorised AND connected client.
|
||||||
|
Reference< XNameAccess > const xConfig = officecfg::Office::Impress::Misc::AuthorisedRemotes::get();
|
||||||
|
Sequence< OUString > aNames = xConfig->getElementNames();
|
||||||
|
for ( int i = 0; i < aNames.getLength(); i++ )
|
||||||
|
{
|
||||||
|
aClients.push_back( ::boost::shared_ptr< ClientInfo > ( new ClientInfo( aNames[i], "", true ) ) );
|
||||||
|
}
|
||||||
|
|
||||||
return aClients;
|
return aClients;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -257,7 +275,12 @@ bool RemoteServer::connectClient( ::boost::shared_ptr< ClientInfo > pClient, con
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
ClientInfoInternal* apClient = dynamic_cast< ClientInfoInternal* >( pClient.get() );
|
ClientInfoInternal* apClient = dynamic_cast< ClientInfoInternal* >( pClient.get() );
|
||||||
ClientInfoInternal *apClient = (ClientInfoInternal*) pClient;
|
if ( !apClient )
|
||||||
|
// could happen if we try to "connect" an already authorised client
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if ( apClient->mPin.equals( aPin ) )
|
if ( apClient->mPin.equals( aPin ) )
|
||||||
{
|
{
|
||||||
// Save in settings first
|
// Save in settings first
|
||||||
@@ -312,6 +335,30 @@ bool RemoteServer::connectClient( ::boost::shared_ptr< ClientInfo > pClient, con
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RemoteServer::deauthoriseClient( ::boost::shared_ptr< ClientInfo > pClient )
|
||||||
|
{
|
||||||
|
// TODO: we probably want to forcefully disconnect at this point too?
|
||||||
|
// But possibly via a separate function to allow just disconnecting from
|
||||||
|
// the UI.
|
||||||
|
|
||||||
|
SAL_INFO( "sdremote", "RemoteServer::deauthoriseClient called" );
|
||||||
|
if ( !spServer )
|
||||||
|
return;
|
||||||
|
|
||||||
|
if ( !pClient->mbIsAlreadyAuthorised )
|
||||||
|
// We can't remove unauthorised clients from the authorised list...
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
boost::shared_ptr< ConfigurationChanges > aChanges = ConfigurationChanges::create();
|
||||||
|
Reference< XNameContainer > const xConfig =
|
||||||
|
officecfg::Office::Impress::Misc::AuthorisedRemotes::get( aChanges );
|
||||||
|
|
||||||
|
xConfig->removeByName( pClient->mName );
|
||||||
|
aChanges->commit();
|
||||||
|
}
|
||||||
|
|
||||||
void SdDLL::RegisterRemotes()
|
void SdDLL::RegisterRemotes()
|
||||||
{
|
{
|
||||||
SAL_INFO( "sdremote", "SdDLL::RegisterRemotes called" );
|
SAL_INFO( "sdremote", "SdDLL::RegisterRemotes called" );
|
||||||
|
Reference in New Issue
Block a user