actually use identical code for both byRow and byCol, fdo#81501 follow-up

Change-Id: I982e03a12dd80be0787f22dce4495065775e7de0
trim also empty leading column ranges, fdo#81501 follow-up

Change-Id: Ieaeea85149e4b6d263b112205bb17c155e2d12be