writerfilter/source/dmapper/GraphicImport.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
New commits: commit ccf988d206a47701c81126f23e2bef71fc3db333 Author: Justin Luth <justin.l...@collabora.com> AuthorDate: Mon Mar 11 08:26:28 2024 -0400 Commit: Justin Luth <jl...@mail.com> CommitDate: Mon Mar 11 15:34:03 2024 +0100 GraphicImport.cxx: address nit 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 to. Change-Id: I18cf760e806c53f6d32afadca8d127df2df89653 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164655 Tested-by: Jenkins Reviewed-by: Justin Luth <jl...@mail.com> diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx index 6ee808355a60..2df2569530a1 100644 --- a/writerfilter/source/dmapper/GraphicImport.cxx +++ b/writerfilter/source/dmapper/GraphicImport.cxx @@ -1863,9 +1863,10 @@ uno::Reference<text::XTextContent> GraphicImport::createGraphicObject(uno::Refer if (m_pImpl->m_rGraphicImportType == IMPORT_AS_DETECTED_ANCHOR) { 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)