summaryrefslogtreecommitdiff
path: root/vcl/source/window/window.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-07-16 08:29:53 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-07-16 15:13:41 +0200
commit2f81046033bb4082f888edfa94685d2dcc2689aa (patch)
tree33db4747aec33879cc880795e217243f7782545a /vcl/source/window/window.cxx
parent671290e8054366997e512572b2e4e38efbf95f80 (diff)
cid#1554709 COPY_INSTEAD_OF_MOVE
and cid#1554745 COPY_INSTEAD_OF_MOVE cid#1554758 COPY_INSTEAD_OF_MOVE cid#1554766 COPY_INSTEAD_OF_MOVE cid#1554771 COPY_INSTEAD_OF_MOVE cid#1554787 COPY_INSTEAD_OF_MOVE cid#1554802 COPY_INSTEAD_OF_MOVE cid#1554820 COPY_INSTEAD_OF_MOVE cid#1554828 COPY_INSTEAD_OF_MOVE cid#1554829 COPY_INSTEAD_OF_MOVE cid#1554832 COPY_INSTEAD_OF_MOVE cid#1554842 COPY_INSTEAD_OF_MOVE cid#1554885 COPY_INSTEAD_OF_MOVE Change-Id: I43ec20250a04dc087f3d7fdeafc75f0c1dd0de25 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170542 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'vcl/source/window/window.cxx')
-rw-r--r--vcl/source/window/window.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index dcb68b9cf142..108ad423454c 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -1758,8 +1758,6 @@ void Window::ImplNewInputContext()
SalInputContext aNewContext;
const vcl::Font& rFont = rInputContext.GetFont();
const OUString& rFontName = rFont.GetFamilyName();
- rtl::Reference<LogicalFontInstance> pFontInstance;
- aNewContext.mpFont = nullptr;
if (!rFontName.isEmpty())
{
OutputDevice *pFocusWinOutDev = pFocusWin->GetOutDev();
@@ -1773,11 +1771,10 @@ void Window::ImplNewInputContext()
else
aSize.setHeight( (12*pFocusWin->GetOutDev()->mnDPIY)/72 );
}
- pFontInstance = pFocusWin->GetOutDev()->mxFontCache->GetFontInstance(
+ aNewContext.mpFont =
+ pFocusWin->GetOutDev()->mxFontCache->GetFontInstance(
pFocusWin->GetOutDev()->mxFontCollection.get(),
rFont, aSize, static_cast<float>(aSize.Height()) );
- if ( pFontInstance )
- aNewContext.mpFont = pFontInstance;
}
aNewContext.mnOptions = rInputContext.GetOptions();
pFocusWin->ImplGetFrame()->SetInputContext( &aNewContext );