Commits

Anonymous committed a977702

CWS-TOOLING: integrate CWS tkr20
2009-05-08 08:31:10 +0200 tkr r271700 : ##i97329# fixed merge conflict during rebase
2009-05-07 08:30:15 +0200 tkr r271622 : CWS-TOOLING: rebase CWS tkr20 to trunk@271427 (milestone: DEV300:m47)
2009-04-17 14:36:42 +0200 tkr r270947 : #i73893# implemented the XCommandProcessor:Abort method
2009-03-20 14:08:15 +0100 tkr r269806 : #i96392# use $(CPU) variable to determine if openssl should build with 64 bit
2009-03-19 16:15:26 +0100 tkr r269754 : #i96392# use $(CPU) variable to determine if openssl should build with 64 bit
2009-03-19 16:09:04 +0100 tkr r269753 : #i96392# use $(CPU) variable to determine if openssl should build with 64 bit
2009-03-19 15:57:05 +0100 tkr r269752 : #i97003# Ask password container if persistent storage should be used
2009-03-19 15:53:18 +0100 tkr r269751 : #i97003# ask if password container should use the persistent storage
2009-03-19 09:08:18 +0100 tkr r269726 : #i99774# ucb: patch to silence warnings in gcc 4.4
2009-03-19 09:05:38 +0100 tkr r269725 : #i99046# remove mime-type
2009-03-19 09:04:56 +0100 tkr r269724 : #i97329# fixed truncated text on buttons
2009-03-19 09:03:50 +0100 tkr r269723 : #i97542# Warning errors in uui / empty bodys in for loops

  • Participants
  • Parent commits 3d0fcd3

Comments (0)

Files changed (17)

openssl/makefile.mk

 	ADDITIONAL_FILES:= \
 		libcrypto_OOo_0_9_8k.map \
 		libssl_OOo_0_9_8k.map
+	.IF "$(CPU)" == "X"
+		CONFIGURE_ACTION=Configure linux-generic64
+	.ELSE
+		CONFIGURE_ACTION=Configure linux-elf
+	.ENDIF
 	# if you build openssl as shared library you have to patch the Makefile.Shared "LD_LIBRARY_PATH=$$LD_LIBRARY_PATH \"
 	#BUILD_ACTION=make 'SHARED_LDFLAGS=-Wl,--version-script=./lib$$(SHLIBDIRS)_OOo_0_9_8e.map'
 .ENDIF
 
 	# Solaris INTEL
 	.IF "$(CPUNAME)" == "INTEL" 
-		.IF "$(USE_64)" == "1"
+		.IF "$(CPU)" == "X"
 		   CONFIGURE_ACTION=Configure solaris64-x86_64-cc
 		.ELSE
 		   CONFIGURE_ACTION=Configure solaris-x86-cc

ucb/source/ucp/file/filrec.cxx

     if ( nResult == ::osl::FileBase::E_None )
     {
         if ( uFlags & OpenFlag_Create )
-            m_nFlags = uFlags & ( ~OpenFlag_Create ) | OpenFlag_Write;
+            m_nFlags = (uFlags & ( ~OpenFlag_Create )) | OpenFlag_Write;
         else
             m_nFlags = uFlags;
     

ucb/source/ucp/webdav/DAVAuthListener.hxx

             const ::rtl::OUString & inRealm,
             const ::rtl::OUString & inHostName,
             ::rtl::OUString & inoutUserName,
-            ::rtl::OUString & outPassWord ) = 0;
+            ::rtl::OUString & outPassWord,
+			const sal_Bool & bAllowPersistentStoring) = 0;
 };
 
 } // namespace webdav_ucp

ucb/source/ucp/webdav/DAVAuthListenerImpl.hxx

         virtual int authenticate( const ::rtl::OUString & inRealm,
                                   const ::rtl::OUString & inHostName,
                                   ::rtl::OUString & inoutUserName,
-                                  ::rtl::OUString & outPassWord );
+                                  ::rtl::OUString & outPassWord,
+								  const sal_Bool & bAllowPersistentStoring);
     private:
         
         com::sun::star::uno::Reference<

ucb/source/ucp/webdav/DAVResourceAccess.cxx

     const ::rtl::OUString & inRealm,
     const ::rtl::OUString & inHostName,
     ::rtl::OUString & inoutUserName,
