summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-05-18 17:05:14 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-05-19 15:03:36 +0200
commit5d8ac801c00fbf1dc16ee8dbfe8167baf7ea0ce0 (patch)
treee7077c2ad63f69379b6de104c8dc21041a8dc5a1 /svx
parent457fabbc358930b71884a97ba9ade4bd26310ce0 (diff)
SetPhysFont always dereferences its OutputDevice* arg
which is also the case for ChgPhysFont and GetTextSize Change-Id: I7e6a1a7eaa77646c53506a73d8946f8df7593e72 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115768 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/dialog/fntctrl.cxx6
-rw-r--r--svx/source/styles/CommonStylePreviewRenderer.cxx2
2 files changed, 4 insertions, 4 deletions
diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx
index d2a99a367131..8dcbcebcd446 100644
--- a/svx/source/dialog/fntctrl.cxx
+++ b/svx/source/dialog/fntctrl.cxx
@@ -328,7 +328,7 @@ Size FontPrevWin_Impl::CalcTextSize(vcl::RenderContext& rRenderContext, OutputDe
((nScript == css::i18n::ScriptType::COMPLEX) ?
maCTLFont :
rInFont);
- tools::Long nWidth = rFont.GetTextSize(_pPrinter, maText, nStart, nEnd - nStart).Width();
+ tools::Long nWidth = rFont.GetTextSize(*_pPrinter, maText, nStart, nEnd - nStart).Width();
if (nIdx >= maTextWidth.size())
break;
@@ -747,12 +747,12 @@ void SvxFontPrevWindow::Paint(vcl::RenderContext& rRenderContext, const tools::R
if (pImpl->mcStartBracket)
{
OUString sBracket(pImpl->mcStartBracket);
- nStartBracketWidth = rFont.GetTextSize(pPrinter, sBracket).Width();
+ nStartBracketWidth = rFont.GetTextSize(*pPrinter, sBracket).Width();
}
if (pImpl->mcEndBracket)
{
OUString sBracket(pImpl->mcEndBracket);
- nEndBracketWidth = rFont.GetTextSize(pPrinter, sBracket).Width();
+ nEndBracketWidth = rFont.GetTextSize(*pPrinter, sBracket).Width();
}
nTextWidth = pImpl->CalcTextSize(rRenderContext, pPrinter, aSmallFont).Width();
tools::Long nResultWidth = nStartBracketWidth;
diff --git a/svx/source/styles/CommonStylePreviewRenderer.cxx b/svx/source/styles/CommonStylePreviewRenderer.cxx
index 5ad1b8769ec7..65690bed792b 100644
--- a/svx/source/styles/CommonStylePreviewRenderer.cxx
+++ b/svx/source/styles/CommonStylePreviewRenderer.cxx
@@ -181,7 +181,7 @@ bool CommonStylePreviewRenderer::recalculate()
Size CommonStylePreviewRenderer::getRenderSize() const
{
assert(m_pFont);
- Size aPixelSize = m_pFont->GetTextSize(&mrOutputDev, maStyleName);
+ Size aPixelSize = m_pFont->GetTextSize(mrOutputDev, maStyleName);
if (aPixelSize.Height() > mnMaxHeight)
aPixelSize.setHeight( mnMaxHeight );