summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-07-08 21:25:44 +0200
committerAndras Timar <andras.timar@collabora.com>2019-08-04 19:43:12 +0200
commit16d9cf03cf22abe2b7d89a92b2fe5c4d92581b3a (patch)
tree9ceb2e6940ece7046cc15eaea5df2aaa528afd2e /writerfilter
parentec1882e38139094399dc7404d68ba7ca61f7e9f3 (diff)
tdf#126173 RTF import: fix lost SHAPE fields
Commit 5a5d55a8a0f82406a8001015a723596f21d3562c (fdo#82860 RTF import: fix handling of SHAPE fields, 2014-10-15) already tried to handle this, but aCode is the shape command + its parameters (SHAPE \* MERGEFORMAT) for the bugdoc, while what we want is just the shape command. The field variable already contains a tokenized version, which was used previously only to decide if a field is unhandled or not. Reuse that for the shape comparison, so bugdoc's shape with parameters also appears. Change-Id: I7e044b94bcfab490c956b33c11dd6c69443939f5 Reviewed-on: https://gerrit.libreoffice.org/75243 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit 9a15a75dfa7ab8c5d51c411e0e39d68d22b7587a) Reviewed-on: https://gerrit.libreoffice.org/75288 Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org> (cherry picked from commit 0e6fdee15df8928c33308b353a7b80de150aca6b) Reviewed-on: https://gerrit.libreoffice.org/75295 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> (cherry picked from commit 45cf5d55221b92e395948cb2e36d6ae6f056b1a3) Reviewed-on: https://gerrit.libreoffice.org/76919 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 235b07e241e2..ee458bc918b7 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -4876,7 +4876,7 @@ void DomainMapper_Impl::CloseFieldCommand()
*/
OUString aCode( pContext->GetCommand().trim() );
// Don't waste resources on wrapping shapes inside a fieldmark.
- if (aCode != "SHAPE" && m_xTextFactory.is() && !m_aTextAppendStack.empty())
+ if (std::get<0>(field) != "SHAPE" && m_xTextFactory.is() && !m_aTextAppendStack.empty())
{
xFieldInterface = m_xTextFactory->createInstance("com.sun.star.text.Fieldmark");
const uno::Reference<text::XTextContent> xTextContent(xFieldInterface, uno::UNO_QUERY_THROW);