diff options
author | Andras Timar <atimar@suse.com> | 2012-10-13 17:41:05 +0200 |
---|---|---|
committer | Andras Timar <atimar@suse.com> | 2012-10-13 17:41:05 +0200 |
commit | e5ce011c3f32f53ef073aec5485450b2588b656a (patch) | |
tree | 8a838a53bcdd70cc3d4cdbca0ebe07504790952e /xmlsecurity | |
parent | c6b26144c93aa5222e4260c5b0ef45ce5bdc18d2 (diff) | |
parent | e74fc93e4aba7887e6a278cc44c4bc0962471065 (diff) |
Merge branch 'master' into feature/killsdf
Conflicts:
Makefile.top
Module_tail_build.mk
RepositoryExternal.mk
RepositoryFixes.mk
accessibility/source/standard/vclxaccessibletoolbox.cxx
basic/source/uno/dlgcont.cxx
connectivity/Library_ado.mk
cross_tail_build/prj/build.lst
desktop/source/offacc/acceptor.cxx
filter/Library_PptImporter.mk
filter/source/t602/filterenv.cxx
i18npool/Library_textconv_dict.mk
ooo.lst.in
saxon/ExternalProject_saxon.mk
saxon/build.xml
sc/sdi/scalc.sdi
sc/source/filter/xml/xmlstyli.cxx
sc/source/ui/condformat/condformatdlg.cxx
sc/source/ui/condformat/condformatmgr.cxx
sc/source/ui/view/cellsh1.cxx
sdext/source/pdfimport/misc/pwdinteract.cxx
shell/qa/zip/makefile.mk
shell/qa/zip/testimpl/makefile.mk
solenv/gbuild/CppunitTest.mk
solenv/gbuild/gbuild.mk
solenv/gbuild/platform/android.mk
solenv/gbuild/platform/com_GCC_defs.mk
solenv/gbuild/platform/macosx.mk
soltools/Executable_adjustvisibility.mk
soltools/Executable_checkdll.mk
soltools/Executable_cpp.mk
soltools/Executable_javadep.mk
soltools/Executable_makedepend.mk
sw/qa/extras/rtfimport/rtfimport.cxx
tail_build/prj/build.lst
tomcat/ExternalProject_tomcat.mk
ucb/source/ucp/webdav/webdavcontent.cxx
xml2cmp/Executable_xml2cmp.mk
Diffstat (limited to 'xmlsecurity')
10 files changed, 34 insertions, 64 deletions
diff --git a/xmlsecurity/inc/xmlsecurity/certificatechooser.hxx b/xmlsecurity/inc/xmlsecurity/certificatechooser.hxx index 52d5730a17e6..cf858008c681 100644 --- a/xmlsecurity/inc/xmlsecurity/certificatechooser.hxx +++ b/xmlsecurity/inc/xmlsecurity/certificatechooser.hxx @@ -62,7 +62,7 @@ private: CancelButton maCancelBtn; HelpButton maHelpBtn; - sal_Bool mbInitialized; + bool mbInitialized; sal_uInt16 GetSelectedEntryPos( void ) const; DECL_LINK(ViewButtonHdl, void *); diff --git a/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx b/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx index 2bbbe08668f8..26b03fb06582 100644 --- a/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx +++ b/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx @@ -54,12 +54,12 @@ private: OKButton maOkBtn; HelpButton maHelpBtn; - sal_Bool mbCheckForPrivateKey; + bool mbCheckForPrivateKey; cssu::Reference< dcss::xml::crypto::XSecurityEnvironment > mxSecurityEnvironment; cssu::Reference< dcss::security::XCertificate > mxCert; public: - CertificateViewer( Window* pParent, const cssu::Reference< dcss::xml::crypto::XSecurityEnvironment >& rxSecurityEnvironment, const cssu::Reference< dcss::security::XCertificate >& rXCert, sal_Bool bCheckForPrivateKey ); + CertificateViewer( Window* pParent, const cssu::Reference< dcss::xml::crypto::XSecurityEnvironment >& rxSecurityEnvironment, const cssu::Reference< dcss::security::XCertificate >& rXCert, bool bCheckForPrivateKey ); virtual ~CertificateViewer(); }; diff --git a/xmlsecurity/inc/xmlsecurity/macrosecurity.hxx b/xmlsecurity/inc/xmlsecurity/macrosecurity.hxx index 7c6e44cf08fd..967dc59a989f 100644 --- a/xmlsecurity/inc/xmlsecurity/macrosecurity.hxx +++ b/xmlsecurity/inc/xmlsecurity/macrosecurity.hxx @@ -143,8 +143,8 @@ private: cssu::Sequence< SvtSecurityOptions::Certificate > maTrustedAuthors; - sal_Bool mbAuthorsReadonly; - sal_Bool mbURLsReadonly; + bool mbAuthorsReadonly; + bool mbURLsReadonly; DECL_LINK( ViewCertPBHdl, void* ); DECL_LINK( RemoveCertPBHdl, void* ); diff --git a/xmlsecurity/source/dialogs/certificatechooser.cxx b/xmlsecurity/source/dialogs/certificatechooser.cxx index c93e6922d0da..27a486dca6fd 100644 --- a/xmlsecurity/source/dialogs/certificatechooser.cxx +++ b/xmlsecurity/source/dialogs/certificatechooser.cxx @@ -76,7 +76,7 @@ CertificateChooser::CertificateChooser( Window* _pParent, uno::Reference< uno::X mxCtx = _rxCtx; mxSecurityEnvironment = _rxSecurityEnvironment; - mbInitialized = sal_False; + mbInitialized = false; // disable buttons CertificateHighlightHdl( NULL ); @@ -183,7 +183,7 @@ void CertificateChooser::ImplInitialize() // enable/disable buttons CertificateHighlightHdl( NULL ); - mbInitialized = sal_True; + mbInitialized = true; } } diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx b/xmlsecurity/source/dialogs/certificateviewer.cxx index b75e37e96c5a..7a7486e229c8 100644 --- a/xmlsecurity/source/dialogs/certificateviewer.cxx +++ b/xmlsecurity/source/dialogs/certificateviewer.cxx @@ -51,7 +51,7 @@ namespace CertificateViewer::CertificateViewer( Window* _pParent, const cssu::Reference< dcss::xml::crypto::XSecurityEnvironment >& _rxSecurityEnvironment, - const cssu::Reference< dcss::security::XCertificate >& _rXCert, sal_Bool bCheckForPrivateKey ) + const cssu::Reference< dcss::security::XCertificate >& _rXCert, bool bCheckForPrivateKey ) :TabDialog ( _pParent, XMLSEC_RES( RID_XMLSECDLG_CERTVIEWER ) ) ,maTabCtrl ( this, XMLSEC_RES( 1 ) ) ,maOkBtn ( this, XMLSEC_RES( BTN_OK ) ) @@ -171,9 +171,9 @@ CertificateViewerGeneralTP::CertificateViewerGeneralTP( Window* _pParent, Certif utl::typeConvert( xCert->getNotValidBefore(), aDateTimeStart ); utl::typeConvert( xCert->getNotValidAfter(), aDateTimeEnd ); OUString sText = maValidDateFI.GetText(); - sText.replaceFirst( "%SDATE%", + sText = sText.replaceFirst( "%SDATE%", GetSettings().GetUILocaleDataWrapper().getDate( aDateTimeStart.GetDate() ) ); - sText.replaceFirst( "%EDATE%", + sText = sText.replaceFirst( "%EDATE%", GetSettings().GetUILocaleDataWrapper().getDate( aDateTimeEnd.GetDate() ) ); maValidDateFI.SetText( sText ); @@ -456,7 +456,7 @@ IMPL_LINK_NOARG(CertificateViewerCertPathTP, ViewCertHdl) SvLBoxEntry* pEntry = maCertPathLB.FirstSelected(); if( pEntry ) { - CertificateViewer aViewer( this, mpDlg->mxSecurityEnvironment, ((CertPath_UserData*)pEntry->GetUserData())->mxCert, sal_False ); + CertificateViewer aViewer( this, mpDlg->mxSecurityEnvironment, ((CertPath_UserData*)pEntry->GetUserData())->mxCert, false ); aViewer.Execute(); } diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx index 32616ae78ea8..951ed3171c72 100644 --- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx +++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx @@ -751,7 +751,7 @@ void DigitalSignaturesDialog::ImplShowSignaturesDetails() DBG_ASSERT( xCert.is(), "Error getting cCertificate!" ); if ( xCert.is() ) { - CertificateViewer aViewer( this, maSignatureHelper.GetSecurityEnvironment(), xCert, sal_False ); + CertificateViewer aViewer( this, maSignatureHelper.GetSecurityEnvironment(), xCert, false ); aViewer.Execute(); } } diff --git a/xmlsecurity/source/dialogs/macrosecurity.cxx b/xmlsecurity/source/dialogs/macrosecurity.cxx index 4d951ed18b33..c814c5968cba 100644 --- a/xmlsecurity/source/dialogs/macrosecurity.cxx +++ b/xmlsecurity/source/dialogs/macrosecurity.cxx @@ -203,7 +203,7 @@ IMPL_LINK_NOARG(MacroSecurityTrustedSourcesTP, ViewCertPBHdl) if ( xCert.is() ) { - CertificateViewer aViewer( this, mpDlg->mxSecurityEnvironment, xCert, sal_False ); + CertificateViewer aViewer( this, mpDlg->mxSecurityEnvironment, xCert, false ); aViewer.Execute(); } } diff --git a/xmlsecurity/source/helper/xmlsignaturehelper.cxx b/xmlsecurity/source/helper/xmlsignaturehelper.cxx index 34dc04a97507..26318d80e0a1 100644 --- a/xmlsecurity/source/helper/xmlsignaturehelper.cxx +++ b/xmlsecurity/source/helper/xmlsignaturehelper.cxx @@ -35,6 +35,7 @@ #include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/security/SerialNumberAdapter.hpp> #include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/xml/sax/Parser.hpp> #include <tools/date.hxx> #include <tools/time.hxx> @@ -253,13 +254,7 @@ bool XMLSignatureHelper::ReadAndVerifySignature( const com::sun::star::uno::Refe /* * get SAX parser component */ - uno::Reference< lang::XMultiComponentFactory > xMCF( mxCtx->getServiceManager() ); - uno::Reference< xml::sax::XParser > xParser( - xMCF->createInstanceWithContext( - rtl::OUString("com.sun.star.xml.sax.Parser" ), mxCtx ), - uno::UNO_QUERY ); - - DBG_ASSERT( xParser.is(), "Can't create parser" ); + uno::Reference< xml::sax::XParser > xParser = xml::sax::Parser::create(mxCtx); /* * create a signature reader diff --git a/xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.hxx b/xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.hxx index 438a0c289570..9ee8e029647f 100644 --- a/xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.hxx +++ b/xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.hxx @@ -74,14 +74,6 @@ class XMLSecurityContext_MSCryptImpl : public ::cppu::WeakImplHelper3< virtual void SAL_CALL setDefaultSecurityEnvironmentIndex( sal_Int32 nDefaultEnvIndex ) throw (::com::sun::star::uno::RuntimeException); -#if 0 - virtual void SAL_CALL setSecurityEnvironment( - const ::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XSecurityEnvironment >& aSecurityEnvironment - ) throw( com::sun::star::security::SecurityInfrastructureException) ; - - virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XSecurityEnvironment > SAL_CALL getSecurityEnvironment() - throw(::com::sun::star::uno::RuntimeException); -#endif //Methods from XInitialization virtual void SAL_CALL initialize( @@ -107,17 +99,6 @@ class XMLSecurityContext_MSCryptImpl : public ::cppu::WeakImplHelper3< static ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > impl_createFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& aServiceManager ) ; -#if 0 - //Methods from XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) - throw (com::sun::star::uno::RuntimeException); - - static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId() ; - static XMLSecurityContext_MSCryptImpl* getImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xObj ) ; -#endif - - //Native mehtods - //virtual xmlSecKeysMngrPtr keysManager() throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ; } ; #endif // _XMLSIGNATURECONTEXT_MSCRYPTIMPL_HXX_ diff --git a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx index 7f56603ecc2b..1d7280747c24 100644 --- a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx +++ b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx @@ -46,7 +46,7 @@ #include <comphelper/docpasswordrequest.hxx> #include <xmlsecurity/biginteger.hxx> #include <rtl/logfile.h> -#include <com/sun/star/task/XInteractionHandler.hpp> +#include <com/sun/star/task/InteractionHandler.hpp> #include <vector> #include "boost/scoped_array.hpp" #include <osl/thread.h> @@ -104,33 +104,27 @@ struct UsageDescription char* GetPasswordFunction( PK11SlotInfo* pSlot, PRBool bRetry, void* /*arg*/ ) { - uno::Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() ); - if ( xMSF.is() ) - { - uno::Reference < task::XInteractionHandler > xInteractionHandler( - xMSF->createInstance( rtl::OUString("com.sun.star.task.InteractionHandler") ), uno::UNO_QUERY ); + uno::Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); + uno::Reference < task::XInteractionHandler2 > xInteractionHandler( + task::InteractionHandler::createWithParent(xContext, 0) ); - if ( xInteractionHandler.is() ) - { - task::PasswordRequestMode eMode = bRetry ? task::PasswordRequestMode_PASSWORD_REENTER : task::PasswordRequestMode_PASSWORD_ENTER; - ::comphelper::DocPasswordRequest* pPasswordRequest = new ::comphelper::DocPasswordRequest( - ::comphelper::DocPasswordRequestType_STANDARD, eMode, ::rtl::OUString::createFromAscii(PK11_GetTokenName(pSlot)) ); + task::PasswordRequestMode eMode = bRetry ? task::PasswordRequestMode_PASSWORD_REENTER : task::PasswordRequestMode_PASSWORD_ENTER; + ::comphelper::DocPasswordRequest* pPasswordRequest = new ::comphelper::DocPasswordRequest( + ::comphelper::DocPasswordRequestType_STANDARD, eMode, ::rtl::OUString::createFromAscii(PK11_GetTokenName(pSlot)) ); - uno::Reference< task::XInteractionRequest > xRequest( pPasswordRequest ); - xInteractionHandler->handle( xRequest ); + uno::Reference< task::XInteractionRequest > xRequest( pPasswordRequest ); + xInteractionHandler->handle( xRequest ); - if ( pPasswordRequest->isPassword() ) - { - rtl::OString aPassword(rtl::OUStringToOString( - pPasswordRequest->getPassword(), - osl_getThreadTextEncoding())); - sal_Int32 nLen = aPassword.getLength(); - char* pPassword = (char*) PORT_Alloc( nLen+1 ) ; - pPassword[nLen] = 0; - memcpy( pPassword, aPassword.getStr(), nLen ); - return pPassword; - } - } + if ( pPasswordRequest->isPassword() ) + { + rtl::OString aPassword(rtl::OUStringToOString( + pPasswordRequest->getPassword(), + osl_getThreadTextEncoding())); + sal_Int32 nLen = aPassword.getLength(); + char* pPassword = (char*) PORT_Alloc( nLen+1 ) ; + pPassword[nLen] = 0; + memcpy( pPassword, aPassword.getStr(), nLen ); + return pPassword; } return NULL; } |