[Libreoffice-commits] core.git: desktop/AllLangResTarget_deploymentgui.mk desktop/inc desktop/source offapi/com
Caolán McNamara
caolanm at redhat.com
Wed Jan 18 11:12:49 UTC 2017
desktop/AllLangResTarget_deploymentgui.mk | 4
desktop/inc/deployment.hrc | 9 -
desktop/source/deployment/gui/dp_gui_backend.src | 71 ----------
desktop/source/deployment/registry/component/dp_component.cxx | 24 +--
desktop/source/deployment/registry/configuration/dp_configuration.cxx | 8 -
desktop/source/deployment/registry/dp_backend.cxx | 16 --
desktop/source/deployment/registry/executable/dp_executable.cxx | 2
desktop/source/deployment/registry/help/dp_help.cxx | 4
desktop/source/deployment/registry/inc/dp_backend.h | 7
desktop/source/deployment/registry/package/dp_package.cxx | 8 -
desktop/source/deployment/registry/script/dp_script.cxx | 8 -
desktop/source/deployment/registry/sfwk/dp_sfwk.cxx | 4
offapi/com/sun/star/deployment/XPackageTypeInfo.idl | 10 -
13 files changed, 37 insertions(+), 138 deletions(-)
New commits:
commit feb3b3dbda7af2ba7f2d36dd9174a30912d9cf63
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jan 18 11:05:58 2017 +0000
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
diff --git a/desktop/AllLangResTarget_deploymentgui.mk b/desktop/AllLangResTarget_deploymentgui.mk
index bc9012f..b7b9d14 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 4b16b30..42ca228 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 39fff6d..0000000
--- 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 97b72f3..a6ddce4 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 b508c8a..dcd30b4 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 7393d9b..1227069 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 c400a0b..1182104 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 436452a..4b5f78e 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 b126f4b..deba0dd 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 01a15b4..12ad4ad 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 43bcdd1..c236af9 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 687e651..adf1f93 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 426b0aa..85d6c49 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 );
};
More information about the Libreoffice-commits
mailing list