summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2017-04-26 03:09:41 +0300
committerMaxim Monastirsky <momonasmon@gmail.com>2017-04-27 08:58:10 +0300
commit32680923221e1eec9020c2a21b51125f735e4a32 (patch)
tree4acf2445ef94244612789e7a418506c6d1e83340 /svtools
parent58daac975bb871f4479948a9f64577c420d66624 (diff)
Fix the copy-paste
Use m_xUrlTransformer, and drop the now unneeded m_xContext.is() check. Here is the history of this: - commit ef8f9cfb262a7 (CWS docking1) introduced this code in ToolboxController::execute. - commit a2bbbc5130b80 (CWS docking3) copy-pasted this into GenericToolbarController::execute. - commit 0fc90c8a064f7 (CWS insight02) changed the original code, but not the copy-pasted one. - commit d7afd8e128177 (CWS toolbars2) That CWS didn't have the above change yet, and copy-pasted the old code to yet another place (GenericToolboxController::execute). Change-Id: I7f4e8dfb52b96ea5285ea7b2bb3083847dd84932
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/uno/generictoolboxcontroller.cxx9
-rw-r--r--svtools/source/uno/toolboxcontroller.cxx2
2 files changed, 3 insertions, 8 deletions
diff --git a/svtools/source/uno/generictoolboxcontroller.cxx b/svtools/source/uno/generictoolboxcontroller.cxx
index dd03972489b1..0ab20dc6a20e 100644
--- a/svtools/source/uno/generictoolboxcontroller.cxx
+++ b/svtools/source/uno/generictoolboxcontroller.cxx
@@ -81,7 +81,6 @@ void SAL_CALL GenericToolboxController::dispose()
void SAL_CALL GenericToolboxController::execute( sal_Int16 /*KeyModifier*/ )
{
Reference< XDispatch > xDispatch;
- Reference< XURLTransformer > xURLTransformer;
OUString aCommandURL;
{
@@ -92,11 +91,8 @@ void SAL_CALL GenericToolboxController::execute( sal_Int16 /*KeyModifier*/ )
if ( m_bInitialized &&
m_xFrame.is() &&
- m_xContext.is() &&
!m_aCommandURL.isEmpty() )
{
- xURLTransformer = URLTransformer::create( m_xContext );
-
aCommandURL = m_aCommandURL;
URLToDispatchMap::iterator pIter = m_aListenerMap.find( m_aCommandURL );
if ( pIter != m_aListenerMap.end() )
@@ -104,13 +100,14 @@ void SAL_CALL GenericToolboxController::execute( sal_Int16 /*KeyModifier*/ )
}
}
- if ( xDispatch.is() && xURLTransformer.is() )
+ if ( xDispatch.is() )
{
css::util::URL aTargetURL;
Sequence<PropertyValue> aArgs;
aTargetURL.Complete = aCommandURL;
- xURLTransformer->parseStrict( aTargetURL );
+ if ( m_xUrlTransformer.is() )
+ m_xUrlTransformer->parseStrict( aTargetURL );
// Execute dispatch asynchronously
ExecuteInfo* pExecuteInfo = new ExecuteInfo;
diff --git a/svtools/source/uno/toolboxcontroller.cxx b/svtools/source/uno/toolboxcontroller.cxx
index 32ce1a781764..4d802f1d7763 100644
--- a/svtools/source/uno/toolboxcontroller.cxx
+++ b/svtools/source/uno/toolboxcontroller.cxx
@@ -324,10 +324,8 @@ void SAL_CALL ToolboxController::execute( sal_Int16 KeyModifier )
if ( m_bInitialized &&
m_xFrame.is() &&
- m_xContext.is() &&
!m_aCommandURL.isEmpty() )
{
-
aCommandURL = m_aCommandURL;
URLToDispatchMap::iterator pIter = m_aListenerMap.find( m_aCommandURL );
if ( pIter != m_aListenerMap.end() )