diff options
author | Michael Stahl <mstahl@redhat.com> | 2017-10-26 23:15:06 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-10-26 23:17:45 +0200 |
commit | 11d2f3d6e1b6c9baf43d8521293c53525108436d (patch) | |
tree | ffe35d5d47713a11c93c3bf11f588eeaf492fc16 /dbaccess/source/ui/control | |
parent | 213f7c02d4f3ddbe2f52950575e2559c52d98ac2 (diff) |
vcl: make MapMode constructor explicit
Insert constructor everywhere, except a couple places that apparently
want to compare GetMapUnit().
Change-Id: I1910deb60562e5e949203435e827057f70a3f988
Diffstat (limited to 'dbaccess/source/ui/control')
-rw-r--r-- | dbaccess/source/ui/control/FieldDescControl.cxx | 8 | ||||
-rw-r--r-- | dbaccess/source/ui/control/RelationControl.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/control/VertSplitView.cxx | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx index 1a312ec1da34..15db79ca2fa2 100644 --- a/dbaccess/source/ui/control/FieldDescControl.cxx +++ b/dbaccess/source/ui/control/FieldDescControl.cxx @@ -290,7 +290,7 @@ void OFieldDescControl::CheckScrollBars() // Which one is the last one that fits? sal_uInt16 nLastVisible; const sal_Int32 nControlHeight = GetMaxControlHeight(); - const sal_Int32 nControl_Spacing_y = LogicToPixel(Size(0, CONTROL_SPACING_Y),MapUnit::MapAppFont).Height(); + const sal_Int32 nControl_Spacing_y = LogicToPixel(Size(0, CONTROL_SPACING_Y), MapMode(MapUnit::MapAppFont)).Height(); if (bNeedHScrollBar) nLastVisible = static_cast<sal_uInt16>((szOverallSize.Height() - nControl_Spacing_y - nHScrollHeight) / (nControl_Spacing_y + nControlHeight)); else @@ -369,7 +369,7 @@ void OFieldDescControl::ScrollAllAggregates() if (m_nOldVThumb != m_pVertScroll->GetThumbPos()) { const sal_Int32 nControlHeight = GetMaxControlHeight(); - const sal_Int32 nControl_Spacing_y = LogicToPixel(Size(0, CONTROL_SPACING_Y),MapUnit::MapAppFont).Height(); + const sal_Int32 nControl_Spacing_y = LogicToPixel(Size(0, CONTROL_SPACING_Y), MapMode(MapUnit::MapAppFont)).Height(); nDeltaY = (m_nOldVThumb - m_pVertScroll->GetThumbPos()) * (nControl_Spacing_y + nControlHeight); m_nOldVThumb = m_pVertScroll->GetThumbPos(); } @@ -996,7 +996,7 @@ void OFieldDescControl::SetPosSize( VclPtr<Control> const & rControl, long nRow, const sal_Int32 nControlHeight = GetMaxControlHeight(); Size aSize(0,nControlHeight); if ( isRightAligned() && nCol ) - aSize.Width() = LogicToPixel(Size(m_nWidth, 0),MapUnit::MapAppFont).Width(); + aSize.Width() = LogicToPixel(Size(m_nWidth, 0), MapMode(MapUnit::MapAppFont)).Width(); else { switch( nCol ) @@ -1043,7 +1043,7 @@ void OFieldDescControl::SetPosSize( VclPtr<Control> const & rControl, long nRow, rControl->SetSizePixel( aSize ); aSize = rControl->GetSizePixel( ); - const sal_Int32 nControl_Spacing_y = LogicToPixel(Size(0, CONTROL_SPACING_Y),MapUnit::MapAppFont).Height(); + const sal_Int32 nControl_Spacing_y = LogicToPixel(Size(0, CONTROL_SPACING_Y), MapMode(MapUnit::MapAppFont)).Height(); aPosition.Y() += ((nRow+1)*nControl_Spacing_y) + (nRow*nControlHeight); diff --git a/dbaccess/source/ui/control/RelationControl.cxx b/dbaccess/source/ui/control/RelationControl.cxx index 45e199234dc8..1129015ac905 100644 --- a/dbaccess/source/ui/control/RelationControl.cxx +++ b/dbaccess/source/ui/control/RelationControl.cxx @@ -434,7 +434,7 @@ namespace dbaui Size ORelationControl::GetOptimalSize() const { - return LogicToPixel(Size(140, 80), MapUnit::MapAppFont); + return LogicToPixel(Size(140, 80), MapMode(MapUnit::MapAppFont)); } // class OTableListBoxControl diff --git a/dbaccess/source/ui/control/VertSplitView.cxx b/dbaccess/source/ui/control/VertSplitView.cxx index 7938f1be137b..b12b1c9be94f 100644 --- a/dbaccess/source/ui/control/VertSplitView.cxx +++ b/dbaccess/source/ui/control/VertSplitView.cxx @@ -155,7 +155,7 @@ void OSplitterView::setSplitter(Splitter* _pSplitter) m_pSplitter = _pSplitter; if ( m_pSplitter ) { - m_pSplitter->SetSplitPosPixel( LogicToPixel( Size( SPLITTER_WIDTH, 0 ), MapUnit::MapAppFont ).Width() ); + m_pSplitter->SetSplitPosPixel(LogicToPixel(Size(SPLITTER_WIDTH, 0), MapMode(MapUnit::MapAppFont)).Width()); m_pSplitter->SetSplitHdl( LINK(this, OSplitterView, SplitHdl) ); m_pSplitter->Show(); LINK( this, OSplitterView, SplitHdl ).Call(m_pSplitter); |