diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-01-18 11:05:58 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-01-18 11:12:15 +0000 |
commit | feb3b3dbda7af2ba7f2d36dd9174a30912d9cf63 (patch) | |
tree | f74a44fed54d27255e7ae7cefc61dc91e5e1f2aa /desktop/source/deployment/registry | |
parent | cce54bf33808dc7422ded08a7d4d38fb0194a047 (diff) |
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
Diffstat (limited to 'desktop/source/deployment/registry')
9 files changed, 33 insertions, 48 deletions
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<cppu::UnoUnsignedShortType>::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()) { |