diff options
author | Michaël Lefèvre <lefevre00@yahoo.fr> | 2015-01-26 14:46:36 +0100 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-01-28 06:21:55 +0000 |
commit | d57cd80479fac60a2486c74257a8840e36935e20 (patch) | |
tree | ba9706755777d84e95de18b35ac559c69edf94fc /sw/source/uibase | |
parent | fe480d8136b204c8dc6c68916cce7e816f8b9c48 (diff) |
tdf#60739 code factorisation
Limit duplciation for SfxRequest SID_OPEN_XML_FILTERSETTINGS in sw shells
Change-Id: I316e7df50df5c6d24feb953415ebf61ca822066d
Reviewed-on: https://gerrit.libreoffice.org/14184
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sw/source/uibase')
-rw-r--r-- | sw/source/uibase/shells/annotsh.cxx | 11 | ||||
-rw-r--r-- | sw/source/uibase/shells/drawsh.cxx | 13 | ||||
-rw-r--r-- | sw/source/uibase/shells/drwtxtex.cxx | 10 | ||||
-rw-r--r-- | sw/source/uibase/shells/frmsh.cxx | 12 | ||||
-rw-r--r-- | sw/source/uibase/shells/textsh1.cxx | 12 |
5 files changed, 5 insertions, 53 deletions
diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx index b41a6070f209..dea94dd5360f 100644 --- a/sw/source/uibase/shells/annotsh.cxx +++ b/sw/source/uibase/shells/annotsh.cxx @@ -116,7 +116,6 @@ #include "misc.hrc" #include <app.hrc> -#include <comphelper/processfactory.hxx> #include <comphelper/string.hxx> #include <cppuhelper/bootstrap.hxx> @@ -462,15 +461,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq ) break; case SID_OPEN_XML_FILTERSETTINGS: { - try - { - uno::Reference < ui::dialogs::XExecutableDialog > xDialog = ui::dialogs::XSLTFilterDialog::create( ::comphelper::getProcessComponentContext() ); - xDialog->execute(); - } - catch (const uno::Exception&) - { - } - rReq.Ignore (); + HandleOpenXmlFilterSettings(rReq); } break; case FN_WORDCOUNT_DIALOG: diff --git a/sw/source/uibase/shells/drawsh.cxx b/sw/source/uibase/shells/drawsh.cxx index 1b98e7bce1b8..056d7ce77469 100644 --- a/sw/source/uibase/shells/drawsh.cxx +++ b/sw/source/uibase/shells/drawsh.cxx @@ -42,9 +42,6 @@ #include <IDocumentStatistics.hxx> #include <tools/diagnose_ex.h> -#include <comphelper/processfactory.hxx> -#include <com/sun/star/ui/dialogs/XSLTFilterDialog.hpp> - #include <svx/svdoashp.hxx> #include <svx/xtable.hxx> #include <sfx2/sidebar/EnumContext.hxx> @@ -325,15 +322,7 @@ void SwDrawShell::Execute(SfxRequest &rReq) break; case SID_OPEN_XML_FILTERSETTINGS: { - try - { - uno::Reference < ui::dialogs::XExecutableDialog > xDialog = ui::dialogs::XSLTFilterDialog::create( ::comphelper::getProcessComponentContext() ); - xDialog->execute(); - } - catch (const uno::Exception&) - { - } - rReq.Ignore (); + HandleOpenXmlFilterSettings(rReq); } break; case FN_WORDCOUNT_DIALOG: diff --git a/sw/source/uibase/shells/drwtxtex.cxx b/sw/source/uibase/shells/drwtxtex.cxx index eb1b039f79ab..f31006202ee8 100644 --- a/sw/source/uibase/shells/drwtxtex.cxx +++ b/sw/source/uibase/shells/drwtxtex.cxx @@ -400,15 +400,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) break; case SID_OPEN_XML_FILTERSETTINGS: { - try - { - uno::Reference < ui::dialogs::XExecutableDialog > xDialog = ui::dialogs::XSLTFilterDialog::create( ::comphelper::getProcessComponentContext() ); - xDialog->execute(); - } - catch (const uno::Exception&) - { - } - rReq.Ignore (); + HandleOpenXmlFilterSettings(rReq); } break; case FN_WORDCOUNT_DIALOG: diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx index cc6a8c805c61..6fdce9f151b1 100644 --- a/sw/source/uibase/shells/frmsh.cxx +++ b/sw/source/uibase/shells/frmsh.cxx @@ -67,8 +67,6 @@ #include <swwait.hxx> #include <docstat.hxx> #include <IDocumentStatistics.hxx> -#include <comphelper/processfactory.hxx> -#include <com/sun/star/ui/dialogs/XSLTFilterDialog.hpp> #include <helpid.h> #include <cmdid.h> @@ -263,15 +261,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) } case SID_OPEN_XML_FILTERSETTINGS: { - try - { - uno::Reference < ui::dialogs::XExecutableDialog > xDialog = ui::dialogs::XSLTFilterDialog::create(::comphelper::getProcessComponentContext()); - xDialog->execute(); - } - catch (const uno::Exception&) - { - } - rReq.Ignore (); + HandleOpenXmlFilterSettings(rReq); } break; case FN_WORDCOUNT_DIALOG: diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index 970fad9f7658..30af9289b1e8 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -18,9 +18,7 @@ */ #include <com/sun/star/i18n/WordType.hpp> -#include <com/sun/star/ui/dialogs/XSLTFilterDialog.hpp> -#include <comphelper/processfactory.hxx> #include <hintids.hxx> #include <cmdid.h> #include <helpid.h> @@ -1321,15 +1319,7 @@ void SwTextShell::Execute(SfxRequest &rReq) break; case SID_OPEN_XML_FILTERSETTINGS: { - try - { - uno::Reference < ui::dialogs::XExecutableDialog > xDialog = ui::dialogs::XSLTFilterDialog::create( ::comphelper::getProcessComponentContext() ); - xDialog->execute(); - } - catch (const uno::Exception&) - { - } - rReq.Ignore (); + HandleOpenXmlFilterSettings(rReq); } break; case FN_FORMAT_APPLY_HEAD1: |