[Libreoffice-commits] core.git: cui/source
Samuel Mehrbrodt
Samuel.Mehrbrodt at cib.de
Fri Apr 13 13:52:51 UTC 2018
cui/source/dialogs/SignSignatureLineDialog.cxx | 5 -----
cui/source/dialogs/SignatureLineDialog.cxx | 4 ++--
cui/source/dialogs/SignatureLineDialogBase.cxx | 5 +++++
cui/source/inc/SignSignatureLineDialog.hxx | 1 -
cui/source/inc/SignatureLineDialogBase.hxx | 1 +
5 files changed, 8 insertions(+), 8 deletions(-)
New commits:
commit ee79612fc7f33d87f6cc722cdd3e669eaa79bd98
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
Date: Fri Apr 13 10:55:09 2018 +0200
tdf#83877 Make user input xml safe
Change-Id: Iff1311932ef6a4525faa999553884bd8d23f3f30
Reviewed-on: https://gerrit.libreoffice.org/52814
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
diff --git a/cui/source/dialogs/SignSignatureLineDialog.cxx b/cui/source/dialogs/SignSignatureLineDialog.cxx
index 94366aa34f5c..3c3052901c26 100644
--- a/cui/source/dialogs/SignSignatureLineDialog.cxx
+++ b/cui/source/dialogs/SignSignatureLineDialog.cxx
@@ -148,9 +148,4 @@ void SignSignatureLineDialog::Apply()
m_xShapeProperties->setPropertyValue("Graphic", Any(xGraphic));
}
-OUString SignSignatureLineDialog::getCDataString(const OUString& rString)
-{
- return "<![CDATA[" + rString + "]]>";
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/cui/source/dialogs/SignatureLineDialog.cxx b/cui/source/dialogs/SignatureLineDialog.cxx
index ee98a98b37c2..a1716fe282b6 100644
--- a/cui/source/dialogs/SignatureLineDialog.cxx
+++ b/cui/source/dialogs/SignatureLineDialog.cxx
@@ -101,8 +101,8 @@ void SignatureLineDialog::Apply()
// Read svg and replace placeholder texts
OUString aSvgImage(getSignatureImage());
- aSvgImage = aSvgImage.replaceAll("[SIGNER_NAME]", aSignerName);
- aSvgImage = aSvgImage.replaceAll("[SIGNER_TITLE]", aSignerTitle);
+ aSvgImage = aSvgImage.replaceAll("[SIGNER_NAME]", getCDataString(aSignerName));
+ aSvgImage = aSvgImage.replaceAll("[SIGNER_TITLE]", getCDataString(aSignerTitle));
// These are only filled if the signature line is signed.
aSvgImage = aSvgImage.replaceAll("[SIGNATURE]", "");
diff --git a/cui/source/dialogs/SignatureLineDialogBase.cxx b/cui/source/dialogs/SignatureLineDialogBase.cxx
index 894694784d35..dcd05d6ee504 100644
--- a/cui/source/dialogs/SignatureLineDialogBase.cxx
+++ b/cui/source/dialogs/SignatureLineDialogBase.cxx
@@ -30,6 +30,11 @@ short SignatureLineDialogBase::execute()
return nRet;
}
+OUString SignatureLineDialogBase::getCDataString(const OUString& rString)
+{
+ return "<![CDATA[" + rString + "]]>";
+}
+
OUString SignatureLineDialogBase::getSignatureImage()
{
OUString const svg(
diff --git a/cui/source/inc/SignSignatureLineDialog.hxx b/cui/source/inc/SignSignatureLineDialog.hxx
index 7847c70f059f..c7a6e565bd7b 100644
--- a/cui/source/inc/SignSignatureLineDialog.hxx
+++ b/cui/source/inc/SignSignatureLineDialog.hxx
@@ -35,7 +35,6 @@ private:
void ValidateFields();
virtual void Apply() override;
- OUString getCDataString(const OUString& rString);
DECL_LINK(chooseCertificate, weld::Button&, void);
};
diff --git a/cui/source/inc/SignatureLineDialogBase.hxx b/cui/source/inc/SignatureLineDialogBase.hxx
index 34496344801a..8954ecd98a60 100644
--- a/cui/source/inc/SignatureLineDialogBase.hxx
+++ b/cui/source/inc/SignatureLineDialogBase.hxx
@@ -26,6 +26,7 @@ protected:
css::uno::Reference<css::frame::XModel> m_xModel;
OUString getSignatureImage();
virtual void Apply() = 0;
+ OUString getCDataString(const OUString& rString);
};
#endif
More information about the Libreoffice-commits
mailing list