summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-05-30 16:45:36 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-06-06 10:01:22 +0200
commit392a483e1040787857fa09fead0547d567c570b5 (patch)
tree76f2f1aab1a5a9c81c30e212e0df3f568fa92e34 /basic
parentd08578912f2c9ef42d4349079422e25b951e544e (diff)
fdo#46808, Adapt UNO services to new style, Part 7, updating ::create
Update code to use factory method PathSubstitutions::create Change-Id: I3721bd93c36b207d849eea19102f5ac61cadd205 Signed-off-by: Stephan Bergmann <sbergman@redhat.com>, added some tweaks.
Diffstat (limited to 'basic')
-rw-r--r--basic/source/uno/namecont.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index 7a954000d239..2baa1853a35b 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -62,6 +62,7 @@
#include <com/sun/star/script/LibraryNotLoadedException.hpp>
#include <com/sun/star/script/vba/VBAScriptEventId.hpp>
#include <com/sun/star/ucb/SimpleFileAccess.hpp>
+#include <com/sun/star/util/PathSubstitution.hpp>
#include <com/sun/star/deployment/ExtensionManager.hpp>
#include <comphelper/componentcontext.hxx>
#include <comphelper/storagehelper.hxx>
@@ -388,11 +389,7 @@ SfxLibraryContainer::SfxLibraryContainer( void )
mxSFI = ucb::SimpleFileAccess::create( comphelper::ComponentContext(mxMSF).getUNOContext() );
- mxStringSubstitution = Reference< XStringSubstitution >( mxMSF->createInstance
- ( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.PathSubstitution")) ), UNO_QUERY );
- SAL_WARN_IF(
- !mxStringSubstitution.is(), "basic",
- "couldn't create PathSubstitution component");
+ mxStringSubstitution = util::PathSubstitution::create( comphelper::ComponentContext(mxMSF).getUNOContext() );
}
SfxLibraryContainer::~SfxLibraryContainer()