-    ::rtl::OUString & outPassWord )
+    ::rtl::OUString & outPassWord,
+	const sal_Bool & bAllowPersistentStoring)
 {
     if ( m_xEnv.is() )
     {
                 = new ucbhelper::SimpleAuthenticationRequest( inHostName,
                                                               inRealm,
                                                               inoutUserName,
-                                                              outPassWord );
+                                                              outPassWord,
+															  ::rtl::OUString(),
+															  bAllowPersistentStoring);
             xIH->handle( xRequest.get() );
 
             rtl::Reference< ucbhelper::InteractionContinuation > xSelection
 }
 
 //=========================================================================
+void DAVResourceAccess::ABORT()
+  throw( DAVException )
+{
+    initialize();
+    m_xSession->ABORT();
+}
+//=========================================================================
 namespace {
 
     void resetInputStream( const uno::Reference< io::XInputStream > & rStream )

ucb/source/ucp/webdav/DAVResourceAccess.hxx

 	        com::sun::star::ucb::XCommandEnvironment > & xEnv )
 	throw( DAVException );
 
+	void
+    ABORT()
+	throw( DAVException );
+
     // helper
     static void getUserRequestHeaders(
 	const com::sun::star::uno::Reference< 

ucb/source/ucp/webdav/DAVSession.hxx

         const DAVRequestEnvironment & rEnv )
 		throw( DAVException ) = 0;
 
+	virtual void	ABORT()
+		throw( DAVException ) = 0;
+
     virtual com::sun::star::uno::Reference< com::sun::star::io::XInputStream >
                     POST( const rtl::OUString & inPath,
                           const rtl::OUString & rContentType,

ucb/source/ucp/webdav/NeonSession.cxx

 #include <com/sun/star/security/CertificateContainerStatus.hpp>
 #include <com/sun/star/security/CertificateContainer.hpp>
 #include <com/sun/star/security/XCertificateContainer.hpp>
+#include <com/sun/star/task/XMasterPasswordHandling.hpp>
 
 
 #ifndef _SIMPLECERTIFICATIONVALIDATIONREQUEST_HXX_
         //thePassWord = rtl::OUString::createFromAscii( inoutPassWord );
     }
 
+	//i97003 (tkr): Ask XMasterPasswordHandling if we should store the credentials persistently and give this information to the SimpleAuthenticationRequest
+	uno::Reference< ::com::sun::star::task::XMasterPasswordHandling > xMasterPasswordHandling =
+	uno::Reference< ::com::sun::star::task::XMasterPasswordHandling >(
+                    theSession->getMSF().get()->createInstance( rtl::OUString::createFromAscii( "com.sun.star.task.PasswordContainer" )), uno::UNO_QUERY );
+	// -
+
     int theRetVal = pListener->authenticate(
                             rtl::OUString::createFromAscii( inRealm ),
                             theSession->getHostName(),
                             theUserName,
-                            thePassWord );
+                            thePassWord,
+							xMasterPasswordHandling.is() ? xMasterPasswordHandling->isPersistentStoringAllowed() : sal_False);
+													
     rtl::OString aUser(
         rtl::OUStringToOString( theUserName, RTL_TEXTENCODING_UTF8 ) );
     if ( aUser.getLength() > ( NE_ABUFSIZ - 1 ) )
 }
 
 // -------------------------------------------------------------------
+// ABORT
+// -------------------------------------------------------------------
+void NeonSession::ABORT()
+    throw ( DAVException )
+{
+	if (NULL !=m_pHttpSession)
+		ne_close_connection(m_pHttpSession);
+}
+
+// -------------------------------------------------------------------
 // MKCOL
 // -------------------------------------------------------------------
 void NeonSession::MKCOL( const rtl::OUString & inPath,

ucb/source/ucp/webdav/NeonSession.hxx

                               const DAVRequestEnvironment & rEnv )
 			throw ( DAVException );
 
