Simplify InteractionContinuation and derivatives
Change-Id: Ib7294cc09255f7563ae14488ab7fb56d02092dc4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178117 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit is contained in:
parent
a1b8b44bf9
commit
e512091e89
13 changed files with 60 additions and 520 deletions
|
@ -130,7 +130,7 @@ public:
|
||||||
* method the way that they simply call recordSelection() which is provided by
|
* method the way that they simply call recordSelection() which is provided by
|
||||||
* this class.
|
* this class.
|
||||||
*/
|
*/
|
||||||
class UNLESS_MERGELIBS(UCBHELPER_DLLPUBLIC) InteractionContinuation : public cppu::OWeakObject
|
class UNLESS_MERGELIBS(UCBHELPER_DLLPUBLIC) InteractionContinuation : public cppu::WeakImplHelper<>
|
||||||
{
|
{
|
||||||
InteractionRequest* m_pRequest;
|
InteractionRequest* m_pRequest;
|
||||||
|
|
||||||
|
@ -150,138 +150,84 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
using InteractionAbort_BASE = cppu::ImplInheritanceHelper<InteractionContinuation,
|
||||||
|
css::task::XInteractionAbort>;
|
||||||
/**
|
/**
|
||||||
* This class implements a standard interaction continuation, namely the
|
* This class implements a standard interaction continuation, namely the
|
||||||
* interface XInteractionAbort. Instances of this class can be passed
|
* interface XInteractionAbort. Instances of this class can be passed
|
||||||
* along with an interaction request to indicate the possibility to abort
|
* along with an interaction request to indicate the possibility to abort
|
||||||
* the operation that caused the request.
|
* the operation that caused the request.
|
||||||
*/
|
*/
|
||||||
class UNLESS_MERGELIBS(UCBHELPER_DLLPUBLIC) InteractionAbort final : public InteractionContinuation,
|
class UNLESS_MERGELIBS(UCBHELPER_DLLPUBLIC) InteractionAbort final : public InteractionAbort_BASE
|
||||||
public css::lang::XTypeProvider,
|
|
||||||
public css::task::XInteractionAbort
|
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
InteractionAbort( InteractionRequest * pRequest )
|
InteractionAbort( InteractionRequest * pRequest )
|
||||||
: InteractionContinuation( pRequest ) {}
|
: InteractionAbort_BASE( pRequest ) {}
|
||||||
|
|
||||||
// XInterface
|
|
||||||
virtual css::uno::Any SAL_CALL
|
|
||||||
queryInterface( const css::uno::Type & rType ) override;
|
|
||||||
virtual void SAL_CALL acquire() noexcept override
|
|
||||||
{ OWeakObject::acquire(); }
|
|
||||||
virtual void SAL_CALL release() noexcept override
|
|
||||||
{ OWeakObject::release(); }
|
|
||||||
|
|
||||||
// XTypeProvider
|
|
||||||
virtual css::uno::Sequence< css::uno::Type > SAL_CALL
|
|
||||||
getTypes() override;
|
|
||||||
virtual css::uno::Sequence< sal_Int8 > SAL_CALL
|
|
||||||
getImplementationId() override;
|
|
||||||
|
|
||||||
// XInteractionContinuation
|
// XInteractionContinuation
|
||||||
virtual void SAL_CALL select() override;
|
virtual void SAL_CALL select() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
using InteractionRetry_BASE = cppu::ImplInheritanceHelper<InteractionContinuation,
|
||||||
|
css::task::XInteractionRetry>;
|
||||||
/**
|
/**
|
||||||
* This class implements a standard interaction continuation, namely the
|
* This class implements a standard interaction continuation, namely the
|
||||||
* interface XInteractionRetry. Instances of this class can be passed
|
* interface XInteractionRetry. Instances of this class can be passed
|
||||||
* along with an interaction request to indicate the possibility to retry
|
* along with an interaction request to indicate the possibility to retry
|
||||||
* the operation that caused the request.
|
* the operation that caused the request.
|
||||||
*/
|
*/
|
||||||
class UNLESS_MERGELIBS(UCBHELPER_DLLPUBLIC) InteractionRetry final : public InteractionContinuation,
|
class UNLESS_MERGELIBS(UCBHELPER_DLLPUBLIC) InteractionRetry final : public InteractionRetry_BASE
|
||||||
public css::lang::XTypeProvider,
|
|
||||||
public css::task::XInteractionRetry
|
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
InteractionRetry( InteractionRequest * pRequest )
|
InteractionRetry( InteractionRequest * pRequest )
|
||||||
: InteractionContinuation( pRequest ) {}
|
: InteractionRetry_BASE( pRequest ) {}
|
||||||
|
|
||||||
// XInterface
|
|
||||||
virtual css::uno::Any SAL_CALL
|
|
||||||
queryInterface( const css::uno::Type & rType ) override;
|
|
||||||
virtual void SAL_CALL acquire() noexcept override
|
|
||||||
{ OWeakObject::acquire(); }
|
|
||||||
virtual void SAL_CALL release() noexcept override
|
|
||||||
{ OWeakObject::release(); }
|
|
||||||
|
|
||||||
// XTypeProvider
|
|
||||||
virtual css::uno::Sequence< css::uno::Type > SAL_CALL
|
|
||||||
getTypes() override;
|
|
||||||
virtual css::uno::Sequence< sal_Int8 > SAL_CALL
|
|
||||||
getImplementationId() override;
|
|
||||||
|
|
||||||
// XInteractionContinuation
|
// XInteractionContinuation
|
||||||
virtual void SAL_CALL select() override;
|
virtual void SAL_CALL select() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
using InteractionApprove_BASE = cppu::ImplInheritanceHelper<InteractionContinuation,
|
||||||
|
css::task::XInteractionApprove>;
|
||||||
/**
|
/**
|
||||||
* This class implements a standard interaction continuation, namely the
|
* This class implements a standard interaction continuation, namely the
|
||||||
* interface XInteractionApprove. Instances of this class can be passed
|
* interface XInteractionApprove. Instances of this class can be passed
|
||||||
* along with an interaction request to indicate the possibility to approve
|
* along with an interaction request to indicate the possibility to approve
|
||||||
* the request.
|
* the request.
|
||||||
*/
|
*/
|
||||||
class UCBHELPER_DLLPUBLIC InteractionApprove final : public InteractionContinuation,
|
class UCBHELPER_DLLPUBLIC InteractionApprove final : public InteractionApprove_BASE
|
||||||
public css::lang::XTypeProvider,
|
|
||||||
public css::task::XInteractionApprove
|
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
InteractionApprove( InteractionRequest * pRequest )
|
InteractionApprove( InteractionRequest * pRequest )
|
||||||
: InteractionContinuation( pRequest ) {}
|
: InteractionApprove_BASE( pRequest ) {}
|
||||||
|
|
||||||
// XInterface
|
|
||||||
virtual css::uno::Any SAL_CALL
|
|
||||||
queryInterface( const css::uno::Type & rType ) override;
|
|
||||||
virtual void SAL_CALL acquire() noexcept override
|
|
||||||
{ OWeakObject::acquire(); }
|
|
||||||
virtual void SAL_CALL release() noexcept override
|
|
||||||
{ OWeakObject::release(); }
|
|
||||||
|
|
||||||
// XTypeProvider
|
|
||||||
virtual css::uno::Sequence< css::uno::Type > SAL_CALL
|
|
||||||
getTypes() override;
|
|
||||||
virtual css::uno::Sequence< sal_Int8 > SAL_CALL
|
|
||||||
getImplementationId() override;
|
|
||||||
|
|
||||||
// XInteractionContinuation
|
// XInteractionContinuation
|
||||||
virtual void SAL_CALL select() override;
|
virtual void SAL_CALL select() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
using InteractionDisapprove_BASE = cppu::ImplInheritanceHelper<InteractionContinuation,
|
||||||
|
css::task::XInteractionDisapprove>;
|
||||||
/**
|
/**
|
||||||
* This class implements a standard interaction continuation, namely the
|
* This class implements a standard interaction continuation, namely the
|
||||||
* interface XInteractionDisapprove. Instances of this class can be passed
|
* interface XInteractionDisapprove. Instances of this class can be passed
|
||||||
* along with an interaction request to indicate the possibility to disapprove
|
* along with an interaction request to indicate the possibility to disapprove
|
||||||
* the request.
|
* the request.
|
||||||
*/
|
*/
|
||||||
class UCBHELPER_DLLPUBLIC InteractionDisapprove final : public InteractionContinuation,
|
class UCBHELPER_DLLPUBLIC InteractionDisapprove final : public InteractionDisapprove_BASE
|
||||||
public css::lang::XTypeProvider,
|
|
||||||
public css::task::XInteractionDisapprove
|
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
InteractionDisapprove( InteractionRequest * pRequest )
|
InteractionDisapprove( InteractionRequest * pRequest )
|
||||||
: InteractionContinuation( pRequest ) {}
|
: InteractionDisapprove_BASE( pRequest ) {}
|
||||||
|
|
||||||
// XInterface
|
|
||||||
virtual css::uno::Any SAL_CALL
|
|
||||||
queryInterface( const css::uno::Type & rType ) override;
|
|
||||||
virtual void SAL_CALL acquire() noexcept override
|
|
||||||
{ OWeakObject::acquire(); }
|
|
||||||
virtual void SAL_CALL release() noexcept override
|
|
||||||
{ OWeakObject::release(); }
|
|
||||||
|
|
||||||
// XTypeProvider
|
|
||||||
virtual css::uno::Sequence< css::uno::Type > SAL_CALL
|
|
||||||
getTypes() override;
|
|
||||||
virtual css::uno::Sequence< sal_Int8 > SAL_CALL
|
|
||||||
getImplementationId() override;
|
|
||||||
|
|
||||||
// XInteractionContinuation
|
// XInteractionContinuation
|
||||||
virtual void SAL_CALL select() override;
|
virtual void SAL_CALL select() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
using InteractionSupplyAuthentication_BASE = cppu::ImplInheritanceHelper<InteractionContinuation,
|
||||||
|
css::ucb::XInteractionSupplyAuthentication2>;
|
||||||
/**
|
/**
|
||||||
* This class implements a standard interaction continuation, namely the
|
* This class implements a standard interaction continuation, namely the
|
||||||
* interface XInteractionSupplyAuthentication. Instances of this class can be
|
* interface XInteractionSupplyAuthentication. Instances of this class can be
|
||||||
|
@ -289,9 +235,7 @@ public:
|
||||||
* interaction handler to supply the missing authentication data.
|
* interaction handler to supply the missing authentication data.
|
||||||
*/
|
*/
|
||||||
class UCBHELPER_DLLPUBLIC InteractionSupplyAuthentication final :
|
class UCBHELPER_DLLPUBLIC InteractionSupplyAuthentication final :
|
||||||
public InteractionContinuation,
|
public InteractionSupplyAuthentication_BASE
|
||||||
public css::lang::XTypeProvider,
|
|
||||||
public css::ucb::XInteractionSupplyAuthentication2
|
|
||||||
{
|
{
|
||||||
css::uno::Sequence< css::ucb::RememberAuthentication >
|
css::uno::Sequence< css::ucb::RememberAuthentication >
|
||||||
m_aRememberPasswordModes;
|
m_aRememberPasswordModes;
|
||||||
|
@ -355,20 +299,6 @@ public:
|
||||||
const css::ucb::RememberAuthentication eDefaultRememberAccountMode,
|
const css::ucb::RememberAuthentication eDefaultRememberAccountMode,
|
||||||
bool bCanUseSystemCredentials );
|
bool bCanUseSystemCredentials );
|
||||||
|
|
||||||
// XInterface
|
|
||||||
virtual css::uno::Any SAL_CALL
|
|
||||||
queryInterface( const css::uno::Type & rType ) override;
|
|
||||||
virtual void SAL_CALL acquire() noexcept override
|
|
||||||
{ OWeakObject::acquire(); }
|
|
||||||
virtual void SAL_CALL release() noexcept override
|
|
||||||
{ OWeakObject::release(); }
|
|
||||||
|
|
||||||
// XTypeProvider
|
|
||||||
virtual css::uno::Sequence< css::uno::Type > SAL_CALL
|
|
||||||
getTypes() override;
|
|
||||||
virtual css::uno::Sequence< sal_Int8 > SAL_CALL
|
|
||||||
getImplementationId() override;
|
|
||||||
|
|
||||||
// XInteractionContinuation
|
// XInteractionContinuation
|
||||||
virtual void SAL_CALL select() override;
|
virtual void SAL_CALL select() override;
|
||||||
|
|
||||||
|
@ -461,7 +391,7 @@ inline InteractionSupplyAuthentication::InteractionSupplyAuthentication(
|
||||||
const css::uno::Sequence< css::ucb::RememberAuthentication > & rRememberAccountModes,
|
const css::uno::Sequence< css::ucb::RememberAuthentication > & rRememberAccountModes,
|
||||||
const css::ucb::RememberAuthentication eDefaultRememberAccountMode,
|
const css::ucb::RememberAuthentication eDefaultRememberAccountMode,
|
||||||
bool bCanUseSystemCredentials )
|
bool bCanUseSystemCredentials )
|
||||||
: InteractionContinuation( pRequest ),
|
: InteractionSupplyAuthentication_BASE( pRequest ),
|
||||||
m_aRememberPasswordModes( rRememberPasswordModes ),
|
m_aRememberPasswordModes( rRememberPasswordModes ),
|
||||||
m_aRememberAccountModes( rRememberAccountModes ),
|
m_aRememberAccountModes( rRememberAccountModes ),
|
||||||
m_eRememberPasswordMode( eDefaultRememberPasswordMode ),
|
m_eRememberPasswordMode( eDefaultRememberPasswordMode ),
|
||||||
|
@ -477,6 +407,8 @@ inline InteractionSupplyAuthentication::InteractionSupplyAuthentication(
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
using InteractionReplaceExistingData_BASE = cppu::ImplInheritanceHelper<InteractionContinuation,
|
||||||
|
css::ucb::XInteractionReplaceExistingData>;
|
||||||
/**
|
/**
|
||||||
* This class implements a standard interaction continuation, namely the
|
* This class implements a standard interaction continuation, namely the
|
||||||
* interface XInteractionReplaceExistingData. Instances of this class can be
|
* interface XInteractionReplaceExistingData. Instances of this class can be
|
||||||
|
@ -484,49 +416,26 @@ inline InteractionSupplyAuthentication::InteractionSupplyAuthentication(
|
||||||
* replace existing data.
|
* replace existing data.
|
||||||
*/
|
*/
|
||||||
class InteractionReplaceExistingData final :
|
class InteractionReplaceExistingData final :
|
||||||
public InteractionContinuation,
|
public InteractionReplaceExistingData_BASE
|
||||||
public css::lang::XTypeProvider,
|
|
||||||
public css::ucb::XInteractionReplaceExistingData
|
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
InteractionReplaceExistingData( InteractionRequest * pRequest )
|
InteractionReplaceExistingData( InteractionRequest * pRequest )
|
||||||
: InteractionContinuation( pRequest ) {}
|
: InteractionReplaceExistingData_BASE( pRequest ) {}
|
||||||
|
|
||||||
// XInterface
|
|
||||||
virtual css::uno::Any SAL_CALL
|
|
||||||
queryInterface( const css::uno::Type & rType ) override;
|
|
||||||
virtual void SAL_CALL acquire() noexcept override
|
|
||||||
{ OWeakObject::acquire(); }
|
|
||||||
virtual void SAL_CALL release() noexcept override
|
|
||||||
{ OWeakObject::release(); }
|
|
||||||
|
|
||||||
// XTypeProvider
|
|
||||||
virtual css::uno::Sequence< css::uno::Type > SAL_CALL
|
|
||||||
getTypes() override;
|
|
||||||
virtual css::uno::Sequence< sal_Int8 > SAL_CALL
|
|
||||||
getImplementationId() override;
|
|
||||||
|
|
||||||
// XInteractionContinuation
|
// XInteractionContinuation
|
||||||
virtual void SAL_CALL select() override;
|
virtual void SAL_CALL select() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
using InteractionAuthFallback_BASE = cppu::ImplInheritanceHelper<InteractionContinuation,
|
||||||
|
css::ucb::XInteractionAuthFallback>;
|
||||||
class UCBHELPER_DLLPUBLIC InteractionAuthFallback final :
|
class UCBHELPER_DLLPUBLIC InteractionAuthFallback final :
|
||||||
public InteractionContinuation,
|
public InteractionAuthFallback_BASE
|
||||||
public css::ucb::XInteractionAuthFallback
|
|
||||||
{
|
{
|
||||||
OUString m_aCode;
|
OUString m_aCode;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
InteractionAuthFallback( InteractionRequest * pRequest )
|
InteractionAuthFallback( InteractionRequest * pRequest )
|
||||||
: InteractionContinuation( pRequest ) {}
|
: InteractionAuthFallback_BASE( pRequest ) {}
|
||||||
|
|
||||||
// XInterface
|
|
||||||
virtual css::uno::Any SAL_CALL
|
|
||||||
queryInterface( const css::uno::Type & rType ) override;
|
|
||||||
virtual void SAL_CALL acquire() noexcept override
|
|
||||||
{ OWeakObject::acquire(); }
|
|
||||||
virtual void SAL_CALL release() noexcept override
|
|
||||||
{ OWeakObject::release(); }
|
|
||||||
|
|
||||||
// XInteractionContinuation
|
// XInteractionContinuation
|
||||||
virtual void SAL_CALL select() override;
|
virtual void SAL_CALL select() override;
|
||||||
|
@ -535,8 +444,6 @@ public:
|
||||||
virtual void SAL_CALL setCode( const OUString& code ) override;
|
virtual void SAL_CALL setCode( const OUString& code ) override;
|
||||||
/// @throws css::uno::RuntimeException
|
/// @throws css::uno::RuntimeException
|
||||||
const OUString& getCode() const;
|
const OUString& getCode() const;
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -589,7 +589,7 @@ void SfxMedium::CheckFileDate( const util::DateTime& aInitDate )
|
||||||
xHandler->handle( xInteractionRequestImpl );
|
xHandler->handle( xInteractionRequestImpl );
|
||||||
|
|
||||||
::rtl::Reference< ::ucbhelper::InteractionContinuation > xSelected = xInteractionRequestImpl->getSelection();
|
::rtl::Reference< ::ucbhelper::InteractionContinuation > xSelected = xInteractionRequestImpl->getSelection();
|
||||||
if ( uno::Reference< task::XInteractionAbort >( xSelected.get(), uno::UNO_QUERY ).is() )
|
if ( uno::Reference< task::XInteractionAbort >( cppu::getXWeak(xSelected.get()), uno::UNO_QUERY ).is() )
|
||||||
{
|
{
|
||||||
SetError(ERRCODE_ABORT);
|
SetError(ERRCODE_ABORT);
|
||||||
}
|
}
|
||||||
|
@ -1170,11 +1170,11 @@ SfxMedium::ShowLockResult SfxMedium::ShowLockedDocumentDialog(const LockFileEntr
|
||||||
|
|
||||||
bool bOpenReadOnly = false;
|
bool bOpenReadOnly = false;
|
||||||
::rtl::Reference< ::ucbhelper::InteractionContinuation > xSelected = xInteractionRequestImpl->getSelection();
|
::rtl::Reference< ::ucbhelper::InteractionContinuation > xSelected = xInteractionRequestImpl->getSelection();
|
||||||
if ( uno::Reference< task::XInteractionAbort >( xSelected.get(), uno::UNO_QUERY ).is() )
|
if ( uno::Reference< task::XInteractionAbort >( cppu::getXWeak(xSelected.get()), uno::UNO_QUERY ).is() )
|
||||||
{
|
{
|
||||||
SetError(ERRCODE_ABORT);
|
SetError(ERRCODE_ABORT);
|
||||||
}
|
}
|
||||||
else if ( uno::Reference< task::XInteractionDisapprove >( xSelected.get(), uno::UNO_QUERY ).is() )
|
else if ( uno::Reference< task::XInteractionDisapprove >( cppu::getXWeak(xSelected.get()), uno::UNO_QUERY ).is() )
|
||||||
{
|
{
|
||||||
// own lock on loading, user has selected to ignore the lock
|
// own lock on loading, user has selected to ignore the lock
|
||||||
// own lock on saving, user has selected to ignore the lock
|
// own lock on saving, user has selected to ignore the lock
|
||||||
|
@ -1188,12 +1188,12 @@ SfxMedium::ShowLockResult SfxMedium::ShowLockedDocumentDialog(const LockFileEntr
|
||||||
else
|
else
|
||||||
nResult = ShowLockResult::Succeeded;
|
nResult = ShowLockResult::Succeeded;
|
||||||
}
|
}
|
||||||
else if (uno::Reference< task::XInteractionRetry >(xSelected.get(), uno::UNO_QUERY).is())
|
else if (uno::Reference< task::XInteractionRetry >(cppu::getXWeak(xSelected.get()), uno::UNO_QUERY).is())
|
||||||
{
|
{
|
||||||
// User decided to ignore the alien (stale?) lock file without filesystem lock
|
// User decided to ignore the alien (stale?) lock file without filesystem lock
|
||||||
nResult = ShowLockResult::Succeeded;
|
nResult = ShowLockResult::Succeeded;
|
||||||
}
|
}
|
||||||
else if (uno::Reference< task::XInteractionApprove >( xSelected.get(), uno::UNO_QUERY ).is())
|
else if (uno::Reference< task::XInteractionApprove >( cppu::getXWeak(xSelected.get()), uno::UNO_QUERY ).is())
|
||||||
{
|
{
|
||||||
bOpenReadOnly = true;
|
bOpenReadOnly = true;
|
||||||
}
|
}
|
||||||
|
@ -1264,12 +1264,12 @@ bool SfxMedium::ShowLockFileProblemDialog(MessageDlg nWhichDlg)
|
||||||
::rtl::Reference< ::ucbhelper::InteractionContinuation > xSelected = xIgnoreRequestImpl->getSelection();
|
::rtl::Reference< ::ucbhelper::InteractionContinuation > xSelected = xIgnoreRequestImpl->getSelection();
|
||||||
bool bReadOnly = true;
|
bool bReadOnly = true;
|
||||||
|
|
||||||
if (uno::Reference<task::XInteractionAbort>(xSelected.get(), uno::UNO_QUERY).is())
|
if (uno::Reference<task::XInteractionAbort>(cppu::getXWeak(xSelected.get()), uno::UNO_QUERY).is())
|
||||||
{
|
{
|
||||||
SetError(ERRCODE_ABORT);
|
SetError(ERRCODE_ABORT);
|
||||||
bReadOnly = false;
|
bReadOnly = false;
|
||||||
}
|
}
|
||||||
else if (!uno::Reference<task::XInteractionApprove>(xSelected.get(), uno::UNO_QUERY).is())
|
else if (!uno::Reference<task::XInteractionApprove>(cppu::getXWeak(xSelected.get()), uno::UNO_QUERY).is())
|
||||||
{
|
{
|
||||||
// user selected "Notify"
|
// user selected "Notify"
|
||||||
pImpl->m_bNotifyWhenEditable = true;
|
pImpl->m_bNotifyWhenEditable = true;
|
||||||
|
@ -4940,7 +4940,7 @@ IMPL_STATIC_LINK(SfxMedium, ShowReloadEditableDialog, void*, p, void)
|
||||||
xHandler->handle(xInteractionRequestImpl);
|
xHandler->handle(xInteractionRequestImpl);
|
||||||
::rtl::Reference<::ucbhelper::InteractionContinuation> xSelected
|
::rtl::Reference<::ucbhelper::InteractionContinuation> xSelected
|
||||||
= xInteractionRequestImpl->getSelection();
|
= xInteractionRequestImpl->getSelection();
|
||||||
if (uno::Reference<task::XInteractionApprove>(xSelected.get(), uno::UNO_QUERY).is())
|
if (uno::Reference<task::XInteractionApprove>(cppu::getXWeak(xSelected.get()), uno::UNO_QUERY).is())
|
||||||
{
|
{
|
||||||
for (SfxViewFrame* pFrame = SfxViewFrame::GetFirst(); pFrame;
|
for (SfxViewFrame* pFrame = SfxViewFrame::GetFirst(); pFrame;
|
||||||
pFrame = SfxViewFrame::GetNext(*pFrame))
|
pFrame = SfxViewFrame::GetNext(*pFrame))
|
||||||
|
|
|
@ -828,7 +828,7 @@ OUString PasswordContainer::RequestPasswordFromUser( PasswordRequestMode aRMode,
|
||||||
|
|
||||||
if ( xSelection.is() )
|
if ( xSelection.is() )
|
||||||
{
|
{
|
||||||
Reference< XInteractionAbort > xAbort( xSelection.get(), UNO_QUERY );
|
Reference< XInteractionAbort > xAbort( xSelection->getXWeak(), UNO_QUERY );
|
||||||
if ( !xAbort.is() )
|
if ( !xAbort.is() )
|
||||||
{
|
{
|
||||||
const ::rtl::Reference< ucbhelper::InteractionSupplyAuthentication > & xSupp
|
const ::rtl::Reference< ucbhelper::InteractionSupplyAuthentication > & xSupp
|
||||||
|
|
|
@ -376,7 +376,7 @@ NameClashContinuation interactiveNameClashResolve(
|
||||||
{
|
{
|
||||||
// Handler handled the request.
|
// Handler handled the request.
|
||||||
uno::Reference< task::XInteractionAbort > xAbort(
|
uno::Reference< task::XInteractionAbort > xAbort(
|
||||||
xSelection.get(), uno::UNO_QUERY );
|
xSelection->getXWeak(), uno::UNO_QUERY );
|
||||||
if ( xAbort.is() )
|
if ( xAbort.is() )
|
||||||
{
|
{
|
||||||
// Abort.
|
// Abort.
|
||||||
|
@ -387,7 +387,7 @@ NameClashContinuation interactiveNameClashResolve(
|
||||||
uno::Reference<
|
uno::Reference<
|
||||||
ucb::XInteractionReplaceExistingData >
|
ucb::XInteractionReplaceExistingData >
|
||||||
xReplace(
|
xReplace(
|
||||||
xSelection.get(), uno::UNO_QUERY );
|
xSelection->getXWeak(), uno::UNO_QUERY );
|
||||||
if ( xReplace.is() )
|
if ( xReplace.is() )
|
||||||
{
|
{
|
||||||
// Try again: Replace existing data.
|
// Try again: Replace existing data.
|
||||||
|
@ -398,7 +398,7 @@ NameClashContinuation interactiveNameClashResolve(
|
||||||
uno::Reference<
|
uno::Reference<
|
||||||
ucb::XInteractionSupplyName >
|
ucb::XInteractionSupplyName >
|
||||||
xSupplyName(
|
xSupplyName(
|
||||||
xSelection.get(), uno::UNO_QUERY );
|
xSelection->getXWeak(), uno::UNO_QUERY );
|
||||||
if ( xSupplyName.is() )
|
if ( xSupplyName.is() )
|
||||||
{
|
{
|
||||||
// Try again: Use new name.
|
// Try again: Use new name.
|
||||||
|
|
|
@ -48,7 +48,7 @@ namespace cmis
|
||||||
{
|
{
|
||||||
// Handler handled the request.
|
// Handler handled the request.
|
||||||
uno::Reference< task::XInteractionAbort > xAbort(
|
uno::Reference< task::XInteractionAbort > xAbort(
|
||||||
xSelection.get(), uno::UNO_QUERY );
|
xSelection->getXWeak(), uno::UNO_QUERY );
|
||||||
if ( !xAbort.is() )
|
if ( !xAbort.is() )
|
||||||
{
|
{
|
||||||
const rtl::Reference<
|
const rtl::Reference<
|
||||||
|
@ -91,7 +91,7 @@ namespace cmis
|
||||||
if (xSelection.is())
|
if (xSelection.is())
|
||||||
{
|
{
|
||||||
// Handler handled the request.
|
// Handler handled the request.
|
||||||
uno::Reference<task::XInteractionAbort> xAbort(xSelection.get(),
|
uno::Reference<task::XInteractionAbort> xAbort(xSelection->getXWeak(),
|
||||||
uno::UNO_QUERY);
|
uno::UNO_QUERY);
|
||||||
if (!xAbort.is())
|
if (!xAbort.is())
|
||||||
{
|
{
|
||||||
|
|
|
@ -157,7 +157,7 @@ static void ooo_mount_operation_ask_password (GMountOperation *op,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
css::uno::Reference< css::task::XInteractionAbort > xAbort(xSelection.get(), css::uno::UNO_QUERY );
|
css::uno::Reference< css::task::XInteractionAbort > xAbort(xSelection->getXWeak(), css::uno::UNO_QUERY );
|
||||||
if ( xAbort.is() )
|
if ( xAbort.is() )
|
||||||
{
|
{
|
||||||
g_mount_operation_reply (op, G_MOUNT_OPERATION_ABORTED);
|
g_mount_operation_reply (op, G_MOUNT_OPERATION_ABORTED);
|
||||||
|
|
|
@ -2627,7 +2627,7 @@ static OUString obtainPassword(
|
||||||
{
|
{
|
||||||
// Handler handled the request.
|
// Handler handled the request.
|
||||||
uno::Reference< task::XInteractionAbort > xAbort(
|
uno::Reference< task::XInteractionAbort > xAbort(
|
||||||
xSelection.get(), uno::UNO_QUERY );
|
xSelection->getXWeak(), uno::UNO_QUERY );
|
||||||
if ( xAbort.is() )
|
if ( xAbort.is() )
|
||||||
{
|
{
|
||||||
throw ucb::CommandFailedException(
|
throw ucb::CommandFailedException(
|
||||||
|
@ -2637,7 +2637,7 @@ static OUString obtainPassword(
|
||||||
}
|
}
|
||||||
|
|
||||||
uno::Reference< task::XInteractionPassword > xPassword(
|
uno::Reference< task::XInteractionPassword > xPassword(
|
||||||
xSelection.get(), uno::UNO_QUERY );
|
xSelection->getXWeak(), uno::UNO_QUERY );
|
||||||
if ( xPassword.is() )
|
if ( xPassword.is() )
|
||||||
{
|
{
|
||||||
return xPassword->getPassword();
|
return xPassword->getPassword();
|
||||||
|
|
|
@ -37,25 +37,13 @@ namespace tdoc_ucp
|
||||||
{
|
{
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
class InteractionSupplyPassword :
|
using InteractionSupplyPassword_BASE = cppu::ImplInheritanceHelper<ucbhelper::InteractionContinuation,
|
||||||
public ucbhelper::InteractionContinuation,
|
task::XInteractionPassword>;
|
||||||
public lang::XTypeProvider,
|
class InteractionSupplyPassword : public InteractionSupplyPassword_BASE
|
||||||
public task::XInteractionPassword
|
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit InteractionSupplyPassword( ucbhelper::InteractionRequest * pRequest )
|
explicit InteractionSupplyPassword( ucbhelper::InteractionRequest * pRequest )
|
||||||
: InteractionContinuation( pRequest ) {}
|
: InteractionSupplyPassword_BASE( pRequest ) {}
|
||||||
|
|
||||||
// XInterface
|
|
||||||
virtual uno::Any SAL_CALL queryInterface( const uno::Type & rType ) override;
|
|
||||||
virtual void SAL_CALL acquire()
|
|
||||||
noexcept override;
|
|
||||||
virtual void SAL_CALL release()
|
|
||||||
noexcept override;
|
|
||||||
|
|
||||||
// XTypeProvider
|
|
||||||
virtual uno::Sequence< uno::Type > SAL_CALL getTypes() override;
|
|
||||||
virtual uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
|
|
||||||
|
|
||||||
// XInteractionContinuation
|
// XInteractionContinuation
|
||||||
virtual void SAL_CALL select() override;
|
virtual void SAL_CALL select() override;
|
||||||
|
@ -76,61 +64,6 @@ namespace tdoc_ucp
|
||||||
// InteractionSupplyPassword Implementation.
|
// InteractionSupplyPassword Implementation.
|
||||||
|
|
||||||
|
|
||||||
// XInterface methods.
|
|
||||||
|
|
||||||
|
|
||||||
// virtual
|
|
||||||
void SAL_CALL InteractionSupplyPassword::acquire()
|
|
||||||
noexcept
|
|
||||||
{
|
|
||||||
OWeakObject::acquire();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// virtual
|
|
||||||
void SAL_CALL InteractionSupplyPassword::release()
|
|
||||||
noexcept
|
|
||||||
{
|
|
||||||
OWeakObject::release();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// virtual
|
|
||||||
uno::Any SAL_CALL
|
|
||||||
InteractionSupplyPassword::queryInterface( const uno::Type & rType )
|
|
||||||
{
|
|
||||||
uno::Any aRet = cppu::queryInterface( rType,
|
|
||||||
static_cast< lang::XTypeProvider * >( this ),
|
|
||||||
static_cast< task::XInteractionContinuation * >( this ),
|
|
||||||
static_cast< task::XInteractionPassword * >( this ) );
|
|
||||||
|
|
||||||
return aRet.hasValue()
|
|
||||||
? aRet : InteractionContinuation::queryInterface( rType );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// XTypeProvider methods.
|
|
||||||
|
|
||||||
|
|
||||||
// virtual
|
|
||||||
uno::Sequence< sal_Int8 > SAL_CALL
|
|
||||||
InteractionSupplyPassword::getImplementationId()
|
|
||||||
{
|
|
||||||
return css::uno::Sequence<sal_Int8>();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// virtual
|
|
||||||
uno::Sequence< uno::Type > SAL_CALL InteractionSupplyPassword::getTypes()
|
|
||||||
{
|
|
||||||
static cppu::OTypeCollection s_aCollection(
|
|
||||||
cppu::UnoType<lang::XTypeProvider>::get(),
|
|
||||||
cppu::UnoType<task::XInteractionPassword>::get() );
|
|
||||||
|
|
||||||
return s_aCollection.getTypes();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// XInteractionContinuation methods.
|
// XInteractionContinuation methods.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -80,7 +80,7 @@ int DAVAuthListener_Impl::authenticate(
|
||||||
{
|
{
|
||||||
// Handler handled the request.
|
// Handler handled the request.
|
||||||
uno::Reference< task::XInteractionAbort > xAbort(
|
uno::Reference< task::XInteractionAbort > xAbort(
|
||||||
xSelection.get(), uno::UNO_QUERY );
|
xSelection->getXWeak(), uno::UNO_QUERY );
|
||||||
if ( !xAbort.is() )
|
if ( !xAbort.is() )
|
||||||
{
|
{
|
||||||
const rtl::Reference<
|
const rtl::Reference<
|
||||||
|
|
|
@ -143,44 +143,6 @@ void InteractionContinuation::recordSelection()
|
||||||
// InteractionAbort Implementation.
|
// InteractionAbort Implementation.
|
||||||
|
|
||||||
|
|
||||||
// XInterface methods.
|
|
||||||
|
|
||||||
|
|
||||||
// virtual
|
|
||||||
uno::Any SAL_CALL
|
|
||||||
InteractionAbort::queryInterface( const uno::Type & rType )
|
|
||||||
{
|
|
||||||
uno::Any aRet = cppu::queryInterface( rType,
|
|
||||||
static_cast< lang::XTypeProvider * >( this ),
|
|
||||||
static_cast< task::XInteractionContinuation * >( this ),
|
|
||||||
static_cast< task::XInteractionAbort * >( this ) );
|
|
||||||
|
|
||||||
return aRet.hasValue()
|
|
||||||
? aRet : InteractionContinuation::queryInterface( rType );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// XTypeProvider methods.
|
|
||||||
|
|
||||||
|
|
||||||
// virtual
|
|
||||||
uno::Sequence< sal_Int8 > SAL_CALL InteractionAbort::getImplementationId()
|
|
||||||
{
|
|
||||||
return css::uno::Sequence<sal_Int8>();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// virtual
|
|
||||||
uno::Sequence< uno::Type > SAL_CALL InteractionAbort::getTypes()
|
|
||||||
{
|
|
||||||
static cppu::OTypeCollection s_aCollection(
|
|
||||||
cppu::UnoType<lang::XTypeProvider>::get(),
|
|
||||||
cppu::UnoType<task::XInteractionAbort>::get() );
|
|
||||||
|
|
||||||
return s_aCollection.getTypes();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// XInteractionContinuation methods.
|
// XInteractionContinuation methods.
|
||||||
|
|
||||||
|
|
||||||
|
@ -194,44 +156,6 @@ void SAL_CALL InteractionAbort::select()
|
||||||
// InteractionRetry Implementation.
|
// InteractionRetry Implementation.
|
||||||
|
|
||||||
|
|
||||||
// XInterface methods.
|
|
||||||
|
|
||||||
|
|
||||||
// virtual
|
|
||||||
uno::Any SAL_CALL
|
|
||||||
InteractionRetry::queryInterface( const uno::Type & rType )
|
|
||||||
{
|
|
||||||
uno::Any aRet = cppu::queryInterface( rType,
|
|
||||||
static_cast< lang::XTypeProvider * >( this ),
|
|
||||||
static_cast< task::XInteractionContinuation * >( this ),
|
|
||||||
static_cast< task::XInteractionRetry * >( this ) );
|
|
||||||
|
|
||||||
return aRet.hasValue()
|
|
||||||
? aRet : InteractionContinuation::queryInterface( rType );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// XTypeProvider methods.
|
|
||||||
|
|
||||||
|
|
||||||
// virtual
|
|
||||||
uno::Sequence< sal_Int8 > SAL_CALL InteractionRetry::getImplementationId()
|
|
||||||
{
|
|
||||||
return css::uno::Sequence<sal_Int8>();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// virtual
|
|
||||||
uno::Sequence< uno::Type > SAL_CALL InteractionRetry::getTypes()
|
|
||||||
{
|
|
||||||
static cppu::OTypeCollection s_aCollection(
|
|
||||||
cppu::UnoType<lang::XTypeProvider>::get(),
|
|
||||||
cppu::UnoType<task::XInteractionRetry>::get() );
|
|
||||||
|
|
||||||
return s_aCollection.getTypes();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// XInteractionContinuation methods.
|
// XInteractionContinuation methods.
|
||||||
|
|
||||||
|
|
||||||
|
@ -245,44 +169,6 @@ void SAL_CALL InteractionRetry::select()
|
||||||
// InteractionApprove Implementation.
|
// InteractionApprove Implementation.
|
||||||
|
|
||||||
|
|
||||||
// XInterface methods.
|
|
||||||
|
|
||||||
|
|
||||||
// virtual
|
|
||||||
uno::Any SAL_CALL
|
|
||||||
InteractionApprove::queryInterface( const uno::Type & rType )
|
|
||||||
{
|
|
||||||
uno::Any aRet = cppu::queryInterface( rType,
|
|
||||||
static_cast< lang::XTypeProvider * >( this ),
|
|
||||||
static_cast< task::XInteractionContinuation * >( this ),
|
|
||||||
static_cast< task::XInteractionApprove * >( this ) );
|
|
||||||
|
|
||||||
return aRet.hasValue()
|
|
||||||
? aRet : InteractionContinuation::queryInterface( rType );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// XTypeProvider methods.
|
|
||||||
|
|
||||||
|
|
||||||
// virtual
|
|
||||||
uno::Sequence< sal_Int8 > SAL_CALL InteractionApprove::getImplementationId()
|
|
||||||
{
|
|
||||||
return css::uno::Sequence<sal_Int8>();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// virtual
|
|
||||||
uno::Sequence< uno::Type > SAL_CALL InteractionApprove::getTypes()
|
|
||||||
{
|
|
||||||
static cppu::OTypeCollection s_aCollection(
|
|
||||||
cppu::UnoType<lang::XTypeProvider>::get(),
|
|
||||||
cppu::UnoType<task::XInteractionApprove>::get() );
|
|
||||||
|
|
||||||
return s_aCollection.getTypes();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// XInteractionContinuation methods.
|
// XInteractionContinuation methods.
|
||||||
|
|
||||||
|
|
||||||
|
@ -296,44 +182,6 @@ void SAL_CALL InteractionApprove::select()
|
||||||
// InteractionDisapprove Implementation.
|
// InteractionDisapprove Implementation.
|
||||||
|
|
||||||
|
|
||||||
// XInterface methods.
|
|
||||||
|
|
||||||
|
|
||||||
// virtual
|
|
||||||
uno::Any SAL_CALL
|
|
||||||
InteractionDisapprove::queryInterface( const uno::Type & rType )
|
|
||||||
{
|
|
||||||
uno::Any aRet = cppu::queryInterface( rType,
|
|
||||||
static_cast< lang::XTypeProvider * >( this ),
|
|
||||||
static_cast< task::XInteractionContinuation * >( this ),
|
|
||||||
static_cast< task::XInteractionDisapprove * >( this ) );
|
|
||||||
|
|
||||||
return aRet.hasValue()
|
|
||||||
? aRet : InteractionContinuation::queryInterface( rType );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// XTypeProvider methods.
|
|
||||||
|
|
||||||
|
|
||||||
// virtual
|
|
||||||
uno::Sequence< sal_Int8 > SAL_CALL InteractionDisapprove::getImplementationId()
|
|
||||||
{
|
|
||||||
return css::uno::Sequence<sal_Int8>();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// virtual
|
|
||||||
uno::Sequence< uno::Type > SAL_CALL InteractionDisapprove::getTypes()
|
|
||||||
{
|
|
||||||
static cppu::OTypeCollection s_aCollection(
|
|
||||||
cppu::UnoType<lang::XTypeProvider>::get(),
|
|
||||||
cppu::UnoType<task::XInteractionDisapprove>::get() );
|
|
||||||
|
|
||||||
return s_aCollection.getTypes();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// XInteractionContinuation methods.
|
// XInteractionContinuation methods.
|
||||||
|
|
||||||
|
|
||||||
|
@ -347,46 +195,6 @@ void SAL_CALL InteractionDisapprove::select()
|
||||||
// InteractionSupplyAuthentication Implementation.
|
// InteractionSupplyAuthentication Implementation.
|
||||||
|
|
||||||
|
|
||||||
// XInterface methods.
|
|
||||||
|
|
||||||
|
|
||||||
// virtual
|
|
||||||
uno::Any SAL_CALL
|
|
||||||
InteractionSupplyAuthentication::queryInterface( const uno::Type & rType )
|
|
||||||
{
|
|
||||||
uno::Any aRet = cppu::queryInterface( rType,
|
|
||||||
static_cast< lang::XTypeProvider * >( this ),
|
|
||||||
static_cast< task::XInteractionContinuation * >( this ),
|
|
||||||
static_cast< ucb::XInteractionSupplyAuthentication * >( this ),
|
|
||||||
static_cast< ucb::XInteractionSupplyAuthentication2 * >( this ));
|
|
||||||
|
|
||||||
return aRet.hasValue()
|
|
||||||
? aRet : InteractionContinuation::queryInterface( rType );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// XTypeProvider methods.
|
|
||||||
|
|
||||||
|
|
||||||
// virtual
|
|
||||||
uno::Sequence< sal_Int8 > SAL_CALL
|
|
||||||
InteractionSupplyAuthentication::getImplementationId()
|
|
||||||
{
|
|
||||||
return css::uno::Sequence<sal_Int8>();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// virtual
|
|
||||||
uno::Sequence< uno::Type > SAL_CALL InteractionSupplyAuthentication::getTypes()
|
|
||||||
{
|
|
||||||
static cppu::OTypeCollection s_aCollection(
|
|
||||||
cppu::UnoType<lang::XTypeProvider>::get(),
|
|
||||||
cppu::UnoType<ucb::XInteractionSupplyAuthentication2>::get() );
|
|
||||||
|
|
||||||
return s_aCollection.getTypes();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// XInteractionContinuation methods.
|
// XInteractionContinuation methods.
|
||||||
|
|
||||||
|
|
||||||
|
@ -538,45 +346,6 @@ void SAL_CALL InteractionSupplyAuthentication::setUseSystemCredentials(
|
||||||
// InteractionReplaceExistingData Implementation.
|
// InteractionReplaceExistingData Implementation.
|
||||||
|
|
||||||
|
|
||||||
// XInterface methods.
|
|
||||||
|
|
||||||
|
|
||||||
// virtual
|
|
||||||
uno::Any SAL_CALL
|
|
||||||
InteractionReplaceExistingData::queryInterface( const uno::Type & rType )
|
|
||||||
{
|
|
||||||
uno::Any aRet = cppu::queryInterface( rType,
|
|
||||||
static_cast< lang::XTypeProvider * >( this ),
|
|
||||||
static_cast< task::XInteractionContinuation * >( this ),
|
|
||||||
static_cast< ucb::XInteractionReplaceExistingData * >( this ) );
|
|
||||||
|
|
||||||
return aRet.hasValue()
|
|
||||||
? aRet : InteractionContinuation::queryInterface( rType );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// XTypeProvider methods.
|
|
||||||
|
|
||||||
|
|
||||||
// virtual
|
|
||||||
uno::Sequence< sal_Int8 > SAL_CALL
|
|
||||||
InteractionReplaceExistingData::getImplementationId()
|
|
||||||
{
|
|
||||||
return css::uno::Sequence<sal_Int8>();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// virtual
|
|
||||||
uno::Sequence< uno::Type > SAL_CALL InteractionReplaceExistingData::getTypes()
|
|
||||||
{
|
|
||||||
static cppu::OTypeCollection s_aCollection(
|
|
||||||
cppu::UnoType<lang::XTypeProvider>::get(),
|
|
||||||
cppu::UnoType<ucb::XInteractionReplaceExistingData>::get() );
|
|
||||||
|
|
||||||
return s_aCollection.getTypes();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// XInteractionContinuation methods.
|
// XInteractionContinuation methods.
|
||||||
|
|
||||||
|
|
||||||
|
@ -588,20 +357,6 @@ void SAL_CALL InteractionReplaceExistingData::select()
|
||||||
|
|
||||||
// InteractionAuthFallback Implementation
|
// InteractionAuthFallback Implementation
|
||||||
|
|
||||||
// XInterface methods.
|
|
||||||
|
|
||||||
// virtual
|
|
||||||
uno::Any SAL_CALL
|
|
||||||
InteractionAuthFallback::queryInterface( const uno::Type & rType )
|
|
||||||
{
|
|
||||||
uno::Any aRet = cppu::queryInterface( rType,
|
|
||||||
static_cast< task::XInteractionContinuation * >( this ),
|
|
||||||
static_cast< ucb::XInteractionAuthFallback * >( this ));
|
|
||||||
|
|
||||||
return aRet.hasValue()
|
|
||||||
? aRet : InteractionContinuation::queryInterface( rType );
|
|
||||||
}
|
|
||||||
|
|
||||||
// XInteractionContinuation methods.
|
// XInteractionContinuation methods.
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
|
|
|
@ -62,25 +62,23 @@ ContinuationFlags SimpleInteractionRequest::getResponse() const
|
||||||
rtl::Reference< InteractionContinuation > xSelection = getSelection();
|
rtl::Reference< InteractionContinuation > xSelection = getSelection();
|
||||||
if ( xSelection.is() )
|
if ( xSelection.is() )
|
||||||
{
|
{
|
||||||
InteractionContinuation * pSelection = xSelection.get();
|
|
||||||
|
|
||||||
uno::Reference< task::XInteractionAbort > xAbort(
|
uno::Reference< task::XInteractionAbort > xAbort(
|
||||||
pSelection, uno::UNO_QUERY );
|
xSelection->getXWeak(), uno::UNO_QUERY );
|
||||||
if ( xAbort.is() )
|
if ( xAbort.is() )
|
||||||
return ContinuationFlags::Abort;
|
return ContinuationFlags::Abort;
|
||||||
|
|
||||||
uno::Reference< task::XInteractionRetry > xRetry(
|
uno::Reference< task::XInteractionRetry > xRetry(
|
||||||
pSelection, uno::UNO_QUERY );
|
xSelection->getXWeak(), uno::UNO_QUERY );
|
||||||
if ( xRetry.is() )
|
if ( xRetry.is() )
|
||||||
return ContinuationFlags::Retry;
|
return ContinuationFlags::Retry;
|
||||||
|
|
||||||
uno::Reference< task::XInteractionApprove > xApprove(
|
uno::Reference< task::XInteractionApprove > xApprove(
|
||||||
pSelection, uno::UNO_QUERY );
|
xSelection->getXWeak(), uno::UNO_QUERY );
|
||||||
if ( xApprove.is() )
|
if ( xApprove.is() )
|
||||||
return ContinuationFlags::Approve;
|
return ContinuationFlags::Approve;
|
||||||
|
|
||||||
uno::Reference< task::XInteractionDisapprove > xDisapprove(
|
uno::Reference< task::XInteractionDisapprove > xDisapprove(
|
||||||
pSelection, uno::UNO_QUERY );
|
xSelection->getXWeak(), uno::UNO_QUERY );
|
||||||
if ( xDisapprove.is() )
|
if ( xDisapprove.is() )
|
||||||
return ContinuationFlags::Disapprove;
|
return ContinuationFlags::Disapprove;
|
||||||
|
|
||||||
|
|
|
@ -27,35 +27,21 @@ using namespace com::sun::star;
|
||||||
|
|
||||||
namespace ucbhelper {
|
namespace ucbhelper {
|
||||||
|
|
||||||
|
using InteractionSupplyName_BASE = cppu::ImplInheritanceHelper<InteractionContinuation,
|
||||||
|
css::ucb::XInteractionSupplyName>;
|
||||||
/**
|
/**
|
||||||
* This class implements a standard interaction continuation, namely the
|
* This class implements a standard interaction continuation, namely the
|
||||||
* interface XInteractionSupplyName. Instances of this class can be passed
|
* interface XInteractionSupplyName. Instances of this class can be passed
|
||||||
* along with an interaction request to indicate the possibility to
|
* along with an interaction request to indicate the possibility to
|
||||||
* supply a new name.
|
* supply a new name.
|
||||||
*/
|
*/
|
||||||
class InteractionSupplyName : public InteractionContinuation,
|
class InteractionSupplyName : public InteractionSupplyName_BASE
|
||||||
public css::lang::XTypeProvider,
|
|
||||||
public css::ucb::XInteractionSupplyName
|
|
||||||
{
|
{
|
||||||
OUString m_aName;
|
OUString m_aName;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit InteractionSupplyName( InteractionRequest * pRequest )
|
explicit InteractionSupplyName( InteractionRequest * pRequest )
|
||||||
: InteractionContinuation( pRequest ) {}
|
: InteractionSupplyName_BASE( pRequest ) {}
|
||||||
|
|
||||||
// XInterface
|
|
||||||
virtual css::uno::Any SAL_CALL
|
|
||||||
queryInterface( const css::uno::Type & rType ) override;
|
|
||||||
virtual void SAL_CALL acquire()
|
|
||||||
noexcept override;
|
|
||||||
virtual void SAL_CALL release()
|
|
||||||
noexcept override;
|
|
||||||
|
|
||||||
// XTypeProvider
|
|
||||||
virtual css::uno::Sequence< css::uno::Type > SAL_CALL
|
|
||||||
getTypes() override;
|
|
||||||
virtual css::uno::Sequence< sal_Int8 > SAL_CALL
|
|
||||||
getImplementationId() override;
|
|
||||||
|
|
||||||
// XInteractionContinuation
|
// XInteractionContinuation
|
||||||
virtual void SAL_CALL select() override;
|
virtual void SAL_CALL select() override;
|
||||||
|
@ -74,44 +60,6 @@ public:
|
||||||
const OUString & getName() const { return m_aName; }
|
const OUString & getName() const { return m_aName; }
|
||||||
};
|
};
|
||||||
|
|
||||||
void SAL_CALL InteractionSupplyName::acquire()
|
|
||||||
noexcept
|
|
||||||
{
|
|
||||||
OWeakObject::acquire();
|
|
||||||
}
|
|
||||||
|
|
||||||
void SAL_CALL InteractionSupplyName::release()
|
|
||||||
noexcept
|
|
||||||
{
|
|
||||||
OWeakObject::release();
|
|
||||||
}
|
|
||||||
|
|
||||||
uno::Any SAL_CALL
|
|
||||||
InteractionSupplyName::queryInterface( const uno::Type & rType )
|
|
||||||
{
|
|
||||||
uno::Any aRet = cppu::queryInterface( rType,
|
|
||||||
static_cast< lang::XTypeProvider * >( this ),
|
|
||||||
static_cast< task::XInteractionContinuation * >( this ),
|
|
||||||
static_cast< ucb::XInteractionSupplyName * >( this ) );
|
|
||||||
|
|
||||||
return aRet.hasValue()
|
|
||||||
? aRet : InteractionContinuation::queryInterface( rType );
|
|
||||||
}
|
|
||||||
|
|
||||||
uno::Sequence< sal_Int8 > SAL_CALL InteractionSupplyName::getImplementationId()
|
|
||||||
{
|
|
||||||
return css::uno::Sequence<sal_Int8>();
|
|
||||||
}
|
|
||||||
|
|
||||||
uno::Sequence< uno::Type > SAL_CALL InteractionSupplyName::getTypes()
|
|
||||||
{
|
|
||||||
static cppu::OTypeCollection s_aCollection(
|
|
||||||
cppu::UnoType<lang::XTypeProvider>::get(),
|
|
||||||
cppu::UnoType<ucb::XInteractionSupplyName>::get() );
|
|
||||||
|
|
||||||
return s_aCollection.getTypes();
|
|
||||||
}
|
|
||||||
|
|
||||||
void SAL_CALL InteractionSupplyName::select()
|
void SAL_CALL InteractionSupplyName::select()
|
||||||
{
|
{
|
||||||
recordSelection();
|
recordSelection();
|
||||||
|
|
|
@ -750,8 +750,7 @@ static bool UCBOpenContentSync(
|
||||||
rtl::Reference< ucbhelper::InteractionContinuation > ref
|
rtl::Reference< ucbhelper::InteractionContinuation > ref
|
||||||
= xIR->getSelection();
|
= xIR->getSelection();
|
||||||
if(ref.is()) {
|
if(ref.is()) {
|
||||||
Reference<XInterface> xInt(ref);
|
xRet.set(ref->getXWeak(), UNO_QUERY);
|
||||||
xRet.set(xInt,UNO_QUERY);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue