From 2e677c39818f3a6479ac9103ac9c7e8ef985eeb0 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Wed, 26 Sep 2012 23:45:28 +0200 Subject: gbuild: split uwinapi out of gb_STDLIBS Change-Id: I53316e0b9369d806197bccb42cf22d3497af43e7 --- xmlsecurity/CppunitTest_qa_certext.mk | 1 + xmlsecurity/Library_xmlsecurity.mk | 1 + xmlsecurity/Library_xsec_fw.mk | 1 + xmlsecurity/Library_xsec_xmlsec.mk | 1 + 4 files changed, 4 insertions(+) (limited to 'xmlsecurity') diff --git a/xmlsecurity/CppunitTest_qa_certext.mk b/xmlsecurity/CppunitTest_qa_certext.mk index 7fd7af10deb3..7501f23cc110 100644 --- a/xmlsecurity/CppunitTest_qa_certext.mk +++ b/xmlsecurity/CppunitTest_qa_certext.mk @@ -44,6 +44,7 @@ $(eval $(call gb_CppunitTest_use_libraries,xmlsecurity_qa_certext,\ svl \ test \ tl \ + $(gb_UWINAPI) \ $(gb_STDLIBS) \ )) diff --git a/xmlsecurity/Library_xmlsecurity.mk b/xmlsecurity/Library_xmlsecurity.mk index aae123bd8c47..09766bc188f4 100644 --- a/xmlsecurity/Library_xmlsecurity.mk +++ b/xmlsecurity/Library_xmlsecurity.mk @@ -51,6 +51,7 @@ $(eval $(call gb_Library_use_libraries,xmlsecurity,\ utl \ vcl \ xo \ + $(gb_UWINAPI) \ $(gb_STDLIBS) \ )) diff --git a/xmlsecurity/Library_xsec_fw.mk b/xmlsecurity/Library_xsec_fw.mk index 4ea0768b4d51..99b393f532de 100644 --- a/xmlsecurity/Library_xsec_fw.mk +++ b/xmlsecurity/Library_xsec_fw.mk @@ -41,6 +41,7 @@ $(eval $(call gb_Library_use_libraries,xsec_fw,\ cppu \ cppuhelper \ sal \ + $(gb_UWINAPI) \ $(gb_STDLIBS) \ )) diff --git a/xmlsecurity/Library_xsec_xmlsec.mk b/xmlsecurity/Library_xsec_xmlsec.mk index e2048f60454a..5195db72d41a 100644 --- a/xmlsecurity/Library_xsec_xmlsec.mk +++ b/xmlsecurity/Library_xsec_xmlsec.mk @@ -65,6 +65,7 @@ $(eval $(call gb_Library_use_libraries,xsec_xmlsec,\ svl \ tl \ xo \ + $(gb_UWINAPI) \ $(gb_STDLIBS) \ )) -- cgit From b85c34978356eb01311f197f00f4dd5f808e3664 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 27 Sep 2012 00:49:12 +0200 Subject: gbuild: replace direct gb_STDLIBS use with ... ... new gb_LinkTarget_add_standard_system_libs Change-Id: Ib2bc843098db3d8c6822b45a3d21724e67f57d69 --- xmlsecurity/CppunitTest_qa_certext.mk | 3 ++- xmlsecurity/Library_xmlsecurity.mk | 3 ++- xmlsecurity/Library_xsec_fw.mk | 3 ++- xmlsecurity/Library_xsec_xmlsec.mk | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) (limited to 'xmlsecurity') diff --git a/xmlsecurity/CppunitTest_qa_certext.mk b/xmlsecurity/CppunitTest_qa_certext.mk index 7501f23cc110..201b8bf540cb 100644 --- a/xmlsecurity/CppunitTest_qa_certext.mk +++ b/xmlsecurity/CppunitTest_qa_certext.mk @@ -45,9 +45,10 @@ $(eval $(call gb_CppunitTest_use_libraries,xmlsecurity_qa_certext,\ test \ tl \ $(gb_UWINAPI) \ - $(gb_STDLIBS) \ )) +$(eval $(call gb_CppunitTest_add_standard_system_libs,xmlsecurity_qa_certext)) + $(eval $(call gb_CppunitTest_add_exception_objects,xmlsecurity_qa_certext,\ xmlsecurity/qa/certext/SanCertExt \ )) diff --git a/xmlsecurity/Library_xmlsecurity.mk b/xmlsecurity/Library_xmlsecurity.mk index 09766bc188f4..3333e21f5fce 100644 --- a/xmlsecurity/Library_xmlsecurity.mk +++ b/xmlsecurity/Library_xmlsecurity.mk @@ -52,9 +52,10 @@ $(eval $(call gb_Library_use_libraries,xmlsecurity,\ vcl \ xo \ $(gb_UWINAPI) \ - $(gb_STDLIBS) \ )) +$(eval $(call gb_Library_add_standard_system_libs,xmlsecurity)) + $(eval $(call gb_Library_add_exception_objects,xmlsecurity,\ xmlsecurity/source/component/certificatecontainer \ xmlsecurity/source/component/documentdigitalsignatures \ diff --git a/xmlsecurity/Library_xsec_fw.mk b/xmlsecurity/Library_xsec_fw.mk index 99b393f532de..1aea707bcb5e 100644 --- a/xmlsecurity/Library_xsec_fw.mk +++ b/xmlsecurity/Library_xsec_fw.mk @@ -42,9 +42,10 @@ $(eval $(call gb_Library_use_libraries,xsec_fw,\ cppuhelper \ sal \ $(gb_UWINAPI) \ - $(gb_STDLIBS) \ )) +$(eval $(call gb_Library_add_standard_system_libs,xsec_fw)) + $(eval $(call gb_Library_add_exception_objects,xsec_fw,\ xmlsecurity/source/framework/buffernode \ xmlsecurity/source/framework/decryptorimpl \ diff --git a/xmlsecurity/Library_xsec_xmlsec.mk b/xmlsecurity/Library_xsec_xmlsec.mk index 5195db72d41a..41cbfafcaad1 100644 --- a/xmlsecurity/Library_xsec_xmlsec.mk +++ b/xmlsecurity/Library_xsec_xmlsec.mk @@ -66,9 +66,10 @@ $(eval $(call gb_Library_use_libraries,xsec_xmlsec,\ tl \ xo \ $(gb_UWINAPI) \ - $(gb_STDLIBS) \ )) +$(eval $(call gb_Library_add_standard_system_libs,xsec_xmlsec)) + $(eval $(call gb_Library_use_externals,xsec_xmlsec,\ libxml2 \ )) -- cgit From 80374355ab96fa73f2aee8971195faf3cf5985f5 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 28 Sep 2012 12:25:50 +0200 Subject: gbuild: gb_Library_PLAINLIBS_NONE cleanup for unxgcc/solaris Change-Id: Ia7f64bdd0fd81c5dcc08d828db4602b65e2da949 --- xmlsecurity/Library_xsec_xmlsec.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xmlsecurity') diff --git a/xmlsecurity/Library_xsec_xmlsec.mk b/xmlsecurity/Library_xsec_xmlsec.mk index 41cbfafcaad1..3966e76e4052 100644 --- a/xmlsecurity/Library_xsec_xmlsec.mk +++ b/xmlsecurity/Library_xsec_xmlsec.mk @@ -181,8 +181,8 @@ $(eval $(call gb_Library_use_libraries,xsec_xmlsec,\ endif # ifeq ($(SYSTEM_NSS),YES) ifeq ($(OS),SOLARIS) -$(eval $(call gb_Library_use_libraries,xsec_xmlsec,\ - dl \ +$(eval $(call gb_Library_add_libs,xsec_xmlsec,\ + -ldl \ )) endif -- cgit From dc397aae70433c0086ef41f4dac5289fb07a9b19 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 28 Sep 2012 15:31:46 +0200 Subject: gbuild: gb_Library_PLAINLIBS_NONE cleanup for WNT: add a new gb_LinkTarget_use_system_win32_libs to abstract different linker options on MSVC and GCC. Change-Id: Ic9bf2545f59bf7871e6fc06b290c486ddfbec03d --- xmlsecurity/Library_xsec_xmlsec.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xmlsecurity') diff --git a/xmlsecurity/Library_xsec_xmlsec.mk b/xmlsecurity/Library_xsec_xmlsec.mk index 3966e76e4052..27479a3fc63f 100644 --- a/xmlsecurity/Library_xsec_xmlsec.mk +++ b/xmlsecurity/Library_xsec_xmlsec.mk @@ -101,7 +101,7 @@ $(eval $(call gb_Library_use_libraries,xsec_xmlsec,\ xmlsec1-mscrypto \ )) -$(eval $(call gb_Library_use_libraries,xsec_xmlsec,\ +$(eval $(call gb_Library_use_system_win32_libs,xsec_xmlsec,\ crypt32 \ advapi32 \ )) -- cgit From 5032dc0fc339ba6b200e80a5482cc86e00662a0b Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 28 Sep 2012 16:29:24 +0200 Subject: gbuild: invert handling of standard system libraries: Always link in gb_STDLIBS, except when the library explicitly opts out with gb_LinkTarget_disable_standard_system_libs. Change-Id: I489a99114fbfa46d0421a27cf6c7b899dc268a4a --- xmlsecurity/CppunitTest_qa_certext.mk | 2 -- xmlsecurity/Library_xmlsecurity.mk | 2 -- xmlsecurity/Library_xsec_fw.mk | 2 -- xmlsecurity/Library_xsec_xmlsec.mk | 2 -- 4 files changed, 8 deletions(-) (limited to 'xmlsecurity') diff --git a/xmlsecurity/CppunitTest_qa_certext.mk b/xmlsecurity/CppunitTest_qa_certext.mk index 201b8bf540cb..c42e02408fd7 100644 --- a/xmlsecurity/CppunitTest_qa_certext.mk +++ b/xmlsecurity/CppunitTest_qa_certext.mk @@ -47,8 +47,6 @@ $(eval $(call gb_CppunitTest_use_libraries,xmlsecurity_qa_certext,\ $(gb_UWINAPI) \ )) -$(eval $(call gb_CppunitTest_add_standard_system_libs,xmlsecurity_qa_certext)) - $(eval $(call gb_CppunitTest_add_exception_objects,xmlsecurity_qa_certext,\ xmlsecurity/qa/certext/SanCertExt \ )) diff --git a/xmlsecurity/Library_xmlsecurity.mk b/xmlsecurity/Library_xmlsecurity.mk index 3333e21f5fce..097e016aa3af 100644 --- a/xmlsecurity/Library_xmlsecurity.mk +++ b/xmlsecurity/Library_xmlsecurity.mk @@ -54,8 +54,6 @@ $(eval $(call gb_Library_use_libraries,xmlsecurity,\ $(gb_UWINAPI) \ )) -$(eval $(call gb_Library_add_standard_system_libs,xmlsecurity)) - $(eval $(call gb_Library_add_exception_objects,xmlsecurity,\ xmlsecurity/source/component/certificatecontainer \ xmlsecurity/source/component/documentdigitalsignatures \ diff --git a/xmlsecurity/Library_xsec_fw.mk b/xmlsecurity/Library_xsec_fw.mk index 1aea707bcb5e..24de37ee7c66 100644 --- a/xmlsecurity/Library_xsec_fw.mk +++ b/xmlsecurity/Library_xsec_fw.mk @@ -44,8 +44,6 @@ $(eval $(call gb_Library_use_libraries,xsec_fw,\ $(gb_UWINAPI) \ )) -$(eval $(call gb_Library_add_standard_system_libs,xsec_fw)) - $(eval $(call gb_Library_add_exception_objects,xsec_fw,\ xmlsecurity/source/framework/buffernode \ xmlsecurity/source/framework/decryptorimpl \ diff --git a/xmlsecurity/Library_xsec_xmlsec.mk b/xmlsecurity/Library_xsec_xmlsec.mk index 27479a3fc63f..4eceb305587a 100644 --- a/xmlsecurity/Library_xsec_xmlsec.mk +++ b/xmlsecurity/Library_xsec_xmlsec.mk @@ -68,8 +68,6 @@ $(eval $(call gb_Library_use_libraries,xsec_xmlsec,\ $(gb_UWINAPI) \ )) -$(eval $(call gb_Library_add_standard_system_libs,xsec_xmlsec)) - $(eval $(call gb_Library_use_externals,xsec_xmlsec,\ libxml2 \ )) -- cgit From 6fe5360e0b8876c5e7a5d1465e7772a1d84f4065 Mon Sep 17 00:00:00 2001 From: Ivan Timofeev Date: Mon, 1 Oct 2012 20:58:03 +0400 Subject: fix String->OUString conversion Change-Id: I65d9cda603aa95f36df57494195b159f9d2619ac --- xmlsecurity/source/dialogs/certificateviewer.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xmlsecurity') diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx b/xmlsecurity/source/dialogs/certificateviewer.cxx index b75e37e96c5a..27e0cbcba048 100644 --- a/xmlsecurity/source/dialogs/certificateviewer.cxx +++ b/xmlsecurity/source/dialogs/certificateviewer.cxx @@ -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 ); -- cgit From c25cb8a641723ab098980bb842caf75c0dc9b059 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 2 Oct 2012 15:03:12 +0200 Subject: fdo#46808, Adapt task::InteractionHandler UNO service to new style Since we don't need to expose XInitialisation, we can make the new-style service implement XInteractionHandler2. Change-Id: Ib27beed1c12df17592c6472d6f58c233d2c41558 --- .../xmlsec/nss/securityenvironment_nssimpl.cxx | 44 ++++++++++------------ 1 file changed, 19 insertions(+), 25 deletions(-) (limited to 'xmlsecurity') diff --git a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx index 7f56603ecc2b..74ac0a3078a5 100644 --- a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx +++ b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx @@ -46,7 +46,7 @@ #include #include #include -#include +#include #include #include "boost/scoped_array.hpp" #include @@ -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::createDefault(xContext) ); - 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; } -- cgit From dd11a1e57a2565560803dc3fef5fccc9e7157105 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 4 Oct 2012 14:36:34 +0200 Subject: Fixes/improvements on previous commit * UUIInteractionHandler still needs to implement XInitialization. * Moved ambiguating InteractionHandler typedef out of the way. * Removed InteractionHandler.createDefault, as it was originally stated that "it is strongly recommended that [the "Parent"] property is supplied." * Added back documentation about Parent and Context. * Simplified some call-sites to directly use XInteractionHandler2. Change-Id: I1029b8f3cf079171c75920cafaaa44b5bbada883 --- xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xmlsecurity') diff --git a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx index 74ac0a3078a5..1d7280747c24 100644 --- a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx +++ b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx @@ -106,7 +106,7 @@ char* GetPasswordFunction( PK11SlotInfo* pSlot, PRBool bRetry, void* /*arg*/ ) { uno::Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); uno::Reference < task::XInteractionHandler2 > xInteractionHandler( - task::InteractionHandler::createDefault(xContext) ); + task::InteractionHandler::createWithParent(xContext, 0) ); task::PasswordRequestMode eMode = bRetry ? task::PasswordRequestMode_PASSWORD_REENTER : task::PasswordRequestMode_PASSWORD_ENTER; ::comphelper::DocPasswordRequest* pPasswordRequest = new ::comphelper::DocPasswordRequest( -- cgit From a20f9a410fdd3f776f870434bc39219d5fc64b40 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 3 Oct 2012 13:30:43 +0200 Subject: fdo#46808, Adapt xml::sax::XParser UNO service to new style The xml.sax.Parser service already existed, it just did not have a new-style service to create it. Change-Id: I6f145a7504ff9e149c802f723991954a2801cbc9 --- xmlsecurity/source/helper/xmlsignaturehelper.cxx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'xmlsecurity') 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 #include #include +#include #include #include @@ -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 -- cgit From 14916972c532bc4713c2bc11acd3c4f9c74e93a1 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 25 Sep 2012 17:28:22 +0200 Subject: sal_Bool->bool in xmlsecurity Change-Id: I80b20f5df179f994e5004c1ef390457c252478ef --- xmlsecurity/inc/xmlsecurity/certificatechooser.hxx | 2 +- xmlsecurity/inc/xmlsecurity/certificateviewer.hxx | 4 ++-- xmlsecurity/inc/xmlsecurity/macrosecurity.hxx | 4 ++-- xmlsecurity/source/dialogs/certificatechooser.cxx | 4 ++-- xmlsecurity/source/dialogs/certificateviewer.cxx | 4 ++-- xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx | 2 +- xmlsecurity/source/dialogs/macrosecurity.cxx | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) (limited to 'xmlsecurity') 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 27e0cbcba048..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 ) ) @@ -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(); } } -- cgit From d540c322cce4f00418466cf7715ecc2c2f1e95c5 Mon Sep 17 00:00:00 2001 From: Marcos Paulo de Souza Date: Mon, 8 Oct 2012 18:15:59 -0300 Subject: Remove more useless code inside "#if 0" blocks Change-Id: Ifb9f9d2211608b848a5de66e1d19c4815a755907 Signed-off-by: Marcos Paulo de Souza Reviewed-on: https://gerrit.libreoffice.org/840 Reviewed-by: Markus Mohrhard Tested-by: Markus Mohrhard --- .../xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.hxx | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'xmlsecurity') 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_ -- cgit