diff options
author | Noel Grandin <noel@peralex.com> | 2013-04-23 13:55:25 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-04-25 08:56:38 +0200 |
commit | 73adc9b6e29a3e005d7c2e98795045e7025325c2 (patch) | |
tree | 56eefce782329c17267a6f8d676c5e8e3238829a /dbaccess | |
parent | 4bc3ead0649bf2885050ec4cfb47a5ed13bfa41e (diff) |
fdo#46808, Convert form::ControlFontDialog to new style
Change-Id: I83487cddbd6b3fce1fdcdfa48623b63a0e026d90
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/browser/sbagrid.cxx | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx index 973aeca2602f..745d243c4fdb 100644 --- a/dbaccess/source/ui/browser/sbagrid.cxx +++ b/dbaccess/source/ui/browser/sbagrid.cxx @@ -30,6 +30,7 @@ #include "dlgattr.hxx" #include "dlgsize.hxx" #include <com/sun/star/form/XLoadable.hpp> +#include <com/sun/star/form/ControlFontDialog.hpp> #include <com/sun/star/sdb/CommandType.hpp> #include <com/sun/star/sdb/XSQLQueryComposerFactory.hpp> #include <com/sun/star/sdb/XResultSetAccess.hpp> @@ -952,24 +953,9 @@ void SbaGridControl::SetBrowserAttrs() try { - PropertyValue aArg; - aArg.Name = OUString("IntrospectedObject"); - aArg.Value <<= xGridModel; - Sequence< Any > aDialogArgs(1); - aDialogArgs[0] <<= aArg; - Reference< XComponentContext > xContext = getContext(); - Reference< XInterface > xDialog = xContext->getServiceManager()->createInstanceWithArgumentsAndContext("com.sun.star.form.ControlFontDialog", aDialogArgs, xContext); - if (!xDialog.is()) - { - ShowServiceNotAvailableError(this, OUString("com.sun.star.form.ControlFontDialog"), sal_True); - return; - } - - Reference< XExecutableDialog > xExecute(xDialog, UNO_QUERY); - OSL_ENSURE(xExecute.is(), "SbaGridControl::SetBrowserAttrs: missing an interface on the dialog!"); - if (xExecute.is()) - xExecute->execute(); + Reference< XExecutableDialog > xExecute = ControlFontDialog::createWithGridModel( xContext, xGridModel); + xExecute->execute(); } catch( const Exception& ) { |