diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2022-04-04 09:50:26 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2022-04-08 18:46:38 +0200 |
commit | 14bfb0933073e5bf8ce4f810c38e91125066257a (patch) | |
tree | 8e975fc5759de67106faf8357f2b0a744a5176e6 /unotools | |
parent | 881cfbf77567194f5016a961d1c3db869734d68b (diff) |
allow to override the generator/producer string in output documents
Add a (non-gui) setting GeneratorOverride that, if set, is used
for odt/docx/pdf generator string identifying the application that
has written it instead of the normal productname etc. string.
Change-Id: Ibe12a063e7e6b5a09c69cdf66cba073793650d62
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132495
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/source/config/docinfohelper.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/unotools/source/config/docinfohelper.cxx b/unotools/source/config/docinfohelper.cxx index 7e605d187c75..735f0ac2d56e 100644 --- a/unotools/source/config/docinfohelper.cxx +++ b/unotools/source/config/docinfohelper.cxx @@ -22,6 +22,7 @@ #include <unotools/bootstrap.hxx> #include <unotools/docinfohelper.hxx> #include <rtl/bootstrap.hxx> +#include <officecfg/Office/Common.hxx> using namespace ::com::sun::star; @@ -30,6 +31,10 @@ namespace utl OUString DocInfoHelper::GetGeneratorString() { + OUString aResultOverride = officecfg::Office::Common::Save::Document::GeneratorOverride::get(); + if( !aResultOverride.isEmpty()) + return aResultOverride; + OUStringBuffer aResult(128); // First product: branded name + version |