summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorAriel Constenla-Haile <arielch@apache.org>2013-05-28 10:01:32 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-06-24 11:25:34 +0100
commit57207cab004cb78c3fa6d9ed43cc4bf81f4e6981 (patch)
tree064fa263ec60f38b437df1d93c570e2e787f4173 /svtools
parenta1748501d81425d26d09509eec2fd141f2f28f05 (diff)
Add missing copy&paste of SfxAppToolBoxControl_Impl::Select
(cherry picked from commit 47204c74d9e52f54f6983af19b66af2a96b42e61) Conflicts: framework/inc/uielement/popuptoolbarcontroller.hxx svtools/inc/svtools/toolboxcontroller.hxx Change-Id: I304d17c662450f29eeffb17f576b418986f3fb0a
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/uno/toolboxcontroller.cxx19
1 files changed, 6 insertions, 13 deletions
diff --git a/svtools/source/uno/toolboxcontroller.cxx b/svtools/source/uno/toolboxcontroller.cxx
index f845aedcd094..5a3716283f43 100644
--- a/svtools/source/uno/toolboxcontroller.cxx
+++ b/svtools/source/uno/toolboxcontroller.cxx
@@ -49,16 +49,6 @@ using namespace ::com::sun::star::frame;
namespace svt
{
-struct DispatchInfo
-{
- Reference< XDispatch > mxDispatch;
- const URL maURL;
- const Sequence< PropertyValue > maArgs;
-
- DispatchInfo( const Reference< XDispatch >& xDispatch, const URL& rURL, const Sequence< PropertyValue >& rArgs )
- : mxDispatch( xDispatch ), maURL( rURL ), maArgs( rArgs ) {}
-};
-
ToolboxController::ToolboxController(
const Reference< XComponentContext >& rxContext,
const Reference< XFrame >& xFrame,
@@ -705,7 +695,7 @@ Reference< ::com::sun::star::awt::XWindow > ToolboxController::getParent() const
return m_xParentWindow;
}
-void ToolboxController::dispatchCommand( const OUString& sCommandURL, const Sequence< PropertyValue >& rArgs )
+void ToolboxController::dispatchCommand( const OUString& sCommandURL, const Sequence< PropertyValue >& rArgs, const OUString &sTarget )
{
try
{
@@ -714,9 +704,12 @@ void ToolboxController::dispatchCommand( const OUString& sCommandURL, const Sequ
aURL.Complete = sCommandURL;
getURLTransformer()->parseStrict( aURL );
- Reference< XDispatch > xDispatch( xDispatchProvider->queryDispatch( aURL, OUString(), 0 ), UNO_QUERY_THROW );
+ Reference< XDispatch > xDispatch( xDispatchProvider->queryDispatch( aURL, sTarget, 0 ), UNO_QUERY_THROW );
- Application::PostUserEvent( STATIC_LINK(0, ToolboxController, ExecuteHdl_Impl), new DispatchInfo( xDispatch, aURL, rArgs ) );
+ DispatchInfo *pDispatchInfo = new DispatchInfo( xDispatch, aURL, rArgs );
+ if ( !Application::PostUserEvent( STATIC_LINK(0, ToolboxController, ExecuteHdl_Impl),
+ pDispatchInfo ) )
+ delete pDispatchInfo;
}
catch( Exception& )