A large proportion of hot post-asymptotic giant branch stars and white dwarfs (WDs) are hydrogen-deficient. Two distinct evolutionary sequences have been identified. One of them comprises stars of spectral type [WC] and PG1159, and it originates from a late helium-shell flash, creating helium-rich stellar atmospheres with significant admixtures of carbon (up to about 50%, mass fraction). The other sequence comprises stars of spectral type O(He) and luminous subdwarf O stars which possibly are descendants of RCrB stars and extreme helium stars. Their carbon abundances are significantly lower (of the order of 1% or less) and it is thought that they originate from binary-star evolution (through merger or common-envelope evolution). Here we investigate two of the three hottest known helium-rich (DO) WDs (PG 1034+001 and PG 0038+199). They are the only ones for which spectra were recorded with the Far Ultraviolet Spectroscopic Explorer and the Hubble Space Telescope, allowing a comprehensive ultraviolet spectral analysis. We find effective temperatures of Teff = 115 000 ± 5000 K and 125 000 ± 5000 K, respectively, and a surface gravity of log g= 7 ± 0.5. In both stars, nitrogen is strongly oversolar while C and O are significantly subsolar. For all other assessed metals (Ne, Si, P, S, Ar, Fe, and Ni) we find abundances close to solar. We conclude that these WDs are immediate descendants of O(He) stars and, hence, result from close-binary evolution.Based on observations made with the NASA-CNES-CSA Far Ultraviolet Spectroscopic Explorer.