+		virtual void ABORT()
+			throw ( DAVException );
+
 		// Note: Uncomment the following if locking support is required
 		/*
 		virtual void LOCK (const Lock & inLock,

ucb/source/ucp/webdav/webdavcontent.cxx

 void SAL_CALL Content::abort( sal_Int32 /*CommandId*/ )
     throw( uno::RuntimeException )
 {
-    // @@@ Implement logic to abort running commands, if this makes
-    //     sense for your conten.t
+	try
+		{
+			std::auto_ptr< DAVResourceAccess > xResAccess;
+			{
+				osl::MutexGuard aGuard( m_aMutex );
+				xResAccess.reset(
+					new DAVResourceAccess( *m_xResAccess.get() ) );
+			}
+			xResAccess->ABORT();
+		}
+		catch ( DAVException const & /*e*/ )
+		{
+			// ABORT command failed!
+		}
 }
 
 //=========================================================================

ucbhelper/inc/ucbhelper/simpleauthenticationrequest.hxx

 
 #include <rtl/ref.hxx>
 #include <ucbhelper/interactionrequest.hxx>
+#include <com/sun/star/ucb/AuthenticationRequest.hpp>
 #include "ucbhelper/ucbhelperdllapi.h"
 
 namespace ucbhelper {
     rtl::Reference<
         ucbhelper::InteractionSupplyAuthentication > m_xAuthSupplier;
 
+private:
+	void initialize( ::com::sun::star::ucb::AuthenticationRequest aRequest,
+				const sal_Bool &  bCanSetRealm,
+				const sal_Bool &  bCanSetUserName,
+				const sal_Bool &  bCanSetPassword,
+		        const sal_Bool &  bCanSetAccount,
+		 	    const sal_Bool &  bAllowPersistentStoring );
+
 public:
     /** Specification whether some entity (realm, username, password, account)
         is either not applicable at all, has a fixed value, or is modifiable.
       * Constructor.
       *
       * @param rServerName contains a server name.
+      * @param rRealm contains a realm, if applicable.
+      * @param rUserName contains a username, if available (for instance from
+      *        a previous try).
+      * @param rPassword contains a password, if available (for instance from
+      *        a previous try).
+      * @param rAccount contains an account, if applicable.
+	  * @param bAllowPersistentStoring specifies if the credentials should stored in the passowrd container persistently
+	  */
+    SimpleAuthenticationRequest( const rtl::OUString & rServerName,
+                                 const rtl::OUString & rRealm,
+                                 const rtl::OUString & rUserName,
+                                 const rtl::OUString & rPassword,
+                                 const rtl::OUString & rAccount,
+								 const sal_Bool & bAllowPersistentStoring);
+
+
+    /**
+      * Constructor.
+      *
+      * @param rServerName contains a server name.
       * @param eRealmType specifies whether a realm is applicable and
                modifiable.
       * @param rRealm contains a realm, if applicable.
                                  const rtl::OUString & rAccount
                                     = rtl::OUString() );
 
+	 /**
+      * Constructor.
+      *
+      * @param rServerName contains a server name.
+      * @param eRealmType specifies whether a realm is applicable and
+               modifiable.
+      * @param rRealm contains a realm, if applicable.
+      * @param eUserNameType specifies whether a username is applicable and
+               modifiable.
+      * @param rUserName contains a username, if available (for instance from
+      *        a previous try).
+      * @param ePasswordType specifies whether a password is applicable and
+               modifiable.
+      * @param rPassword contains a password, if available (for instance from
+      *        a previous try).
+      * @param eAccountType specifies whether an account is applicable and
+               modifiable.
+      * @param rAccount contains an account, if applicable.
+	  * @param bAllowPersistentStoring specifies if the credentials should stored in the passowrd container persistently
+	  */
+    SimpleAuthenticationRequest( 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,
+                                 const sal_Bool & bAllowPersistentStoring);
+
     /**
       * This method returns the supplier for the missing authentication data,
       * that, for instance can be used to query the password supplied by the

ucbhelper/source/provider/simpleauthenticationrequest.cxx

 
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_ucbhelper.hxx"
-#include <com/sun/star/ucb/AuthenticationRequest.hpp>
+#include <com/sun/star/task/XMasterPasswordHandling.hpp>
 #include <ucbhelper/simpleauthenticationrequest.hxx>
 
 using namespace com::sun::star;
                                       const rtl::OUString & rPassword,
                                       const rtl::OUString & rAccount )
 {
-    // Fill request...
+		   // Fill request...
     ucb::AuthenticationRequest aRequest;
 //    aRequest.Message        = // OUString
 //    aRequest.Context        = // XInterface
     if ( aRequest.HasAccount )
         aRequest.Account = rAccount;
 
+   initialize(aRequest,
+	   sal_False,
+	   sal_True,
+	   sal_True,
+	   aRequest.HasAccount,
+	   sal_False);
+}
+//=========================================================================
+SimpleAuthenticationRequest::SimpleAuthenticationRequest(
+                                      const rtl::OUString & rServerName,
+                                      const rtl::OUString & rRealm,
+                                      const rtl::OUString & rUserName,
+                                      const rtl::OUString & rPassword,
+                                      const rtl::OUString & rAccount,
+									  const sal_Bool & bAllowPersistentStoring )
+{
+
+	   // Fill request...
+    ucb::AuthenticationRequest 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;
+
+   initialize(aRequest,
+	   sal_False,
+	   sal_True,
+	   sal_True,
+	   aRequest.HasAccount,
+	   bAllowPersistentStoring);
+}
+
+void SimpleAuthenticationRequest::initialize(
+                                      ucb::AuthenticationRequest aRequest,
+									  const sal_Bool &  bCanSetRealm,
+									  const sal_Bool &  bCanSetUserName,
+									  const sal_Bool &  bCanSetPassword,
+						              const sal_Bool &  bCanSetAccount,
+									  const sal_Bool & bAllowPersistentStoring )
+{
     setRequest( uno::makeAny( aRequest ) );
 
     // Fill continuations...
-    uno::Sequence< ucb::RememberAuthentication > aRememberModes( 2 );
+	uno::Sequence< ucb::RememberAuthentication > aRememberModes( bAllowPersistentStoring ? 3 : 2 );
     aRememberModes[ 0 ] = ucb::RememberAuthentication_NO;
     aRememberModes[ 1 ] = ucb::RememberAuthentication_SESSION;
+	if (bAllowPersistentStoring)
+		aRememberModes[ 1 ] = ucb::RememberAuthentication_PERSISTENT;
 
     m_xAuthSupplier
         = new InteractionSupplyAuthentication(
                 this,
-                sal_False, // bCanSetRealm
-                sal_True,  // bCanSetUserName
-                sal_True,  // bCanSetPassword
-                aRequest.HasAccount, // bCanSetAccount
+                bCanSetRealm,
+                bCanSetUserName,
+                bCanSetPassword,
+                bCanSetAccount,
                 aRememberModes, // rRememberPasswordModes
                 ucb::RememberAuthentication_SESSION, // eDefaultRememberPasswordMode
                 aRememberModes, // rRememberAccountModes
     if ( aRequest.HasAccount )
         aRequest.Account = rAccount;
 
-    setRequest( uno::makeAny( aRequest ) );
+	initialize(aRequest,
+	   eRealmType == ENTITY_MODIFY,
+	   eUserNameType == ENTITY_MODIFY,
+	   ePasswordType == ENTITY_MODIFY,
+	   eAccountType == ENTITY_MODIFY,
+	   sal_False);
+}
 
-    // Fill continuations...
-    uno::Sequence< ucb::RememberAuthentication > aRememberModes( 2 );
-    aRememberModes[ 0 ] = ucb::RememberAuthentication_NO;
-    aRememberModes[ 1 ] = ucb::RememberAuthentication_SESSION;
+//=========================================================================
+SimpleAuthenticationRequest::SimpleAuthenticationRequest(
+                                      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,
+									  const sal_Bool & bAllowPersistentStoring )
+{
+    // Fill request...
+    ucb::AuthenticationRequest 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;
 
-    m_xAuthSupplier
-        = new InteractionSupplyAuthentication(
-                this,
-                eRealmType == ENTITY_MODIFY, // bCanSetRealm
-                eUserNameType == ENTITY_MODIFY,  // bCanSetUserName
-                ePasswordType == ENTITY_MODIFY,  // bCanSetPassword
-                eAccountType == ENTITY_MODIFY, // bCanSetAccount
-                aRememberModes, // rRememberPasswordModes
-                ucb::RememberAuthentication_SESSION, // eDefaultRememberPasswordMode
-                aRememberModes, // rRememberAccountModes
-                ucb::RememberAuthentication_SESSION // eDefaultRememberAccountMode
-            );
-
-    uno::Sequence<
-        uno::Reference< task::XInteractionContinuation > > aContinuations( 3 );
-    aContinuations[ 0 ] = new InteractionAbort( this );
-    aContinuations[ 1 ] = new InteractionRetry( this );
-    aContinuations[ 2 ] = m_xAuthSupplier.get();
-
-    setContinuations( aContinuations );
+	initialize(aRequest,
+	   eRealmType == ENTITY_MODIFY,
+	   eUserNameType == ENTITY_MODIFY,
+	   ePasswordType == ENTITY_MODIFY,
+	   eAccountType == ENTITY_MODIFY,
+	   bAllowPersistentStoring);
 }

uui/source/masterpasscrtdlg.cxx

     {
         for( nNewLabelHeight = ( nTextWidth / nLableWidth + 1 ) * nTextHeight;
             nNewLabelHeight < aRect.GetHeight();
-            nNewLabelHeight += nTextHeight ) {}
+	    nNewLabelHeight += nTextHeight ) {};
     }
 
     long nDelta = nNewLabelHeight - nLabelHeight;

uui/source/passcrtdlg.cxx

     long nNewLabelHeight = 0;
     for( nNewLabelHeight = ( nTextWidth / nLabelWidth + 1 ) * nTextHeight; 
         nNewLabelHeight < aRect.GetHeight();
-        nNewLabelHeight += nTextHeight ) ;
+		nNewLabelHeight += nTextHeight ) {} ;
 
     long nDelta = nNewLabelHeight - nLabelHeight;
 

uui/source/passworddlg.cxx

     long nNewLabelHeight = 0;
     for( nNewLabelHeight = ( nTextWidth / nLabelWidth + 1 ) * nTextHeight; 
         nNewLabelHeight < aRect.GetHeight();
-        nNewLabelHeight += nTextHeight ) ;
+		nNewLabelHeight += nTextHeight ) {} ;
 
     long nDelta = nNewLabelHeight - nLabelHeight;
 

uui/source/sslwarndlg.hrc

 
 // Dims
 
-#define DLG_WIDTH              210
+#define DLG_WIDTH              240
 #define DLG_HEIGHT             125
 
 #define DLG_WARMIMG_HEIGHT      20
 
 #define DLG_CTLBTN_START_Y	   DLG_HEIGHT - RSC_SP_CTRL_X - RSC_CD_PUSHBUTTON_HEIGHT
 
-#define DLG_CTLBTN_CANCEL_PUSHBUTTON_WIDTH RSC_CD_PUSHBUTTON_WIDTH + 5
-#define DLG_CTLBTN_CANCEL_START_X  DLG_WIDTH - 15 - DLG_CTLBTN_CANCEL_PUSHBUTTON_WIDTH
+#define DLG_CTLBTN_CANCEL_PUSHBUTTON_WIDTH RSC_CD_PUSHBUTTON_WIDTH + 20
+#define DLG_CTLBTN_CANCEL_START_X  DLG_WIDTH - 45 - DLG_CTLBTN_CANCEL_PUSHBUTTON_WIDTH
 #define DLG_CTLBTN_OK_START_X      DLG_CTLBTN_CANCEL_START_X - RSC_CD_PUSHBUTTON_WIDTH - RSC_SP_CTRL_GROUP_X
+#define DLG_CTLBTN_CERT_PUSHBUTTON_WIDTH RSC_CD_PUSHBUTTON_WIDTH + 25 
 #define DLG_CTLBTN_CERT_START_X    DLG_TEXT_START_X
 #endif //UUI_SSLWARN_HRC

uui/source/sslwarndlg.src

     FixedText FT_LABEL_1
     {
         Pos = MAP_APPFONT( DLG_TEXT_START_X, RSC_SP_DLG_INNERBORDER_TOP );
-        Size = MAP_APPFONT( 165, DLG_TEXT_1_HEIGHT );
+        Size = MAP_APPFONT( 195, DLG_TEXT_1_HEIGHT );
 
         Text [ en-US ] = "No Text";
 
     PushButton PB_VIEW__CERTIFICATE
     {
         Pos = MAP_APPFONT( DLG_CTLBTN_CERT_START_X, DLG_CTLBTN_START_Y );
-        Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
+        Size = MAP_APPFONT( DLG_CTLBTN_CERT_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
 
         Text [ en-US ] = "View Certificate";