basic/source/runtime/stdobj1.cxx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)
New commits: commit ef5812deb142d043e58965bf8f4829b50acffcee Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Jan 15 21:30:46 2020 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Thu Jan 16 10:27:56 2020 +0100 can use LogicToLogic here Change-Id: Ibb9b9d01baa2cf9e6635dc3707ccc53e5fa7166e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86890 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/basic/source/runtime/stdobj1.cxx b/basic/source/runtime/stdobj1.cxx index 79105d3e4ed3..aad42547a58e 100644 --- a/basic/source/runtime/stdobj1.cxx +++ b/basic/source/runtime/stdobj1.cxx @@ -84,10 +84,7 @@ void SbStdPicture::PropWidth( SbxVariable* pVar, bool bWrite ) return; } - Size aSize = aGraphic.GetPrefSize(); - aSize = Application::GetDefaultDevice()->LogicToPixel( aSize, aGraphic.GetPrefMapMode() ); - aSize = Application::GetDefaultDevice()->PixelToLogic( aSize, MapMode( MapUnit::MapTwip ) ); - + Size aSize = OutputDevice::LogicToLogic(aGraphic.GetPrefSize(), aGraphic.GetPrefMapMode(), MapMode(MapUnit::MapTwip)); pVar->PutInteger( static_cast<sal_Int16>(aSize.Width()) ); } @@ -99,10 +96,7 @@ void SbStdPicture::PropHeight( SbxVariable* pVar, bool bWrite ) return; } - Size aSize = aGraphic.GetPrefSize(); - aSize = Application::GetDefaultDevice()->LogicToPixel( aSize, aGraphic.GetPrefMapMode() ); - aSize = Application::GetDefaultDevice()->PixelToLogic( aSize, MapMode( MapUnit::MapTwip ) ); - + Size aSize = OutputDevice::LogicToLogic(aGraphic.GetPrefSize(), aGraphic.GetPrefMapMode(), MapMode(MapUnit::MapTwip)); pVar->PutInteger( static_cast<sal_Int16>(aSize.Height()) ); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits