[Libreoffice-commits] core.git: sfx2/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Thu Apr 8 08:57:10 UTC 2021
sfx2/source/view/ipclient.cxx | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
New commits:
commit 852d15792d672f2437df6364247a4870883b1d10
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Apr 7 21:07:01 2021 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Apr 8 10:56:25 2021 +0200
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 at redhat.com>
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 );
More information about the Libreoffice-commits
mailing list