cui/source/dialogs/signature-line-draw.svg | 4 ++-- include/svx/strings.hrc | 3 +++ svx/source/dialog/signaturelinehelper.cxx | 4 ++++ 3 files changed, 9 insertions(+), 2 deletions(-)
New commits: commit 13e6fa10d31147cc6b483d6ae132de33ff8d905a Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Wed Jun 10 13:43:15 2020 +0200 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Fri Jun 26 08:54:55 2020 +0200 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 <jenkinscollaboraoff...@gmail.com> Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/cui/source/dialogs/signature-line-draw.svg b/cui/source/dialogs/signature-line-draw.svg index 564b5cdf3ef9..b8552c41b82c 100644 --- a/cui/source/dialogs/signature-line-draw.svg +++ b/cui/source/dialogs/signature-line-draw.svg @@ -28,9 +28,9 @@ </g> <g class="SlideGroup" id="g575"> <path inkscape:connector-curvature="0" style="fill:none;stroke:#ffcccc;stroke-width:355.69763184;stroke-linecap:round;stroke-linejoin:round" d="M 2677.6009,4322.3785 C 4637.7107,2683.4298 4480.4998,1439.2788 4416.8177,177.68919 4135.9768,2203.3862 5181.4191,2928.0647 6822.3029,3068.6459 5584.8956,2678.4757 4273.5892,2702.5453 2677.6009,4322.3785 Z" id="path8"/> - <g id="g569" class="Page"><text xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:493.88882446px;line-height:1.25;font-family:'Liberation Sans', sans-serif;-inkscape-font-specification:'Liberation Sans, sans-serif';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:746.70703125" x="265.50031" y="877.50842" id="text31-3"><tspan sodipodi:role="line" id="tspan29-6" x="265.50031" y="877.50842" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:493.88882446px;font-family:'Liberation Sans', sans-serif;-inkscape-font-specification:'Liberation Sans, sans-serif';stroke-width:746.70703125">Digitally signed by:</tspan></text> + <g id="g569" class="Page"><text xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:493.88882446px;line-height:1.25;font-family:'Liberation Sans', sans-serif;-inkscape-font-specification:'Liberation Sans, sans-serif';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:746.70703125" x="265.50031" y="877.50842" id="text31-3"><tspan sodipodi:role="line" id="tspan29-6" x="265.50031" y="877.50842" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:493.88882446px;font-family:'Liberation Sans', sans-serif;-inkscape-font-specification:'Liberation Sans, sans-serif';stroke-width:746.70703125">[SIGNED_BY]</tspan></text> <text xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:493.88879395px;line-height:1.25;font-family:'Liberation Sans', sans-serif;-inkscape-font-specification:'Liberation Sans, sans-serif';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:746.70697021" x="228.1967" y="2377.5085" id="text31-3-3"><tspan sodipodi:role="line" id="tspan29-6-5" x="228.1967" y="2377.5085" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:493.88879395px;font-family:'Liberation Sans', sans-serif;-inkscape-font-specification:'Liberation Sans, sans-serif';stroke-width:746.70697021">[SIGNER_NAME]</tspan></text> -<text xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:493.6913147px;line-height:1.25;font-family:'Liberation Sans', sans-serif;-inkscape-font-specification:'Liberation Sans, sans-serif';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:746.40844727" x="206.12776" y="3879.1411" id="text31-3-3-9" transform="scale(1.0003999,0.99960029)"><tspan sodipodi:role="line" id="tspan29-6-5-1" x="206.12776" y="3879.1411" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:493.6913147px;font-family:'Liberation Sans', sans-serif;-inkscape-font-specification:'Liberation Sans, sans-serif';stroke-width:746.40844727">Date: [DATE]</tspan></text> +<text xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:493.6913147px;line-height:1.25;font-family:'Liberation Sans', sans-serif;-inkscape-font-specification:'Liberation Sans, sans-serif';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:746.40844727" x="206.12776" y="3879.1411" id="text31-3-3-9" transform="scale(1.0003999,0.99960029)"><tspan sodipodi:role="line" id="tspan29-6-5-1" x="206.12776" y="3879.1411" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:493.6913147px;font-family:'Liberation Sans', sans-serif;-inkscape-font-specification:'Liberation Sans, sans-serif';stroke-width:746.40844727">[DATE]</tspan></text> </g> </g> </svg> diff --git a/include/svx/strings.hrc b/include/svx/strings.hrc index 3eea6ce8aa4c..3ae4e219ef76 100644 --- a/include/svx/strings.hrc +++ b/include/svx/strings.hrc @@ -1705,6 +1705,9 @@ #define RID_SVXSTR_PAGEDIR_LTR_VERT NC_("RID_SVXSTR_PAGEDIR_LTR_VERT", "Left-to-right (vertical)") #define RID_SVXSTR_PAGEDIR_LTR_BTT_VERT NC_("RID_SVXSTR_PAGEDIR_LTR_BTT_VERT", "Bottom-to-top, left-to-right (vertical)") +#define RID_SVXSTR_SIGNATURELINE_DSIGNED_BY NC_("RID_SVXSTR_SIGNATURELINE_DSIGNED_BY", "Digitally signed by:") +#define RID_SVXSTR_SIGNATURELINE_DATE NC_("RID_SVXSTR_SIGNATURELINE_DATE", "Date: %1") + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ 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); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits