summaryrefslogtreecommitdiff
path: root/framework/source/uifactory
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-07-09 20:37:31 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-07-12 18:56:49 +0200
commit5a72bbd483ddf6c7cc949a8708d1697654cc9ce2 (patch)
treebcdfc372cbcc82fe65c50617b8568427cae71e8e /framework/source/uifactory
parentd976efde8c6398ceb234a3b50541ceba21959aa7 (diff)
allow also to use non-frame modules for sidebar
One more step away from using the frame as key and moving to the controller. Change-Id: I438b7eea2161d49a6f2cbf649bf01b8a2e233ebd
Diffstat (limited to 'framework/source/uifactory')
-rw-r--r--framework/source/uifactory/uielementfactorymanager.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/framework/source/uifactory/uielementfactorymanager.cxx b/framework/source/uifactory/uielementfactorymanager.cxx
index d2b66452bd47..39483ee956f3 100644
--- a/framework/source/uifactory/uielementfactorymanager.cxx
+++ b/framework/source/uifactory/uielementfactorymanager.cxx
@@ -427,6 +427,7 @@ Reference< XUIElement > SAL_CALL UIElementFactoryManager::createUIElement(
throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception )
{
Reference< XFrame > xFrame;
+ OUString aModuleId;
{ // SAFE
osl::MutexGuard g(rBHelper.rMutex);
@@ -443,6 +444,8 @@ throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::l
{
if ( Args[i].Name == "Frame")
Args[i].Value >>= xFrame;
+ if (Args[i].Name == "Module")
+ Args[i].Value >>= aModuleId;
}
} // SAFE
@@ -451,8 +454,7 @@ throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::l
// Determine the module identifier
try
{
- OUString aModuleId;
- if ( xFrame.is() && xManager.is() )
+ if ( aModuleId.isEmpty() && xFrame.is() && xManager.is() )
aModuleId = xManager->identify( Reference<XInterface>( xFrame, UNO_QUERY ) );
Reference< XUIElementFactory > xUIElementFactory = getFactory( ResourceURL, aModuleId );