Kaydet (Commit) 87e2d78f authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: tdf#117091 prepend a xml declaration if missing

Change-Id: Iee8305f581533dedcb94d75af15d7178792947ff
Reviewed-on: https://gerrit.libreoffice.org/65114
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
(cherry picked from commit fc6d5461)
Reviewed-on: https://gerrit.libreoffice.org/65127
üst e020e25d
...@@ -1611,6 +1611,10 @@ void SmViewShell::Execute(SfxRequest& rReq) ...@@ -1611,6 +1611,10 @@ void SmViewShell::Execute(SfxRequest& rReq)
OUString aString; OUString aString;
if (aDataHelper.GetString( nId, 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()); std::unique_ptr<SfxMedium> pClipboardMedium(new SfxMedium());
pClipboardMedium->GetItemSet(); //generates initial itemset, not sure if necessary pClipboardMedium->GetItemSet(); //generates initial itemset, not sure if necessary
std::shared_ptr<const SfxFilter> pMathFilter = std::shared_ptr<const SfxFilter> pMathFilter =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment