diff options
-rw-r--r-- | fpicker/source/office/RemoteFilesDialog.cxx | 10 | ||||
-rw-r--r-- | fpicker/source/office/iodlg.cxx | 5 | ||||
-rw-r--r-- | include/ucbhelper/interceptedinteraction.hxx | 5 |
3 files changed, 10 insertions, 10 deletions
diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx index 30115abd93e8..1282d47115a3 100644 --- a/fpicker/source/office/RemoteFilesDialog.cxx +++ b/fpicker/source/office/RemoteFilesDialog.cxx @@ -683,11 +683,10 @@ IMPL_LINK ( RemoteFilesDialog, EditServiceMenuHdl, const OString&, rIdent, void { OUString sUserName = aURLEntries.UserList[0].UserName; - ::comphelper::SimplePasswordRequest* pPasswordRequest + rtl::Reference<::comphelper::SimplePasswordRequest> pPasswordRequest = new ::comphelper::SimplePasswordRequest; - Reference< XInteractionRequest > rRequest( pPasswordRequest ); - xInteractionHandler->handle( rRequest ); + xInteractionHandler->handle( pPasswordRequest ); if ( pPasswordRequest->isPassword() ) { @@ -1180,10 +1179,9 @@ bool RemoteFilesDialog::ContentIsDocument( const OUString& rURL ) // It's a webdav URL, so use the same open sequence as in normal open process. // Let's use a comphelper::StillReadWriteInteraction to trap errors here without showing the user. // This sequence will result in an exception if the target URL resource is not present - comphelper::StillReadWriteInteraction* pInteraction = new comphelper::StillReadWriteInteraction(xInteractionHandler,xInteractionHandler); - css::uno::Reference< css::task::XInteractionHandler > xInteraction(static_cast< css::task::XInteractionHandler* >(pInteraction), css::uno::UNO_QUERY); + rtl::Reference<comphelper::StillReadWriteInteraction> pInteraction = new comphelper::StillReadWriteInteraction(xInteractionHandler,xInteractionHandler); - Reference< XCommandEnvironment > xEnv = new ::ucbhelper::CommandEnvironment( xInteraction, Reference< XProgressHandler >() ); + Reference< XCommandEnvironment > xEnv = new ::ucbhelper::CommandEnvironment( pInteraction, Reference< XProgressHandler >() ); ::ucbhelper::Content aContent( rURL, xEnv, m_xContext ); aContent.openStream(); diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx index cbb354ecf585..fe199ae5a530 100644 --- a/fpicker/source/office/iodlg.cxx +++ b/fpicker/source/office/iodlg.cxx @@ -1401,14 +1401,13 @@ void SvtFileDialog::displayIOException( const OUString& _rURL, IOErrorCode _eCod aException.Classification = InteractionClassification_ERROR; // let and interaction handler handle this exception - ::comphelper::OInteractionRequest* pRequest = nullptr; - Reference< css::task::XInteractionRequest > xRequest = pRequest = + rtl::Reference<::comphelper::OInteractionRequest> pRequest = new ::comphelper::OInteractionRequest( makeAny( aException ) ); pRequest->addContinuation( new ::comphelper::OInteractionAbort( ) ); Reference< XInteractionHandler2 > xHandler( InteractionHandler::createWithParent( ::comphelper::getProcessComponentContext(), nullptr ) ); - xHandler->handle( xRequest ); + xHandler->handle( pRequest ); } catch( const Exception& ) { diff --git a/include/ucbhelper/interceptedinteraction.hxx b/include/ucbhelper/interceptedinteraction.hxx index b6a410ca3dba..85699c1d534b 100644 --- a/include/ucbhelper/interceptedinteraction.hxx +++ b/include/ucbhelper/interceptedinteraction.hxx @@ -41,7 +41,10 @@ namespace ucbhelper{ only - or as base class if interactions must be modified. */ -class UCBHELPER_DLLPUBLIC InterceptedInteraction : public ::cppu::WeakImplHelper< css::task::XInteractionHandler > +// extra struct to work around MSVC linking issue +struct InterceptedInteraction_Base : public ::cppu::WeakImplHelper< css::task::XInteractionHandler > {}; + +class UCBHELPER_DLLPUBLIC InterceptedInteraction : public InterceptedInteraction_Base { // types |