summaryrefslogtreecommitdiff
path: root/svx/source/unodraw
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/unodraw')
-rw-r--r--svx/source/unodraw/UnoGraphicExporter.cxx6
-rw-r--r--svx/source/unodraw/unopool.cxx8
-rw-r--r--svx/source/unodraw/unoprov.cxx44
-rw-r--r--svx/source/unodraw/unoshap4.cxx4
-rw-r--r--svx/source/unodraw/unoshape.cxx24
5 files changed, 43 insertions, 43 deletions
diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx
index be81e31c7ca1..deedad6885b5 100644
--- a/svx/source/unodraw/UnoGraphicExporter.cxx
+++ b/svx/source/unodraw/UnoGraphicExporter.cxx
@@ -194,7 +194,7 @@ namespace {
{
// use 100th mm for primitive bitmap converter tool, input is pixel
// use a real OutDev to get the correct DPI, the static LogicToLogic assumes 72dpi which is wrong (!)
- const Size aSize100th(Application::GetDefaultDevice()->PixelToLogic(*pSize, MapMode(MAP_100TH_MM)));
+ const Size aSize100th(Application::GetDefaultDevice()->PixelToLogic(*pSize, MapMode(MapUnit::Map100thMM)));
aRange.expand(basegfx::B2DPoint(aSize100th.Width(), aSize100th.Height()));
@@ -205,7 +205,7 @@ namespace {
else
{
// use 100th mm for primitive bitmap converter tool
- const Size aSize100th(OutputDevice::LogicToLogic(rMtf.GetPrefSize(), rMtf.GetPrefMapMode(), MapMode(MAP_100TH_MM)));
+ const Size aSize100th(OutputDevice::LogicToLogic(rMtf.GetPrefSize(), rMtf.GetPrefMapMode(), MapMode(MapUnit::Map100thMM)));
aRange.expand(basegfx::B2DPoint(aSize100th.Width(), aSize100th.Height()));
}
@@ -394,7 +394,7 @@ IMPL_LINK(GraphicExporter, CalcFieldValueHdl, EditFieldInfo*, pInfo, void)
VclPtr<VirtualDevice> GraphicExporter::CreatePageVDev( SdrPage* pPage, sal_uIntPtr nWidthPixel, sal_uIntPtr nHeightPixel ) const
{
VclPtr<VirtualDevice> pVDev = VclPtr<VirtualDevice>::Create();
- MapMode aMM( MAP_100TH_MM );
+ MapMode aMM( MapUnit::Map100thMM );
Point aPoint( 0, 0 );
Size aPageSize(pPage->GetSize());
diff --git a/svx/source/unodraw/unopool.cxx b/svx/source/unodraw/unopool.cxx
index c62a7ed26d2c..15752f7bd7c4 100644
--- a/svx/source/unodraw/unopool.cxx
+++ b/svx/source/unodraw/unopool.cxx
@@ -120,7 +120,7 @@ void SvxUnoDrawPool::getAny( SfxItemPool* pPool, const comphelper::PropertyMapEn
const MapUnit eMapUnit = pPool->GetMetric((sal_uInt16)pEntry->mnHandle);
sal_uInt8 nMemberId = pEntry->mnMemberId & (~SFX_METRIC_ITEM);
- if( eMapUnit == MAP_100TH_MM )
+ if( eMapUnit == MapUnit::Map100thMM )
nMemberId &= (~CONVERT_TWIPS);
// DVO, OD 10.10.2003 #i18732#
@@ -133,7 +133,7 @@ void SvxUnoDrawPool::getAny( SfxItemPool* pPool, const comphelper::PropertyMapEn
// check for needed metric translation
const MapUnit eMapUnit = pPool->GetMetric((sal_uInt16)pEntry->mnHandle);
- if(pEntry->mnMemberId & SFX_METRIC_ITEM && eMapUnit != MAP_100TH_MM)
+ if(pEntry->mnMemberId & SFX_METRIC_ITEM && eMapUnit != MapUnit::Map100thMM)
{
SvxUnoConvertToMM( eMapUnit, rValue );
}
@@ -153,7 +153,7 @@ void SvxUnoDrawPool::putAny( SfxItemPool* pPool, const comphelper::PropertyMapEn
uno::Any aValue( rValue );
const MapUnit eMapUnit = pPool->GetMetric((sal_uInt16)pEntry->mnHandle);
- if(pEntry->mnMemberId & SFX_METRIC_ITEM && eMapUnit != MAP_100TH_MM)
+ if(pEntry->mnMemberId & SFX_METRIC_ITEM && eMapUnit != MapUnit::Map100thMM)
{
SvxUnoConvertFromMM( eMapUnit, aValue );
}
@@ -187,7 +187,7 @@ void SvxUnoDrawPool::putAny( SfxItemPool* pPool, const comphelper::PropertyMapEn
{
std::unique_ptr<SfxPoolItem> pNewItem( pPool->GetDefaultItem( nWhich ).Clone() );
sal_uInt8 nMemberId = pEntry->mnMemberId & (~SFX_METRIC_ITEM);
- if( pPool->GetMetric(nWhich) == MAP_100TH_MM )
+ if( pPool->GetMetric(nWhich) == MapUnit::Map100thMM )
nMemberId &= (~CONVERT_TWIPS);
if( !pNewItem->PutValue( aValue, nMemberId ) )
diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx
index 37b311ac8e0e..2d9f97c47a24 100644
--- a/svx/source/unodraw/unoprov.cxx
+++ b/svx/source/unodraw/unoprov.cxx
@@ -971,17 +971,17 @@ sal_Bool SvxMeasureUnitToMapUnit( const short eApi, int& eVcl ) throw()
{
switch( eVcl )
{
- case util::MeasureUnit::MM_100TH: eVcl = MAP_100TH_MM; break;
- case util::MeasureUnit::MM_10TH: eVcl = MAP_10TH_MM; break;
- case util::MeasureUnit::MM: eVcl = MAP_MM; break;
- case util::MeasureUnit::CM: eVcl = MAP_CM; break;
- case util::MeasureUnit::INCH_1000TH: eVcl = MAP_1000TH_INCH; break;
- case util::MeasureUnit::INCH_100TH: eVcl = MAP_100TH_INCH; break;
- case util::MeasureUnit::INCH_10TH: eVcl = MAP_10TH_INCH; break;
- case util::MeasureUnit::INCH: eVcl = MAP_INCH; break;
- case util::MeasureUnit::POINT: eVcl = MAP_POINT; break;
- case util::MeasureUnit::TWIP: eVcl = MAP_TWIP; break;
- case util::MeasureUnit::PERCENT: eVcl = MAP_RELATIVE; break;
+ case util::MeasureUnit::MM_100TH: eVcl = MapUnit::Map100thMM; break;
+ case util::MeasureUnit::MM_10TH: eVcl = MapUnit::Map10thMM; break;
+ case util::MeasureUnit::MM: eVcl = MapUnit::MapMM; break;
+ case util::MeasureUnit::CM: eVcl = MapUnit::MapCM; break;
+ case util::MeasureUnit::INCH_1000TH: eVcl = MapUnit::Map1000thInch; break;
+ case util::MeasureUnit::INCH_100TH: eVcl = MapUnit::Map100thInch; break;
+ case util::MeasureUnit::INCH_10TH: eVcl = MapUnit::Map10thInch; break;
+ case util::MeasureUnit::INCH: eVcl = MapUnit::MapInch; break;
+ case util::MeasureUnit::POINT: eVcl = MapUnit::MapPoint; break;
+ case util::MeasureUnit::TWIP: eVcl = MapUnit::MapTwip; break;
+ case util::MeasureUnit::PERCENT: eVcl = MapUnit::MapRelative; break;
default:
return false;
}
@@ -997,17 +997,17 @@ bool SvxMapUnitToMeasureUnit( const MapUnit eVcl, short& eApi ) throw()
{
switch( eVcl )
{
- case MAP_100TH_MM: eApi = util::MeasureUnit::MM_100TH; break;
- case MAP_10TH_MM: eApi = util::MeasureUnit::MM_10TH; break;
- case MAP_MM: eApi = util::MeasureUnit::MM; break;
- case MAP_CM: eApi = util::MeasureUnit::CM; break;
- case MAP_1000TH_INCH: eApi = util::MeasureUnit::INCH_1000TH; break;
- case MAP_100TH_INCH: eApi = util::MeasureUnit::INCH_100TH; break;
- case MAP_10TH_INCH: eApi = util::MeasureUnit::INCH_10TH; break;
- case MAP_INCH: eApi = util::MeasureUnit::INCH; break;
- case MAP_POINT: eApi = util::MeasureUnit::POINT; break;
- case MAP_TWIP: eApi = util::MeasureUnit::TWIP; break;
- case MAP_RELATIVE: eApi = util::MeasureUnit::PERCENT; break;
+ case MapUnit::Map100thMM: eApi = util::MeasureUnit::MM_100TH; break;
+ case MapUnit::Map10thMM: eApi = util::MeasureUnit::MM_10TH; break;
+ case MapUnit::MapMM: eApi = util::MeasureUnit::MM; break;
+ case MapUnit::MapCM: eApi = util::MeasureUnit::CM; break;
+ case MapUnit::Map1000thInch: eApi = util::MeasureUnit::INCH_1000TH; break;
+ case MapUnit::Map100thInch: eApi = util::MeasureUnit::INCH_100TH; break;
+ case MapUnit::Map10thInch: eApi = util::MeasureUnit::INCH_10TH; break;
+ case MapUnit::MapInch: eApi = util::MeasureUnit::INCH; break;
+ case MapUnit::MapPoint: eApi = util::MeasureUnit::POINT; break;
+ case MapUnit::MapTwip: eApi = util::MeasureUnit::TWIP; break;
+ case MapUnit::MapRelative: eApi = util::MeasureUnit::PERCENT; break;
default:
return false;
}
diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx
index 97fa794b71a9..4b0232d6074b 100644
--- a/svx/source/unodraw/unoshap4.cxx
+++ b/svx/source/unodraw/unoshap4.cxx
@@ -102,7 +102,7 @@ bool SvxOle2Shape::setPropertyValueImpl( const OUString& rName, const SfxItemPro
{
try
{
- MapUnit aMapUnit( MAP_100TH_MM ); // the API handles with MAP_100TH_MM map mode
+ MapUnit aMapUnit( MapUnit::Map100thMM ); // the API handles with MapUnit::Map100thMM map mode
MapUnit aObjUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( embed::Aspects::MSOLE_CONTENT ) );
aTmp = OutputDevice::LogicToLogic( aTmp, aMapUnit, aObjUnit );
xObj->setVisualAreaSize( embed::Aspects::MSOLE_CONTENT, awt::Size( aTmp.Width(), aTmp.Height() ) );
@@ -266,7 +266,7 @@ bool SvxOle2Shape::getPropertyValueImpl( const OUString& rName, const SfxItemPro
awt::Rectangle aVisArea;
if( dynamic_cast<const SdrOle2Obj* >(mpObj.get()) != nullptr)
{
- MapMode aMapMode( MAP_100TH_MM ); // the API uses this map mode
+ MapMode aMapMode( MapUnit::Map100thMM ); // the API uses this map mode
Size aTmp = static_cast<SdrOle2Obj*>(mpObj.get())->GetOrigObjSize( &aMapMode ); // get the size in the requested map mode
aVisArea = awt::Rectangle( 0, 0, aTmp.Width(), aTmp.Height() );
}
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 4b2037352c62..323df4fd5eb9 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -485,11 +485,11 @@ void SvxShape::ForceMetricToItemPoolMetric(Pair& rPoint) const throw()
if(mpModel)
{
MapUnit eMapUnit = mpModel->GetItemPool().GetMetric(0);
- if(eMapUnit != MAP_100TH_MM)
+ if(eMapUnit != MapUnit::Map100thMM)
{
switch(eMapUnit)
{
- case MAP_TWIP :
+ case MapUnit::MapTwip :
{
rPoint.A() = MM_TO_TWIPS(rPoint.A());
rPoint.B() = MM_TO_TWIPS(rPoint.B());
@@ -511,11 +511,11 @@ void SvxShape::ForceMetricToItemPoolMetric(basegfx::B2DPolyPolygon& rPolyPolygon
if(mpModel)
{
MapUnit eMapUnit = mpModel->GetItemPool().GetMetric(0);
- if(eMapUnit != MAP_100TH_MM)
+ if(eMapUnit != MapUnit::Map100thMM)
{
switch(eMapUnit)
{
- case MAP_TWIP :
+ case MapUnit::MapTwip :
{
basegfx::B2DHomMatrix aTransform;
const double fMMToTWIPS(72.0 / 127.0);
@@ -537,15 +537,15 @@ void SvxShape::ForceMetricToItemPoolMetric(basegfx::B2DPolyPolygon& rPolyPolygon
void SvxShape::ForceMetricTo100th_mm(Pair& rPoint) const throw()
{
DBG_TESTSOLARMUTEX();
- MapUnit eMapUnit = MAP_100TH_MM;
+ MapUnit eMapUnit = MapUnit::Map100thMM;
if(mpModel)
{
eMapUnit = mpModel->GetItemPool().GetMetric(0);
- if(eMapUnit != MAP_100TH_MM)
+ if(eMapUnit != MapUnit::Map100thMM)
{
switch(eMapUnit)
{
- case MAP_TWIP :
+ case MapUnit::MapTwip :
{
rPoint.A() = TWIPS_TO_MM(rPoint.A());
rPoint.B() = TWIPS_TO_MM(rPoint.B());
@@ -564,15 +564,15 @@ void SvxShape::ForceMetricTo100th_mm(Pair& rPoint) const throw()
void SvxShape::ForceMetricTo100th_mm(basegfx::B2DPolyPolygon& rPolyPolygon) const throw()
{
DBG_TESTSOLARMUTEX();
- MapUnit eMapUnit = MAP_100TH_MM;
+ MapUnit eMapUnit = MapUnit::Map100thMM;
if(mpModel)
{
eMapUnit = mpModel->GetItemPool().GetMetric(0);
- if(eMapUnit != MAP_100TH_MM)
+ if(eMapUnit != MapUnit::Map100thMM)
{
switch(eMapUnit)
{
- case MAP_TWIP :
+ case MapUnit::MapTwip :
{
basegfx::B2DHomMatrix aTransform;
const double fTWIPSToMM(127.0 / 72.0);
@@ -660,7 +660,7 @@ uno::Any SvxShape::GetBitmap( bool bMetaFile /* = false */ ) const
return aAny;
ScopedVclPtrInstance< VirtualDevice > pVDev;
- pVDev->SetMapMode(MapMode(MAP_100TH_MM));
+ pVDev->SetMapMode(MapMode(MapUnit::Map100thMM));
SdrModel* pModel = mpObj->GetModel();
SdrPage* pPage = mpObj->GetPage();
@@ -690,7 +690,7 @@ uno::Any SvxShape::GetBitmap( bool bMetaFile /* = false */ ) const
{
Graphic aGraph(aMtf);
aGraph.SetPrefSize(aSize);
- aGraph.SetPrefMapMode(MAP_100TH_MM);
+ aGraph.SetPrefMapMode(MapUnit::Map100thMM);
Reference< awt::XBitmap > xBmp( aGraph.GetXGraphic(), UNO_QUERY );
aAny <<= xBmp;