summaryrefslogtreecommitdiff
path: root/sw/source/core/text
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-09-20 16:41:39 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-10-05 06:51:20 +0000
commit954f752cf10fc6a8777af2a6a93e496688464687 (patch)
tree0fc776cdcb6ad9b1d2b9673ac044bb5b4f496972 /sw/source/core/text
parentc1e18e05a53c1d55afe36a887ca25f74f3f1d32d (diff)
convert MapUnit to scoped enum
I left a prefix on the names "Map" so that I would not have to re-arrange each name too much, since I can't start identifiers with digits like "100thMM" And remove RSC_EXTRAMAPUNIT, which doesn't seem to be doing anything anymore. Change-Id: I5187824aa87e30caf5357b51b5384b5ab919d224 Reviewed-on: https://gerrit.libreoffice.org/29096 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/text')
-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
5 files changed, 7 insertions, 7 deletions
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() );