summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2020-06-10 13:43:15 +0200
committerMiklos Vajna <vmiklos@collabora.com>2020-06-26 08:54:55 +0200
commit13e6fa10d31147cc6b483d6ae132de33ff8d905a (patch)
tree20d49e20723693be10e2c3b5320c6317ed9f6e99 /svx
parente5244056afd6ecff93d867680249d83d9bef9b46 (diff)
sd signature line: localize signature graphic
Now the svg template is free from user-visible strings. (cherry picked from commit eda9e23370f5ca0b413c9b5cc6eaffd87e596498) Conflicts: include/svx/strings.hrc Change-Id: Ibdbb73bbd1a1088a66dc25a5669df567b338b375 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97179 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/dialog/signaturelinehelper.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/svx/source/dialog/signaturelinehelper.cxx b/svx/source/dialog/signaturelinehelper.cxx
index bdc78e39be37..00d798e5d002 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>
@@ -138,9 +140,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);