diff options
author | Noel Grandin <noel@peralex.com> | 2013-02-06 15:22:34 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-02-12 10:14:46 +0200 |
commit | 4d23fcf0c0444aaa8b3d6ad99f0d741a80a2a247 (patch) | |
tree | 4b0d31a3f4cdeb359013c4f1e3595b5037bb4788 /svtools/source/dialogs/colrdlg.cxx | |
parent | 36d0933b6689c31abe65c1fdfa10d18e22d1e958 (diff) |
fdo#46808, Adapt cui::ColorPicker UNO service to new style
The service already existed, it just did not have an IDL file
Change-Id: I7a43b3f8c1299afde3a613dc7ec1c522c4b7a057
Diffstat (limited to 'svtools/source/dialogs/colrdlg.cxx')
-rw-r--r-- | svtools/source/dialogs/colrdlg.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/svtools/source/dialogs/colrdlg.cxx b/svtools/source/dialogs/colrdlg.cxx index 96ee20af5198..0b7cfbcd78a0 100644 --- a/svtools/source/dialogs/colrdlg.cxx +++ b/svtools/source/dialogs/colrdlg.cxx @@ -22,6 +22,7 @@ #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/beans/XPropertyAccess.hpp> #include <com/sun/star/ui/dialogs/XExecutableDialog.hpp> +#include <com/sun/star/cui/ColorPicker.hpp> #include <comphelper/processfactory.hxx> @@ -76,14 +77,11 @@ short SvColorDialog::Execute() try { const OUString sColor( RTL_CONSTASCII_USTRINGPARAM( "Color" ) ); - Reference< XMultiServiceFactory > xSMGR( ::comphelper::getProcessServiceFactory(), UNO_QUERY_THROW ); + Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); Reference< com::sun::star::awt::XWindow > xParent( VCLUnoHelper::GetInterface( mpParent ) ); - Sequence< Any > args(1); - args[0] = Any( xParent ); - - Reference< XExecutableDialog > xDialog( xSMGR->createInstanceWithArguments(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.cui.ColorPicker")), args), UNO_QUERY_THROW ); + Reference< XExecutableDialog > xDialog = com::sun::star::cui::ColorPicker::createWithParent(xContext, xParent); Reference< XPropertyAccess > xPropertyAccess( xDialog, UNO_QUERY_THROW ); Sequence< PropertyValue > props( 2 ); |