RXR Realty has sold a 230,000-square-foot Morristown office building to a Boston-based real estate investment firm, in a $21.5 million deal brokered by HFF.