summaryrefslogtreecommitdiff
path: root/writerfilter/source/dmapper
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-10-21 12:31:03 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-10-21 14:58:51 +0200
commit29489b33b435683021b72cb2bce27aba8cb7a430 (patch)
tree8e4e1c59d56d5ed0d0ca4d088419067041e4553a /writerfilter/source/dmapper
parenta4244c0f05b95ded277a3a7ed217bf0451daa996 (diff)
loplugin:flatten
Change-Id: I3b4226a9d089ec9aedab95d96e50a068f57a76c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123991 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'writerfilter/source/dmapper')
-rw-r--r--writerfilter/source/dmapper/GraphicImport.cxx28
1 files changed, 14 insertions, 14 deletions
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx
index ec16cdd3b36e..d3ea9bcbe225 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -557,20 +557,20 @@ void GraphicImport::lcl_correctWord2007EffectExtent(const sal_Int32 nMSOAngle)
// Word versions older than 14 do not swap width and height (see lcl_doMSOWidthHeightSwap)
// and therefore generate different effectExtent. We correct them here.
sal_Int16 nAngleDeg = (nMSOAngle / 60000) % 180;
- if (nAngleDeg >= 45 && nAngleDeg < 135)
- {
- sal_Int32 nDiff = o3tl::convert(
- (double(m_pImpl->getXSize()) - double(m_pImpl->getYSize())) / 2.0,
- o3tl::Length::mm100, o3tl::Length::emu);
- if (m_pImpl->m_oEffectExtentLeft)
- *m_pImpl->m_oEffectExtentLeft += nDiff;
- if (m_pImpl->m_oEffectExtentRight)
- *m_pImpl->m_oEffectExtentRight += nDiff;
- if (m_pImpl->m_oEffectExtentTop)
- *m_pImpl->m_oEffectExtentTop -= nDiff;
- if (m_pImpl->m_oEffectExtentBottom)
- *m_pImpl->m_oEffectExtentBottom -= nDiff;
- }
+ if (nAngleDeg < 45 || nAngleDeg >= 135)
+ return;
+
+ sal_Int32 nDiff = o3tl::convert(
+ (double(m_pImpl->getXSize()) - double(m_pImpl->getYSize())) / 2.0,
+ o3tl::Length::mm100, o3tl::Length::emu);
+ if (m_pImpl->m_oEffectExtentLeft)
+ *m_pImpl->m_oEffectExtentLeft += nDiff;
+ if (m_pImpl->m_oEffectExtentRight)
+ *m_pImpl->m_oEffectExtentRight += nDiff;
+ if (m_pImpl->m_oEffectExtentTop)
+ *m_pImpl->m_oEffectExtentTop -= nDiff;
+ if (m_pImpl->m_oEffectExtentBottom)
+ *m_pImpl->m_oEffectExtentBottom -= nDiff;
}
static void lcl_doMSOWidthHeightSwap(awt::Point& rLeftTop, awt::Size& rSize,