diff options
author | Gabor Kelemen <kelemen.gabor2@nisz.hu> | 2020-03-22 22:59:05 +0100 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-06-19 13:29:57 +0200 |
commit | 833dd75c6956f5a0d395468575aa416a6853a1f9 (patch) | |
tree | 47e45d4a6e5ae5611dc1f4f2990ca6e8137150c7 /writerfilter | |
parent | 0a618246fc83f6ba7bd48de6164de7efc123f06f (diff) |
tdf#108505 DOCX: fix legacy dropdown fields direct font setting
if it is at the beginning of the paragraph.
See also commit 22ad4d69d771708f28a2d9e137cfd43ac846cf3a
(tdf#121045 DOCX import: fix checkbox size in table).
Change-Id: Ic4d4fc56cf031cc941c3f81930c6eba497090cba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91540
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 8cc1f7c02358..95b8e5e46647 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -4887,7 +4887,7 @@ void DomainMapper_Impl::CloseFieldCommand() OUString const sFirstParam(vArguments.empty() ? OUString() : vArguments.front()); // apply font size to the form control - if (!m_aTextAppendStack.empty() && m_pLastCharacterContext && m_pLastCharacterContext->isSet(PROP_CHAR_HEIGHT) ) + if (!m_aTextAppendStack.empty() && m_pLastCharacterContext && ( m_pLastCharacterContext->isSet(PROP_CHAR_HEIGHT) || m_pLastCharacterContext->isSet(PROP_CHAR_FONT_NAME ))) { uno::Reference< text::XTextAppend > xTextAppend = m_aTextAppendStack.top().xTextAppend; if (xTextAppend.is()) @@ -4897,9 +4897,14 @@ void DomainMapper_Impl::CloseFieldCommand() { xCrsr->gotoEnd(false); uno::Reference< beans::XPropertySet > xProp( xCrsr, uno::UNO_QUERY ); - xProp->setPropertyValue(getPropertyName(PROP_CHAR_HEIGHT), m_pLastCharacterContext->getProperty(PROP_CHAR_HEIGHT)->second); - if ( m_pLastCharacterContext->isSet(PROP_CHAR_HEIGHT_COMPLEX) ) - xProp->setPropertyValue(getPropertyName(PROP_CHAR_HEIGHT_COMPLEX), m_pLastCharacterContext->getProperty(PROP_CHAR_HEIGHT_COMPLEX)->second); + if (m_pLastCharacterContext->isSet(PROP_CHAR_HEIGHT)) + { + xProp->setPropertyValue(getPropertyName(PROP_CHAR_HEIGHT), m_pLastCharacterContext->getProperty(PROP_CHAR_HEIGHT)->second); + if (m_pLastCharacterContext->isSet(PROP_CHAR_HEIGHT_COMPLEX)) + xProp->setPropertyValue(getPropertyName(PROP_CHAR_HEIGHT_COMPLEX), m_pLastCharacterContext->getProperty(PROP_CHAR_HEIGHT_COMPLEX)->second); + } + if (m_pLastCharacterContext->isSet(PROP_CHAR_FONT_NAME)) + xProp->setPropertyValue(getPropertyName(PROP_CHAR_FONT_NAME), m_pLastCharacterContext->getProperty(PROP_CHAR_FONT_NAME)->second); } } } |