fdo#46808, Adapt ModuleUIConfigurationManagerSupplier UNO service to new style
Change-Id: I58b17349474b974edd24aa17ec08ffa848a92ae9
This commit is contained in:
parent
a297372210
commit
10362695c2
@ -54,7 +54,7 @@
|
|||||||
#include <com/sun/star/frame/XController.hpp>
|
#include <com/sun/star/frame/XController.hpp>
|
||||||
#include <com/sun/star/frame/XModel.hpp>
|
#include <com/sun/star/frame/XModel.hpp>
|
||||||
#include <com/sun/star/form/XReset.hpp>
|
#include <com/sun/star/form/XReset.hpp>
|
||||||
#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
|
#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
|
||||||
#include <com/sun/star/frame/XModuleManager.hpp>
|
#include <com/sun/star/frame/XModuleManager.hpp>
|
||||||
|
|
||||||
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
|
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
|
||||||
@ -67,6 +67,7 @@
|
|||||||
|
|
||||||
//-----------------------------------------------
|
//-----------------------------------------------
|
||||||
// include other projects
|
// include other projects
|
||||||
|
#include <comphelper/componentcontext.hxx>
|
||||||
#include <comphelper/processfactory.hxx>
|
#include <comphelper/processfactory.hxx>
|
||||||
#include <svtools/acceleratorexecute.hxx>
|
#include <svtools/acceleratorexecute.hxx>
|
||||||
#include <svtools/svlbitm.hxx>
|
#include <svtools/svlbitm.hxx>
|
||||||
@ -93,7 +94,6 @@ static ::rtl::OUString SERVICE_UICONFIGMGR (RTL_CONSTASCII_USTRINGP
|
|||||||
static ::rtl::OUString SERVICE_DESKTOP (RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop" ));
|
static ::rtl::OUString SERVICE_DESKTOP (RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop" ));
|
||||||
static ::rtl::OUString SERVICE_MODULEMANAGER (RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.ModuleManager" ));
|
static ::rtl::OUString SERVICE_MODULEMANAGER (RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.ModuleManager" ));
|
||||||
static ::rtl::OUString SERVICE_GLOBALACCCFG (RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.GlobalAcceleratorConfiguration" ));
|
static ::rtl::OUString SERVICE_GLOBALACCCFG (RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.GlobalAcceleratorConfiguration" ));
|
||||||
static ::rtl::OUString SERVICE_MODULEUICONFIGSUPPLIER (RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.ModuleUIConfigurationManagerSupplier"));
|
|
||||||
static ::rtl::OUString SERVICE_UICMDDESCRIPTION (RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.UICommandDescription" ));
|
static ::rtl::OUString SERVICE_UICMDDESCRIPTION (RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.UICommandDescription" ));
|
||||||
|
|
||||||
static ::rtl::OUString MODULEPROP_SHORTNAME (RTL_CONSTASCII_USTRINGPARAM("ooSetupFactoryShortName" ));
|
static ::rtl::OUString MODULEPROP_SHORTNAME (RTL_CONSTASCII_USTRINGPARAM("ooSetupFactoryShortName" ));
|
||||||
@ -877,7 +877,8 @@ void SfxAcceleratorConfigPage::InitAccCfg()
|
|||||||
m_xGlobal = css::uno::Reference< css::ui::XAcceleratorConfiguration >(m_xSMGR->createInstance(SERVICE_GLOBALACCCFG), css::uno::UNO_QUERY_THROW);
|
m_xGlobal = css::uno::Reference< css::ui::XAcceleratorConfiguration >(m_xSMGR->createInstance(SERVICE_GLOBALACCCFG), css::uno::UNO_QUERY_THROW);
|
||||||
|
|
||||||
// get module accelerator configuration
|
// get module accelerator configuration
|
||||||
css::uno::Reference< css::ui::XModuleUIConfigurationManagerSupplier > xModuleCfgSupplier(m_xSMGR->createInstance(SERVICE_MODULEUICONFIGSUPPLIER), css::uno::UNO_QUERY_THROW);
|
|
||||||
|
css::uno::Reference< css::ui::XModuleUIConfigurationManagerSupplier > xModuleCfgSupplier(css::ui::ModuleUIConfigurationManagerSupplier::create(comphelper::ComponentContext(m_xSMGR).getUNOContext()));
|
||||||
css::uno::Reference< css::ui::XUIConfigurationManager > xUICfgManager = xModuleCfgSupplier->getUIConfigurationManager(m_sModuleLongName);
|
css::uno::Reference< css::ui::XUIConfigurationManager > xUICfgManager = xModuleCfgSupplier->getUIConfigurationManager(m_sModuleLongName);
|
||||||
m_xModule = css::uno::Reference< css::ui::XAcceleratorConfiguration >(xUICfgManager->getShortCutManager(), css::uno::UNO_QUERY_THROW);
|
m_xModule = css::uno::Reference< css::ui::XAcceleratorConfiguration >(xUICfgManager->getShortCutManager(), css::uno::UNO_QUERY_THROW);
|
||||||
}
|
}
|
||||||
|
@ -62,12 +62,13 @@
|
|||||||
#include "eventdlg.hxx"
|
#include "eventdlg.hxx"
|
||||||
#include <dialmgr.hxx>
|
#include <dialmgr.hxx>
|
||||||
|
|
||||||
|
#include <comphelper/componentcontext.hxx>
|
||||||
#include <comphelper/documentinfo.hxx>
|
#include <comphelper/documentinfo.hxx>
|
||||||
#include <comphelper/processfactory.hxx>
|
#include <comphelper/processfactory.hxx>
|
||||||
#include <unotools/configmgr.hxx>
|
#include <unotools/configmgr.hxx>
|
||||||
#include <com/sun/star/ui/ItemType.hpp>
|
#include <com/sun/star/ui/ItemType.hpp>
|
||||||
#include <com/sun/star/ui/ItemStyle.hpp>
|
#include <com/sun/star/ui/ItemStyle.hpp>
|
||||||
#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
|
#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
|
||||||
#include <com/sun/star/frame/XController.hpp>
|
#include <com/sun/star/frame/XController.hpp>
|
||||||
#include <com/sun/star/frame/XDesktop.hpp>
|
#include <com/sun/star/frame/XDesktop.hpp>
|
||||||
#include <com/sun/star/ui/XUIConfiguration.hpp>
|
#include <com/sun/star/ui/XUIConfiguration.hpp>
|
||||||
@ -1688,9 +1689,7 @@ void SvxConfigPage::Reset( const SfxItemSet& )
|
|||||||
}
|
}
|
||||||
|
|
||||||
uno::Reference< css::ui::XModuleUIConfigurationManagerSupplier >
|
uno::Reference< css::ui::XModuleUIConfigurationManagerSupplier >
|
||||||
xModuleCfgSupplier( xServiceManager->createInstance(
|
xModuleCfgSupplier( css::ui::ModuleUIConfigurationManagerSupplier::create(comphelper::ComponentContext(xServiceManager).getUNOContext()) );
|
||||||
OUString( "com.sun.star.ui.ModuleUIConfigurationManagerSupplier" )),
|
|
||||||
uno::UNO_QUERY );
|
|
||||||
|
|
||||||
// Set up data for module specific menus
|
// Set up data for module specific menus
|
||||||
SaveInData* pModuleData = NULL;
|
SaveInData* pModuleData = NULL;
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include "dbu_app.hrc"
|
#include "dbu_app.hrc"
|
||||||
#include "AppView.hxx"
|
#include "AppView.hxx"
|
||||||
#include <com/sun/star/ui/XUIConfigurationManager.hpp>
|
#include <com/sun/star/ui/XUIConfigurationManager.hpp>
|
||||||
#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
|
#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
|
||||||
#include <com/sun/star/ui/XImageManager.hpp>
|
#include <com/sun/star/ui/XImageManager.hpp>
|
||||||
#include <com/sun/star/ui/ImageType.hpp>
|
#include <com/sun/star/ui/ImageType.hpp>
|
||||||
#include <com/sun/star/sdbcx/XViewsSupplier.hpp>
|
#include <com/sun/star/sdbcx/XViewsSupplier.hpp>
|
||||||
@ -43,6 +43,7 @@
|
|||||||
#include "dbtreelistbox.hxx"
|
#include "dbtreelistbox.hxx"
|
||||||
#include "IApplicationController.hxx"
|
#include "IApplicationController.hxx"
|
||||||
#include "imageprovider.hxx"
|
#include "imageprovider.hxx"
|
||||||
|
#include "comphelper/componentcontext.hxx"
|
||||||
|
|
||||||
using namespace ::dbaui;
|
using namespace ::dbaui;
|
||||||
using namespace ::com::sun::star::uno;
|
using namespace ::com::sun::star::uno;
|
||||||
@ -475,11 +476,7 @@ void OTasksWindow::fillTaskEntryList( const TaskEntryList& _rList )
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
Reference< XModuleUIConfigurationManagerSupplier > xModuleCfgMgrSupplier(
|
Reference< XModuleUIConfigurationManagerSupplier > xModuleCfgMgrSupplier(
|
||||||
getDetailView()->getBorderWin().getView()->getORB()->createInstance(
|
ModuleUIConfigurationManagerSupplier::create(comphelper::ComponentContext(getDetailView()->getBorderWin().getView()->getORB()).getUNOContext()) );
|
||||||
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.ModuleUIConfigurationManagerSupplier" ) )
|
|
||||||
) ,
|
|
||||||
UNO_QUERY
|
|
||||||
);
|
|
||||||
Reference< XUIConfigurationManager > xUIConfigMgr = xModuleCfgMgrSupplier->getUIConfigurationManager(
|
Reference< XUIConfigurationManager > xUIConfigMgr = xModuleCfgMgrSupplier->getUIConfigurationManager(
|
||||||
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdb.OfficeDatabaseDocument" ) )
|
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdb.OfficeDatabaseDocument" ) )
|
||||||
);
|
);
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
#include <com/sun/star/beans/PropertyValue.hpp>
|
#include <com/sun/star/beans/PropertyValue.hpp>
|
||||||
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
|
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
|
||||||
#include <com/sun/star/container/XNameAccess.hpp>
|
#include <com/sun/star/container/XNameAccess.hpp>
|
||||||
#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
|
#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
|
||||||
#include <com/sun/star/ui/XUIConfigurationManager.hpp>
|
#include <com/sun/star/ui/XUIConfigurationManager.hpp>
|
||||||
#include <com/sun/star/graphic/XGraphic.hpp>
|
#include <com/sun/star/graphic/XGraphic.hpp>
|
||||||
#include <com/sun/star/ui/XImageManager.hpp>
|
#include <com/sun/star/ui/XImageManager.hpp>
|
||||||
@ -52,6 +52,7 @@ namespace dbaui
|
|||||||
using ::com::sun::star::container::XNameAccess;
|
using ::com::sun::star::container::XNameAccess;
|
||||||
using ::com::sun::star::lang::XMultiServiceFactory;
|
using ::com::sun::star::lang::XMultiServiceFactory;
|
||||||
using ::com::sun::star::beans::PropertyValue;
|
using ::com::sun::star::beans::PropertyValue;
|
||||||
|
using ::com::sun::star::ui::ModuleUIConfigurationManagerSupplier;
|
||||||
using ::com::sun::star::ui::XModuleUIConfigurationManagerSupplier;
|
using ::com::sun::star::ui::XModuleUIConfigurationManagerSupplier;
|
||||||
using ::com::sun::star::ui::XUIConfigurationManager;
|
using ::com::sun::star::ui::XUIConfigurationManager;
|
||||||
using ::com::sun::star::ui::XImageManager;
|
using ::com::sun::star::ui::XImageManager;
|
||||||
@ -124,14 +125,12 @@ namespace dbaui
|
|||||||
do
|
do
|
||||||
{
|
{
|
||||||
// Retrieve popup menu labels
|
// Retrieve popup menu labels
|
||||||
Reference< XMultiServiceFactory> xFactory( ::comphelper::getProcessServiceFactory() );
|
Reference< com::sun::star::uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
|
||||||
if ( !xFactory.is() )
|
if ( !xContext.is() )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
Reference< XModuleUIConfigurationManagerSupplier > xSupplier(
|
Reference< XModuleUIConfigurationManagerSupplier > xSupplier(
|
||||||
xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
|
ModuleUIConfigurationManagerSupplier::create(xContext) );
|
||||||
"com.sun.star.ui.ModuleUIConfigurationManagerSupplier" ) ) ),
|
|
||||||
UNO_QUERY_THROW );
|
|
||||||
|
|
||||||
Reference< XUIConfigurationManager > xManager( xSupplier->getUIConfigurationManager( _rModuleName ) );
|
Reference< XUIConfigurationManager > xManager( xSupplier->getUIConfigurationManager( _rModuleName ) );
|
||||||
Reference< XImageManager > xImageManager;
|
Reference< XImageManager > xImageManager;
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include <toolkit/helper/vclunohelper.hxx>
|
#include <toolkit/helper/vclunohelper.hxx>
|
||||||
#include <vcl/menu.hxx>
|
#include <vcl/menu.hxx>
|
||||||
#include <com/sun/star/ui/XUIConfigurationManager.hpp>
|
#include <com/sun/star/ui/XUIConfigurationManager.hpp>
|
||||||
#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
|
#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
|
||||||
#include <com/sun/star/ui/XImageManager.hpp>
|
#include <com/sun/star/ui/XImageManager.hpp>
|
||||||
#include <com/sun/star/graphic/XGraphic.hpp>
|
#include <com/sun/star/graphic/XGraphic.hpp>
|
||||||
#include <vcl/svapp.hxx>
|
#include <vcl/svapp.hxx>
|
||||||
@ -36,6 +36,7 @@
|
|||||||
#include <osl/mutex.hxx>
|
#include <osl/mutex.hxx>
|
||||||
#include "dbu_reghelper.hxx"
|
#include "dbu_reghelper.hxx"
|
||||||
#include "UITools.hxx"
|
#include "UITools.hxx"
|
||||||
|
#include <comphelper/componentcontext.hxx>
|
||||||
|
|
||||||
|
|
||||||
extern "C" void SAL_CALL createRegistryInfo_OToolboxController()
|
extern "C" void SAL_CALL createRegistryInfo_OToolboxController()
|
||||||
@ -185,7 +186,7 @@ namespace dbaui
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Reference<XModuleUIConfigurationManagerSupplier> xModuleCfgMgrSupplier(getServiceManager()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.ModuleUIConfigurationManagerSupplier"))),UNO_QUERY);
|
Reference<XModuleUIConfigurationManagerSupplier> xModuleCfgMgrSupplier(ModuleUIConfigurationManagerSupplier::create(comphelper::ComponentContext(getServiceManager()).getUNOContext()));
|
||||||
Reference<XUIConfigurationManager> xUIConfigMgr = xModuleCfgMgrSupplier->getUIConfigurationManager(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.OfficeDatabaseDocument")));
|
Reference<XUIConfigurationManager> xUIConfigMgr = xModuleCfgMgrSupplier->getUIConfigurationManager(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.OfficeDatabaseDocument")));
|
||||||
Reference<XImageManager> xImageMgr(xUIConfigMgr->getImageManager(),UNO_QUERY);
|
Reference<XImageManager> xImageMgr(xUIConfigMgr->getImageManager(),UNO_QUERY);
|
||||||
|
|
||||||
|
@ -60,6 +60,7 @@
|
|||||||
#include <com/sun/star/embed/ElementModes.hpp>
|
#include <com/sun/star/embed/ElementModes.hpp>
|
||||||
#include <com/sun/star/embed/FileSystemStorageFactory.hpp>
|
#include <com/sun/star/embed/FileSystemStorageFactory.hpp>
|
||||||
#include <com/sun/star/embed/XStorage.hpp>
|
#include <com/sun/star/embed/XStorage.hpp>
|
||||||
|
#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
|
||||||
#include <com/sun/star/ui/XUIConfiguration.hpp>
|
#include <com/sun/star/ui/XUIConfiguration.hpp>
|
||||||
#include <com/sun/star/ui/XUIConfigurationStorage.hpp>
|
#include <com/sun/star/ui/XUIConfigurationStorage.hpp>
|
||||||
#include <com/sun/star/ui/XUIConfigurationPersistence.hpp>
|
#include <com/sun/star/ui/XUIConfigurationPersistence.hpp>
|
||||||
@ -1339,11 +1340,10 @@ void NewVersionUIInfo::init(const ::std::vector< MigrationModuleInfo >& vModules
|
|||||||
m_lNewVersionMenubarSettingsSeq.realloc(vModulesInfo.size());
|
m_lNewVersionMenubarSettingsSeq.realloc(vModulesInfo.size());
|
||||||
m_lNewVersionToolbarSettingsSeq.realloc(vModulesInfo.size());
|
m_lNewVersionToolbarSettingsSeq.realloc(vModulesInfo.size());
|
||||||
|
|
||||||
const ::rtl::OUString sModuleCfgSupplier(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.ModuleUIConfigurationManagerSupplier"));
|
|
||||||
const ::rtl::OUString sMenubarResourceURL(RTL_CONSTASCII_USTRINGPARAM("private:resource/menubar/menubar"));
|
const ::rtl::OUString sMenubarResourceURL(RTL_CONSTASCII_USTRINGPARAM("private:resource/menubar/menubar"));
|
||||||
const ::rtl::OUString sToolbarResourcePre(RTL_CONSTASCII_USTRINGPARAM("private:resource/toolbar/"));
|
const ::rtl::OUString sToolbarResourcePre(RTL_CONSTASCII_USTRINGPARAM("private:resource/toolbar/"));
|
||||||
|
|
||||||
uno::Reference< ui::XModuleUIConfigurationManagerSupplier > xModuleCfgSupplier = uno::Reference< ui::XModuleUIConfigurationManagerSupplier >(::comphelper::getProcessServiceFactory()->createInstance(sModuleCfgSupplier), uno::UNO_QUERY);
|
uno::Reference< ui::XModuleUIConfigurationManagerSupplier > xModuleCfgSupplier = ui::ModuleUIConfigurationManagerSupplier::create( ::comphelper::getProcessComponentContext() );
|
||||||
|
|
||||||
for (sal_uInt32 i=0; i<vModulesInfo.size(); ++i)
|
for (sal_uInt32 i=0; i<vModulesInfo.size(); ++i)
|
||||||
{
|
{
|
||||||
|
@ -65,7 +65,7 @@
|
|||||||
#include <com/sun/star/ui/XUIElementSettings.hpp>
|
#include <com/sun/star/ui/XUIElementSettings.hpp>
|
||||||
#include <com/sun/star/ui/XUIConfigurationManager.hpp>
|
#include <com/sun/star/ui/XUIConfigurationManager.hpp>
|
||||||
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
|
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
|
||||||
#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
|
#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
|
||||||
#include <com/sun/star/lang/XServiceInfo.hpp>
|
#include <com/sun/star/lang/XServiceInfo.hpp>
|
||||||
#include <com/sun/star/embed/StateChangeInProgressException.hpp>
|
#include <com/sun/star/embed/StateChangeInProgressException.hpp>
|
||||||
|
|
||||||
@ -74,6 +74,7 @@
|
|||||||
#include <osl/diagnose.h>
|
#include <osl/diagnose.h>
|
||||||
#include <rtl/process.h>
|
#include <rtl/process.h>
|
||||||
|
|
||||||
|
#include <comphelper/componentcontext.hxx>
|
||||||
#include <comphelper/processfactory.hxx>
|
#include <comphelper/processfactory.hxx>
|
||||||
#include <comphelper/namedvaluecollection.hxx>
|
#include <comphelper/namedvaluecollection.hxx>
|
||||||
|
|
||||||
@ -584,10 +585,8 @@ uno::Reference< container::XIndexAccess > DocumentHolder::RetrieveOwnMenu_Impl()
|
|||||||
|
|
||||||
if ( !aModuleIdent.isEmpty() )
|
if ( !aModuleIdent.isEmpty() )
|
||||||
{
|
{
|
||||||
uno::Reference< ::com::sun::star::ui::XModuleUIConfigurationManagerSupplier > xModConfSupplier(
|
uno::Reference< ui::XModuleUIConfigurationManagerSupplier > xModConfSupplier(
|
||||||
m_xFactory->createInstance( ::rtl::OUString(
|
ui::ModuleUIConfigurationManagerSupplier::create(comphelper::ComponentContext(m_xFactory).getUNOContext()) );
|
||||||
RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.ModuleUIConfigurationManagerSupplier" ) ) ),
|
|
||||||
uno::UNO_QUERY_THROW );
|
|
||||||
uno::Reference< ::com::sun::star::ui::XUIConfigurationManager > xModUIConfMan(
|
uno::Reference< ::com::sun::star::ui::XUIConfigurationManager > xModUIConfMan(
|
||||||
xModConfSupplier->getUIConfigurationManager( aModuleIdent ),
|
xModConfSupplier->getUIConfigurationManager( aModuleIdent ),
|
||||||
uno::UNO_QUERY_THROW );
|
uno::UNO_QUERY_THROW );
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
#include <com/sun/star/ui/XImageManager.hpp>
|
#include <com/sun/star/ui/XImageManager.hpp>
|
||||||
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
|
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
|
||||||
#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
|
#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
|
||||||
#include <com/sun/star/frame/XModuleManager.hpp>
|
#include <com/sun/star/frame/XModuleManager.hpp>
|
||||||
#include <com/sun/star/ui/ImageType.hpp>
|
#include <com/sun/star/ui/ImageType.hpp>
|
||||||
|
|
||||||
@ -58,6 +58,7 @@ namespace frm
|
|||||||
using ::com::sun::star::ui::XUIConfigurationManagerSupplier;
|
using ::com::sun::star::ui::XUIConfigurationManagerSupplier;
|
||||||
using ::com::sun::star::ui::XUIConfigurationManager;
|
using ::com::sun::star::ui::XUIConfigurationManager;
|
||||||
using ::com::sun::star::ui::XModuleUIConfigurationManagerSupplier;
|
using ::com::sun::star::ui::XModuleUIConfigurationManagerSupplier;
|
||||||
|
using ::com::sun::star::ui::ModuleUIConfigurationManagerSupplier;
|
||||||
using ::com::sun::star::frame::XModuleManager;
|
using ::com::sun::star::frame::XModuleManager;
|
||||||
using ::com::sun::star::graphic::XGraphic;
|
using ::com::sun::star::graphic::XGraphic;
|
||||||
/** === end UNO using === **/
|
/** === end UNO using === **/
|
||||||
@ -114,7 +115,7 @@ namespace frm
|
|||||||
::rtl::OUString sModuleID = xModuleManager->identify( _rxDocument );
|
::rtl::OUString sModuleID = xModuleManager->identify( _rxDocument );
|
||||||
|
|
||||||
Reference< XModuleUIConfigurationManagerSupplier > xSuppUIConfig(
|
Reference< XModuleUIConfigurationManagerSupplier > xSuppUIConfig(
|
||||||
_rContext.createComponent( "com.sun.star.ui.ModuleUIConfigurationManagerSupplier" ), UNO_QUERY_THROW );
|
ModuleUIConfigurationManagerSupplier::create(_rContext.getUNOContext()) );
|
||||||
Reference< XUIConfigurationManager > xUIConfig(
|
Reference< XUIConfigurationManager > xUIConfig(
|
||||||
xSuppUIConfig->getUIConfigurationManager( sModuleID ), UNO_SET_THROW );
|
xSuppUIConfig->getUIConfigurationManager( sModuleID ), UNO_SET_THROW );
|
||||||
m_xModuleImageManager.set( xUIConfig->getImageManager(), UNO_QUERY_THROW );
|
m_xModuleImageManager.set( xUIConfig->getImageManager(), UNO_QUERY_THROW );
|
||||||
|
@ -792,8 +792,7 @@ FrameHelper::getAcceleratorConfigurations (Reference < XModel > xModel,
|
|||||||
this->m_docAccelConf = docAccelConf;
|
this->m_docAccelConf = docAccelConf;
|
||||||
|
|
||||||
//Get module shurtcut database
|
//Get module shurtcut database
|
||||||
Reference< XModuleUIConfigurationManagerSupplier > modUISupplier(m_xMSF->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.ModuleUIConfigurationManagerSupplier"))),
|
Reference< XModuleUIConfigurationManagerSupplier > modUISupplier( ModuleUIConfigurationManagerSupplier::create(comphelper::ComponentContext(m_xMSF).getUNOContext()) );
|
||||||
UNO_QUERY);
|
|
||||||
Reference< XUIConfigurationManager > modUIManager = modUISupplier->getUIConfigurationManager(xModuleManager->identify(m_xFrame));
|
Reference< XUIConfigurationManager > modUIManager = modUISupplier->getUIConfigurationManager(xModuleManager->identify(m_xFrame));
|
||||||
Reference< XAcceleratorConfiguration > modAccelConf(modUIManager->getShortCutManager(), UNO_QUERY);
|
Reference< XAcceleratorConfiguration > modAccelConf(modUIManager->getShortCutManager(), UNO_QUERY);
|
||||||
this->m_modAccelConf = modAccelConf;
|
this->m_modAccelConf = modAccelConf;
|
||||||
|
@ -276,6 +276,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/ucb,\
|
|||||||
))
|
))
|
||||||
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/ui,\
|
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/ui,\
|
||||||
GlobalAcceleratorConfiguration \
|
GlobalAcceleratorConfiguration \
|
||||||
|
ModuleUIConfigurationManagerSupplier \
|
||||||
WindowContentFactory \
|
WindowContentFactory \
|
||||||
))
|
))
|
||||||
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/ui/dialogs,\
|
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/ui/dialogs,\
|
||||||
@ -1456,7 +1457,6 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/ui,\
|
|||||||
ModuleUICategoryDescription \
|
ModuleUICategoryDescription \
|
||||||
ModuleUICommandDescription \
|
ModuleUICommandDescription \
|
||||||
ModuleUIConfigurationManager \
|
ModuleUIConfigurationManager \
|
||||||
ModuleUIConfigurationManagerSupplier \
|
|
||||||
ModuleWindowStateConfiguration \
|
ModuleWindowStateConfiguration \
|
||||||
UICategoryDescription \
|
UICategoryDescription \
|
||||||
UICommandDescription \
|
UICommandDescription \
|
||||||
|
@ -37,23 +37,19 @@ module com { module sun { module star { module ui {
|
|||||||
access to module based user interface configuration managers.
|
access to module based user interface configuration managers.
|
||||||
|
|
||||||
@since OOo 2.0
|
@since OOo 2.0
|
||||||
|
|
||||||
|
Controls module based user interface configuration managers.
|
||||||
|
|
||||||
|
<p>
|
||||||
|
There can only exists one user interface configuration manager for
|
||||||
|
a module. A user interface configuration manager supports to get and set
|
||||||
|
user interface configuration data for configurable user interface elements.
|
||||||
|
|
||||||
|
@see ConfigurableUIElement
|
||||||
|
@see XUIConfigurationManager
|
||||||
|
</p>
|
||||||
*/
|
*/
|
||||||
|
service ModuleUIConfigurationManagerSupplier : XModuleUIConfigurationManagerSupplier;
|
||||||
service ModuleUIConfigurationManagerSupplier
|
|
||||||
{
|
|
||||||
/** controls module based user interface configuration managers.
|
|
||||||
|
|
||||||
<p>
|
|
||||||
There can only exists one user interface configuration manager for
|
|
||||||
a module. A user interface configuration manager supports to get and set
|
|
||||||
user interface configuration data for configurable user interface elements.
|
|
||||||
|
|
||||||
@see ConfigurableUIElement
|
|
||||||
@see XUIConfigurationManager
|
|
||||||
</p>
|
|
||||||
*/
|
|
||||||
interface XModuleUIConfigurationManagerSupplier;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
}; }; }; };
|
}; }; }; };
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
#include <rtl/ustrbuf.hxx>
|
#include <rtl/ustrbuf.hxx>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <com/sun/star/ui/XUIConfigurationPersistence.hpp>
|
#include <com/sun/star/ui/XUIConfigurationPersistence.hpp>
|
||||||
#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
|
#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
|
||||||
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
|
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
|
||||||
#include <com/sun/star/lang/XSingleComponentFactory.hpp>
|
#include <com/sun/star/lang/XSingleComponentFactory.hpp>
|
||||||
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
|
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
|
||||||
@ -420,12 +420,16 @@ CTB* CTBWrapper::GetCustomizationData( const rtl::OUString& sTBName )
|
|||||||
|
|
||||||
bool CTBWrapper::ImportCustomToolBar( SfxObjectShell& rDocSh )
|
bool CTBWrapper::ImportCustomToolBar( SfxObjectShell& rDocSh )
|
||||||
{
|
{
|
||||||
|
if(rCTB.empty())
|
||||||
|
return true;
|
||||||
|
|
||||||
|
uno::Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
|
||||||
|
uno::Reference< ui::XModuleUIConfigurationManagerSupplier > xAppCfgSupp( ui::ModuleUIConfigurationManagerSupplier::create(xContext) );
|
||||||
|
|
||||||
std::vector<CTB>::iterator it_end = rCTB.end();
|
std::vector<CTB>::iterator it_end = rCTB.end();
|
||||||
for ( std::vector<CTB>::iterator it = rCTB.begin(); it != it_end; ++it )
|
for ( std::vector<CTB>::iterator it = rCTB.begin(); it != it_end; ++it )
|
||||||
{
|
{
|
||||||
// for each customtoolbar
|
// for each customtoolbar
|
||||||
uno::Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW );
|
|
||||||
uno::Reference< ui::XModuleUIConfigurationManagerSupplier > xAppCfgSupp( xMSF->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.ModuleUIConfigurationManagerSupplier" ) ) ), uno::UNO_QUERY_THROW );
|
|
||||||
CustomToolBarImportHelper helper( rDocSh, xAppCfgSupp->getUIConfigurationManager( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.SpreadsheetDocument" ) ) ) );
|
CustomToolBarImportHelper helper( rDocSh, xAppCfgSupp->getUIConfigurationManager( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.SpreadsheetDocument" ) ) ) );
|
||||||
helper.setMSOCommandMap( new MSOExcelCommandConvertor() );
|
helper.setMSOCommandMap( new MSOExcelCommandConvertor() );
|
||||||
// Ignore menu toolbars, excel doesn't ( afaics ) store
|
// Ignore menu toolbars, excel doesn't ( afaics ) store
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
#include <com/sun/star/script/vba/XVBAEventProcessor.hpp>
|
#include <com/sun/star/script/vba/XVBAEventProcessor.hpp>
|
||||||
#include <com/sun/star/sheet/XSpreadsheetView.hpp>
|
#include <com/sun/star/sheet/XSpreadsheetView.hpp>
|
||||||
#include <com/sun/star/task/XJob.hpp>
|
#include <com/sun/star/task/XJob.hpp>
|
||||||
#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
|
#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
|
||||||
#include <com/sun/star/ui/XAcceleratorConfiguration.hpp>
|
#include <com/sun/star/ui/XAcceleratorConfiguration.hpp>
|
||||||
|
|
||||||
#include "scabstdlg.hxx"
|
#include "scabstdlg.hxx"
|
||||||
@ -2858,16 +2858,12 @@ void ScDocShell::ResetKeyBindings( ScOptionsUtil::KeyBindingType eType )
|
|||||||
{
|
{
|
||||||
using namespace ::com::sun::star::ui;
|
using namespace ::com::sun::star::ui;
|
||||||
|
|
||||||
Reference<XMultiServiceFactory> xServiceManager = ::comphelper::getProcessServiceFactory();
|
Reference<uno::XComponentContext> xContext = ::comphelper::getProcessComponentContext();
|
||||||
if (!xServiceManager.is())
|
if (!xContext.is())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Reference<XModuleUIConfigurationManagerSupplier> xModuleCfgSupplier(
|
Reference<XModuleUIConfigurationManagerSupplier> xModuleCfgSupplier(
|
||||||
xServiceManager->createInstance(
|
ModuleUIConfigurationManagerSupplier::create(xContext) );
|
||||||
OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.ModuleUIConfigurationManagerSupplier"))), UNO_QUERY);
|
|
||||||
|
|
||||||
if (!xModuleCfgSupplier.is())
|
|
||||||
return;
|
|
||||||
|
|
||||||
// Grab the Calc configuration.
|
// Grab the Calc configuration.
|
||||||
Reference<XUIConfigurationManager> xConfigMgr =
|
Reference<XUIConfigurationManager> xConfigMgr =
|
||||||
|
@ -61,7 +61,7 @@
|
|||||||
#include <com/sun/star/frame/XModuleManager.hpp>
|
#include <com/sun/star/frame/XModuleManager.hpp>
|
||||||
#include <com/sun/star/ucb/SimpleFileAccess.hpp>
|
#include <com/sun/star/ucb/SimpleFileAccess.hpp>
|
||||||
#include <com/sun/star/ucb/XSimpleFileAccess2.hpp>
|
#include <com/sun/star/ucb/XSimpleFileAccess2.hpp>
|
||||||
#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
|
#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
|
||||||
#include <com/sun/star/ui/XImageManager.hpp>
|
#include <com/sun/star/ui/XImageManager.hpp>
|
||||||
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
|
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
|
||||||
#include <unotools/historyoptions.hxx>
|
#include <unotools/historyoptions.hxx>
|
||||||
@ -1811,16 +1811,15 @@ Image AssistentDlgImpl::GetUiIconForCommand (const ::rtl::OUString& sCommandURL)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
// Retrieve popup menu labels
|
// Retrieve popup menu labels
|
||||||
Reference<lang::XMultiServiceFactory> xFactory (
|
Reference<uno::XComponentContext> xContext (
|
||||||
::comphelper::getProcessServiceFactory ());
|
::comphelper::getProcessComponentContext());
|
||||||
if ( ! xFactory.is())
|
if ( ! xContext.is())
|
||||||
break;
|
break;
|
||||||
|
|
||||||
::rtl::OUString sModuleIdentifier ("com.sun.star.presentation.PresentationDocument");
|
::rtl::OUString sModuleIdentifier ("com.sun.star.presentation.PresentationDocument");
|
||||||
|
|
||||||
Reference<com::sun::star::ui::XModuleUIConfigurationManagerSupplier> xSupplier (
|
Reference<ui::XModuleUIConfigurationManagerSupplier> xSupplier (
|
||||||
xFactory->createInstance("com.sun.star.ui.ModuleUIConfigurationManagerSupplier"),
|
ui::ModuleUIConfigurationManagerSupplier::create(xContext));
|
||||||
UNO_QUERY_THROW);
|
|
||||||
|
|
||||||
Reference<com::sun::star::ui::XUIConfigurationManager> xManager (
|
Reference<com::sun::star::ui::XUIConfigurationManager> xManager (
|
||||||
xSupplier->getUIConfigurationManager(sModuleIdentifier));
|
xSupplier->getUIConfigurationManager(sModuleIdentifier));
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#include <com/sun/star/frame/XController.hpp>
|
#include <com/sun/star/frame/XController.hpp>
|
||||||
#include <com/sun/star/ui/XImageManager.hpp>
|
#include <com/sun/star/ui/XImageManager.hpp>
|
||||||
#include <com/sun/star/frame/XModuleManager.hpp>
|
#include <com/sun/star/frame/XModuleManager.hpp>
|
||||||
#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
|
#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
|
||||||
#include <com/sun/star/ui/ImageType.hpp>
|
#include <com/sun/star/ui/ImageType.hpp>
|
||||||
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
|
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
|
||||||
|
|
||||||
@ -176,11 +176,8 @@ Image SAL_CALL GetImage(
|
|||||||
|
|
||||||
if ( !xModuleCfgMgrSupplier.is() )
|
if ( !xModuleCfgMgrSupplier.is() )
|
||||||
{
|
{
|
||||||
xModuleCfgMgrSupplier = Reference< XModuleUIConfigurationManagerSupplier >(
|
xModuleCfgMgrSupplier = ModuleUIConfigurationManagerSupplier::create(
|
||||||
::comphelper::getProcessServiceFactory()->createInstance(
|
::comphelper::getProcessComponentContext() );
|
||||||
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
|
|
||||||
"com.sun.star.ui.ModuleUIConfigurationManagerSupplier" ))),
|
|
||||||
UNO_QUERY );
|
|
||||||
|
|
||||||
m_xModuleCfgMgrSupplier = xModuleCfgMgrSupplier;
|
m_xModuleCfgMgrSupplier = xModuleCfgMgrSupplier;
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
#include <com/sun/star/frame/XModuleManager.hpp>
|
#include <com/sun/star/frame/XModuleManager.hpp>
|
||||||
#include <com/sun/star/frame/XDesktop.hpp>
|
#include <com/sun/star/frame/XDesktop.hpp>
|
||||||
#include <com/sun/star/ui/XUIConfigurationManager.hpp>
|
#include <com/sun/star/ui/XUIConfigurationManager.hpp>
|
||||||
#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
|
#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
|
||||||
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
|
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
|
||||||
#include <com/sun/star/awt/XTopWindow.hpp>
|
#include <com/sun/star/awt/XTopWindow.hpp>
|
||||||
#include <com/sun/star/awt/KeyModifier.hpp>
|
#include <com/sun/star/awt/KeyModifier.hpp>
|
||||||
@ -403,8 +403,7 @@ css::uno::Reference< css::ui::XAcceleratorConfiguration > AcceleratorExecute::st
|
|||||||
{ return css::uno::Reference< css::ui::XAcceleratorConfiguration >(); }
|
{ return css::uno::Reference< css::ui::XAcceleratorConfiguration >(); }
|
||||||
|
|
||||||
css::uno::Reference< css::ui::XModuleUIConfigurationManagerSupplier > xUISupplier(
|
css::uno::Reference< css::ui::XModuleUIConfigurationManagerSupplier > xUISupplier(
|
||||||
xSMGR->createInstance(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.ModuleUIConfigurationManagerSupplier" ))),
|
css::ui::ModuleUIConfigurationManagerSupplier::create(comphelper::ComponentContext(xSMGR).getUNOContext()) );
|
||||||
css::uno::UNO_QUERY_THROW);
|
|
||||||
|
|
||||||
css::uno::Reference< css::ui::XAcceleratorConfiguration > xAccCfg;
|
css::uno::Reference< css::ui::XAcceleratorConfiguration > xAccCfg;
|
||||||
try
|
try
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
|
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
|
||||||
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
|
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
|
||||||
#include <com/sun/star/ui/XUIConfigurationManager.hpp>
|
#include <com/sun/star/ui/XUIConfigurationManager.hpp>
|
||||||
#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
|
#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
|
||||||
#include <com/sun/star/ui/ImageType.hpp>
|
#include <com/sun/star/ui/ImageType.hpp>
|
||||||
#include <com/sun/star/util/URLTransformer.hpp>
|
#include <com/sun/star/util/URLTransformer.hpp>
|
||||||
#include <com/sun/star/beans/PropertyValue.hpp>
|
#include <com/sun/star/beans/PropertyValue.hpp>
|
||||||
@ -430,19 +430,14 @@ ContextMenuHelper::associateUIConfigurationManagers()
|
|||||||
aModuleId = xModuleManager->identify( xFrame );
|
aModuleId = xModuleManager->identify( xFrame );
|
||||||
|
|
||||||
uno::Reference< ui::XModuleUIConfigurationManagerSupplier > xModuleCfgMgrSupplier(
|
uno::Reference< ui::XModuleUIConfigurationManagerSupplier > xModuleCfgMgrSupplier(
|
||||||
::comphelper::getProcessServiceFactory()->createInstance(
|
ui::ModuleUIConfigurationManagerSupplier::create(
|
||||||
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
|
::comphelper::getProcessComponentContext() ) );
|
||||||
"com.sun.star.ui.ModuleUIConfigurationManagerSupplier" ))),
|
uno::Reference< ui::XUIConfigurationManager > xUICfgMgr(
|
||||||
uno::UNO_QUERY );
|
xModuleCfgMgrSupplier->getUIConfigurationManager( aModuleId ));
|
||||||
if ( xModuleCfgMgrSupplier.is() )
|
if ( xUICfgMgr.is() )
|
||||||
{
|
{
|
||||||
uno::Reference< ui::XUIConfigurationManager > xUICfgMgr(
|
m_xModuleImageMgr = uno::Reference< ui::XImageManager >(
|
||||||
xModuleCfgMgrSupplier->getUIConfigurationManager( aModuleId ));
|
xUICfgMgr->getImageManager(), uno::UNO_QUERY );
|
||||||
if ( xUICfgMgr.is() )
|
|
||||||
{
|
|
||||||
m_xModuleImageMgr = uno::Reference< ui::XImageManager >(
|
|
||||||
xUICfgMgr->getImageManager(), uno::UNO_QUERY );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
#include <rtl/ustrbuf.hxx>
|
#include <rtl/ustrbuf.hxx>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <com/sun/star/ui/XUIConfigurationPersistence.hpp>
|
#include <com/sun/star/ui/XUIConfigurationPersistence.hpp>
|
||||||
#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
|
#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
|
||||||
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
|
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
|
||||||
#include <com/sun/star/lang/XSingleComponentFactory.hpp>
|
#include <com/sun/star/lang/XSingleComponentFactory.hpp>
|
||||||
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
|
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
|
||||||
@ -240,8 +240,8 @@ bool CTBWrapper::ImportCustomToolBar( SfxObjectShell& rDocSh )
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
uno::Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW );
|
uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
|
||||||
uno::Reference< ui::XModuleUIConfigurationManagerSupplier > xAppCfgSupp( xMSF->createInstance( "com.sun.star.ui.ModuleUIConfigurationManagerSupplier" ), uno::UNO_QUERY_THROW );
|
uno::Reference< ui::XModuleUIConfigurationManagerSupplier > xAppCfgSupp( ui::ModuleUIConfigurationManagerSupplier::create(xContext) );
|
||||||
CustomToolBarImportHelper helper( rDocSh, xAppCfgSupp->getUIConfigurationManager( "com.sun.star.text.TextDocument" ) );
|
CustomToolBarImportHelper helper( rDocSh, xAppCfgSupp->getUIConfigurationManager( "com.sun.star.text.TextDocument" ) );
|
||||||
helper.setMSOCommandMap( new MSOWordCommandConvertor() );
|
helper.setMSOCommandMap( new MSOWordCommandConvertor() );
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||||
*/
|
*/
|
||||||
#include "vbacommandbarhelper.hxx"
|
#include "vbacommandbarhelper.hxx"
|
||||||
|
#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
|
||||||
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
|
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
|
||||||
#include <com/sun/star/ui/XUIConfigurationStorage.hpp>
|
#include <com/sun/star/ui/XUIConfigurationStorage.hpp>
|
||||||
#include <com/sun/star/ui/XModuleUIConfigurationManager.hpp>
|
#include <com/sun/star/ui/XModuleUIConfigurationManager.hpp>
|
||||||
@ -112,7 +113,8 @@ void VbaCommandBarHelper::Init( ) throw (css::uno::RuntimeException)
|
|||||||
|
|
||||||
uno::Reference< lang::XMultiServiceFactory > xServiceManager( mxContext->getServiceManager(), uno::UNO_QUERY_THROW );
|
uno::Reference< lang::XMultiServiceFactory > xServiceManager( mxContext->getServiceManager(), uno::UNO_QUERY_THROW );
|
||||||
|
|
||||||
css::uno::Reference< css::ui::XModuleUIConfigurationManagerSupplier > xUICfgMgrSupp( xServiceManager->createInstance( rtl::OUString( "com.sun.star.ui.ModuleUIConfigurationManagerSupplier" )), uno::UNO_QUERY_THROW );
|
css::uno::Reference< css::ui::XModuleUIConfigurationManagerSupplier > xUICfgMgrSupp(
|
||||||
|
css::ui::ModuleUIConfigurationManagerSupplier::create(mxContext) );
|
||||||
|
|
||||||
m_xAppCfgMgr.set( xUICfgMgrSupp->getUIConfigurationManager( maModuleId ), uno::UNO_QUERY_THROW );
|
m_xAppCfgMgr.set( xUICfgMgrSupp->getUIConfigurationManager( maModuleId ), uno::UNO_QUERY_THROW );
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user