summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-10-23 17:43:57 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-10-23 17:44:17 +0200
commit5e9a7f1919663d22cb568b1afdc018ef6be0cc91 (patch)
tree6dea5b2a6c00be1153e35b56f4667e4490831414
parent432c0f491712870b82dcf5dee7b98fa5440bfa1a (diff)
Related fdo#46808: Improve previous commit slightly
Change-Id: Ib4f44f745f7e3e2e1403d905cc16bee4c487b0b4
-rw-r--r--framework/source/services/autorecovery.cxx3
-rw-r--r--framework/source/services/modulemanager.cxx2
-rw-r--r--framework/source/uielement/newmenucontroller.cxx6
-rw-r--r--framework/source/uielement/uicommanddescription.cxx5
4 files changed, 6 insertions, 10 deletions
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index 6fdb5f3145b2..519c5cddf7fa 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -1183,12 +1183,11 @@ void AutoRecovery::implts_specifyAppModuleAndFactory(AutoRecovery::TDocumentInfo
// <- SAFE ----------------------------------
css::uno::Reference< css::frame::XModuleManager2 > xManager = ModuleManager::create( comphelper::getComponentContext(xSMGR) );
- css::uno::Reference< css::container::XNameAccess > xModuleConfig(xManager, css::uno::UNO_QUERY_THROW);
if (rInfo.AppModule.isEmpty())
rInfo.AppModule = xManager->identify(rInfo.Document);
- ::comphelper::SequenceAsHashMap lModuleDescription(xModuleConfig->getByName(rInfo.AppModule));
+ ::comphelper::SequenceAsHashMap lModuleDescription(xManager->getByName(rInfo.AppModule));
lModuleDescription[rtl::OUString(CFG_ENTRY_PROP_EMPTYDOCUMENTURL)] >>= rInfo.FactoryURL;
lModuleDescription[rtl::OUString(CFG_ENTRY_PROP_FACTORYSERVICE)] >>= rInfo.FactoryService;
}
diff --git a/framework/source/services/modulemanager.cxx b/framework/source/services/modulemanager.cxx
index d376766a63b4..df2a40f89cb0 100644
--- a/framework/source/services/modulemanager.cxx
+++ b/framework/source/services/modulemanager.cxx
@@ -67,7 +67,7 @@ ModuleManager::impl_createFactory(
css::uno::Sequence< rtl::OUString >
ModuleManager::impl_getSupportedServiceNames() {
css::uno::Sequence< rtl::OUString > s(1);
- s[0] = DECLARE_ASCII("com.sun.star.frame.ModuleManager");
+ s[0] = "com.sun.star.frame.ModuleManager";
return s;
}
diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx
index 4bb82691d522..bf8dbbf91c43 100644
--- a/framework/source/uielement/newmenucontroller.cxx
+++ b/framework/source/uielement/newmenucontroller.cxx
@@ -42,7 +42,6 @@
#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/frame/ModuleManager.hpp>
-#include <com/sun/star/container/XNameAccess.hpp>
#include <vcl/svapp.hxx>
#include <vcl/i18nhelp.hxx>
@@ -493,12 +492,11 @@ void NewMenuController::impl_setPopupMenu()
m_aModuleIdentifier = xModuleManager->identify( m_xFrame );
m_bModuleIdentified = sal_True;
- Reference< XNameAccess > xNameAccess( xModuleManager, UNO_QUERY );
- if ( !m_aModuleIdentifier.isEmpty() && xNameAccess.is() )
+ if ( !m_aModuleIdentifier.isEmpty() )
{
Sequence< PropertyValue > aSeq;
- if ( xNameAccess->getByName( m_aModuleIdentifier ) >>= aSeq )
+ if ( xModuleManager->getByName( m_aModuleIdentifier ) >>= aSeq )
{
for ( sal_Int32 y = 0; y < aSeq.getLength(); y++ )
{
diff --git a/framework/source/uielement/uicommanddescription.cxx b/framework/source/uielement/uicommanddescription.cxx
index 102f9217a051..232a1ce151e9 100644
--- a/framework/source/uielement/uicommanddescription.cxx
+++ b/framework/source/uielement/uicommanddescription.cxx
@@ -664,15 +664,14 @@ UICommandDescription::~UICommandDescription()
void UICommandDescription::impl_fillElements(const sal_Char* _pName)
{
m_xModuleManager.set( ModuleManager::create( comphelper::getComponentContext(m_xServiceManager) ) );
- Reference< XNameAccess > xNameAccess( m_xModuleManager, UNO_QUERY_THROW );
- Sequence< rtl::OUString > aElementNames = xNameAccess->getElementNames();
+ Sequence< rtl::OUString > aElementNames = m_xModuleManager->getElementNames();
Sequence< PropertyValue > aSeq;
::rtl::OUString aModuleIdentifier;
for ( sal_Int32 i = 0; i < aElementNames.getLength(); i++ )
{
aModuleIdentifier = aElementNames[i];
- if ( xNameAccess->getByName( aModuleIdentifier ) >>= aSeq )
+ if ( m_xModuleManager->getByName( aModuleIdentifier ) >>= aSeq )
{
::rtl::OUString aCommandStr;
for ( sal_Int32 y = 0; y < aSeq.getLength(); y++ )