summaryrefslogtreecommitdiff
path: root/ucbhelper/source
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@gmail.com>2011-08-25 22:00:10 +0200
committerMatúš Kukan <matus.kukan@gmail.com>2011-08-26 01:30:21 +0200
commit8c4e7806b2e8486108a817ded456433fc77f60a5 (patch)
tree896095f4c536ec49e2349c7efee7d4d5ea354f60 /ucbhelper/source
parent805aa2151e476a5e8e60806c7321ba7288f91813 (diff)
unusedcode: ucbhelper:: cleaning
Diffstat (limited to 'ucbhelper/source')
-rw-r--r--ucbhelper/source/client/content.cxx278
-rw-r--r--ucbhelper/source/client/contentbroker.cxx28
-rw-r--r--ucbhelper/source/provider/commandenvironmentproxy.cxx168
-rw-r--r--ucbhelper/source/provider/contenthelper.cxx20
-rw-r--r--ucbhelper/source/provider/handleinteractionrequest.cxx164
-rw-r--r--ucbhelper/source/provider/propertyvalueset.cxx130
-rw-r--r--ucbhelper/source/provider/resultsethelper.cxx10
-rw-r--r--ucbhelper/source/provider/simpleauthenticationrequest.cxx81
8 files changed, 0 insertions, 879 deletions
diff --git a/ucbhelper/source/client/content.cxx b/ucbhelper/source/client/content.cxx
index ff2a8ef9f21a..19fd94e2a9e6 100644
--- a/ucbhelper/source/client/content.cxx
+++ b/ucbhelper/source/client/content.cxx
@@ -205,7 +205,6 @@ public:
Reference< XMultiServiceFactory > getServiceManager() { return m_xSMgr; }
Any executeCommand( const Command& rCommand );
- void abortCommand();
inline const Reference< XCommandEnvironment >& getEnvironment() const;
inline void setEnvironment(
@@ -405,18 +404,6 @@ Content::Content( const rtl::OUString& rURL,
}
//=========================================================================
-Content::Content( const Reference< XContentIdentifier >& rId,
- const Reference< XCommandEnvironment >& rEnv )
- throw ( ContentCreationException, RuntimeException )
-{
- ContentBroker* pBroker = getContentBroker( true );
-
- Reference< XContent > xContent = getContent( *pBroker, rId, true );
-
- m_xImpl = new Content_Impl( pBroker->getServiceManager(), xContent, rEnv );
-}
-
-//=========================================================================
Content::Content( const Reference< XContent >& rContent,
const Reference< XCommandEnvironment >& rEnv )
throw ( ContentCreationException, RuntimeException )
@@ -458,42 +445,6 @@ sal_Bool Content::create( const rtl::OUString& rURL,
}
//=========================================================================
-// static
-sal_Bool Content::create( const Reference< XContentIdentifier >& rId,
- const Reference< XCommandEnvironment >& rEnv,
- Content& rContent )
-{
- ContentBroker* pBroker = getContentBroker( false );
- if ( !pBroker )
- return sal_False;
-
- Reference< XContent > xContent = getContent( *pBroker, rId, false );
- if ( !xContent.is() )
- return sal_False;
-
- rContent.m_xImpl
- = new Content_Impl( pBroker->getServiceManager(), xContent, rEnv );
-
- return sal_True;
-}
-
-//=========================================================================
-// static
-sal_Bool Content::create( const Reference< XContent >& xContent,
- const Reference< XCommandEnvironment >& rEnv,
- Content& rContent )
-{
- ContentBroker* pBroker = getContentBroker( false );
- if ( !pBroker )
- return sal_False;
-
- rContent.m_xImpl
- = new Content_Impl( pBroker->getServiceManager(), xContent, rEnv );
-
- return sal_True;
-}
-
-//=========================================================================
Content::~Content()
{
}
@@ -574,17 +525,6 @@ Any Content::getPropertyValue( const rtl::OUString& rPropertyName )
}
//=========================================================================
-Any Content::getPropertyValue( sal_Int32 nPropertyHandle )
- throw( CommandAbortedException, RuntimeException, Exception )
-{
- Sequence< sal_Int32 > aHandles( 1 );
- aHandles.getArray()[ 0 ] = nPropertyHandle;
-
- Sequence< Any > aRet = getPropertyValues( aHandles );
- return aRet.getConstArray()[ 0 ];
-}
-
-//=========================================================================
Any Content::setPropertyValue( const rtl::OUString& rName,
const Any& rValue )
throw( CommandAbortedException, RuntimeException, Exception )
@@ -600,21 +540,6 @@ Any Content::setPropertyValue( const rtl::OUString& rName,
}
//=========================================================================
-Any Content::setPropertyValue( const sal_Int32 nPropertyHandle,
- const Any& rValue )
- throw( CommandAbortedException, RuntimeException, Exception )
-{
- Sequence< sal_Int32 > aHandles( 1 );
- aHandles.getArray()[ 0 ] = nPropertyHandle;
-
- Sequence< Any > aValues( 1 );
- aValues.getArray()[ 0 ] = rValue;
-
- Sequence< Any > aErrors = setPropertyValues( aHandles, aValues );
- return aErrors.getConstArray()[ 0 ];
-}
-
-//=========================================================================
Sequence< Any > Content::getPropertyValues(
const Sequence< rtl::OUString >& rPropertyNames )
throw( CommandAbortedException, RuntimeException, Exception )
@@ -832,25 +757,6 @@ Any Content::executeCommand( const rtl::OUString& rCommandName,
}
//=========================================================================
-Any Content::executeCommand( sal_Int32 nCommandHandle,
- const Any& rCommandArgument )
- throw( CommandAbortedException, RuntimeException, Exception )
-{
- Command aCommand;
- aCommand.Name = rtl::OUString(); // n/a
- aCommand.Handle = nCommandHandle;
- aCommand.Argument = rCommandArgument;
-
- return m_xImpl->executeCommand( aCommand );
-}
-
-//=========================================================================
-void Content::abortCommand()
-{
- m_xImpl->abortCommand();
-}
-
-//=========================================================================
Any Content::createCursorAny( const Sequence< rtl::OUString >& rPropertyNames,
ResultSetInclude eMode )
throw( CommandAbortedException, RuntimeException, Exception )
@@ -947,36 +853,6 @@ Reference< XResultSet > Content::createCursor(
}
//=========================================================================
-Reference< XResultSet > Content::createCursor(
- const Sequence< sal_Int32 >& rPropertyHandles,
- ResultSetInclude eMode )
- throw( CommandAbortedException, RuntimeException, Exception )
-{
- Any aCursorAny = createCursorAny( rPropertyHandles, eMode );
-
- Reference< XDynamicResultSet > xDynSet;
- Reference< XResultSet > aResult;
-
- aCursorAny >>= xDynSet;
- if ( xDynSet.is() )
- aResult = xDynSet->getStaticResultSet();
-
- OSL_ENSURE( aResult.is(), "Content::createCursor - no cursor!" );
-
- if ( !aResult.is() )
- {
- // Former, the open command directly returned a XResultSet.
- aCursorAny >>= aResult;
-
- OSL_ENSURE( !aResult.is(),
- "Content::createCursor - open-Command must "
- "return a Reference< XDynnamicResultSet >!" );
- }
-
- return aResult;
-}
-
-//=========================================================================
Reference< XDynamicResultSet > Content::createDynamicCursor(
const Sequence< rtl::OUString >& rPropertyNames,
ResultSetInclude eMode )
@@ -1005,76 +881,6 @@ Reference< XDynamicResultSet > Content::createDynamicCursor(
}
//=========================================================================
-Reference< XDynamicResultSet > Content::createSortedDynamicCursor(
- const Sequence< rtl::OUString >& rPropertyNames,
- const Sequence< NumberedSortingInfo >& rSortInfo,
- Reference< XAnyCompareFactory > rAnyCompareFactory,
- ResultSetInclude eMode )
- throw( CommandAbortedException, RuntimeException, Exception )
-{
- Reference< XDynamicResultSet > aResult;
- Reference< XDynamicResultSet > aOrigCursor = createDynamicCursor( rPropertyNames, eMode );
-
- if( aOrigCursor.is() )
- {
- Reference< XMultiServiceFactory > aServiceManager = m_xImpl->getServiceManager();
-
- if( aServiceManager.is() )
- {
- Reference< XSortedDynamicResultSetFactory > aSortFactory( aServiceManager->createInstance(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SortedDynamicResultSetFactory"))),
- UNO_QUERY );
-
- aResult = aSortFactory->createSortedDynamicResultSet( aOrigCursor,
- rSortInfo,
- rAnyCompareFactory );
- }
-
- OSL_ENSURE( aResult.is(), "Content::createSortedDynamicCursor - no sorted cursor!\n" );
-
- if( !aResult.is() )
- aResult = aOrigCursor;
- }
-
- return aResult;
-}
-
-//=========================================================================
-Reference< XDynamicResultSet > Content::createSortedDynamicCursor(
- const Sequence< sal_Int32 >& rPropertyHandles,
- const Sequence< NumberedSortingInfo >& rSortInfo,
- Reference< XAnyCompareFactory > rAnyCompareFactory,
- ResultSetInclude eMode )
- throw( CommandAbortedException, RuntimeException, Exception )
-{
- Reference< XDynamicResultSet > aResult;
- Reference< XDynamicResultSet > aOrigCursor = createDynamicCursor( rPropertyHandles, eMode );
-
- if( aOrigCursor.is() )
- {
- Reference< XMultiServiceFactory > aServiceManager = m_xImpl->getServiceManager();
-
- if( aServiceManager.is() )
- {
- Reference< XSortedDynamicResultSetFactory > aSortFactory( aServiceManager->createInstance(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SortedDynamicResultSetFactory"))),
- UNO_QUERY );
-
- aResult = aSortFactory->createSortedDynamicResultSet( aOrigCursor,
- rSortInfo,
- rAnyCompareFactory );
- }
-
- OSL_ENSURE( aResult.is(), "Content::createSortedDynamicCursor - no sorted cursor!\n" );
-
- if( !aResult.is() )
- aResult = aOrigCursor;
- }
-
- return aResult;
-}
-
-//=========================================================================
Reference< XResultSet > Content::createSortedCursor(
const Sequence< rtl::OUString >& rPropertyNames,
const Sequence< NumberedSortingInfo >& rSortInfo,
@@ -1129,60 +935,6 @@ Reference< XResultSet > Content::createSortedCursor(
}
//=========================================================================
-Reference< XResultSet > Content::createSortedCursor(
- const Sequence< sal_Int32 >& rPropertyHandles,
- const Sequence< NumberedSortingInfo >& rSortInfo,
- Reference< XAnyCompareFactory > rAnyCompareFactory,
- ResultSetInclude eMode )
- throw( CommandAbortedException, RuntimeException, Exception )
-{
- Reference< XResultSet > aResult;
- Reference< XDynamicResultSet > aDynSet;
-
- Any aCursorAny = createCursorAny( rPropertyHandles, eMode );
-
- aCursorAny >>= aDynSet;
-
- if( aDynSet.is() )
- {
- Reference< XDynamicResultSet > aDynResult;
- Reference< XMultiServiceFactory > aServiceManager = m_xImpl->getServiceManager();
-
- if( aServiceManager.is() )
- {
- Reference< XSortedDynamicResultSetFactory > aSortFactory( aServiceManager->createInstance(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SortedDynamicResultSetFactory"))),
- UNO_QUERY );
-
- aDynResult = aSortFactory->createSortedDynamicResultSet( aDynSet,
- rSortInfo,
- rAnyCompareFactory );
- }
-
- OSL_ENSURE( aDynResult.is(), "Content::createSortedCursor - no sorted cursor!\n" );
-
- if( aDynResult.is() )
- aResult = aDynResult->getStaticResultSet();
- else
- aResult = aDynSet->getStaticResultSet();
- }
-
- OSL_ENSURE( aResult.is(), "Content::createSortedCursor - no cursor!" );
-
- if ( !aResult.is() )
- {
- // Former, the open command directly returned a XResultSet.
- aCursorAny >>= aResult;
-
- OSL_ENSURE( !aResult.is(),
- "Content::createCursor - open-Command must "
- "return a Reference< XDynnamicResultSet >!" );
- }
-
- return aResult;
-}
-
-//=========================================================================
Reference< XInputStream > Content::openStream()
throw( CommandAbortedException, RuntimeException, Exception )
{
@@ -1384,21 +1136,6 @@ sal_Bool Content::insertNewContent( const rtl::OUString& rContentType,
//=========================================================================
sal_Bool Content::insertNewContent( const rtl::OUString& rContentType,
- const Sequence< sal_Int32 >&
- nPropertyHandles,
- const Sequence< Any >& rPropertyValues,
- Content& rNewContent )
- throw( CommandAbortedException, RuntimeException, Exception )
-{
- return insertNewContent( rContentType,
- nPropertyHandles,
- rPropertyValues,
- new EmptyInputStream,
- rNewContent );
-}
-
-//=========================================================================
-sal_Bool Content::insertNewContent( const rtl::OUString& rContentType,
const Sequence< rtl::OUString >&
rPropertyNames,
const Sequence< Any >& rPropertyValues,
@@ -1871,21 +1608,6 @@ Any Content_Impl::executeCommand( const Command& rCommand )
}
//=========================================================================
-void Content_Impl::abortCommand()
-{
- sal_Int32 nCommandId;
- Reference< XCommandProcessor > xCommandProcessor;
- {
- osl::MutexGuard aGuard( m_aMutex );
- nCommandId = m_nCommandId;
- xCommandProcessor = m_xCommandProcessor;
- }
-
- if ( ( nCommandId != 0 ) && xCommandProcessor.is() )
- xCommandProcessor->abort( nCommandId );
-}
-
-//=========================================================================
inline const Reference< XCommandEnvironment >&
Content_Impl::getEnvironment() const
{
diff --git a/ucbhelper/source/client/contentbroker.cxx b/ucbhelper/source/client/contentbroker.cxx
index 8eb455ca0aeb..36669b0b1fd0 100644
--- a/ucbhelper/source/client/contentbroker.cxx
+++ b/ucbhelper/source/client/contentbroker.cxx
@@ -206,34 +206,6 @@ sal_Bool ContentBroker::initialize(
//=========================================================================
// static
-sal_Bool ContentBroker::initialize(
- const Reference< XMultiServiceFactory >& rSMgr,
- const ContentProviderDataList & rData )
-{
- OSL_ENSURE( !m_pTheBroker,
- "ContentBroker::initialize - already initialized!" );
-
- if ( !m_pTheBroker )
- {
- osl::Guard< osl::Mutex > aGuard( getGlobalContentBrokerMutex() );
-
- if ( !m_pTheBroker )
- {
- ContentBroker * pBroker = new ContentBroker( rSMgr, rData );
-
- // Force init to be able to detect UCB init trouble immediately.
- if ( pBroker->m_pImpl->initialize() )
- m_pTheBroker = pBroker;
- else
- delete pBroker;
- }
- }
-
- return m_pTheBroker != 0;
-}
-
-//=========================================================================
-// static
void ContentBroker::deinitialize()
{
osl::MutexGuard aGuard( getGlobalContentBrokerMutex() );
diff --git a/ucbhelper/source/provider/commandenvironmentproxy.cxx b/ucbhelper/source/provider/commandenvironmentproxy.cxx
deleted file mode 100644
index 7e3f10047812..000000000000
--- a/ucbhelper/source/provider/commandenvironmentproxy.cxx
+++ /dev/null
@@ -1,168 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_ucbhelper.hxx"
-
-/**************************************************************************
- TODO
- **************************************************************************
-
- *************************************************************************/
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/lang/XComponent.hpp>
-#include <com/sun/star/ucb/XContentIdentifierFactory.hpp>
-#include <com/sun/star/ucb/XContentProvider.hpp>
-#include <com/sun/star/ucb/XContentProviderManager.hpp>
-#include <osl/mutex.hxx>
-#include <ucbhelper/commandenvironmentproxy.hxx>
-
-using namespace com::sun::star::lang;
-using namespace com::sun::star::task;
-using namespace com::sun::star::ucb;
-using namespace com::sun::star::uno;
-
-namespace ucbhelper
-{
-
-//=========================================================================
-//=========================================================================
-//
-// struct CommandEnvironmentProxy_Impl.
-//
-//=========================================================================
-//=========================================================================
-
-struct CommandEnvironmentProxy_Impl
-{
- osl::Mutex m_aMutex;
- Reference< XCommandEnvironment > m_xEnv;
- Reference< XInteractionHandler > m_xInteractionHandler;
- Reference< XProgressHandler > m_xProgressHandler;
- sal_Bool m_bGotInteractionHandler;
- sal_Bool m_bGotProgressHandler;
-
- CommandEnvironmentProxy_Impl(
- const Reference< XCommandEnvironment >& rxEnv )
- : m_xEnv( rxEnv ), m_bGotInteractionHandler( sal_False ),
- m_bGotProgressHandler( sal_False ) {}
-};
-
-//=========================================================================
-//=========================================================================
-//
-// CommandEnvironmentProxy Implementation.
-//
-//=========================================================================
-//=========================================================================
-
-CommandEnvironmentProxy::CommandEnvironmentProxy(
- const Reference< XCommandEnvironment >& rxEnv )
-{
- m_pImpl = new CommandEnvironmentProxy_Impl( rxEnv );
-}
-
-//=========================================================================
-// virtual
-CommandEnvironmentProxy::~CommandEnvironmentProxy()
-{
- delete m_pImpl;
-}
-
-//=========================================================================
-//
-// XInterface methods
-//
-//=========================================================================
-
-XINTERFACE_IMPL_2( CommandEnvironmentProxy,
- XTypeProvider,
- XCommandEnvironment );
-
-//=========================================================================
-//
-// XTypeProvider methods
-//
-//=========================================================================
-
-XTYPEPROVIDER_IMPL_2( CommandEnvironmentProxy,
- XTypeProvider,
- XCommandEnvironment );
-
-//=========================================================================
-//
-// XCommandEnvironemnt methods.
-//
-//=========================================================================
-
-// virtual
-Reference< XInteractionHandler > SAL_CALL
-CommandEnvironmentProxy::getInteractionHandler()
- throw ( RuntimeException )
-{
- if ( m_pImpl->m_xEnv.is() )
- {
- if ( !m_pImpl->m_bGotInteractionHandler )
- {
- osl::MutexGuard aGuard( m_pImpl->m_aMutex );
- if ( !m_pImpl->m_bGotInteractionHandler )
- {
- m_pImpl->m_xInteractionHandler
- = m_pImpl->m_xEnv->getInteractionHandler();
- m_pImpl->m_bGotInteractionHandler = sal_True;
- }
- }
- }
- return m_pImpl->m_xInteractionHandler;
-}
-
-//=========================================================================
-// virtual
-Reference< XProgressHandler > SAL_CALL
-CommandEnvironmentProxy::getProgressHandler()
- throw ( RuntimeException )
-{
- if ( m_pImpl->m_xEnv.is() )
- {
- if ( !m_pImpl->m_bGotProgressHandler )
- {
- osl::MutexGuard aGuard( m_pImpl->m_aMutex );
- if ( !m_pImpl->m_bGotProgressHandler )
- {
- m_pImpl->m_xProgressHandler
- = m_pImpl->m_xEnv->getProgressHandler();
- m_pImpl->m_bGotProgressHandler = sal_True;
- }
- }
- }
- return m_pImpl->m_xProgressHandler;
-}
-
-} /* namespace ucbhelper */
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucbhelper/source/provider/contenthelper.cxx b/ucbhelper/source/provider/contenthelper.cxx
index 6a5073750b9a..ecc7ad24d1f9 100644
--- a/ucbhelper/source/provider/contenthelper.cxx
+++ b/ucbhelper/source/provider/contenthelper.cxx
@@ -954,26 +954,6 @@ void ContentImplHelper::notifyPropertySetInfoChange(
}
//=========================================================================
-void ContentImplHelper::notifyCommandInfoChange(
- const com::sun::star::ucb::CommandInfoChangeEvent& evt ) const
-{
- if ( !m_pImpl->m_pCommandChangeListeners )
- return;
-
- // Notify event listeners.
- cppu::OInterfaceIteratorHelper aIter(
- *m_pImpl->m_pCommandChangeListeners );
- while ( aIter.hasMoreElements() )
- {
- // Propagate event.
- uno::Reference< com::sun::star::ucb::XCommandInfoChangeListener >
- xListener( aIter.next(), uno::UNO_QUERY );
- if ( xListener.is() )
- xListener->commandInfoChange( evt );
- }
-}
-
-//=========================================================================
void ContentImplHelper::notifyContentEvent(
const com::sun::star::ucb::ContentEvent& evt ) const
{
diff --git a/ucbhelper/source/provider/handleinteractionrequest.cxx b/ucbhelper/source/provider/handleinteractionrequest.cxx
deleted file mode 100644
index 84a010fde6d9..000000000000
--- a/ucbhelper/source/provider/handleinteractionrequest.cxx
+++ /dev/null
@@ -1,164 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_ucbhelper.hxx"
-#include "ucbhelper/handleinteractionrequest.hxx"
-#include "com/sun/star/task/XInteractionAbort.hpp"
-#include "com/sun/star/task/XInteractionHandler.hpp"
-#include "com/sun/star/task/XInteractionRetry.hpp"
-#include "com/sun/star/ucb/CommandFailedException.hpp"
-#include "com/sun/star/ucb/XCommandEnvironment.hpp"
-#include "com/sun/star/uno/Reference.hxx"
-#include "com/sun/star/uno/RuntimeException.hpp"
-#include "cppuhelper/exc_hlp.hxx"
-#include "osl/diagnose.h"
-#include "rtl/ustring.hxx"
-#include "ucbhelper/interactionrequest.hxx"
-#include "ucbhelper/simpleauthenticationrequest.hxx"
-#include "ucbhelper/simpleinteractionrequest.hxx"
-#include "ucbhelper/simplecertificatevalidationrequest.hxx"
-#ifndef INCLUDED_UTILITY
-#include <utility>
-#define INCLUDED_UTILITY
-#endif
-
-using namespace com::sun::star;
-
-namespace {
-
-void
-handle(uno::Reference< task::XInteractionRequest > const & rRequest,
- uno::Reference< ucb::XCommandEnvironment > const & rEnvironment)
- SAL_THROW((uno::Exception))
-{
- OSL_ENSURE(rRequest.is(), "specification violation");
- uno::Reference< task::XInteractionHandler > xHandler;
- if (rEnvironment.is())
- xHandler = rEnvironment->getInteractionHandler();
- if (!xHandler.is())
- cppu::throwException(rRequest->getRequest());
- xHandler->handle(rRequest.get());
-}
-
-}
-
-namespace ucbhelper {
-
-sal_Int32
-handleInteractionRequest(
- rtl::Reference< ucbhelper::SimpleInteractionRequest > const & rRequest,
- uno::Reference< ucb::XCommandEnvironment > const & rEnvironment,
- bool bThrowOnAbort)
- SAL_THROW((uno::Exception))
-{
- handle(rRequest.get(), rEnvironment);
- sal_Int32 nResponse = rRequest->getResponse();
- switch (nResponse)
- {
- case ucbhelper::CONTINUATION_UNKNOWN:
- cppu::throwException(rRequest->getRequest());
- break;
-
- case ucbhelper::CONTINUATION_ABORT:
- if (bThrowOnAbort)
- throw ucb::CommandFailedException(
- rtl::OUString(), 0, rRequest->getRequest());
- break;
- }
- return nResponse;
-}
-
-std::pair< sal_Int32,
- rtl::Reference< ucbhelper::InteractionSupplyAuthentication > >
-handleInteractionRequest(
- rtl::Reference< ucbhelper::SimpleAuthenticationRequest > const & rRequest,
- uno::Reference< ucb::XCommandEnvironment > const & rEnvironment,
- bool bThrowOnAbort)
- SAL_THROW((uno::Exception))
-{
- handle(rRequest.get(), rEnvironment);
- rtl::Reference< ucbhelper::InteractionContinuation >
- xContinuation(rRequest->getSelection());
- if (uno::Reference< task::XInteractionAbort >(
- xContinuation.get(), uno::UNO_QUERY).
- is())
- if (bThrowOnAbort)
- throw ucb::CommandFailedException(
- rtl::OUString(), 0, rRequest->getRequest());
- else
- return std::make_pair(
- ucbhelper::CONTINUATION_ABORT,
- rtl::Reference<
- ucbhelper::InteractionSupplyAuthentication >());
- else if (uno::Reference< task::XInteractionRetry >(
- xContinuation.get(), uno::UNO_QUERY).
- is())
- return std::make_pair(
- ucbhelper::CONTINUATION_ABORT,
- rtl::Reference<
- ucbhelper::InteractionSupplyAuthentication >());
- else
- return std::make_pair(
- ucbhelper::CONTINUATION_UNKNOWN,
- rtl::Reference<
- ucbhelper::InteractionSupplyAuthentication >(
- rRequest->getAuthenticationSupplier()));
-}
-
-}
-
-namespace ucbhelper {
-
-sal_Int32
-handleInteractionRequest(
- rtl::Reference< ucbhelper::SimpleCertificateValidationRequest > const & rRequest,
- uno::Reference< ucb::XCommandEnvironment > const & rEnvironment,
- bool bThrowOnAbort)
- SAL_THROW((uno::Exception))
-{
- handle(rRequest.get(), rEnvironment);
- sal_Int32 nResponse = rRequest->getResponse();
- switch (nResponse)
- {
- case ucbhelper::CONTINUATION_UNKNOWN:
- cppu::throwException(rRequest->getRequest());
- break;
-
- case ucbhelper::CONTINUATION_ABORT:
- if (bThrowOnAbort)
- throw ucb::CommandFailedException(
- rtl::OUString(), 0, rRequest->getRequest());
- break;
- }
- return nResponse;
-}
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucbhelper/source/provider/propertyvalueset.cxx b/ucbhelper/source/provider/propertyvalueset.cxx
index 361a8fd514af..799a7575c52a 100644
--- a/ucbhelper/source/provider/propertyvalueset.cxx
+++ b/ucbhelper/source/provider/propertyvalueset.cxx
@@ -278,30 +278,6 @@ PropertyValueSet::PropertyValueSet(
}
//=========================================================================
-PropertyValueSet::PropertyValueSet(
- const Reference< XMultiServiceFactory >& rxSMgr,
- const Sequence< com::sun::star::beans::PropertyValue >& rValues )
-: PROPERTYVALUESET_INIT()
-{
- sal_Int32 nCount = rValues.getLength();
- if ( nCount )
- {
- const com::sun::star::beans::PropertyValue* pValues
- = rValues.getConstArray();
-
- for ( sal_Int32 n = 0; n < nCount; ++n )
- {
- const com::sun::star::beans::PropertyValue& rValue = pValues[ n ];
- appendObject( Property( rValue.Name,
- rValue.Handle,
- rValue.Value.getValueType(),
- 0 ),
- rValue.Value );
- }
- }
-}
-
-//=========================================================================
// virtual
PropertyValueSet::~PropertyValueSet()
{
@@ -677,12 +653,6 @@ const Reference< XTypeConverter >& PropertyValueSet::getTypeConverter()
}
//=========================================================================
-sal_Int32 PropertyValueSet::getLength() const
-{
- return m_pValues->size();
-}
-
-//=========================================================================
void PropertyValueSet::appendString( const ::rtl::OUString& rPropName,
const OUString& rValue )
{
@@ -697,27 +667,6 @@ void PropertyValueSet::appendBoolean( const ::rtl::OUString& rPropName,
}
//=========================================================================
-void PropertyValueSet::appendByte( const ::rtl::OUString& rPropName,
- sal_Int8 nValue )
-{
- SETVALUE_IMPL( rPropName, BYTE_VALUE_SET, nByte, nValue );
-}
-
-//=========================================================================
-void PropertyValueSet::appendShort( const ::rtl::OUString& rPropName,
- sal_Int16 nValue )
-{
- SETVALUE_IMPL( rPropName, SHORT_VALUE_SET, nShort, nValue );
-}
-
-//=========================================================================
-void PropertyValueSet::appendInt( const ::rtl::OUString& rPropName,
- sal_Int32 nValue )
-{
- SETVALUE_IMPL( rPropName, INT_VALUE_SET, nInt, nValue );
-}
-
-//=========================================================================
void PropertyValueSet::appendLong( const ::rtl::OUString& rPropName,
sal_Int64 nValue )
{
@@ -725,41 +674,6 @@ void PropertyValueSet::appendLong( const ::rtl::OUString& rPropName,
}
//=========================================================================
-void PropertyValueSet::appendFloat( const ::rtl::OUString& rPropName,
- float nValue )
-{
- SETVALUE_IMPL( rPropName, FLOAT_VALUE_SET, nFloat, nValue );
-}
-
-//=========================================================================
-void PropertyValueSet::appendDouble( const ::rtl::OUString& rPropName,
- double nValue )
-{
- SETVALUE_IMPL( rPropName, DOUBLE_VALUE_SET, nDouble, nValue );
-}
-
-//=========================================================================
-void PropertyValueSet::appendBytes( const ::rtl::OUString& rPropName,
- const Sequence< sal_Int8 >& rValue )
-{
- SETVALUE_IMPL( rPropName, BYTES_VALUE_SET, aBytes, rValue );
-}
-
-//=========================================================================
-void PropertyValueSet::appendDate( const ::rtl::OUString& rPropName,
- const Date& rValue )
-{
- SETVALUE_IMPL( rPropName, DATE_VALUE_SET, aDate, rValue );
-}
-
-//=========================================================================
-void PropertyValueSet::appendTime( const ::rtl::OUString& rPropName,
- const Time& rValue )
-{
- SETVALUE_IMPL( rPropName, TIME_VALUE_SET, aTime, rValue );
-}
-
-//=========================================================================
void PropertyValueSet::appendTimestamp( const ::rtl::OUString& rPropName,
const DateTime& rValue )
{
@@ -767,22 +681,6 @@ void PropertyValueSet::appendTimestamp( const ::rtl::OUString& rPropName,
}
//=========================================================================
-void PropertyValueSet::appendBinaryStream(
- const ::rtl::OUString& rPropName,
- const Reference< XInputStream >& rValue )
-{
- SETVALUE_IMPL( rPropName, BINARYSTREAM_VALUE_SET, xBinaryStream, rValue );
-}
-
-//=========================================================================
-void PropertyValueSet::appendCharacterStream(
- const ::rtl::OUString& rPropName,
- const Reference< XInputStream >& rValue )
-{
- SETVALUE_IMPL( rPropName, CHARACTERSTREAM_VALUE_SET, xCharacterStream, rValue );
-}
-
-//=========================================================================
void PropertyValueSet::appendObject( const ::rtl::OUString& rPropName,
const Any& rValue )
{
@@ -790,34 +688,6 @@ void PropertyValueSet::appendObject( const ::rtl::OUString& rPropName,
}
//=========================================================================
-void PropertyValueSet::appendRef( const ::rtl::OUString& rPropName,
- const Reference< XRef >& rValue )
-{
- SETVALUE_IMPL( rPropName, REF_VALUE_SET, xRef, rValue );
-}
-
-//=========================================================================
-void PropertyValueSet::appendBlob( const ::rtl::OUString& rPropName,
- const Reference< XBlob >& rValue )
-{
- SETVALUE_IMPL( rPropName, BLOB_VALUE_SET, xBlob, rValue );
-}
-
-//=========================================================================
-void PropertyValueSet::appendClob( const ::rtl::OUString& rPropName,
- const Reference< XClob >& rValue )
-{
- SETVALUE_IMPL( rPropName, CLOB_VALUE_SET, xClob, rValue );
-}
-
-//=========================================================================
-void PropertyValueSet::appendArray( const ::rtl::OUString& rPropName,
- const Reference< XArray >& rValue )
-{
- SETVALUE_IMPL( rPropName, ARRAY_VALUE_SET, xArray, rValue );
-}
-
-//=========================================================================
void PropertyValueSet::appendVoid( const ::rtl::OUString& rPropName )
{
SETVALUE_IMPL( rPropName, NO_VALUE_SET, aObject, Any() );
diff --git a/ucbhelper/source/provider/resultsethelper.cxx b/ucbhelper/source/provider/resultsethelper.cxx
index ac6798e7450e..e600977d2e64 100644
--- a/ucbhelper/source/provider/resultsethelper.cxx
+++ b/ucbhelper/source/provider/resultsethelper.cxx
@@ -60,16 +60,6 @@ namespace ucbhelper {
//=========================================================================
ResultSetImplHelper::ResultSetImplHelper(
- const uno::Reference< lang::XMultiServiceFactory >& rxSMgr )
-: m_pDisposeEventListeners( 0 ),
- m_bStatic( sal_False ),
- m_bInitDone( sal_False ),
- m_xSMgr( rxSMgr )
-{
-}
-
-//=========================================================================
-ResultSetImplHelper::ResultSetImplHelper(
const uno::Reference< lang::XMultiServiceFactory >& rxSMgr,
const com::sun::star::ucb::OpenCommandArgument2& rCommand )
: m_pDisposeEventListeners( 0 ),
diff --git a/ucbhelper/source/provider/simpleauthenticationrequest.cxx b/ucbhelper/source/provider/simpleauthenticationrequest.cxx
index c4ac91cb5789..86f1a5334ab3 100644
--- a/ucbhelper/source/provider/simpleauthenticationrequest.cxx
+++ b/ucbhelper/source/provider/simpleauthenticationrequest.cxx
@@ -42,42 +42,6 @@ SimpleAuthenticationRequest::SimpleAuthenticationRequest(
const rtl::OUString & rRealm,
const rtl::OUString & rUserName,
const rtl::OUString & rPassword,
- const rtl::OUString & rAccount )
-{
- // Fill request...
- ucb::URLAuthenticationRequest aRequest;
-// aRequest.Message = // OUString
-// aRequest.Context = // XInterface
- aRequest.Classification = task::InteractionClassification_ERROR;
- aRequest.ServerName = rServerName;
-// aRequest.Diagnostic = // OUString
- aRequest.HasRealm = ( rRealm.getLength() > 0 );
- if ( aRequest.HasRealm )
- aRequest.Realm = rRealm;
- aRequest.HasUserName = sal_True;
- aRequest.UserName = rUserName;
- aRequest.HasPassword = sal_True;
- aRequest.Password = rPassword;
- aRequest.HasAccount = ( rAccount.getLength() > 0 );
- if ( aRequest.HasAccount )
- aRequest.Account = rAccount;
- aRequest.URL = rURL;
-
- initialize(aRequest,
- sal_False,
- sal_True,
- sal_True,
- aRequest.HasAccount,
- sal_True,
- sal_False );
-}
-//=========================================================================
-SimpleAuthenticationRequest::SimpleAuthenticationRequest(
- const rtl::OUString & rURL,
- const rtl::OUString & rServerName,
- const rtl::OUString & rRealm,
- const rtl::OUString & rUserName,
- const rtl::OUString & rPassword,
const rtl::OUString & rAccount,
sal_Bool bAllowPersistentStoring,
sal_Bool bAllowUseSystemCredentials )
@@ -155,51 +119,6 @@ SimpleAuthenticationRequest::SimpleAuthenticationRequest(
}
//=========================================================================
-SimpleAuthenticationRequest::SimpleAuthenticationRequest(
- const rtl::OUString & rURL,
- const rtl::OUString & rServerName,
- EntityType eRealmType,
- const rtl::OUString & rRealm,
- EntityType eUserNameType,
- const rtl::OUString & rUserName,
- EntityType ePasswordType,
- const rtl::OUString & rPassword,
- EntityType eAccountType,
- const rtl::OUString & rAccount,
- sal_Bool bAllowPersistentStoring,
- sal_Bool bAllowUseSystemCredentials )
-{
- // Fill request...
- ucb::URLAuthenticationRequest aRequest;
-// aRequest.Message = // OUString
-// aRequest.Context = // XInterface
- aRequest.Classification = task::InteractionClassification_ERROR;
- aRequest.ServerName = rServerName;
-// aRequest.Diagnostic = // OUString
- aRequest.HasRealm = eRealmType != ENTITY_NA;
- if ( aRequest.HasRealm )
- aRequest.Realm = rRealm;
- aRequest.HasUserName = eUserNameType != ENTITY_NA;
- if ( aRequest.HasUserName )
- aRequest.UserName = rUserName;
- aRequest.HasPassword = ePasswordType != ENTITY_NA;
- if ( aRequest.HasPassword )
- aRequest.Password = rPassword;
- aRequest.HasAccount = eAccountType != ENTITY_NA;
- if ( aRequest.HasAccount )
- aRequest.Account = rAccount;
- aRequest.URL = rURL;
-
- initialize(aRequest,
- eRealmType == ENTITY_MODIFY,
- eUserNameType == ENTITY_MODIFY,
- ePasswordType == ENTITY_MODIFY,
- eAccountType == ENTITY_MODIFY,
- bAllowPersistentStoring,
- bAllowUseSystemCredentials );
-}
-
-//=========================================================================
void SimpleAuthenticationRequest::initialize(
const ucb::URLAuthenticationRequest & rRequest,
sal_Bool bCanSetRealm,