[Libreoffice-commits] core.git: basic/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jan 16 09:28:29 UTC 2020
basic/source/runtime/stdobj1.cxx | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
New commits:
commit ef5812deb142d043e58965bf8f4829b50acffcee
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Jan 15 21:30:46 2020 +0000
Commit: Caolán McNamara <caolanm at 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 <caolanm at 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()) );
}
More information about the Libreoffice-commits
mailing list