loplugin:unusedfields in xmlscript,xmlsecurity

Change-Id: I5239766f2105fb1a7823215a4ffe48891e000c3d
This commit is contained in:
Noel Grandin
2015-12-21 10:27:05 +02:00
parent d8ff907197
commit a218039d2a
12 changed files with 34 additions and 51 deletions

View File

@@ -124,7 +124,6 @@ struct DialogImport
css::uno::Reference< css::container::XNameContainer > _xDialogModel;
css::uno::Reference< css::lang::XMultiServiceFactory > _xDialogModelFactory;
css::uno::Reference< css::frame::XModel > _xDoc;
css::uno::Reference< css::script::XLibraryContainer > _xScriptLibraryContainer;
sal_Int32 XMLNS_DIALOGS_UID, XMLNS_SCRIPT_UID;

View File

@@ -65,9 +65,8 @@ namespace xmlscript
// XMLBasicExporterBase
XMLBasicExporterBase::XMLBasicExporterBase( const Reference< XComponentContext >& rxContext, bool bOasis )
:m_xContext( rxContext )
,m_bOasis( bOasis )
XMLBasicExporterBase::XMLBasicExporterBase( bool bOasis )
:m_bOasis( bOasis )
{
}
@@ -364,8 +363,8 @@ sal_Bool XMLBasicExporterBase::filter( const Sequence< beans::PropertyValue >& /
// XMLBasicExporter
XMLBasicExporter::XMLBasicExporter( const Reference< XComponentContext >& rxContext )
:XMLBasicExporterBase( rxContext, false )
XMLBasicExporter::XMLBasicExporter()
:XMLBasicExporterBase( false )
{
}
@@ -387,8 +386,8 @@ sal_Bool XMLBasicExporterBase::filter( const Sequence< beans::PropertyValue >& /
// XMLOasisBasicExporter
XMLOasisBasicExporter::XMLOasisBasicExporter( const Reference< XComponentContext >& rxContext )
:XMLBasicExporterBase( rxContext, true )
XMLOasisBasicExporter::XMLOasisBasicExporter()
:XMLBasicExporterBase( true )
{
}
@@ -411,15 +410,15 @@ sal_Bool XMLBasicExporterBase::filter( const Sequence< beans::PropertyValue >& /
// component operations
Reference< XInterface > SAL_CALL create_XMLBasicExporter(
Reference< XComponentContext > const & xContext )
Reference< XComponentContext > const & )
{
return static_cast< lang::XTypeProvider * >( new XMLBasicExporter( xContext ) );
return static_cast< lang::XTypeProvider * >( new XMLBasicExporter );
}
Reference< XInterface > SAL_CALL create_XMLOasisBasicExporter(
Reference< XComponentContext > const & xContext )
Reference< XComponentContext > const & )
{
return static_cast< lang::XTypeProvider * >( new XMLOasisBasicExporter( xContext ) );
return static_cast< lang::XTypeProvider * >( new XMLOasisBasicExporter );
}
} // namespace xmlscript

View File

