sw/source/writerfilter/dmapper/GraphicImport.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
New commits: commit bc7501d30ab9a3a5edec66d2f0022177f85d6127 Author: Justin Luth <jl...@mail.com> AuthorDate: Sat Apr 20 19:45:39 2024 -0400 Commit: Justin Luth <jl...@mail.com> CommitDate: Wed May 1 00:44:37 2024 +0200 NFC GraphicImport.cxx: address nit x2 less emphasis on minimizing "if logic" and more emphasis on readability (especially since the comment comes after the logic). In the most common cases, this version should actually finish sooner too. I didn't remember doing a copy/paste, so the first time I only fixed the one instance... Change-Id: I71deded7da16fd4aef2d7f5ab9f777b616312eca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166379 Reviewed-by: Justin Luth <jl...@mail.com> Tested-by: Jenkins diff --git a/sw/source/writerfilter/dmapper/GraphicImport.cxx b/sw/source/writerfilter/dmapper/GraphicImport.cxx index 0320c671c47f..3a60e63dbefb 100644 --- a/sw/source/writerfilter/dmapper/GraphicImport.cxx +++ b/sw/source/writerfilter/dmapper/GraphicImport.cxx @@ -1304,9 +1304,10 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue) } if (m_pImpl->m_nHoriRelation == text::RelOrientation::FRAME - && m_pImpl->m_nHoriOrient > text::HoriOrientation::NONE - && m_pImpl->m_nHoriOrient != text::HoriOrientation::CENTER - && m_pImpl->m_nHoriOrient < text::HoriOrientation::FULL) + && (m_pImpl->m_nHoriOrient == text::HoriOrientation::LEFT + || m_pImpl->m_nHoriOrient == text::HoriOrientation::RIGHT + || m_pImpl->m_nHoriOrient == text::HoriOrientation::INSIDE + || m_pImpl->m_nHoriOrient == text::HoriOrientation::OUTSIDE)) { // before compat15, relative left/right/inside/outside honored margins. if (m_pImpl->m_rDomainMapper.GetSettingsTable()->GetWordCompatibilityMode() < 15)