[Libreoffice-commits] core.git: cui/source include/svx svx/source

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Wed Jun 10 18:27:45 UTC 2020


 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 eda9e23370f5ca0b413c9b5cc6eaffd87e596498
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Wed Jun 10 13:43:15 2020 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Wed Jun 10 20:27:11 2020 +0200

    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 at collabora.com>
    Tested-by: Jenkins

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 22253551048d..a13b510b60e0 100644
--- a/include/svx/strings.hrc
+++ b/include/svx/strings.hrc
@@ -1708,6 +1708,9 @@
 
 #define RID_SVXSTR_FONTWORK                                 NC_("RID_SVXSTR_FONTWORK", "Fontwork")
 
+#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 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);


More information about the Libreoffice-commits mailing list