@@ -43,14 +43,12 @@ namespace xmlscript
{
private:
::osl::Mutex m_aMutex;
css::uno::Reference< css::uno::XComponentContext > m_xContext;
css::uno::Reference< css::xml::sax::XDocumentHandler > m_xHandler;
css::uno::Reference< css::frame::XModel > m_xModel;
bool m_bOasis;
public:
XMLBasicExporterBase(
const css::uno::Reference< css::uno::XComponentContext >& rxContext, bool bOasis );
XMLBasicExporterBase(bool bOasis );
virtual ~XMLBasicExporterBase();
// XServiceInfo
@@ -77,8 +75,7 @@ namespace xmlscript
class XMLBasicExporter : public XMLBasicExporterBase
{
public:
explicit XMLBasicExporter(
const css::uno::Reference< css::uno::XComponentContext >& rxContext );
explicit XMLBasicExporter();
virtual ~XMLBasicExporter();
// XServiceInfo
@@ -93,8 +90,7 @@ namespace xmlscript
class XMLOasisBasicExporter : public XMLBasicExporterBase
{
public:
explicit XMLOasisBasicExporter(
const css::uno::Reference< css::uno::XComponentContext >& rxContext );
explicit XMLOasisBasicExporter();
virtual ~XMLOasisBasicExporter();
// XServiceInfo

View File

@@ -28,10 +28,9 @@ using ::com::sun::star::lang::XSingleServiceFactory ;
using ::com::sun::star::xml::wrapper::XXMLElementWrapper ;
using ::com::sun::star::xml::crypto::XXMLEncryptionTemplate ;
XMLEncryptionTemplateImpl::XMLEncryptionTemplateImpl( const Reference< XMultiServiceFactory >& aFactory )
XMLEncryptionTemplateImpl::XMLEncryptionTemplateImpl()
: m_xTemplate( nullptr ),
m_xTarget( nullptr ),
m_xServiceManager( aFactory ),
m_nStatus ( ::com::sun::star::xml::crypto::SecurityOperationStatus_UNKNOWN ) {
}
@@ -111,8 +110,8 @@ OUString XMLEncryptionTemplateImpl::impl_getImplementationName() throw( RuntimeE
}
//Helper for registry
Reference< XInterface > SAL_CALL XMLEncryptionTemplateImpl::impl_createInstance( const Reference< XMultiServiceFactory >& aServiceManager ) throw( RuntimeException ) {
return Reference< XInterface >( *new XMLEncryptionTemplateImpl( aServiceManager ) ) ;
Reference< XInterface > SAL_CALL XMLEncryptionTemplateImpl::impl_createInstance( const Reference< XMultiServiceFactory >& ) throw( RuntimeException ) {
return Reference< XInterface >( *new XMLEncryptionTemplateImpl ) ;
}
Reference< XSingleServiceFactory > XMLEncryptionTemplateImpl::impl_createFactory( const Reference< XMultiServiceFactory >& aServiceManager ) {

View File

@@ -39,14 +39,13 @@ class XMLEncryptionTemplateImpl : public ::cppu::WeakImplHelper<
::com::sun::star::lang::XServiceInfo >
{
private:
::com::sun::star::uno::Reference< ::com::sun::star::xml::wrapper::XXMLElementWrapper > m_xTemplate ;
::com::sun::star::uno::Reference< ::com::sun::star::xml::wrapper::XXMLElementWrapper > m_xTarget ;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager ;
::com::sun::star::uno::Reference< ::com::sun::star::xml::wrapper::XXMLElementWrapper > m_xTemplate;
::com::sun::star::uno::Reference< ::com::sun::star::xml::wrapper::XXMLElementWrapper > m_xTarget;
::com::sun::star::xml::crypto::SecurityOperationStatus m_nStatus;
public:
explicit XMLEncryptionTemplateImpl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& aFactory ) ;
virtual ~XMLEncryptionTemplateImpl() ;
explicit XMLEncryptionTemplateImpl();
virtual ~XMLEncryptionTemplateImpl();
//Methods from XXMLEncryptionTemplate
virtual void SAL_CALL setTemplate(

View File

@@ -29,9 +29,8 @@ using ::com::sun::star::lang::XSingleServiceFactory ;
using ::com::sun::star::xml::wrapper::XXMLElementWrapper ;
using ::com::sun::star::xml::crypto::XXMLSignatureTemplate ;
XMLSignatureTemplateImpl::XMLSignatureTemplateImpl( const Reference< XMultiServiceFactory >& aFactory )
XMLSignatureTemplateImpl::XMLSignatureTemplateImpl()
:m_xTemplate( nullptr ),
m_xServiceManager( aFactory ),
m_nStatus ( ::com::sun::star::xml::crypto::SecurityOperationStatus_UNKNOWN )
{
}
@@ -137,8 +136,8 @@ OUString XMLSignatureTemplateImpl::impl_getImplementationName() throw( RuntimeEx
}
//Helper for registry
Reference< XInterface > SAL_CALL XMLSignatureTemplateImpl::impl_createInstance( const Reference< XMultiServiceFactory >& aServiceManager ) throw( RuntimeException ) {
return Reference< XInterface >( *new XMLSignatureTemplateImpl( aServiceManager ) ) ;
Reference< XInterface > SAL_CALL XMLSignatureTemplateImpl::impl_createInstance( const Reference< XMultiServiceFactory >& ) throw( RuntimeException ) {
return Reference< XInterface >( *new XMLSignatureTemplateImpl ) ;
}
Reference< XSingleServiceFactory > XMLSignatureTemplateImpl::impl_createFactory( const Reference< XMultiServiceFactory >& aServiceManager ) {

View File

@@ -40,15 +40,14 @@ class XMLSignatureTemplateImpl : public ::cppu::WeakImplHelper<
::com::sun::star::lang::XServiceInfo >
{
private:
::com::sun::star::uno::Reference< ::com::sun::star::xml::wrapper::XXMLElementWrapper > m_xTemplate ;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager ;
::com::sun::star::uno::Reference< ::com::sun::star::xml::wrapper::XXMLElementWrapper > m_xTemplate;
std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::xml::wrapper::XXMLElementWrapper > > targets;
::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XUriBinding > m_xUriBinding;
::com::sun::star::xml::crypto::SecurityOperationStatus m_nStatus;
public:
explicit XMLSignatureTemplateImpl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& aFactory ) ;
virtual ~XMLSignatureTemplateImpl() ;
explicit XMLSignatureTemplateImpl();
virtual ~XMLSignatureTemplateImpl();
//Methods from XXMLSignatureTemplate
virtual void SAL_CALL setTemplate(

View File

@@ -61,7 +61,6 @@ private:
std::list< PK11SymKey* > m_tSymKeyList ;
std::list< SECKEYPublicKey* > m_tPubKeyList ;
std::list< SECKEYPrivateKey* > m_tPriKeyList ;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager ;
public:
SecurityEnvironment_NssImpl();

View File

@@ -43,7 +43,7 @@ using ::com::sun::star::xml::crypto::XXMLEncryptionTemplate ;
using ::com::sun::star::xml::crypto::XXMLSecurityContext ;
using ::com::sun::star::xml::crypto::XMLEncryptionException ;
XMLEncryption_NssImpl::XMLEncryption_NssImpl( const Reference< XMultiServiceFactory >& aFactory ) : m_xServiceManager( aFactory ) {
XMLEncryption_NssImpl::XMLEncryption_NssImpl() {
}
XMLEncryption_NssImpl::~XMLEncryption_NssImpl() {
@@ -342,8 +342,8 @@ OUString XMLEncryption_NssImpl::impl_getImplementationName() throw( RuntimeExcep
}
//Helper for registry
Reference< XInterface > SAL_CALL XMLEncryption_NssImpl::impl_createInstance( const Reference< XMultiServiceFactory >& aServiceManager ) throw( RuntimeException ) {
return Reference< XInterface >( *new XMLEncryption_NssImpl( aServiceManager ) ) ;
Reference< XInterface > SAL_CALL XMLEncryption_NssImpl::impl_createInstance( const Reference< XMultiServiceFactory >& ) throw( RuntimeException ) {
return Reference< XInterface >( *new XMLEncryption_NssImpl ) ;
}
Reference< XSingleServiceFactory > XMLEncryption_NssImpl::impl_createFactory( const Reference< XMultiServiceFactory >& aServiceManager ) {

View File

@@ -38,11 +38,8 @@ class XMLEncryption_NssImpl : public ::cppu::WeakImplHelper<
::com::sun::star::xml::crypto::XXMLEncryption ,
::com::sun::star::lang::XServiceInfo >
{
private:
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager ;
public:
explicit XMLEncryption_NssImpl(const css::uno::Reference<css::lang::XMultiServiceFactory >& rFactory);
explicit XMLEncryption_NssImpl();
virtual ~XMLEncryption_NssImpl() ;
//Methods from XXMLEncryption

View File

@@ -47,7 +47,7 @@ using ::com::sun::star::xml::crypto::XXMLSecurityContext ;
using ::com::sun::star::xml::crypto::XUriBinding ;
using ::com::sun::star::xml::crypto::XMLSignatureException ;
XMLSignature_NssImpl::XMLSignature_NssImpl( const Reference< XMultiServiceFactory >& aFactory ) : m_xServiceManager( aFactory ) {
XMLSignature_NssImpl::XMLSignature_NssImpl() {
}
XMLSignature_NssImpl::~XMLSignature_NssImpl() {
@@ -305,8 +305,8 @@ OUString XMLSignature_NssImpl::impl_getImplementationName() throw( RuntimeExcept
}
//Helper for registry
Reference< XInterface > SAL_CALL XMLSignature_NssImpl::impl_createInstance( const Reference< XMultiServiceFactory >& aServiceManager ) throw( RuntimeException ) {
return Reference< XInterface >( *new XMLSignature_NssImpl( aServiceManager ) ) ;
Reference< XInterface > SAL_CALL XMLSignature_NssImpl::impl_createInstance( const Reference< XMultiServiceFactory >& ) throw( RuntimeException ) {
return Reference< XInterface >( *new XMLSignature_NssImpl ) ;
}
Reference< XSingleServiceFactory > XMLSignature_NssImpl::impl_createFactory( const Reference< XMultiServiceFactory >& aServiceManager ) {

View File

@@ -38,11 +38,8 @@ class XMLSignature_NssImpl : public ::cppu::WeakImplHelper<
::com::sun::star::xml::crypto::XXMLSignature ,
::com::sun::star::lang::XServiceInfo >
{
private:
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager ;
public:
explicit XMLSignature_NssImpl(const css::uno::Reference<css::lang::XMultiServiceFactory>& rFactory);
explicit XMLSignature_NssImpl();
virtual ~XMLSignature_NssImpl() ;
//Methods from XXMLSignature