summaryrefslogtreecommitdiff
path: root/framework
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 /framework
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 'framework')
-rw-r--r--framework/source/uielement/generictoolbarcontroller.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/framework/source/uielement/generictoolbarcontroller.cxx b/framework/source/uielement/generictoolbarcontroller.cxx
index 2cb2541c6c89..12f6d4f3558a 100644
--- a/framework/source/uielement/generictoolbarcontroller.cxx
+++ b/framework/source/uielement/generictoolbarcontroller.cxx
@@ -123,7 +123,6 @@ void SAL_CALL GenericToolbarController::dispose()
void SAL_CALL GenericToolbarController::execute( sal_Int16 KeyModifier )
{
Reference< XDispatch > xDispatch;
- Reference< XURLTransformer > xURLTransformer;
OUString aCommandURL;
{
@@ -136,8 +135,6 @@ void SAL_CALL GenericToolbarController::execute( sal_Int16 KeyModifier )
m_xFrame.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() )
@@ -145,7 +142,7 @@ void SAL_CALL GenericToolbarController::execute( sal_Int16 KeyModifier )
}
}
- if ( xDispatch.is() && xURLTransformer.is() )
+ if ( xDispatch.is() )
{
css::util::URL aTargetURL;
Sequence<PropertyValue> aArgs( 1 );
@@ -155,7 +152,8 @@ void SAL_CALL GenericToolbarController::execute( sal_Int16 KeyModifier )
aArgs[0].Value <<= KeyModifier;
aTargetURL.Complete = aCommandURL;
- xURLTransformer->parseStrict( aTargetURL );
+ if ( m_xUrlTransformer.is() )
+ m_xUrlTransformer->parseStrict( aTargetURL );
// Execute dispatch asynchronously
ExecuteInfo* pExecuteInfo = new ExecuteInfo;