Kaydet (Commit) 05671c1f authored tarafından Matúš Kukan's avatar Matúš Kukan

unused variables and simplify

Change-Id: Ib2412d5bd3e3db42b972783bb8d17bc6559c9c21
üst 166a934c
...@@ -34,8 +34,6 @@ rtl::Reference< DAVSession > DAVSessionFactory::createDAVSession( ...@@ -34,8 +34,6 @@ rtl::Reference< DAVSession > DAVSessionFactory::createDAVSession(
const uno::Reference< uno::XComponentContext > & rxContext ) const uno::Reference< uno::XComponentContext > & rxContext )
throw( DAVException ) throw( DAVException )
{ {
m_xMSF = rxContext;
osl::MutexGuard aGuard( m_aMutex ); osl::MutexGuard aGuard( m_aMutex );
if ( !m_xProxyDecider.get() ) if ( !m_xProxyDecider.get() )
......
...@@ -56,7 +56,6 @@ public: ...@@ -56,7 +56,6 @@ public:
rxContext ) rxContext )
throw( DAVException ); throw( DAVException );
::uno::Reference< ::uno::XComponentContext > getServiceFactory() { return m_xMSF; }
private: private:
typedef std::map< OUString, DAVSession * > Map; typedef std::map< OUString, DAVSession * > Map;
...@@ -64,8 +63,6 @@ private: ...@@ -64,8 +63,6 @@ private:
osl::Mutex m_aMutex; osl::Mutex m_aMutex;
std::auto_ptr< ucbhelper::InternetProxyDecider > m_xProxyDecider; std::auto_ptr< ucbhelper::InternetProxyDecider > m_xProxyDecider;
::uno::Reference< ::uno::XComponentContext > m_xMSF;
void releaseElement( DAVSession * pElement ) SAL_THROW(()); void releaseElement( DAVSession * pElement ) SAL_THROW(());
friend class DAVSession; friend class DAVSession;
......
...@@ -91,8 +91,7 @@ SerfLockStore::~SerfLockStore() ...@@ -91,8 +91,7 @@ SerfLockStore::~SerfLockStore()
const LockInfoMap::const_iterator end( m_aLockInfoMap.end() ); const LockInfoMap::const_iterator end( m_aLockInfoMap.end() );
while ( it != end ) while ( it != end )
{ {
const OUString& rLock = (*it).first; (*it).second.m_xSession->UNLOCK( (*it).first );
(*it).second.m_xSession->UNLOCK( rLock );
++it; ++it;
} }
} }
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include "SerfInputStream.hxx" #include "SerfInputStream.hxx"
#include "UCBDeadPropertyValue.hxx" #include "UCBDeadPropertyValue.hxx"
#include <com/sun/star/xml/crypto/SEInitializer.hpp>
#include <com/sun/star/xml/crypto/XSecurityEnvironment.hpp> #include <com/sun/star/xml/crypto/XSecurityEnvironment.hpp>
#include <com/sun/star/security/XCertificate.hpp> #include <com/sun/star/security/XCertificate.hpp>
#include <com/sun/star/security/CertificateValidity.hpp> #include <com/sun/star/security/CertificateValidity.hpp>
...@@ -354,7 +355,6 @@ apr_status_t SerfSession::verifySerfCertificateChain ( ...@@ -354,7 +355,6 @@ apr_status_t SerfSession::verifySerfCertificateChain (
// Create some crypto objects to decode and handle the base64 // Create some crypto objects to decode and handle the base64
// encoded certificate chain. // encoded certificate chain.
uno::Reference< xml::crypto::XSEInitializer > xSEInitializer;
uno::Reference< security::XCertificateContainer > xCertificateContainer; uno::Reference< security::XCertificateContainer > xCertificateContainer;
uno::Reference< xml::crypto::XXMLSecurityContext > xSecurityContext; uno::Reference< xml::crypto::XXMLSecurityContext > xSecurityContext;
uno::Reference< xml::crypto::XSecurityEnvironment > xSecurityEnv; uno::Reference< xml::crypto::XSecurityEnvironment > xSecurityEnv;
...@@ -365,10 +365,8 @@ apr_status_t SerfSession::verifySerfCertificateChain ( ...@@ -365,10 +365,8 @@ apr_status_t SerfSession::verifySerfCertificateChain (
// Create a certificate container. // Create a certificate container.
xCertificateContainer = security::CertificateContainer::create( xContext ); xCertificateContainer = security::CertificateContainer::create( xContext );
xSEInitializer = uno::Reference< xml::crypto::XSEInitializer >( css::uno::Reference< css::xml::crypto::XSEInitializer > xSEInitializer =
xContext->getServiceManager()->createInstanceWithContext( css::xml::crypto::SEInitializer::create( xContext );
OUString( "com.sun.star.xml.crypto.SEInitializer" ), xContext ),
uno::UNO_QUERY_THROW);
xSecurityContext = xSEInitializer->createSecurityContext( OUString() ); xSecurityContext = xSEInitializer->createSecurityContext( OUString() );
if (xSecurityContext.is()) if (xSecurityContext.is())
......
...@@ -39,7 +39,6 @@ using namespace http_dav_ucp; ...@@ -39,7 +39,6 @@ using namespace http_dav_ucp;
ContentProvider::ContentProvider( ContentProvider::ContentProvider(
const uno::Reference< uno::XComponentContext >& rContext ) const uno::Reference< uno::XComponentContext >& rContext )
: ::ucbhelper::ContentProviderImplHelper( rContext ), : ::ucbhelper::ContentProviderImplHelper( rContext ),
m_xDAVSessionFactory( new DAVSessionFactory() ),
m_pProps( 0 ) m_pProps( 0 )
{ {
} }
...@@ -196,7 +195,7 @@ ContentProvider::queryContent( ...@@ -196,7 +195,7 @@ ContentProvider::queryContent(
try try
{ {
xContent = new ::http_dav_ucp::Content( xContent = new ::http_dav_ucp::Content(
m_xContext, this, xCanonicId, m_xDAVSessionFactory ); m_xContext, this, xCanonicId, new DAVSessionFactory() );
registerNewContent( xContent ); registerNewContent( xContent );
} }
catch ( ucb::ContentCreationException const & ) catch ( ucb::ContentCreationException const & )
......
...@@ -68,7 +68,6 @@ namespace http_dav_ucp { ...@@ -68,7 +68,6 @@ namespace http_dav_ucp {
class ContentProvider : public ::ucbhelper::ContentProviderImplHelper class ContentProvider : public ::ucbhelper::ContentProviderImplHelper
{ {
rtl::Reference< DAVSessionFactory > m_xDAVSessionFactory;
PropertyMap * m_pProps; PropertyMap * m_pProps;
public: public:
...@@ -121,9 +120,6 @@ public: ...@@ -121,9 +120,6 @@ public:
// Non-interface methods. // Non-interface methods.
rtl::Reference< DAVSessionFactory > getDAVSessionFactory()
{ return m_xDAVSessionFactory; }
bool getProperty( const OUString & rPropName, bool getProperty( const OUString & rPropName,
::com::sun::star::beans::Property & rProp, ::com::sun::star::beans::Property & rProp,
bool bStrict = false ); bool bStrict = false );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment