Staples Swings to a Loss on Restructuring