diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-12-13 16:09:44 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-12-13 20:18:27 +0100 |
commit | fc6d5461da366df6fa10561e12923532071af0c8 (patch) | |
tree | 01d315b862760c4ea4bd993758d74c2a8a30c197 /starmath | |
parent | 97a0a7f403d9514b6dc9017e6c1ac603efa9576c (diff) |
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@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/source/view.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index c4d2a91316ad..76ad4c5fe541 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 = |