summaryrefslogtreecommitdiff
path: root/oox
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 /oox
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 'oox')
-rw-r--r--oox/README4
-rw-r--r--oox/source/export/shapes.cxx16
2 files changed, 10 insertions, 10 deletions
diff --git a/oox/README b/oox/README
index 7f127b617981..6c459f58c92a 100644
--- a/oox/README
+++ b/oox/README
@@ -157,7 +157,7 @@ http://www.microsoft.com/en-us/download/details.aspx?id=30425
== Export ==
Here is how LO's enhanced custom shapes are exported:
* Shape name is ooxml-* - they are imported from ooxml, export as is.
-* Blacklist - ODF presets that has OOXML equivalent.
+* Denylist - ODF presets that has OOXML equivalent.
We convert adjustment values case by case. Microsoft Office
is rather strict about adjustment values, either none of them
are provided so that default values are taken, or the exact set
@@ -165,7 +165,7 @@ Here is how LO's enhanced custom shapes are exported:
from the preset with less handles to the one with more handles
so that default values suitable for the odf one need to be
provided.
-* Whitelist - ODF presets that has OOXML equivalent but looks a bit
+* Allowlist - ODF presets that has OOXML equivalent but looks a bit
different, export them as PolyPolygon.
Check Andras Timar's presentation[1] and ShapeExport::WriteCustomShape()
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index c1982961537b..09c5bc386eac 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -518,9 +518,9 @@ ShapeExport& ShapeExport::WriteGroupShape(const uno::Reference<drawing::XShape>&
return *this;
}
-static bool lcl_IsOnBlacklist(OUString const & rShapeType)
+static bool lcl_IsOnDenylist(OUString const & rShapeType)
{
- static const std::initializer_list<OUStringLiteral> vBlacklist = {
+ static const std::initializer_list<OUStringLiteral> vDenylist = {
"block-arc",
"rectangle",
"ellipse",
@@ -582,7 +582,7 @@ static bool lcl_IsOnBlacklist(OUString const & rShapeType)
"flowchart-display"
};
- return std::find(vBlacklist.begin(), vBlacklist.end(), rShapeType) != vBlacklist.end();
+ return std::find(vDenylist.begin(), vDenylist.end(), rShapeType) != vDenylist.end();
}
static bool lcl_IsOnWhitelist(OUString const & rShapeType)
@@ -812,20 +812,20 @@ ShapeExport& ShapeExport::WriteCustomShape( const Reference< XShape >& xShape )
// we export non-primitive shapes to custom geometry
// we also export non-ooxml shapes which have handles/equations to custom geometry, because
// we cannot convert ODF equations to DrawingML equations. TODO: see what binary DOC export filter does.
- // but our WritePolyPolygon()/WriteCustomGeometry() functions are incomplete, therefore we use a blacklist
+ // but our WritePolyPolygon()/WriteCustomGeometry() functions are incomplete, therefore we use a denylist
// we use a whitelist for shapes where mapping to MSO preset shape is not optimal
bool bCustGeom = true;
- bool bOnBlacklist = false;
+ bool bOnDenylist = false;
if( sShapeType == "ooxml-non-primitive" )
bCustGeom = true;
else if( sShapeType.startsWith("ooxml") )
bCustGeom = false;
else if( lcl_IsOnWhitelist(sShapeType) )
bCustGeom = true;
- else if( lcl_IsOnBlacklist(sShapeType) )
+ else if( lcl_IsOnDenylist(sShapeType) )
{
bCustGeom = false;
- bOnBlacklist = true;
+ bOnDenylist = true;
}
else if( bHasHandles )
bCustGeom = true;
@@ -853,7 +853,7 @@ ShapeExport& ShapeExport::WriteCustomShape( const Reference< XShape >& xShape )
if (!bSuccess)
WritePresetShape( sPresetShape );
}
- else if (bOnBlacklist && bHasHandles && nAdjustmentValuesIndex !=-1 && !sShapeType.startsWith("mso-spt"))
+ else if (bOnDenylist && bHasHandles && nAdjustmentValuesIndex !=-1 && !sShapeType.startsWith("mso-spt"))
{
WriteShapeTransformation( xShape, XML_a, bFlipH, bFlipV );
Sequence< EnhancedCustomShapeAdjustmentValue > aAdjustmentSeq;