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 /svtools | |
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 'svtools')
-rw-r--r-- | svtools/source/brwbox/brwbox2.cxx | 16 | ||||
-rw-r--r-- | svtools/source/contnr/fileview.cxx | 2 | ||||
-rw-r--r-- | svtools/source/control/roadmap.cxx | 8 | ||||
-rw-r--r-- | svtools/source/dialogs/roadmapwizard.cxx | 2 | ||||
-rw-r--r-- | svtools/source/dialogs/wizardmachine.cxx | 10 | ||||
-rw-r--r-- | svtools/source/dialogs/wizdlg.cxx | 2 | ||||
-rw-r--r-- | svtools/source/filter/DocumentToGraphicRenderer.cxx | 2 | ||||
-rw-r--r-- | svtools/source/filter/exportdialog.cxx | 9 | ||||
-rw-r--r-- | svtools/source/graphic/descriptor.cxx | 5 | ||||
-rw-r--r-- | svtools/source/graphic/grfmgr.cxx | 6 | ||||
-rw-r--r-- | svtools/source/graphic/provider.cxx | 8 | ||||
-rw-r--r-- | svtools/source/misc/embedhlp.cxx | 2 | ||||
-rw-r--r-- | svtools/source/misc/transfer.cxx | 6 | ||||
-rw-r--r-- | svtools/source/table/tablecontrol_impl.cxx | 10 | ||||
-rw-r--r-- | svtools/source/uno/svtxgridcontrol.cxx | 4 | ||||
-rw-r--r-- | svtools/source/uno/wizard/wizardshell.cxx | 2 |
16 files changed, 49 insertions, 45 deletions
diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx index c73f3695838f..4e341b72dbf4 100644 --- a/svtools/source/brwbox/brwbox2.cxx +++ b/svtools/source/brwbox/brwbox2.cxx @@ -670,8 +670,8 @@ void BrowseBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, // (as it is based on the settings of our data window, not the foreign device) if (!nDataRowHeight) ImpGetDataRowHeight(); - long nHeightLogic = PixelToLogic(Size(0, nDataRowHeight), MapUnit::Map10thMM).Height(); - long nForeignHeightPixel = pDev->LogicToPixel(Size(0, nHeightLogic), MapUnit::Map10thMM).Height(); + long nHeightLogic = PixelToLogic(Size(0, nDataRowHeight), MapMode(MapUnit::Map10thMM)).Height(); + long nForeignHeightPixel = pDev->LogicToPixel(Size(0, nHeightLogic), MapMode(MapUnit::Map10thMM)).Height(); long nOriginalHeight = nDataRowHeight; nDataRowHeight = nForeignHeightPixel; @@ -682,8 +682,8 @@ void BrowseBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, { BrowserColumn* pCurrent = pCols[ nPos ]; - long nWidthLogic = PixelToLogic(Size(pCurrent->Width(), 0), MapUnit::Map10thMM).Width(); - long nForeignWidthPixel = pDev->LogicToPixel(Size(nWidthLogic, 0), MapUnit::Map10thMM).Width(); + long nWidthLogic = PixelToLogic(Size(pCurrent->Width(), 0), MapMode(MapUnit::Map10thMM)).Width(); + long nForeignWidthPixel = pDev->LogicToPixel(Size(nWidthLogic, 0), MapMode(MapUnit::Map10thMM)).Width(); pCurrent->SetWidth(nForeignWidthPixel, GetZoom()); if ( pBar ) @@ -700,8 +700,8 @@ void BrowseBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, if ( pBar ) { // the title height with respect to the font set for the given device - long nTitleHeight = PixelToLogic(Size(0, GetTitleHeight()), MapUnit::Map10thMM).Height(); - nTitleHeight = pDev->LogicToPixel(Size(0, nTitleHeight), MapUnit::Map10thMM).Height(); + long nTitleHeight = PixelToLogic(Size(0, GetTitleHeight()), MapMode(MapUnit::Map10thMM)).Height(); + nTitleHeight = pDev->LogicToPixel(Size(0, nTitleHeight), MapMode(MapUnit::Map10thMM)).Height(); BrowserColumn* pFirstCol = !pCols.empty() ? pCols[ 0 ] : nullptr; @@ -761,8 +761,8 @@ void BrowseBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, { BrowserColumn* pCurrent = pCols[ nPos ]; - long nForeignWidthLogic = pDev->PixelToLogic(Size(pCurrent->Width(), 0), MapUnit::Map10thMM).Width(); - long nWidthPixel = LogicToPixel(Size(nForeignWidthLogic, 0), MapUnit::Map10thMM).Width(); + long nForeignWidthLogic = pDev->PixelToLogic(Size(pCurrent->Width(), 0), MapMode(MapUnit::Map10thMM)).Width(); + long nWidthPixel = LogicToPixel(Size(nForeignWidthLogic, 0), MapMode(MapUnit::Map10thMM)).Width(); pCurrent->SetWidth(nWidthPixel, GetZoom()); if ( pBar ) diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index 9e867fd8e258..24853fa6f268 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -999,7 +999,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL makeSvtFileView(VclPtr<vcl::Window Size SvtFileView::GetOptimalSize() const { - return LogicToPixel(Size(208, 50), MapUnit::MapAppFont); + return LogicToPixel(Size(208, 50), MapMode(MapUnit::MapAppFont)); } void SvtFileView::SetViewMode( FileViewMode eMode ) diff --git a/svtools/source/control/roadmap.cxx b/svtools/source/control/roadmap.cxx index c6e60546c5ca..4cce5aec37ec 100644 --- a/svtools/source/control/roadmap.cxx +++ b/svtools/source/control/roadmap.cxx @@ -187,8 +187,8 @@ public: void RoadmapImpl::initItemSize() { Size aLabelSize( m_rAntiImpl.GetOutputSizePixel() ); - 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(); + aLabelSize.Height() = m_rAntiImpl.LogicToPixel(Size(0, LABELBASEMAPHEIGHT), MapMode(MapUnit::MapAppFont)).Height(); + aLabelSize.Width() -= m_rAntiImpl.LogicToPixel(Size(2 * ROADMAP_INDENT_X, 0), MapMode(MapUnit::MapAppFont)).Width(); m_aItemSizePixel = aLabelSize; } @@ -570,7 +570,7 @@ void ORoadmap::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& void ORoadmap::DrawHeadline(vcl::RenderContext& rRenderContext) { - Point aTextPos = LogicToPixel(Point(ROADMAP_INDENT_X, 8), MapUnit::MapAppFont); + Point aTextPos = LogicToPixel(Point(ROADMAP_INDENT_X, 8), MapMode(MapUnit::MapAppFont)); Size aOutputSize(GetOutputSizePixel()); @@ -742,7 +742,7 @@ void RoadmapItem::SetPosition(RoadmapItem const * _pOldItem) Point aIDPos; if ( _pOldItem == nullptr ) { - aIDPos = mpID->LogicToPixel( Point( ROADMAP_INDENT_X, ROADMAP_INDENT_Y ), MapUnit::MapAppFont ); + aIDPos = mpID->LogicToPixel(Point(ROADMAP_INDENT_X, ROADMAP_INDENT_Y), MapMode(MapUnit::MapAppFont)); } else { diff --git a/svtools/source/dialogs/roadmapwizard.cxx b/svtools/source/dialogs/roadmapwizard.cxx index a0bcb0409a99..97c808a53f64 100644 --- a/svtools/source/dialogs/roadmapwizard.cxx +++ b/svtools/source/dialogs/roadmapwizard.cxx @@ -133,7 +133,7 @@ namespace svt m_pImpl->pRoadmap->SetPosPixel( Point( 0, 0 ) ); m_pImpl->pRoadmap->SetItemSelectHdl( LINK( this, RoadmapWizard, OnRoadmapItemSelected ) ); - Size aRoadmapSize =( LogicToPixel( Size( 85, 0 ), MapUnit::MapAppFont ) ); + Size aRoadmapSize = LogicToPixel(Size(85, 0), MapMode(MapUnit::MapAppFont)); aRoadmapSize.Height() = GetSizePixel().Height(); m_pImpl->pRoadmap->SetSizePixel( aRoadmapSize ); diff --git a/svtools/source/dialogs/wizardmachine.cxx b/svtools/source/dialogs/wizardmachine.cxx index 57ad496aab1f..b559d58e9e3e 100644 --- a/svtools/source/dialogs/wizardmachine.cxx +++ b/svtools/source/dialogs/wizardmachine.cxx @@ -125,7 +125,7 @@ namespace svt if (_nButtonFlags & WizardButtonFlags::HELP) { m_pHelp= VclPtr<HelpButton>::Create(this, WB_TABSTOP); - m_pHelp->SetSizePixel( LogicToPixel( Size( 50, 14 ), MapUnit::MapAppFont ) ); + m_pHelp->SetSizePixel(LogicToPixel(Size(50, 14), MapMode(MapUnit::MapAppFont))); m_pHelp->Show(); AddButton( m_pHelp, WIZARDDIALOG_BUTTON_STDOFFSET_X); } @@ -135,7 +135,7 @@ namespace svt { m_pPrevPage = VclPtr<PushButton>::Create(this, WB_TABSTOP); m_pPrevPage->SetHelpId( HID_WIZARD_PREVIOUS ); - m_pPrevPage->SetSizePixel( LogicToPixel( Size( 50, 14 ), MapUnit::MapAppFont ) ); + m_pPrevPage->SetSizePixel(LogicToPixel(Size(50, 14), MapMode(MapUnit::MapAppFont))); m_pPrevPage->SetText(SvtResId(STR_WIZDLG_PREVIOUS)); m_pPrevPage->Show(); m_pPrevPage->set_id("previous"); @@ -153,7 +153,7 @@ namespace svt { m_pNextPage = VclPtr<PushButton>::Create(this, WB_TABSTOP); m_pNextPage->SetHelpId( HID_WIZARD_NEXT ); - m_pNextPage->SetSizePixel( LogicToPixel( Size( 50, 14 ), MapUnit::MapAppFont ) ); + m_pNextPage->SetSizePixel(LogicToPixel(Size(50, 14), MapMode(MapUnit::MapAppFont))); m_pNextPage->SetText(SvtResId(STR_WIZDLG_NEXT)); m_pNextPage->Show(); m_pNextPage->set_id("next"); @@ -167,7 +167,7 @@ namespace svt if (_nButtonFlags & WizardButtonFlags::FINISH) { m_pFinish = VclPtr<OKButton>::Create(this, WB_TABSTOP); - m_pFinish->SetSizePixel( LogicToPixel( Size( 50, 14 ), MapUnit::MapAppFont ) ); + m_pFinish->SetSizePixel(LogicToPixel(Size(50, 14), MapMode(MapUnit::MapAppFont))); m_pFinish->SetText(SvtResId(STR_WIZDLG_FINISH)); m_pFinish->Show(); m_pFinish->set_id("finish"); @@ -180,7 +180,7 @@ namespace svt if (_nButtonFlags & WizardButtonFlags::CANCEL) { m_pCancel = VclPtr<CancelButton>::Create(this, WB_TABSTOP); - m_pCancel->SetSizePixel( LogicToPixel( Size( 50, 14 ), MapUnit::MapAppFont ) ); + m_pCancel->SetSizePixel(LogicToPixel(Size(50, 14), MapMode(MapUnit::MapAppFont))); m_pCancel->Show(); AddButton( m_pCancel, WIZARDDIALOG_BUTTON_STDOFFSET_X ); diff --git a/svtools/source/dialogs/wizdlg.cxx b/svtools/source/dialogs/wizdlg.cxx index 386ee9ac1836..7694f7f6add6 100644 --- a/svtools/source/dialogs/wizdlg.cxx +++ b/svtools/source/dialogs/wizdlg.cxx @@ -230,7 +230,7 @@ void WizardDialog::ImplPosCtrls() long WizardDialog::LogicalCoordinateToPixel(int iCoordinate){ - Size aLocSize = LogicToPixel(Size( iCoordinate, 0 ), MapUnit::MapAppFont ); + Size aLocSize = LogicToPixel(Size(iCoordinate, 0), MapMode(MapUnit::MapAppFont)); int iPixelCoordinate = aLocSize.Width(); return iPixelCoordinate; } diff --git a/svtools/source/filter/DocumentToGraphicRenderer.cxx b/svtools/source/filter/DocumentToGraphicRenderer.cxx index 33ac961f0928..b5274078e3b1 100644 --- a/svtools/source/filter/DocumentToGraphicRenderer.cxx +++ b/svtools/source/filter/DocumentToGraphicRenderer.cxx @@ -96,7 +96,7 @@ DocumentToGraphicRenderer::~DocumentToGraphicRenderer() Size DocumentToGraphicRenderer::getDocumentSizeInPixels(sal_Int32 nCurrentPage) { Size aSize100mm = getDocumentSizeIn100mm(nCurrentPage); - return Application::GetDefaultDevice()->LogicToPixel( aSize100mm, MapUnit::Map100thMM ); + return Application::GetDefaultDevice()->LogicToPixel(aSize100mm, MapMode(MapUnit::Map100thMM)); } bool DocumentToGraphicRenderer::hasSelection() const diff --git a/svtools/source/filter/exportdialog.cxx b/svtools/source/filter/exportdialog.cxx index 7f6d7652de77..b7f61c020683 100644 --- a/svtools/source/filter/exportdialog.cxx +++ b/svtools/source/filter/exportdialog.cxx @@ -664,7 +664,7 @@ ExportDialog::ExportDialog(FltCallDialogParameter& rPara, mnFormat = GetFilterFormat( maExt ); - Size aResolution( Application::GetDefaultDevice()->LogicToPixel( Size( 100, 100 ), MapUnit::MapCM ) ); + Size aResolution( Application::GetDefaultDevice()->LogicToPixel(Size(100, 100), MapMode(MapUnit::MapCM)) ); maResolution.Width = aResolution.Width(); maResolution.Height= aResolution.Height(); @@ -915,7 +915,8 @@ void ExportDialog::updateControls() if ( !mbIsPixelFormat ) { awt::Size aSize100thmm( maSize ); - Size aSize( LogicToLogic( Size( aSize100thmm.Width * 100, aSize100thmm.Height * 100 ), MapUnit::Map100thMM, + Size aSize( LogicToLogic( Size(aSize100thmm.Width * 100, aSize100thmm.Height * 100), + MapMode(MapUnit::Map100thMM), MapMode( GetMapUnit( mpLbSizeX->GetSelectedEntryPos() ) ) ) ); mpMfSizeX->SetValue( aSize.Width() ); mpMfSizeY->SetValue( aSize.Height() ); @@ -1092,7 +1093,7 @@ IMPL_LINK_NOARG(ExportDialog, UpdateHdlMtfSizeX, Edit&, void) sal_Int32 nHeight= static_cast< sal_Int32 >( nWidth * fRatio ); const Size aSource( nWidth, nHeight ); MapMode aSourceMapMode( GetMapUnit( mpLbSizeX->GetSelectedEntryPos() ),Point(), aFract, aFract ); - Size aDest( LogicToLogic( aSource, aSourceMapMode, MapUnit::Map100thMM ) ); + Size aDest( LogicToLogic(aSource, aSourceMapMode, MapMode(MapUnit::Map100thMM)) ); maSize.Width = aDest.Width(); maSize.Height = aDest.Height(); @@ -1124,7 +1125,7 @@ IMPL_LINK_NOARG(ExportDialog, UpdateHdlMtfSizeY, Edit&, void) sal_Int32 nWidth = static_cast< sal_Int32 >( nHeight * fRatio ); const Size aSource( nWidth, nHeight ); MapMode aSourceMapMode( GetMapUnit( mpLbSizeX->GetSelectedEntryPos() ),Point(), aFract, aFract ); - Size aDest( LogicToLogic( aSource, aSourceMapMode, MapUnit::Map100thMM ) ); + Size aDest( LogicToLogic(aSource, aSourceMapMode, MapMode(MapUnit::Map100thMM)) ); maSize.Height = aDest.Height(); maSize.Width = aDest.Width(); diff --git a/svtools/source/graphic/descriptor.cxx b/svtools/source/graphic/descriptor.cxx index 719d650da7c0..54254afe70b3 100644 --- a/svtools/source/graphic/descriptor.cxx +++ b/svtools/source/graphic/descriptor.cxx @@ -348,7 +348,10 @@ void GraphicDescriptor::_getPropertyValues( const comphelper::PropertyMapEntry** { if( mpGraphic->GetPrefMapMode().GetMapUnit() != MapUnit::MapPixel ) { - const Size aSizeLog( OutputDevice::LogicToLogic( mpGraphic->GetPrefSize(), mpGraphic->GetPrefMapMode(), MapUnit::Map100thMM ) ); + const Size aSizeLog( OutputDevice::LogicToLogic( + mpGraphic->GetPrefSize(), + mpGraphic->GetPrefMapMode(), + MapMode(MapUnit::Map100thMM)) ); aAWTSize = awt::Size( aSizeLog.Width(), aSizeLog.Height() ); } } diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx index 0664c190c192..fb6848544220 100644 --- a/svtools/source/graphic/grfmgr.cxx +++ b/svtools/source/graphic/grfmgr.cxx @@ -255,7 +255,7 @@ bool GraphicObject::ImplGetCropParams( OutputDevice const * pOut, Point& rPt, Si rClipPolyPoly = aClipPoly; - if( maGraphic.GetPrefMapMode() == MapUnit::MapPixel ) + if (maGraphic.GetPrefMapMode().GetMapUnit() == MapUnit::MapPixel) aSize100 = Application::GetDefaultDevice()->PixelToLogic( maGraphic.GetPrefSize(), aMap100 ); else { @@ -669,7 +669,7 @@ Graphic GraphicObject::GetTransformedGraphic( const Size& rDestSize, const MapMo { GDIMetaFile aMtf( aTransGraphic.GetGDIMetaFile() ); - if( aMapGraph == MapUnit::MapPixel ) + if (aMapGraph.GetMapUnit() == MapUnit::MapPixel) { // crops are in 1/100th mm -> to aMapGraph -> to MapUnit::MapPixel aCropLeftTop = Application::GetDefaultDevice()->LogicToPixel( @@ -742,7 +742,7 @@ Graphic GraphicObject::GetTransformedGraphic( const Size& rDestSize, const MapMo // convert crops to pixel if(rAttr.IsCropped()) { - if( aMapGraph == MapUnit::MapPixel ) + if (aMapGraph.GetMapUnit() == MapUnit::MapPixel) { // crops are in 1/100th mm -> to MapUnit::MapPixel aCropLeftTop = Application::GetDefaultDevice()->LogicToPixel( diff --git a/svtools/source/graphic/provider.cxx b/svtools/source/graphic/provider.cxx index a77fbd2b5cc6..8ac3a885d7ef 100644 --- a/svtools/source/graphic/provider.cxx +++ b/svtools/source/graphic/provider.cxx @@ -495,11 +495,11 @@ void ImplCalculateCropRect( ::Graphic const & rGraphic, const text::GraphicCrop& Size aSize100thMM( 0, 0 ); if( rGraphic.GetPrefMapMode().GetMapUnit() != MapUnit::MapPixel ) { - aSize100thMM = OutputDevice::LogicToLogic( rGraphic.GetPrefSize(), rGraphic.GetPrefMapMode(), MapUnit::Map100thMM ); + aSize100thMM = OutputDevice::LogicToLogic(rGraphic.GetPrefSize(), rGraphic.GetPrefMapMode(), MapMode(MapUnit::Map100thMM)); } else { - aSize100thMM = Application::GetDefaultDevice()->PixelToLogic( rGraphic.GetPrefSize(), MapUnit::Map100thMM ); + aSize100thMM = Application::GetDefaultDevice()->PixelToLogic(rGraphic.GetPrefSize(), MapMode(MapUnit::Map100thMM)); } if ( aSize100thMM.Width() && aSize100thMM.Height() ) { @@ -619,7 +619,7 @@ void ImplApplyFilterData( ::Graphic& rGraphic, uno::Sequence< beans::PropertyVal { ScopedVclPtrInstance< VirtualDevice > aDummyVDev; GDIMetaFile aMtf( rGraphic.GetGDIMetaFile() ); - Size aMtfSize( OutputDevice::LogicToLogic( aMtf.GetPrefSize(), aMtf.GetPrefMapMode(), MapUnit::Map100thMM ) ); + Size aMtfSize( OutputDevice::LogicToLogic(aMtf.GetPrefSize(), aMtf.GetPrefMapMode(), MapMode(MapUnit::Map100thMM)) ); if ( aMtfSize.Width() && aMtfSize.Height() ) { MapMode aNewMapMode( MapUnit::Map100thMM ); @@ -672,7 +672,7 @@ void ImplApplyFilterData( ::Graphic& rGraphic, uno::Sequence< beans::PropertyVal } ::Graphic aGraphic( aBmpEx ); const Size aSize100thmm( aDummyVDev->LogicToPixel( aSize ) ); - Size aSize100thmm2( aDummyVDev->PixelToLogic( aSize100thmm, MapUnit::Map100thMM ) ); + Size aSize100thmm2( aDummyVDev->PixelToLogic(aSize100thmm, MapMode(MapUnit::Map100thMM)) ); ImplApplyBitmapResolution( aGraphic, nImageResolution, aGraphic.GetSizePixel(), awt::Size( aSize100thmm2.Width(), aSize100thmm2.Height() ) ); diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx index 3192073cbd46..5355ce320b3a 100644 --- a/svtools/source/misc/embedhlp.cxx +++ b/svtools/source/misc/embedhlp.cxx @@ -480,7 +480,7 @@ Size EmbeddedObjectRef::GetSize( MapMode const * pTargetMapMode ) const try { - aSourceMapMode = VCLUnoHelper::UnoEmbed2VCLMapUnit(mpImpl->mxObj->getMapUnit(mpImpl->nViewAspect)); + aSourceMapMode = MapMode(VCLUnoHelper::UnoEmbed2VCLMapUnit(mpImpl->mxObj->getMapUnit(mpImpl->nViewAspect))); } catch (const uno::Exception& e) { diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx index ebfe64ff5ad1..17c7983401dc 100644 --- a/svtools/source/misc/transfer.cxx +++ b/svtools/source/misc/transfer.cxx @@ -1618,16 +1618,16 @@ bool TransferableDataHelper::GetBitmapEx( const DataFlavor& rFlavor, BitmapEx& r if(MapUnit::MapPixel != aMapMode.GetMapUnit()) { - const Size aSize(OutputDevice::LogicToLogic(rBmpEx.GetPrefSize(), aMapMode, MapUnit::Map100thMM)); + const Size aSize(OutputDevice::LogicToLogic(rBmpEx.GetPrefSize(), aMapMode, MapMode(MapUnit::Map100thMM))); // #i122388# This wrongly corrects in the given case; changing from 5000 100th mm to // the described 50 cm (which is 50000 100th mm) if((aSize.Width() > 50000) || (aSize.Height() > 50000)) { - rBmpEx.SetPrefMapMode(MapUnit::MapPixel); + rBmpEx.SetPrefMapMode(MapMode(MapUnit::MapPixel)); // #i122388# also adapt size by applying the mew MapMode - const Size aNewSize(OutputDevice::LogicToLogic(aSize, MapUnit::Map100thMM, MapUnit::MapPixel)); + const Size aNewSize(OutputDevice::LogicToLogic(aSize, MapMode(MapUnit::Map100thMM), MapMode(MapUnit::MapPixel))); rBmpEx.SetPrefSize(aNewSize); } } diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index 53c19198f1fa..dd15c46b492b 100644 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -547,15 +547,15 @@ namespace svt { namespace table void TableControl_Impl::impl_ni_updateCachedTableMetrics() { - m_nRowHeightPixel = m_rAntiImpl.LogicToPixel( Size( 0, m_pModel->getRowHeight() ), MapUnit::MapAppFont ).Height(); + m_nRowHeightPixel = m_rAntiImpl.LogicToPixel(Size(0, m_pModel->getRowHeight()), MapMode(MapUnit::MapAppFont)).Height(); m_nColHeaderHeightPixel = 0; if ( m_pModel->hasColumnHeaders() ) - m_nColHeaderHeightPixel = m_rAntiImpl.LogicToPixel( Size( 0, m_pModel->getColumnHeaderHeight() ), MapUnit::MapAppFont ).Height(); + m_nColHeaderHeightPixel = m_rAntiImpl.LogicToPixel(Size(0, m_pModel->getColumnHeaderHeight()), MapMode(MapUnit::MapAppFont)).Height(); m_nRowHeaderWidthPixel = 0; if ( m_pModel->hasRowHeaders() ) - m_nRowHeaderWidthPixel = m_rAntiImpl.LogicToPixel( Size( m_pModel->getRowHeaderWidth(), 0 ), MapUnit::MapAppFont).Width(); + m_nRowHeaderWidthPixel = m_rAntiImpl.LogicToPixel(Size(m_pModel->getRowHeaderWidth(), 0), MapMode(MapUnit::MapAppFont)).Width(); } @@ -1793,13 +1793,13 @@ namespace svt { namespace table long TableControl_Impl::pixelWidthToAppFont( long const i_pixels ) const { - return m_pDataWindow->PixelToLogic( Size( i_pixels, 0 ), MapUnit::MapAppFont ).Width(); + return m_pDataWindow->PixelToLogic(Size(i_pixels, 0), MapMode(MapUnit::MapAppFont)).Width(); } long TableControl_Impl::appFontWidthToPixel( long const i_appFontUnits ) const { - return m_pDataWindow->LogicToPixel( Size( i_appFontUnits, 0 ), MapUnit::MapAppFont ).Width(); + return m_pDataWindow->LogicToPixel(Size(i_appFontUnits, 0), MapMode(MapUnit::MapAppFont)).Width(); } diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index 64561c743601..234b5767af82 100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -212,7 +212,7 @@ void SVTXGridControl::setProperty( const OUString& PropertyName, const Any& aVal sal_Int32 columnHeaderHeight = 0; if ( !aValue.hasValue() ) { - columnHeaderHeight = pTable->PixelToLogic( Size( 0, pTable->GetTextHeight() + 3 ), MapUnit::MapAppFont ).Height(); + columnHeaderHeight = pTable->PixelToLogic(Size(0, pTable->GetTextHeight() + 3), MapMode(MapUnit::MapAppFont)).Height(); } else { @@ -252,7 +252,7 @@ void SVTXGridControl::setProperty( const OUString& PropertyName, const Any& aVal sal_Int32 rowHeight = 0; if ( !aValue.hasValue() ) { - rowHeight = pTable->PixelToLogic( Size( 0, pTable->GetTextHeight() + 3 ), MapUnit::MapAppFont ).Height(); + rowHeight = pTable->PixelToLogic(Size(0, pTable->GetTextHeight() + 3), MapMode(MapUnit::MapAppFont)).Height(); } else { diff --git a/svtools/source/uno/wizard/wizardshell.cxx b/svtools/source/uno/wizard/wizardshell.cxx index ad63261bd229..0fe2faa4a903 100644 --- a/svtools/source/uno/wizard/wizardshell.cxx +++ b/svtools/source/uno/wizard/wizardshell.cxx @@ -184,7 +184,7 @@ namespace svt { namespace uno { // fallback for ill-behaved clients: empty page pPage = VclPtr<TabPage>::Create( this, 0 ); - pPage->SetSizePixel( LogicToPixel( Size( 280, 185 ), MapUnit::MapAppFont ) ); + pPage->SetSizePixel(LogicToPixel(Size(280, 185), MapMode(MapUnit::MapAppFont))); } m_aPageControllers[ pPage ] = pController; |