summaryrefslogtreecommitdiff
path: root/sd/source/ui/framework/configuration
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-06-01 15:15:25 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-06-06 10:53:34 +0200
commit0fcd1a73f0e1ec564f3c6da1ccd890183d3c18db (patch)
tree3895ecd6f804b8f3ef3a8f03f1739e17918feeef /sd/source/ui/framework/configuration
parent8a95074eaefd01621dc55db8567b19c8e6157f95 (diff)
fdo#46808, Adapt UNO services to new style, Part 7, updating ::create
Update code to use factory method URLTransformer::create Change-Id: I3fd2e838497bcfd8fc949615c0e7d60a6ea47118 Signed-off-by: Stephan Bergmann <sbergman@redhat.com>, added some tweaks.
Diffstat (limited to 'sd/source/ui/framework/configuration')
-rw-r--r--sd/source/ui/framework/configuration/ResourceFactoryManager.cxx8
-rw-r--r--sd/source/ui/framework/configuration/ResourceId.cxx8
2 files changed, 6 insertions, 10 deletions
diff --git a/sd/source/ui/framework/configuration/ResourceFactoryManager.cxx b/sd/source/ui/framework/configuration/ResourceFactoryManager.cxx
index 4f77bf2a7edd..7d770ffa04c5 100644
--- a/sd/source/ui/framework/configuration/ResourceFactoryManager.cxx
+++ b/sd/source/ui/framework/configuration/ResourceFactoryManager.cxx
@@ -32,6 +32,7 @@
#include <com/sun/star/lang/IllegalArgumentException.hpp>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/util/URLTransformer.hpp>
#include <comphelper/processfactory.hxx>
#include <boost/bind.hpp>
#include <algorithm>
@@ -51,11 +52,8 @@ ResourceFactoryManager::ResourceFactoryManager (const Reference<XControllerManag
mxURLTransformer()
{
// Create the URL transformer.
- Reference<lang::XMultiServiceFactory> xServiceManager (
- ::comphelper::getProcessServiceFactory());
- mxURLTransformer = Reference<util::XURLTransformer>(
- xServiceManager->createInstance("com.sun.star.util.URLTransformer"),
- UNO_QUERY);
+ Reference<uno::XComponentContext> xContext(::comphelper::getProcessComponentContext());
+ mxURLTransformer = util::URLTransformer::create(xContext);
}
diff --git a/sd/source/ui/framework/configuration/ResourceId.cxx b/sd/source/ui/framework/configuration/ResourceId.cxx
index aece40c1d8a0..7816e770a31f 100644
--- a/sd/source/ui/framework/configuration/ResourceId.cxx
+++ b/sd/source/ui/framework/configuration/ResourceId.cxx
@@ -32,6 +32,7 @@
#include "tools/SdGlobalResourceContainer.hxx"
#include <com/sun/star/lang/IllegalArgumentException.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/util/URLTransformer.hpp>
#include <comphelper/processfactory.hxx>
#include <rtl/ref.hxx>
@@ -597,11 +598,8 @@ void ResourceId::ParseResourceURL (void)
if ( ! xURLTransformer.is())
{
// Create the URL transformer.
- Reference<lang::XMultiServiceFactory> xServiceManager (
- ::comphelper::getProcessServiceFactory());
- xURLTransformer = Reference<util::XURLTransformer>(
- xServiceManager->createInstance("com.sun.star.util.URLTransformer"),
- UNO_QUERY);
+ Reference<uno::XComponentContext> xContext(::comphelper::getProcessComponentContext());
+ xURLTransformer = Reference<util::XURLTransformer>(util::URLTransformer::create(xContext));
mxURLTransformerWeak = xURLTransformer;
SdGlobalResourceContainer::Instance().AddResource(
Reference<XInterface>(xURLTransformer,UNO_QUERY));