diff options
author | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2020-07-06 03:39:12 +0200 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2020-07-10 01:36:07 +0200 |
commit | abb6c01519a0318d7165dc9dc5b7d185353f93d6 (patch) | |
tree | 3b6fa1fc13fba77efc13ee3283c3e6c145bd4252 /oox | |
parent | 493ae7a6bb0c3ad50615db0090e7ae8d391bc327 (diff) |
replace usage of whitelist with allowlist
Background and motivation:
https://tools.ietf.org/html/draft-knodel-terminology-02
[API CHANGE] officecfg::Office::Common::Misc::OpenCLWhiteList -> OpenCLAllowList
Change-Id: I65636b19b13e4af1e4851f70e78053f3443d6bb1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98181
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/diagram/diagramlayoutatoms.cxx | 2 | ||||
-rw-r--r-- | oox/source/export/shapes.cxx | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx index 36b361db9a3b..babc65ac88c7 100644 --- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx +++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx @@ -340,7 +340,7 @@ void ConstraintAtom::accept( LayoutAtomVisitor& rVisitor ) void ConstraintAtom::parseConstraint(std::vector<Constraint>& rConstraints, bool bRequireForName) const { - // Whitelist for cases where empty forName is handled. + // Allowlist for cases where empty forName is handled. if (bRequireForName) { switch (maConstraint.mnType) diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index 09c5bc386eac..6ca713ade63d 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -585,14 +585,14 @@ static bool lcl_IsOnDenylist(OUString const & rShapeType) return std::find(vDenylist.begin(), vDenylist.end(), rShapeType) != vDenylist.end(); } -static bool lcl_IsOnWhitelist(OUString const & rShapeType) +static bool lcl_IsOnAllowlist(OUString const & rShapeType) { - static const std::initializer_list<OUStringLiteral> vWhitelist = { + static const std::initializer_list<OUStringLiteral> vAllowlist = { "heart", "puzzle" }; - return std::find(vWhitelist.begin(), vWhitelist.end(), rShapeType) != vWhitelist.end(); + return std::find(vAllowlist.begin(), vAllowlist.end(), rShapeType) != vAllowlist.end(); } static bool lcl_GetHandlePosition( sal_Int32 &nValue, const EnhancedCustomShapeParameter &rParam, Sequence< EnhancedCustomShapeAdjustmentValue > &rSeq) @@ -813,14 +813,14 @@ ShapeExport& ShapeExport::WriteCustomShape( const Reference< XShape >& xShape ) // 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 denylist - // we use a whitelist for shapes where mapping to MSO preset shape is not optimal + // we use a allowlist for shapes where mapping to MSO preset shape is not optimal bool bCustGeom = true; bool bOnDenylist = false; if( sShapeType == "ooxml-non-primitive" ) bCustGeom = true; else if( sShapeType.startsWith("ooxml") ) bCustGeom = false; - else if( lcl_IsOnWhitelist(sShapeType) ) + else if( lcl_IsOnAllowlist(sShapeType) ) bCustGeom = true; else if( lcl_IsOnDenylist(sShapeType) ) { |