diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-11-14 00:09:43 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-11-13 23:38:37 +0100 |
commit | 7b8f630db30ee0066a9f4b6e540368d2fcad7fa8 (patch) | |
tree | e40626d45db8a228defeca6e66aba9055974d0a6 /filter | |
parent | 44f20abf66ce3f9806ad95522d7d9ae698350499 (diff) |
Use o3tl::convert
Change-Id: I78db3001d602ec1a0847785b3c127b9d345f5af7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125173
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/msfilter/eschesdo.cxx | 11 | ||||
-rw-r--r-- | filter/source/msfilter/eschesdo.hxx | 6 |
2 files changed, 7 insertions, 10 deletions
diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx index f73ffd2b29da..114e2c9304f9 100644 --- a/filter/source/msfilter/eschesdo.cxx +++ b/filter/source/msfilter/eschesdo.cxx @@ -23,7 +23,6 @@ #include <svx/svdobj.hxx> #include <svx/unoapi.hxx> #include <svx/unoshape.hxx> -#include <vcl/outdev.hxx> #include <tools/poly.hxx> #include <tools/debug.hxx> #include <tools/diagnose_ex.h> @@ -47,13 +46,11 @@ using namespace ::com::sun::star::text; using namespace ::com::sun::star::task; using namespace ::com::sun::star::style; -#define EES_MAP_FRACTION 1440 // 1440 dpi - ImplEESdrWriter::ImplEESdrWriter( EscherEx& rEx ) : mpEscherEx(&rEx) - , maMapModeSrc(MapUnit::Map100thMM) + , meUnitsSrc(o3tl::Length::mm100) // PowerPoint: 576 dpi, WinWord: 1440 dpi, Excel: 1440 dpi - , maMapModeDest( MapUnit::MapInch, Point(), Fraction( 1, EES_MAP_FRACTION ), Fraction( 1, EES_MAP_FRACTION ) ) + , meUnitsDest(o3tl::Length::twip) , mpPicStrm(nullptr) , mpHostAppData(nullptr) , mbIsTitlePossible(false) @@ -65,12 +62,12 @@ ImplEESdrWriter::ImplEESdrWriter( EscherEx& rEx ) Point ImplEESdrWriter::ImplMapPoint( const Point& rPoint ) { - return OutputDevice::LogicToLogic( rPoint, maMapModeSrc, maMapModeDest ); + return o3tl::convert( rPoint, meUnitsSrc, meUnitsDest ); } Size ImplEESdrWriter::ImplMapSize( const Size& rSize ) { - Size aRetSize( OutputDevice::LogicToLogic( rSize, maMapModeSrc, maMapModeDest ) ); + Size aRetSize( o3tl::convert( rSize, meUnitsSrc, meUnitsDest ) ); if ( !aRetSize.Width() ) aRetSize.AdjustWidth( 1 ); diff --git a/filter/source/msfilter/eschesdo.hxx b/filter/source/msfilter/eschesdo.hxx index 114efca4092f..6d5f84f6a760 100644 --- a/filter/source/msfilter/eschesdo.hxx +++ b/filter/source/msfilter/eschesdo.hxx @@ -19,7 +19,7 @@ #pragma once #include <filter/msfilter/escherex.hxx> #include <o3tl/any.hxx> -#include <vcl/mapmod.hxx> +#include <o3tl/unit_conversion.hxx> // fractions of Draw PPTWriter etc. @@ -100,8 +100,8 @@ class EscherExHostAppData; class ImplEESdrWriter { EscherEx* mpEscherEx; - MapMode maMapModeSrc; - MapMode maMapModeDest; + o3tl::Length meUnitsSrc; + o3tl::Length meUnitsDest; css::uno::Reference< css::drawing::XDrawPage > mXDrawPage; css::uno::Reference< css::drawing::XShapes > mXShapes; SvStream* mpPicStrm; |