summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-03-07 15:41:12 +0200
committerNoel Grandin <noel@peralex.com>2013-03-20 07:32:48 +0200
commit8d83827d94266a08e999047151d6cd691acc6e46 (patch)
treeca1ce320bb8fcb21cd8c095f7ea8b68ae5a50b9b
parent524cedbd307e73badd3c6e64ae290922c75fd2dd (diff)
fdo#46808, Convert XSLTFilterDialog to new-style
Also fixup servicename. Change-Id: I1ee6d4849a83fdd4f43bf266ef4d282b22b65f6e
-rw-r--r--filter/source/xsltdialog/xmlfilterdialogcomponent.cxx6
-rw-r--r--filter/source/xsltdialog/xsltdlg.component4
-rw-r--r--offapi/UnoApi_offapi.mk1
-rw-r--r--offapi/com/sun/star/ui/dialogs/XSLTFilterDialog.idl38
-rw-r--r--sc/source/ui/app/scmod.cxx12
-rw-r--r--sd/source/ui/view/drviewsb.cxx11
-rw-r--r--sw/source/ui/shells/annotsh.cxx11
-rw-r--r--sw/source/ui/shells/drawsh.cxx11
-rw-r--r--sw/source/ui/shells/drwtxtex.cxx11
-rw-r--r--sw/source/ui/shells/frmsh.cxx11
-rw-r--r--sw/source/ui/shells/textsh1.cxx11
11 files changed, 79 insertions, 48 deletions
diff --git a/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx b/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx
index 79f6a6a0442f..ee3c9c0ca69d 100644
--- a/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx
+++ b/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx
@@ -190,15 +190,15 @@ void SAL_CALL XMLFilterDialogComponent::release() throw ()
OUString XMLFilterDialogComponent_getImplementationName() throw ( RuntimeException )
{
- return OUString( "XMLFilterDialogComponent" );
+ return OUString( "com.sun.star.comp.ui.XSLTFilterDialog" );
}
//-------------------------------------------------------------------------
Sequence< OUString > SAL_CALL XMLFilterDialogComponent_getSupportedServiceNames() throw ( RuntimeException )
{
- OUString aServiceName( "com.sun.star.comp.ui.XSLTFilterDialog" );
- Sequence< ::rtl::OUString > aSupported( &aServiceName, 1 );
+ Sequence< OUString > aSupported(1);
+ aSupported[0] = OUString( "com.sun.star.ui.dialogs.XSLTFilterDialog" );
return aSupported;
}
diff --git a/filter/source/xsltdialog/xsltdlg.component b/filter/source/xsltdialog/xsltdlg.component
index 5f90ceb23218..93144a99552c 100644
--- a/filter/source/xsltdialog/xsltdlg.component
+++ b/filter/source/xsltdialog/xsltdlg.component
@@ -19,7 +19,7 @@
<component loader="com.sun.star.loader.SharedLibrary" prefix="xsltdlg"
xmlns="http://openoffice.org/2010/uno-components">
- <implementation name="XMLFilterDialogComponent">
- <service name="com.sun.star.comp.ui.XSLTFilterDialog"/>
+ <implementation name="com.sun.star.comp.ui.XSLTFilterDialog">
+ <service name="com.sun.star.ui.dialogs.XSLTFilterDialog"/>
</implementation>
</component>
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 7197b34ff476..a88e7d70da13 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -366,6 +366,7 @@ $(eval $(call gb_ZipUnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/ui/dial
FilePicker \
FolderPicker \
Wizard \
+ XSLTFilterDialog \
))
$(eval $(call gb_ZipUnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/util,\
JobManager \
diff --git a/offapi/com/sun/star/ui/dialogs/XSLTFilterDialog.idl b/offapi/com/sun/star/ui/dialogs/XSLTFilterDialog.idl
new file mode 100644
index 000000000000..7eea2ebd7639
--- /dev/null
+++ b/offapi/com/sun/star/ui/dialogs/XSLTFilterDialog.idl
@@ -0,0 +1,38 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef __com_sun_star_ui_dialogs_XSLTFilterDialog_idl__
+#define __com_sun_star_ui_dialogs_XSLTFilterDialog_idl__
+
+#include <com/sun/star/ui/dialogs/XExecutableDialog.idl>
+
+
+module com { module sun { module star { module ui { module dialogs {
+
+/**
+ @since LibreOffice 4.1
+*/
+published service XSLTFilterDialog : XExecutableDialog;
+
+
+}; }; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 2951c569a161..a177050668d6 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
+#include <com/sun/star/ui/dialogs/XSLTFilterDialog.hpp>
#include <comphelper/processfactory.hxx>
#include "scitems.hxx"
@@ -57,7 +57,7 @@
#include <svl/inethist.hxx>
#include <vcl/waitobj.hxx>
#include <svx/svxerr.hxx>
-
+#include <tools/diagnose_ex.h>
#include "scmod.hxx"
@@ -550,14 +550,12 @@ void ScModule::Execute( SfxRequest& rReq )
{
try
{
- com::sun::star::uno::Reference < ::com::sun::star::ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString("com.sun.star.comp.ui.XSLTFilterDialog")), com::sun::star::uno::UNO_QUERY);
- if( xDialog.is() )
- {
- xDialog->execute();
- }
+ css::uno::Reference < css::ui::dialogs::XExecutableDialog > xDialog = css::ui::dialogs::XSLTFilterDialog::create( ::comphelper::getProcessComponentContext());
+ xDialog->execute();
}
catch( ::com::sun::star::uno::RuntimeException& )
{
+ DBG_UNHANDLED_EXCEPTION();
}
}
break;
diff --git a/sd/source/ui/view/drviewsb.cxx b/sd/source/ui/view/drviewsb.cxx
index 850c4432e608..72923b6b2593 100644
--- a/sd/source/ui/view/drviewsb.cxx
+++ b/sd/source/ui/view/drviewsb.cxx
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
+#include <com/sun/star/ui/dialogs/XSLTFilterDialog.hpp>
#include <comphelper/processfactory.hxx>
#include <svx/svdlayer.hxx>
#include <svx/svxids.hrc>
@@ -37,6 +37,7 @@
#include <svx/svxdlg.hxx>
#include <svx/dialogs.hrc>
#include <unotools/useroptions.hxx>
+#include <tools/diagnose_ex.h>
#include "app.hrc"
#include "strings.hrc"
@@ -678,14 +679,12 @@ void DrawViewShell::FuTemp02(SfxRequest& rReq)
{
try
{
- com::sun::star::uno::Reference < ::com::sun::star::ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance("com.sun.star.comp.ui.XSLTFilterDialog"), com::sun::star::uno::UNO_QUERY);
- if( xDialog.is() )
- {
- xDialog->execute();
- }
+ css::uno::Reference < css::ui::dialogs::XExecutableDialog > xDialog = css::ui::dialogs::XSLTFilterDialog::create( ::comphelper::getProcessComponentContext() );
+ xDialog->execute();
}
catch( ::com::sun::star::uno::RuntimeException& )
{
+ DBG_UNHANDLED_EXCEPTION();
}
Cancel();
diff --git a/sw/source/ui/shells/annotsh.cxx b/sw/source/ui/shells/annotsh.cxx
index a05b9eff04d7..258f746f54f1 100644
--- a/sw/source/ui/shells/annotsh.cxx
+++ b/sw/source/ui/shells/annotsh.cxx
@@ -23,7 +23,7 @@
#include <com/sun/star/i18n/TransliterationModules.hpp>
#include <com/sun/star/i18n/TransliterationModulesExtra.hpp>
#include <com/sun/star/i18n/TextConversionOption.hpp>
-#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
+#include <com/sun/star/ui/dialogs/XSLTFilterDialog.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <tools/shl.hxx>
@@ -121,6 +121,7 @@
#include <langhelper.hxx>
#include <wordcountdialog.hxx>
+#include <tools/diagnose_ex.h>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -387,14 +388,12 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
{
try
{
- uno::Reference < ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString("com.sun.star.comp.ui.XSLTFilterDialog")), uno::UNO_QUERY);
- if( xDialog.is() )
- {
- xDialog->execute();
- }
+ uno::Reference < ui::dialogs::XExecutableDialog > xDialog = ui::dialogs::XSLTFilterDialog::create( ::comphelper::getProcessComponentContext() );
+ xDialog->execute();
}
catch (const uno::Exception&)
{
+ DBG_UNHANDLED_EXCEPTION();
}
rReq.Ignore ();
}
diff --git a/sw/source/ui/shells/drawsh.cxx b/sw/source/ui/shells/drawsh.cxx
index 7f76454fe223..a47eba8ab026 100644
--- a/sw/source/ui/shells/drawsh.cxx
+++ b/sw/source/ui/shells/drawsh.cxx
@@ -37,9 +37,10 @@
#include <swwait.hxx>
#include <docstat.hxx>
#include <IDocumentStatistics.hxx>
+#include <tools/diagnose_ex.h>
#include <comphelper/processfactory.hxx>
-#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
+#include <com/sun/star/ui/dialogs/XSLTFilterDialog.hpp>
#include <svx/xtable.hxx>
@@ -206,14 +207,12 @@ void SwDrawShell::Execute(SfxRequest &rReq)
{
try
{
- uno::Reference < ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString("com.sun.star.comp.ui.XSLTFilterDialog")), uno::UNO_QUERY);
- if( xDialog.is() )
- {
- xDialog->execute();
- }
+ uno::Reference < ui::dialogs::XExecutableDialog > xDialog = ui::dialogs::XSLTFilterDialog::create( ::comphelper::getProcessComponentContext() );
+ xDialog->execute();
}
catch (const uno::Exception&)
{
+ DBG_UNHANDLED_EXCEPTION();
}
rReq.Ignore ();
}
diff --git a/sw/source/ui/shells/drwtxtex.cxx b/sw/source/ui/shells/drwtxtex.cxx
index 59b34c638b20..90cd5db13de5 100644
--- a/sw/source/ui/shells/drwtxtex.cxx
+++ b/sw/source/ui/shells/drwtxtex.cxx
@@ -18,7 +18,7 @@
*/
-#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
+#include <com/sun/star/ui/dialogs/XSLTFilterDialog.hpp>
#include <comphelper/processfactory.hxx>
#include <comphelper/string.hxx>
@@ -71,6 +71,7 @@
#include <editeng/editview.hxx>
#include <vcl/outdev.hxx>
#include <editeng/hyphenzoneitem.hxx>
+#include <tools/diagnose_ex.h>
#include <cmdid.h>
#include <doc.hxx>
@@ -326,14 +327,12 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
{
try
{
- uno::Reference < ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString("com.sun.star.comp.ui.XSLTFilterDialog")), uno::UNO_QUERY);
- if( xDialog.is() )
- {
- xDialog->execute();
- }
+ uno::Reference < ui::dialogs::XExecutableDialog > xDialog = ui::dialogs::XSLTFilterDialog::create( ::comphelper::getProcessComponentContext() );
+ xDialog->execute();
}
catch (const uno::Exception&)
{
+ DBG_UNHANDLED_EXCEPTION();
}
rReq.Ignore ();
}
diff --git a/sw/source/ui/shells/frmsh.cxx b/sw/source/ui/shells/frmsh.cxx
index 8f7f34f88585..f8725d6caec8 100644
--- a/sw/source/ui/shells/frmsh.cxx
+++ b/sw/source/ui/shells/frmsh.cxx
@@ -39,6 +39,7 @@
// #i73249#
#include <svx/svdview.hxx>
#include <vcl/msgbox.hxx>
+#include <tools/diagnose_ex.h>
#include <doc.hxx>
#include <fmturl.hxx>
@@ -62,7 +63,7 @@
#include <IDocumentStatistics.hxx>
#include <comphelper/processfactory.hxx>
-#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
+#include <com/sun/star/ui/dialogs/XSLTFilterDialog.hpp>
#include <helpid.h>
#include <cmdid.h>
@@ -252,14 +253,12 @@ void SwFrameShell::Execute(SfxRequest &rReq)
{
try
{
- uno::Reference < ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString("com.sun.star.comp.ui.XSLTFilterDialog")), uno::UNO_QUERY);
- if( xDialog.is() )
- {
- xDialog->execute();
- }
+ uno::Reference < ui::dialogs::XExecutableDialog > xDialog = ui::dialogs::XSLTFilterDialog::create(::comphelper::getProcessComponentContext());
+ xDialog->execute();
}
catch (const uno::Exception&)
{
+ DBG_UNHANDLED_EXCEPTION();
}
rReq.Ignore ();
}
diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx
index cb2f82e66a5d..01cb63599e6a 100644
--- a/sw/source/ui/shells/textsh1.cxx
+++ b/sw/source/ui/shells/textsh1.cxx
@@ -19,7 +19,7 @@
#include <com/sun/star/i18n/WordType.hpp>
-#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
+#include <com/sun/star/ui/dialogs/XSLTFilterDialog.hpp>
#include <comphelper/processfactory.hxx>
#include <hintids.hxx>
@@ -114,6 +114,7 @@
#include <langhelper.hxx>
#include <uiitems.hxx>
#include <wordcountdialog.hxx>
+#include <tools/diagnose_ex.h>
using namespace ::com::sun::star;
@@ -1244,14 +1245,12 @@ void SwTextShell::Execute(SfxRequest &rReq)
{
try
{
- uno::Reference < ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString("com.sun.star.comp.ui.XSLTFilterDialog")), uno::UNO_QUERY);
- if( xDialog.is() )
- {
- xDialog->execute();
- }
+ uno::Reference < ui::dialogs::XExecutableDialog > xDialog = ui::dialogs::XSLTFilterDialog::create( ::comphelper::getProcessComponentContext() );
+ xDialog->execute();
}
catch (const uno::Exception&)
{
+ DBG_UNHANDLED_EXCEPTION();
}
rReq.Ignore ();
}