diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-04-07 21:07:01 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-04-08 10:56:25 +0200 |
commit | 852d15792d672f2437df6364247a4870883b1d10 (patch) | |
tree | 59c7f43cff67f1efa9f936ca9343d0c4a4400b4d /sfx2 | |
parent | a0d2fb3217094aa7158310f0bcf16093bcc4984f (diff) |
GetEditWin() is already fetched as pEditWin
Change-Id: I2057925e3d5d3d8153777416f56b25624aa9041d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113775
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/view/ipclient.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx index 7f8c2c89e829..1d3c375b6eb4 100644 --- a/sfx2/source/view/ipclient.cxx +++ b/sfx2/source/view/ipclient.cxx @@ -424,6 +424,7 @@ awt::Rectangle SAL_CALL SfxInPlaceClient_Impl::getPlacement() aRealObjArea.SetSize( Size( tools::Long( aRealObjArea.GetWidth() * m_aScaleWidth), tools::Long( aRealObjArea.GetHeight() * m_aScaleHeight) ) ); + vcl::Window* pEditWin = m_pClient->GetEditWin(); // In Writer and Impress the map mode is disabled. So when a chart is // activated (for in place editing) we get the chart win size in 100th mm // and any method that should return pixels returns 100th mm and the chart @@ -432,17 +433,16 @@ awt::Rectangle SAL_CALL SfxInPlaceClient_Impl::getPlacement() // editing in LOK. if (comphelper::LibreOfficeKit::isActive()) { - vcl::Window* pEditWin = m_pClient->GetEditWin(); bool bMapModeEnabled = pEditWin->IsMapModeEnabled(); if (!bMapModeEnabled) pEditWin->EnableMapMode(); - aRealObjArea = m_pClient->GetEditWin()->LogicToPixel( aRealObjArea ); + aRealObjArea = pEditWin->LogicToPixel(aRealObjArea); if (!bMapModeEnabled && pEditWin->IsMapModeEnabled()) pEditWin->EnableMapMode(false); } else { - aRealObjArea = m_pClient->GetEditWin()->LogicToPixel( aRealObjArea ); + aRealObjArea = pEditWin->LogicToPixel(aRealObjArea); } return AWTRectangle( aRealObjArea ); @@ -459,20 +459,20 @@ awt::Rectangle SAL_CALL SfxInPlaceClient_Impl::getClipRectangle() aRealObjArea.SetSize( Size( tools::Long( aRealObjArea.GetWidth() * m_aScaleWidth), tools::Long( aRealObjArea.GetHeight() * m_aScaleHeight) ) ); + vcl::Window* pEditWin = m_pClient->GetEditWin(); // See comment for SfxInPlaceClient_Impl::getPlacement. if (comphelper::LibreOfficeKit::isActive()) { - vcl::Window* pEditWin = m_pClient->GetEditWin(); bool bMapModeEnabled = pEditWin->IsMapModeEnabled(); if (!bMapModeEnabled) pEditWin->EnableMapMode(); - aRealObjArea = m_pClient->GetEditWin()->LogicToPixel( aRealObjArea ); + aRealObjArea = pEditWin->LogicToPixel(aRealObjArea); if (!bMapModeEnabled && pEditWin->IsMapModeEnabled()) pEditWin->EnableMapMode(false); } else { - aRealObjArea = m_pClient->GetEditWin()->LogicToPixel( aRealObjArea ); + aRealObjArea = pEditWin->LogicToPixel(aRealObjArea); } return AWTRectangle( aRealObjArea ); |