NEW YORK – Office Depot and OfficeMax are being collated. The retailers said Wednesday they have agreed to combine in an all-stock deal worth about $1.2 billion that would transform the office-supply retail sector by helping the No. 2 and No. 3 chains compete against behemoth Staples.

The merger marks the first move toward consolidation in an industry bloated with stores. It reflects the changing retail landscape as “big box” stores become outmoded and more people shop online.

Still, doubts remain whether the combination, which has been mulled over in the industry for years, is enough to offset growing competition.

“The industry will face longer term structural headwinds with competitors like Amazon, Costco gaining ground and the decline in demand for secular office products like paper, pens and ink,” said Liang Feng, a Morningstar analyst.