summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2021-02-18 08:39:45 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2021-03-10 15:29:03 +0100
commit907e5fa4fe13efb26fc0dc3e5ead611da734daaa (patch)
tree5d2d7ed3ea31f9f88c8be7ee8bcff9733a3dd56d
parenttdf#140597 DOCX import: fix missing tblPrEx border (diff)
downloadcore-907e5fa4fe13efb26fc0dc3e5ead611da734daaa.tar.gz
core-907e5fa4fe13efb26fc0dc3e5ead611da734daaa.zip
Fix an OUString construction
...introduced with 9d161857f1d4afcb772b477455797a2da0e47a9b "tdf#127471 correct EMF/WMF im/export for scaled font" Change-Id: I2b807e102ca7f71a61794f511dee302c7e509026 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111095 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit e0f2256b90fb30a5a7858f93c168d9da12061e70) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112221 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r--vcl/source/font/font.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/font/font.cxx b/vcl/source/font/font.cxx
index 4017a5347e75..45a2222b6ff4 100644
--- a/vcl/source/font/font.cxx
+++ b/vcl/source/font/font.cxx
@@ -388,7 +388,7 @@ tools::Long Font::GetOrCalculateAverageFontWidth() const
aUnscaledFont.SetAverageFontWidth(0);
pVirDev->SetFont(aUnscaledFont);
const double fAverageFontWidth(
- pVirDev->GetTextWidth(OUString(aArray.data())) / static_cast<double>(nSize));
+ pVirDev->GetTextWidth(OUString(aArray.data(), nSize)) / static_cast<double>(nSize));
const_cast<Font*>(this)->mpImplFont->SetCalculatedAverageFontWidth(basegfx::fround(fAverageFontWidth));
}