[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - starmath/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Dec 13 21:09:54 UTC 2018


 starmath/source/view.cxx |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 87e2d78fe8891faafcf83f38f1368a3122d9352e
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Dec 13 16:09:44 2018 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Dec 13 22:09:28 2018 +0100

    Resolves: tdf#117091 prepend a xml declaration if missing
    
    Change-Id: Iee8305f581533dedcb94d75af15d7178792947ff
    Reviewed-on: https://gerrit.libreoffice.org/65114
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit fc6d5461da366df6fa10561e12923532071af0c8)
    Reviewed-on: https://gerrit.libreoffice.org/65127

diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 5d59faa78b96..744f9a183d96 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -1611,6 +1611,10 @@ void SmViewShell::Execute(SfxRequest& rReq)
                         OUString aString;
                         if (aDataHelper.GetString( nId, aString))
                         {
+                            // tdf#117091 force xml declaration to exist
+                            if (!aString.startsWith("<?xml"))
+                                aString = "<?xml version=\"1.0\"?>\n" + aString;
+
                             std::unique_ptr<SfxMedium> pClipboardMedium(new SfxMedium());
                             pClipboardMedium->GetItemSet(); //generates initial itemset, not sure if necessary
                             std::shared_ptr<const SfxFilter> pMathFilter =


More information about the Libreoffice-commits mailing list