Skip to content

Commit 5044a4d

Browse files
committed
Code refactoring and Setting Rectangle version to latest registered.
1 parent 2c83b60 commit 5044a4d

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ AbstractTrees = ">= 0.2.1"
2222
AdobeGlyphList = ">= 0.1.1"
2323
BinDeps = ">= 0.8.10"
2424
LabelNumerals = ">= 0.1.0"
25-
Rectangle = ">= 0.1.2"
25+
Rectangle = ">= 0.1.1"
2626
RomanNumerals = ">= 0.3.1"
2727
julia = "1.0"
2828

src/PDOutline.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ export PDOutline,
44
pdOutlineItemGetAttr
55

66
using ..Cos
7-
using AbstractTrees
8-
import AbstractTrees: children, printnode
7+
using AbstractTrees: AbstractTrees
98

109
abstract type _ParentNode end
1110

@@ -264,12 +263,13 @@ end
264263
# interfaces. One can use these methods to traverse through the
265264
# PDOutline and PDOutlineItem objects.
266265

267-
children(tn::_ParentNode) = tn.first === nothing ? () : collect(tn.first)
268-
getindex(tn::_ParentNode, i::Int) = children(tn)[i]
266+
AbstractTrees.children(tn::_ParentNode) =
267+
tn.first === nothing ? () : collect(tn.first)
268+
Base.getindex(tn::_ParentNode, i::Int) = AbstractTrees.children(tn)[i]
269269

270-
printnode(io::IO, it::PDOutline) = print(io, "Contents")
270+
AbstractTrees.printnode(io::IO, it::PDOutline) = print(io, "Contents")
271271

272-
function printnode(io::IO, it::PDOutlineItem)
272+
function AbstractTrees.printnode(io::IO, it::PDOutlineItem)
273273
cosdoc, cosdict = it.doc.cosDoc, it.cosdict
274274
title_obj = cosDocGetObject(cosdoc, cosdict, cn"Title")
275275
print(io, CDTextString(title_obj))

0 commit comments

Comments
 (0)