small refactoring for docxgen class