diff options
author | Noel Grandin <noel@peralex.com> | 2012-05-30 16:45:36 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-06-06 10:01:22 +0200 |
commit | 392a483e1040787857fa09fead0547d567c570b5 (patch) | |
tree | 76f2f1aab1a5a9c81c30e212e0df3f568fa92e34 /extensions | |
parent | d08578912f2c9ef42d4349079422e25b951e544e (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 'extensions')
-rw-r--r-- | extensions/source/logging/filehandler.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/extensions/source/logging/filehandler.cxx b/extensions/source/logging/filehandler.cxx index c0750a90cab2..0d5d9d9965f3 100644 --- a/extensions/source/logging/filehandler.cxx +++ b/extensions/source/logging/filehandler.cxx @@ -37,6 +37,7 @@ #include <com/sun/star/ucb/AlreadyInitializedException.hpp> #include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/lang/IllegalArgumentException.hpp> +#include <com/sun/star/util/PathSubstitution.hpp> #include <com/sun/star/util/XStringSubstitution.hpp> /** === end UNO includes === **/ @@ -75,6 +76,7 @@ namespace logging using ::com::sun::star::uno::Exception; using ::com::sun::star::lang::IllegalArgumentException; using ::com::sun::star::uno::UNO_QUERY_THROW; + using ::com::sun::star::util::PathSubstitution; using ::com::sun::star::util::XStringSubstitution; using ::com::sun::star::beans::NamedValue; /** === end UNO using === **/ @@ -240,9 +242,8 @@ namespace logging { try { - Reference< XStringSubstitution > xStringSubst; - if ( m_aContext.createComponent( "com.sun.star.util.PathSubstitution", xStringSubst ) ) - _inout_rURL = xStringSubst->substituteVariables( _inout_rURL, true ); + Reference< XStringSubstitution > xStringSubst(PathSubstitution::create(m_aContext.getUNOContext())); + _inout_rURL = xStringSubst->substituteVariables( _inout_rURL, true ); } catch( const Exception& ) { |