[Libreoffice-commits] core.git: 6 commits - filter/Library_xmlfa.mk filter/source lotuswordpro/source offapi/com offapi/UnoApi_offapi.mk sdext/source xmlhelp/Library_tvhlp1.mk xmlhelp/Library_ucpchelp1.mk xmlhelp/source xmlsecurity/Library_xsec_fw.mk xmlsecurity/source
Noel Grandin
noel at peralex.com
Wed Jun 5 05:49:05 PDT 2013
filter/Library_xmlfa.mk | 3
filter/source/pdf/pdfinteract.cxx | 7 -
filter/source/pdf/pdfinteract.hxx | 6 -
filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx | 6 -
filter/source/xsltdialog/xmlfilterjar.cxx | 25 +----
filter/source/xsltdialog/xmlfilterjar.hxx | 1
filter/source/xsltdialog/xmlfiltersettingsdialog.cxx | 8 -
filter/source/xsltdialog/xmlfiltertabdialog.cxx | 2
filter/source/xsltdialog/xmlfiltertabpagexslt.cxx | 15 ---
filter/source/xsltdialog/xmlfiltertabpagexslt.hxx | 2
lotuswordpro/source/filter/LotusWordProImportFilter.cxx | 6 -
lotuswordpro/source/filter/LotusWordProImportFilter.hxx | 6 -
offapi/UnoApi_offapi.mk | 4
offapi/com/sun/star/xml/crypto/XMLEncryptionTemplate.idl | 8 -
offapi/com/sun/star/xml/crypto/XMLSignatureTemplate.idl | 8 -
sdext/source/minimizer/configurationaccess.cxx | 8 -
sdext/source/minimizer/configurationaccess.hxx | 2
sdext/source/minimizer/impoptimizer.cxx | 34 +++----
sdext/source/minimizer/impoptimizer.hxx | 2
sdext/source/minimizer/informationdialog.cxx | 10 +-
sdext/source/minimizer/informationdialog.hxx | 6 -
sdext/source/minimizer/optimizerdialog.cxx | 10 +-
sdext/source/minimizer/optimizerdialog.hxx | 6 -
sdext/source/minimizer/optimizerdialogcontrols.cxx | 2
sdext/source/minimizer/pppoptimizer.cxx | 6 -
sdext/source/minimizer/pppoptimizer.hxx | 4
sdext/source/minimizer/pppoptimizerdialog.cxx | 6 -
sdext/source/minimizer/pppoptimizerdialog.hxx | 4
sdext/source/minimizer/unodialog.cxx | 8 -
sdext/source/minimizer/unodialog.hxx | 2
xmlhelp/Library_tvhlp1.mk | 1
xmlhelp/Library_ucpchelp1.mk | 1
xmlhelp/source/cxxhelp/provider/provider.cxx | 24 -----
xmlhelp/source/treeview/tvfactory.cxx | 9 +-
xmlhelp/source/treeview/tvfactory.hxx | 4
xmlhelp/source/treeview/tvread.cxx | 38 ++------
xmlhelp/source/treeview/tvread.hxx | 8 -
xmlsecurity/Library_xsec_fw.mk | 1
xmlsecurity/source/framework/decryptorimpl.cxx | 9 +-
xmlsecurity/source/framework/decryptorimpl.hxx | 8 -
xmlsecurity/source/framework/encryptionengine.cxx | 27 ++----
xmlsecurity/source/framework/encryptionengine.hxx | 6 +
xmlsecurity/source/framework/encryptorimpl.cxx | 66 +++++++--------
xmlsecurity/source/framework/encryptorimpl.hxx | 9 +-
xmlsecurity/source/framework/securityengine.cxx | 5 -
xmlsecurity/source/framework/securityengine.hxx | 5 -
xmlsecurity/source/framework/signaturecreatorimpl.cxx | 11 +-
xmlsecurity/source/framework/signaturecreatorimpl.hxx | 9 +-
xmlsecurity/source/framework/signatureengine.cxx | 14 +--
xmlsecurity/source/framework/signatureengine.hxx | 6 +
xmlsecurity/source/framework/signatureverifierimpl.cxx | 7 -
xmlsecurity/source/framework/signatureverifierimpl.hxx | 9 +-
52 files changed, 214 insertions(+), 280 deletions(-)
New commits:
commit 75a87d9bc25c9c74810591bbfa560b0f7184e940
Author: Noel Grandin <noel at peralex.com>
Date: Wed Jun 5 13:03:17 2013 +0200
fdo#46808, Convert xml::crypto::XMLEncryptionTemplate to new style
Change-Id: I45bcb3f0f4b9998105d361dbf6a98d8f5310da52
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 2afda7f..bd28407 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -452,6 +452,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/xforms,\
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/xml/crypto,\
NSSInitializer \
SEInitializer \
+ XMLEncryptionTemplate \
XMLSignatureTemplate \
))
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/xml/dom,\
@@ -1584,7 +1585,6 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/xml,\
$(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/xml/crypto,\
SecurityEnvironment \
XMLEncryption \
- XMLEncryptionTemplate \
XMLSecurityContext \
XMLSignature \
))
diff --git a/offapi/com/sun/star/xml/crypto/XMLEncryptionTemplate.idl b/offapi/com/sun/star/xml/crypto/XMLEncryptionTemplate.idl
index efbe9b0..67b5605 100644
--- a/offapi/com/sun/star/xml/crypto/XMLEncryptionTemplate.idl
+++ b/offapi/com/sun/star/xml/crypto/XMLEncryptionTemplate.idl
@@ -24,20 +24,14 @@
#ifndef __com_sun_star_xml_crypto_xmlencryptiontemplate_idl_
#define __com_sun_star_xml_crypto_xmlencryptiontemplate_idl_
-#include <com/sun/star/uno/XInterface.idl>
-#include <com/sun/star/uno/Exception.idl>
#include <com/sun/star/xml/crypto/XXMLEncryptionTemplate.idl>
-#include <com/sun/star/lang/XInitialization.idl>
module com { module sun { module star { module xml { module crypto {
/**
* Service of XMLEncryptionTemplate
*/
-service XMLEncryptionTemplate {
- interface com::sun::star::xml::crypto::XXMLEncryptionTemplate ;
- interface com::sun::star::lang::XInitialization ;
-} ;
+service XMLEncryptionTemplate : com::sun::star::xml::crypto::XXMLEncryptionTemplate;
} ; } ; } ; } ; } ;
diff --git a/xmlsecurity/source/framework/encryptionengine.cxx b/xmlsecurity/source/framework/encryptionengine.cxx
index e0c8fc3..47078ac 100644
--- a/xmlsecurity/source/framework/encryptionengine.cxx
+++ b/xmlsecurity/source/framework/encryptionengine.cxx
@@ -19,7 +19,7 @@
#include "encryptionengine.hxx"
-#include <com/sun/star/xml/crypto/XXMLEncryptionTemplate.hpp>
+#include <com/sun/star/xml/crypto/XMLEncryptionTemplate.hpp>
#include <com/sun/star/xml/wrapper/XXMLElementWrapper.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
@@ -27,8 +27,6 @@ using namespace com::sun::star::uno;
namespace cssxc = com::sun::star::xml::crypto;
namespace cssxw = com::sun::star::xml::wrapper;
-#define ENCRYPTION_TEMPLATE "com.sun.star.xml.crypto.XMLEncryptionTemplate"
-
EncryptionEngine::EncryptionEngine( const Reference<XComponentContext> & xContext)
:m_xContext(xContext), m_nIdOfBlocker(-1)
{
@@ -112,11 +110,8 @@ void EncryptionEngine::tryToPerform( )
{
if (checkReady())
{
- const OUString sEncryptionTemplate ( ENCRYPTION_TEMPLATE );
- Reference < cssxc::XXMLEncryptionTemplate > xEncryptionTemplate(
- m_xContext->getServiceManager()->createInstanceWithContext( sEncryptionTemplate, m_xContext ), UNO_QUERY );
-
- OSL_ASSERT( xEncryptionTemplate.is() );
+ Reference < cssxc::XXMLEncryptionTemplate > xEncryptionTemplate =
+ cssxc::XMLEncryptionTemplate::create( m_xContext );
Reference< cssxw::XXMLElementWrapper > xXMLElement
= m_xSAXEventKeeper->getElement( m_nIdOfTemplateEC );
commit 6a12e13870f15df93d2627f1538f7c64ca46e9e5
Author: Noel Grandin <noel at peralex.com>
Date: Wed Jun 5 11:56:40 2013 +0200
fdo#46808, Convert XMLSignatureTemplate service to new style
Change-Id: I80530f84ad5a86eccc794f9ddd14f939d093a20d
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 90b05ef..2afda7f 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -452,6 +452,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/xforms,\
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/xml/crypto,\
NSSInitializer \
SEInitializer \
+ XMLSignatureTemplate \
))
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/xml/dom,\
DocumentBuilder \
@@ -1586,7 +1587,6 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/xml/cry
XMLEncryptionTemplate \
XMLSecurityContext \
XMLSignature \
- XMLSignatureTemplate \
))
$(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/xml/crypto/sax,\
Decryptor \
diff --git a/offapi/com/sun/star/xml/crypto/XMLSignatureTemplate.idl b/offapi/com/sun/star/xml/crypto/XMLSignatureTemplate.idl
index 08752ce..6789af9 100644
--- a/offapi/com/sun/star/xml/crypto/XMLSignatureTemplate.idl
+++ b/offapi/com/sun/star/xml/crypto/XMLSignatureTemplate.idl
@@ -24,20 +24,14 @@
#ifndef __com_sun_star_xml_crypto_xmlsignaturetemplate_idl_
#define __com_sun_star_xml_crypto_xmlsignaturetemplate_idl_
-#include <com/sun/star/uno/XInterface.idl>
-#include <com/sun/star/uno/Exception.idl>
#include <com/sun/star/xml/crypto/XXMLSignatureTemplate.idl>
-#include <com/sun/star/lang/XInitialization.idl>
module com { module sun { module star { module xml { module crypto {
/**
* Service of XMLSignatureTemplate
*/
-service XMLSignatureTemplate {
- interface com::sun::star::xml::crypto::XXMLSignatureTemplate ;
- interface com::sun::star::lang::XInitialization ;
-} ;
+service XMLSignatureTemplate : com::sun::star::xml::crypto::XXMLSignatureTemplate ;
} ; } ; } ; } ; } ;
diff --git a/xmlsecurity/source/framework/signatureengine.cxx b/xmlsecurity/source/framework/signatureengine.cxx
index e3b4628..e289b24 100644
--- a/xmlsecurity/source/framework/signatureengine.cxx
+++ b/xmlsecurity/source/framework/signatureengine.cxx
@@ -19,7 +19,7 @@
#include "signatureengine.hxx"
-#include <com/sun/star/xml/crypto/XXMLSignatureTemplate.hpp>
+#include <com/sun/star/xml/crypto/XMLSignatureTemplate.hpp>
#include <com/sun/star/xml/wrapper/XXMLElementWrapper.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
@@ -29,8 +29,6 @@ namespace cssl = com::sun::star::lang;
namespace cssxc = com::sun::star::xml::crypto;
namespace cssxw = com::sun::star::xml::wrapper;
-#define SIGNATURE_TEMPLATE "com.sun.star.xml.crypto.XMLSignatureTemplate"
-
SignatureEngine::SignatureEngine( const Reference<XComponentContext> & xContext)
: m_xContext(xContext), m_nTotalReferenceNumber(-1)
{
@@ -114,11 +112,8 @@ void SignatureEngine::tryToPerform( )
{
if (checkReady())
{
- const OUString ouSignatureTemplate ( SIGNATURE_TEMPLATE );
cssu::Reference < cssxc::XXMLSignatureTemplate >
- xSignatureTemplate( m_xContext->getServiceManager()->createInstanceWithContext( ouSignatureTemplate, m_xContext ), cssu::UNO_QUERY );
-
- OSL_ASSERT( xSignatureTemplate.is() );
+ xSignatureTemplate = cssxc::XMLSignatureTemplate::create( m_xContext );
cssu::Reference< cssxw::XXMLElementWrapper >
xXMLElement = m_xSAXEventKeeper->getElement( m_nIdOfTemplateEC );
commit 73e686725e734c2bb576aefa2bb514d7b5f9a13c
Author: Noel Grandin <noel at peralex.com>
Date: Wed Jun 5 11:46:38 2013 +0200
fdo#46808, Convert some more XMultiServiceFactory
Change-Id: Ib96976e0a40c025d1b6408aeadfc70d7885c11d4
diff --git a/filter/source/pdf/pdfinteract.cxx b/filter/source/pdf/pdfinteract.cxx
index 8c02825..9898f77 100644
--- a/filter/source/pdf/pdfinteract.cxx
+++ b/filter/source/pdf/pdfinteract.cxx
@@ -28,8 +28,7 @@
// - PDFInteractionHandler -
// -------------
-PDFInteractionHandler::PDFInteractionHandler( const Reference< XMultiServiceFactory > &rxMSF ) :
- mxMSF( rxMSF )
+PDFInteractionHandler::PDFInteractionHandler()
{
}
@@ -98,9 +97,9 @@ Sequence< OUString > SAL_CALL PDFInteractionHandler_getSupportedServiceNames( )
// -----------------------------------------------------------------------------
-Reference< XInterface > SAL_CALL PDFInteractionHandler_createInstance( const Reference< XMultiServiceFactory > & rSMgr) throw( Exception )
+Reference< XInterface > SAL_CALL PDFInteractionHandler_createInstance( const Reference< XMultiServiceFactory > & ) throw( Exception )
{
- return (cppu::OWeakObject*) new PDFInteractionHandler( rSMgr );
+ return (cppu::OWeakObject*) new PDFInteractionHandler;
}
// -----------------------------------------------------------------------------
diff --git a/filter/source/pdf/pdfinteract.hxx b/filter/source/pdf/pdfinteract.hxx
index c2c1256..ea24a94 100644
--- a/filter/source/pdf/pdfinteract.hxx
+++ b/filter/source/pdf/pdfinteract.hxx
@@ -37,10 +37,6 @@ using namespace ::com::sun::star::lang;
class PDFInteractionHandler : public cppu::WeakImplHelper2 < task::XInteractionHandler2,
XServiceInfo >
{
-private:
-
- Reference< XMultiServiceFactory > mxMSF;
-
protected:
// XServiceInfo
virtual OUString SAL_CALL getImplementationName() throw(RuntimeException);
@@ -54,7 +50,7 @@ protected:
virtual sal_Bool SAL_CALL handleInteractionRequest( const Reference< task::XInteractionRequest >& ) throw(RuntimeException);
public:
- PDFInteractionHandler( const Reference< XMultiServiceFactory >& rxMSF );
+ PDFInteractionHandler();
virtual ~PDFInteractionHandler();
};
diff --git a/lotuswordpro/source/filter/LotusWordProImportFilter.cxx b/lotuswordpro/source/filter/LotusWordProImportFilter.cxx
index d31814e..837ae82 100644
--- a/lotuswordpro/source/filter/LotusWordProImportFilter.cxx
+++ b/lotuswordpro/source/filter/LotusWordProImportFilter.cxx
@@ -255,7 +255,7 @@ sal_Bool SAL_CALL LotusWordProImportFilter::importImpl( const Sequence< ::com::s
// An XML import service: what we push sax messages to..
OUString sXMLImportService ( "com.sun.star.comp.Writer.XMLImporter" );
- uno::Reference< XDocumentHandler > xInternalHandler( mxMSF->createInstance( sXMLImportService ), UNO_QUERY );
+ uno::Reference< XDocumentHandler > xInternalHandler( mxContext->getServiceManager()->createInstanceWithContext( sXMLImportService, mxContext ), UNO_QUERY );
uno::Reference < XImporter > xImporter(xInternalHandler, UNO_QUERY);
if (xImporter.is())
xImporter->setTargetDocument(mxDoc);
@@ -307,7 +307,7 @@ OUString SAL_CALL LotusWordProImportFilter::detect( com::sun::star::uno::Sequenc
{
try
{
- ::ucbhelper::Content aContent(sURL, xEnv, comphelper::getComponentContext(mxMSF));
+ ::ucbhelper::Content aContent(sURL, xEnv, mxContext);
xInputStream = aContent.openStream();
}
catch ( Exception& )
@@ -377,7 +377,7 @@ Sequence< OUString > SAL_CALL LotusWordProImportFilter_getSupportedServiceNames(
uno::Reference< XInterface > SAL_CALL LotusWordProImportFilter_createInstance( const uno::Reference< XMultiServiceFactory > & rSMgr)
throw( Exception )
{
- return (cppu::OWeakObject*) new LotusWordProImportFilter( rSMgr );
+ return (cppu::OWeakObject*) new LotusWordProImportFilter( comphelper::getComponentContext(rSMgr) );
}
// XServiceInfo
diff --git a/lotuswordpro/source/filter/LotusWordProImportFilter.hxx b/lotuswordpro/source/filter/LotusWordProImportFilter.hxx
index 5fbee42..f2c7a55 100644
--- a/lotuswordpro/source/filter/LotusWordProImportFilter.hxx
+++ b/lotuswordpro/source/filter/LotusWordProImportFilter.hxx
@@ -50,7 +50,7 @@ private:
protected:
// oo.org declares
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > mxContext;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > mxDoc;
OUString msFilterName;
::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > mxHandler;
@@ -61,8 +61,8 @@ protected:
throw (::com::sun::star::uno::RuntimeException);
public:
- LotusWordProImportFilter( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &rxMSF)
- : mxMSF( rxMSF ) {}
+ LotusWordProImportFilter( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext)
+ : mxContext( rxContext ) {}
virtual ~LotusWordProImportFilter() {}
// XFilter
commit 4bd502a583912c63c4d35c1d5a2e7195e70cdbb9
Author: Noel Grandin <noel at peralex.com>
Date: Wed Jun 5 11:34:13 2013 +0200
fix field name, was mxMSF, but should have been named mxContext
Change-Id: I4661cd84346791ddd6167ccc63335ad63255472f
diff --git a/sdext/source/minimizer/configurationaccess.cxx b/sdext/source/minimizer/configurationaccess.cxx
index 50592c5..9d0bbbb 100644
--- a/sdext/source/minimizer/configurationaccess.cxx
+++ b/sdext/source/minimizer/configurationaccess.cxx
@@ -147,8 +147,8 @@ sal_Bool OptimizerSettings::operator==( const OptimizerSettings& rOptimizerSetti
}
-ConfigurationAccess::ConfigurationAccess( const Reference< uno::XComponentContext >& rxMSF, OptimizerSettings* pDefaultSettings ) :
- mxMSF( rxMSF )
+ConfigurationAccess::ConfigurationAccess( const Reference< uno::XComponentContext >& rxContext, OptimizerSettings* pDefaultSettings ) :
+ mxContext( rxContext )
{
LoadStrings();
maSettings.push_back( pDefaultSettings ?
@@ -174,7 +174,7 @@ OUString ConfigurationAccess::getPath( const PPPOptimizerTokenEnum eToken )
if ( aPath.match( sProtocol, 0 ) )
{
OUString aTmp( aPath.copy( 20 ) );
- Reference< util::XMacroExpander > xExpander = util::theMacroExpander::get(mxMSF);
+ Reference< util::XMacroExpander > xExpander = util::theMacroExpander::get(mxContext);
aPath = xExpander->expandMacros( aTmp );
}
}
@@ -317,7 +317,7 @@ Reference< XInterface > ConfigurationAccess::OpenConfiguration( bool bReadOnly )
Reference< XInterface > xRoot;
try
{
- Reference< lang::XMultiServiceFactory > xProvider = configuration::theDefaultProvider::get( mxMSF );
+ Reference< lang::XMultiServiceFactory > xProvider = configuration::theDefaultProvider::get( mxContext );
Sequence< Any > aCreationArguments( 2 );
aCreationArguments[0] = makeAny( PropertyValue(
OUString( "nodepath" ), 0,
diff --git a/sdext/source/minimizer/configurationaccess.hxx b/sdext/source/minimizer/configurationaccess.hxx
index 85af8b9..08785cf 100644
--- a/sdext/source/minimizer/configurationaccess.hxx
+++ b/sdext/source/minimizer/configurationaccess.hxx
@@ -118,7 +118,7 @@ class ConfigurationAccess
std::vector< OptimizerSettings > maSettings;
std::vector< OptimizerSettings > maInitialSettings;
- com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > mxMSF;
+ com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > mxContext;
void LoadStrings();
void LoadConfiguration();
diff --git a/sdext/source/minimizer/impoptimizer.cxx b/sdext/source/minimizer/impoptimizer.cxx
index d335065..82ed6fe 100644
--- a/sdext/source/minimizer/impoptimizer.cxx
+++ b/sdext/source/minimizer/impoptimizer.cxx
@@ -255,7 +255,7 @@ void ImpCompressGraphic( Reference< XGraphicProvider >& rxGraphicProvider, const
}
}
-Reference< XGraphic > ImpCompressGraphic( const Reference< XComponentContext >& rxMSF,
+Reference< XGraphic > ImpCompressGraphic( const Reference< XComponentContext >& rxContext,
const Reference< XGraphic >& xGraphic, const awt::Size& aLogicalSize, const text::GraphicCrop& aGraphicCropLogic,
const GraphicSettings& rGraphicSettings )
{
@@ -290,7 +290,7 @@ Reference< XGraphic > ImpCompressGraphic( const Reference< XComponentContext >&
// cropping has to be removed from SourceSizePixel
if ( aGraphicCropLogic.Left || aGraphicCropLogic.Top || aGraphicCropLogic.Right || aGraphicCropLogic.Bottom )
{
- const awt::Size aSize100thMM( GraphicCollector::GetOriginalSize( rxMSF, xGraphic ) );
+ const awt::Size aSize100thMM( GraphicCollector::GetOriginalSize( rxContext, xGraphic ) );
if ( bRemoveCropArea )
bNeedsOptimizing = sal_True;
@@ -339,9 +339,9 @@ Reference< XGraphic > ImpCompressGraphic( const Reference< XComponentContext >&
}
if ( bNeedsOptimizing && aDestSizePixel.Width && aDestSizePixel.Height )
{
- Reference< XStream > xTempFile( io::TempFile::create(rxMSF), UNO_QUERY_THROW );
+ Reference< XStream > xTempFile( io::TempFile::create(rxContext), UNO_QUERY_THROW );
Reference< XOutputStream > xOutputStream( xTempFile->getOutputStream() );
- Reference< XGraphicProvider > xGraphicProvider( GraphicProvider::create( rxMSF ) );
+ Reference< XGraphicProvider > xGraphicProvider( GraphicProvider::create( rxContext ) );
ImpCompressGraphic( xGraphicProvider, xGraphic, xOutputStream, aDestMimeType, aLogicalSize, rGraphicSettings.mnJPEGQuality, rGraphicSettings.mnImageResolution, bRemoveCropArea, aGraphicCropLogic );
Reference< XInputStream > xInputStream( xTempFile->getInputStream() );
@@ -359,9 +359,9 @@ Reference< XGraphic > ImpCompressGraphic( const Reference< XComponentContext >&
else // this is a metafile
{
OUString aDestMimeType( aSourceMimeType );
- Reference< XStream > xTempFile( io::TempFile::create(rxMSF), UNO_QUERY_THROW );
+ Reference< XStream > xTempFile( io::TempFile::create(rxContext), UNO_QUERY_THROW );
Reference< XOutputStream > xOutputStream( xTempFile->getOutputStream() );
- Reference< XGraphicProvider > xGraphicProvider( GraphicProvider::create( rxMSF ) );
+ Reference< XGraphicProvider > xGraphicProvider( GraphicProvider::create( rxContext ) );
ImpCompressGraphic( xGraphicProvider, xGraphic, xOutputStream, aDestMimeType, aLogicalSize, rGraphicSettings.mnJPEGQuality, rGraphicSettings.mnImageResolution, sal_False, aGraphicCropLogic );
Reference< XInputStream > xInputStream( xTempFile->getInputStream() );
Reference< XSeekable > xSeekable( xInputStream, UNO_QUERY_THROW );
@@ -379,7 +379,7 @@ Reference< XGraphic > ImpCompressGraphic( const Reference< XComponentContext >&
return xNewGraphic;
}
-void CompressGraphics( ImpOptimizer& rOptimizer, const Reference< XComponentContext >& rxMSF, const GraphicSettings& rGraphicSettings,
+void CompressGraphics( ImpOptimizer& rOptimizer, const Reference< XComponentContext >& rxContext, const GraphicSettings& rGraphicSettings,
std::vector< GraphicCollector::GraphicEntity >& rGraphicList )
{
try
@@ -414,8 +414,8 @@ void CompressGraphics( ImpOptimizer& rOptimizer, const Reference< XComponentCont
if ( xGraphic.is() )
{
Reference< XPropertySet > xNewGraphicPropertySet( xGraphic, UNO_QUERY_THROW );
- awt::Size aSize100thMM( GraphicCollector::GetOriginalSize( rxMSF, xGraphic ) );
- Reference< XGraphic > xNewGraphic( ImpCompressGraphic( rxMSF, xGraphic, aGraphicIter->maLogicalSize, aGraphicIter->maGraphicCropLogic, aGraphicSettings ) );
+ awt::Size aSize100thMM( GraphicCollector::GetOriginalSize( rxContext, xGraphic ) );
+ Reference< XGraphic > xNewGraphic( ImpCompressGraphic( rxContext, xGraphic, aGraphicIter->maLogicalSize, aGraphicIter->maGraphicCropLogic, aGraphicSettings ) );
if ( xNewGraphic.is() )
{
// applying graphic to each user
@@ -435,7 +435,7 @@ void CompressGraphics( ImpOptimizer& rOptimizer, const Reference< XComponentCont
text::GraphicCrop aGraphicCropLogic( 0, 0, 0, 0 );
if ( !aGraphicSettings.mbRemoveCropArea )
{
- awt::Size aNewSize( GraphicCollector::GetOriginalSize( rxMSF, xNewGraphic ) );
+ awt::Size aNewSize( GraphicCollector::GetOriginalSize( rxContext, xNewGraphic ) );
aGraphicCropLogic.Left = (sal_Int32)((double)aGraphicUserIter->maGraphicCropLogic.Left * ((double)aNewSize.Width / (double)aSize100thMM.Width));
aGraphicCropLogic.Top = (sal_Int32)((double)aGraphicUserIter->maGraphicCropLogic.Top * ((double)aNewSize.Height / (double)aSize100thMM.Height));
aGraphicCropLogic.Right = (sal_Int32)((double)aGraphicUserIter->maGraphicCropLogic.Right * ((double)aNewSize.Width / (double)aSize100thMM.Width));
@@ -486,8 +486,8 @@ void CompressGraphics( ImpOptimizer& rOptimizer, const Reference< XComponentCont
// - ImpOptimizer -
// ----------------
-ImpOptimizer::ImpOptimizer( const Reference< XComponentContext >& rxMSF, const Reference< XModel >& rxModel ) :
- mxMSF ( rxMSF ),
+ImpOptimizer::ImpOptimizer( const Reference< XComponentContext >& rxContext, const Reference< XModel >& rxModel ) :
+ mxContext ( rxContext ),
mxModel ( rxModel ),
mbJPEGCompression ( sal_False ),
mnJPEGQuality ( 90 ),
@@ -569,8 +569,8 @@ sal_Bool ImpOptimizer::Optimize()
std::vector< GraphicCollector::GraphicEntity > aGraphicList;
GraphicSettings aGraphicSettings( mbJPEGCompression, mnJPEGQuality, mbRemoveCropArea, mnImageResolution, mbEmbedLinkedGraphics );
- GraphicCollector::CollectGraphics( mxMSF, mxModel, aGraphicSettings, aGraphicList );
- CompressGraphics( *this, mxMSF, aGraphicSettings, aGraphicList );
+ GraphicCollector::CollectGraphics( mxContext, mxModel, aGraphicSettings, aGraphicList );
+ CompressGraphics( *this, mxContext, aGraphicSettings, aGraphicList );
}
SetStatusValue( TK_Progress, Any( static_cast< sal_Int32 >( 100 ) ) );
DispatchStatus();
@@ -681,7 +681,7 @@ sal_Bool ImpOptimizer::Optimize( const Sequence< PropertyValue >& rArguments )
SetStatusValue( TK_Status, Any( TKGet( STR_DUPLICATING_PRESENTATION ) ) );
DispatchStatus();
- Reference< XDesktop2 > xDesktop = Desktop::create( mxMSF );
+ Reference< XDesktop2 > xDesktop = Desktop::create( mxContext );
xSelf = xDesktop->findFrame( TKGet( TK__blank ), FrameSearchFlag::CREATE );
Reference< XComponentLoader > xComponentLoader( xSelf, UNO_QUERY );
@@ -706,7 +706,7 @@ sal_Bool ImpOptimizer::Optimize( const Sequence< PropertyValue >& rArguments )
if ( xFrame.is() )
{
const OUString sSlot( "slot:27115" );
- DispatchURL( mxMSF, sSlot, xFrame );
+ DispatchURL( mxContext, sSlot, xFrame );
}
}
@@ -721,7 +721,7 @@ sal_Bool ImpOptimizer::Optimize( const Sequence< PropertyValue >& rArguments )
if ( mxInformationDialog.is() )
{
- InformationDialog aInformationDialog( mxMSF, mxInformationDialog, maSaveAsURL, mbOpenNewDocument, nSourceSize, nDestSize, nEstimatedFileSize );
+ InformationDialog aInformationDialog( mxContext, mxInformationDialog, maSaveAsURL, mbOpenNewDocument, nSourceSize, nDestSize, nEstimatedFileSize );
aInformationDialog.execute();
SetStatusValue( TK_OpenNewDocument, Any( mbOpenNewDocument ) );
DispatchStatus();
diff --git a/sdext/source/minimizer/impoptimizer.hxx b/sdext/source/minimizer/impoptimizer.hxx
index a07952d..8731fbf 100644
--- a/sdext/source/minimizer/impoptimizer.hxx
+++ b/sdext/source/minimizer/impoptimizer.hxx
@@ -38,7 +38,7 @@ class ImpOptimizer : public OptimizationStats
{
private:
- com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > mxMSF;
+ com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > mxContext;
com::sun::star::uno::Reference< com::sun::star::frame::XModel > mxModel;
com::sun::star::uno::Reference< com::sun::star::frame::XDispatch > mxStatusDispatcher;
diff --git a/sdext/source/minimizer/informationdialog.cxx b/sdext/source/minimizer/informationdialog.cxx
index babba10..e055ad4 100644
--- a/sdext/source/minimizer/informationdialog.cxx
+++ b/sdext/source/minimizer/informationdialog.cxx
@@ -266,7 +266,7 @@ void InformationDialog::InitDialog()
OUString aTitle;
if ( !maSaveAsURL.isEmpty() )
{
- Reference< XURLTransformer > xURLTransformer( URLTransformer::create(mxMSF) );
+ Reference< XURLTransformer > xURLTransformer( URLTransformer::create(mxContext) );
util::URL aURL, aPresentationURL;
aURL.Complete = maSaveAsURL;
xURLTransformer->parseSmart( aURL, OUString() );
@@ -313,10 +313,10 @@ void InformationDialog::InitDialog()
// -----------------------------------------------------------------------------
-InformationDialog::InformationDialog( const Reference< XComponentContext > &rxMSF, Reference< XFrame >& rxFrame, const OUString& rSaveAsURL, sal_Bool& rbOpenNewDocument, const sal_Int64& rSourceSize, const sal_Int64& rDestSize, const sal_Int64& rApproxSize ) :
- UnoDialog( rxMSF, rxFrame ),
- ConfigurationAccess( rxMSF, NULL ),
- mxMSF( rxMSF ),
+InformationDialog::InformationDialog( const Reference< XComponentContext > &rxContext, Reference< XFrame >& rxFrame, const OUString& rSaveAsURL, sal_Bool& rbOpenNewDocument, const sal_Int64& rSourceSize, const sal_Int64& rDestSize, const sal_Int64& rApproxSize ) :
+ UnoDialog( rxContext, rxFrame ),
+ ConfigurationAccess( rxContext, NULL ),
+ mxContext( rxContext ),
mxFrame( rxFrame ),
mxActionListener( new OKActionListener( *this ) ),
mnSourceSize( rSourceSize ),
diff --git a/sdext/source/minimizer/informationdialog.hxx b/sdext/source/minimizer/informationdialog.hxx
index 5de67e1..1ee8b11 100644
--- a/sdext/source/minimizer/informationdialog.hxx
+++ b/sdext/source/minimizer/informationdialog.hxx
@@ -46,7 +46,7 @@ class InformationDialog : public UnoDialog, public ConfigurationAccess
{
public :
- InformationDialog( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxMSF,
+ InformationDialog( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext,
com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rxFrame, const OUString& rSaveAsURL,
sal_Bool& bOpenNewDocument, const sal_Int64& nSourceSize, const sal_Int64& nDestSize, const sal_Int64& nApproxDest );
~InformationDialog();
@@ -55,7 +55,7 @@ public :
private :
- com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >mxMSF;
+ com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > mxContext;
com::sun::star::uno::Reference< com::sun::star::frame::XFrame > mxFrame;
com::sun::star::uno::Reference< com::sun::star::io::XStream > mxTempFile;
@@ -72,7 +72,7 @@ private :
public :
com::sun::star::uno::Reference< com::sun::star::frame::XFrame>& GetFrame() { return mxFrame; };
- const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& GetComponentContext() { return mxMSF; };
+ const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& GetComponentContext() { return mxContext; };
};
class OKActionListener : public ::cppu::WeakImplHelper1< com::sun::star::awt::XActionListener >
diff --git a/sdext/source/minimizer/optimizerdialog.cxx b/sdext/source/minimizer/optimizerdialog.cxx
index acc45bf..2be4289 100644
--- a/sdext/source/minimizer/optimizerdialog.cxx
+++ b/sdext/source/minimizer/optimizerdialog.cxx
@@ -204,12 +204,12 @@ void OptimizerDialog::UpdateConfiguration()
// -----------------------------------------------------------------------------
-OptimizerDialog::OptimizerDialog( const Reference< XComponentContext > &rxMSF, Reference< XFrame >& rxFrame, Reference< XDispatch > rxStatusDispatcher ) :
- UnoDialog( rxMSF, rxFrame ),
- ConfigurationAccess( rxMSF, NULL ),
+OptimizerDialog::OptimizerDialog( const Reference< XComponentContext > &rxContext, Reference< XFrame >& rxFrame, Reference< XDispatch > rxStatusDispatcher ) :
+ UnoDialog( rxContext, rxFrame ),
+ ConfigurationAccess( rxContext, NULL ),
mnCurrentStep( 0 ),
mnTabIndex( 0 ),
- mxMSF( rxMSF ),
+ mxContext( rxContext ),
mxFrame( rxFrame ),
mxItemListener( new ItemListener( *this ) ),
mxActionListener( new ActionListener( *this ) ),
@@ -522,7 +522,7 @@ void ActionListener::actionPerformed( const ActionEvent& rEvent )
if ( nInt16 )
{
OUString aSaveAsURL;
- FileOpenDialog aFileOpenDialog( ((UnoDialog&)mrOptimizerDialog).mxMSF );
+ FileOpenDialog aFileOpenDialog( mrOptimizerDialog.GetComponentContext() );
// generating default file name
Reference< XStorable > xStorable( mrOptimizerDialog.mxController->getModel(), UNO_QUERY );
diff --git a/sdext/source/minimizer/optimizerdialog.hxx b/sdext/source/minimizer/optimizerdialog.hxx
index 3bd5080..ff711ba 100644
--- a/sdext/source/minimizer/optimizerdialog.hxx
+++ b/sdext/source/minimizer/optimizerdialog.hxx
@@ -62,7 +62,7 @@ class OptimizerDialog : public UnoDialog, public ConfigurationAccess
{
public :
- OptimizerDialog( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxMSF, com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rxFrame,
+ OptimizerDialog( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext, com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rxFrame,
com::sun::star::uno::Reference< com::sun::star::frame::XDispatch > rxStatusDispatcher );
~OptimizerDialog();
@@ -73,7 +73,7 @@ public :
sal_Bool mbIsReadonly;
private :
- com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >mxMSF;
+ com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > mxContext;
com::sun::star::uno::Reference< com::sun::star::frame::XFrame > mxFrame;
com::sun::star::uno::Reference< com::sun::star::uno::XInterface > mxRoadmapControl;
@@ -125,7 +125,7 @@ public :
OUString GetSelectedString( PPPOptimizerTokenEnum eListBox );
com::sun::star::uno::Reference< com::sun::star::frame::XDispatch >& GetStatusDispatcher() { return mxStatusDispatcher; };
com::sun::star::uno::Reference< com::sun::star::frame::XFrame>& GetFrame() { return mxFrame; };
- const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& GetComponentContext() { return mxMSF; };
+ const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& GetComponentContext() { return mxContext; };
};
// -----------------------------------------------------------------------------
diff --git a/sdext/source/minimizer/optimizerdialogcontrols.cxx b/sdext/source/minimizer/optimizerdialogcontrols.cxx
index 0c54459..bc031a5 100644
--- a/sdext/source/minimizer/optimizerdialogcontrols.cxx
+++ b/sdext/source/minimizer/optimizerdialogcontrols.cxx
@@ -748,7 +748,7 @@ void OptimizerDialog::UpdateControlStatesPage4()
sal_Int32 nImageResolution( GetConfigProperty( TK_ImageResolution, (sal_Int32)0 ) );
GraphicSettings aGraphicSettings( bJPEGCompression, nJPEGQuality, GetConfigProperty( TK_RemoveCropArea, sal_False ),
nImageResolution, GetConfigProperty( TK_EmbedLinkedGraphics, sal_True ) );
- GraphicCollector::CountGraphics( mxMSF, mxController->getModel(), aGraphicSettings, nGraphics );
+ GraphicCollector::CountGraphics( mxContext, mxController->getModel(), aGraphicSettings, nGraphics );
if ( nGraphics > 1 )
{
OUString aStr( getString( STR_OPTIMIZE_IMAGES ) );
diff --git a/sdext/source/minimizer/pppoptimizer.cxx b/sdext/source/minimizer/pppoptimizer.cxx
index 3d7994e..021a376 100644
--- a/sdext/source/minimizer/pppoptimizer.cxx
+++ b/sdext/source/minimizer/pppoptimizer.cxx
@@ -37,8 +37,8 @@ using namespace ::com::sun::star::beans;
// - PPPOptimizer -
// ----------------
-PPPOptimizer::PPPOptimizer( const Reference< XComponentContext > &rxMSF ) :
- mxMSF( rxMSF )
+PPPOptimizer::PPPOptimizer( const Reference< XComponentContext > &xContext ) :
+ mxContext( xContext )
{
}
@@ -133,7 +133,7 @@ void SAL_CALL PPPOptimizer::dispatch( const URL& rURL, const Sequence< PropertyV
{
try
{
- ImpOptimizer aOptimizer( mxMSF, xModel );
+ ImpOptimizer aOptimizer( mxContext, xModel );
aOptimizer.Optimize( lArguments );
}
catch( Exception& )
diff --git a/sdext/source/minimizer/pppoptimizer.hxx b/sdext/source/minimizer/pppoptimizer.hxx
index f01f4dc..3565b0c 100644
--- a/sdext/source/minimizer/pppoptimizer.hxx
+++ b/sdext/source/minimizer/pppoptimizer.hxx
@@ -39,12 +39,12 @@ class PPPOptimizer : public cppu::WeakImplHelper4<
com::sun::star::frame::XDispatchProvider,
com::sun::star::frame::XDispatch >
{
- com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > mxMSF;
+ com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > mxContext;
com::sun::star::uno::Reference< com::sun::star::frame::XController > mxController;
public:
- PPPOptimizer( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxMSF );
+ PPPOptimizer( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& xContext );
virtual ~PPPOptimizer();
// XInitialization
diff --git a/sdext/source/minimizer/pppoptimizerdialog.cxx b/sdext/source/minimizer/pppoptimizerdialog.cxx
index e8c707b..0d58b07 100644
--- a/sdext/source/minimizer/pppoptimizerdialog.cxx
+++ b/sdext/source/minimizer/pppoptimizerdialog.cxx
@@ -35,8 +35,8 @@ using namespace ::com::sun::star::beans;
// - PPPOptimizerDialog -
// ----------------------
-PPPOptimizerDialog::PPPOptimizerDialog( const Reference< XComponentContext > &rxMSF ) :
- mxMSF( rxMSF ),
+PPPOptimizerDialog::PPPOptimizerDialog( const Reference< XComponentContext > &xContext ) :
+ mxContext( xContext ),
mpOptimizerDialog( NULL )
{
}
@@ -130,7 +130,7 @@ void SAL_CALL PPPOptimizerDialog::dispatch( const URL& rURL,
{
sal_Int64 nFileSizeSource = 0;
sal_Int64 nFileSizeDest = 0;
- mpOptimizerDialog = new OptimizerDialog( mxMSF, mxFrame, this );
+ mpOptimizerDialog = new OptimizerDialog( mxContext, mxFrame, this );
mpOptimizerDialog->execute();
const Any* pVal( mpOptimizerDialog->maStats.GetStatusValue( TK_FileSizeSource ) );
diff --git a/sdext/source/minimizer/pppoptimizerdialog.hxx b/sdext/source/minimizer/pppoptimizerdialog.hxx
index 69d9a93..6464a16 100644
--- a/sdext/source/minimizer/pppoptimizerdialog.hxx
+++ b/sdext/source/minimizer/pppoptimizerdialog.hxx
@@ -45,7 +45,7 @@ class PPPOptimizerDialog : public ::cppu::WeakImplHelper4<
com::sun::star::frame::XDispatchProvider,
com::sun::star::frame::XDispatch >
{
- com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > mxMSF;
+ com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > mxContext;
com::sun::star::uno::Reference< com::sun::star::frame::XFrame > mxFrame;
com::sun::star::uno::Reference< com::sun::star::frame::XController > mxController;
@@ -53,7 +53,7 @@ class PPPOptimizerDialog : public ::cppu::WeakImplHelper4<
public:
- PPPOptimizerDialog( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxMSF );
+ PPPOptimizerDialog( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& xContext );
virtual ~PPPOptimizerDialog();
// XInitialization
diff --git a/sdext/source/minimizer/unodialog.cxx b/sdext/source/minimizer/unodialog.cxx
index 8c2eafe..352aff0 100644
--- a/sdext/source/minimizer/unodialog.cxx
+++ b/sdext/source/minimizer/unodialog.cxx
@@ -45,10 +45,10 @@ using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::script;
UnoDialog::UnoDialog( const Reference< XComponentContext > &rxContext, Reference< XFrame >& rxFrame ) :
- mxMSF( rxContext ),
+ mxContext( rxContext ),
mxController( rxFrame->getController() ),
- mxDialogModel( mxMSF->getServiceManager()->createInstanceWithContext( OUString(
- "com.sun.star.awt.UnoControlDialogModel" ), mxMSF ), UNO_QUERY_THROW ),
+ mxDialogModel( mxContext->getServiceManager()->createInstanceWithContext( OUString(
+ "com.sun.star.awt.UnoControlDialogModel" ), mxContext ), UNO_QUERY_THROW ),
mxDialogModelMultiPropertySet( mxDialogModel, UNO_QUERY_THROW ),
mxDialogModelPropertySet( mxDialogModel, UNO_QUERY_THROW ),
mxDialogModelMSF( mxDialogModel, UNO_QUERY_THROW ),
@@ -95,7 +95,7 @@ Reference< XWindowPeer > UnoDialog::createWindowPeer( Reference< XWindowPeer > x
throw ( Exception )
{
mxDialog->setVisible( sal_False );
- Reference< XToolkit > xToolkit( Toolkit::create( mxMSF ), UNO_QUERY_THROW );
+ Reference< XToolkit > xToolkit( Toolkit::create( mxContext ), UNO_QUERY_THROW );
if ( !xParentPeer.is() )
xParentPeer = xToolkit->getDesktopWindow();
mxReschedule = Reference< XReschedule >( xToolkit, UNO_QUERY );
diff --git a/sdext/source/minimizer/unodialog.hxx b/sdext/source/minimizer/unodialog.hxx
index b06aab7..1f4d5c9 100644
--- a/sdext/source/minimizer/unodialog.hxx
+++ b/sdext/source/minimizer/unodialog.hxx
@@ -107,7 +107,7 @@ public :
void enableControl( const OUString& rControlName );
void disableControl( const OUString& rControlName );
- com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > mxMSF;
+ com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > mxContext;
com::sun::star::uno::Reference< com::sun::star::frame::XController > mxController;
com::sun::star::uno::Reference< com::sun::star::awt::XReschedule > mxReschedule;
commit a4196fc3cf1e20e32cda9477a33ff56515f0c24e
Author: Noel Grandin <noel at peralex.com>
Date: Wed Jun 5 11:32:31 2013 +0200
fdo#46808, Convert XMultiServiceFactory in xmlsecurity module
Change-Id: Ia134170d07f33c2649b2a2620f40bc7b45ec7e16
diff --git a/xmlsecurity/Library_xsec_fw.mk b/xmlsecurity/Library_xsec_fw.mk
index 4798838..63481a6 100644
--- a/xmlsecurity/Library_xsec_fw.mk
+++ b/xmlsecurity/Library_xsec_fw.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_Library_set_include,xsec_fw,\
$(eval $(call gb_Library_use_sdk_api,xsec_fw))
$(eval $(call gb_Library_use_libraries,xsec_fw,\
+ comphelper \
cppu \
cppuhelper \
sal \
diff --git a/xmlsecurity/source/framework/decryptorimpl.cxx b/xmlsecurity/source/framework/decryptorimpl.cxx
index ec35abe..7bc6bb6 100644
--- a/xmlsecurity/source/framework/decryptorimpl.cxx
+++ b/xmlsecurity/source/framework/decryptorimpl.cxx
@@ -22,7 +22,9 @@
#include <com/sun/star/xml/crypto/XXMLEncryptionTemplate.hpp>
#include <com/sun/star/xml/wrapper/XXMLElementWrapper.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <comphelper/processfactory.hxx>
+using namespace com::sun::star::uno;
namespace cssu = com::sun::star::uno;
namespace cssl = com::sun::star::lang;
namespace cssxc = com::sun::star::xml::crypto;
@@ -31,9 +33,8 @@ namespace cssxw = com::sun::star::xml::wrapper;
#define SERVICE_NAME "com.sun.star.xml.crypto.sax.Decryptor"
#define IMPLEMENTATION_NAME "com.sun.star.xml.security.framework.DecryptorImpl"
-DecryptorImpl::DecryptorImpl( const cssu::Reference< cssl::XMultiServiceFactory >& rxMSF)
+DecryptorImpl::DecryptorImpl(const Reference< XComponentContext > & xContext) : DecryptorImpl_Base(xContext)
{
- mxMSF = rxMSF;
}
DecryptorImpl::~DecryptorImpl()
@@ -198,10 +199,10 @@ cssu::Sequence< OUString > SAL_CALL DecryptorImpl_getSupportedServiceNames( )
}
#undef SERVICE_NAME
-cssu::Reference< cssu::XInterface > SAL_CALL DecryptorImpl_createInstance( const cssu::Reference< cssl::XMultiServiceFactory >& rSMgr)
+cssu::Reference< cssu::XInterface > SAL_CALL DecryptorImpl_createInstance( const cssu::Reference< cssl::XMultiServiceFactory >& xMSF)
throw( cssu::Exception )
{
- return (cppu::OWeakObject*) new DecryptorImpl(rSMgr);
+ return (cppu::OWeakObject*) new DecryptorImpl( comphelper::getComponentContext( xMSF ) );
}
/* XServiceInfo */
diff --git a/xmlsecurity/source/framework/decryptorimpl.hxx b/xmlsecurity/source/framework/decryptorimpl.hxx
index 1a9b110..d9502fb 100644
--- a/xmlsecurity/source/framework/decryptorimpl.hxx
+++ b/xmlsecurity/source/framework/decryptorimpl.hxx
@@ -29,13 +29,14 @@
#include "encryptionengine.hxx"
-class DecryptorImpl : public cppu::ImplInheritanceHelper3
+typedef cppu::ImplInheritanceHelper3
<
EncryptionEngine,
com::sun::star::xml::crypto::sax::XDecryptionResultBroadcaster,
com::sun::star::lang::XInitialization,
com::sun::star::lang::XServiceInfo
->
+> DecryptorImpl_Base;
+class DecryptorImpl : public DecryptorImpl_Base
/****** DecryptorImpl.hxx/CLASS DecryptorImpl *********************************
*
* NAME
@@ -63,8 +64,7 @@ private:
throw (com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException);
public:
- explicit DecryptorImpl( const com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory >& rxMSF);
+ explicit DecryptorImpl(const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > & xContext);
virtual ~DecryptorImpl();
/* XDecryptionResultBroadcaster */
diff --git a/xmlsecurity/source/framework/encryptionengine.cxx b/xmlsecurity/source/framework/encryptionengine.cxx
index a46b7eb..e0c8fc3 100644
--- a/xmlsecurity/source/framework/encryptionengine.cxx
+++ b/xmlsecurity/source/framework/encryptionengine.cxx
@@ -23,14 +23,14 @@
#include <com/sun/star/xml/wrapper/XXMLElementWrapper.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-namespace cssu = com::sun::star::uno;
+using namespace com::sun::star::uno;
namespace cssxc = com::sun::star::xml::crypto;
namespace cssxw = com::sun::star::xml::wrapper;
#define ENCRYPTION_TEMPLATE "com.sun.star.xml.crypto.XMLEncryptionTemplate"
-EncryptionEngine::EncryptionEngine( )
- :m_nIdOfBlocker(-1)
+EncryptionEngine::EncryptionEngine( const Reference<XComponentContext> & xContext)
+ :m_xContext(xContext), m_nIdOfBlocker(-1)
{
}
@@ -82,7 +82,7 @@ bool EncryptionEngine::checkReady() const
}
void EncryptionEngine::tryToPerform( )
- throw (cssu::Exception, cssu::RuntimeException)
+ throw (Exception, RuntimeException)
/****** EncryptionEngine/tryToPerform ****************************************
*
* NAME
@@ -113,12 +113,12 @@ void EncryptionEngine::tryToPerform( )
if (checkReady())
{
const OUString sEncryptionTemplate ( ENCRYPTION_TEMPLATE );
- cssu::Reference < cssxc::XXMLEncryptionTemplate > xEncryptionTemplate(
- mxMSF->createInstance( sEncryptionTemplate ), cssu::UNO_QUERY );
+ Reference < cssxc::XXMLEncryptionTemplate > xEncryptionTemplate(
+ m_xContext->getServiceManager()->createInstanceWithContext( sEncryptionTemplate, m_xContext ), UNO_QUERY );
OSL_ASSERT( xEncryptionTemplate.is() );
- cssu::Reference< cssxw::XXMLElementWrapper > xXMLElement
+ Reference< cssxw::XXMLElementWrapper > xXMLElement
= m_xSAXEventKeeper->getElement( m_nIdOfTemplateEC );
xEncryptionTemplate->setTemplate(xXMLElement);
@@ -162,12 +162,12 @@ void EncryptionEngine::clearUp( ) const
* Email: michael.mi at sun.com
******************************************************************************/
{
- cssu::Reference < cssxc::sax::XReferenceResolvedBroadcaster >
- xReferenceResolvedBroadcaster( m_xSAXEventKeeper, cssu::UNO_QUERY );
+ Reference < cssxc::sax::XReferenceResolvedBroadcaster >
+ xReferenceResolvedBroadcaster( m_xSAXEventKeeper, UNO_QUERY );
xReferenceResolvedBroadcaster->removeReferenceResolvedListener(
m_nIdOfTemplateEC,
- (const cssu::Reference < cssxc::sax::XReferenceResolvedListener >)((SecurityEngine *)this));
+ (const Reference < cssxc::sax::XReferenceResolvedListener >)((SecurityEngine *)this));
m_xSAXEventKeeper->removeElementCollector(m_nIdOfTemplateEC);
diff --git a/xmlsecurity/source/framework/encryptionengine.hxx b/xmlsecurity/source/framework/encryptionengine.hxx
index 1203ede..6407e13 100644
--- a/xmlsecurity/source/framework/encryptionengine.hxx
+++ b/xmlsecurity/source/framework/encryptionengine.hxx
@@ -50,6 +50,10 @@ class EncryptionEngine : public cppu::ImplInheritanceHelper1
* Email: michael.mi at sun.com
******************************************************************************/
{
+private:
+ com::sun::star::uno::Reference<
+ com::sun::star::uno::XComponentContext > m_xContext;
+
protected:
/*
* the Encryption bridge component, which performs encrypt and decrypt
@@ -64,7 +68,7 @@ protected:
sal_Int32 m_nIdOfBlocker;
protected:
- EncryptionEngine( );
+ EncryptionEngine( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > & xContext );
virtual ~EncryptionEngine(){};
virtual void tryToPerform( )
diff --git a/xmlsecurity/source/framework/encryptorimpl.cxx b/xmlsecurity/source/framework/encryptorimpl.cxx
index 39f73c6..e2790ac 100644
--- a/xmlsecurity/source/framework/encryptorimpl.cxx
+++ b/xmlsecurity/source/framework/encryptorimpl.cxx
@@ -22,8 +22,9 @@
#include <com/sun/star/xml/crypto/XXMLEncryptionTemplate.hpp>
#include <com/sun/star/xml/wrapper/XXMLElementWrapper.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <comphelper/processfactory.hxx>
-namespace cssu = com::sun::star::uno;
+using namespace com::sun::star::uno;
namespace cssl = com::sun::star::lang;
namespace cssxc = com::sun::star::xml::crypto;
namespace cssxw = com::sun::star::xml::wrapper;
@@ -31,10 +32,9 @@ namespace cssxw = com::sun::star::xml::wrapper;
#define SERVICE_NAME "com.sun.star.xml.crypto.sax.Encryptor"
#define IMPLEMENTATION_NAME "com.sun.star.xml.security.framework.EncryptorImpl"
-EncryptorImpl::EncryptorImpl( const cssu::Reference< cssl::XMultiServiceFactory >& rxMSF)
+EncryptorImpl::EncryptorImpl(const Reference<XComponentContext> & xContext) : EncryptorImpl(xContext)
{
m_nReferenceId = -1;
- mxMSF = rxMSF;
}
EncryptorImpl::~EncryptorImpl()
@@ -79,7 +79,7 @@ bool EncryptorImpl::checkReady() const
}
void EncryptorImpl::notifyResultListener() const
- throw (cssu::Exception, cssu::RuntimeException)
+ throw (Exception, RuntimeException)
/****** DecryptorImpl/notifyResultListener ***********************************
*
* NAME
@@ -103,16 +103,16 @@ void EncryptorImpl::notifyResultListener() const
* Email: michael.mi at sun.com
******************************************************************************/
{
- cssu::Reference< cssxc::sax::XEncryptionResultListener >
- xEncryptionResultListener ( m_xResultListener , cssu::UNO_QUERY ) ;
+ Reference< cssxc::sax::XEncryptionResultListener >
+ xEncryptionResultListener ( m_xResultListener , UNO_QUERY ) ;
xEncryptionResultListener->encrypted( m_nSecurityId, m_nStatus );
}
-void EncryptorImpl::startEngine( const cssu::Reference<
+void EncryptorImpl::startEngine( const Reference<
cssxc::XXMLEncryptionTemplate >&
xEncryptionTemplate)
- throw (cssu::Exception, cssu::RuntimeException)
+ throw (Exception, RuntimeException)
/****** EncryptorImpl/startEngine ********************************************
*
* NAME
@@ -137,9 +137,9 @@ void EncryptorImpl::startEngine( const cssu::Reference<
* Email: michael.mi at sun.com
******************************************************************************/
{
- cssu::Reference < cssxc::XXMLEncryptionTemplate > xResultTemplate;
+ Reference < cssxc::XXMLEncryptionTemplate > xResultTemplate;
- cssu::Reference< cssxw::XXMLElementWrapper >
+ Reference< cssxw::XXMLElementWrapper >
xXMLElement = m_xSAXEventKeeper->getElement( m_nReferenceId );
xEncryptionTemplate->setTarget(xXMLElement);
@@ -149,14 +149,14 @@ void EncryptorImpl::startEngine( const cssu::Reference<
xEncryptionTemplate, m_xSecurityEnvironment);
m_nStatus = xResultTemplate->getStatus();
}
- catch( cssu::Exception& )
+ catch( Exception& )
{
m_nStatus = cssxc::SecurityOperationStatus_RUNTIMEERROR_FAILED;
}
if (m_nStatus == cssxc::SecurityOperationStatus_OPERATION_SUCCEEDED)
{
- cssu::Reference < cssxw::XXMLElementWrapper > xResultEncryption
+ Reference < cssxw::XXMLElementWrapper > xResultEncryption
= xResultTemplate->getTemplate();
m_xSAXEventKeeper->setElement(m_nIdOfTemplateEC, xResultEncryption);
m_xSAXEventKeeper->setElement(m_nReferenceId, NULL);
@@ -165,7 +165,7 @@ void EncryptorImpl::startEngine( const cssu::Reference<
/* XReferenceCollector */
void SAL_CALL EncryptorImpl::setReferenceCount(sal_Int32)
- throw (cssu::Exception, cssu::RuntimeException)
+ throw (Exception, RuntimeException)
{
/*
* dummp method, because there is only one reference in
@@ -175,27 +175,27 @@ void SAL_CALL EncryptorImpl::setReferenceCount(sal_Int32)
}
void SAL_CALL EncryptorImpl::setReferenceId( sal_Int32 id )
- throw (cssu::Exception, cssu::RuntimeException)
+ throw (Exception, RuntimeException)
{
m_nReferenceId = id;
}
/* XEncryptionResultBroadcaster */
-void SAL_CALL EncryptorImpl::addEncryptionResultListener( const cssu::Reference< cssxc::sax::XEncryptionResultListener >& listener )
- throw (cssu::Exception, cssu::RuntimeException)
+void SAL_CALL EncryptorImpl::addEncryptionResultListener( const Reference< cssxc::sax::XEncryptionResultListener >& listener )
+ throw (Exception, RuntimeException)
{
m_xResultListener = listener;
tryToPerform();
}
-void SAL_CALL EncryptorImpl::removeEncryptionResultListener( const cssu::Reference< cssxc::sax::XEncryptionResultListener >&)
- throw (cssu::RuntimeException)
+void SAL_CALL EncryptorImpl::removeEncryptionResultListener( const Reference< cssxc::sax::XEncryptionResultListener >&)
+ throw (RuntimeException)
{
}
/* XInitialization */
-void SAL_CALL EncryptorImpl::initialize( const cssu::Sequence< cssu::Any >& aArguments )
- throw (cssu::Exception, cssu::RuntimeException)
+void SAL_CALL EncryptorImpl::initialize( const Sequence< Any >& aArguments )
+ throw (Exception, RuntimeException)
{
OSL_ASSERT(aArguments.getLength() == 5);
@@ -212,47 +212,47 @@ void SAL_CALL EncryptorImpl::initialize( const cssu::Sequence< cssu::Any >& aArg
OUString EncryptorImpl_getImplementationName ()
- throw (cssu::RuntimeException)
+ throw (RuntimeException)
{
return OUString ( IMPLEMENTATION_NAME );
}
sal_Bool SAL_CALL EncryptorImpl_supportsService( const OUString& ServiceName )
- throw (cssu::RuntimeException)
+ throw (RuntimeException)
{
return ServiceName == SERVICE_NAME;
}
-cssu::Sequence< OUString > SAL_CALL EncryptorImpl_getSupportedServiceNames( )
- throw (cssu::RuntimeException)
+Sequence< OUString > SAL_CALL EncryptorImpl_getSupportedServiceNames( )
+ throw (RuntimeException)
{
- cssu::Sequence < OUString > aRet(1);
+ Sequence < OUString > aRet(1);
OUString* pArray = aRet.getArray();
pArray[0] = OUString ( SERVICE_NAME );
return aRet;
}
#undef SERVICE_NAME
-cssu::Reference< cssu::XInterface > SAL_CALL EncryptorImpl_createInstance(
- const cssu::Reference< cssl::XMultiServiceFactory >& rSMgr)
- throw( cssu::Exception )
+Reference< XInterface > SAL_CALL EncryptorImpl_createInstance(
+ const Reference< cssl::XMultiServiceFactory >& xMSF)
+ throw( Exception )
{
- return (cppu::OWeakObject*) new EncryptorImpl(rSMgr);
+ return (cppu::OWeakObject*) new EncryptorImpl( comphelper::getComponentContext( xMSF ) );
}
/* XServiceInfo */
OUString SAL_CALL EncryptorImpl::getImplementationName( )
- throw (cssu::RuntimeException)
+ throw (RuntimeException)
{
return EncryptorImpl_getImplementationName();
}
sal_Bool SAL_CALL EncryptorImpl::supportsService( const OUString& rServiceName )
- throw (cssu::RuntimeException)
+ throw (RuntimeException)
{
return EncryptorImpl_supportsService( rServiceName );
}
-cssu::Sequence< OUString > SAL_CALL EncryptorImpl::getSupportedServiceNames( )
- throw (cssu::RuntimeException)
+Sequence< OUString > SAL_CALL EncryptorImpl::getSupportedServiceNames( )
+ throw (RuntimeException)
{
return EncryptorImpl_getSupportedServiceNames();
}
diff --git a/xmlsecurity/source/framework/encryptorimpl.hxx b/xmlsecurity/source/framework/encryptorimpl.hxx
index 572dc61..b4f4238 100644
--- a/xmlsecurity/source/framework/encryptorimpl.hxx
+++ b/xmlsecurity/source/framework/encryptorimpl.hxx
@@ -30,14 +30,16 @@
#include "encryptionengine.hxx"
-class EncryptorImpl : public cppu::ImplInheritanceHelper4
+typedef cppu::ImplInheritanceHelper4
<
EncryptionEngine,
com::sun::star::xml::crypto::sax::XEncryptionResultBroadcaster,
com::sun::star::xml::crypto::sax::XReferenceCollector,
com::sun::star::lang::XInitialization,
com::sun::star::lang::XServiceInfo
->
+> EncryptorImpl_Base;
+
+class EncryptorImpl : public EncryptorImpl_Base
/****** EncryptorImpl.hxx/CLASS EncryptorImpl *********************************
*
* NAME
@@ -70,8 +72,7 @@ private:
throw (com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException);
public:
- explicit EncryptorImpl( const com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory >& rxMSF);
+ explicit EncryptorImpl(const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > & xContext);
virtual ~EncryptorImpl();
/* XEncryptionResultBroadcaster */
diff --git a/xmlsecurity/source/framework/securityengine.cxx b/xmlsecurity/source/framework/securityengine.cxx
index 035301b..cefefbf 100644
--- a/xmlsecurity/source/framework/securityengine.cxx
+++ b/xmlsecurity/source/framework/securityengine.cxx
@@ -24,9 +24,8 @@
namespace cssu = com::sun::star::uno;
namespace cssl = com::sun::star::lang;
-SecurityEngine::SecurityEngine( const cssu::Reference< cssl::XMultiServiceFactory >& rxMSF )
- :mxMSF( rxMSF ),
- m_nIdOfTemplateEC(-1),
+SecurityEngine::SecurityEngine()
+ :m_nIdOfTemplateEC(-1),
m_nNumOfResolvedReferences(0),
m_nIdOfKeyEC(-1),
m_bMissionDone(false),
diff --git a/xmlsecurity/source/framework/securityengine.hxx b/xmlsecurity/source/framework/securityengine.hxx
index ffba6b7..3aaac7b 100644
--- a/xmlsecurity/source/framework/securityengine.hxx
+++ b/xmlsecurity/source/framework/securityengine.hxx
@@ -50,8 +50,6 @@ class SecurityEngine : public cppu::WeakImplHelper3
******************************************************************************/
{
protected:
- com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory > mxMSF;
/*
* A SAXEventKeeper internally maintians all resources that a security
@@ -106,8 +104,7 @@ protected:
m_xResultListener;
protected:
- explicit SecurityEngine( const com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory >& rxMSF = NULL );
+ explicit SecurityEngine();
virtual ~SecurityEngine() {};
/*
diff --git a/xmlsecurity/source/framework/signaturecreatorimpl.cxx b/xmlsecurity/source/framework/signaturecreatorimpl.cxx
index c2a3e25..d8f71bf 100644
--- a/xmlsecurity/source/framework/signaturecreatorimpl.cxx
+++ b/xmlsecurity/source/framework/signaturecreatorimpl.cxx
@@ -22,7 +22,9 @@
#include <com/sun/star/xml/crypto/XXMLSignatureTemplate.hpp>
#include <com/sun/star/xml/wrapper/XXMLElementWrapper.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <comphelper/processfactory.hxx>
+using namespace com::sun::star::uno;
namespace cssu = com::sun::star::uno;
namespace cssl = com::sun::star::lang;
namespace cssxc = com::sun::star::xml::crypto;
@@ -31,10 +33,9 @@ namespace cssxw = com::sun::star::xml::wrapper;
#define SERVICE_NAME "com.sun.star.xml.crypto.sax.SignatureCreator"
#define IMPLEMENTATION_NAME "com.sun.star.xml.security.framework.SignatureCreatorImpl"
-SignatureCreatorImpl::SignatureCreatorImpl( const cssu::Reference< cssl::XMultiServiceFactory >& rxMSF )
- :m_nIdOfBlocker(-1)
+SignatureCreatorImpl::SignatureCreatorImpl( const Reference<XComponentContext> & xContext )
+ : SignatureCreatorImpl_Base(xContext), m_nIdOfBlocker(-1)
{
- mxMSF = rxMSF;
}
SignatureCreatorImpl::~SignatureCreatorImpl( )
@@ -247,10 +248,10 @@ cssu::Sequence< OUString > SAL_CALL SignatureCreatorImpl_getSupportedServiceName
#undef SERVICE_NAME
cssu::Reference< cssu::XInterface > SAL_CALL SignatureCreatorImpl_createInstance(
- const cssu::Reference< cssl::XMultiServiceFactory >& rSMgr)
+ const cssu::Reference< cssl::XMultiServiceFactory >& xMSF )
throw( cssu::Exception )
{
- return (cppu::OWeakObject*) new SignatureCreatorImpl( rSMgr );
+ return (cppu::OWeakObject*) new SignatureCreatorImpl( comphelper::getComponentContext( xMSF ) );
}
/* XServiceInfo */
diff --git a/xmlsecurity/source/framework/signaturecreatorimpl.hxx b/xmlsecurity/source/framework/signaturecreatorimpl.hxx
index 5256d07..d212306 100644
--- a/xmlsecurity/source/framework/signaturecreatorimpl.hxx
+++ b/xmlsecurity/source/framework/signaturecreatorimpl.hxx
@@ -30,14 +30,16 @@
#include "signatureengine.hxx"
-class SignatureCreatorImpl : public cppu::ImplInheritanceHelper4
+typedef cppu::ImplInheritanceHelper4
<
SignatureEngine,
com::sun::star::xml::crypto::sax::XBlockerMonitor,
com::sun::star::xml::crypto::sax::XSignatureCreationResultBroadcaster,
com::sun::star::lang::XInitialization,
com::sun::star::lang::XServiceInfo
->
+> SignatureCreatorImpl_Base;
+
+class SignatureCreatorImpl : public SignatureCreatorImpl_Base
/****** SignatureCreatorImpl.hxx/CLASS SignatureCreatorImpl *******************
*
* NAME
@@ -71,8 +73,7 @@ private:
throw (com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException);
public:
- explicit SignatureCreatorImpl( const com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory >& rxMSF);
+ explicit SignatureCreatorImpl( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > & xContext );
virtual ~SignatureCreatorImpl();
/* XBlockerMonitor */
diff --git a/xmlsecurity/source/framework/signatureengine.cxx b/xmlsecurity/source/framework/signatureengine.cxx
index bf20462..e3b4628 100644
--- a/xmlsecurity/source/framework/signatureengine.cxx
+++ b/xmlsecurity/source/framework/signatureengine.cxx
@@ -23,6 +23,7 @@
#include <com/sun/star/xml/wrapper/XXMLElementWrapper.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+using namespace com::sun::star::uno;
namespace cssu = com::sun::star::uno;
namespace cssl = com::sun::star::lang;
namespace cssxc = com::sun::star::xml::crypto;
@@ -30,8 +31,8 @@ namespace cssxw = com::sun::star::xml::wrapper;
#define SIGNATURE_TEMPLATE "com.sun.star.xml.crypto.XMLSignatureTemplate"
-SignatureEngine::SignatureEngine( )
- :m_nTotalReferenceNumber(-1)
+SignatureEngine::SignatureEngine( const Reference<XComponentContext> & xContext)
+ : m_xContext(xContext), m_nTotalReferenceNumber(-1)
{
}
@@ -115,7 +116,7 @@ void SignatureEngine::tryToPerform( )
{
const OUString ouSignatureTemplate ( SIGNATURE_TEMPLATE );
cssu::Reference < cssxc::XXMLSignatureTemplate >
- xSignatureTemplate( mxMSF->createInstance( ouSignatureTemplate ), cssu::UNO_QUERY );
+ xSignatureTemplate( m_xContext->getServiceManager()->createInstanceWithContext( ouSignatureTemplate, m_xContext ), cssu::UNO_QUERY );
OSL_ASSERT( xSignatureTemplate.is() );
diff --git a/xmlsecurity/source/framework/signatureengine.hxx b/xmlsecurity/source/framework/signatureengine.hxx
index 7844269..ce3d137 100644
--- a/xmlsecurity/source/framework/signatureengine.hxx
+++ b/xmlsecurity/source/framework/signatureengine.hxx
@@ -30,6 +30,7 @@
#include <com/sun/star/xml/crypto/XXMLSignature.hpp>
#include <com/sun/star/xml/crypto/XUriBinding.hpp>
#include <com/sun/star/io/XInputStream.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <cppuhelper/implbase2.hxx>
@@ -56,6 +57,9 @@ class SignatureEngine : public cppu::ImplInheritanceHelper2
* Email: michael.mi at sun.com
******************************************************************************/
{
+private:
+ com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > m_xContext;
+
protected:
/*
@@ -87,7 +91,7 @@ protected:
com::sun::star::io::XInputStream > > m_vXInputStreams;
protected:
- SignatureEngine( );
+ SignatureEngine( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > & xContext);
virtual ~SignatureEngine() {};
virtual void tryToPerform( )
diff --git a/xmlsecurity/source/framework/signatureverifierimpl.cxx b/xmlsecurity/source/framework/signatureverifierimpl.cxx
index 246c5e2..43a0a73 100644
--- a/xmlsecurity/source/framework/signatureverifierimpl.cxx
+++ b/xmlsecurity/source/framework/signatureverifierimpl.cxx
@@ -22,6 +22,7 @@
#include <com/sun/star/xml/crypto/XXMLSignatureTemplate.hpp>
#include <com/sun/star/xml/wrapper/XXMLElementWrapper.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <comphelper/processfactory.hxx>
namespace cssu = com::sun::star::uno;
namespace cssl = com::sun::star::lang;
@@ -30,9 +31,9 @@ namespace cssxc = com::sun::star::xml::crypto;
#define SERVICE_NAME "com.sun.star.xml.crypto.sax.SignatureVerifier"
#define IMPLEMENTATION_NAME "com.sun.star.xml.security.framework.SignatureVerifierImpl"
-SignatureVerifierImpl::SignatureVerifierImpl( const cssu::Reference< cssl::XMultiServiceFactory >& rxMSF)
+SignatureVerifierImpl::SignatureVerifierImpl( const cssu::Reference< css::uno::XComponentContext >& xContext)
+ : SignatureVerifierImpl_Base(xContext)
{
- mxMSF = rxMSF;
}
SignatureVerifierImpl::~SignatureVerifierImpl()
@@ -196,7 +197,7 @@ cssu::Reference< cssu::XInterface > SAL_CALL SignatureVerifierImpl_createInstanc
const cssu::Reference< cssl::XMultiServiceFactory >& rSMgr)
throw( cssu::Exception )
{
- return (cppu::OWeakObject*) new SignatureVerifierImpl(rSMgr);
+ return (cppu::OWeakObject*) new SignatureVerifierImpl( comphelper::getComponentContext(rSMgr) );
}
/* XServiceInfo */
diff --git a/xmlsecurity/source/framework/signatureverifierimpl.hxx b/xmlsecurity/source/framework/signatureverifierimpl.hxx
index bc46c23..fce7833 100644
--- a/xmlsecurity/source/framework/signatureverifierimpl.hxx
+++ b/xmlsecurity/source/framework/signatureverifierimpl.hxx
@@ -25,17 +25,20 @@
#include <com/sun/star/xml/crypto/XXMLSecurityContext.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <cppuhelper/implbase3.hxx>
#include "signatureengine.hxx"
-class SignatureVerifierImpl : public cppu::ImplInheritanceHelper3
+typedef cppu::ImplInheritanceHelper3
<
SignatureEngine,
com::sun::star::xml::crypto::sax::XSignatureVerifyResultBroadcaster,
com::sun::star::lang::XInitialization,
com::sun::star::lang::XServiceInfo
->
+> SignatureVerifierImpl_Base;
+
+class SignatureVerifierImpl : public SignatureVerifierImpl_Base
/****** SignatureVerifier.hxx/CLASS SignatureVerifierImpl *********************
*
* NAME
@@ -64,7 +67,7 @@ private:
public:
explicit SignatureVerifierImpl( const com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory >& rxMSF);
+ com::sun::star::uno::XComponentContext >& rxContext);
virtual ~SignatureVerifierImpl();
/* XSignatureVerifyResultBroadcaster */
commit 27c6434fccfec5fb4184c1efa2057595c8716fad
Author: Noel Grandin <noel at peralex.com>
Date: Wed Jun 5 10:35:22 2013 +0200
fdo#46808, Replace usage of SpecialConfigManager
with usage of the underlying SvtPathOptions. The service is just
a thing wrapper that serves no real purpose.
Change-Id: Id762edf71ba0f699ef091261905c88c2d93e1c12
diff --git a/filter/Library_xmlfa.mk b/filter/Library_xmlfa.mk
index fe1dfae..0f6cddc 100644
--- a/filter/Library_xmlfa.mk
+++ b/filter/Library_xmlfa.mk
@@ -26,11 +26,12 @@ $(eval $(call gb_Library_use_external,xmlfa,boost_headers))
$(eval $(call gb_Library_use_sdk_api,xmlfa))
$(eval $(call gb_Library_use_libraries,xmlfa,\
- tl \
comphelper \
cppuhelper \
cppu \
sal \
+ tl \
+ utl \
$(gb_UWINAPI) \
))
diff --git a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx
index 19dfbb1..bba852d 100644
--- a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx
+++ b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx
@@ -49,6 +49,7 @@
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <comphelper/genericpropertyset.hxx>
#include <comphelper/propertysetinfo.hxx>
+#include <unotools/pathoptions.hxx>
using namespace comphelper;
using namespace com::sun::star::uno;
@@ -160,9 +161,8 @@ sal_Bool SAL_CALL XmlFilterAdaptor::importImpl( const Sequence< ::com::sun::star
//Load the Styles from the Template URL Supplied in the TypeDetection file
if(msTemplateName.indexOf(OUString( "file:" ))==-1)
{
- Reference< XConfigManager >xCfgMgr ( mxContext->getServiceManager()->createInstanceWithContext(
- "com.sun.star.config.SpecialConfigManager", mxContext ), UNO_QUERY );
- OUString PathString(xCfgMgr->substituteVariables(OUString("$(progurl)")));
+ SvtPathOptions aOptions;
+ OUString PathString = aOptions.SubstituteVariable(OUString("$(progurl)"));
PathString = PathString.concat(OUString( "/" ));
msTemplateName=PathString.concat(msTemplateName);
}
diff --git a/filter/source/xsltdialog/xmlfilterjar.cxx b/filter/source/xsltdialog/xmlfilterjar.cxx
index a0c6159..0e0dd4c 100644
--- a/filter/source/xsltdialog/xmlfilterjar.cxx
+++ b/filter/source/xsltdialog/xmlfilterjar.cxx
@@ -32,12 +32,13 @@
#include <comphelper/processfactory.hxx>
#include <comphelper/oslfile2streamwrap.hxx>
#include <comphelper/storagehelper.hxx>
+#include <osl/file.hxx>
+#include <unotools/pathoptions.hxx>
#include <unotools/streamwrap.hxx>
-#include <tools/stream.hxx>
-#include <tools/urlobj.hxx>
#include <unotools/tempfile.hxx>
#include <svl/urihelper.hxx>
-#include <osl/file.hxx>
+#include <tools/stream.hxx>
+#include <tools/urlobj.hxx>
#include <rtl/uri.hxx>
@@ -65,23 +66,13 @@ XMLFilterJarHelper::XMLFilterJarHelper( const Reference< XComponentContext >& rx
sVndSunStarPackage( "vnd.sun.star.Package:" ),
sXSLTPath( "$(user)/xslt/" ),
sTemplatePath( "$(user)/template/" ),
- sSpecialConfigManager( "com.sun.star.config.SpecialConfigManager" ),
sPump( "com.sun.star.io.Pump" ),
sProgPath( "$(prog)/" )
{
- try
- {
- Reference< XConfigManager > xCfgMgr( rxContext->getServiceManager()->createInstanceWithContext( "com.sun.star.config.SpecialConfigManager", rxContext ), UNO_QUERY );
- if( xCfgMgr.is() )
- {
- sProgPath = xCfgMgr->substituteVariables( sProgPath );
- sXSLTPath = xCfgMgr->substituteVariables( sXSLTPath );
- sTemplatePath = xCfgMgr->substituteVariables( sTemplatePath );
- }
- }
- catch(const Exception&)
- {
- }
+ SvtPathOptions aOptions;
+ sProgPath = aOptions.SubstituteVariable( sProgPath );
+ sXSLTPath = aOptions.SubstituteVariable( sXSLTPath );
+ sTemplatePath = aOptions.SubstituteVariable( sTemplatePath );
}
static OUString encodeZipUri( const OUString& rURI )
diff --git a/filter/source/xsltdialog/xmlfilterjar.hxx b/filter/source/xsltdialog/xmlfilterjar.hxx
index 6681e18..7179f9d 100644
--- a/filter/source/xsltdialog/xmlfilterjar.hxx
+++ b/filter/source/xsltdialog/xmlfilterjar.hxx
@@ -48,7 +48,6 @@ private:
OUString sVndSunStarPackage;
OUString sXSLTPath;
OUString sTemplatePath;
- OUString sSpecialConfigManager;
OUString sPump;
OUString sProgPath;
};
diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
index cad9278..4f4469a 100644
--- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
@@ -27,6 +27,7 @@
#include <tools/urlobj.hxx>
#include <svtools/headbar.hxx>
#include <unotools/streamwrap.hxx>
+#include <unotools/pathoptions.hxx>
#include <osl/file.hxx>
#include <vcl/msgbox.hxx>
#include <sfx2/filedlghelper.hxx>
@@ -93,11 +94,8 @@ XMLFilterSettingsDialog::XMLFilterSettingsDialog(Window* pParent,
mxTypeDetection = Reference< XNameContainer >::query( rxContext->getServiceManager()->createInstanceWithContext( "com.sun.star.document.TypeDetection", rxContext ) );
mxExtendedTypeDetection = Reference< XNameContainer >::query( rxContext->getServiceManager()->createInstanceWithContext( "com.sun.star.document.ExtendedTypeDetectionFactory", rxContext ) );
- Reference< XConfigManager > xCfgMgr( rxContext->getServiceManager()->createInstanceWithContext( "com.sun.star.config.SpecialConfigManager", rxContext ), UNO_QUERY );
- if( xCfgMgr.is() )
- {
- m_sTemplatePath = xCfgMgr->substituteVariables( m_sTemplatePath );
- }
+ SvtPathOptions aOptions;
+ m_sTemplatePath = aOptions.SubstituteVariable( m_sTemplatePath );
}
catch(const Exception&)
{
diff --git a/filter/source/xsltdialog/xmlfiltertabdialog.cxx b/filter/source/xsltdialog/xmlfiltertabdialog.cxx
index 6ed8e50..b7abdc7 100644
--- a/filter/source/xsltdialog/xmlfiltertabdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltertabdialog.cxx
@@ -82,7 +82,7 @@ XMLFilterTabDialog::XMLFilterTabDialog( Window *pParent, ResMgr& rResMgr, const
aCtrlSiz = aSiz;
}
- mpXSLTPage = new XMLFilterTabPageXSLT( &maTabCtrl, mrResMgr, mxContext );
+ mpXSLTPage = new XMLFilterTabPageXSLT( &maTabCtrl, mrResMgr );
mpXSLTPage->SetInfo( mpNewInfo );
maTabCtrl.SetTabPage( RID_XML_FILTER_TABPAGE_XSLT, mpXSLTPage );
diff --git a/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx b/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx
index 04bc141..87e6994 100644
--- a/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx
+++ b/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx
@@ -22,6 +22,7 @@
#include "com/sun/star/ui/dialogs/TemplateDescription.hpp"
#include <sfx2/filedlghelper.hxx>
#include <unotools/localfilehelper.hxx>
+#include <unotools/pathoptions.hxx>
#include <osl/file.hxx>
#include <svl/urihelper.hxx>
@@ -35,7 +36,7 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::frame;
using namespace ::com::sun::star::lang;
-XMLFilterTabPageXSLT::XMLFilterTabPageXSLT( Window* pParent, ResMgr& rResMgr, const css::uno::Reference< XComponentContext >& rxContext ) :
+XMLFilterTabPageXSLT::XMLFilterTabPageXSLT( Window* pParent, ResMgr& rResMgr ) :
TabPage( pParent, ResId( RID_XML_FILTER_TABPAGE_XSLT, rResMgr ) ),
maFTDocType( this, ResId( FT_XML_DOCTYPE, rResMgr ) ),
@@ -64,16 +65,8 @@ XMLFilterTabPageXSLT::XMLFilterTabPageXSLT( Window* pParent, ResMgr& rResMgr, co
{
FreeResource();
- try
- {
- css::uno::Reference< XConfigManager > xCfgMgr( rxContext->getServiceManager()->createInstanceWithContext( "com.sun.star.config.SpecialConfigManager", rxContext ), UNO_QUERY );
- if( xCfgMgr.is() )
- sInstPath = xCfgMgr->substituteVariables( sInstPath );
- }
- catch(const Exception&)
- {
- OSL_FAIL( "XMLFilterTabPageXSLT::XMLFilterTabPageXSLT exception catched!" );
- }
+ SvtPathOptions aOptions;
+ sInstPath = aOptions.SubstituteVariable( sInstPath );
maPBExprotXSLT.SetClickHdl( LINK ( this, XMLFilterTabPageXSLT, ClickBrowseHdl_Impl ) );
maPBImportXSLT.SetClickHdl( LINK ( this, XMLFilterTabPageXSLT, ClickBrowseHdl_Impl ) );
diff --git a/filter/source/xsltdialog/xmlfiltertabpagexslt.hxx b/filter/source/xsltdialog/xmlfiltertabpagexslt.hxx
index 57e1b19..6e71a42 100644
--- a/filter/source/xsltdialog/xmlfiltertabpagexslt.hxx
+++ b/filter/source/xsltdialog/xmlfiltertabpagexslt.hxx
@@ -33,7 +33,7 @@ class filter_info_impl;
class XMLFilterTabPageXSLT : public TabPage
{
public:
- XMLFilterTabPageXSLT( Window* pParent, ResMgr& rResMgr, const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext );
+ XMLFilterTabPageXSLT( Window* pParent, ResMgr& rResMgr );
virtual ~XMLFilterTabPageXSLT();
bool FillInfo( filter_info_impl* pInfo );
diff --git a/xmlhelp/Library_tvhlp1.mk b/xmlhelp/Library_tvhlp1.mk
index 58487dd..9ef9f20 100644
--- a/xmlhelp/Library_tvhlp1.mk
+++ b/xmlhelp/Library_tvhlp1.mk
@@ -23,6 +23,7 @@ $(eval $(call gb_Library_use_libraries,tvhlp1,\
cppu \
cppuhelper \
sal \
+ tl \
utl \
i18nlangtag \
))
diff --git a/xmlhelp/Library_ucpchelp1.mk b/xmlhelp/Library_ucpchelp1.mk
index f559cb1..0c4aab9 100644
--- a/xmlhelp/Library_ucpchelp1.mk
+++ b/xmlhelp/Library_ucpchelp1.mk
@@ -51,6 +51,7 @@ $(eval $(call gb_Library_use_libraries,ucpchelp1,\
cppuhelper \
helplinker \
sal \
+ tl \
ucbhelper \
utl \
i18nlangtag \
diff --git a/xmlhelp/source/cxxhelp/provider/provider.cxx b/xmlhelp/source/cxxhelp/provider/provider.cxx
index e2ee1db..057e30b 100644
--- a/xmlhelp/source/cxxhelp/provider/provider.cxx
+++ b/xmlhelp/source/cxxhelp/provider/provider.cxx
@@ -38,6 +38,7 @@
#include <com/sun/star/uno/XComponentContext.hpp>
#include <comphelper/processfactory.hxx>
#include <unotools/configmgr.hxx>
+#include <unotools/pathoptions.hxx>
#include <rtl/bootstrap.hxx>
#include "databases.hxx"
@@ -442,27 +443,8 @@ ContentProvider::getBooleanKey(
void ContentProvider::subst( OUString& instpath ) const
{
- uno::Reference< frame::XConfigManager > xCfgMgr;
- if( m_xContext.is() )
- {
- try
- {
- xCfgMgr =
- uno::Reference< frame::XConfigManager >(
- m_xContext->getServiceManager()->createInstanceWithContext("com.sun.star.config.SpecialConfigManager", m_xContext),
- uno::UNO_QUERY );
- }
- catch( const uno::Exception&)
- {
- OSL_ENSURE( xCfgMgr.is(),
- "cant instantiate the special config manager " );
- }
- }
-
- OSL_ENSURE( xCfgMgr.is(), "specialconfigmanager not found\n" );
-
- if( xCfgMgr.is() )
- instpath = xCfgMgr->substituteVariables( instpath );
+ SvtPathOptions aOptions;
+ instpath = aOptions.SubstituteVariable( instpath );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlhelp/source/treeview/tvfactory.cxx b/xmlhelp/source/treeview/tvfactory.cxx
index 02b0a23..5cee589 100644
--- a/xmlhelp/source/treeview/tvfactory.cxx
+++ b/xmlhelp/source/treeview/tvfactory.cxx
@@ -21,6 +21,7 @@
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
+#include <comphelper/processfactory.hxx>
#include "tvfactory.hxx"
#include "tvread.hxx"
@@ -34,8 +35,8 @@ using namespace com::sun::star::container;
-TVFactory::TVFactory( const uno::Reference< XMultiServiceFactory >& xMSF )
- : m_xMSF( xMSF )
+TVFactory::TVFactory( const uno::Reference< XComponentContext >& xContext )
+ : m_xContext( xContext )
{
}
@@ -157,7 +158,7 @@ TVFactory::createInstanceWithArguments(
if( ! m_xHDS.is() )
{
- cppu::OWeakObject* p = new TVChildTarget( m_xMSF );
+ cppu::OWeakObject* p = new TVChildTarget( m_xContext );
m_xHDS = Reference< XInterface >( p );
}
@@ -241,7 +242,7 @@ Reference< XInterface > SAL_CALL
TVFactory::CreateInstance(
const Reference< XMultiServiceFactory >& xMultiServiceFactory )
{
- XServiceInfo* xP = (XServiceInfo*) new TVFactory( xMultiServiceFactory );
+ XServiceInfo* xP = (XServiceInfo*) new TVFactory( comphelper::getComponentContext(xMultiServiceFactory) );
return Reference< XInterface >::query( xP );
}
diff --git a/xmlhelp/source/treeview/tvfactory.hxx b/xmlhelp/source/treeview/tvfactory.hxx
index 30c6c7f..da76533 100644
--- a/xmlhelp/source/treeview/tvfactory.hxx
+++ b/xmlhelp/source/treeview/tvfactory.hxx
@@ -41,7 +41,7 @@ namespace treeview {
{
public:
- TVFactory( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& xMSF );
+ TVFactory( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& xContext );
~TVFactory();
@@ -120,7 +120,7 @@ namespace treeview {
private:
// Members
- com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xMSF;
+ com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > m_xContext;
com::sun::star::uno::Reference< com::sun::star::uno::XInterface > m_xHDS;
};
diff --git a/xmlhelp/source/treeview/tvread.cxx b/xmlhelp/source/treeview/tvread.cxx
index 83ebfd7..8a2d494 100644
--- a/xmlhelp/source/treeview/tvread.cxx
+++ b/xmlhelp/source/treeview/tvread.cxx
@@ -36,6 +36,7 @@
#include <com/sun/star/uri/XVndSunStarExpandUrl.hpp>
#include <i18nlangtag/languagetag.hxx>
#include <comphelper/string.hxx>
+#include <unotools/pathoptions.hxx>
namespace treeview {
@@ -492,9 +493,9 @@ TVChildTarget::TVChildTarget( const ConfigData& configData,TVDom* tvDom )
Elements[i] = new TVRead( configData,tvDom->children[i] );
}
-TVChildTarget::TVChildTarget( const Reference< XMultiServiceFactory >& xMSF )
+TVChildTarget::TVChildTarget( const Reference< XComponentContext >& xContext )
{
- ConfigData configData = init( xMSF );
+ ConfigData configData = init( xContext );
if( configData.locale.isEmpty() || configData.system.isEmpty() )
return;
@@ -710,10 +711,10 @@ TVChildTarget::hasByHierarchicalName( const OUString& aName )
-ConfigData TVChildTarget::init( const Reference< XMultiServiceFactory >& xSMgr )
+ConfigData TVChildTarget::init( const Reference< XComponentContext >& xContext )
{
ConfigData configData;
- Reference< XMultiServiceFactory > sProvider( getConfiguration(comphelper::getComponentContext(xSMgr)) );
+ Reference< XMultiServiceFactory > sProvider( getConfiguration(xContext) );
/**********************************************************************/
/* reading Office.Common */
@@ -729,7 +730,7 @@ ConfigData TVChildTarget::init( const Reference< XMultiServiceFactory >& xSMgr )
instPath = OUString( "$(instpath)/help" );
// replace anything like $(instpath);
- subst( xSMgr,instPath );
+ subst( instPath );
/**********************************************************************/
/* reading setup */
@@ -743,7 +744,7 @@ ConfigData TVChildTarget::init( const Reference< XMultiServiceFactory >& xSMgr )
try
{
- Reference< lang::XMultiServiceFactory > xConfigProvider = theDefaultProvider::get( comphelper::getComponentContext(xSMgr) );
+ Reference< lang::XMultiServiceFactory > xConfigProvider = theDefaultProvider::get( xContext );
uno::Sequence < uno::Any > lParams(1);
beans::PropertyValue aParam ;
@@ -978,29 +979,10 @@ TVChildTarget::getBooleanKey(const Reference<
}
-void TVChildTarget::subst( const Reference< XMultiServiceFactory >& m_xSMgr,
- OUString& instpath ) const
+void TVChildTarget::subst( OUString& instpath ) const
{
- Reference< XConfigManager > xCfgMgr;
- if( m_xSMgr.is() )
- {
- try
- {
- xCfgMgr =
- Reference< XConfigManager >(
- m_xSMgr->createInstance( OUString( "com.sun.star.config.SpecialConfigManager" ) ),
- UNO_QUERY );
- }
- catch( const com::sun::star::uno::Exception& )
- {
- OSL_ENSURE( xCfgMgr.is()," cant instantiate the special config manager " );
- }
- }
-
- OSL_ENSURE( xCfgMgr.is(), "specialconfigmanager not found\n" );
-
- if( xCfgMgr.is() )
- instpath = xCfgMgr->substituteVariables( instpath );
+ SvtPathOptions aOptions;
+ instpath = aOptions.SubstituteVariable( instpath );
}
diff --git a/xmlhelp/source/treeview/tvread.hxx b/xmlhelp/source/treeview/tvread.hxx
index 1a9649b..0b2eb6e 100644
--- a/xmlhelp/source/treeview/tvread.hxx
+++ b/xmlhelp/source/treeview/tvread.hxx
@@ -252,7 +252,7 @@ namespace treeview {
TVChildTarget( const ConfigData& configData,TVDom* tvDom );
- TVChildTarget( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& xMSF );
+ TVChildTarget( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& xContext );
~TVChildTarget();
@@ -287,7 +287,7 @@ namespace treeview {
std::vector< rtl::Reference< TVRead > > Elements;
ConfigData init(
- const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& xMSF );
+ const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& xContext );
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
getConfiguration(
@@ -306,9 +306,7 @@ namespace treeview {
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XHierarchicalNameAccess >& xHierAccess,
const char* key) const;
- void subst(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xMSgr,
- OUString& instpath ) const;
+ void subst( OUString& instpath ) const;
bool SearchAndInsert(TVDom* p, TVDom* tvDom);
More information about the Libreoffice-commits
mailing list