summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/access/accmap.cxx12
-rw-r--r--sw/source/core/bastyp/swtypes.cxx4
-rw-r--r--sw/source/core/crsr/crstrvl.cxx2
-rw-r--r--sw/source/core/doc/DocumentDeviceManager.cxx4
-rw-r--r--sw/source/core/doc/fmtcol.cxx2
-rw-r--r--sw/source/core/docnode/ndnotxt.cxx18
-rw-r--r--sw/source/core/draw/dflyobj.cxx4
-rw-r--r--sw/source/core/draw/dpage.cxx2
-rw-r--r--sw/source/core/draw/drawdoc.cxx2
-rw-r--r--sw/source/core/frmedt/fecopy.cxx2
-rw-r--r--sw/source/core/frmedt/fefly1.cxx6
-rw-r--r--sw/source/core/layout/atrfrm.cxx8
-rw-r--r--sw/source/core/layout/fly.cxx6
-rw-r--r--sw/source/core/ole/ndole.cxx6
-rw-r--r--sw/source/core/text/EnhancedPDFExportHelper.cxx2
-rw-r--r--sw/source/core/text/itratr.cxx4
-rw-r--r--sw/source/core/text/noteurl.cxx2
-rw-r--r--sw/source/core/text/porrst.cxx2
-rw-r--r--sw/source/core/text/txtdrop.cxx4
-rw-r--r--sw/source/core/txtnode/fntcache.cxx2
-rw-r--r--sw/source/core/unocore/unoframe.cxx10
-rw-r--r--sw/source/core/unocore/unoparagraph.cxx2
-rw-r--r--sw/source/core/unocore/unostyle.cxx8
-rw-r--r--sw/source/core/view/pagepreviewlayout.cxx2
-rw-r--r--sw/source/core/view/viewpg.cxx2
-rw-r--r--sw/source/core/view/viewsh.cxx2
-rw-r--r--sw/source/core/view/vprint.cxx2
-rw-r--r--sw/source/filter/html/css1atr.cxx2
-rw-r--r--sw/source/filter/html/htmlatr.cxx2
-rw-r--r--sw/source/filter/html/htmldrawreader.cxx4
-rw-r--r--sw/source/filter/html/htmldrawwriter.cxx4
-rw-r--r--sw/source/filter/html/htmlflywriter.cxx16
-rw-r--r--sw/source/filter/html/htmlform.cxx8
-rw-r--r--sw/source/filter/html/htmlforw.cxx2
-rw-r--r--sw/source/filter/html/htmlgrin.cxx2
-rw-r--r--sw/source/filter/html/htmlnumreader.cxx2
-rw-r--r--sw/source/filter/html/htmlplug.cxx4
-rw-r--r--sw/source/filter/html/htmlsect.cxx4
-rw-r--r--sw/source/filter/html/htmltab.cxx4
-rw-r--r--sw/source/filter/html/htmltabw.cxx10
-rw-r--r--sw/source/filter/html/svxcss1.cxx2
-rw-r--r--sw/source/filter/html/swhtml.cxx6
-rw-r--r--sw/source/filter/html/wrthtml.cxx2
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx4
-rw-r--r--sw/source/filter/ww8/writerhelper.cxx4
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx16
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx4
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx6
-rw-r--r--sw/source/filter/ww8/ww8par4.cxx10
-rw-r--r--sw/source/filter/xml/xmlexp.cxx2
-rw-r--r--sw/source/filter/xml/xmlimp.cxx4
-rw-r--r--sw/source/filter/xml/xmltexte.cxx2
-rw-r--r--sw/source/filter/xml/xmltexti.cxx10
-rw-r--r--sw/source/ui/chrdlg/drpcps.cxx2
-rw-r--r--sw/source/ui/config/optload.cxx2
-rw-r--r--sw/source/ui/config/optpage.cxx36
-rw-r--r--sw/source/ui/dbui/addresslistdialog.cxx4
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.cxx16
-rw-r--r--sw/source/ui/dbui/dbtablepreviewdialog.cxx2
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.cxx12
-rw-r--r--sw/source/ui/dbui/mmdocselectpage.cxx2
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.cxx4
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.cxx2
-rw-r--r--sw/source/ui/dbui/mmoutputtypepage.cxx4
-rw-r--r--sw/source/ui/dbui/selectdbtabledialog.cxx4
-rw-r--r--sw/source/ui/envelp/envfmt.cxx4
-rw-r--r--sw/source/ui/envelp/envlop1.cxx4
-rw-r--r--sw/source/ui/envelp/labfmt.cxx4
-rw-r--r--sw/source/ui/fldui/flddb.cxx2
-rw-r--r--sw/source/ui/fldui/flddinf.cxx2
-rw-r--r--sw/source/ui/fldui/flddok.cxx2
-rw-r--r--sw/source/ui/fldui/fldfunc.cxx2
-rw-r--r--sw/source/ui/fldui/fldref.cxx2
-rw-r--r--sw/source/ui/fldui/fldvar.cxx2
-rw-r--r--sw/source/ui/frmdlg/column.cxx4
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx2
-rw-r--r--sw/source/ui/index/cnttab.cxx8
-rw-r--r--sw/source/ui/misc/bookmark.cxx2
-rw-r--r--sw/source/ui/misc/glosbib.cxx2
-rw-r--r--sw/source/ui/misc/glossary.cxx2
-rw-r--r--sw/source/ui/misc/pgfnote.cxx6
-rw-r--r--sw/source/uibase/app/appenv.cxx2
-rw-r--r--sw/source/uibase/app/docshini.cxx4
-rw-r--r--sw/source/uibase/dbui/dbtree.cxx2
-rw-r--r--sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx2
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx14
-rw-r--r--sw/source/uibase/docvw/HeaderFooterWin.cxx2
-rw-r--r--sw/source/uibase/docvw/PageBreakWin.cxx2
-rw-r--r--sw/source/uibase/docvw/SidebarScrollBar.cxx2
-rw-r--r--sw/source/uibase/docvw/SidebarWin.cxx2
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx2
-rw-r--r--sw/source/uibase/docvw/srcedtw.cxx2
-rw-r--r--sw/source/uibase/frmdlg/colex.cxx4
-rw-r--r--sw/source/uibase/lingu/sdrhhcwrap.cxx2
-rw-r--r--sw/source/uibase/misc/redlndlg.cxx2
-rw-r--r--sw/source/uibase/shells/grfshex.cxx4
-rw-r--r--sw/source/uibase/shells/textsh.cxx2
-rw-r--r--sw/source/uibase/sidebar/PageFormatPanel.cxx2
-rw-r--r--sw/source/uibase/sidebar/PageMarginControl.cxx4
-rw-r--r--sw/source/uibase/table/chartins.cxx2
-rw-r--r--sw/source/uibase/uiview/pview.cxx2
-rw-r--r--sw/source/uibase/uiview/srcview.cxx4
-rw-r--r--sw/source/uibase/uiview/swcli.cxx2
-rw-r--r--sw/source/uibase/uiview/view2.cxx2
-rw-r--r--sw/source/uibase/uiview/viewdraw.cxx4
-rw-r--r--sw/source/uibase/uiview/viewmdi.cxx2
-rw-r--r--sw/source/uibase/uiview/viewport.cxx2
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx4
-rw-r--r--sw/source/uibase/utlui/attrdesc.cxx2
-rw-r--r--sw/source/uibase/utlui/shdwcrsr.cxx2
-rw-r--r--sw/source/uibase/utlui/unotools.cxx2
-rw-r--r--sw/source/uibase/wrtsh/wrtsh1.cxx8
112 files changed, 246 insertions, 246 deletions
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index 54fec424c5f9..4775ccfd62e2 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -3095,8 +3095,8 @@ void SwAccessibleMap::FireEvents()
Rectangle SwAccessibleMap::GetVisibleArea() const
{
- MapMode aSrc( MAP_TWIP );
- MapMode aDest( MAP_100TH_MM );
+ MapMode aSrc( MapUnit::MapTwip );
+ MapMode aDest( MapUnit::Map100thMM );
return OutputDevice::LogicToLogic( GetVisArea().SVRect(), aSrc, aDest );
}
@@ -3104,8 +3104,8 @@ Rectangle SwAccessibleMap::GetVisibleArea() const
// relative to the screen!
Point SwAccessibleMap::LogicToPixel( const Point& rPoint ) const
{
- MapMode aSrc( MAP_100TH_MM );
- MapMode aDest( MAP_TWIP );
+ MapMode aSrc( MapUnit::Map100thMM );
+ MapMode aDest( MapUnit::MapTwip );
Point aPoint = rPoint;
@@ -3124,8 +3124,8 @@ Point SwAccessibleMap::LogicToPixel( const Point& rPoint ) const
Size SwAccessibleMap::LogicToPixel( const Size& rSize ) const
{
- MapMode aSrc( MAP_100TH_MM );
- MapMode aDest( MAP_TWIP );
+ MapMode aSrc( MapUnit::Map100thMM );
+ MapMode aDest( MapUnit::MapTwip );
Size aSize( OutputDevice::LogicToLogic( rSize, aSrc, aDest ) );
if( GetShell()->GetWin() )
{
diff --git a/sw/source/core/bastyp/swtypes.cxx b/sw/source/core/bastyp/swtypes.cxx
index 97bbfb343f6b..0e0556ba3b61 100644
--- a/sw/source/core/bastyp/swtypes.cxx
+++ b/sw/source/core/bastyp/swtypes.cxx
@@ -80,9 +80,9 @@ IMPL_FIXEDMEMPOOL_NEWDEL( SwCursor_SavePos )
Size GetGraphicSizeTwip(const Graphic& rGraphic, vcl::RenderContext* pOutDev)
{
- const MapMode aMapTwip(MAP_TWIP);
+ const MapMode aMapTwip(MapUnit::MapTwip);
Size aSize(rGraphic.GetPrefSize());
- if (MAP_PIXEL == rGraphic.GetPrefMapMode().GetMapUnit())
+ if (MapUnit::MapPixel == rGraphic.GetPrefMapMode().GetMapUnit())
{
if (!pOutDev)
pOutDev = Application::GetDefaultDevice();
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index e7853e3e45c4..6099b32aec51 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -1610,7 +1610,7 @@ bool SwCursorShell::GetContentAtPos( const Point& rPt,
{
OUString aStr;
GetDoc()->GetAttrPool().GetPresentation( *pItem,
- MAP_CM, aStr );
+ MapUnit::MapCM, aStr );
if (!sAttrs.isEmpty())
sAttrs += ", ";
sAttrs += aStr;
diff --git a/sw/source/core/doc/DocumentDeviceManager.cxx b/sw/source/core/doc/DocumentDeviceManager.cxx
index 2aae3a1ca6ce..1659263e0603 100644
--- a/sw/source/core/doc/DocumentDeviceManager.cxx
+++ b/sw/source/core/doc/DocumentDeviceManager.cxx
@@ -78,7 +78,7 @@ void DocumentDeviceManager::setPrinter(/*[in]*/ SfxPrinter *pP,/*[in]*/ bool bDe
if ( mpPrt )
{
MapMode aMapMode( mpPrt->GetMapMode() );
- aMapMode.SetMapUnit( MAP_TWIP );
+ aMapMode.SetMapUnit( MapUnit::MapTwip );
mpPrt->SetMapMode( aMapMode );
}
@@ -272,7 +272,7 @@ VirtualDevice& DocumentDeviceManager::CreateVirtualDevice_() const
pNewVir->Compat_ZeroExtleadBug();
MapMode aMapMode( pNewVir->GetMapMode() );
- aMapMode.SetMapUnit( MAP_TWIP );
+ aMapMode.SetMapUnit( MapUnit::MapTwip );
pNewVir->SetMapMode( aMapMode );
const_cast<DocumentDeviceManager*>(this)->setVirtualDevice( pNewVir );
diff --git a/sw/source/core/doc/fmtcol.cxx b/sw/source/core/doc/fmtcol.cxx
index b52b9f07b15a..509b55ee1137 100644
--- a/sw/source/core/doc/fmtcol.cxx
+++ b/sw/source/core/doc/fmtcol.cxx
@@ -284,7 +284,7 @@ void SwTextFormatColl::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew
pFSize != pOldFSize )
{
if( 100 == pOldFSize->GetProp() &&
- MAP_RELATIVE == pOldFSize->GetPropUnit() )
+ MapUnit::MapRelative == pOldFSize->GetPropUnit() )
{
// We set it to absolute -> do not propagate it further, unless
// we set it!
diff --git a/sw/source/core/docnode/ndnotxt.cxx b/sw/source/core/docnode/ndnotxt.cxx
index b156c4d3d066..ba17a92b0b0f 100644
--- a/sw/source/core/docnode/ndnotxt.cxx
+++ b/sw/source/core/docnode/ndnotxt.cxx
@@ -112,8 +112,8 @@ const tools::PolyPolygon *SwNoTextNode::HasContour() const
if( !bContourMapModeValid )
{
const MapMode aGrfMap( GetGraphic().GetPrefMapMode() );
- bool bPixelGrf = aGrfMap.GetMapUnit() == MAP_PIXEL;
- const MapMode aContourMap( bPixelGrf ? MAP_PIXEL : MAP_100TH_MM );
+ bool bPixelGrf = aGrfMap.GetMapUnit() == MapUnit::MapPixel;
+ const MapMode aContourMap( bPixelGrf ? MapUnit::MapPixel : MapUnit::Map100thMM );
if( bPixelGrf ? !bPixelContour : aGrfMap != aContourMap )
{
double nGrfDPIx = 0.0;
@@ -123,7 +123,7 @@ const tools::PolyPolygon *SwNoTextNode::HasContour() const
{
const Size aGrfPixelSize( GetGraphic().GetSizePixel() );
const Size aGrfPrefMapModeSize( GetGraphic().GetPrefSize() );
- if ( aGrfMap.GetMapUnit() == MAP_INCH )
+ if ( aGrfMap.GetMapUnit() == MapUnit::MapInch )
{
nGrfDPIx = aGrfPixelSize.Width() / ( (double)aGrfMap.GetScaleX() * aGrfPrefMapModeSize.Width() );
nGrfDPIy = aGrfPixelSize.Height() / ( (double)aGrfMap.GetScaleY() * aGrfPrefMapModeSize.Height() );
@@ -132,7 +132,7 @@ const tools::PolyPolygon *SwNoTextNode::HasContour() const
{
const Size aGrf1000thInchSize =
OutputDevice::LogicToLogic( aGrfPrefMapModeSize,
- aGrfMap, MAP_1000TH_INCH );
+ aGrfMap, MapUnit::Map1000thInch );
nGrfDPIx = 1000.0 * aGrfPixelSize.Width() / aGrf1000thInchSize.Width();
nGrfDPIy = 1000.0 * aGrfPixelSize.Height() / aGrf1000thInchSize.Height();
}
@@ -203,11 +203,11 @@ bool SwNoTextNode::GetContourAPI( tools::PolyPolygon &rContour ) const
if( bContourMapModeValid )
{
const MapMode aGrfMap( GetGraphic().GetPrefMapMode() );
- const MapMode aContourMap( MAP_100TH_MM );
- OSL_ENSURE( aGrfMap.GetMapUnit() != MAP_PIXEL ||
- aGrfMap == MapMode( MAP_PIXEL ),
+ const MapMode aContourMap( MapUnit::Map100thMM );
+ OSL_ENSURE( aGrfMap.GetMapUnit() != MapUnit::MapPixel ||
+ aGrfMap == MapMode( MapUnit::MapPixel ),
"scale factor for pixel unsupported" );
- if( aGrfMap.GetMapUnit() != MAP_PIXEL &&
+ if( aGrfMap.GetMapUnit() != MapUnit::MapPixel &&
aGrfMap != aContourMap )
{
sal_uInt16 nPolyCount = rContour.Count();
@@ -234,7 +234,7 @@ bool SwNoTextNode::IsPixelContour() const
if( bContourMapModeValid )
{
const MapMode aGrfMap( GetGraphic().GetPrefMapMode() );
- bRet = aGrfMap.GetMapUnit() == MAP_PIXEL;
+ bRet = aGrfMap.GetMapUnit() == MapUnit::MapPixel;
}
else
{
diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx
index abebce508486..181319111863 100644
--- a/sw/source/core/draw/dflyobj.cxx
+++ b/sw/source/core/draw/dflyobj.cxx
@@ -751,9 +751,9 @@ void SwVirtFlyDrawObj::NbcCrop(const Point& rRef, const Fraction& xFact, const F
GraphicObject const *pGraphicObject = pSh->GetGraphicObj();
if (!pGraphicObject)
return;
- const MapMode aMapMode100thmm(MAP_100TH_MM);
+ const MapMode aMapMode100thmm(MapUnit::Map100thMM);
Size aGraphicSize(pGraphicObject->GetPrefSize());
- if( MAP_PIXEL == pGraphicObject->GetPrefMapMode().GetMapUnit() )
+ if( MapUnit::MapPixel == pGraphicObject->GetPrefMapMode().GetMapUnit() )
aGraphicSize = Application::GetDefaultDevice()->PixelToLogic( aGraphicSize, aMapMode100thmm );
else
aGraphicSize = OutputDevice::LogicToLogic( aGraphicSize, pGraphicObject->GetPrefMapMode(), aMapMode100thmm);
diff --git a/sw/source/core/draw/dpage.cxx b/sw/source/core/draw/dpage.cxx
index c8773e8c7192..a144ea8d8eb7 100644
--- a/sw/source/core/draw/dpage.cxx
+++ b/sw/source/core/draw/dpage.cxx
@@ -216,7 +216,7 @@ bool SwDPage::RequestHelp( vcl::Window* pWindow, SdrView* pView,
// without MapMode-Offset !!!!!
// without MapMode-Offset, without Offset, w ... !!!!!
aPt = pWindow->LogicToPixel(
- aPt, MapMode( MAP_TWIP ) );
+ aPt, MapMode( MapUnit::MapTwip ) );
sText += "?" + OUString::number( aPt.getX() )
+ "," + OUString::number( aPt.getY() );
}
diff --git a/sw/source/core/draw/drawdoc.cxx b/sw/source/core/draw/drawdoc.cxx
index abe22af36f10..3624b67e9cd2 100644
--- a/sw/source/core/draw/drawdoc.cxx
+++ b/sw/source/core/draw/drawdoc.cxx
@@ -57,7 +57,7 @@ SwDrawModel::SwDrawModel(SwDoc *const pDoc)
pDoc->GetDocShell(), true )
, m_pDoc( pDoc )
{
- SetScaleUnit( MAP_TWIP );
+ SetScaleUnit( MapUnit::MapTwip );
SetSwapGraphics();
// use common InitDrawModelAndDocShell which will set the associations as needed,
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index acb4df590ec3..330c677e97d1 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -1252,7 +1252,7 @@ bool SwFEShell::GetDrawObjGraphic( SotClipboardFormatId nFormat, Graphic& rGrf )
const Size aSz( GetSelectedFlyFrame()->Prt().SSize() );
ScopedVclPtrInstance< VirtualDevice > pVirtDev(*GetWin());
- MapMode aTmp( MAP_TWIP );
+ MapMode aTmp( MapUnit::MapTwip );
pVirtDev->SetMapMode( aTmp );
if( pVirtDev->SetOutputSize( aSz ) )
{
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index 5c1179ac10ef..ae5646b12414 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -1506,7 +1506,7 @@ const SwFrameFormat* SwFEShell::IsURLGrfAtPos( const Point& rPt, OUString* pURL,
aPt -= pFly->Frame().Pos();
// without MapMode-Offset, without Offset, o ... !!!!!
aPt = GetOut()->LogicToPixel(
- aPt, MapMode( MAP_TWIP ) );
+ aPt, MapMode( MapUnit::MapTwip ) );
((( *pURL += "?" ) += OUString::number( aPt.getX() ))
+= "," ) += OUString::number(aPt.getY() );
}
@@ -2031,8 +2031,8 @@ void SwFEShell::AlignFormulaToBaseline( const uno::Reference < embed::XEmbeddedO
}
sal_Int32 nBaseline = ::comphelper::getINT32(aBaseline);
- const MapMode aSourceMapMode( MAP_100TH_MM );
- const MapMode aTargetMapMode( MAP_TWIP );
+ const MapMode aSourceMapMode( MapUnit::Map100thMM );
+ const MapMode aTargetMapMode( MapUnit::MapTwip );
nBaseline = OutputDevice::LogicToLogic( nBaseline, aSourceMapMode.GetMapUnit(), aTargetMapMode.GetMapUnit() );
OSL_ENSURE( nBaseline > 0, "Wrong value of Baseline while retrieving from Starmath!" );
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index c3d8cc09ad5f..6a58900fee1a 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -1277,7 +1277,7 @@ void SwFormatSurround::dumpAsXml(xmlTextWriterPtr pWriter) const
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(OString::number(GetValue()).getStr()));
OUString aPresentation;
- GetPresentation(SfxItemPresentation::Nameless, MAP_100TH_MM, MAP_100TH_MM, aPresentation);
+ GetPresentation(SfxItemPresentation::Nameless, MapUnit::Map100thMM, MapUnit::Map100thMM, aPresentation);
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("presentation"), BAD_CAST(aPresentation.toUtf8().getStr()));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("bAnchorOnly"), BAD_CAST(OString::boolean(bAnchorOnly).getStr()));
@@ -1730,7 +1730,7 @@ void SwFormatAnchor::dumpAsXml(xmlTextWriterPtr pWriter) const
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nOrder"), BAD_CAST(OString::number(mnOrder).getStr()));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nOrderCounter"), BAD_CAST(OString::number(mnOrderCounter).getStr()));
OUString aPresentation;
- GetPresentation(SfxItemPresentation::Nameless, MAP_100TH_MM, MAP_100TH_MM, aPresentation);
+ GetPresentation(SfxItemPresentation::Nameless, MapUnit::Map100thMM, MapUnit::Map100thMM, aPresentation);
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("presentation"), BAD_CAST(aPresentation.toUtf8().getStr()));
xmlTextWriterEndElement(pWriter);
@@ -3440,8 +3440,8 @@ IMapObject* SwFrameFormat::GetIMapObject( const Point& rPoint,
{
Point aPos( rPoint );
Size aActSz ( pRef == pFly ? pFly->Frame().SSize() : pRef->Prt().SSize() );
- const MapMode aSrc ( MAP_TWIP );
- const MapMode aDest( MAP_100TH_MM );
+ const MapMode aSrc ( MapUnit::MapTwip );
+ const MapMode aDest( MapUnit::Map100thMM );
aOrigSz = OutputDevice::LogicToLogic( aOrigSz, aSrc, aDest );
aActSz = OutputDevice::LogicToLogic( aActSz, aSrc, aDest );
aPos -= pRef->Frame().Pos();
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index 8f256462e05a..2e7649782a12 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -2491,15 +2491,15 @@ bool SwFlyFrame::GetContour( tools::PolyPolygon& rContour,
static_cast<const SwNoTextFrame*>(Lower())->GetGrfArea( aClip, &aOrig );
// OD 16.04.2003 #i13147# - copy method code <SvxContourDlg::ScaleContour(..)>
// in order to avoid that graphic has to be loaded for contour scale.
- //SvxContourDlg::ScaleContour( rContour, aGrf, MAP_TWIP, aOrig.SSize() );
+ //SvxContourDlg::ScaleContour( rContour, aGrf, MapUnit::MapTwip, aOrig.SSize() );
{
OutputDevice* pOutDev = Application::GetDefaultDevice();
- const MapMode aDispMap( MAP_TWIP );
+ const MapMode aDispMap( MapUnit::MapTwip );
const MapMode aGrfMap( pGrfObj->GetPrefMapMode() );
const Size aGrfSize( pGrfObj->GetPrefSize() );
Size aOrgSize;
Point aNewPoint;
- bool bPixelMap = aGrfMap.GetMapUnit() == MAP_PIXEL;
+ bool bPixelMap = aGrfMap.GetMapUnit() == MapUnit::MapPixel;
if ( bPixelMap )
aOrgSize = pOutDev->PixelToLogic( aGrfSize, aDispMap );
diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx
index 5f7d71756566..7cb6448853c6 100644
--- a/sw/source/core/ole/ndole.cxx
+++ b/sw/source/core/ole/ndole.cxx
@@ -419,7 +419,7 @@ SwOLENode * SwNodes::MakeOLENode( const SwNodeIndex & rWhere,
Size SwOLENode::GetTwipSize() const
{
- MapMode aMapMode( MAP_TWIP );
+ MapMode aMapMode( MapUnit::MapTwip );
return const_cast<SwOLENode*>(this)->aOLEObj.GetObject().GetSize( &aMapMode );
}
@@ -909,8 +909,8 @@ const uno::Reference < embed::XEmbeddedObject > SwOLEObj::GetOleRef()
if ( pFrame )
{
Size aSz( pFrame->Frame().SSize() );
- const MapMode aSrc ( MAP_TWIP );
- const MapMode aDest( MAP_100TH_MM );
+ const MapMode aSrc ( MapUnit::MapTwip );
+ const MapMode aDest( MapUnit::Map100thMM );
aSz = OutputDevice::LogicToLogic( aSz, aSrc, aDest );
aArea.SetSize( aSz );
}
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index 51e9649552cd..c091114a7e33 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -1547,7 +1547,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
mrOut.Push( PushFlags::MAPMODE );
MapMode aMapMode( mrOut.GetMapMode() );
- aMapMode.SetMapUnit( MAP_TWIP );
+ aMapMode.SetMapUnit( MapUnit::MapTwip );
mrOut.SetMapMode( aMapMode );
// Create new cursor and lock the view:
diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx
index 7208f40b9766..ad9b0507723b 100644
--- a/sw/source/core/text/itratr.cxx
+++ b/sw/source/core/text/itratr.cxx
@@ -565,7 +565,7 @@ void SwTextNode::GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rM
pOut = Application::GetDefaultDevice();
MapMode aOldMap( pOut->GetMapMode() );
- pOut->SetMapMode( MapMode( MAP_TWIP ) );
+ pOut->SetMapMode( MapMode( MapUnit::MapTwip ) );
rMin = 0;
rMax = 0;
@@ -804,7 +804,7 @@ sal_uInt16 SwTextNode::GetScalingOfSelectedText( sal_Int32 nStt, sal_Int32 nEnd
OSL_ENSURE( pOut, "GetScalingOfSelectedText without outdev" );
MapMode aOldMap( pOut->GetMapMode() );
- pOut->SetMapMode( MapMode( MAP_TWIP ) );
+ pOut->SetMapMode( MapMode( MapUnit::MapTwip ) );
if ( nStt == nEnd )
{
diff --git a/sw/source/core/text/noteurl.cxx b/sw/source/core/text/noteurl.cxx
index aa30769ee351..1de13e292764 100644
--- a/sw/source/core/text/noteurl.cxx
+++ b/sw/source/core/text/noteurl.cxx
@@ -45,7 +45,7 @@ void SwNoteURL::FillImageMap( ImageMap *pMap, const Point &rPos,
const size_t nCount = m_List.size();
if( nCount )
{
- MapMode aMap( MAP_100TH_MM );
+ MapMode aMap( MapUnit::Map100thMM );
for( size_t i = 0; i < nCount; ++i )
{
const SwURLNote &rNote = m_List[i];
diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx
index 1c853534fe1a..c881df08f7c9 100644
--- a/sw/source/core/text/porrst.cxx
+++ b/sw/source/core/text/porrst.cxx
@@ -395,7 +395,7 @@ bool SwTextFrame::FillRegister( SwTwips& rRegStart, sal_uInt16& rRegDiff )
pOut = Application::GetDefaultDevice();
MapMode aOldMap( pOut->GetMapMode() );
- pOut->SetMapMode( MapMode( MAP_TWIP ) );
+ pOut->SetMapMode( MapMode( MapUnit::MapTwip ) );
aFnt.ChgFnt( pSh, *pOut );
rRegDiff = aFnt.GetHeight( pSh, *pOut );
diff --git a/sw/source/core/text/txtdrop.cxx b/sw/source/core/text/txtdrop.cxx
index 5be3db8579de..f831297ec784 100644
--- a/sw/source/core/text/txtdrop.cxx
+++ b/sw/source/core/text/txtdrop.cxx
@@ -741,7 +741,7 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTextFormatInfo &rInf
bool bWinUsed = false;
vcl::Font aOldFnt;
- MapMode aOldMap( MAP_TWIP );
+ MapMode aOldMap( MapUnit::MapTwip );
OutputDevice* pOut = rInf.GetOut();
OutputDevice* pWin;
if( rInf.GetVsh() && rInf.GetVsh()->GetWin() )
@@ -790,7 +790,7 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTextFormatInfo &rInf
{
bWinUsed = true;
aOldMap = pWin->GetMapMode( );
- pWin->SetMapMode( MapMode( MAP_TWIP ) );
+ pWin->SetMapMode( MapMode( MapUnit::MapTwip ) );
aOldFnt = pWin->GetFont();
}
pWin->SetFont( rFnt.GetActualFont() );
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index a50b85d4285c..87c27640280a 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -510,7 +510,7 @@ void SwFntObj::GuessLeading( const SwViewShell&
GetpApp()->GetDefaultDevice();
if ( pWin )
{
- MapMode aTmpMap( MAP_TWIP );
+ MapMode aTmpMap( MapUnit::MapTwip );
MapMode aOldMap = pWin->GetMapMode( );
pWin->SetMapMode( aTmpMap );
const vcl::Font aOldFnt( pWin->GetFont() );
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index a0b08b5349d4..dda5d70eeef7 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -1442,7 +1442,7 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const ::uno::Any&
const SfxItemPool& rPool = pDoc->GetAttrPool();
const MapUnit eMapUnit(rPool.GetMetric(pEntry->nWID));
- if(eMapUnit != MAP_100TH_MM)
+ if(eMapUnit != MapUnit::Map100thMM)
{
SvxUnoConvertFromMM(eMapUnit, aValue);
}
@@ -2248,7 +2248,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
const SwRect &rRect = pTmpFrame->Frame();
Size aMM100Size = OutputDevice::LogicToLogic(
Size( rRect.Width(), rRect.Height() ),
- MapMode( MAP_TWIP ), MapMode( MAP_100TH_MM ));
+ MapMode( MapUnit::MapTwip ), MapMode( MapUnit::Map100thMM ));
aAny <<= awt::Size( aMM100Size.Width(), aMM100Size.Height() );
}
}
@@ -2347,7 +2347,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
const SfxItemPool& rPool = pDoc->GetAttrPool();
const MapUnit eMapUnit(rPool.GetMetric(pEntry->nWID));
- if(eMapUnit != MAP_100TH_MM)
+ if(eMapUnit != MapUnit::Map100thMM)
{
SvxUnoConvertToMM(eMapUnit, aAny);
}
@@ -2966,9 +2966,9 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
{
aSz.Width() = aSz.Height() = 5000;
aSz = OutputDevice::LogicToLogic
- ( aSz, MapMode( MAP_100TH_MM ), aRefMap );
+ ( aSz, MapMode( MapUnit::Map100thMM ), aRefMap );
}
- MapMode aMyMap( MAP_TWIP );
+ MapMode aMyMap( MapUnit::MapTwip );
aSz = OutputDevice::LogicToLogic( aSz, aRefMap, aMyMap );
SwFormatFrameSize aFrameSz;
aFrameSz.SetSize(aSz);
diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx
index 5715ac07e2bb..4ac356ece5b5 100644
--- a/sw/source/core/unocore/unoparagraph.cxx
+++ b/sw/source/core/unocore/unoparagraph.cxx
@@ -530,7 +530,7 @@ throw(uno::RuntimeException)
{
const MapUnit eMapUnit(rSet.GetPool()->GetMetric(rEntry.nWID));
- if(eMapUnit != MAP_100TH_MM)
+ if(eMapUnit != MapUnit::Map100thMM)
{
SvxUnoConvertToMM(eMapUnit, rAny);
}
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index d76722df4abb..b8c92c32cf4c 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -1571,7 +1571,7 @@ sal_uInt8 lcl_TranslateMetric(const SfxItemPropertySimpleEntry& rEntry, SwDoc* p
const SfxItemPool& rPool = pDoc->GetAttrPool();
const MapUnit eMapUnit(rPool.GetMetric(rEntry.nWID));
- if(eMapUnit != MAP_100TH_MM)
+ if(eMapUnit != MapUnit::Map100thMM)
SvxUnoConvertFromMM(eMapUnit, o_aValue);
return rEntry.nMemberId & (~SFX_METRIC_ITEM);
}
@@ -2304,7 +2304,7 @@ uno::Any SwXStyle::GetStyleProperty<HINT_BEGIN>(const SfxItemPropertySimpleEntry
// since this means they are intended as percent values
if(XATTR_FILLBMP_SIZEX == rEntry.nWID || XATTR_FILLBMP_SIZEY == rEntry.nWID)
bAllowedConvert = !aResult.has<sal_Int32>() || aResult.get<sal_Int32>() > 0;
- if(eMapUnit != MAP_100TH_MM && bAllowedConvert)
+ if(eMapUnit != MapUnit::Map100thMM && bAllowedConvert)
SvxUnoConvertToMM(eMapUnit, aResult);
}
return aResult;
@@ -3603,7 +3603,7 @@ uno::Reference< style::XAutoStyle > SwXAutoStyleFamily::insertStyle(
const SfxItemPool& rPool = m_pDocShell->GetDoc()->GetAttrPool();
const MapUnit eMapUnit(rPool.GetMetric(pEntry->nWID));
- if(eMapUnit != MAP_100TH_MM)
+ if(eMapUnit != MapUnit::Map100thMM)
{
SvxUnoConvertFromMM(eMapUnit, aValue);
}
@@ -4087,7 +4087,7 @@ uno::Sequence< uno::Any > SwXAutoStyle::GetPropertyValues_Impl(
const SfxItemPool& rPool = mrDoc.GetAttrPool();
const MapUnit eMapUnit(rPool.GetMetric(pEntry->nWID));
- if(eMapUnit != MAP_100TH_MM)
+ if(eMapUnit != MapUnit::Map100thMM)
{
SvxUnoConvertToMM(eMapUnit, aTarget);
}
diff --git a/sw/source/core/view/pagepreviewlayout.cxx b/sw/source/core/view/pagepreviewlayout.cxx
index 4b9b49be5611..ddeebc4efb73 100644
--- a/sw/source/core/view/pagepreviewlayout.cxx
+++ b/sw/source/core/view/pagepreviewlayout.cxx
@@ -208,7 +208,7 @@ bool SwPagePreviewLayout::Init( const sal_uInt16 _nCols,
mbLayoutInfoValid = true;
// calculate scaling
- MapMode aMapMode( MAP_TWIP );
+ MapMode aMapMode( MapUnit::MapTwip );
Size aWinSize = mrParentViewShell.GetOut()->PixelToLogic( _rPxWinSize, aMapMode );
Fraction aXScale( aWinSize.Width(), mnPreviewLayoutWidth );
Fraction aYScale( aWinSize.Height(), mnPreviewLayoutHeight );
diff --git a/sw/source/core/view/viewpg.cxx b/sw/source/core/view/viewpg.cxx
index c88203f7b139..e0d11151b90d 100644
--- a/sw/source/core/view/viewpg.cxx
+++ b/sw/source/core/view/viewpg.cxx
@@ -102,7 +102,7 @@ void SwViewShell::PrintProspect(
//!! applying view options and formatting the document should now only be done in getRendererCount!
- MapMode aMapMode( MAP_TWIP );
+ MapMode aMapMode( MapUnit::MapTwip );
Size aPrtSize( pPrinter->PixelToLogic( pPrinter->GetPaperSizePixel(), aMapMode ) );
SwTwips nMaxRowSz, nMaxColSz;
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 3f62822018b0..1849c4caaeab 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1850,7 +1850,7 @@ void SwViewShell::PaintTile(VirtualDevice &rDevice, int contextWidth, int contex
// setup the output device to draw the tile
MapMode aMapMode(rDevice.GetMapMode());
- aMapMode.SetMapUnit(MAP_TWIP);
+ aMapMode.SetMapUnit(MapUnit::MapTwip);
aMapMode.SetOrigin(Point(-tilePosX, -tilePosY));
// Scaling. Must convert from pixels to twips. We know
diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx
index 354328a401cf..885463791f1f 100644
--- a/sw/source/core/view/vprint.cxx
+++ b/sw/source/core/view/vprint.cxx
@@ -205,7 +205,7 @@ void SwViewShell::InitPrt( OutputDevice *pOutDev )
maPrtOffst += pOutDev->GetMapMode().GetOrigin();
MapMode aMapMode( pOutDev->GetMapMode() );
- aMapMode.SetMapUnit( MAP_TWIP );
+ aMapMode.SetMapUnit( MapUnit::MapTwip );
pOutDev->SetMapMode( aMapMode );
pOutDev->SetLineColor();
pOutDev->SetFillColor();
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index 609b344a90a8..47c8c7f98baf 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -3400,7 +3400,7 @@ static void OutCSS1_SvxBorderLine( SwHTMLWriter& rHTMLWrt,
OStringBuffer sOut;
if( Application::GetDefaultDevice() &&
nWidth <= Application::GetDefaultDevice()->PixelToLogic(
- Size( 1, 1 ), MapMode( MAP_TWIP) ).Width() )
+ Size( 1, 1 ), MapMode( MapUnit::MapTwip) ).Width() )
{
// If the width is smaller than one pixel, then export as 1px
// so that Netscape and IE show the line.
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index 2d05d4b8e347..a2f846365e5e 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -2609,7 +2609,7 @@ sal_uInt32 SwHTMLWriter::ToPixel( sal_uInt32 nVal, const bool bVert )
if( Application::GetDefaultDevice() && nVal )
{
Size aSz( bVert ? 0 : nVal, bVert ? nVal : 0 );
- aSz = Application::GetDefaultDevice()->LogicToPixel(aSz, MapMode( MAP_TWIP ));
+ aSz = Application::GetDefaultDevice()->LogicToPixel(aSz, MapMode( MapUnit::MapTwip ));
nVal = bVert ? aSz.Height() : aSz.Width();
if( !nVal ) // if there is a Twip, there should be a pixel as well
nVal = 1;
diff --git a/sw/source/filter/html/htmldrawreader.cxx b/sw/source/filter/html/htmldrawreader.cxx
index aadcb2f17500..db0fae6876d2 100644
--- a/sw/source/filter/html/htmldrawreader.cxx
+++ b/sw/source/filter/html/htmldrawreader.cxx
@@ -93,7 +93,7 @@ void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj,
Size aTwipSpc( rPixSpace.Width(), rPixSpace.Height() );
aTwipSpc =
Application::GetDefaultDevice()->PixelToLogic( aTwipSpc,
- MapMode(MAP_TWIP) );
+ MapMode(MapUnit::MapTwip) );
nLeftSpace = nRightSpace = (sal_uInt16)aTwipSpc.Width();
nUpperSpace = nLowerSpace = (sal_uInt16)aTwipSpc.Height();
}
@@ -465,7 +465,7 @@ void SwHTMLParser::NewMarquee( HTMLTable *pCurTable )
if( (aTwipSz.Width() || aTwipSz.Height()) && Application::GetDefaultDevice() )
{
aTwipSz = Application::GetDefaultDevice()
- ->PixelToLogic( aTwipSz, MapMode( MAP_TWIP ) );
+ ->PixelToLogic( aTwipSz, MapMode( MapUnit::MapTwip ) );
}
if( SVX_CSS1_LTYPE_TWIP== aPropInfo.eWidthType )
diff --git a/sw/source/filter/html/htmldrawwriter.cxx b/sw/source/filter/html/htmldrawwriter.cxx
index a134f085c64a..2debe01231ba 100644
--- a/sw/source/filter/html/htmldrawwriter.cxx
+++ b/sw/source/filter/html/htmldrawwriter.cxx
@@ -219,7 +219,7 @@ Writer& OutHTML_DrawFrameFormatAsMarquee( Writer& rWrt,
{
nAmount = Application::GetDefaultDevice()
->LogicToPixel( Size(nAmount,0),
- MapMode(MAP_TWIP) ).Width();
+ MapMode(MapUnit::MapTwip) ).Width();
}
if( nAmount )
{
@@ -247,7 +247,7 @@ Writer& OutHTML_DrawFrameFormatAsMarquee( Writer& rWrt,
{
Size aPixelSz =
Application::GetDefaultDevice()->LogicToPixel( aTwipSz,
- MapMode(MAP_TWIP) );
+ MapMode(MapUnit::MapTwip) );
if( !aPixelSz.Width() && aTwipSz.Width() )
aPixelSz.Width() = 1;
if( !aPixelSz.Height() && aTwipSz.Height() )
diff --git a/sw/source/filter/html/htmlflywriter.cxx b/sw/source/filter/html/htmlflywriter.cxx
index b82949226793..ebfcadbad895 100644
--- a/sw/source/filter/html/htmlflywriter.cxx
+++ b/sw/source/filter/html/htmlflywriter.cxx
@@ -626,7 +626,7 @@ OString SwHTMLWriter::OutFrameFormatOptions( const SwFrameFormat &rFrameFormat,
{
Size aPixelSpc =
Application::GetDefaultDevice()->LogicToPixel( aTwipSpc,
- MapMode(MAP_TWIP) );
+ MapMode(MapUnit::MapTwip) );
if( !aPixelSpc.Width() && aTwipSpc.Width() )
aPixelSpc.Width() = 1;
if( !aPixelSpc.Height() && aTwipSpc.Height() )
@@ -699,7 +699,7 @@ OString SwHTMLWriter::OutFrameFormatOptions( const SwFrameFormat &rFrameFormat,
{
aPixelSz =
Application::GetDefaultDevice()->LogicToPixel( aTwipSz,
- MapMode(MAP_TWIP) );
+ MapMode(MapUnit::MapTwip) );
if( !aPixelSz.Width() && aTwipSz.Width() )
aPixelSz.Width() = 1;
if( !aPixelSz.Height() && aTwipSz.Height() )
@@ -893,7 +893,7 @@ void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrameForma
{
Size aPixelSpc =
Application::GetDefaultDevice()->LogicToPixel( aTwipSpc,
- MapMode(MAP_TWIP) );
+ MapMode(MapUnit::MapTwip) );
if( !aPixelSpc.Width() && aTwipSpc.Width() )
aPixelSpc.Width() = 1;
if( !aPixelSpc.Height() && aTwipSpc.Height() )
@@ -964,7 +964,7 @@ void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrameForma
{
aPixelSz =
Application::GetDefaultDevice()->LogicToPixel( aTwipSz,
- MapMode(MAP_TWIP) );
+ MapMode(MapUnit::MapTwip) );
if( !aPixelSz.Width() && aTwipSz.Width() )
aPixelSz.Width() = 1;
if( !aPixelSz.Height() && aTwipSz.Height() )
@@ -1336,7 +1336,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrameFormat &rFrameFormat,
{
Size aPixelBorder =
Application::GetDefaultDevice()->LogicToPixel( aTwipBorder,
- MapMode(MAP_TWIP) );
+ MapMode(MapUnit::MapTwip) );
if( !aPixelBorder.Width() && aTwipBorder.Width() )
aPixelBorder.Width() = 1;
if( !aPixelBorder.Height() && aTwipBorder.Height() )
@@ -1575,7 +1575,7 @@ static Writer & OutHTML_FrameFormatAsMulticol( Writer& rWrt,
{
nGutter = (sal_uInt16)Application::GetDefaultDevice()
->LogicToPixel( Size(nGutter,0),
- MapMode(MAP_TWIP) ).Width();
+ MapMode(MapUnit::MapTwip) ).Width();
}
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_gutter).
append("=\"").append(static_cast<sal_Int32>(nGutter)).append("\"");
@@ -1795,7 +1795,7 @@ static Writer& OutHTML_FrameFormatGrfNode( Writer& rWrt, const SwFrameFormat& rF
Size aMM100Size;
const SwFormatFrameSize& rSize = rFrameFormat.GetFrameSize();
aMM100Size = OutputDevice::LogicToLogic( rSize.GetSize(),
- MapMode( MAP_TWIP ), MapMode( MAP_100TH_MM ));
+ MapMode( MapUnit::MapTwip ), MapMode( MapUnit::Map100thMM ));
sal_uInt16 nErr = XOutBitmap::WriteGraphic( pGrfNd->GetGrf(), aGraphicURL,
"JPG", nFlags, &aMM100Size );
@@ -1880,7 +1880,7 @@ Writer& OutHTML_HeaderFooter( Writer& rWrt, const SwFrameFormat& rFrameFormat,
{
nSize -= HTML_PARSPACE;
nSize = (sal_Int16)Application::GetDefaultDevice()
- ->LogicToPixel( Size(nSize,0), MapMode(MAP_TWIP) ).Width();
+ ->LogicToPixel( Size(nSize,0), MapMode(MapUnit::MapTwip) ).Width();
aSpacer = OStringBuffer(OOO_STRING_SVTOOLS_HTML_spacer).
append(' ').append(OOO_STRING_SVTOOLS_HTML_O_type).
diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index 6ef302379f81..9d233891db18 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -471,7 +471,7 @@ void SwHTMLImageWatcher::init( sal_Int32 Width, sal_Int32 Height )
{
Size aTmp(aNewSz.Width, aNewSz.Height);
aTmp = Application::GetDefaultDevice()
- ->PixelToLogic( aTmp, MapMode( MAP_100TH_MM ) );
+ ->PixelToLogic( aTmp, MapMode( MapUnit::Map100thMM ) );
aNewSz.Width = aTmp.Width();
aNewSz.Height = aTmp.Height();
}
@@ -734,7 +734,7 @@ void SwHTMLParser::SetControlSize( const uno::Reference< drawing::XShape >& rSha
{
Size aTmpSz( aNewSz.Width, aNewSz.Height );
aTmpSz = Application::GetDefaultDevice()
- ->PixelToLogic( aTmpSz, MapMode( MAP_100TH_MM ) );
+ ->PixelToLogic( aTmpSz, MapMode( MapUnit::Map100thMM ) );
aNewSz.Width = aTmpSz.Width();
aNewSz.Height = aTmpSz.Height();
}
@@ -1694,7 +1694,7 @@ void SwHTMLParser::InsertInput()
if( (aSz.Width() || aSz.Height()) && Application::GetDefaultDevice() )
{
aSz = Application::GetDefaultDevice()
- ->PixelToLogic( aSz, MapMode( MAP_100TH_MM ) );
+ ->PixelToLogic( aSz, MapMode( MapUnit::Map100thMM ) );
}
aTmp <<= FormButtonType_SUBMIT;
xPropSet->setPropertyValue("ButtonType", aTmp );
@@ -1782,7 +1782,7 @@ void SwHTMLParser::InsertInput()
{
Size aNewSz( nSize, 0 );
aNewSz = Application::GetDefaultDevice()
- ->PixelToLogic( aNewSz, MapMode( MAP_100TH_MM ) );
+ ->PixelToLogic( aNewSz, MapMode( MapUnit::Map100thMM ) );
aSz.Width() = aNewSz.Width();
OSL_ENSURE( !aTextSz.Width(), "Text-Breite ist gegeben" );
bMinWidth = false;
diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx
index d50fe551a8cf..6250b987b451 100644
--- a/sw/source/filter/html/htmlforw.cxx
+++ b/sw/source/filter/html/htmlforw.cxx
@@ -992,7 +992,7 @@ Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt,
{
aPixelSz =
Application::GetDefaultDevice()->LogicToPixel( aTwipSz,
- MapMode(MAP_TWIP) );
+ MapMode(MapUnit::MapTwip) );
if( !aPixelSz.Width() && aTwipSz.Width() )
aPixelSz.Width() = 1;
if( !aPixelSz.Height() && aTwipSz.Height() )
diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx
index 401415ad1fd2..44e68132bc16 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -553,7 +553,7 @@ IMAGE_SETEVENT:
if( (aTwipSz.Width() || aTwipSz.Height()) && Application::GetDefaultDevice() )
{
aTwipSz = Application::GetDefaultDevice()
- ->PixelToLogic( aTwipSz, MapMode( MAP_TWIP ) );
+ ->PixelToLogic( aTwipSz, MapMode( MapUnit::MapTwip ) );
}
// CSS1-Groesse auf "normale" Groesse umrechnen
diff --git a/sw/source/filter/html/htmlnumreader.cxx b/sw/source/filter/html/htmlnumreader.cxx
index 5d0988613579..bdbef48e5043 100644
--- a/sw/source/filter/html/htmlnumreader.cxx
+++ b/sw/source/filter/html/htmlnumreader.cxx
@@ -232,7 +232,7 @@ void SwHTMLParser::NewNumBulList( int nToken )
{
aTwipSz =
Application::GetDefaultDevice()->PixelToLogic( aTwipSz,
- MapMode(MAP_TWIP) );
+ MapMode(MapUnit::MapTwip) );
pTwipSz = &aTwipSz;
}
diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx
index d00f20c457af..fc5ba47e2d2b 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -138,7 +138,7 @@ void SwHTMLParser::SetFixSize( const Size& rPixSize,
{
aTwipSz =
Application::GetDefaultDevice()->PixelToLogic( aTwipSz,
- MapMode(MAP_TWIP) );
+ MapMode(MapUnit::MapTwip) );
}
// die Breite bearbeiten
@@ -214,7 +214,7 @@ void SwHTMLParser::SetSpace( const Size& rPixSpace,
Size aTwipSpc( rPixSpace.Width(), rPixSpace.Height() );
aTwipSpc =
Application::GetDefaultDevice()->PixelToLogic( aTwipSpc,
- MapMode(MAP_TWIP) );
+ MapMode(MapUnit::MapTwip) );
nLeftSpace = nRightSpace = aTwipSpc.Width();
nUpperSpace = nLowerSpace = (sal_uInt16)aTwipSpc.Height();
}
diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx
index 7b8d2c8ed2ae..767d86378e26 100644
--- a/sw/source/filter/html/htmlsect.cxx
+++ b/sw/source/filter/html/htmlsect.cxx
@@ -603,7 +603,7 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss )
{
nTwipWidth = Application::GetDefaultDevice()
->PixelToLogic( Size(nWidth, 0),
- MapMode(MAP_TWIP) ).Width();
+ MapMode(MapUnit::MapTwip) ).Width();
}
if( !nPrcWidth && nTwipWidth < MINFLY )
@@ -694,7 +694,7 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss )
{
nGutter = (sal_uInt16)Application::GetDefaultDevice()
->PixelToLogic( Size(nGutter, 0),
- MapMode(MAP_TWIP) ).Width();
+ MapMode(MapUnit::MapTwip) ).Width();
}
SwFormatCol aFormatCol;
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index 9ffcb7a0dfc3..0229c4aa6837 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -2111,7 +2111,7 @@ void HTMLTable::InsertCell( HTMLTableCnts *pCnts,
if( (aTwipSz.Width() || aTwipSz.Height()) && Application::GetDefaultDevice() )
{
aTwipSz = Application::GetDefaultDevice()
- ->PixelToLogic( aTwipSz, MapMode( MAP_TWIP ) );
+ ->PixelToLogic( aTwipSz, MapMode( MapUnit::MapTwip ) );
}
// die Breite nur in die erste Zelle setzen!
@@ -2248,7 +2248,7 @@ void HTMLTable::InsertCol( sal_uInt16 nSpan, sal_uInt16 nColWidth, bool bRelWidt
if( aTwipSz.Width() && Application::GetDefaultDevice() )
{
aTwipSz = Application::GetDefaultDevice()
- ->PixelToLogic( aTwipSz, MapMode( MAP_TWIP ) );
+ ->PixelToLogic( aTwipSz, MapMode( MapUnit::MapTwip ) );
}
for( i=nCurCol; i<nColsReq; i++ )
diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx
index 3f98d4103c5e..3becd8c66092 100644
--- a/sw/source/filter/html/htmltabw.cxx
+++ b/sw/source/filter/html/htmltabw.cxx
@@ -116,10 +116,10 @@ void SwHTMLWrtTable::Pixelize( sal_uInt16& rValue )
if( rValue && Application::GetDefaultDevice() )
{
Size aSz( rValue, 0 );
- aSz = Application::GetDefaultDevice()->LogicToPixel( aSz, MapMode(MAP_TWIP) );
+ aSz = Application::GetDefaultDevice()->LogicToPixel( aSz, MapMode(MapUnit::MapTwip) );
if( !aSz.Width() )
aSz.Width() = 1;
- aSz = Application::GetDefaultDevice()->PixelToLogic( aSz, MapMode(MAP_TWIP) );
+ aSz = Application::GetDefaultDevice()->PixelToLogic( aSz, MapMode(MapUnit::MapTwip) );
rValue = (sal_uInt16)aSz.Width();
}
}
@@ -360,7 +360,7 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt,
{
Size aOldSz( aPixelSz );
aPixelSz = Application::GetDefaultDevice()->LogicToPixel( aPixelSz,
- MapMode(MAP_TWIP) );
+ MapMode(MapUnit::MapTwip) );
if( aOldSz.Width() && !aPixelSz.Width() )
aPixelSz.Width() = 1;
if( aOldSz.Height() && !aPixelSz.Height() )
@@ -651,7 +651,7 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
else if( Application::GetDefaultDevice() )
{
sal_Int32 nPixWidth = Application::GetDefaultDevice()->LogicToPixel(
- Size(m_nTabWidth,0), MapMode(MAP_TWIP) ).Width();
+ Size(m_nTabWidth,0), MapMode(MapUnit::MapTwip) ).Width();
if( !nPixWidth )
nPixWidth = 1;
@@ -669,7 +669,7 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
{
Size aPixelSpc =
Application::GetDefaultDevice()->LogicToPixel( Size(nHSpace,nVSpace),
- MapMode(MAP_TWIP) );
+ MapMode(MapUnit::MapTwip) );
if( !aPixelSpc.Width() && nHSpace )
aPixelSpc.Width() = 1;
if( !aPixelSpc.Height() && nVSpace )
diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx
index 556b8db75c4a..26fd9cec82e8 100644
--- a/sw/source/filter/html/svxcss1.cxx
+++ b/sw/source/filter/html/svxcss1.cxx
@@ -874,7 +874,7 @@ void SvxCSS1Parser::PixelToTwip( long &rWidth, long &rHeight )
{
Size aTwipSz( rWidth, rHeight );
aTwipSz = Application::GetDefaultDevice()->PixelToLogic( aTwipSz,
- MapMode(MAP_TWIP) );
+ MapMode(MapUnit::MapTwip) );
rWidth = aTwipSz.Width();
rHeight = aTwipSz.Height();
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index adf16e459d6a..81b6417e6db4 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -4892,7 +4892,7 @@ void SwHTMLParser::InsertSpacer()
{
nSize = Application::GetDefaultDevice()
->PixelToLogic( Size(0,nSize),
- MapMode(MAP_TWIP) ).Height();
+ MapMode(MapUnit::MapTwip) ).Height();
}
// einen Absatz-Abstand setzen
@@ -4940,7 +4940,7 @@ void SwHTMLParser::InsertSpacer()
{
nSize = Application::GetDefaultDevice()
->PixelToLogic( Size(nSize,0),
- MapMode(MAP_TWIP) ).Width();
+ MapMode(MapUnit::MapTwip) ).Width();
}
if( !m_pPam->GetPoint()->nContent.GetIndex() )
@@ -4975,7 +4975,7 @@ sal_uInt16 SwHTMLParser::ToTwips( sal_uInt16 nPixel )
if( nPixel && Application::GetDefaultDevice() )
{
long nTwips = Application::GetDefaultDevice()->PixelToLogic(
- Size( nPixel, nPixel ), MapMode( MAP_TWIP ) ).Width();
+ Size( nPixel, nPixel ), MapMode( MapUnit::MapTwip ) ).Width();
return nTwips <= USHRT_MAX ? (sal_uInt16)nTwips : USHRT_MAX;
}
else
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index 741dd6fe80a7..147d17532208 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -646,7 +646,7 @@ static void lcl_html_OutSectionStartTag( SwHTMLWriter& rHTMLWrt,
if( nGutter && Application::GetDefaultDevice() )
{
nGutter = (sal_uInt16)Application::GetDefaultDevice()
- ->LogicToPixel( Size(nGutter, 0), MapMode(MAP_TWIP) ).Width();
+ ->LogicToPixel( Size(nGutter, 0), MapMode(MapUnit::MapTwip) ).Width();
}
sOut.append(" " OOO_STRING_SVTOOLS_HTML_O_gutter "=\"" + OString::number(nGutter) + "\"");
}
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
diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx
index b87a04cfbea9..abbb8f5bc6c5 100644
--- a/sw/source/filter/xml/xmlexp.cxx
+++ b/sw/source/filter/xml/xmlexp.cxx
@@ -357,7 +357,7 @@ void SwXMLExport::GetViewSettings(Sequence<PropertyValue>& aProps)
SwDoc *pDoc = getDoc();
const Rectangle rRect =
pDoc->GetDocShell()->GetVisArea( ASPECT_CONTENT );
- bool bTwip = pDoc->GetDocShell()->GetMapUnit ( ) == MAP_TWIP;
+ bool bTwip = pDoc->GetDocShell()->GetMapUnit ( ) == MapUnit::MapTwip;
OSL_ENSURE( bTwip, "Map unit for visible area is not in TWIPS!" );
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index 341154e71b82..4ee54299d8a2 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -1021,8 +1021,8 @@ void SwXMLImport::SetViewSettings(const Sequence < PropertyValue > & aViewProps)
bool bChangeShowRedline = false, bChangeBrowseMode = false;
//TODO/LATER: why that cast?!
- bool bTwip = pDoc->GetDocShell()->GetMapUnit ( ) == MAP_TWIP;
- //sal_Bool bTwip = pDoc->GetDocShell()->SfxInPlaceObject::GetMapUnit ( ) == MAP_TWIP;
+ bool bTwip = pDoc->GetDocShell()->GetMapUnit ( ) == MapUnit::MapTwip;
+ //sal_Bool bTwip = pDoc->GetDocShell()->SfxInPlaceObject::GetMapUnit ( ) == MapUnit::MapTwip;
for (sal_Int32 i = 0; i < nCount ; i++)
{
diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx
index f652a32b176d..651ba668ac59 100644
--- a/sw/source/filter/xml/xmltexte.cxx
+++ b/sw/source/filter/xml/xmltexte.cxx
@@ -132,7 +132,7 @@ static void lcl_addOutplaceProperties(
const rtl::Reference < XMLPropertySetMapper >& rMapper )
{
{
- MapMode aMode( MAP_100TH_MM ); // the API expects this map mode for the embedded objects
+ MapMode aMode( MapUnit::Map100thMM ); // the API expects this map mode for the embedded objects
Size aSize = rObj.GetSize( &aMode ); // get the size in the requested map mode
if( aSize.Width() && aSize.Height() )
diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx
index b83ef45d8da7..784909fdbfdd 100644
--- a/sw/source/filter/xml/xmltexti.cxx
+++ b/sw/source/filter/xml/xmltexti.cxx
@@ -286,7 +286,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject(
if ( xObj.is() )
{
//TODO/LATER: is it enough to only set the VisAreaSize?
- lcl_setObjectVisualArea( xObj, nAspect, aTwipSize, MAP_TWIP );
+ lcl_setObjectVisualArea( xObj, nAspect, aTwipSize, MapUnit::MapTwip );
}
if( pTextCursor )
@@ -527,7 +527,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject(
pDoc->GetPersist()->GetEmbeddedObjectContainer().GetEmbeddedObject( aObjName );
if( xObj.is() )
lcl_setObjectVisualArea( xObj, ( nDrawAspect ? nDrawAspect : embed::Aspects::MSOLE_CONTENT ),
- aVisArea.GetSize(), MAP_100TH_MM );
+ aVisArea.GetSize(), MapUnit::Map100thMM );
}
return xPropSet;
@@ -656,7 +656,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertApplet(
lcl_setObjectVisualArea( aAppletImpl.GetApplet(),
embed::Aspects::MSOLE_CONTENT,
Size( nWidth, nHeight ),
- MAP_100TH_MM );
+ MapUnit::Map100thMM );
SwFrameFormat *pFrameFormat = pDoc->getIDocumentContentOperations().Insert( *pTextCursor->GetPaM(),
::svt::EmbeddedObjectRef( aAppletImpl.GetApplet(), embed::Aspects::MSOLE_CONTENT ),
@@ -718,7 +718,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertPlugin(
lcl_setObjectVisualArea( xObj,
embed::Aspects::MSOLE_CONTENT,
Size( nWidth, nHeight ),
- MAP_100TH_MM );
+ MapUnit::Map100thMM );
if ( svt::EmbeddedObjectRef::TryRunningState( xObj ) )
{
@@ -851,7 +851,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertFloatingFra
lcl_setObjectVisualArea( xObj,
embed::Aspects::MSOLE_CONTENT,
Size( nWidth, nHeight ),
- MAP_100TH_MM );
+ MapUnit::Map100thMM );
if ( svt::EmbeddedObjectRef::TryRunningState( xObj ) )
{
diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx
index 77ba0cd65bdb..c7a0ac320d5c 100644
--- a/sw/source/ui/chrdlg/drpcps.cxx
+++ b/sw/source/ui/chrdlg/drpcps.cxx
@@ -348,7 +348,7 @@ void SwDropCapsPict::Paint(vcl::RenderContext& rRenderContext, const Rectangle&
if (!IsVisible())
return;
- rRenderContext.SetMapMode(MapMode(MAP_PIXEL));
+ rRenderContext.SetMapMode(MapMode(MapUnit::MapPixel));
rRenderContext.SetLineColor();
rRenderContext.SetFillColor(maBackColor);
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index 57310326943f..4577c53cf567 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -432,7 +432,7 @@ void SwCaptionPreview::SetPreviewText(const OUString& rText)
Size SwCaptionPreview::GetOptimalSize() const
{
- return LogicToPixel(Size(106 , 20), MapMode(MAP_APPFONT));
+ return LogicToPixel(Size(106 , 20), MapMode(MapUnit::MapAppFont));
}
void SwCaptionPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 05335159f7ec..bd0ab49f141e 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -648,7 +648,7 @@ static void lcl_SetColl(SwWrtShell* pWrtShell, sal_uInt16 nType,
sal_Int32 nHeight, sal_uInt16 nFontHeightWhich)
{
float fSize = (float)nHeight / 10;
- nHeight = CalcToUnit( fSize, MAP_TWIP );
+ nHeight = CalcToUnit( fSize, MapUnit::MapTwip );
SwTextFormatColl *pColl = pWrtShell->GetTextCollFromPool(nType);
pColl->SetFormatAttr(SvxFontHeightItem(nHeight, 100, nFontHeightWhich));
}
@@ -677,27 +677,27 @@ bool SwStdFontTabPage::FillItemSet( SfxItemSet* )
if(bStandardHeightChanged)
{
float fSize = (float)m_pStandardHeightLB->GetValue() / 10;
- m_pFontConfig->SetFontHeight( CalcToUnit( fSize, MAP_TWIP ), FONT_STANDARD, m_nFontGroup );
+ m_pFontConfig->SetFontHeight( CalcToUnit( fSize, MapUnit::MapTwip ), FONT_STANDARD, m_nFontGroup );
}
if(bTitleHeightChanged)
{
float fSize = (float)m_pTitleHeightLB->GetValue() / 10;
- m_pFontConfig->SetFontHeight( CalcToUnit( fSize, MAP_TWIP ), FONT_OUTLINE, m_nFontGroup );
+ m_pFontConfig->SetFontHeight( CalcToUnit( fSize, MapUnit::MapTwip ), FONT_OUTLINE, m_nFontGroup );
}
if(bListHeightChanged)
{
float fSize = (float)m_pListHeightLB->GetValue() / 10;
- m_pFontConfig->SetFontHeight( CalcToUnit( fSize, MAP_TWIP ), FONT_LIST, m_nFontGroup );
+ m_pFontConfig->SetFontHeight( CalcToUnit( fSize, MapUnit::MapTwip ), FONT_LIST, m_nFontGroup );
}
if(bLabelHeightChanged)
{
float fSize = (float)m_pLabelHeightLB->GetValue() / 10;
- m_pFontConfig->SetFontHeight( CalcToUnit( fSize, MAP_TWIP ), FONT_CAPTION, m_nFontGroup );
+ m_pFontConfig->SetFontHeight( CalcToUnit( fSize, MapUnit::MapTwip ), FONT_CAPTION, m_nFontGroup );
}
if(bIndexHeightChanged)
{
float fSize = (float)m_pIndexHeightLB->GetValue() / 10;
- m_pFontConfig->SetFontHeight( CalcToUnit( fSize, MAP_TWIP ), FONT_INDEX, m_nFontGroup );
+ m_pFontConfig->SetFontHeight( CalcToUnit( fSize, MapUnit::MapTwip ), FONT_INDEX, m_nFontGroup );
}
if(m_pWrtShell)
@@ -725,7 +725,7 @@ bool SwStdFontTabPage::FillItemSet( SfxItemSet* )
if(bStandardHeightChanged)
{
float fSize = (float)m_pStandardHeightLB->GetValue() / 10;
- m_pWrtShell->SetDefault(SvxFontHeightItem( CalcToUnit( fSize, MAP_TWIP ), 100, nFontHeightWhich ) );
+ m_pWrtShell->SetDefault(SvxFontHeightItem( CalcToUnit( fSize, MapUnit::MapTwip ), 100, nFontHeightWhich ) );
SwTextFormatColl *pColl = m_pWrtShell->GetTextCollFromPool(RES_POOLCOLL_STANDARD);
pColl->ResetFormatAttr(nFontHeightWhich);
bMod = true;
@@ -949,11 +949,11 @@ void SwStdFontTabPage::Reset( const SfxItemSet* rSet)
aFontMetric = m_pFontList->Get(sIdxBackup, sIdxBackup );
m_pIndexHeightLB->Fill( &aFontMetric, m_pFontList );
- m_pStandardHeightLB->SetValue( CalcToPoint( nStandardHeight, MAP_TWIP, 10 ) );
- m_pTitleHeightLB-> SetValue( CalcToPoint( nTitleHeight , MAP_TWIP, 10 ) );
- m_pListHeightLB-> SetValue( CalcToPoint( nListHeight , MAP_TWIP, 10 ) );
- m_pLabelHeightLB-> SetValue( CalcToPoint( nLabelHeight , MAP_TWIP, 10 ));
- m_pIndexHeightLB-> SetValue( CalcToPoint( nIndexHeight , MAP_TWIP, 10 ));
+ m_pStandardHeightLB->SetValue( CalcToPoint( nStandardHeight, MapUnit::MapTwip, 10 ) );
+ m_pTitleHeightLB-> SetValue( CalcToPoint( nTitleHeight , MapUnit::MapTwip, 10 ) );
+ m_pListHeightLB-> SetValue( CalcToPoint( nListHeight , MapUnit::MapTwip, 10 ) );
+ m_pLabelHeightLB-> SetValue( CalcToPoint( nLabelHeight , MapUnit::MapTwip, 10 ));
+ m_pIndexHeightLB-> SetValue( CalcToPoint( nIndexHeight , MapUnit::MapTwip, 10 ));
m_pStandardBox->SaveValue();
m_pTitleBox->SaveValue();
@@ -985,19 +985,19 @@ IMPL_LINK_NOARG(SwStdFontTabPage, StandardHdl, Button*, void)
m_pStandardHeightLB->SetValue( CalcToPoint(
SwStdFontConfig::GetDefaultHeightFor(FONT_STANDARD + nFontOffset, m_eLanguage),
- MAP_TWIP, 10 ) );
+ MapUnit::MapTwip, 10 ) );
m_pTitleHeightLB ->SetValue(CalcToPoint(
SwStdFontConfig::GetDefaultHeightFor(FONT_OUTLINE +
- nFontOffset, m_eLanguage), MAP_TWIP, 10 ));
+ nFontOffset, m_eLanguage), MapUnit::MapTwip, 10 ));
m_pListHeightLB ->SetValue(CalcToPoint(
SwStdFontConfig::GetDefaultHeightFor(FONT_LIST + nFontOffset, m_eLanguage),
- MAP_TWIP, 10 ));
+ MapUnit::MapTwip, 10 ));
m_pLabelHeightLB ->SetValue(CalcToPoint(
SwStdFontConfig::GetDefaultHeightFor(FONT_CAPTION + nFontOffset, m_eLanguage),
- MAP_TWIP, 10 ));
+ MapUnit::MapTwip, 10 ));
m_pIndexHeightLB ->SetValue(CalcToPoint(
SwStdFontConfig::GetDefaultHeightFor(FONT_INDEX + nFontOffset, m_eLanguage),
- MAP_TWIP, 10 ));
+ MapUnit::MapTwip, 10 ));
}
IMPL_LINK( SwStdFontTabPage, ModifyHdl, Edit&, rBox, void )
@@ -1570,7 +1570,7 @@ SwMarkPreview::SwMarkPreview( vcl::Window *pParent, WinBits nWinBits ) :
{
m_aInitialSize = getPreviewOptionsSize(this);
InitColors();
- SetMapMode(MAP_PIXEL);
+ SetMapMode(MapUnit::MapPixel);
}
VCL_BUILDER_FACTORY_ARGS(SwMarkPreview, 0)
diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx
index d001831e308e..682e5b76035a 100644
--- a/sw/source/ui/dbui/addresslistdialog.cxx
+++ b/sw/source/ui/dbui/addresslistdialog.cxx
@@ -159,7 +159,7 @@ void SwAddrSourceLB::setColSizes()
long nTabs[] = { 2, 0, nWidth/2 };
- SvSimpleTable::SetTabs(&nTabs[0], MAP_PIXEL);
+ SvSimpleTable::SetTabs(&nTabs[0], MapUnit::MapPixel);
}
SwAddressListDialog::SwAddressListDialog(SwMailMergeAddressBlockPage* pParent)
@@ -195,7 +195,7 @@ SwAddressListDialog::SwAddressListDialog(SwMailMergeAddressBlockPage* pParent)
m_pTablePB->SetClickHdl(LINK( this, SwAddressListDialog, TableSelectHdl_Impl));
SvSimpleTableContainer *pHeaderTreeContainer = get<SvSimpleTableContainer>("sources");
- Size aSize = pHeaderTreeContainer->LogicToPixel(Size(182 , 102), MAP_APPFONT);
+ Size aSize = pHeaderTreeContainer->LogicToPixel(Size(182 , 102), MapUnit::MapAppFont);
pHeaderTreeContainer->set_width_request(aSize.Width());
pHeaderTreeContainer->set_height_request(aSize.Height());
m_pListLB = VclPtr<SwAddrSourceLB>::Create(*pHeaderTreeContainer);
diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx
index ebb3e0eb1b6a..cf8b9f83e545 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/createaddresslistdialog.cxx
@@ -148,8 +148,8 @@ void SwAddressControl_Impl::SetData(SwCSVData& rDBData)
std::vector< OUString >::iterator aHeaderIter;
- long nFTXPos = m_pWindow->LogicToPixel(Point(RSC_SP_CTRL_X, RSC_SP_CTRL_X), MAP_APPFONT).X();
- long nFTHeight = m_pWindow->LogicToPixel(Size(RSC_BS_CHARHEIGHT, RSC_BS_CHARHEIGHT), MAP_APPFONT).Height();
+ long nFTXPos = m_pWindow->LogicToPixel(Point(RSC_SP_CTRL_X, RSC_SP_CTRL_X), MapUnit::MapAppFont).X();
+ long nFTHeight = m_pWindow->LogicToPixel(Size(RSC_BS_CHARHEIGHT, RSC_BS_CHARHEIGHT), MapUnit::MapAppFont).Height();
long nFTWidth = 0;
//determine the width of the FixedTexts
@@ -164,12 +164,12 @@ void SwAddressControl_Impl::SetData(SwCSVData& rDBData)
//add some pixels
nFTWidth += 2;
long nEDXPos = nFTWidth + nFTXPos +
- m_pWindow->LogicToPixel(Size(RSC_SP_CTRL_DESC_X, RSC_SP_CTRL_DESC_X), MAP_APPFONT).Width();
- long nEDHeight = m_pWindow->LogicToPixel(Size(RSC_CD_TEXTBOX_HEIGHT, RSC_CD_TEXTBOX_HEIGHT), MAP_APPFONT).Height();
+ m_pWindow->LogicToPixel(Size(RSC_SP_CTRL_DESC_X, RSC_SP_CTRL_DESC_X), MapUnit::MapAppFont).Width();
+ long nEDHeight = m_pWindow->LogicToPixel(Size(RSC_CD_TEXTBOX_HEIGHT, RSC_CD_TEXTBOX_HEIGHT), MapUnit::MapAppFont).Height();
long nEDWidth = m_aWinOutputSize.Width() - nEDXPos - nFTXPos;
- m_nLineHeight = nEDHeight + m_pWindow->LogicToPixel(Size(RSC_SP_CTRL_GROUP_Y, RSC_SP_CTRL_GROUP_Y), MAP_APPFONT).Height();
+ m_nLineHeight = nEDHeight + m_pWindow->LogicToPixel(Size(RSC_SP_CTRL_GROUP_Y, RSC_SP_CTRL_GROUP_Y), MapUnit::MapAppFont).Height();
- long nEDYPos = m_pWindow->LogicToPixel(Size(RSC_SP_CTRL_DESC_Y, RSC_SP_CTRL_DESC_Y), MAP_APPFONT).Height();
+ long nEDYPos = m_pWindow->LogicToPixel(Size(RSC_SP_CTRL_DESC_Y, RSC_SP_CTRL_DESC_Y), MapUnit::MapAppFont).Height();
long nFTYPos = nEDYPos + nEDHeight - nFTHeight;
Link<Control&,void> aFocusLink = LINK(this, SwAddressControl_Impl, GotFocusHdl_Impl);
@@ -206,7 +206,7 @@ void SwAddressControl_Impl::SetData(SwCSVData& rDBData)
{
//the m_aWindow has to be at least as high as the ScrollBar and it must include the last Edit
sal_Int32 nContentHeight = pLastEdit->GetPosPixel().Y() + nEDHeight +
- m_pWindow->LogicToPixel(Size(RSC_SP_CTRL_GROUP_Y, RSC_SP_CTRL_GROUP_Y), MAP_APPFONT).Height();
+ m_pWindow->LogicToPixel(Size(RSC_SP_CTRL_GROUP_Y, RSC_SP_CTRL_GROUP_Y), MapUnit::MapAppFont).Height();
if(nContentHeight < m_pScrollBar->GetSizePixel().Height())
{
nContentHeight = m_pScrollBar->GetSizePixel().Height();
@@ -358,7 +358,7 @@ bool SwAddressControl_Impl::PreNotify( NotifyEvent& rNEvt )
Size SwAddressControl_Impl::GetOptimalSize() const
{
- return LogicToPixel(Size(250, 160), MAP_APPFONT);
+ return LogicToPixel(Size(250, 160), MapUnit::MapAppFont);
}
void SwAddressControl_Impl::Resize()
diff --git a/sw/source/ui/dbui/dbtablepreviewdialog.cxx b/sw/source/ui/dbui/dbtablepreviewdialog.cxx
index 6b07ce4b4cfc..e501fe9772a1 100644
--- a/sw/source/ui/dbui/dbtablepreviewdialog.cxx
+++ b/sw/source/ui/dbui/dbtablepreviewdialog.cxx
@@ -37,7 +37,7 @@ SwDBTablePreviewDialog::SwDBTablePreviewDialog(vcl::Window* pParent, uno::Sequen
{
get(m_pDescriptionFI, "description");
get(m_pBeamerWIN, "beamer");
- Size aSize(LogicToPixel(Size(338, 150), MAP_APPFONT));
+ Size aSize(LogicToPixel(Size(338, 150), MapUnit::MapAppFont));
m_pBeamerWIN->set_width_request(aSize.Width());
m_pBeamerWIN->set_height_request(aSize.Height());
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index 5d92cec760b0..cbb93621468c 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -64,14 +64,14 @@ SwMailMergeAddressBlockPage::SwMailMergeAddressBlockPage( SwMailMergeWizard* _pP
get(m_pSettingsFI, "settingsft");
get(m_pAddressCB, "address");
get(m_pSettingsWIN, "settingspreview");
- Size aSize(LogicToPixel(Size(164 , 45), MAP_APPFONT));
+ Size aSize(LogicToPixel(Size(164 , 45), MapUnit::MapAppFont));
m_pSettingsWIN->set_width_request(aSize.Width());
m_pSettingsWIN->set_height_request(aSize.Height());
get(m_pSettingsPB, "settings");
get(m_pHideEmptyParagraphsCB, "hideempty");
get(m_pAssignPB, "assign");
get(m_pPreviewWIN, "addresspreview");
- aSize = LogicToPixel(Size(176, 46), MAP_APPFONT);
+ aSize = LogicToPixel(Size(176, 46), MapUnit::MapAppFont);
m_pPreviewWIN->set_width_request(aSize.Width());
m_pPreviewWIN->set_height_request(aSize.Height());
get(m_pDocumentIndexFI, "documentindex");
@@ -322,7 +322,7 @@ SwSelectAddressBlockDialog::SwSelectAddressBlockDialog(
, m_rConfig(rConfig)
{
get(m_pPreview, "preview");
- Size aSize(m_pPreview->LogicToPixel(Size(192, 100), MAP_APPFONT));
+ Size aSize(m_pPreview->LogicToPixel(Size(192, 100), MapUnit::MapAppFont));
m_pPreview->set_width_request(aSize.Width());
m_pPreview->set_height_request(aSize.Height());
get(m_pNewPB, "new");
@@ -858,7 +858,7 @@ SwAssignFieldsControl::SwAssignFieldsControl(vcl::Window* pParent, WinBits nBits
Size SwAssignFieldsControl::GetOptimalSize() const
{
- return LogicToPixel(Size(248 , 120), MAP_APPFONT);
+ return LogicToPixel(Size(248 , 120), MapUnit::MapAppFont);
}
void SwAssignFieldsControl::Init(SwMailMergeConfigItem& rConfigItem)
@@ -1163,7 +1163,7 @@ SwAssignFieldsDialog::SwAssignFieldsDialog(
get(m_pPreviewFI, "PREVIEW_LABEL");
get(m_pOK, "ok");
get(m_pPreviewWIN, "PREVIEW");
- Size aSize(LogicToPixel(Size(248 , 45), MAP_APPFONT));
+ Size aSize(LogicToPixel(Size(248 , 45), MapUnit::MapAppFont));
m_pPreviewWIN->set_width_request(aSize.Width());
m_pPreviewWIN->set_height_request(aSize.Height());
get(m_pFieldsControl, "FIELDS");
@@ -1327,7 +1327,7 @@ void AddressMultiLineEdit::dispose()
Size AddressMultiLineEdit::GetOptimalSize() const
{
- return LogicToPixel(Size(160, 60), MAP_APPFONT);
+ return LogicToPixel(Size(160, 60), MapUnit::MapAppFont);
}
VCL_BUILDER_DECL_FACTORY(AddressMultiLineEdit)
diff --git a/sw/source/ui/dbui/mmdocselectpage.cxx b/sw/source/ui/dbui/mmdocselectpage.cxx
index c77e2f77ec24..4a6ed92e73b2 100644
--- a/sw/source/ui/dbui/mmdocselectpage.cxx
+++ b/sw/source/ui/dbui/mmdocselectpage.cxx
@@ -86,7 +86,7 @@ SwMailMergeDocSelectPage::SwMailMergeDocSelectPage(SwMailMergeWizard* pParent)
//Temp hack until all pages are converted to .ui and wizard
//base class adapted
- SetSizePixel(LogicToPixel(Size(260 , 250), MapMode(MAP_APPFONT)));
+ SetSizePixel(LogicToPixel(Size(260 , 250), MapMode(MapUnit::MapAppFont)));
}
SwMailMergeDocSelectPage::~SwMailMergeDocSelectPage()
diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx
index c27e9c35bc68..54cddf71f813 100644
--- a/sw/source/ui/dbui/mmgreetingspage.cxx
+++ b/sw/source/ui/dbui/mmgreetingspage.cxx
@@ -250,7 +250,7 @@ SwMailMergeGreetingsPage::SwMailMergeGreetingsPage(SwMailMergeWizard* _pParent)
get(m_pNeutralCB, "general");
get(m_pPreviewFI, "previewft");
get(m_pPreviewWIN, "preview");
- Size aSize(LogicToPixel(Size(186, 21), MapMode(MAP_APPFONT)));
+ Size aSize(LogicToPixel(Size(186, 21), MapMode(MapUnit::MapAppFont)));
m_pPreviewWIN->set_width_request(aSize.Width());
m_pPreviewWIN->set_height_request(aSize.Height());
get(m_pAssignPB, "assign");
@@ -427,7 +427,7 @@ SwMailBodyDialog::SwMailBodyDialog(vcl::Window* pParent) :
get(m_pBodyFT, "bodyft");
get(m_pBodyMLE, "bodymle");
m_pBodyMLE->SetStyle(m_pBodyMLE->GetStyle() | WB_HSCROLL | WB_VSCROLL | WB_IGNORETAB);
- Size aSize(LogicToPixel(Size(180, 50), MAP_APPFONT));
+ Size aSize(LogicToPixel(Size(180, 50), MapUnit::MapAppFont));
m_pBodyMLE->set_width_request(aSize.Width());
m_pBodyMLE->set_height_request(aSize.Height());
get(m_pOK, "ok");
diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx
index 15838bbf25de..f2f9ff4be585 100644
--- a/sw/source/ui/dbui/mmlayoutpage.cxx
+++ b/sw/source/ui/dbui/mmlayoutpage.cxx
@@ -91,7 +91,7 @@ SwMailMergeLayoutPage::SwMailMergeLayoutPage( SwMailMergeWizard* _pParent) :
get(m_pUpPB, "up");
get(m_pDownPB, "down");
get(m_pExampleContainerWIN, "example");
- Size aSize(LogicToPixel(Size(124, 159), MAP_APPFONT));
+ Size aSize(LogicToPixel(Size(124, 159), MapUnit::MapAppFont));
m_pExampleContainerWIN->set_width_request(aSize.Width());
m_pExampleContainerWIN->set_height_request(aSize.Height());
get(m_pZoomLB, "zoom");
diff --git a/sw/source/ui/dbui/mmoutputtypepage.cxx b/sw/source/ui/dbui/mmoutputtypepage.cxx
index 73413e40dc56..5e42b2f8b973 100644
--- a/sw/source/ui/dbui/mmoutputtypepage.cxx
+++ b/sw/source/ui/dbui/mmoutputtypepage.cxx
@@ -271,7 +271,7 @@ SwSendMailDialog::SwSendMailDialog(vcl::Window *pParent, SwMailMergeConfigItem&
m_nSendCount(0),
m_nErrorCount(0)
{
- Size aSize = m_pContainer->LogicToPixel(Size(226, 80), MAP_APPFONT);
+ Size aSize = m_pContainer->LogicToPixel(Size(226, 80), MapUnit::MapAppFont);
m_pContainer->set_width_request(aSize.Width());
m_pContainer->set_height_request(aSize.Height());
m_pStatus = VclPtr<SvSimpleTable>::Create(*m_pContainer);
@@ -296,7 +296,7 @@ SwSendMailDialog::SwSendMailDialog(vcl::Window *pParent, SwMailMergeConfigItem&
static long nTabs[] = {2, 0, nPos1};
m_pStatus->SetStyle( m_pStatus->GetStyle() | WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP );
m_pStatus->SetSelectionMode( SelectionMode::Single );
- m_pStatus->SetTabs(&nTabs[0], MAP_PIXEL);
+ m_pStatus->SetTabs(&nTabs[0], MapUnit::MapPixel);
m_pStatus->SetSpaceBetweenEntries(3);
UpdateTransferStatus();
diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx b/sw/source/ui/dbui/selectdbtabledialog.cxx
index 230e191e724e..66f01dc07bdd 100644
--- a/sw/source/ui/dbui/selectdbtabledialog.cxx
+++ b/sw/source/ui/dbui/selectdbtabledialog.cxx
@@ -86,7 +86,7 @@ void SwAddressTable::setColSizes()
nTabs_Impl[1] = 0;
nTabs_Impl[2] = nWidth;
- SvSimpleTable::SetTabs(&nTabs_Impl[0], MAP_PIXEL);
+ SvSimpleTable::SetTabs(&nTabs_Impl[0], MapUnit::MapPixel);
}
SwSelectDBTableDialog::SwSelectDBTableDialog(vcl::Window* pParent,
@@ -101,7 +101,7 @@ SwSelectDBTableDialog::SwSelectDBTableDialog(vcl::Window* pParent,
get(m_pPreviewPB, "preview");
SvSimpleTableContainer *pHeaderTreeContainer = get<SvSimpleTableContainer>("table");
- Size aSize = pHeaderTreeContainer->LogicToPixel(Size(238 , 50), MAP_APPFONT);
+ Size aSize = pHeaderTreeContainer->LogicToPixel(Size(238 , 50), MapUnit::MapAppFont);
pHeaderTreeContainer->set_width_request(aSize.Width());
pHeaderTreeContainer->set_height_request(aSize.Height());
m_pTable = VclPtr<SwAddressTable>::Create(*pHeaderTreeContainer);
diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx
index a15de6dcc864..733b42cd1718 100644
--- a/sw/source/ui/envelp/envfmt.cxx
+++ b/sw/source/ui/envelp/envfmt.cxx
@@ -235,7 +235,7 @@ IMPL_LINK( SwEnvFormatPage, ModifyHdl, SpinField&, rEdit, void )
long nRotatedWidth = lHeight;
long nRotatedHeight = lWidth;
Paper ePaper = SvxPaperInfo::GetSvxPaper(
- Size(nRotatedWidth, nRotatedHeight), MAP_TWIP, true);
+ Size(nRotatedWidth, nRotatedHeight), MapUnit::MapTwip, true);
for (size_t i = 0; i < aIDs.size(); ++i)
if (aIDs[i] == (sal_uInt16)ePaper)
m_pSizeFormatBox->SelectEntryPos(static_cast<sal_Int32>(i));
@@ -517,7 +517,7 @@ void SwEnvFormatPage::Reset(const SfxItemSet* rSet)
Paper ePaper = SvxPaperInfo::GetSvxPaper(
Size( std::min(rItem.lWidth, rItem.lHeight),
- std::max(rItem.lWidth, rItem.lHeight)), MAP_TWIP, true);
+ std::max(rItem.lWidth, rItem.lHeight)), MapUnit::MapTwip, true);
for (size_t i = 0; i < aIDs.size(); ++i)
if (aIDs[i] == (sal_uInt16)ePaper)
m_pSizeFormatBox->SelectEntryPos(static_cast<sal_Int32>(i));
diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx
index d027f0270f2a..c73699fbde24 100644
--- a/sw/source/ui/envelp/envlop1.cxx
+++ b/sw/source/ui/envelp/envlop1.cxx
@@ -49,12 +49,12 @@ using namespace ::com::sun::star;
SwEnvPreview::SwEnvPreview(vcl::Window* pParent, WinBits nStyle)
: Window(pParent, nStyle)
{
- SetMapMode(MapMode(MAP_PIXEL));
+ SetMapMode(MapMode(MapUnit::MapPixel));
}
Size SwEnvPreview::GetOptimalSize() const
{
- return LogicToPixel(Size(84 , 63), MAP_APPFONT);
+ return LogicToPixel(Size(84 , 63), MapUnit::MapAppFont);
}
VCL_BUILDER_FACTORY_ARGS(SwEnvPreview, 0)
diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx
index cc9b92391201..75ee218a6bc3 100644
--- a/sw/source/ui/envelp/labfmt.cxx
+++ b/sw/source/ui/envelp/labfmt.cxx
@@ -112,7 +112,7 @@ SwLabPreview::SwLabPreview(vcl::Window* pParent)
, m_aPWidthStr(SW_RESSTR(STR_PWIDTH))
, m_aPHeightStr(SW_RESSTR(STR_PHEIGHT))
{
- SetMapMode(MAP_PIXEL);
+ SetMapMode(MapUnit::MapPixel);
// FIXME RenderContext
@@ -139,7 +139,7 @@ SwLabPreview::SwLabPreview(vcl::Window* pParent)
Size SwLabPreview::GetOptimalSize() const
{
- return LogicToPixel(Size(146 , 161), MapMode(MAP_APPFONT));
+ return LogicToPixel(Size(146 , 161), MapMode(MapUnit::MapAppFont));
}
VCL_BUILDER_FACTORY(SwLabPreview)
diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx
index ed26ffbe74fc..fe769115b0a2 100644
--- a/sw/source/ui/fldui/flddb.cxx
+++ b/sw/source/ui/fldui/flddb.cxx
@@ -58,7 +58,7 @@ SwFieldDBPage::SwFieldDBPage(vcl::Window* pParent, const SfxItemSet *const pCore
m_pTypeLB->set_height_request(nHeight);
m_pDatabaseTLB->set_height_request(nHeight);
- long nWidth = m_pTypeLB->LogicToPixel(Size(FIELD_COLUMN_WIDTH, 0), MapMode(MAP_APPFONT)).Width();
+ long nWidth = m_pTypeLB->LogicToPixel(Size(FIELD_COLUMN_WIDTH, 0), MapMode(MapUnit::MapAppFont)).Width();
m_pTypeLB->set_width_request(nWidth);
m_pDatabaseTLB->set_width_request(nWidth*2);
diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx
index 7f92d992b82a..e556eb1f7a44 100644
--- a/sw/source/ui/fldui/flddinf.cxx
+++ b/sw/source/ui/fldui/flddinf.cxx
@@ -66,7 +66,7 @@ SwFieldDokInfPage::SwFieldDokInfPage(vcl::Window* pParent, const SfxItemSet *con
m_pSelectionLB->set_height_request(nHeight);
m_pFormatLB->set_height_request(nHeight);
- long nWidth = m_pTypeTLB->LogicToPixel(Size(FIELD_COLUMN_WIDTH, 0), MapMode(MAP_APPFONT)).Width();
+ long nWidth = m_pTypeTLB->LogicToPixel(Size(FIELD_COLUMN_WIDTH, 0), MapMode(MapUnit::MapAppFont)).Width();
m_pTypeTLB->set_width_request(nWidth);
m_pFormatLB->set_width_request(nWidth);
m_pSelectionLB->set_width_request(nWidth);
diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx
index 1d4dce0d107c..df89661bcc2f 100644
--- a/sw/source/ui/fldui/flddok.cxx
+++ b/sw/source/ui/fldui/flddok.cxx
@@ -62,7 +62,7 @@ SwFieldDokPage::SwFieldDokPage(vcl::Window* pParent, const SfxItemSet *const pCo
m_pSelectionLB->set_height_request(nHeight);
m_pFormatLB->set_height_request(nHeight);
- long nWidth = m_pTypeLB->LogicToPixel(Size(FIELD_COLUMN_WIDTH, 0), MapMode(MAP_APPFONT)).Width();
+ long nWidth = m_pTypeLB->LogicToPixel(Size(FIELD_COLUMN_WIDTH, 0), MapMode(MapUnit::MapAppFont)).Width();
m_pTypeLB->set_width_request(nWidth);
m_pSelectionLB->set_width_request(nWidth);
m_pFormatLB->set_width_request(nWidth);
diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx
index 60a17d53eb4f..edf169f2e5e9 100644
--- a/sw/source/ui/fldui/fldfunc.cxx
+++ b/sw/source/ui/fldui/fldfunc.cxx
@@ -76,7 +76,7 @@ SwFieldFuncPage::SwFieldFuncPage(vcl::Window* pParent, const SfxItemSet *const p
m_pTypeLB->set_height_request(nHeight);
m_pFormatLB->set_height_request(nHeight);
- long nWidth = m_pTypeLB->LogicToPixel(Size(FIELD_COLUMN_WIDTH, 0), MapMode(MAP_APPFONT)).Width();
+ long nWidth = m_pTypeLB->LogicToPixel(Size(FIELD_COLUMN_WIDTH, 0), MapMode(MapUnit::MapAppFont)).Width();
m_pTypeLB->set_width_request(nWidth);
m_pFormatLB->set_width_request(nWidth);
diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx
index ab7ce0e6e2cf..83356a0e9e7a 100644
--- a/sw/source/ui/fldui/fldref.cxx
+++ b/sw/source/ui/fldui/fldref.cxx
@@ -86,7 +86,7 @@ SwFieldRefPage::SwFieldRefPage(vcl::Window* pParent, const SfxItemSet *const pCo
m_pTypeLB->set_height_request(nHeight);
m_pFormatLB->set_height_request(nHeight);
- long nWidth = m_pTypeLB->LogicToPixel(Size(FIELD_COLUMN_WIDTH, 0), MapMode(MAP_APPFONT)).Width();
+ long nWidth = m_pTypeLB->LogicToPixel(Size(FIELD_COLUMN_WIDTH, 0), MapMode(MapUnit::MapAppFont)).Width();
m_pTypeLB->set_width_request(nWidth);
m_pFormatLB->set_width_request(nWidth);
m_pSelection->set_width_request(nWidth*2);
diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx
index 95a367e968ab..3c3cbac9839a 100644
--- a/sw/source/ui/fldui/fldvar.cxx
+++ b/sw/source/ui/fldui/fldvar.cxx
@@ -67,7 +67,7 @@ SwFieldVarPage::SwFieldVarPage(vcl::Window* pParent, const SfxItemSet *const pCo
m_pSelectionLB->set_height_request(nHeight);
m_pFormatLB->set_height_request(nHeight/2);
- long nWidth = m_pTypeLB->LogicToPixel(Size(FIELD_COLUMN_WIDTH, 0), MapMode(MAP_APPFONT)).Width();
+ long nWidth = m_pTypeLB->LogicToPixel(Size(FIELD_COLUMN_WIDTH, 0), MapMode(MapUnit::MapAppFont)).Width();
m_pTypeLB->set_width_request(nWidth);
m_pSelectionLB->set_width_request(nWidth);
m_pFormatLB->set_width_request(nWidth);
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index f56babc26998..f3d5931111e0 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -523,7 +523,7 @@ SwColumnPage::SwColumnPage(vcl::Window *pParent, const SfxItemSet &rSet)
long nLineWidth = static_cast<long>(MetricField::ConvertDoubleValue(
m_pLineWidthEdit->GetValue( ),
m_pLineWidthEdit->GetDecimalDigits( ),
- m_pLineWidthEdit->GetUnit(), MAP_TWIP ));
+ m_pLineWidthEdit->GetUnit(), MapUnit::MapTwip ));
m_pLineTypeDLB->SetWidth( nLineWidth );
// Fill the color listbox
@@ -753,7 +753,7 @@ IMPL_LINK_NOARG( SwColumnPage, UpdateColMgr, Edit&, void )
long nLineWidth = static_cast<long>(MetricField::ConvertDoubleValue(
m_pLineWidthEdit->GetValue( ),
m_pLineWidthEdit->GetDecimalDigits( ),
- m_pLineWidthEdit->GetUnit(), MAP_TWIP ));
+ m_pLineWidthEdit->GetUnit(), MapUnit::MapTwip ));
if( !bEnable )
m_pColMgr->SetNoLine();
else
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index 7b16081b027a..1312236faf24 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -2639,7 +2639,7 @@ BmpWindow::BmpWindow(vcl::Window* pPar, WinBits nStyle)
Size BmpWindow::GetOptimalSize() const
{
- return LogicToPixel(Size(127 , 66), MapMode(MAP_APPFONT));
+ return LogicToPixel(Size(127 , 66), MapMode(MapUnit::MapAppFont));
}
VCL_BUILDER_FACTORY_ARGS(BmpWindow, 0)
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 744d2952119c..52421db6dc87 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -235,7 +235,7 @@ SwMultiTOXTabDialog::SwMultiTOXTabDialog(vcl::Window* pParent, const SfxItemSet&
{
get(m_pShowExampleCB, "showexample");
get(m_pExampleContainerWIN, "example");
- Size aWinSize(LogicToPixel(Size(150, 188), MapMode(MAP_APPFONT)));
+ Size aWinSize(LogicToPixel(Size(150, 188), MapMode(MapUnit::MapAppFont)));
m_pExampleContainerWIN->set_width_request(aWinSize.Width());
m_pExampleContainerWIN->set_height_request(aWinSize.Height());
m_pExampleContainerWIN->SetSizePixel(aWinSize);
@@ -624,7 +624,7 @@ void SwIndexTreeLB::setColSizes()
for(sal_uInt16 i = 1; i <= MAXLEVEL; ++i)
nTabs_Impl[i+1] = nTabs_Impl[i] + nWidth;
- SvSimpleTable::SetTabs(&nTabs_Impl[0], MAP_PIXEL);
+ SvSimpleTable::SetTabs(&nTabs_Impl[0], MapUnit::MapPixel);
}
class SwAddStylesDlg_Impl : public SfxModalDialog
@@ -658,7 +658,7 @@ SwAddStylesDlg_Impl::SwAddStylesDlg_Impl(vcl::Window* pParent,
get(m_pRightPB, "right");
OUString sHBFirst = get<FixedText>("notapplied")->GetText();
SvSimpleTableContainer *pHeaderTreeContainer = get<SvSimpleTableContainer>("styles");
- Size aSize = pHeaderTreeContainer->LogicToPixel(Size(273, 164), MAP_APPFONT);
+ Size aSize = pHeaderTreeContainer->LogicToPixel(Size(273, 164), MapUnit::MapAppFont);
pHeaderTreeContainer->set_width_request(aSize.Width());
pHeaderTreeContainer->set_height_request(aSize.Height());
m_pHeaderTree = VclPtr<SwIndexTreeLB>::Create(*pHeaderTreeContainer);
@@ -3940,7 +3940,7 @@ std::vector<long> SwEntryBrowseBox::GetOptimalColWidths() const
Size SwEntryBrowseBox::GetOptimalSize() const
{
- Size aSize = LogicToPixel(Size(276 , 175), MapMode(MAP_APPFONT));
+ Size aSize = LogicToPixel(Size(276 , 175), MapMode(MapUnit::MapAppFont));
std::vector<long> aWidths = GetOptimalColWidths();
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index 329fef44ad73..591d5d0875fd 100644
--- a/sw/source/ui/misc/bookmark.cxx
+++ b/sw/source/ui/misc/bookmark.cxx
@@ -350,7 +350,7 @@ BookmarkTable::BookmarkTable(SvSimpleTableContainer& rParent) :
{
static long nTabs[] = {3, 0, 40, 150};
- SetTabs(nTabs, MAP_PIXEL);
+ SetTabs(nTabs, MapUnit::MapPixel);
SetSelectionMode(SelectionMode::Multiple);
InsertHeaderEntry(OUString(SW_RES(STR_PAGE)));
InsertHeaderEntry(OUString(SW_RES(STR_BOOKMARK_NAME)));
diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx
index 5a7f52cb3c31..fa2804d0ffbf 100644
--- a/sw/source/ui/misc/glosbib.cxx
+++ b/sw/source/ui/misc/glosbib.cxx
@@ -56,7 +56,7 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(vcl::Window * pParent,
get(m_pGroupTLB, "group");
const int nAppFontUnits = 130;
- long nWidth = LogicToPixel(Size(nAppFontUnits, 0), MAP_APPFONT).Width();
+ long nWidth = LogicToPixel(Size(nAppFontUnits, 0), MapUnit::MapAppFont).Width();
m_pPathLB->set_width_request(nWidth);
//just has to be something small, real size will be available space
m_pGroupTLB->set_width_request(nWidth);
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index c906e674623b..62e7a9125939 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -845,7 +845,7 @@ SwGlTreeListBox::SwGlTreeListBox(vcl::Window* pParent, WinBits nBits)
Size SwGlTreeListBox::GetOptimalSize() const
{
- return LogicToPixel(Size(212, 84), MapMode(MAP_APPFONT));
+ return LogicToPixel(Size(212, 84), MapMode(MapUnit::MapAppFont));
}
VCL_BUILDER_FACTORY_ARGS(SwGlTreeListBox, WB_BORDER | WB_TABSTOP)
diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx
index cc55e81cd023..43a51888edf1 100644
--- a/sw/source/ui/misc/pgfnote.cxx
+++ b/sw/source/ui/misc/pgfnote.cxx
@@ -89,7 +89,7 @@ IMPL_LINK_NOARG(SwFootNotePage, LineWidthChanged_Impl, Edit&, void)
sal_Int64 nVal = static_cast<sal_Int64>(MetricField::ConvertDoubleValue(
m_pLineWidthEdit->GetValue( ),
m_pLineWidthEdit->GetDecimalDigits( ),
- m_pLineWidthEdit->GetUnit(), MAP_TWIP ));
+ m_pLineWidthEdit->GetUnit(), MapUnit::MapTwip ));
m_pLineTypeBox->SetWidth( nVal );
}
@@ -191,7 +191,7 @@ void SwFootNotePage::Reset(const SfxItemSet *rSet)
sal_Int64 nWidthPt = static_cast<sal_Int64>(MetricField::ConvertDoubleValue(
sal_Int64( pFootnoteInfo->GetLineWidth() ), m_pLineWidthEdit->GetDecimalDigits(),
- MAP_TWIP, m_pLineWidthEdit->GetUnit( ) ));
+ MapUnit::MapTwip, m_pLineWidthEdit->GetUnit( ) ));
m_pLineWidthEdit->SetValue( nWidthPt );
// Separator style
@@ -290,7 +290,7 @@ bool SwFootNotePage::FillItemSet(SfxItemSet *rSet)
long nWidth = static_cast<long>(MetricField::ConvertDoubleValue(
m_pLineWidthEdit->GetValue( ),
m_pLineWidthEdit->GetDecimalDigits( ),
- m_pLineWidthEdit->GetUnit(), MAP_TWIP ));
+ m_pLineWidthEdit->GetUnit(), MapUnit::MapTwip ));
rFootnoteInfo.SetLineWidth( nWidth );
// Separator color
diff --git a/sw/source/uibase/app/appenv.cxx b/sw/source/uibase/app/appenv.cxx
index e26316305c34..eef978327342 100644
--- a/sw/source/uibase/app/appenv.cxx
+++ b/sw/source/uibase/app/appenv.cxx
@@ -345,7 +345,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
// Borders (are put together by Shift-Offset and alignment)
Size aPaperSize = pPrt->PixelToLogic( pPrt->GetPaperSizePixel(),
- MAP_TWIP);
+ MapUnit::MapTwip);
if ( !aPaperSize.Width() && !aPaperSize.Height() )
aPaperSize = SvxPaperInfo::GetPaperSize(PAPER_A4);
if ( aPaperSize.Width() > aPaperSize.Height() )
diff --git a/sw/source/uibase/app/docshini.cxx b/sw/source/uibase/app/docshini.cxx
index 51955a3b4c3a..23361fcff200 100644
--- a/sw/source/uibase/app/docshini.cxx
+++ b/sw/source/uibase/app/docshini.cxx
@@ -105,7 +105,7 @@ using namespace ::com::sun::star;
bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
{
bool bRet = SfxObjectShell::InitNew( xStor );
- OSL_ENSURE( GetMapUnit() == MAP_TWIP, "map unit is not twip!" );
+ OSL_ENSURE( GetMapUnit() == MapUnit::MapTwip, "map unit is not twip!" );
bool bHTMLTemplSet = false;
if( bRet )
{
@@ -413,7 +413,7 @@ void SwDocShell::Init_Impl()
SetAutoStyleFilterIndex(3);
// set map unit to twip
- SetMapUnit( MAP_TWIP );
+ SetMapUnit( MapUnit::MapTwip );
}
void SwDocShell::AddLink()
diff --git a/sw/source/uibase/dbui/dbtree.cxx b/sw/source/uibase/dbui/dbtree.cxx
index 441239e69272..a91511610f1f 100644
--- a/sw/source/uibase/dbui/dbtree.cxx
+++ b/sw/source/uibase/dbui/dbtree.cxx
@@ -164,7 +164,7 @@ VCL_BUILDER_DECL_FACTORY(SwDBTreeList)
Size SwDBTreeList::GetOptimalSize() const
{
- return LogicToPixel(Size(100, 62), MapMode(MAP_APPFONT));
+ return LogicToPixel(Size(100, 62), MapMode(MapUnit::MapAppFont));
}
SwDBTreeList::~SwDBTreeList()
diff --git a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
index 105da59eb028..69d329a686c6 100644
--- a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
+++ b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
@@ -770,7 +770,7 @@ bool SwSpellDialogChildWindow::FindNextDrawTextError_Impl(SwWrtShell& rSh)
GetDrawOutliner().GetEmptyItemSet().GetPool(),
OutlinerMode::TextObject );
aTmpOutliner.SetRefDevice( pDoc->getIDocumentDeviceAccess().getPrinter( false ) );
- MapMode aMapMode (MAP_TWIP);
+ MapMode aMapMode (MapUnit::MapTwip);
aTmpOutliner.SetRefMapMode(aMapMode);
aTmpOutliner.SetPaperSize( pTextObj->GetLogicRect().GetSize() );
aTmpOutliner.SetSpeller( xSpell );
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 3821e8929933..3f7c245404aa 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -835,7 +835,7 @@ int SwTransferable::PrepareForCopy( bool bIsCut )
// --> OD #i98753#
// set size of embedded object at the object description structure
- m_aObjDesc.maSize = OutputDevice::LogicToLogic( m_pWrtShell->GetObjSize(), MAP_TWIP, MAP_100TH_MM );
+ m_aObjDesc.maSize = OutputDevice::LogicToLogic( m_pWrtShell->GetObjSize(), MapUnit::MapTwip, MapUnit::Map100thMM );
// <--
PrepareOLE( m_aObjDesc );
AddFormat( SotClipboardFormatId::OBJECTDESCRIPTOR );
@@ -982,7 +982,7 @@ int SwTransferable::PrepareForCopy( bool bIsCut )
//Now adjust it. Thus in GetData the first query can still
//be answered with delayed rendering.
Size aSz( OLESIZE );
- m_aObjDesc.maSize = OutputDevice::LogicToLogic( aSz, MAP_TWIP, MAP_100TH_MM );
+ m_aObjDesc.maSize = OutputDevice::LogicToLogic( aSz, MapUnit::MapTwip, MapUnit::Map100thMM );
PrepareOLE( m_aObjDesc );
AddFormat( SotClipboardFormatId::OBJECTDESCRIPTOR );
@@ -1075,7 +1075,7 @@ int SwTransferable::CopyGlossary( SwTextBlocks& rGlossary, const OUString& rStr
//Now adjust it. Thus in GetData the first query can still
//be answered with delayed rendering.
Size aSz( OLESIZE );
- m_aObjDesc.maSize = OutputDevice::LogicToLogic( aSz, MAP_TWIP, MAP_100TH_MM );
+ m_aObjDesc.maSize = OutputDevice::LogicToLogic( aSz, MapUnit::MapTwip, MapUnit::Map100thMM );
PrepareOLE( m_aObjDesc );
AddFormat( SotClipboardFormatId::OBJECTDESCRIPTOR );
@@ -1857,7 +1857,7 @@ bool SwTransferable::PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
// if no other graphic is provided
// TODO/LATER: in future a default bitmap could be used
OUString aMimeType;
- MapMode aMapMode( MAP_100TH_MM );
+ MapMode aMapMode( MapUnit::Map100thMM );
aGraphic.SetPrefSize( Size( 2500, 2500 ) );
aGraphic.SetPrefMapMode( aMapMode );
xObjRef.SetGraphic( aGraphic, aMimeType );
@@ -1872,7 +1872,7 @@ bool SwTransferable::PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
aSize = aObjDesc.maSize;
else
{
- MapMode aMapMode( MAP_100TH_MM );
+ MapMode aMapMode( MapUnit::Map100thMM );
aSize = xObjRef.GetSize( &aMapMode );
}
}
@@ -1880,7 +1880,7 @@ bool SwTransferable::PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
{
aSize = Size( aObjDesc.maSize ); //always 100TH_MM
MapUnit aUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( aObjDesc.mnViewAspect ) );
- aSize = OutputDevice::LogicToLogic( aSize, MAP_100TH_MM, aUnit );
+ aSize = OutputDevice::LogicToLogic( aSize, MapUnit::Map100thMM, aUnit );
awt::Size aSz;
try
{
@@ -3095,7 +3095,7 @@ void SwTransferable::SetDataForDragAndDrop( const Point& rSttPos )
//be answered with delayed rendering.
m_aObjDesc.maDragStartPos = rSttPos;
m_aObjDesc.maSize = OutputDevice::LogicToLogic( Size( OLESIZE ),
- MAP_TWIP, MAP_100TH_MM );
+ MapUnit::MapTwip, MapUnit::Map100thMM );
PrepareOLE( m_aObjDesc );
AddFormat( SotClipboardFormatId::OBJECTDESCRIPTOR );
}
diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx b/sw/source/uibase/docvw/HeaderFooterWin.cxx
index c443ccfe5763..dea74020b11f 100644
--- a/sw/source/uibase/docvw/HeaderFooterWin.cxx
+++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx
@@ -257,7 +257,7 @@ bool SwHeaderFooterWin::Contains( const Point &rDocPt ) const
void SwHeaderFooterWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
{
// Use pixels for the rest of the drawing
- SetMapMode(MapMode(MAP_PIXEL));
+ SetMapMode(MapMode(MapUnit::MapPixel));
const Rectangle aRect(Rectangle(Point(0, 0), rRenderContext.PixelToLogic(GetSizePixel())));
drawinglayer::primitive2d::Primitive2DContainer aSeq(3);
diff --git a/sw/source/uibase/docvw/PageBreakWin.cxx b/sw/source/uibase/docvw/PageBreakWin.cxx
index a081b8ed19b5..03fcc6b56535 100644
--- a/sw/source/uibase/docvw/PageBreakWin.cxx
+++ b/sw/source/uibase/docvw/PageBreakWin.cxx
@@ -102,7 +102,7 @@ SwPageBreakWin::SwPageBreakWin( SwEditWin* pEditWin, const SwFrame *pFrame ) :
m_pMousePt( nullptr )
{
// Use pixels for the rest of the drawing
- SetMapMode( MapMode ( MAP_PIXEL ) );
+ SetMapMode( MapMode ( MapUnit::MapPixel ) );
// Create the line control
m_pLine = VclPtr<SwBreakDashedLine>::Create( GetEditWin(), &SwViewOption::GetPageBreakColor, this );
diff --git a/sw/source/uibase/docvw/SidebarScrollBar.cxx b/sw/source/uibase/docvw/SidebarScrollBar.cxx
index 70c589b3dc9e..45e2732b0e62 100644
--- a/sw/source/uibase/docvw/SidebarScrollBar.cxx
+++ b/sw/source/uibase/docvw/SidebarScrollBar.cxx
@@ -39,7 +39,7 @@ void SidebarScrollBar::LogicInvalidate(const Rectangle* pRectangle)
Push(PushFlags::MAPMODE);
EnableMapMode();
MapMode aMapMode = GetMapMode();
- aMapMode.SetMapUnit(MAP_TWIP);
+ aMapMode.SetMapUnit(MapUnit::MapTwip);
SetMapMode(aMapMode);
aRectangle = Rectangle(Point(0, 0), PixelToLogic(GetSizePixel()));
Pop();
diff --git a/sw/source/uibase/docvw/SidebarWin.cxx b/sw/source/uibase/docvw/SidebarWin.cxx
index cbccdcc21a1f..3c839781cb84 100644
--- a/sw/source/uibase/docvw/SidebarWin.cxx
+++ b/sw/source/uibase/docvw/SidebarWin.cxx
@@ -96,7 +96,7 @@ void lcl_translateTwips(vcl::Window& rParent, vcl::Window& rChild, MouseEvent* p
if (!rChild.IsMapModeEnabled())
{
MapMode aMapMode(rChild.GetMapMode());
- aMapMode.SetMapUnit(MAP_TWIP);
+ aMapMode.SetMapUnit(MapUnit::MapTwip);
aMapMode.SetScaleX(rParent.GetMapMode().GetScaleX());
aMapMode.SetScaleY(rParent.GetMapMode().GetScaleY());
rChild.SetMapMode(aMapMode);
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index a32e294d42f4..a79423a7f323 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -5108,7 +5108,7 @@ SwEditWin::SwEditWin(vcl::Window *pParent, SwView &rMyView):
// initially use the input language
m_bUseInputLanguage = true;
- SetMapMode(MapMode(MAP_TWIP));
+ SetMapMode(MapMode(MapUnit::MapTwip));
SetPointer( PointerStyle::Text );
m_aTimer.SetTimeoutHdl(LINK(this, SwEditWin, TimerHandler));
diff --git a/sw/source/uibase/docvw/srcedtw.cxx b/sw/source/uibase/docvw/srcedtw.cxx
index 4998f49882db..95865fe04031 100644
--- a/sw/source/uibase/docvw/srcedtw.cxx
+++ b/sw/source/uibase/docvw/srcedtw.cxx
@@ -994,7 +994,7 @@ void SwSrcEditWindow::SetFont()
//font height is stored in point and set in twip
aSize.Height() =
officecfg::Office::Common::Font::SourceViewFont::FontHeight::get() * 20;
- aFont.SetFontSize(m_pOutWin->LogicToPixel(aSize, MAP_TWIP));
+ aFont.SetFontSize(m_pOutWin->LogicToPixel(aSize, MapUnit::MapTwip));
GetTextEngine()->SetFont( aFont );
m_pOutWin->SetFont(aFont);
}
diff --git a/sw/source/uibase/frmdlg/colex.cxx b/sw/source/uibase/frmdlg/colex.cxx
index 4a42b146c3ad..60eb0c3abcf3 100644
--- a/sw/source/uibase/frmdlg/colex.cxx
+++ b/sw/source/uibase/frmdlg/colex.cxx
@@ -356,7 +356,7 @@ SwColumnOnlyExample::SwColumnOnlyExample(vcl::Window* pParent)
: Window(pParent)
, m_aFrameSize(1,1)
{
- SetMapMode( MapMode( MAP_TWIP ) );
+ SetMapMode( MapMode( MapUnit::MapTwip ) );
m_aWinSize = GetOptimalSize();
m_aWinSize.Height() -= 4;
m_aWinSize.Width() -= 4;
@@ -513,7 +513,7 @@ void SwColumnOnlyExample::SetColumns(const SwFormatCol& rCol)
Size SwColumnOnlyExample::GetOptimalSize() const
{
- return LogicToPixel(Size(75, 46), MapMode(MAP_APPFONT));
+ return LogicToPixel(Size(75, 46), MapMode(MapUnit::MapAppFont));
}
SwPageGridExample::~SwPageGridExample()
diff --git a/sw/source/uibase/lingu/sdrhhcwrap.cxx b/sw/source/uibase/lingu/sdrhhcwrap.cxx
index a5a7494ec37f..6a4fa73a0f48 100644
--- a/sw/source/uibase/lingu/sdrhhcwrap.cxx
+++ b/sw/source/uibase/lingu/sdrhhcwrap.cxx
@@ -67,7 +67,7 @@ SdrHHCWrapper::SdrHHCWrapper( SwView* pVw,
{
SetRefDevice( pView->GetDocShell()->GetDoc()->getIDocumentDeviceAccess().getPrinter( false ) );
- MapMode aMapMode (MAP_TWIP);
+ MapMode aMapMode (MapUnit::MapTwip);
SetRefMapMode(aMapMode);
Size aSize( 1, 1 );
diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx
index 33c4dacc4cd6..0da1e18ea824 100644
--- a/sw/source/uibase/misc/redlndlg.cxx
+++ b/sw/source/uibase/misc/redlndlg.cxx
@@ -1204,7 +1204,7 @@ void SwRedlineAcceptDlg::Initialize(const OUString& rExtraData)
{
sal_Int32 n3 = aStr.indexOf(';');
aStr = aStr.copy(n3 + 1);
- m_pTable->SetTab(i, aStr.toInt32(), MAP_PIXEL);
+ m_pTable->SetTab(i, aStr.toInt32(), MapUnit::MapPixel);
}
}
}
diff --git a/sw/source/uibase/shells/grfshex.cxx b/sw/source/uibase/shells/grfshex.cxx
index 69a18da6a07b..741e3cd54863 100644
--- a/sw/source/uibase/shells/grfshex.cxx
+++ b/sw/source/uibase/shells/grfshex.cxx
@@ -116,9 +116,9 @@ bool SwTextShell::InsertMediaDlg( SfxRequest& rReq )
if( aPrefSize.Width() && aPrefSize.Height() )
{
if( pWindow )
- aSize = pWindow->PixelToLogic( aPrefSize, MAP_TWIP );
+ aSize = pWindow->PixelToLogic( aPrefSize, MapUnit::MapTwip );
else
- aSize = Application::GetDefaultDevice()->PixelToLogic( aPrefSize, MAP_TWIP );
+ aSize = Application::GetDefaultDevice()->PixelToLogic( aPrefSize, MapUnit::MapTwip );
}
else
aSize = Size( 2835, 2835 );
diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx
index 2524dfb38d16..b5663aec62f9 100644
--- a/sw/source/uibase/shells/textsh.cxx
+++ b/sw/source/uibase/shells/textsh.cxx
@@ -355,7 +355,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
{
Size aSize(static_cast<const SvxSizeItem*>(pItem)->GetSize());
aSize = OutputDevice::LogicToLogic
- ( aSize, MapMode( MAP_TWIP ), MapMode( MAP_100TH_MM ) );
+ ( aSize, MapMode( MapUnit::MapTwip ), MapMode( MapUnit::Map100thMM ) );
if(aSize.Width() > MINLAY&& aSize.Height()> MINLAY)
{
diff --git a/sw/source/uibase/sidebar/PageFormatPanel.cxx b/sw/source/uibase/sidebar/PageFormatPanel.cxx
index 8e3b1a343e98..078f5e3f6ad1 100644
--- a/sw/source/uibase/sidebar/PageFormatPanel.cxx
+++ b/sw/source/uibase/sidebar/PageFormatPanel.cxx
@@ -162,7 +162,7 @@ void PageFormatPanel::NotifyItemUpdate(
if(mpPaperOrientation->GetSelectEntryPos() == 1)
Swap(aPaperSize);
- Paper ePaper = SvxPaperInfo::GetSvxPaper(aPaperSize, static_cast<MapUnit>(meUnit),true);
+ Paper ePaper = SvxPaperInfo::GetSvxPaper(aPaperSize, meUnit,true);
mpPaperSizeBox->SetSelection( ePaper );
}
}
diff --git a/sw/source/uibase/sidebar/PageMarginControl.cxx b/sw/source/uibase/sidebar/PageMarginControl.cxx
index 885bb515b26c..85825ce720c5 100644
--- a/sw/source/uibase/sidebar/PageMarginControl.cxx
+++ b/sw/source/uibase/sidebar/PageMarginControl.cxx
@@ -260,8 +260,8 @@ void PageMarginControl::SetMetricFieldMaxValues( const Size& rPageSize )
const long nMT = m_pTopMarginEdit->Denormalize( m_pTopMarginEdit->GetValue( FUNIT_TWIP ) );
const long nMB = m_pBottomMarginEdit->Denormalize( m_pBottomMarginEdit->GetValue( FUNIT_TWIP ) );
- const long nPH = LogicToLogic( rPageSize.Height(), (MapUnit)m_eUnit, MAP_TWIP );
- const long nPW = LogicToLogic( rPageSize.Width(), (MapUnit)m_eUnit, MAP_TWIP );
+ const long nPH = LogicToLogic( rPageSize.Height(), (MapUnit)m_eUnit, MapUnit::MapTwip );
+ const long nPW = LogicToLogic( rPageSize.Width(), (MapUnit)m_eUnit, MapUnit::MapTwip );
// Left
long nMax = nPW - nMR - MINBODY;
diff --git a/sw/source/uibase/table/chartins.cxx b/sw/source/uibase/table/chartins.cxx
index a96c78ea4e69..eec72eb2ecf1 100644
--- a/sw/source/uibase/table/chartins.cxx
+++ b/sw/source/uibase/table/chartins.cxx
@@ -73,7 +73,7 @@ Point SwGetChartDialogPos( const vcl::Window *pParentWin, const Size& rDialogSiz
pParentWin->OutputToAbsoluteScreenPixel( aObjPixel.BottomRight() ) );
Rectangle aDesktop = pParentWin->GetDesktopRectPixel();
- Size aSpace = pParentWin->LogicToPixel( Size( 8, 12 ), MAP_APPFONT );
+ Size aSpace = pParentWin->LogicToPixel( Size( 8, 12 ), MapUnit::MapAppFont );
bool bLayoutRTL = ::GetActiveView()->GetWrtShell().IsTableRightToLeft();
bool bCenterHor = false;
diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx
index 167049dc18d1..903ef5cda361 100644
--- a/sw/source/uibase/uiview/pview.cxx
+++ b/sw/source/uibase/uiview/pview.cxx
@@ -196,7 +196,7 @@ SwPagePreviewWin::SwPagePreviewWin( vcl::Window *pParent, SwPagePreview& rPView
SetHelpId(HID_PAGEPREVIEW);
SetFillColor( GetBackground().GetColor() );
SetLineColor( GetBackground().GetColor());
- SetMapMode( MapMode(MAP_TWIP) );
+ SetMapMode( MapMode(MapUnit::MapTwip) );
const SwMasterUsrPref *pUsrPref = SW_MOD()->GetUsrPref(false);
mnRow = pUsrPref->GetPagePrevRow(); // 1 row
diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx
index b900589433f2..554645dbfb52 100644
--- a/sw/source/uibase/uiview/srcview.cxx
+++ b/sw/source/uibase/uiview/srcview.cxx
@@ -688,10 +688,10 @@ sal_Int32 SwSrcView::PrintSource(
pOutDev->Push();
TextEngine* pTextEngine = aEditWin->GetTextEngine();
- pOutDev->SetMapMode( MAP_100TH_MM );
+ pOutDev->SetMapMode( MapUnit::Map100thMM );
vcl::Font aFont( aEditWin->GetOutWin()->GetFont() );
Size aSize( aFont.GetFontSize() );
- aSize = aEditWin->GetOutWin()->PixelToLogic( aSize, MAP_100TH_MM );
+ aSize = aEditWin->GetOutWin()->PixelToLogic( aSize, MapUnit::Map100thMM );
aFont.SetFontSize( aSize );
aFont.SetColor( COL_BLACK );
pOutDev->SetFont( aFont );
diff --git a/sw/source/uibase/uiview/swcli.cxx b/sw/source/uibase/uiview/swcli.cxx
index 93c6cfeb4394..f5f8f174e544 100644
--- a/sw/source/uibase/uiview/swcli.cxx
+++ b/sw/source/uibase/uiview/swcli.cxx
@@ -138,7 +138,7 @@ void SwOleClient::ViewChanged()
// first convert to TWIPS before scaling, because scaling factors are calculated for
// the TWIPS mapping and so they will produce the best results if applied to TWIPS based
// coordinates
- const MapMode aMyMap ( MAP_TWIP );
+ const MapMode aMyMap ( MapUnit::MapTwip );
const MapMode aObjMap( VCLUnoHelper::UnoEmbed2VCLMapUnit( GetObject()->getMapUnit( GetAspect() ) ) );
aVisSize = OutputDevice::LogicToLogic( aVisSize, aObjMap, aMyMap );
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index 477d52610f2a..bc1a23105f11 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -1441,7 +1441,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
Size aRootSize( aRootRect.SSize() );
- const MapMode aTmpMap( MAP_TWIP );
+ const MapMode aTmpMap( MapUnit::MapTwip );
const Size& rEditSize = GetEditWin().GetOutputSizePixel();
const Size aWindowSize( GetEditWin().PixelToLogic( rEditSize, aTmpMap ) );
diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx
index 07887a7f9b91..5325d2fd15e3 100644
--- a/sw/source/uibase/uiview/viewdraw.cxx
+++ b/sw/source/uibase/uiview/viewdraw.cxx
@@ -176,9 +176,9 @@ void SwView::ExecDraw(SfxRequest& rReq)
if( aPrefSize.Width() && aPrefSize.Height() )
{
if( pWin )
- aSize = pWin->PixelToLogic( aPrefSize, MAP_TWIP );
+ aSize = pWin->PixelToLogic( aPrefSize, MapUnit::MapTwip );
else
- aSize = Application::GetDefaultDevice()->PixelToLogic( aPrefSize, MAP_TWIP );
+ aSize = Application::GetDefaultDevice()->PixelToLogic( aPrefSize, MapUnit::MapTwip );
}
else
aSize = Size( 2835, 2835 );
diff --git a/sw/source/uibase/uiview/viewmdi.cxx b/sw/source/uibase/uiview/viewmdi.cxx
index 8c7ccf7e1693..c416a6631bcb 100644
--- a/sw/source/uibase/uiview/viewmdi.cxx
+++ b/sw/source/uibase/uiview/viewmdi.cxx
@@ -102,7 +102,7 @@ void SwView::SetZoom_( const Size &rEditSize, SvxZoomType eZoomType,
if (pPostItMgr->HasNotes() && pPostItMgr->ShowNotes())
aPageSize.Width() += pPostItMgr->GetSidebarWidth() + pPostItMgr->GetSidebarBorderWidth();
- const MapMode aTmpMap( MAP_TWIP );
+ const MapMode aTmpMap( MapUnit::MapTwip );
const Size aWindowSize( GetEditWin().PixelToLogic( rEditSize, aTmpMap ) );
if( nsUseOnPage::PD_MIRROR == rDesc.GetUseOn() ) // mirrored pages
diff --git a/sw/source/uibase/uiview/viewport.cxx b/sw/source/uibase/uiview/viewport.cxx
index fab131719b7a..0c70ff66c855 100644
--- a/sw/source/uibase/uiview/viewport.cxx
+++ b/sw/source/uibase/uiview/viewport.cxx
@@ -964,7 +964,7 @@ void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize )
Size aSize( rSize );
aSize.Width() -= (aBorder.Left() + aBorder.Right());
aSize.Height() -= (aBorder.Top() + aBorder.Bottom());
- Size aObjSizePixel = GetWindow()->LogicToPixel( aObjSize, MAP_TWIP );
+ Size aObjSizePixel = GetWindow()->LogicToPixel( aObjSize, MapUnit::MapTwip );
SfxViewShell::SetZoomFactor( Fraction( aSize.Width(), aObjSizePixel.Width() ),
Fraction( aSize.Height(), aObjSizePixel.Height() ) );
}
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index 901a3011bdfb..ecc6e4f32d08 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -2762,7 +2762,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer(
// HTML source view and prospect adapt to the printer's paper size
aTmpSize = pPrinter->GetPaperSize();
aTmpSize = OutputDevice::LogicToLogic( aTmpSize,
- pPrinter->GetMapMode(), MapMode( MAP_100TH_MM ));
+ pPrinter->GetMapMode(), MapMode( MapUnit::Map100thMM ));
aPageSize = awt::Size( aTmpSize.Width(), aTmpSize.Height() );
#if 0
// #i115048# it seems users didn't like getting double the formatted page size
@@ -2859,7 +2859,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer(
if ( pPrinter )
{
awt::Size aNewPageSize;
- const Size aPageSize = pPrinter->PixelToLogic( pPrinter->GetPaperSizePixel(), MapMode( MAP_100TH_MM ) );
+ const Size aPageSize = pPrinter->PixelToLogic( pPrinter->GetPaperSizePixel(), MapMode( MapUnit::Map100thMM ) );
aNewPageSize = awt::Size( aPageSize.Width(), aPageSize.Height() );
if ( ( pPagePrintSettings->GetLandscape() &&
aPageSize.Width() < aPageSize.Height() ) ||
diff --git a/sw/source/uibase/utlui/attrdesc.cxx b/sw/source/uibase/utlui/attrdesc.cxx
index 965157df48b4..ad3b9eb92bba 100644
--- a/sw/source/uibase/utlui/attrdesc.cxx
+++ b/sw/source/uibase/utlui/attrdesc.cxx
@@ -496,7 +496,7 @@ bool SwFormatCol::GetPresentation
const long nWdth = static_cast<long>(GetLineWidth());
rText = rText + " " + SW_RESSTR( STR_LINE_WIDTH ) + " " +
::GetMetricText( nWdth, eCoreUnit,
- MAP_POINT, pIntl );
+ MapUnit::MapPoint, pIntl );
}
}
else
diff --git a/sw/source/uibase/utlui/shdwcrsr.cxx b/sw/source/uibase/utlui/shdwcrsr.cxx
index 40543dc88abc..0fcfa7f3543f 100644
--- a/sw/source/uibase/utlui/shdwcrsr.cxx
+++ b/sw/source/uibase/utlui/shdwcrsr.cxx
@@ -73,7 +73,7 @@ void SwShadowCursor::DrawCursor( const Point& rPt, long nHeight, sal_uInt16 nMod
pWin->Push();
- pWin->SetMapMode( MAP_PIXEL );
+ pWin->SetMapMode( MapUnit::MapPixel );
pWin->SetRasterOp( RasterOp::Xor );
pWin->SetLineColor( Color( aCol.GetColor() ^ COL_WHITE ) );
diff --git a/sw/source/uibase/utlui/unotools.cxx b/sw/source/uibase/utlui/unotools.cxx
index 040c44861512..a23774cc862f 100644
--- a/sw/source/uibase/utlui/unotools.cxx
+++ b/sw/source/uibase/utlui/unotools.cxx
@@ -541,7 +541,7 @@ void SwFrameCtrlWindow::Command( const CommandEvent& rCEvt )
Size SwFrameCtrlWindow::GetOptimalSize() const
{
- return LogicToPixel(Size(82, 124), MapMode(MAP_APPFONT));
+ return LogicToPixel(Size(82, 124), MapMode(MapUnit::MapAppFont));
}
void SwFrameCtrlWindow::Resize()
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index dbe9b27335ab..0b9bc15f19e2 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -413,7 +413,7 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName
{
SwRect aArea = GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, nullptr, xObj.GetObject() );
aArea.Pos() += GetAnyCurRect( RECT_FLY_EMBEDDED, nullptr, xObj.GetObject() ).Pos();
- MapMode aMapMode( MAP_TWIP );
+ MapMode aMapMode( MapUnit::MapTwip );
Size aSize = xObj.GetSize( &aMapMode );
aArea.Width( aSize.Width() );
aArea.Height( aSize.Height() );
@@ -504,7 +504,7 @@ bool SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrame
CalcBoundRect( aBound, aFrameMgr.GetAnchor() );
//The Size should be suggested by the OLE server
- MapMode aMapMode( MAP_TWIP );
+ MapMode aMapMode( MapUnit::MapTwip );
Size aSz = xRef.GetSize( &aMapMode );
//Object size can be limited
@@ -650,7 +650,7 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
MapUnit aUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( nAspect ) );
// TODO/LATER: needs complete VisArea?!
- Size aSize( OutputDevice::LogicToLogic( aRect.SVRect(), MAP_TWIP, aUnit ).GetSize() );
+ Size aSize( OutputDevice::LogicToLogic( aRect.SVRect(), MapUnit::MapTwip, aUnit ).GetSize() );
awt::Size aSz;
aSz.Width = aSize.Width();
aSz.Height = aSize.Height();
@@ -755,7 +755,7 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
// nothing can be scaled.
if( _aVisArea.Width() && _aVisArea.Height() )
{
- const MapMode aTmp( MAP_TWIP );
+ const MapMode aTmp( MapUnit::MapTwip );
MapUnit aUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( nAspect ) );
_aVisArea = OutputDevice::LogicToLogic( _aVisArea, aUnit, aTmp);
Size aObjArea;