diff options
Diffstat (limited to 'svtools/source/control')
-rw-r--r-- | svtools/source/control/ctrlbox.cxx | 4 | ||||
-rw-r--r-- | svtools/source/control/ctrltool.cxx | 2 | ||||
-rw-r--r-- | svtools/source/control/roadmap.cxx | 8 | ||||
-rw-r--r-- | svtools/source/control/ruler.cxx | 26 | ||||
-rw-r--r-- | svtools/source/control/scrwin.cxx | 2 |
5 files changed, 21 insertions, 21 deletions
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index 20fdb89c9eaf..cb190b4af2a7 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -517,7 +517,7 @@ void lclDrawPolygon( OutputDevice& rDev, const basegfx::B2DPolygon& rPolygon, lo basegfx::B2DPolyPolygon aPolygons = svtools::ApplyLineDashing(rPolygon, nDashing, nPix); // Handle problems of width 1px in Pixel mode: 0.5px gives a 1px line - if (rDev.GetMapMode().GetMapUnit() == MAP_PIXEL && nWidth == nPix) + if (rDev.GetMapMode().GetMapUnit() == MapUnit::MapPixel && nWidth == nPix) nWidth = 0; for ( sal_uInt32 i = 0; i < aPolygons.count( ); i++ ) @@ -717,7 +717,7 @@ void LineListBox::ImplInit() eSourceUnit = FUNIT_POINT; aVirDev->SetLineColor(); - aVirDev->SetMapMode( MapMode( MAP_TWIP ) ); + aVirDev->SetMapMode( MapMode( MapUnit::MapTwip ) ); UpdatePaintLineColor(); } diff --git a/svtools/source/control/ctrltool.cxx b/svtools/source/control/ctrltool.cxx index a196e0a3ad8d..974af100fa7c 100644 --- a/svtools/source/control/ctrltool.cxx +++ b/svtools/source/control/ctrltool.cxx @@ -747,7 +747,7 @@ const sal_IntPtr* FontList::GetSizeAry( const FontMetric& rInfo ) const return aStdSizeAry; MapMode aOldMapMode = pDevice->GetMapMode(); - MapMode aMap( MAP_10TH_INCH, Point(), Fraction( 1, 72 ), Fraction( 1, 72 ) ); + MapMode aMap( MapUnit::Map10thInch, Point(), Fraction( 1, 72 ), Fraction( 1, 72 ) ); pDevice->SetMapMode( aMap ); int nRealCount = 0; diff --git a/svtools/source/control/roadmap.cxx b/svtools/source/control/roadmap.cxx index 640e98da9de0..638159100126 100644 --- a/svtools/source/control/roadmap.cxx +++ b/svtools/source/control/roadmap.cxx @@ -189,8 +189,8 @@ public: void RoadmapImpl::initItemSize() { Size aLabelSize( m_rAntiImpl.GetOutputSizePixel() ); - aLabelSize.Height() = m_rAntiImpl.LogicToPixel( Size( 0, LABELBASEMAPHEIGHT ), MAP_APPFONT ).Height(); - aLabelSize.Width() -= m_rAntiImpl.LogicToPixel( Size( 2 * ROADMAP_INDENT_X, 0 ), MAP_APPFONT ).Width(); + aLabelSize.Height() = m_rAntiImpl.LogicToPixel( Size( 0, LABELBASEMAPHEIGHT ), MapUnit::MapAppFont ).Height(); + aLabelSize.Width() -= m_rAntiImpl.LogicToPixel( Size( 2 * ROADMAP_INDENT_X, 0 ), MapUnit::MapAppFont ).Width(); m_aItemSizePixel = aLabelSize; } @@ -572,7 +572,7 @@ void ORoadmap::Paint(vcl::RenderContext& rRenderContext, const Rectangle& _rRect void ORoadmap::DrawHeadline(vcl::RenderContext& rRenderContext) { - Point aTextPos = LogicToPixel(Point(ROADMAP_INDENT_X, 8), MAP_APPFONT); + Point aTextPos = LogicToPixel(Point(ROADMAP_INDENT_X, 8), MapUnit::MapAppFont); Size aOutputSize(GetOutputSizePixel()); @@ -744,7 +744,7 @@ void RoadmapItem::SetPosition(RoadmapItem* _pOldItem) Point aIDPos; if ( _pOldItem == nullptr ) { - aIDPos = mpID->LogicToPixel( Point( ROADMAP_INDENT_X, ROADMAP_INDENT_Y ), MAP_APPFONT ); + aIDPos = mpID->LogicToPixel( Point( ROADMAP_INDENT_X, ROADMAP_INDENT_Y ), MapUnit::MapAppFont ); } else { 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) diff --git a/svtools/source/control/scrwin.cxx b/svtools/source/control/scrwin.cxx index ae3484defafd..84ad86e9ff77 100644 --- a/svtools/source/control/scrwin.cxx +++ b/svtools/source/control/scrwin.cxx @@ -230,7 +230,7 @@ void ScrollableWindow::Resize() // select the shifted map-mode if ( aPixOffset != aOldPixOffset ) { - Window::SetMapMode( MapMode( MAP_PIXEL ) ); + Window::SetMapMode( MapMode( MapUnit::MapPixel ) ); Window::Scroll( aPixOffset.X() - aOldPixOffset.X(), aPixOffset.Y() - aOldPixOffset.Y() ); |