summaryrefslogtreecommitdiff
path: root/svtools/source/control/ruler.cxx
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 /svtools/source/control/ruler.cxx
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 'svtools/source/control/ruler.cxx')
-rw-r--r--svtools/source/control/ruler.cxx26
1 files changed, 13 insertions, 13 deletions
diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx
index 7e4dbb9f2bbc..22b752d6f709 100644
--- a/svtools/source/control/ruler.cxx
+++ b/svtools/source/control/ruler.cxx
@@ -179,17 +179,17 @@ ImplRulerData& ImplRulerData::operator=( const ImplRulerData& rData )
static const RulerUnitData aImplRulerUnitTab[RULER_UNIT_COUNT] =
{
-{ MAP_100TH_MM, 100, 25.0, 25.0, 50.0, 100.0, " mm" }, // MM
-{ MAP_100TH_MM, 1000, 100.0, 500.0, 1000.0, 1000.0, " cm" }, // CM
-{ MAP_MM, 1000, 10.0, 250.0, 500.0, 1000.0, " m" }, // M
-{ MAP_CM, 100000, 12500.0, 25000.0, 50000.0, 100000.0, " km" }, // KM
-{ MAP_1000TH_INCH, 1000, 62.5, 125.0, 500.0, 1000.0, "\"" }, // INCH
-{ MAP_100TH_INCH, 1200, 120.0, 120.0, 600.0, 1200.0, "'" }, // FOOT
-{ MAP_10TH_INCH, 633600, 63360.0, 63360.0, 316800.0, 633600.0, " miles" }, // MILE
-{ MAP_POINT, 1, 12.0, 12.0, 12.0, 36.0, " pt" }, // POINT
-{ MAP_100TH_MM, 423, 423.0, 423.0, 423.0, 846.0, " pi" }, // PICA
-{ MAP_100TH_MM, 371, 371.0, 371.0, 371.0, 743.0, " ch" }, // CHAR
-{ MAP_100TH_MM, 551, 551.0, 551.0, 551.0, 1102.0, " li" } // LINE
+{ MapUnit::Map100thMM, 100, 25.0, 25.0, 50.0, 100.0, " mm" }, // MM
+{ MapUnit::Map100thMM, 1000, 100.0, 500.0, 1000.0, 1000.0, " cm" }, // CM
+{ MapUnit::MapMM, 1000, 10.0, 250.0, 500.0, 1000.0, " m" }, // M
+{ MapUnit::MapCM, 100000, 12500.0, 25000.0, 50000.0, 100000.0, " km" }, // KM
+{ MapUnit::Map1000thInch, 1000, 62.5, 125.0, 500.0, 1000.0, "\"" }, // INCH
+{ MapUnit::Map100thInch, 1200, 120.0, 120.0, 600.0, 1200.0, "'" }, // FOOT
+{ MapUnit::Map10thInch, 633600, 63360.0, 63360.0, 316800.0, 633600.0, " miles" }, // MILE
+{ MapUnit::MapPoint, 1, 12.0, 12.0, 12.0, 36.0, " pt" }, // POINT
+{ MapUnit::Map100thMM, 423, 423.0, 423.0, 423.0, 846.0, " pi" }, // PICA
+{ MapUnit::Map100thMM, 371, 371.0, 371.0, 371.0, 743.0, " ch" }, // CHAR
+{ MapUnit::Map100thMM, 551, 551.0, 551.0, 551.0, 1102.0, " li" } // LINE
};
static RulerTabData ruler_tab =
@@ -260,7 +260,7 @@ void Ruler::ImplInit( WinBits nWinBits )
mnUnitIndex = RULER_UNIT_CM;
meUnit = FUNIT_CM;
maZoom = Fraction( 1, 1 );
- meSourceUnit = MAP_100TH_MM;
+ meSourceUnit = MapUnit::Map100thMM;
// Recalculate border widths
if ( nWinBits & WB_BORDER )
@@ -289,7 +289,7 @@ void Ruler::ImplInit( WinBits nWinBits )
Ruler::Ruler( vcl::Window* pParent, WinBits nWinStyle ) :
Window( pParent, nWinStyle & WB_3DLOOK ),
maVirDev( VclPtr<VirtualDevice>::Create(*this) ),
- maMapMode( MAP_100TH_MM ),
+ maMapMode( MapUnit::Map100thMM ),
mpSaveData(new ImplRulerData),
mpData(nullptr),
mpDragData(new ImplRulerData)