diff options
Diffstat (limited to 'framework/source')
-rw-r--r-- | framework/source/dispatch/startmoduledispatcher.cxx | 100 | ||||
-rw-r--r-- | framework/source/helper/mischelper.cxx | 88 | ||||
-rw-r--r-- | framework/source/helper/statusindicatorfactory.cxx | 12 | ||||
-rw-r--r-- | framework/source/loadenv/loadenv.cxx | 16 |
4 files changed, 108 insertions, 108 deletions
diff --git a/framework/source/dispatch/startmoduledispatcher.cxx b/framework/source/dispatch/startmoduledispatcher.cxx index 1f888d7c34b2..40def3f98488 100644 --- a/framework/source/dispatch/startmoduledispatcher.cxx +++ b/framework/source/dispatch/startmoduledispatcher.cxx @@ -28,15 +28,15 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_framework.hxx" -#include <dispatch/startmoduledispatcher.hxx>
-
+#include <dispatch/startmoduledispatcher.hxx> + //_______________________________________________ // my own includes #include <pattern/frame.hxx> #include <threadhelp/readguard.hxx> #include <threadhelp/writeguard.hxx> -#include <classes/framelistanalyzer.hxx>
+#include <classes/framelistanalyzer.hxx> #include <dispatchcommands.h> #include <targets.h> #include <services.h> @@ -92,8 +92,8 @@ StartModuleDispatcher::StartModuleDispatcher(const css::uno::Reference< css::lan const ::rtl::OUString& sTarget) : ThreadHelpBase (&Application::GetSolarMutex() ) , ::cppu::OWeakObject( ) - , m_xSMGR (xSMGR )
- , m_xOwner (xFrame )
+ , m_xSMGR (xSMGR ) + , m_xOwner (xFrame ) , m_sDispatchTarget (sTarget ) , m_lStatusListener (m_aLock.getShareableOslMutex()) { @@ -117,18 +117,18 @@ void SAL_CALL StartModuleDispatcher::dispatchWithNotification(const css::util::U const css::uno::Sequence< css::beans::PropertyValue >& /*lArguments*/, const css::uno::Reference< css::frame::XDispatchResultListener >& xListener ) throw(css::uno::RuntimeException) -{
- ::sal_Int16 nResult = css::frame::DispatchResultState::DONTKNOW;
- if (aURL.Complete.equals (CMD_UNO_SHOWSTARTMODULE))
- {
- nResult = css::frame::DispatchResultState::FAILURE;
- if (implts_isBackingModePossible ())
- {
- if (implts_establishBackingMode ())
+{ + ::sal_Int16 nResult = css::frame::DispatchResultState::DONTKNOW; + if (aURL.Complete.equals (CMD_UNO_SHOWSTARTMODULE)) + { + nResult = css::frame::DispatchResultState::FAILURE; + if (implts_isBackingModePossible ()) + { + if (implts_establishBackingMode ()) nResult = css::frame::DispatchResultState::SUCCESS; - }
- }
-
+ } + } + implts_notifyResultListener(xListener, nResult, css::uno::Any()); } @@ -160,39 +160,39 @@ void SAL_CALL StartModuleDispatcher::removeStatusListener(const css::uno::Refere { } -//-----------------------------------------------
-::sal_Bool StartModuleDispatcher::implts_isBackingModePossible ()
-{
- if ( ! SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::E_SSTARTMODULE))
- return sal_False;
-
+//----------------------------------------------- +::sal_Bool StartModuleDispatcher::implts_isBackingModePossible () +{ + if ( ! SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::E_SSTARTMODULE)) + return sal_False; + // SAFE -> ---------------------------------- ReadGuard aReadLock(m_aLock); css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = m_xSMGR; aReadLock.unlock(); // <- SAFE ---------------------------------- -
- css::uno::Reference< css::frame::XFramesSupplier > xDesktop(
- xSMGR->createInstance(SERVICENAME_DESKTOP), css::uno::UNO_QUERY);
-
- FrameListAnalyzer aCheck(
- xDesktop,
- css::uno::Reference< css::frame::XFrame >(),
- FrameListAnalyzer::E_HELP | FrameListAnalyzer::E_BACKINGCOMPONENT);
-
- ::sal_Bool bIsPossible = sal_False;
- ::sal_Int32 nVisibleFrames = aCheck.m_lOtherVisibleFrames.getLength ();
-
- if (
- ( ! aCheck.m_xBackingComponent.is ()) &&
- ( nVisibleFrames < 1 )
- )
- {
- bIsPossible = sal_True;
- }
-
+ + css::uno::Reference< css::frame::XFramesSupplier > xDesktop( + xSMGR->createInstance(SERVICENAME_DESKTOP), css::uno::UNO_QUERY); + + FrameListAnalyzer aCheck( + xDesktop, + css::uno::Reference< css::frame::XFrame >(), + FrameListAnalyzer::E_HELP | FrameListAnalyzer::E_BACKINGCOMPONENT); + + ::sal_Bool bIsPossible = sal_False; + ::sal_Int32 nVisibleFrames = aCheck.m_lOtherVisibleFrames.getLength (); + + if ( + ( ! aCheck.m_xBackingComponent.is ()) && + ( nVisibleFrames < 1 ) + ) + { + bIsPossible = sal_True; + } + return bIsPossible; -}
+} //----------------------------------------------- ::sal_Bool StartModuleDispatcher::implts_establishBackingMode() @@ -202,16 +202,16 @@ void SAL_CALL StartModuleDispatcher::removeStatusListener(const css::uno::Refere css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = m_xSMGR; aReadLock.unlock(); // <- SAFE ---------------------------------- -
- css::uno::Reference< css::frame::XFrame > xDesktop (xSMGR->createInstance(SERVICENAME_DESKTOP), css::uno::UNO_QUERY);
+ + css::uno::Reference< css::frame::XFrame > xDesktop (xSMGR->createInstance(SERVICENAME_DESKTOP), css::uno::UNO_QUERY); css::uno::Reference< css::frame::XFrame > xFrame = xDesktop->findFrame (SPECIALTARGET_BLANK, 0); - css::uno::Reference< css::awt::XWindow > xContainerWindow = xFrame->getContainerWindow ();
+ css::uno::Reference< css::awt::XWindow > xContainerWindow = xFrame->getContainerWindow (); css::uno::Sequence< css::uno::Any > lArgs(1); - lArgs[0] <<= xContainerWindow;
+ lArgs[0] <<= xContainerWindow; - css::uno::Reference< css::frame::XController > xStartModule(
- xSMGR->createInstanceWithArguments(SERVICENAME_STARTMODULE, lArgs),
+ css::uno::Reference< css::frame::XController > xStartModule( + xSMGR->createInstanceWithArguments(SERVICENAME_STARTMODULE, lArgs), css::uno::UNO_QUERY_THROW); css::uno::Reference< css::awt::XWindow > xComponentWindow(xStartModule, css::uno::UNO_QUERY); @@ -236,6 +236,6 @@ void StartModuleDispatcher::implts_notifyResultListener(const css::uno::Referenc aResult); xListener->dispatchFinished(aEvent); -}
+} } // namespace framework diff --git a/framework/source/helper/mischelper.cxx b/framework/source/helper/mischelper.cxx index 79e03f87293e..801714bafcc1 100644 --- a/framework/source/helper/mischelper.cxx +++ b/framework/source/helper/mischelper.cxx @@ -1,5 +1,5 @@ -/*************************************************************************
- *
+/************************************************************************* + * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * Copyright 2000, 2010 Oracle and/or its affiliates. @@ -23,51 +23,51 @@ * <http://www.openoffice.org/license.html> * for a copy of the LGPLv3 License. * - ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_framework.hxx"
-
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+ ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_framework.hxx" + +#include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/frame/XModuleManager.hpp> #include <com/sun/star/beans/PropertyValue.hpp> -
-#include <tools/debug.hxx>
-#include <comphelper/processfactory.hxx>
-#include <helper/mischelper.hxx>
-#include <services.h>
-
-
-using namespace ::com::sun::star;
+ +#include <tools/debug.hxx> +#include <comphelper/processfactory.hxx> +#include <helper/mischelper.hxx> +#include <services.h> + + +using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::frame; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; -
-namespace framework
-{
-
-uno::Reference< linguistic2::XLanguageGuessing > LanguageGuessingHelper::GetGuesser() const
-{
- if (!m_xLanguageGuesser.is())
- {
- try
- {
- m_xLanguageGuesser = uno::Reference< linguistic2::XLanguageGuessing >(
- m_xServiceManager->createInstance(
- rtl::OUString::createFromAscii( "com.sun.star.linguistic2.LanguageGuessing" ) ),
- uno::UNO_QUERY );
- }
- catch (uno::Exception &r)
- {
- (void) r;
- DBG_ASSERT( 0, "failed to get language guessing component" );
- }
- }
- return m_xLanguageGuesser;
-}
-
+ +namespace framework +{ + +uno::Reference< linguistic2::XLanguageGuessing > LanguageGuessingHelper::GetGuesser() const +{ + if (!m_xLanguageGuesser.is()) + { + try + { + m_xLanguageGuesser = uno::Reference< linguistic2::XLanguageGuessing >( + m_xServiceManager->createInstance( + rtl::OUString::createFromAscii( "com.sun.star.linguistic2.LanguageGuessing" ) ), + uno::UNO_QUERY ); + } + catch (uno::Exception &r) + { + (void) r; + DBG_ASSERT( 0, "failed to get language guessing component" ); + } + } + return m_xLanguageGuesser; +} + ::rtl::OUString RetrieveLabelFromCommand( const ::rtl::OUString& aCmdURL ,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xServiceFactory ,::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _xUICommandLabels @@ -136,7 +136,7 @@ uno::Reference< linguistic2::XLanguageGuessing > LanguageGuessingHelper::GetGues } return aLabel; -}
-
-} // namespace framework
-
+} + +} // namespace framework + diff --git a/framework/source/helper/statusindicatorfactory.cxx b/framework/source/helper/statusindicatorfactory.cxx index ab2c4bce24db..4c0738b9fe85 100644 --- a/framework/source/helper/statusindicatorfactory.cxx +++ b/framework/source/helper/statusindicatorfactory.cxx @@ -435,12 +435,12 @@ void StatusIndicatorFactory::implts_makeParentVisibleIfAllowed() Window* pWindow = VCLUnoHelper::GetWindow(xParentWindow); if ( pWindow ) { - bool bForceFrontAndFocus(false);
- ::comphelper::ConfigurationHelper::readDirectKey(
- xSMGR,
- ::rtl::OUString::createFromAscii("org.openoffice.Office.Common/View"),
- ::rtl::OUString::createFromAscii("NewDocumentHandling"),
- ::rtl::OUString::createFromAscii("ForceFocusAndToFront"),
+ bool bForceFrontAndFocus(false); + ::comphelper::ConfigurationHelper::readDirectKey( + xSMGR, + ::rtl::OUString::createFromAscii("org.openoffice.Office.Common/View"), + ::rtl::OUString::createFromAscii("NewDocumentHandling"), + ::rtl::OUString::createFromAscii("ForceFocusAndToFront"), ::comphelper::ConfigurationHelper::E_READONLY) >>= bForceFrontAndFocus; pWindow->Show(sal_True, bForceFrontAndFocus ? SHOW_FOREGROUNDTASK : 0 ); diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index 1a18c16c49ef..c1d76d6f8985 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -1747,18 +1747,18 @@ void LoadEnv::impl_makeFrameWindowVisible(const css::uno::Reference< css::awt::X Window* pWindow = VCLUnoHelper::GetWindow(xWindow); if ( pWindow ) { - bool bForceFrontAndFocus(false);
- css::uno::Any a = ::comphelper::ConfigurationHelper::readDirectKey(
- xSMGR,
- ::rtl::OUString::createFromAscii("org.openoffice.Office.Common/View"),
- ::rtl::OUString::createFromAscii("NewDocumentHandling"),
- ::rtl::OUString::createFromAscii("ForceFocusAndToFront"),
- ::comphelper::ConfigurationHelper::E_READONLY);
+ bool bForceFrontAndFocus(false); + css::uno::Any a = ::comphelper::ConfigurationHelper::readDirectKey( + xSMGR, + ::rtl::OUString::createFromAscii("org.openoffice.Office.Common/View"), + ::rtl::OUString::createFromAscii("NewDocumentHandling"), + ::rtl::OUString::createFromAscii("ForceFocusAndToFront"), + ::comphelper::ConfigurationHelper::E_READONLY); a >>= bForceFrontAndFocus; pWindow->Show(sal_True, (bForceFrontAndFocus || bForceToFront) ? SHOW_FOREGROUNDTASK : 0 ); } -
+ /* #i19976# We tried to prevent a toFront() call in case the user putted the loading document into the background .. |