diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-03-14 13:58:42 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-03-14 18:32:42 +0100 |
commit | ca9e48c663b16bf461c37a5449c6ad5a930ad5a4 (patch) | |
tree | 669b77c0fa1b85cdd4719eb91f052cfd7b747683 /sw | |
parent | 061c71c8f9cbf154c21e3726325894a529c89e1b (diff) |
cid#1502951 Logically dead code
Change-Id: I5968dda3b0638576fcc9ce222e47a3c04c949484
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131545
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 45d8d809084f..98a3767cd865 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -3552,19 +3552,17 @@ void DocxAttributeOutput::Redline( const SwRedlineData* pRedlineData) break; } case RedlineType::ParagraphFormat: - if ( bNoDate ) - m_pSerializer->startElementNS( XML_w, XML_pPrChange, - FSNS( XML_w, XML_id ), aId, - FSNS( XML_w, XML_author ), bRemovePersonalInfo - ? "Author" + OUString::number( GetExport().GetInfoID(rAuthor) ) - : rAuthor ); - else - m_pSerializer->startElementNS( XML_w, XML_pPrChange, - FSNS( XML_w, XML_id ), aId, - FSNS( XML_w, XML_author ), bRemovePersonalInfo - ? "Author" + OUString::number( GetExport().GetInfoID(rAuthor) ) - : rAuthor, - FSNS( XML_w, XML_date ), DateTimeToOString( aDateTime ) ); + { + rtl::Reference<sax_fastparser::FastAttributeList> pAttributeList + = sax_fastparser::FastSerializerHelper::createAttrList(); + + pAttributeList->add(FSNS( XML_w, XML_id ), aId); + pAttributeList->add(FSNS( XML_w, XML_author ), bRemovePersonalInfo + ? "Author" + OString::number( GetExport().GetInfoID(rAuthor) ) + : rAuthor.toUtf8()); + if (!bNoDate) + pAttributeList->add(FSNS( XML_w, XML_date ), DateTimeToOString( aDateTime )); + m_pSerializer->startElementNS( XML_w, XML_pPrChange, pAttributeList ); // Check if there is any extra data stored in the redline object if (pRedlineData->GetExtraData()) @@ -3617,7 +3615,7 @@ void DocxAttributeOutput::Redline( const SwRedlineData* pRedlineData) } m_pSerializer->endElementNS( XML_w, XML_pPrChange ); break; - + } default: SAL_WARN("sw.ww8", "Unhandled redline type for export " << SwRedlineTypeToOUString(pRedlineData->GetType())); break; |