Skip to content

Commit dfc34e9

Browse files
yulian-gaponenkoitext-teamcity
authored andcommitted
Close for now API that exposes one to one relationship for waiting tags
DEVSIX-1236 Autoported commit. Original commit hash: [50988de88]
1 parent 1d55d93 commit dfc34e9

File tree

3 files changed

+12
-26
lines changed

3 files changed

+12
-26
lines changed

itext.tests/itext.kernel.tests/itext/kernel/pdf/TagTreePointerTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ public virtual void TagTreePointerTest06() {
224224
String actualText1 = "Some looong latin text";
225225
tagPointer.GetProperties().SetActualText(actualText1);
226226
WaitingTagsManager waitingTagsManager = document.GetTagStructureContext().GetWaitingTagsManager();
227-
NUnit.Framework.Assert.IsNull(waitingTagsManager.GetAssociatedObject(tagPointer));
227+
// assertNull(waitingTagsManager.getAssociatedObject(tagPointer));
228228
Object associatedObj = new Object();
229229
waitingTagsManager.AssignWaitingState(tagPointer, associatedObj);
230230
tagPointer.MoveToRoot().MoveToKid(PdfName.Table).MoveToKid(1, PdfName.TR).GetProperties().SetActualText("More latin text"

itext/itext.kernel/itext/kernel/pdf/tagutils/WaitingTagsManager.cs

Lines changed: 10 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ namespace iText.Kernel.Pdf.Tagutils {
1717
/// </p>
1818
/// <p>
1919
/// Waiting state of tags is defined by the association with arbitrary objects instances.
20-
/// This mapping is one to one: for every waiting tag there is always exactly one associated object.
2120
/// </p>
2221
/// Waiting state could also be perceived as a temporal association of the object to some particular tag.
2322
/// </remarks>
@@ -115,29 +114,16 @@ public virtual bool TryMovePointerToWaitingTag(TagTreePointer tagPointer, Object
115114
return false;
116115
}
117116

118-
/// <summary>
119-
/// Gets an object that is associated with the tag (if there is one) at which given
120-
/// <see cref="TagTreePointer"/>
121-
/// points.
122-
/// Essentially, this method could be used as indication that current tag has waiting state.
123-
/// </summary>
124-
/// <param name="pointer">
125-
/// a
126-
/// <see cref="TagTreePointer"/>
127-
/// which points at the tag for which associated object is to be retrieved.
128-
/// </param>
129-
/// <returns>
130-
/// an object that is associated with the tag at which given
131-
/// <see cref="TagTreePointer"/>
132-
/// points, or null if
133-
/// current tag of the
134-
/// <see cref="TagTreePointer"/>
135-
/// is not a waiting tag.
136-
/// </returns>
137-
public virtual Object GetAssociatedObject(TagTreePointer pointer) {
138-
return GetObjForStructDict(pointer.GetCurrentStructElem().GetPdfObject());
139-
}
140-
117+
// /**
118+
// * Gets an object that is associated with the tag (if there is one) at which given {@link TagTreePointer} points.
119+
// * Essentially, this method could be used as indication that current tag has waiting state.
120+
// * @param pointer a {@link TagTreePointer} which points at the tag for which associated object is to be retrieved.
121+
// * @return an object that is associated with the tag at which given {@link TagTreePointer} points, or null if
122+
// * current tag of the {@link TagTreePointer} is not a waiting tag.
123+
// */
124+
// public Object getAssociatedObject(TagTreePointer pointer) {
125+
// return getObjForStructDict(pointer.getCurrentStructElem().getPdfObject());
126+
// }
141127
/// <summary>Removes waiting state of the tag which is associated with the given object.</summary>
142128
/// <remarks>
143129
/// Removes waiting state of the tag which is associated with the given object.

port-hash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
a5659783ef61b5269074a10ac81b1e44e2ed83e8
1+
50988de885fbe81f79d78b2a6c3bee0d9a72b187

0 commit comments

Comments
 (0)