diff options
Diffstat (limited to 'sw/source/filter/ww8')
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/writerhelper.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8esh.cxx | 16 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtww8.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par3.cxx | 6 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par4.cxx | 10 |
6 files changed, 22 insertions, 22 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 2f77017756ee..62e8e8f5ec6c 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -4140,9 +4140,9 @@ void DocxAttributeOutput::WriteSrcRect(const SdrObject* pSdrObj ) css::text::GraphicCrop aGraphicCropStruct; xPropSet->getPropertyValue( "GraphicCrop" ) >>= aGraphicCropStruct; - const MapMode aMap100mm( MAP_100TH_MM ); + const MapMode aMap100mm( MapUnit::Map100thMM ); const MapMode& rMapMode = aGrafObj.GetPrefMapMode(); - if (rMapMode.GetMapUnit() == MAP_PIXEL) + if (rMapMode.GetMapUnit() == MapUnit::MapPixel) { aOriginalSize = Application::GetDefaultDevice()->PixelToLogic(aOriginalSize, aMap100mm); } diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx index 54c04acdbbce..4de75bc3f9d6 100644 --- a/sw/source/filter/ww8/writerhelper.cxx +++ b/sw/source/filter/ww8/writerhelper.cxx @@ -175,9 +175,9 @@ namespace ww8 , mbForBullet(true) , maGrf(rGrf) { - const MapMode aMap100mm( MAP_100TH_MM ); + const MapMode aMap100mm( MapUnit::Map100thMM ); Size aSize( rGrf.GetPrefSize() ); - if ( MAP_PIXEL == rGrf.GetPrefMapMode().GetMapUnit() ) + if ( MapUnit::MapPixel == rGrf.GetPrefMapMode().GetMapUnit() ) { aSize = Application::GetDefaultDevice()->PixelToLogic(aSize, aMap100mm ); } diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index ea93c9152709..d5d62a18c8c5 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -1622,9 +1622,9 @@ void SwBasicEscherEx::WriteGrfBullet(const Graphic& rGrf) OString aUniqueId = aGraphicObject.GetUniqueID(); if ( !aUniqueId.isEmpty() ) { - const MapMode aMap100mm( MAP_100TH_MM ); + const MapMode aMap100mm( MapUnit::Map100thMM ); Size aSize( rGrf.GetPrefSize() ); - if ( MAP_PIXEL == rGrf.GetPrefMapMode().GetMapUnit() ) + if ( MapUnit::MapPixel == rGrf.GetPrefMapMode().GetMapUnit() ) { aSize = Application::GetDefaultDevice()->PixelToLogic(aSize, aMap100mm ); } @@ -1706,10 +1706,10 @@ sal_Int32 SwBasicEscherEx::WriteGrfFlyFrame(const SwFrameFormat& rFormat, sal_uI if (!aUniqueId.isEmpty()) { - const MapMode aMap100mm( MAP_100TH_MM ); + const MapMode aMap100mm( MapUnit::Map100thMM ); Size aSize( aGraphic.GetPrefSize() ); - if ( MAP_PIXEL == aGraphic.GetPrefMapMode().GetMapUnit() ) + if ( MapUnit::MapPixel == aGraphic.GetPrefMapMode().GetMapUnit() ) { aSize = Application::GetDefaultDevice()->PixelToLogic( aSize, aMap100mm ); @@ -1914,8 +1914,8 @@ void SwBasicEscherEx::WriteBrushAttr(const SvxBrushItem &rBrush, { const Graphic &rGraphic = pGraphicObject->GetGraphic(); Size aSize(rGraphic.GetPrefSize()); - const MapMode aMap100mm(MAP_100TH_MM); - if (MAP_PIXEL == rGraphic.GetPrefMapMode().GetMapUnit()) + const MapMode aMap100mm(MapUnit::Map100thMM); + if (MapUnit::MapPixel == rGraphic.GetPrefMapMode().GetMapUnit()) { aSize = Application::GetDefaultDevice()->PixelToLogic( aSize, aMap100mm); @@ -2211,7 +2211,7 @@ sal_Int32 SwEscherEx::WriteFlyFrameAttr(const SwFrameFormat& rFormat, MSO_SPT eS void SwBasicEscherEx::Init() { - MapUnit eMap = MAP_TWIP; + MapUnit eMap = MapUnit::MapTwip; if (SwDrawModel *pModel = rWrt.m_pDoc->getIDocumentDrawModelAccess().GetDrawModel()) { // PPT arbeitet nur mit Einheiten zu 576DPI @@ -2222,7 +2222,7 @@ void SwBasicEscherEx::Init() // MS-DFF-Properties sind grossteils in EMU (English Metric Units) angegeben // 1mm=36000emu, 1twip=635emu Fraction aFact(360, 1); - aFact /= GetMapFactor(MAP_100TH_MM, eMap).X(); + aFact /= GetMapFactor(MapUnit::Map100thMM, eMap).X(); // create little values aFact = Fraction(aFact.GetNumerator(), aFact.GetDenominator()); mnEmuMul = aFact.GetNumerator(); diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 4d7229e4519b..63324ec652e6 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -1583,10 +1583,10 @@ void MSWordExportBase::BulletDefinitions() { for (size_t i = 0; i < m_vecBulletPic.size(); ++i) { - const MapMode aMapMode(MAP_TWIP); + const MapMode aMapMode(MapUnit::MapTwip); const Graphic& rGraphic = *m_vecBulletPic[i]; Size aSize(rGraphic.GetPrefSize()); - if (MAP_PIXEL == rGraphic.GetPrefMapMode().GetMapUnit()) + if (MapUnit::MapPixel == rGraphic.GetPrefMapMode().GetMapUnit()) aSize = Application::GetDefaultDevice()->PixelToLogic(aSize, aMapMode); else aSize = OutputDevice::LogicToLogic(aSize,rGraphic.GetPrefMapMode(), aMapMode); diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index 33cf02b8677c..3f41f87415ea 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -2365,8 +2365,8 @@ awt::Size SwWW8ImplReader::MiserableDropDownFormHack(const OUString &rString, static_cast<const SvxFontHeightItem*>(pItem)->GetHeight() ); aTmp <<= ((float)aSize.Height()) / 20.0; - aFont.SetFontSize(OutputDevice::LogicToLogic(aSize, MAP_TWIP, - MAP_100TH_MM)); + aFont.SetFontSize(OutputDevice::LogicToLogic(aSize, MapUnit::MapTwip, + MapUnit::Map100thMM)); } break; @@ -2405,7 +2405,7 @@ awt::Size SwWW8ImplReader::MiserableDropDownFormHack(const OUString &rString, if (pOut) { pOut->Push( PushFlags::FONT | PushFlags::MAPMODE ); - pOut->SetMapMode( MapMode( MAP_100TH_MM )); + pOut->SetMapMode( MapMode( MapUnit::Map100thMM )); pOut->SetFont( aFont ); aRet.Width = pOut->GetTextWidth(rString); aRet.Width += 500; //plus size of button, total hack territory diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx index cbecacd75432..7f88b578b634 100644 --- a/sw/source/filter/ww8/ww8par4.cxx +++ b/sw/source/filter/ww8/ww8par4.cxx @@ -164,7 +164,7 @@ static bool SwWw6ReadMetaStream(GDIMetaFile& rWMF, OLE_MFP* pMfp, return false; } - rWMF.SetPrefMapMode( MapMode( MAP_100TH_MM ) ); + rWMF.SetPrefMapMode( MapMode( MapUnit::Map100thMM ) ); // Scale MetaFile to new size and save new size to MetaFile Size aOldSiz( rWMF.GetPrefSize() ); @@ -270,7 +270,7 @@ SwFrameFormat* SwWW8ImplReader::ImportOle(const Graphic* pGrf, pTempSet->Put( aAnchor ); const Size aSizeTwip = OutputDevice::LogicToLogic( - aGraph.GetPrefSize(), aGraph.GetPrefMapMode(), MAP_TWIP ); + aGraph.GetPrefSize(), aGraph.GetPrefMapMode(), MapUnit::MapTwip ); pTempSet->Put( SwFormatFrameSize( ATT_FIX_SIZE, aSizeTwip.Width(), aSizeTwip.Height() ) ); @@ -319,7 +319,7 @@ bool SwWW8ImplReader::ImportOleWMF(tools::SvRef<SotStorage> xSrc1,GDIMetaFile &r aFinalSize.Width() = rX; aFinalSize.Height() = rY; aFinalSize = OutputDevice::LogicToLogic( - aFinalSize, MAP_TWIP, rWMF.GetPrefMapMode() ); + aFinalSize, MapUnit::MapTwip, rWMF.GetPrefMapMode() ); aOrigSize = rWMF.GetPrefSize(); Fraction aScaleX(aFinalSize.Width(),aOrigSize.Width()); Fraction aScaleY(aFinalSize.Height(),aOrigSize.Height()); @@ -354,7 +354,7 @@ SdrObject* SwWW8ImplReader::ImportOleBase( Graphic& rGraph, { rGraph = *pGrf; const Size aSizeTwip = OutputDevice::LogicToLogic( - rGraph.GetPrefSize(), rGraph.GetPrefMapMode(), MAP_TWIP ); + rGraph.GetPrefSize(), rGraph.GetPrefMapMode(), MapUnit::MapTwip ); nX = aSizeTwip.Width(); nY = aSizeTwip.Height(); } @@ -368,7 +368,7 @@ SdrObject* SwWW8ImplReader::ImportOleBase( Graphic& rGraph, { // 03-META stream is not available. Maybe it's a 03-PICT? const Size aSizeTwip = OutputDevice::LogicToLogic( - rGraph.GetPrefSize(), rGraph.GetPrefMapMode(), MAP_TWIP ); + rGraph.GetPrefSize(), rGraph.GetPrefMapMode(), MapUnit::MapTwip ); nX = aSizeTwip.Width(); nY = aSizeTwip.Height(); // PICT: no WMF available -> Graphic instead of OLE |