public object Clone() { k_Tree lk_Clone = new k_Tree(mb_AllowDuplicateKeys, mk_Comparer); lk_Clone.mi_Count = mi_Count; CloneRecursive(mk_Head, null, ref lk_Clone.mk_Head); lk_Clone.mk_Left = k_Tree.LeftMost(lk_Clone.mk_Head); lk_Clone.mk_Right = k_Tree.RightMost(lk_Clone.mk_Head); return(lk_Clone); }
// constructors /** * Constructs a new <CODE>PdfBody</CODE>. * @param writer */ internal PdfBody(PdfWriter writer) { xrefs = new k_Tree(); xrefs[new PdfCrossReference(0, 0, 65535)] = null; position = writer.Os.Counter; refnum = 1; this.writer = writer; }
/** * Adds the local destinations to the body of the document. * @param dest the <CODE>Hashtable</CODE> containing the destinations * @throws IOException on error */ internal void AddLocalDestinations(k_Tree dest) { foreach (String name in dest.Keys) { Object[] obj = (Object[])dest[name]; PdfDestination destination = (PdfDestination)obj[2]; if (destination == null) throw new Exception("The name '" + name + "' has no local destination."); if (obj[1] == null) obj[1] = PdfIndirectReference; AddToBody(destination, (PdfIndirectReference)obj[1]); } }
public k_PinnedNodeIterator(k_Tree ak_Tree, k_Node ak_Node) : base(ak_Tree, ak_Node) { }
public k_NodeIterator(k_Tree ak_Tree, k_Node ak_Node) { mk_Tree = ak_Tree; mk_Current = ak_Node; }
public object Clone() { k_Tree lk_Clone = new k_Tree(mb_AllowDuplicateKeys, mk_Comparer); lk_Clone.mi_Count = mi_Count; CloneRecursive(mk_Head, null, ref lk_Clone.mk_Head); lk_Clone.mk_Left = k_Tree.LeftMost(lk_Clone.mk_Head); lk_Clone.mk_Right = k_Tree.RightMost(lk_Clone.mk_Head); return lk_Clone; }
public k_NodeIterator(k_Tree ak_Tree, k_Node ak_Node) { mk_Tree = ak_Tree; mk_Current = ak_Node; }
public k_PinnedNodeIterator(k_Tree ak_Tree, k_Node ak_Node) : base(ak_Tree, ak_Node) { }
/** * Adds the names of the named destinations to the catalog. * @param localDestinations the local destinations * @param documentJavaScript the javascript used in the document * @param writer the writer the catalog applies to */ internal void AddNames(k_Tree localDestinations, ArrayList documentJavaScript, Hashtable documentFileAttachment, PdfWriter writer) { if (localDestinations.Count == 0 && documentJavaScript.Count == 0 && documentFileAttachment.Count == 0) return; PdfDictionary names = new PdfDictionary(); if (localDestinations.Count > 0) { PdfArray ar = new PdfArray(); foreach (DictionaryEntry entry in localDestinations) { String name = (String)entry.Key; Object[] obj = (Object[])entry.Value; PdfIndirectReference refi = (PdfIndirectReference)obj[1]; ar.Add(new PdfString(name)); ar.Add(refi); } PdfDictionary dests = new PdfDictionary(); dests.Put(PdfName.NAMES, ar); names.Put(PdfName.DESTS, writer.AddToBody(dests).IndirectReference); } if (documentJavaScript.Count > 0) { String[] s = new String[documentJavaScript.Count]; for (int k = 0; k < s.Length; ++k) s[k] = k.ToString("X"); Array.Sort(s); PdfArray ar = new PdfArray(); for (int k = 0; k < s.Length; ++k) { ar.Add(new PdfString(s[k])); ar.Add((PdfIndirectReference)documentJavaScript[k]); } PdfDictionary js = new PdfDictionary(); js.Put(PdfName.NAMES, ar); names.Put(PdfName.JAVASCRIPT, writer.AddToBody(js).IndirectReference); } if (documentFileAttachment.Count > 0) { names.Put(PdfName.EMBEDDEDFILES, writer.AddToBody(PdfNameTree.WriteTree(documentFileAttachment, writer)).IndirectReference); } Put(PdfName.NAMES, writer.AddToBody(names).IndirectReference); }
/** Creates a new PdfPageLabel with a default logical page 1 */ public PdfPageLabels() { map = new k_Tree(false, this); AddPageLabel(1, DECIMAL_ARABIC_NUMERALS, null, 1); }