diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-08-09 14:54:05 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-08-09 18:30:36 +0200 |
commit | f394b313ad9eac459e4765a639410ebd9278351a (patch) | |
tree | 6f32d055c17baaef670652f545eb5d9fd65d61b1 /sw | |
parent | e845507bc22a166ec172a4b4d9da120a16f8a964 (diff) |
Resolves: tdf#99286 for jpeg dpi use apis that know about MapUnit::MapPixel
move the code which can do this from sw to vcl
Change-Id: I9940fb80ecdbfe8f70afc500c691288ed0993701
Reviewed-on: https://gerrit.libreoffice.org/40925
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/docnode/ndnotxt.cxx | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/sw/source/core/docnode/ndnotxt.cxx b/sw/source/core/docnode/ndnotxt.cxx index 3d33fda5cd5d..8cf1d1c399ba 100644 --- a/sw/source/core/docnode/ndnotxt.cxx +++ b/sw/source/core/docnode/ndnotxt.cxx @@ -119,21 +119,9 @@ const tools::PolyPolygon *SwNoTextNode::HasContour() const { if ( !bPixelGrf && m_bPixelContour ) { - const Size aGrfPixelSize( GetGraphic().GetSizePixel() ); - const Size aGrfPrefMapModeSize( GetGraphic().GetPrefSize() ); - if ( aGrfMap.GetMapUnit() == MapUnit::MapInch ) - { - nGrfDPIx = aGrfPixelSize.Width() / ( (double)aGrfMap.GetScaleX() * aGrfPrefMapModeSize.Width() ); - nGrfDPIy = aGrfPixelSize.Height() / ( (double)aGrfMap.GetScaleY() * aGrfPrefMapModeSize.Height() ); - } - else - { - const Size aGrf1000thInchSize = - OutputDevice::LogicToLogic( aGrfPrefMapModeSize, - aGrfMap, MapUnit::Map1000thInch ); - nGrfDPIx = 1000.0 * aGrfPixelSize.Width() / aGrf1000thInchSize.Width(); - nGrfDPIy = 1000.0 * aGrfPixelSize.Height() / aGrf1000thInchSize.Height(); - } + basegfx::B2DSize aDPI = GetGraphic().GetPPI(); + nGrfDPIx = aDPI.getX(); + nGrfDPIy = aDPI.getY(); } } OSL_ENSURE( !bPixelGrf || aGrfMap == aContourMap, |