protected bool ApplyAnchor(Chunk chunk, bool notGotoOK, bool localDestination)
{
if (name != null && notGotoOK && !chunk.IsEmpty()) {
chunk.SetLocalDestination(name);
notGotoOK = false;
}
if (localDestination) {
chunk.SetLocalGoto(reference.Substring(1));
} else if (reference != null)
chunk.SetAnchor(reference);
return notGotoOK;
}