diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2020-06-10 13:43:15 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2020-06-10 20:27:11 +0200 |
commit | eda9e23370f5ca0b413c9b5cc6eaffd87e596498 (patch) | |
tree | cdf36e25c18a1f17b9681422f02476ae876466d8 /svx/source/dialog/signaturelinehelper.cxx | |
parent | 49ce4bf15c1769b7427dd4d828e586c1e896f928 (diff) |
sd signature line: localize signature graphic
Now the svg template is free from user-visible strings.
Change-Id: Ibdbb73bbd1a1088a66dc25a5669df567b338b375
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96021
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'svx/source/dialog/signaturelinehelper.cxx')
-rw-r--r-- | svx/source/dialog/signaturelinehelper.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/svx/source/dialog/signaturelinehelper.cxx b/svx/source/dialog/signaturelinehelper.cxx index e786fbbb75ad..066f368db797 100644 --- a/svx/source/dialog/signaturelinehelper.cxx +++ b/svx/source/dialog/signaturelinehelper.cxx @@ -23,6 +23,8 @@ #include <sfx2/docfile.hxx> #include <sfx2/docfilt.hxx> #include <sfx2/objsh.hxx> +#include <svx/dialmgr.hxx> +#include <svx/strings.hrc> #include <svx/svdmark.hxx> #include <svx/svdview.hxx> #include <tools/stream.hxx> @@ -148,9 +150,11 @@ void setShapeCertificate(SdrView* pView, // Read svg and replace placeholder texts. OUString aSvgImage(svx::SignatureLineHelper::getSignatureImage("signature-line-draw.svg")); + aSvgImage = aSvgImage.replaceAll("[SIGNED_BY]", SvxResId(RID_SVXSTR_SIGNATURELINE_DSIGNED_BY)); OUString aSignerName = svx::SignatureLineHelper::getSignerName(xCertificate); aSvgImage = aSvgImage.replaceAll("[SIGNER_NAME]", aSignerName); OUString aDate = svx::SignatureLineHelper::getLocalizedDate(); + aDate = SvxResId(RID_SVXSTR_SIGNATURELINE_DATE).replaceFirst("%1", aDate); aSvgImage = aSvgImage.replaceAll("[DATE]", aDate); uno::Reference<graphic::XGraphic> xGraphic = svx::SignatureLineHelper::importSVG(aSvgImage); |