diff options
author | Gabor Kelemen <kelemen.gabor2@nisz.hu> | 2020-03-22 22:59:05 +0100 |
---|---|---|
committer | Adolfo Jayme Barrientos <fitojb@ubuntu.com> | 2020-06-24 12:05:17 +0200 |
commit | acfc23e9a4b24d5ca6d772cadcca77ab3c6d0196 (patch) | |
tree | a2e3a47c0eebfff5e68c28736830c65d4d6c1953 /writerfilter | |
parent | 0638adcb101d870b169a34d980d41ef4fc742a94 (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>
(cherry picked from commit face27179d882cfbec368e2bed5f65276a5ce963)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96697
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
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 a059c623b4c9..861fcf678ab4 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -4870,7 +4870,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()) @@ -4880,9 +4880,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); } } } |