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 /reportdesign/source | |
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 'reportdesign/source')
-rw-r--r-- | reportdesign/source/ui/dlg/Condition.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/dlg/GroupsSorting.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/dlg/Navigator.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/misc/UITools.cxx | 4 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ReportWindow.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ScrollHelper.cxx | 2 |
6 files changed, 7 insertions, 7 deletions
diff --git a/reportdesign/source/ui/dlg/Condition.cxx b/reportdesign/source/ui/dlg/Condition.cxx index f941e92792ab..9545b26cbb16 100644 --- a/reportdesign/source/ui/dlg/Condition.cxx +++ b/reportdesign/source/ui/dlg/Condition.cxx @@ -405,7 +405,7 @@ void Condition::updateToolbar(const uno::Reference< report::XReportControlFormat { vcl::Font aBaseFont( Application::GetDefaultDevice()->GetSettings().GetStyleSettings().GetAppFont() ); SvxFont aFont( VCLUnoHelper::CreateFont( _xReportControlFormat->getFontDescriptor(), aBaseFont ) ); - aFont.SetFontHeight( OutputDevice::LogicToLogic( Size( 0, (sal_Int32)aFont.GetFontHeight() ), MapUnit::MapPoint, MapUnit::MapTwip ).Height()); + aFont.SetFontHeight(OutputDevice::LogicToLogic(Size(0, aFont.GetFontHeight()), MapMode(MapUnit::MapPoint), MapMode(MapUnit::MapTwip)).Height()); aFont.SetEmphasisMark( static_cast< FontEmphasisMark >( _xReportControlFormat->getControlTextEmphasis() ) ); aFont.SetRelief( static_cast< FontRelief >( _xReportControlFormat->getCharRelief() ) ); aFont.SetColor( _xReportControlFormat->getCharColor() ); diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx index cc0639049611..624496ff6698 100644 --- a/reportdesign/source/ui/dlg/GroupsSorting.cxx +++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx @@ -795,7 +795,7 @@ IMPL_LINK_NOARG( OFieldExpressionControl, DelayedDelete, void*, void ) Size OFieldExpressionControl::GetOptimalSize() const { - return LogicToPixel(Size(106, 75), MapUnit::MapAppFont); + return LogicToPixel(Size(106, 75), MapMode(MapUnit::MapAppFont)); } // class OGroupsSortingDialog diff --git a/reportdesign/source/ui/dlg/Navigator.cxx b/reportdesign/source/ui/dlg/Navigator.cxx index 4b52e80c4d31..4afc637bb944 100644 --- a/reportdesign/source/ui/dlg/Navigator.cxx +++ b/reportdesign/source/ui/dlg/Navigator.cxx @@ -878,7 +878,7 @@ void NavigatorTree::UserData::_disposing(const lang::EventObject& _rSource) Size NavigatorTree::GetOptimalSize() const { - return LogicToPixel(Size(100, 70), MapUnit::MapAppFont); + return LogicToPixel(Size(100, 70), MapMode(MapUnit::MapAppFont)); } // class ONavigatorImpl diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx index 21f1f80a0188..03e51a265d38 100644 --- a/reportdesign/source/ui/misc/UITools.cxx +++ b/reportdesign/source/ui/misc/UITools.cxx @@ -239,7 +239,7 @@ namespace aFontItem.PutValue( uno::makeAny( aControlFont ), 0 ); _rItemSet.Put(aFontItem); - _rItemSet.Put(SvxFontHeightItem(OutputDevice::LogicToLogic(Size(0, (sal_Int32)aFont.GetFontHeight()), MapUnit::MapPoint, MapUnit::MapTwip).Height(),100,_nFontHeight)); + _rItemSet.Put(SvxFontHeightItem(OutputDevice::LogicToLogic(Size(0, aFont.GetFontHeight()), MapMode(MapUnit::MapPoint), MapMode(MapUnit::MapTwip)).Height(), 100, _nFontHeight)); lang::Locale aLocale; switch(_nWhich) { @@ -390,7 +390,7 @@ namespace if ( SfxItemState::SET == _rItemSet.GetItemState( _nFontHeight,true,&pItem) && dynamic_cast< const SvxFontHeightItem *>( pItem ) != nullptr) { const SvxFontHeightItem* pFontItem = static_cast<const SvxFontHeightItem*>(pItem); - aNewFont.SetFontHeight(OutputDevice::LogicToLogic(Size(0, pFontItem->GetHeight()), MapUnit::MapTwip, MapUnit::MapPoint).Height()); + aNewFont.SetFontHeight(OutputDevice::LogicToLogic(Size(0, pFontItem->GetHeight()), MapMode(MapUnit::MapTwip), MapMode(MapUnit::MapPoint)).Height()); } if ( SfxItemState::SET == _rItemSet.GetItemState( _nPosture,true,&pItem) && dynamic_cast< const SvxPostureItem *>( pItem ) != nullptr) { diff --git a/reportdesign/source/ui/report/ReportWindow.cxx b/reportdesign/source/ui/report/ReportWindow.cxx index 636a6fa6637a..97f88c0189d2 100644 --- a/reportdesign/source/ui/report/ReportWindow.cxx +++ b/reportdesign/source/ui/report/ReportWindow.cxx @@ -172,7 +172,7 @@ void OReportWindow::Resize() const Size aTotalOutputSize = GetOutputSizePixel(); Fraction aStartWidth(long(REPORT_STARTMARKER_WIDTH)*m_pView->getController().getZoomValue(),100); - const Point aOffset = LogicToPixel( Point( SECTION_OFFSET, 0 ), MapUnit::MapAppFont ); + const Point aOffset = LogicToPixel(Point(SECTION_OFFSET, 0), MapMode(MapUnit::MapAppFont)); Point aStartPoint((long)aStartWidth + aOffset.X(),0); uno::Reference<report::XReportDefinition> xReportDefinition = getReportView()->getController().getReportDefinition(); const sal_Int32 nPaperWidth = getStyleProperty<awt::Size>(xReportDefinition,PROPERTY_PAPERSIZE).Width; diff --git a/reportdesign/source/ui/report/ScrollHelper.cxx b/reportdesign/source/ui/report/ScrollHelper.cxx index 238fe3be8b83..9d054ea15467 100644 --- a/reportdesign/source/ui/report/ScrollHelper.cxx +++ b/reportdesign/source/ui/report/ScrollHelper.cxx @@ -169,7 +169,7 @@ Size OScrollWindowHelper::ResizeScrollBars() else m_aCornerWin->Hide(); - const Point aOffset = LogicToPixel( Point( SECTION_OFFSET, SECTION_OFFSET ), MapUnit::MapAppFont ); + const Point aOffset = LogicToPixel(Point(SECTION_OFFSET, SECTION_OFFSET), MapMode(MapUnit::MapAppFont)); // resize scrollbars and set their ranges { Fraction aStartWidth(long(REPORT_STARTMARKER_WIDTH*m_pParent->getController().getZoomValue()),100); |