A density-functional study has been undertaken to investigate the chemical properties of in-plane heterostructures of graphene and hexagonal boron nitride. The interactions of armchair and zigzag linking edges with oxygen are looked at in detail. The results of the calculations indicate that the linking edges are highly reactive to oxygen atoms and predict that oxygen molecules can accordingly be adsorbed dissociatively. Furthermore, because oxygen atoms cooperatively interact with the heterostructures, the process can lead to opening of the linking edges, thus splitting the two materials.