diff options
author | Noel Grandin <noel@peralex.com> | 2013-05-08 15:02:35 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-05-13 09:38:01 +0200 |
commit | 86c1ebc1ef4a90e9bc58fb69c2d1d978765a34ca (patch) | |
tree | f9ba1c3c02198c83484b68fc190cd2995f6734ab /sc | |
parent | ee7f8cb10178fbc348210f6dea0e2ae64964ab6d (diff) |
fdo#46808, Convert util::PathSettings service to new style
Change-Id: I302be46b46518e1e872771e1c8a0647f7c330b30
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/vba/vbaapplication.cxx | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx index 958a5bb0f6ff..f13d801599ae 100644 --- a/sc/source/ui/vba/vbaapplication.cxx +++ b/sc/source/ui/vba/vbaapplication.cxx @@ -19,21 +19,23 @@ #include <stdio.h> -#include <com/sun/star/sheet/XSpreadsheetView.hpp> -#include <com/sun/star/sheet/XSpreadsheets.hpp> -#include <com/sun/star/view/XSelectionSupplier.hpp> -#include <com/sun/star/lang/XServiceInfo.hpp> -#include <ooo/vba/excel/XlCalculation.hpp> -#include <com/sun/star/sheet/XCellRangeReferrer.hpp> -#include <com/sun/star/sheet/XCalculatable.hpp> +#include <com/sun/star/frame/XLayoutManager.hpp> #include <com/sun/star/frame/XLayoutManager.hpp> #include <com/sun/star/frame/XDesktop.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> +#include <com/sun/star/sheet/XCalculatable.hpp> +#include <com/sun/star/sheet/XCellRangeAddressable.hpp> +#include <com/sun/star/sheet/XCellRangeReferrer.hpp> +#include <com/sun/star/sheet/XNamedRanges.hpp> +#include <com/sun/star/sheet/XSpreadsheetView.hpp> +#include <com/sun/star/sheet/XSpreadsheets.hpp> #include <com/sun/star/task/XStatusIndicatorSupplier.hpp> #include <com/sun/star/task/XStatusIndicator.hpp> -#include <ooo/vba/excel/XlMousePointer.hpp> -#include <com/sun/star/sheet/XNamedRanges.hpp> -#include <com/sun/star/sheet/XCellRangeAddressable.hpp> +#include <com/sun/star/util/PathSettings.hpp> +#include <com/sun/star/view/XSelectionSupplier.hpp> #include <ooo/vba/XExecutableDialog.hpp> +#include <ooo/vba/excel/XlCalculation.hpp> +#include <ooo/vba/excel/XlMousePointer.hpp> #include "vbaapplication.hxx" #include "vbaworkbooks.hxx" @@ -879,20 +881,19 @@ ScVbaApplication::Calculate() throw( script::BasicErrorException , uno::Runtime xCalculatable->calculateAll(); } -static uno::Reference< beans::XPropertySet > lcl_getPathSettingsService( const uno::Reference< uno::XComponentContext >& xContext ) throw ( uno::RuntimeException ) +static uno::Reference< util::XPathSettings > lcl_getPathSettingsService( const uno::Reference< uno::XComponentContext >& xContext ) throw ( uno::RuntimeException ) { - static uno::Reference< beans::XPropertySet > xPathSettings; + static uno::Reference< util::XPathSettings > xPathSettings; if ( !xPathSettings.is() ) { - uno::Reference< lang::XMultiComponentFactory > xSMgr( xContext->getServiceManager(), uno::UNO_QUERY_THROW ); - xPathSettings.set( xSMgr->createInstanceWithContext( OUString("com.sun.star.util.PathSettings"), xContext ), uno::UNO_QUERY_THROW ); + xPathSettings.set( util::PathSettings::create( xContext ) ); } return xPathSettings; } OUString ScVbaApplication::getOfficePath( const OUString& _sPathType ) throw ( uno::RuntimeException ) { OUString sRetPath; - uno::Reference< beans::XPropertySet > xProps = lcl_getPathSettingsService( mxContext ); + uno::Reference< util::XPathSettings > xProps = lcl_getPathSettingsService( mxContext ); try { OUString sUrl; @@ -914,10 +915,10 @@ OUString ScVbaApplication::getOfficePath( const OUString& _sPathType ) throw ( u void SAL_CALL ScVbaApplication::setDefaultFilePath( const OUString& DefaultFilePath ) throw (uno::RuntimeException) { - uno::Reference< beans::XPropertySet > xProps = lcl_getPathSettingsService( mxContext ); + uno::Reference< util::XPathSettings > xProps = lcl_getPathSettingsService( mxContext ); OUString aURL; osl::FileBase::getFileURLFromSystemPath( DefaultFilePath, aURL ); - xProps->setPropertyValue( OUString("Work"), uno::Any( aURL ) ); + xProps->setWork( aURL ); } OUString SAL_CALL |