I would agree that replicators might have the ability of manipulating matter from one state into another, but we know their basic operation is: Conversion of energy to matter (not the other way around) - at least when it comes to matter replication/creation.
They do have recycling capability which effectively converts matter into energy (back into the EPS power grid - lowered amount of course since the meal is gone, but the utensils, plates and glass will be converted into same energy that went out most likely) - though this method could be used by for example to simply 'recycle' metals and alloys found in asteroids or void solar systems that would effectively yield high energy reserves.
We hadn't seen replicators manipulate the structure of an existing object and turn it into another object because the crews of any Federation ship would sooner recycle the objects in question into energy so they could replicate something of use later when the actual need arises (this would be a sensible approach).
If you noticed, in early seasons of Voyager, Replicators were used sparingly because they were an energy intensive system and the ship experienced power issues ever since it was pulled into the DQ (which probably damaged the power systems to an extent that lowered overall power reserves and in turn instilled limitations on how much replicators can be used - at least until Voyager managed to find areas of space they could use for antimatter creation - such as omicron particles from 'the Cloud' - never used but perhaps other sources were found aside from making trade with races).
But, I really don't see why any Federation ship equipped with replicators simply couldn't park near a Star, and use the solar power for matter replication (instead of ships energy).
I would agree it would take some fiddling with the power systems to accept solar power, but ultimately, the Federation is able to manipulate energy and convert it from one state into another (using plasma manifolds which we've seen), meaning that a Star could relatively easily be used as an external power supply for replicators on ships to stock up on necessary materials, create vast amounts of hardware, spare parts, new torpedoes [minus the anti-matter - unless they could create some sort of mini facility on board for its creation] self-sustaining systems, etc.