A lot of times I see this happen it is because the chimney mass is in the middle of the house and it has settled more than the rest of the house and brought everything with it.
If you aren't into jacking (if you were you would have to make sure that the floor wasn't connected to the chimney mass) then first make sure the floor is structurally sound and strong, then you basically do what you propose, much as Tony said. I wouldn't bolt them though, construction adhesive and nails should be fine. Nail top and bottom about every foot. A framing nail gun sure makes this a lot easier.