From 6d5aeece56e0ab33150bdcf8a037cdb004ae2d1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Wed, 22 Nov 2017 15:15:08 +0000 Subject: [PATCH] move preventduplicateinteraction from framework to sfx2 consumer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I1388a88ba20b5cde65cd1d88694775b071a0dff6 Reviewed-on: https://gerrit.libreoffice.org/45099 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- framework/Library_fwe.mk | 1 - sfx2/Library_sfx.mk | 1 + .../inc}/preventduplicateinteraction.hxx | 8 +++----- sfx2/source/appl/appopen.cxx | 6 +++--- .../source/appl}/preventduplicateinteraction.cxx | 6 +++--- solenv/clang-format/blacklist | 4 ++-- 6 files changed, 12 insertions(+), 14 deletions(-) rename {include/framework => sfx2/inc}/preventduplicateinteraction.hxx (98%) rename {framework/source/fwe/interaction => sfx2/source/appl}/preventduplicateinteraction.cxx (98%) diff --git a/framework/Library_fwe.mk b/framework/Library_fwe.mk index 5f70d38eb004..bff052f499ad 100644 --- a/framework/Library_fwe.mk +++ b/framework/Library_fwe.mk @@ -68,7 +68,6 @@ $(eval $(call gb_Library_add_exception_objects,fwe,\ framework/source/fwe/helper/titlehelper \ framework/source/fwe/helper/documentundoguard \ framework/source/fwe/helper/undomanagerhelper \ - framework/source/fwe/interaction/preventduplicateinteraction \ framework/source/fwe/xml/menuconfiguration \ framework/source/fwe/xml/menudocumenthandler \ framework/source/fwe/xml/saxnamespacefilter \ diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk index 3dd3d892ed4c..d721b72438a8 100644 --- a/sfx2/Library_sfx.mk +++ b/sfx2/Library_sfx.mk @@ -115,6 +115,7 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\ sfx2/source/appl/newhelp \ sfx2/source/appl/opengrf \ sfx2/source/appl/openuriexternally \ + sfx2/source/appl/preventduplicateinteraction \ sfx2/source/appl/sfxhelp \ sfx2/source/appl/sfxpicklist \ sfx2/source/appl/shellimpl \ diff --git a/include/framework/preventduplicateinteraction.hxx b/sfx2/inc/preventduplicateinteraction.hxx similarity index 98% rename from include/framework/preventduplicateinteraction.hxx rename to sfx2/inc/preventduplicateinteraction.hxx index ae5bafaaf28a..f7bec486a2cf 100644 --- a/include/framework/preventduplicateinteraction.hxx +++ b/sfx2/inc/preventduplicateinteraction.hxx @@ -20,8 +20,6 @@ #ifndef INCLUDED_FRAMEWORK_PREVENTDUPLICATEINTERACTION_HXX #define INCLUDED_FRAMEWORK_PREVENTDUPLICATEINTERACTION_HXX -#include - #include #include @@ -33,7 +31,7 @@ namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } } -namespace framework{ +namespace sfx2 { /** @short Prevent us from showing the same interaction more than once during @@ -51,7 +49,7 @@ struct ThreadHelpBase2 mutable ::osl::Mutex m_aLock; }; -class FWE_DLLPUBLIC PreventDuplicateInteraction : private ThreadHelpBase2 +class PreventDuplicateInteraction : private ThreadHelpBase2 ,public ::cppu::WeakImplHelper< css::task::XInteractionHandler2 > { @@ -230,7 +228,7 @@ class FWE_DLLPUBLIC PreventDuplicateInteraction : private ThreadHelpBase2 PreventDuplicateInteraction::InteractionInfo* pReturn ) const; }; -} // namespace framework +} // namespace sfx2 #endif // INCLUDED_FRAMEWORK_PREVENTDUPLICATEINTERACTION_HXX diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx index 8e1a16c00f17..0ae86d85f9b4 100644 --- a/sfx2/source/appl/appopen.cxx +++ b/sfx2/source/appl/appopen.cxx @@ -53,7 +53,7 @@ #include #include #include -#include +#include #include #include #include @@ -666,7 +666,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq ) // intercept all incoming interactions and provide useful information // later if the following transaction was finished. - ::framework::PreventDuplicateInteraction* pHandler = new ::framework::PreventDuplicateInteraction(::comphelper::getProcessComponentContext()); + ::sfx2::PreventDuplicateInteraction* pHandler = new ::sfx2::PreventDuplicateInteraction(::comphelper::getProcessComponentContext()); css::uno::Reference< css::task::XInteractionHandler > xHandler (static_cast< css::task::XInteractionHandler* >(pHandler), css::uno::UNO_QUERY); css::uno::Reference< css::task::XInteractionHandler > xWrappedHandler; @@ -685,7 +685,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq ) // define rules for this handler css::uno::Type aInteraction = ::cppu::UnoType::get(); - ::framework::PreventDuplicateInteraction::InteractionInfo aRule (aInteraction, 1); + ::sfx2::PreventDuplicateInteraction::InteractionInfo aRule (aInteraction, 1); pHandler->addInteractionRule(aRule); if (!aDocService.isEmpty()) diff --git a/framework/source/fwe/interaction/preventduplicateinteraction.cxx b/sfx2/source/appl/preventduplicateinteraction.cxx similarity index 98% rename from framework/source/fwe/interaction/preventduplicateinteraction.cxx rename to sfx2/source/appl/preventduplicateinteraction.cxx index 910c0891f077..bf7eeab13a16 100644 --- a/framework/source/fwe/interaction/preventduplicateinteraction.cxx +++ b/sfx2/source/appl/preventduplicateinteraction.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include +#include #include @@ -25,7 +25,7 @@ #include #include -namespace framework{ +namespace sfx2 { PreventDuplicateInteraction::PreventDuplicateInteraction(const css::uno::Reference< css::uno::XComponentContext >& rxContext) : ThreadHelpBase2() @@ -227,6 +227,6 @@ bool PreventDuplicateInteraction::getInteractionInfo(const css::uno::Type& return false; } -} // namespace framework +} // namespace sfx2 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist index 216fb6a6de22..c698185bb47c 100644 --- a/solenv/clang-format/blacklist +++ b/solenv/clang-format/blacklist @@ -5369,7 +5369,6 @@ framework/source/fwe/helper/documentundoguard.cxx framework/source/fwe/helper/propertysetcontainer.cxx framework/source/fwe/helper/titlehelper.cxx framework/source/fwe/helper/undomanagerhelper.cxx -framework/source/fwe/interaction/preventduplicateinteraction.cxx framework/source/fwe/xml/menuconfiguration.cxx framework/source/fwe/xml/menudocumenthandler.cxx framework/source/fwe/xml/saxnamespacefilter.cxx @@ -6522,7 +6521,6 @@ include/framework/fwedllapi.h include/framework/imutex.hxx include/framework/interaction.hxx include/framework/menuconfiguration.hxx -include/framework/preventduplicateinteraction.hxx include/framework/sfxhelperfunctions.hxx include/framework/statusbarconfiguration.hxx include/framework/titlehelper.hxx @@ -12878,6 +12876,7 @@ sfx2/inc/guisaveas.hxx sfx2/inc/inettbc.hxx sfx2/inc/pch/precompiled_sfx.cxx sfx2/inc/pch/precompiled_sfx.hxx +sfx2/inc/preventduplicateinteraction.hxx sfx2/inc/sfxbasecontroller_internal.hxx sfx2/inc/sidebar/ContextChangeBroadcaster.hxx sfx2/inc/sorgitm.hxx @@ -12928,6 +12927,7 @@ sfx2/source/appl/newhelp.hxx sfx2/source/appl/opengrf.cxx sfx2/source/appl/openuriexternally.cxx sfx2/source/appl/panelist.hxx +sfx2/source/appl/preventduplicateinteraction.cxx sfx2/source/appl/sfxhelp.cxx sfx2/source/appl/sfxpicklist.cxx sfx2/source/appl/shellimpl.cxx -- 2.18.1