1. How many software engineers are necessary for the federal government to build its own office software, or at the very least contribute to open-source projects such as LibreOffice? Depending on the size of the team, this may be a drop in the bucket compared to the federal government's multi-trillion dollar budget, even if the developers made Microsoft-level salaries. Let's make a very liberal estimate: suppose there were a team of 20 engineers dedicated to contributing to LibreOffice, and each engineer costs $400,000 in salary and overhead. The total is $8 million per year. When spread out over a population of 333 million, that's less than 2.5 cents per person. Now compare that $8 million per year to the cost of Microsoft Office licenses.
2. I consider myself a limited government proponent, but even if government were cut down to the bone, there is still a need for the government to maintain in-house software. Just imagine the internal software that the military and the IRS has, for example. The Library of Congress probably has very interesting software for helping manage its collection. It is conceivable for the federal government to build and maintain office software to aid its operations.