tdf#151114: Fix swapped width and height
Regression from:
commit 0483fbd1d05d74c394d9274bdee77b3b2aebb495
Author: Khaled Hosny <khaled@aliftype.com>
Date: Sun Aug 21 01:49:57 2022 +0200
tdf#87535: Preview styles using CTL/CJK fonts in the sidebar
Change-Id: I9108e2efa75eafe56c3ccc8ec2fff81b8cf7dc4c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140551
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
diff --git a/svx/source/styles/CommonStylePreviewRenderer.cxx b/svx/source/styles/CommonStylePreviewRenderer.cxx
index 3a78a3d..bee9fb9 100644
--- a/svx/source/styles/CommonStylePreviewRenderer.cxx
+++ b/svx/source/styles/CommonStylePreviewRenderer.cxx
@@ -302,17 +302,17 @@ void CommonStylePreviewRenderer::CalcRenderSize()
if (m_oFont)
{
aFontSize = m_oFont->GetFontSize();
m_oFont->SetFontSize(Size(aFontSize.Height() * fRatio, aFontSize.Width() * fRatio));
m_oFont->SetFontSize(Size(aFontSize.Width() * fRatio, aFontSize.Height() * fRatio));
}
if (m_oCJKFont)
{
aFontSize = m_oCJKFont->GetFontSize();
m_oCJKFont->SetFontSize(Size(aFontSize.Height() * fRatio, aFontSize.Width() * fRatio));
m_oCJKFont->SetFontSize(Size(aFontSize.Width() * fRatio, aFontSize.Height() * fRatio));
}
if (m_oCTLFont)
{
aFontSize = m_oCTLFont->GetFontSize();
m_oCTLFont->SetFontSize(Size(aFontSize.Height() * fRatio, aFontSize.Width() * fRatio));
m_oCTLFont->SetFontSize(Size(aFontSize.Width() * fRatio, aFontSize.Height() * fRatio));
}
for (auto& aChange : maScriptChanges)