Fig.1: Main overview. This is an unaltered graph directly created by cpp2dia and layouted by graphviz.
Fig.2: As you can see at the red marks, the calculation of the real box size is not perfect. However dia "knows" that the edges are connected at the ports of an UML box. So if you simply click on a box. you can see the edges snapping into its proper position. (Fig.3)
Fig.3: After clicking on the boxes the edges fit correctly into its ports at the box's border. But still some manual layout is necessary to remove edges crossing boxes.