summaryrefslogtreecommitdiff
path: root/desktop/source
diff options
context:
space:
mode:
authorThorsten Behrens <Thorsten.Behrens@CIB.de>2020-07-06 03:01:51 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2020-07-10 01:34:54 +0200
commit493ae7a6bb0c3ad50615db0090e7ae8d391bc327 (patch)
tree9f60f522f1ff9dde6a8131d155654f4d47b37fd0 /desktop/source
parent005f5db47b8e1bbd7ebddee92009be072e835fd5 (diff)
replace usage of blacklist with denylist
.. and a few cases of instead doing blacklist->excludelist where that made more sense. Background and motivation: https://tools.ietf.org/html/draft-knodel-terminology-02 [API CHANGE] officecfg::Office::Canvas::DeviceBlacklist -> DeviceDenylist [API CHANGE] officecfg::Office::Canvas::BlacklistCurrentDevice -> DenylistCurrentDevice [API CHANGE] officecfg::Office::Common::Misc::OpenCLBlackList -> OpenCLDenyList Change-Id: Ia35e25496bf0cc0692d5de4cb66bfc232d3a869e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98180 Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'desktop/source')
-rw-r--r--desktop/source/deployment/inc/dp_descriptioninfoset.hxx6
-rw-r--r--desktop/source/deployment/misc/dp_descriptioninfoset.cxx24
-rw-r--r--desktop/source/migration/migration.cxx8
-rw-r--r--desktop/source/migration/services/oo3extensionmigration.cxx14
-rw-r--r--desktop/source/migration/services/oo3extensionmigration.hxx2
5 files changed, 27 insertions, 27 deletions
diff --git a/desktop/source/deployment/inc/dp_descriptioninfoset.hxx b/desktop/source/deployment/inc/dp_descriptioninfoset.hxx
index b404751fce52..27b857b241ab 100644
--- a/desktop/source/deployment/inc/dp_descriptioninfoset.hxx
+++ b/desktop/source/deployment/inc/dp_descriptioninfoset.hxx
@@ -252,16 +252,16 @@ private:
SAL_DLLPRIVATE OUString
getNodeValueFromExpression(OUString const & expression) const;
- /** Check the extensions blacklist if additional extension meta data (e.g. dependencies)
+ /** Check the extensions denylist if additional extension meta data (e.g. dependencies)
are defined for this extension and have to be taken into account.
*/
SAL_DLLPRIVATE void
- checkBlacklist() const;
+ checkDenylist() const;
/** Helper method to compare the versions with the current version
*/
SAL_DLLPRIVATE static bool
- checkBlacklistVersion(const OUString& currentversion,
+ checkDenylistVersion(const OUString& currentversion,
css::uno::Sequence< OUString > const & versions);
css::uno::Reference< css::uno::XComponentContext > m_context;
diff --git a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
index 549528aae042..3a55a4483e18 100644
--- a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
+++ b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
@@ -342,7 +342,7 @@ OUString DescriptionInfoset::getNodeValueFromExpression(OUString const & express
return n.is() ? getNodeValue(n) : OUString();
}
-void DescriptionInfoset::checkBlacklist() const
+void DescriptionInfoset::checkDenylist() const
{
if (!m_element.is())
return;
@@ -358,25 +358,25 @@ void DescriptionInfoset::checkBlacklist() const
{
{"nodepath", css::uno::Any(OUString("/org.openoffice.Office.ExtensionDependencies/Extensions"))}
}));
- css::uno::Reference< css::container::XNameAccess > blacklist(
+ css::uno::Reference< css::container::XNameAccess > denylist(
(css::configuration::theDefaultProvider::get(m_context)
->createInstanceWithArguments(
"com.sun.star.configuration.ConfigurationAccess", args)),
css::uno::UNO_QUERY_THROW);
- // check first if a blacklist entry is available
- if (!(blacklist.is() && blacklist->hasByName(*id))) return;
+ // check first if a denylist entry is available
+ if (!(denylist.is() && denylist->hasByName(*id))) return;
css::uno::Reference< css::beans::XPropertySet > extProps(
- blacklist->getByName(*id), css::uno::UNO_QUERY_THROW);
+ denylist->getByName(*id), css::uno::UNO_QUERY_THROW);
css::uno::Any anyValue = extProps->getPropertyValue("Versions");
css::uno::Sequence< OUString > blversions;
anyValue >>= blversions;
- // check if the current version requires further dependency checks from the blacklist
- if (!checkBlacklistVersion(currentversion, blversions)) return;
+ // check if the current version requires further dependency checks from the denylist
+ if (!checkDenylistVersion(currentversion, blversions)) return;
anyValue = extProps->getPropertyValue("Dependencies");
OUString udeps;
@@ -404,7 +404,7 @@ void DescriptionInfoset::checkBlacklist() const
// get the parent xml document of current description info for the import
css::uno::Reference< css::xml::dom::XDocument > xCurrentDescInfo(m_element->getOwnerDocument());
- // get dependency node of current description info to merge the new dependencies from the blacklist
+ // get dependency node of current description info to merge the new dependencies from the denylist
css::uno::Reference< css::xml::dom::XNode > xCurrentDeps(
m_xpath->selectSingleNode(m_element, "desc:dependencies"));
@@ -422,14 +422,14 @@ void DescriptionInfoset::checkBlacklist() const
css::uno::Reference< css::xml::dom::XNode > xNode(xDeps->item(i));
css::uno::Reference< css::xml::dom::XElement > xDep(xNode, css::uno::UNO_QUERY);
if (xDep.is()) {
- // found valid blacklist dependency, import the node first and append it to the existing dependency node
+ // found valid denylist dependency, import the node first and append it to the existing dependency node
css::uno::Reference< css::xml::dom::XNode > importedNode = xCurrentDescInfo->importNode(xNode, true);
xCurrentDeps->appendChild(importedNode);
}
}
}
-bool DescriptionInfoset::checkBlacklistVersion(
+bool DescriptionInfoset::checkDenylistVersion(
const OUString& currentversion,
css::uno::Sequence< OUString > const & versions)
{
@@ -484,8 +484,8 @@ css::uno::Reference< css::xml::dom::XNodeList >
DescriptionInfoset::getDependencies() const {
if (m_element.is()) {
try {
- // check the extension blacklist first and expand the dependencies if applicable
- checkBlacklist();
+ // check the extension denylist first and expand the dependencies if applicable
+ checkDenylist();
return m_xpath->selectNodeList(m_element, "desc:dependencies/*");
} catch (const css::xml::xpath::XPathException &) {
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx
index 85ce844db1ab..0db171114467 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -774,13 +774,13 @@ void MigrationImpl::runServices()
try {
// set black list for extension migration
- uno::Sequence< OUString > seqExtBlackList;
+ uno::Sequence< OUString > seqExtDenyList;
sal_uInt32 nSize = rMigration.excludeExtensions.size();
if ( nSize > 0 )
- seqExtBlackList = comphelper::arrayToSequence< OUString >(
+ seqExtDenyList = comphelper::arrayToSequence< OUString >(
rMigration.excludeExtensions.data(), nSize );
- seqArguments[2] <<= NamedValue("ExtensionBlackList",
- uno::makeAny( seqExtBlackList ));
+ seqArguments[2] <<= NamedValue("ExtensionDenyList",
+ uno::makeAny( seqExtDenyList ));
xMigrationJob.set(
xContext->getServiceManager()->createInstanceWithArgumentsAndContext(rMigration.service, seqArguments, xContext),
diff --git a/desktop/source/migration/services/oo3extensionmigration.cxx b/desktop/source/migration/services/oo3extensionmigration.cxx
index f8691360f9ff..a9e045ca0a77 100644
--- a/desktop/source/migration/services/oo3extensionmigration.cxx
+++ b/desktop/source/migration/services/oo3extensionmigration.cxx
@@ -192,7 +192,7 @@ bool OO3ExtensionMigration::scanDescriptionXml( const OUString& sDescriptionXmlU
if ( !aExtIdentifier.isEmpty() )
{
// scan extension identifier and try to match with our black list entries
- for (const OUString & i : m_aBlackList)
+ for (const OUString & i : m_aDenyList)
{
utl::SearchParam param(i, utl::SearchParam::SearchType::Regexp);
utl::TextSearch ts(param, LANGUAGE_DONTKNOW);
@@ -217,7 +217,7 @@ bool OO3ExtensionMigration::scanDescriptionXml( const OUString& sDescriptionXmlU
// Try to use the folder name to match our black list
// as some extensions don't provide an identifier in the
// description.xml!
- for (const OUString & i : m_aBlackList)
+ for (const OUString & i : m_aDenyList)
{
utl::SearchParam param(i, utl::SearchParam::SearchType::Regexp);
utl::TextSearch ts(param, LANGUAGE_DONTKNOW);
@@ -297,13 +297,13 @@ void OO3ExtensionMigration::initialize( const Sequence< Any >& aArguments )
OSL_FAIL( "ExtensionMigration::initialize: argument UserData has wrong type!" );
}
}
- else if ( aValue.Name == "ExtensionBlackList" )
+ else if ( aValue.Name == "ExtensionDenyList" )
{
- Sequence< OUString > aBlackList;
- if ( (aValue.Value >>= aBlackList ) && aBlackList.hasElements())
+ Sequence< OUString > aDenyList;
+ if ( (aValue.Value >>= aDenyList ) && aDenyList.hasElements())
{
- m_aBlackList.resize( aBlackList.getLength() );
- ::comphelper::sequenceToArray< OUString >( m_aBlackList.data(), aBlackList );
+ m_aDenyList.resize( aDenyList.getLength() );
+ ::comphelper::sequenceToArray< OUString >( m_aDenyList.data(), aDenyList );
}
}
}
diff --git a/desktop/source/migration/services/oo3extensionmigration.hxx b/desktop/source/migration/services/oo3extensionmigration.hxx
index bb0600208475..f2aae3b4adbb 100644
--- a/desktop/source/migration/services/oo3extensionmigration.hxx
+++ b/desktop/source/migration/services/oo3extensionmigration.hxx
@@ -54,7 +54,7 @@ namespace migration
::osl::Mutex m_aMutex;
OUString m_sSourceDir;
OUString m_sTargetDir;
- TStringVector m_aBlackList;
+ TStringVector m_aDenyList;
enum ScanResult
{