Skip to content

Commit

Permalink
Merge branch 'develop' into devsecops
Browse files Browse the repository at this point in the history
  • Loading branch information
aleks-ivanov committed Aug 19, 2023
2 parents 3452c5b + 3d0997c commit 6133cdb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
19 changes: 9 additions & 10 deletions itext/itext.layout/itext/layout/tagging/LayoutTaggingHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,13 @@ public virtual void AddKidsHint(TaggingHintKey parentKey, ICollection<TaggingHin
}

public virtual void SetRoleHint(IPropertyContainer hintOwner, String role) {
// TODO
// It's unclear whether a role of already created tag should be changed
// in this case. Also concerning rules, they won't be called for the new role
// if this overriding role is set after some rule applying event. Already applied
// rules won't be cancelled either.
// Restricting this call on whether the finished state is set doesn't really
// solve anything.
// TODO probably this also should affect whether the hint is considered non-accessible
// Probably this also should affect whether the hint is considered non-accessible
GetOrCreateHintKey(hintOwner).SetOverriddenRole(role);
}

Expand Down Expand Up @@ -298,14 +297,14 @@ public virtual void ReleaseAllHints() {
hangingHints.Add(entry.Value);
}
foreach (TaggingHintKey hint in hangingHints) {
// TODO in some situations we need to remove tagging hints of renderers that are thrown away for reasons like:
// In some situations we need to remove tagging hints of renderers that are thrown away for reasons like:
// - fixed height clipping
// - forced placement
// - some other cases?
// if (!hint.isFinished()) {
// Logger logger = LoggerFactory.getLogger(LayoutTaggingHelper.class);
// logger.warn(LogMessageConstant.TAGGING_HINT_NOT_FINISHED_BEFORE_CLOSE);
// }
// if (!hint.isFinished()) {
// Logger logger = LoggerFactory.getLogger(LayoutTaggingHelper.class);
// logger.warn(LogMessageConstant.TAGGING_HINT_NOT_FINISHED_BEFORE_CLOSE);
// }
ReleaseHint(hint, null, false);
}
System.Diagnostics.Debug.Assert(parentHints.IsEmpty());
Expand Down Expand Up @@ -484,9 +483,9 @@ private void AddKidsHint(TaggingHintKey parentKey, ICollection<TaggingHintKey> n
}
TaggingHintKey prevParent = GetParentHint(kidKey);
if (prevParent != null) {
// TODO seems to be a legit use case to re-add hints to just ensure that hints are added
// Logger logger = LoggerFactory.getLogger(LayoutTaggingHelper.class);
// logger.error(LogMessageConstant.CANNOT_ADD_KID_HINT_WHICH_IS_ALREADY_ADDED_TO_ANOTHER_PARENT);
// Seems to be a legit use case to re-add hints to just ensure that hints are added
// Logger logger = LoggerFactory.getLogger(LayoutTaggingHelper.class);
// logger.error(LogMessageConstant.CANNOT_ADD_KID_HINT_WHICH_IS_ALREADY_ADDED_TO_ANOTHER_PARENT);
continue;
}
if (!skipFinishedChecks && kidKey.IsFinished()) {
Expand Down
2 changes: 1 addition & 1 deletion port-hash
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ce1a909079af2dad4a4b447b0553f1d8e32e8248
2d91585c3db731e2880f8d31fd060cba2ef395c6

0 comments on commit 6133cdb

Please sign in to comment.