From feb3b3dbda7af2ba7f2d36dd9174a30912d9cf63 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 18 Jan 2017 11:05:58 +0000 Subject: XPackageTypeInfo::getIcon is useless nothing in LibreOffice calls it, and anything external would get a resource id which is useless to anything except LibreOffice internals Change-Id: I9d6d91a047da64dc98b556ae46fc86d84cf774f4 --- desktop/AllLangResTarget_deploymentgui.mk | 4 -- desktop/inc/deployment.hrc | 9 --- desktop/source/deployment/gui/dp_gui_backend.src | 71 ---------------------- .../deployment/registry/component/dp_component.cxx | 24 ++++---- .../registry/configuration/dp_configuration.cxx | 8 +-- desktop/source/deployment/registry/dp_backend.cxx | 16 +---- .../registry/executable/dp_executable.cxx | 2 +- .../source/deployment/registry/help/dp_help.cxx | 4 +- .../source/deployment/registry/inc/dp_backend.h | 7 +-- .../deployment/registry/package/dp_package.cxx | 8 +-- .../deployment/registry/script/dp_script.cxx | 8 +-- .../source/deployment/registry/sfwk/dp_sfwk.cxx | 4 +- .../com/sun/star/deployment/XPackageTypeInfo.idl | 10 ++- 13 files changed, 37 insertions(+), 138 deletions(-) delete mode 100644 desktop/source/deployment/gui/dp_gui_backend.src diff --git a/desktop/AllLangResTarget_deploymentgui.mk b/desktop/AllLangResTarget_deploymentgui.mk index bc9012ffb964..b7b9d14c12a5 100644 --- a/desktop/AllLangResTarget_deploymentgui.mk +++ b/desktop/AllLangResTarget_deploymentgui.mk @@ -32,8 +32,4 @@ $(eval $(call gb_SrsTarget_add_files,deploymentgui/res,\ desktop/source/deployment/gui/dp_gui_versionboxes.src \ )) -$(eval $(call gb_SrsTarget_add_nonlocalizable_files,deploymentgui/res,\ - desktop/source/deployment/gui/dp_gui_backend.src \ -)) - # vim: set ts=4 sw=4 et: diff --git a/desktop/inc/deployment.hrc b/desktop/inc/deployment.hrc index 4b16b301ceb3..42ca22890f16 100644 --- a/desktop/inc/deployment.hrc +++ b/desktop/inc/deployment.hrc @@ -28,20 +28,12 @@ #define RID_DEPLOYMENT_REGISTRY_START (RID_DEPLOYMENT_START+1500) #define RID_DEPLOYMENT_BUNDLE_START (RID_DEPLOYMENT_START+2000) -#define RID_IMG_DEF_PACKAGE_BUNDLE RID_DEPLOYMENT_BUNDLE_START #define RID_DEPLOYMENT_SCRIPT_START (RID_DEPLOYMENT_START+2500) -#define RID_IMG_SCRIPTLIB RID_DEPLOYMENT_SCRIPT_START -#define RID_IMG_DIALOGLIB (RID_DEPLOYMENT_SCRIPT_START+2) #define RID_DEPLOYMENT_CONF_START (RID_DEPLOYMENT_START+3000) -#define RID_IMG_CONF_XML RID_DEPLOYMENT_CONF_START #define RID_DEPLOYMENT_COMPONENT_START (RID_DEPLOYMENT_START+3500) -#define RID_IMG_COMPONENT RID_DEPLOYMENT_COMPONENT_START -#define RID_IMG_JAVA_COMPONENT (RID_DEPLOYMENT_COMPONENT_START+2) -#define RID_IMG_TYPELIB (RID_DEPLOYMENT_COMPONENT_START+4) -#define RID_IMG_JAVA_TYPELIB (RID_DEPLOYMENT_COMPONENT_START+6) #define RID_DEPLOYMENT_UNOPKG_START (RID_DEPLOYMENT_START+4000) #define RID_STR_UNOPKG_ACCEPT_LIC_1 (RID_DEPLOYMENT_UNOPKG_START+1) @@ -66,7 +58,6 @@ #define RID_DEPLOYMENT_LICENSE_START (RID_DEPLOYMENT_START+4500) #define RID_DEPLOYMENT_HELP_START (RID_DEPLOYMENT_START+5000) -#define RID_IMG_HELP RID_DEPLOYMENT_HELP_START #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/desktop/source/deployment/gui/dp_gui_backend.src b/desktop/source/deployment/gui/dp_gui_backend.src deleted file mode 100644 index 39fff6de9d6e..000000000000 --- a/desktop/source/deployment/gui/dp_gui_backend.src +++ /dev/null @@ -1,71 +0,0 @@ -/* -*- 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 . - */ - -#include "dp_gui.hrc" - -// package bundle: -Image RID_IMG_DEF_PACKAGE_BUNDLE -{ - ImageBitmap = Bitmap { File = "sx03256.png"; }; -}; - -// script, dialog: -Image RID_IMG_SCRIPTLIB -{ - ImageBitmap = Bitmap { File = "im30820.png"; }; -}; - -Image RID_IMG_DIALOGLIB -{ - ImageBitmap = Bitmap { File = "dialogfolder_16.png"; }; -}; - -// configuration: -Image RID_IMG_CONF_XML -{ - ImageBitmap = Bitmap { File = "xml_16.png"; }; -}; - -// component, typelib: -Image RID_IMG_COMPONENT -{ - ImageBitmap = Bitmap { File = "component_16.png"; }; -}; - -Image RID_IMG_JAVA_COMPONENT -{ - ImageBitmap = Bitmap { File = "javacomponent_16.png"; }; -}; - -Image RID_IMG_TYPELIB -{ - ImageBitmap = Bitmap { File = "library_16.png"; }; -}; - -Image RID_IMG_JAVA_TYPELIB -{ - ImageBitmap = Bitmap { File = "javalibrary_16.png"; }; -}; - -Image RID_IMG_HELP -{ - ImageBitmap = Bitmap { File = "sc_helperdialog.png"; }; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/desktop/source/deployment/registry/component/dp_component.cxx b/desktop/source/deployment/registry/component/dp_component.cxx index 97b72f3c9978..a6ddce438442 100644 --- a/desktop/source/deployment/registry/component/dp_component.cxx +++ b/desktop/source/deployment/registry/component/dp_component.cxx @@ -496,34 +496,34 @@ BackendImpl::BackendImpl( "application/vnd.sun.star.uno-component;type=native;platform=" + getPlatformString(), "*" SAL_DLLEXTENSION, - getResourceString(RID_STR_DYN_COMPONENT), - RID_IMG_COMPONENT) ), + getResourceString(RID_STR_DYN_COMPONENT) + ) ), m_xJavaComponentTypeInfo( new Package::TypeInfo( "application/vnd.sun.star.uno-component;type=Java", "*.jar", - getResourceString(RID_STR_JAVA_COMPONENT), - RID_IMG_JAVA_COMPONENT) ), + getResourceString(RID_STR_JAVA_COMPONENT) + ) ), m_xPythonComponentTypeInfo( new Package::TypeInfo( "application/vnd.sun.star.uno-component;type=Python", "*.py", getResourceString( - RID_STR_PYTHON_COMPONENT), - RID_IMG_COMPONENT ) ), + RID_STR_PYTHON_COMPONENT) + ) ), m_xComponentsTypeInfo( new Package::TypeInfo( "application/vnd.sun.star.uno-components", "*.components", - getResourceString(RID_STR_COMPONENTS), - RID_IMG_COMPONENT ) ), + getResourceString(RID_STR_COMPONENTS) + ) ), m_xRDBTypelibTypeInfo( new Package::TypeInfo( "application/vnd.sun.star.uno-typelibrary;type=RDB", "*.rdb", - getResourceString(RID_STR_RDB_TYPELIB), - RID_IMG_TYPELIB ) ), + getResourceString(RID_STR_RDB_TYPELIB) + ) ), m_xJavaTypelibTypeInfo( new Package::TypeInfo( "application/vnd.sun.star.uno-typelibrary;type=Java", "*.jar", - getResourceString(RID_STR_JAVA_TYPELIB), - RID_IMG_JAVA_TYPELIB ) ), + getResourceString(RID_STR_JAVA_TYPELIB) + ) ), m_typeInfos( 6 ) { m_typeInfos[ 0 ] = m_xDynComponentTypeInfo; diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.cxx b/desktop/source/deployment/registry/configuration/dp_configuration.cxx index b508c8a1ba5b..dcd30b46c497 100644 --- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx +++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx @@ -187,13 +187,13 @@ BackendImpl::BackendImpl( m_xConfDataTypeInfo( new Package::TypeInfo( "application/vnd.sun.star.configuration-data", "*.xcu", - getResourceString(RID_STR_CONF_DATA), - RID_IMG_CONF_XML ) ), + getResourceString(RID_STR_CONF_DATA) + ) ), m_xConfSchemaTypeInfo( new Package::TypeInfo( "application/vnd.sun.star.configuration-schema", "*.xcs", - getResourceString(RID_STR_CONF_SCHEMA), - RID_IMG_CONF_XML ) ), + getResourceString(RID_STR_CONF_SCHEMA) + ) ), m_typeInfos( 2 ) { m_typeInfos[ 0 ] = m_xConfDataTypeInfo; diff --git a/desktop/source/deployment/registry/dp_backend.cxx b/desktop/source/deployment/registry/dp_backend.cxx index 7393d9ba6b8b..122706966069 100644 --- a/desktop/source/deployment/registry/dp_backend.cxx +++ b/desktop/source/deployment/registry/dp_backend.cxx @@ -808,27 +808,15 @@ OUString Package::TypeInfo::getShortDescription() return m_shortDescr; } - OUString Package::TypeInfo::getFileFilter() throw (RuntimeException, std::exception) { return m_fileFilter; } - -/************************** - * Get Icon - * - * @param highContrast NOTE: disabled the returning of high contrast icons. - * This bool is a noop now. - * @param smallIcon Return the small version of the icon - */ -Any Package::TypeInfo::getIcon( sal_Bool /*highContrast*/, sal_Bool smallIcon ) +Any Package::TypeInfo::getIcon( sal_Bool /*highContrast*/, sal_Bool /*smallIcon*/ ) throw (RuntimeException, std::exception) { - if (! smallIcon) - return Any(); - const sal_uInt16 nIconId = m_smallIcon; - return Any( &nIconId, cppu::UnoType::get() ); + return Any(); } } diff --git a/desktop/source/deployment/registry/executable/dp_executable.cxx b/desktop/source/deployment/registry/executable/dp_executable.cxx index c400a0b7eb0c..118210452ec5 100644 --- a/desktop/source/deployment/registry/executable/dp_executable.cxx +++ b/desktop/source/deployment/registry/executable/dp_executable.cxx @@ -107,7 +107,7 @@ BackendImpl::BackendImpl( : PackageRegistryBackend( args, xComponentContext ), m_xExecutableTypeInfo(new Package::TypeInfo( "application/vnd.sun.star.executable", - "", "Executable", RID_IMG_COMPONENT ) ) + "", "Executable" ) ) { if (!transientMode()) { diff --git a/desktop/source/deployment/registry/help/dp_help.cxx b/desktop/source/deployment/registry/help/dp_help.cxx index 436452acbace..4b5f78e8393d 100644 --- a/desktop/source/deployment/registry/help/dp_help.cxx +++ b/desktop/source/deployment/registry/help/dp_help.cxx @@ -132,8 +132,8 @@ BackendImpl::BackendImpl( : PackageRegistryBackend( args, xComponentContext ), m_xHelpTypeInfo( new Package::TypeInfo("application/vnd.sun.star.help", OUString(), - getResourceString(RID_STR_HELP), - RID_IMG_HELP ) ), + getResourceString(RID_STR_HELP) + ) ), m_typeInfos( 1 ) { m_typeInfos[ 0 ] = m_xHelpTypeInfo; diff --git a/desktop/source/deployment/registry/inc/dp_backend.h b/desktop/source/deployment/registry/inc/dp_backend.h index b126f4b132dd..deba0dda93f2 100644 --- a/desktop/source/deployment/registry/inc/dp_backend.h +++ b/desktop/source/deployment/registry/inc/dp_backend.h @@ -107,16 +107,13 @@ public: const OUString m_mediaType; const OUString m_fileFilter; const OUString m_shortDescr; - const sal_uInt16 m_smallIcon; public: virtual ~TypeInfo() override; TypeInfo( OUString const & mediaType, OUString const & fileFilter, - OUString const & shortDescr, - sal_uInt16 smallIcon) + OUString const & shortDescr ) : m_mediaType(mediaType), m_fileFilter(fileFilter), - m_shortDescr(shortDescr), - m_smallIcon(smallIcon) + m_shortDescr(shortDescr) {} // XPackageTypeInfo virtual OUString SAL_CALL getMediaType() diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx index 01a15b425e4a..12ad4ad0fbe8 100644 --- a/desktop/source/deployment/registry/package/dp_package.cxx +++ b/desktop/source/deployment/registry/package/dp_package.cxx @@ -299,13 +299,13 @@ BackendImpl::BackendImpl( m_xBundleTypeInfo( new Package::TypeInfo( "application/vnd.sun.star.package-bundle", "*.oxt;*.uno.pkg", - getResourceString(RID_STR_PACKAGE_BUNDLE), - RID_IMG_DEF_PACKAGE_BUNDLE ) ), + getResourceString(RID_STR_PACKAGE_BUNDLE) + ) ), m_xLegacyBundleTypeInfo( new Package::TypeInfo( "application/vnd.sun.star.legacy-package-bundle", "*.zip", - m_xBundleTypeInfo->getShortDescription(), - RID_IMG_DEF_PACKAGE_BUNDLE ) ), + m_xBundleTypeInfo->getShortDescription() + ) ), m_typeInfos(2) { m_typeInfos[ 0 ] = m_xBundleTypeInfo; diff --git a/desktop/source/deployment/registry/script/dp_script.cxx b/desktop/source/deployment/registry/script/dp_script.cxx index 43bcdd14b844..c236af97fc9a 100644 --- a/desktop/source/deployment/registry/script/dp_script.cxx +++ b/desktop/source/deployment/registry/script/dp_script.cxx @@ -147,13 +147,13 @@ BackendImpl::BackendImpl( m_xBasicLibTypeInfo( new Package::TypeInfo( "application/vnd.sun.star.basic-library", OUString() /* no file filter */, - getResourceString(RID_STR_BASIC_LIB), - RID_IMG_SCRIPTLIB) ), + getResourceString(RID_STR_BASIC_LIB) + ) ), m_xDialogLibTypeInfo( new Package::TypeInfo( "application/vnd.sun.star.dialog-library", OUString() /* no file filter */, - getResourceString(RID_STR_DIALOG_LIB), - RID_IMG_DIALOGLIB) ), + getResourceString(RID_STR_DIALOG_LIB) + ) ), m_typeInfos( 2 ) { m_typeInfos[ 0 ] = m_xBasicLibTypeInfo; diff --git a/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx b/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx index 687e651b0cb2..adf1f93e6cf4 100644 --- a/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx +++ b/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx @@ -173,8 +173,8 @@ BackendImpl::BackendImpl( m_xTypeInfo( new Package::TypeInfo( "application/vnd.sun.star.framework-script", OUString() /* no file filter */, - "Scripting Framework Script Library", - RID_IMG_SCRIPTLIB ) ) + "Scripting Framework Script Library" + ) ) { if (! transientMode()) { diff --git a/offapi/com/sun/star/deployment/XPackageTypeInfo.idl b/offapi/com/sun/star/deployment/XPackageTypeInfo.idl index 426b0aa6e529..85d6c49a0dfd 100644 --- a/offapi/com/sun/star/deployment/XPackageTypeInfo.idl +++ b/offapi/com/sun/star/deployment/XPackageTypeInfo.idl @@ -69,14 +69,12 @@ interface XPackageTypeInfo /** returns an icon for a package. @param highContrast - return high contrast icon + argument is ignored @param smallIcon - return a small icon (e.g. 16x16 pixel), - else return a big one (e.g. 26x26 pixel) + argument is ignored @return - currently an unsigned short - (resource id for deploymentgui resource file), - `VOID` any if none is available + empty any + @deprecated */ any getIcon( [in] boolean highContrast, [in] boolean smallIcon ); }; -- cgit