summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-05-13 15:09:45 +0200
committerNoel Grandin <noel@peralex.com>2013-05-14 08:08:26 +0200
commit0394cb37a2d378511f265004b285fd93df37e5ca (patch)
treef3a7269690e6fbd34b7ef09ff9e874b6f15345ba
parent4481f5d4bcf0ba5b5d02c1dbff6d24d1e5301ff6 (diff)
fdo#46808, Convert ui::ImageManager to new style
The service already existed, it just needed an IDL file. Change-Id: I5bdc3064b0a3caa5a0d2abf4ef5ba3159889c7af
-rw-r--r--cui/source/customize/cfg.cxx8
-rw-r--r--framework/inc/services.h2
-rw-r--r--framework/source/uiconfiguration/imagemanager.cxx3
-rw-r--r--offapi/UnoApi_offapi.mk1
-rw-r--r--offapi/com/sun/star/ui/ImageManager.idl37
5 files changed, 43 insertions, 8 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 4aad676607b5..5566dcea43de 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -75,6 +75,7 @@
#include <com/sun/star/graphic/GraphicProvider.hpp>
#include <com/sun/star/ui/ItemType.hpp>
#include <com/sun/star/ui/ItemStyle.hpp>
+#include <com/sun/star/ui/ImageManager.hpp>
#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XUIConfiguration.hpp>
#include <com/sun/star/ui/XUIConfigurationListener.hpp>
@@ -5006,8 +5007,6 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( Window *pWindow,
aFtNote.SetText( replaceSixteen( aFtNote.GetText(), m_nExpectedSize ) );
}
- uno::Reference< lang::XMultiServiceFactory > xServiceManager =
- ::comphelper::getProcessServiceFactory();
uno::Reference< uno::XComponentContext > xComponentContext =
::comphelper::getProcessComponentContext();
@@ -5058,10 +5057,7 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( Window *pWindow,
aPropValue.Value <<= com::sun::star::embed::ElementModes::READWRITE;
aProp[ 1 ] <<= aPropValue;
- m_xImportedImageManager = uno::Reference< com::sun::star::ui::XImageManager >(
- xServiceManager->createInstanceWithArguments(
- OUString("com.sun.star.ui.ImageManager" ), aProp ),
- uno::UNO_QUERY );
+ m_xImportedImageManager = css::ui::ImageManager::create( xComponentContext );
ImageInfo mImageInfo;
uno::Sequence< OUString > names;
diff --git a/framework/inc/services.h b/framework/inc/services.h
index 810bc99341b3..cda8d13be9b2 100644
--- a/framework/inc/services.h
+++ b/framework/inc/services.h
@@ -52,7 +52,6 @@ namespace framework{
#define SERVICENAME_TABWINFACTORY DECLARE_ASCII("com.sun.star.frame.TabWindowFactory" )
#define SERVICENAME_TABWINDOW DECLARE_ASCII("com.sun.star.frame.TabWindow" )
#define SERVICENAME_STRINGABBREVIATION DECLARE_ASCII("com.sun.star.util.UriAbbreviation" )
-#define SERVICENAME_IMAGEMANAGER DECLARE_ASCII("com.sun.star.ui.ImageManager" )
#define SERVICENAME_TABWINDOWSERVICE DECLARE_ASCII("com.sun.star.ui.dialogs.TabContainerWindow" )
//_________________________________________________________________________________________________________________
@@ -120,7 +119,6 @@ namespace framework{
#define IMPLEMENTATIONNAME_POPUPMENUDISPATCHER DECLARE_ASCII("com.sun.star.comp.framework.PopupMenuControllerDispatcher" )
#define IMPLEMENTATIONNAME_LANGSELECTIONSTATUSBARCONTROLLER DECLARE_ASCII("com.sun.star.comp.framework.LangSelectionStatusbarController" )
#define IMPLEMENTATIONNAME_LANGUAGESELECTIONMENUCONTROLLER DECLARE_ASCII("com.sun.star.comp.framework.LanguageSelectionMenuController" )
-#define IMPLEMENTATIONNAME_IMAGEMANAGER DECLARE_ASCII("com.sun.star.comp.framework.ImageManager" )
#define IMPLEMENTATIONNAME_TABWINDOWSERVICE DECLARE_ASCII("com.sun.star.comp.framework.TabWindowService" )
#define IMPLEMENTATIONNAME_WINDOWCONTENTFACTORYMANAGER DECLARE_ASCII("com.sun.star.comp.framework.WindowContentFactoryManager" )
diff --git a/framework/source/uiconfiguration/imagemanager.cxx b/framework/source/uiconfiguration/imagemanager.cxx
index 2a382526c408..6e5aae68f230 100644
--- a/framework/source/uiconfiguration/imagemanager.cxx
+++ b/framework/source/uiconfiguration/imagemanager.cxx
@@ -74,6 +74,9 @@ const sal_Int16 MAX_IMAGETYPE_VALUE = ::com::sun::star::ui::ImageType::COL
namespace framework
{
+#define SERVICENAME_IMAGEMANAGER DECLARE_ASCII("com.sun.star.ui.ImageManager" )
+#define IMPLEMENTATIONNAME_IMAGEMANAGER DECLARE_ASCII("com.sun.star.comp.framework.ImageManager" )
+
//*****************************************************************************************************************
// XInterface, XTypeProvider, XServiceInfo
//*****************************************************************************************************************
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 7beadf6c34a3..90a54dea5a10 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -3938,6 +3938,7 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,offapi/com/sun/star/ui,\
ContextMenuExecuteEvent \
ContextMenuInterceptorAction \
DockingArea \
+ ImageManager \
ImageType \
ItemStyle \
ItemType \
diff --git a/offapi/com/sun/star/ui/ImageManager.idl b/offapi/com/sun/star/ui/ImageManager.idl
new file mode 100644
index 000000000000..f8b5b1a4dee0
--- /dev/null
+++ b/offapi/com/sun/star/ui/ImageManager.idl
@@ -0,0 +1,37 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef __com_sun_star_ui_ImageManager_idl__
+#define __com_sun_star_ui_ImageManager_idl__
+
+#include <com/sun/star/ui/XImageManager.idl>
+
+module com { module sun { module star { module ui {
+
+
+/**
+
+ @since LibreOffice 4.1
+*/
+service ImageManager : XImageManager;
+
+}; }; }; }; // com.sun.star.ui
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */