diff options
Diffstat (limited to 'sw/source/ui/vba')
-rw-r--r-- | sw/source/ui/vba/vbaoptions.cxx | 10 | ||||
-rw-r--r-- | sw/source/ui/vba/vbaoptions.hxx | 3 |
2 files changed, 6 insertions, 7 deletions
diff --git a/sw/source/ui/vba/vbaoptions.cxx b/sw/source/ui/vba/vbaoptions.cxx index 0c21ae0fca93..bdbcfb2d5812 100644 --- a/sw/source/ui/vba/vbaoptions.cxx +++ b/sw/source/ui/vba/vbaoptions.cxx @@ -22,16 +22,16 @@ #include <ooo/vba/word/WdLineStyle.hpp> #include <ooo/vba/word/WdLineWidth.hpp> #include <ooo/vba/word/WdColorIndex.hpp> -#include <com/sun/star/util/XStringSubstitution.hpp> #include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/util/XStringSubstitution.hpp> +#include <com/sun/star/util/PathSettings.hpp> #include <osl/file.hxx> using namespace ::ooo::vba; using namespace ::com::sun::star; -SwVbaOptions::SwVbaOptions( uno::Reference<uno::XComponentContext >& xContext ) throw ( uno::RuntimeException ) : SwVbaOptions_BASE( uno::Reference< XHelperInterface >(), xContext ) +SwVbaOptions::SwVbaOptions( uno::Reference<uno::XComponentContext >& xContext ) : SwVbaOptions_BASE( uno::Reference< XHelperInterface >(), xContext ) { - mxFactory.set( comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW ); } SwVbaOptions::~SwVbaOptions() @@ -95,7 +95,7 @@ void SwVbaOptions::setValueEvent( const uno::Any& value ) value >>= sNewPath; OUString sNewPathUrl; ::osl::File::getFileURLFromSystemPath( sNewPath, sNewPathUrl ); - uno::Reference< beans::XPropertySet > xPathSettings( mxFactory->createInstance( OUString("com.sun.star.util.PathSettings") ), uno::UNO_QUERY_THROW ); + uno::Reference< util::XPathSettings > xPathSettings = util::PathSettings::create( comphelper::getProcessComponentContext() ); OUString sOldPathUrl; xPathSettings->getPropertyValue( msDefaultFilePath ) >>= sOldPathUrl; // path could be a multipath, Microsoft doesn't support this feature in Word currently @@ -110,7 +110,7 @@ void SwVbaOptions::setValueEvent( const uno::Any& value ) uno::Any SwVbaOptions::getValueEvent() { - uno::Reference< beans::XPropertySet > xPathSettings( mxFactory->createInstance( OUString("com.sun.star.util.PathSettings") ), uno::UNO_QUERY_THROW ); + uno::Reference< util::XPathSettings > xPathSettings = util::PathSettings::create( comphelper::getProcessComponentContext() ); OUString sPathUrl; xPathSettings->getPropertyValue( msDefaultFilePath ) >>= sPathUrl; // path could be a multipath, Microsoft doesn't support this feature in Word currently diff --git a/sw/source/ui/vba/vbaoptions.hxx b/sw/source/ui/vba/vbaoptions.hxx index dbd89e4aaf23..2a2573e8ce5d 100644 --- a/sw/source/ui/vba/vbaoptions.hxx +++ b/sw/source/ui/vba/vbaoptions.hxx @@ -32,9 +32,8 @@ class SwVbaOptions : public SwVbaOptions_BASE, { private: OUString msDefaultFilePath; - css::uno::Reference< css::lang::XMultiServiceFactory > mxFactory; public: - SwVbaOptions( css::uno::Reference< css::uno::XComponentContext >& m_xContext ) throw ( css::uno::RuntimeException ); + SwVbaOptions( css::uno::Reference< css::uno::XComponentContext >& m_xContext ); virtual ~SwVbaOptions(); // Attributes |