Created private functions to avoid duplicated code in Document

2 jobs for !28 with gsoc2019_focusAction in 11 minutes and 43 seconds (queued for 4 minutes and 21 seconds)
detached
Status Job ID Name Coverage
  Build
canceled #15747
build_ubuntu_18_04

00:05:38

passed #15746
linux kf5-qt5 qt5.12

00:11:36

40.0%