fdo#79174: Use 3D address when the input and output are on different sheets.

Also some cleanup, mostly to avoid storing separate address convention object,
which is not really necessary.

Change-Id: Id3e104043f08b6786de2e91d69361557b83890f9
(cherry picked from commit 0ab538885d818a7b3706df48a625e2523a8ebbdf)