diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-09-20 16:41:39 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-05 06:51:20 +0000 |
commit | 954f752cf10fc6a8777af2a6a93e496688464687 (patch) | |
tree | 0fc776cdcb6ad9b1d2b9673ac044bb5b4f496972 /sfx2 | |
parent | c1e18e05a53c1d55afe36a887ca25f74f3f1d32d (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 'sfx2')
-rw-r--r-- | sfx2/source/appl/appuno.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/appl/newhelp.cxx | 12 | ||||
-rw-r--r-- | sfx2/source/control/ctrlitem.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/control/dispatch.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/control/unoctitm.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/dialog/dialoghelper.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/dialog/dinfdlg.cxx | 10 | ||||
-rw-r--r-- | sfx2/source/dialog/mgetempl.cxx | 10 | ||||
-rw-r--r-- | sfx2/source/dialog/versdlg.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/doc/graphhelp.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/new.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/doc/objembed.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/doc/objxtor.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/printhelper.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/sfxbasemodel.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/sidebar/SidebarChildWindow.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/view/classificationcontroller.cxx | 2 |
17 files changed, 45 insertions, 45 deletions
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx index d2d4f64a0836..afafe4c8a5d5 100644 --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -205,7 +205,7 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::Sequence<beans::Propert } sal_uInt16 nWhich = rSet.GetPool()->GetWhich(nSlotId); - bool bConvertTwips = ( rSet.GetPool()->GetMetric( nWhich ) == MAP_TWIP ); + bool bConvertTwips = ( rSet.GetPool()->GetMetric( nWhich ) == MapUnit::MapTwip ); pItem->SetWhich( nWhich ); sal_uInt16 nSubCount = pType->nAttribs; @@ -322,7 +322,7 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::Sequence<beans::Propert } sal_uInt16 nWhich = rSet.GetPool()->GetWhich(rArg.nSlotId); - bool bConvertTwips = ( rSet.GetPool()->GetMetric( nWhich ) == MAP_TWIP ); + bool bConvertTwips = ( rSet.GetPool()->GetMetric( nWhich ) == MapUnit::MapTwip ); pItem->SetWhich( nWhich ); const SfxType* pType = rArg.pType; sal_uInt16 nSubCount = pType->nAttribs; @@ -1273,7 +1273,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b { // slot is a property sal_uInt16 nWhich = rSet.GetPool()->GetWhich(nSlotId); - bool bConvertTwips = ( rSet.GetPool()->GetMetric( nWhich ) == MAP_TWIP ); + bool bConvertTwips = ( rSet.GetPool()->GetMetric( nWhich ) == MapUnit::MapTwip ); const SfxPoolItem* pItem = rSet.GetItem<SfxPoolItem>(nWhich, false); if ( pItem ) //??? { @@ -1325,7 +1325,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b { const SfxFormalArgument &rArg = pSlot->GetFormalArgument( nArg ); sal_uInt16 nWhich = rSet.GetPool()->GetWhich( rArg.nSlotId ); - bool bConvertTwips = ( rSet.GetPool()->GetMetric( nWhich ) == MAP_TWIP ); + bool bConvertTwips = ( rSet.GetPool()->GetMetric( nWhich ) == MapUnit::MapTwip ); const SfxPoolItem* pItem = rSet.GetItem<SfxPoolItem>(nWhich, false); if ( pItem ) //??? { diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index 0242633f5658..e7b7dd4ed3d2 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -437,7 +437,7 @@ ContentTabPage_Impl::ContentTabPage_Impl(vcl::Window* pParent, SfxHelpIndexWindo "sfx/ui/helpcontentpage.ui") { get(m_pContentBox, "content"); - Size aSize(LogicToPixel(Size(108 , 188), MAP_APPFONT)); + Size aSize(LogicToPixel(Size(108 , 188), MapUnit::MapAppFont)); m_pContentBox->set_width_request(aSize.Width()); m_pContentBox->set_height_request(aSize.Height()); } @@ -545,7 +545,7 @@ IndexTabPage_Impl::IndexTabPage_Impl(vcl::Window* pParent, SfxHelpIndexWindow_Im , bIsActivated(false) { get(m_pIndexCB, "terms"); - Size aSize(LogicToPixel(Size(108, 97), MAP_APPFONT)); + Size aSize(LogicToPixel(Size(108, 97), MapUnit::MapAppFont)); m_pIndexCB->set_width_request(aSize.Width()); m_pIndexCB->set_height_request(aSize.Height()); get(m_pOpenBtn, "display"); @@ -918,7 +918,7 @@ SearchTabPage_Impl::SearchTabPage_Impl(vcl::Window* pParent, SfxHelpIndexWindow_ get(m_pFullWordsCB, "completewords"); get(m_pScopeCB, "headings"); get(m_pResultsLB, "results"); - Size aSize(LogicToPixel(Size(128 , 30), MAP_APPFONT)); + Size aSize(LogicToPixel(Size(128 , 30), MapUnit::MapAppFont)); m_pResultsLB->set_width_request(aSize.Width()); m_pResultsLB->set_height_request(aSize.Height()); get(m_pOpenBtn, "display"); @@ -1268,7 +1268,7 @@ BookmarksTabPage_Impl::BookmarksTabPage_Impl(vcl::Window* pParent, SfxHelpIndexW { get(m_pBookmarksPB, "display"); get(m_pBookmarksBox, "bookmarks"); - Size aSize(LogicToPixel(Size(120 , 200), MAP_APPFONT)); + Size aSize(LogicToPixel(Size(120 , 200), MapUnit::MapAppFont)); m_pBookmarksBox->set_width_request(aSize.Width()); m_pBookmarksBox->set_height_request(aSize.Height()); @@ -2072,7 +2072,7 @@ void SfxHelpTextWindow_Impl::InitOnStartupBox() } // set position of the checkbox - Size a3Size = LogicToPixel( Size( 3, 3 ), MAP_APPFONT ); + Size a3Size = LogicToPixel( Size( 3, 3 ), MapUnit::MapAppFont ); Size aTBSize = aToolBox->GetSizePixel(); Size aCBSize = aOnStartupCB->GetSizePixel(); Point aPnt = aToolBox->GetPosPixel(); @@ -2957,7 +2957,7 @@ SfxHelpWindow_Impl::SfxHelpWindow_Impl( pIndexWin = VclPtr<SfxHelpIndexWindow_Impl>::Create( this ); pIndexWin->SetDoubleClickHdl( LINK( this, SfxHelpWindow_Impl, OpenHdl ) ); pIndexWin->SetSelectFactoryHdl( LINK( this, SfxHelpWindow_Impl, SelectFactoryHdl ) ); - pIndexWin->SetSizePixel(LogicToPixel(Size(120, 200), MAP_APPFONT)); + pIndexWin->SetSizePixel(LogicToPixel(Size(120, 200), MapUnit::MapAppFont)); pIndexWin->Show(); pTextWin = VclPtr<SfxHelpTextWindow_Impl>::Create( this ); Reference < XFrames > xFrames = rFrame->getFrames(); diff --git a/sfx2/source/control/ctrlitem.cxx b/sfx2/source/control/ctrlitem.cxx index 29e6eaf28d6a..94c412faa17b 100644 --- a/sfx2/source/control/ctrlitem.cxx +++ b/sfx2/source/control/ctrlitem.cxx @@ -341,7 +341,7 @@ MapUnit SfxControllerItem::GetCoreMetric() const } SAL_INFO( "sfx.control", "W1: Can not find ItemPool!" ); - return MAP_100TH_MM; + return MapUnit::Map100thMM; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index 9aee901870cd..34619467da70 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -2135,7 +2135,7 @@ SfxItemState SfxDispatcher::QueryState( sal_uInt16 nSID, css::uno::Any& rAny ) sal_uInt16 nSubId( 0 ); SfxItemPool& rPool = pShell->GetPool(); sal_uInt16 nWhich = rPool.GetWhich( nSID ); - if ( rPool.GetMetric( nWhich ) == MAP_TWIP ) + if ( rPool.GetMetric( nWhich ) == MapUnit::MapTwip ) nSubId |= CONVERT_TWIPS; pItem->QueryValue( aState, (sal_uInt8)nSubId ); } diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index 49d9c40a1858..4deb98744156 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -665,7 +665,7 @@ void SAL_CALL SfxDispatchController_Impl::dispatch( const css::util::URL& aURL, bool bSuccess = false; const SfxPoolItem* pItem = nullptr; - MapUnit eMapUnit( MAP_100TH_MM ); + MapUnit eMapUnit( MapUnit::Map100thMM ); // Extra scope so that aInternalSet is destroyed before // rListener->dispatchFinished potentially calls @@ -775,7 +775,7 @@ void SAL_CALL SfxDispatchController_Impl::dispatch( const css::util::URL& aURL, if ( bSuccess && pItem && dynamic_cast< const SfxVoidItem *>( pItem ) == nullptr ) { sal_uInt16 nSubId( 0 ); - if ( eMapUnit == MAP_TWIP ) + if ( eMapUnit == MapUnit::MapTwip ) nSubId |= CONVERT_TWIPS; pItem->QueryValue( aEvent.Result, (sal_uInt8)nSubId ); } @@ -892,7 +892,7 @@ void SfxDispatchController_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eSt { // Retrieve metric from pool to have correct sub ID when calling QueryValue sal_uInt16 nSubId( 0 ); - MapUnit eMapUnit( MAP_100TH_MM ); + MapUnit eMapUnit( MapUnit::Map100thMM ); // retrieve the core metric // it's enough to check the objectshell, the only shell that does not use the pool of the document @@ -906,7 +906,7 @@ void SfxDispatchController_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eSt eMapUnit = GetCoreMetric( pShell->GetPool(), nSID ); } - if ( eMapUnit == MAP_TWIP ) + if ( eMapUnit == MapUnit::MapTwip ) nSubId |= CONVERT_TWIPS; pState->QueryValue( aState, (sal_uInt8)nSubId ); diff --git a/sfx2/source/dialog/dialoghelper.cxx b/sfx2/source/dialog/dialoghelper.cxx index fe0044eb91cf..a5657d8b9e6a 100644 --- a/sfx2/source/dialog/dialoghelper.cxx +++ b/sfx2/source/dialog/dialoghelper.cxx @@ -55,22 +55,22 @@ void setPreviewsToSamePlace(vcl::Window *pParent, VclBuilderContainer *pPage) Size getParagraphPreviewOptimalSize(const vcl::Window *pReference) { - return pReference->LogicToPixel(Size(68 , 112), MAP_APPFONT); + return pReference->LogicToPixel(Size(68 , 112), MapUnit::MapAppFont); } Size getDrawPreviewOptimalSize(const vcl::Window *pReference) { - return pReference->LogicToPixel(Size(88, 42), MAP_APPFONT); + return pReference->LogicToPixel(Size(88, 42), MapUnit::MapAppFont); } Size getPreviewStripSize(const vcl::Window *pReference) { - return pReference->LogicToPixel(Size(70 , 40), MapMode(MAP_APPFONT)); + return pReference->LogicToPixel(Size(70 , 40), MapMode(MapUnit::MapAppFont)); } Size getPreviewOptionsSize(const vcl::Window *pReference) { - return pReference->LogicToPixel(Size(70 , 27), MapMode(MAP_APPFONT)); + return pReference->LogicToPixel(Size(70 , 27), MapMode(MapUnit::MapAppFont)); } OUString getWidestTime(const LocaleDataWrapper& rWrapper) diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 6164b5edbb83..3d28a70c59ce 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -1387,7 +1387,7 @@ IMPL_LINK_NOARG(CustomPropertiesEditButton, ClickHdl, Button*, void) void CustomPropertiesYesNoButton::Resize() { const long nWidth = GetSizePixel().Width(); - const long n3Width = LogicToPixel( Size( 3, 3 ), MAP_APPFONT ).Width(); + const long n3Width = LogicToPixel( Size( 3, 3 ), MapUnit::MapAppFont ).Width(); const long nNewWidth = ( nWidth / 2 ) - n3Width - 2; Size aSize = m_aYesButton->GetSizePixel(); const long nDelta = aSize.Width() - nNewWidth; @@ -1461,14 +1461,14 @@ CustomPropertiesWindow::CustomPropertiesWindow(vcl::Window* pParent, m_aNumberFormatter( ::comphelper::getProcessComponentContext(), Application::GetSettings().GetLanguageTag().getLanguageType() ) { - Point aPos(LogicToPixel(Point(159, 2), MAP_APPFONT)); + Point aPos(LogicToPixel(Point(159, 2), MapUnit::MapAppFont)); m_aEditButton->SetPosSizePixel(aPos, - LogicToPixel(Size(RSC_CD_TEXTBOX_HEIGHT, RSC_CD_TEXTBOX_HEIGHT), MAP_APPFONT)); + LogicToPixel(Size(RSC_CD_TEXTBOX_HEIGHT, RSC_CD_TEXTBOX_HEIGHT), MapUnit::MapAppFont)); - m_aRemoveButton->SetSizePixel(LogicToPixel(Size(RSC_CD_PUSHBUTTON_HEIGHT, RSC_CD_PUSHBUTTON_HEIGHT), MAP_APPFONT)); + m_aRemoveButton->SetSizePixel(LogicToPixel(Size(RSC_CD_PUSHBUTTON_HEIGHT, RSC_CD_PUSHBUTTON_HEIGHT), MapUnit::MapAppFont)); - Size aSize(LogicToPixel(Size(61, RSC_CD_TEXTBOX_HEIGHT), MAP_APPFONT)); + Size aSize(LogicToPixel(Size(61, RSC_CD_TEXTBOX_HEIGHT), MapUnit::MapAppFont)); m_aValueEdit->SetPosSizePixel(aPos, aSize); m_aDurationField->SetPosSizePixel(aPos, aSize); m_aDateField->SetPosSizePixel(aPos, aSize); diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx index 6c8a29f9069c..978cf37ff0c8 100644 --- a/sfx2/source/dialog/mgetempl.cxx +++ b/sfx2/source/dialog/mgetempl.cxx @@ -311,7 +311,7 @@ void SfxManageStyleSheetPage::SetDescriptionText_Impl() */ { - MapUnit eUnit = MAP_CM; + MapUnit eUnit = MapUnit::MapCM; FieldUnit eFieldUnit( FUNIT_CM ); SfxModule* pModule = SfxModule::GetActiveModule(); if ( pModule ) @@ -323,15 +323,15 @@ void SfxManageStyleSheetPage::SetDescriptionText_Impl() switch ( eFieldUnit ) { - case FUNIT_MM: eUnit = MAP_MM; break; + case FUNIT_MM: eUnit = MapUnit::MapMM; break; case FUNIT_CM: case FUNIT_M: - case FUNIT_KM: eUnit = MAP_CM; break; + case FUNIT_KM: eUnit = MapUnit::MapCM; break; case FUNIT_POINT: - case FUNIT_PICA: eUnit = MAP_POINT; break; + case FUNIT_PICA: eUnit = MapUnit::MapPoint; break; case FUNIT_INCH: case FUNIT_FOOT: - case FUNIT_MILE: eUnit = MAP_INCH; break; + case FUNIT_MILE: eUnit = MapUnit::MapInch; break; default: OSL_FAIL( "non supported field unit" ); diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx index cb4dd57062a0..1044c61861a9 100644 --- a/sfx2/source/dialog/versdlg.cxx +++ b/sfx2/source/dialog/versdlg.cxx @@ -188,7 +188,7 @@ void SfxVersionsTabListBox_Impl::setColSizes() long aStaticTabs[] = { 3, 0, 0, 0 }; aStaticTabs[2] = nMax; aStaticTabs[3] = nMax + nMaxAuthorWidth; - SvSimpleTable::SetTabs(aStaticTabs, MAP_PIXEL); + SvSimpleTable::SetTabs(aStaticTabs, MapUnit::MapPixel); } SfxVersionDialog::SfxVersionDialog ( SfxViewFrame* pVwFrame, bool bIsSaveVersionOnClose ) @@ -207,7 +207,7 @@ SfxVersionDialog::SfxVersionDialog ( SfxViewFrame* pVwFrame, bool bIsSaveVersion SvSimpleTableContainer *pContainer = get<SvSimpleTableContainer>("versions"); Size aControlSize(260, 114); - aControlSize = pContainer->LogicToPixel(aControlSize, MAP_APPFONT); + aControlSize = pContainer->LogicToPixel(aControlSize, MapUnit::MapAppFont); pContainer->set_width_request(aControlSize.Width()); pContainer->set_height_request(aControlSize.Height()); @@ -540,7 +540,7 @@ SfxCmisVersionsDialog::SfxCmisVersionsDialog ( SfxViewFrame* pVwFrame ) SvSimpleTableContainer *pContainer = get<SvSimpleTableContainer>("versions"); Size aControlSize(260, 114); - aControlSize = pContainer->LogicToPixel(aControlSize, MAP_APPFONT); + aControlSize = pContainer->LogicToPixel(aControlSize, MapUnit::MapAppFont); pContainer->set_width_request(aControlSize.Width()); pContainer->set_height_request(aControlSize.Height()); diff --git a/sfx2/source/doc/graphhelp.cxx b/sfx2/source/doc/graphhelp.cxx index ac9999a95437..ba871c15a84c 100644 --- a/sfx2/source/doc/graphhelp.cxx +++ b/sfx2/source/doc/graphhelp.cxx @@ -142,7 +142,7 @@ void* GraphicHelper::getWinMetaFileFromGDI_Impl( const GDIMetaFile* pGDIMeta, co pMF->mm = MM_ANISOTROPIC; MapMode aMetaMode = pGDIMeta->GetPrefMapMode(); - MapMode aWinMode( MAP_100TH_MM ); + MapMode aWinMode( MapUnit::Map100thMM ); if ( aWinMode == pGDIMeta->GetPrefMapMode() ) { diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx index 085421d81cf4..0a7f60b219e0 100644 --- a/sfx2/source/doc/new.cxx +++ b/sfx2/source/doc/new.cxx @@ -62,7 +62,7 @@ void SfxPreviewBase_Impl::Resize() Size SfxPreviewBase_Impl::GetOptimalSize() const { - return LogicToPixel(Size(127, 129), MAP_APPFONT); + return LogicToPixel(Size(127, 129), MapUnit::MapAppFont); } void SfxPreviewWin_Impl::ImpPaint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/, GDIMetaFile* pFile) @@ -350,7 +350,7 @@ SfxNewFileDialog_Impl::SfxNewFileDialog_Impl( pAntiImplP->get(m_pRegionLb, "categories"); pAntiImplP->get(m_pTemplateLb, "templates"); - Size aSize(m_pRegionLb->LogicToPixel(Size(127, 72), MAP_APPFONT)); + Size aSize(m_pRegionLb->LogicToPixel(Size(127, 72), MapUnit::MapAppFont)); m_pRegionLb->set_width_request(aSize.Width()); m_pRegionLb->set_height_request(aSize.Height()); m_pTemplateLb->set_width_request(aSize.Width()); diff --git a/sfx2/source/doc/objembed.cxx b/sfx2/source/doc/objembed.cxx index 66a30a052029..e190f3a05760 100644 --- a/sfx2/source/doc/objembed.cxx +++ b/sfx2/source/doc/objembed.cxx @@ -100,7 +100,7 @@ Rectangle SfxObjectShell::GetVisArea( sal_uInt16 nAspect ) const { Rectangle aRect; aRect.SetSize( OutputDevice::LogicToLogic( Size( 5000, 5000 ), - MAP_100TH_MM, GetMapUnit() ) ); + MapUnit::Map100thMM, GetMapUnit() ) ); return aRect; } return Rectangle(); @@ -162,7 +162,7 @@ void SfxObjectShell::FillTransferableObjectDescriptor( TransferableObjectDescrip rDesc.mnViewAspect = ASPECT_CONTENT; rDesc.mnOle2Misc = GetMiscStatus(); - rDesc.maSize = OutputDevice::LogicToLogic( GetVisArea().GetSize(), GetMapUnit(), MAP_100TH_MM ); + rDesc.maSize = OutputDevice::LogicToLogic( GetVisArea().GetSize(), GetMapUnit(), MapUnit::Map100thMM ); rDesc.maDragStartPos = Point(); rDesc.maDisplayName.clear(); } diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx index c68e2dcc83ef..9150ef6b0645 100644 --- a/sfx2/source/doc/objxtor.cxx +++ b/sfx2/source/doc/objxtor.cxx @@ -254,7 +254,7 @@ SfxObjectShell_Impl::SfxObjectShell_Impl( SfxObjectShell& _rDocShell ) ,bDisposing( false ) ,m_bEnableSetModified( true ) ,m_bIsModified( false ) - ,m_nMapUnit( MAP_100TH_MM ) + ,m_nMapUnit( MapUnit::Map100thMM ) ,m_bCreateTempStor( false ) ,m_bIsInit( false ) ,m_bIncomplEncrWarnShown( false ) diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx index a54bc2dfa863..29c9458acf8b 100644 --- a/sfx2/source/doc/printhelper.cxx +++ b/sfx2/source/doc/printhelper.cxx @@ -436,7 +436,7 @@ void SfxPrintHelper::impl_setPrinter(const uno::Sequence< beans::PropertyValue > { // Bug 56929 - MapMode of 100mm which recalculated when // the device is set. Additionally only set if they were really changed. - aSetPaperSize = pPrinter->LogicToPixel( aSetPaperSize, MAP_100TH_MM ); + aSetPaperSize = pPrinter->LogicToPixel( aSetPaperSize, MapUnit::Map100thMM ); if( aSetPaperSize != pPrinter->GetPaperSizePixel() ) { pPrinter->SetPaperSizeUser( pPrinter->PixelToLogic( aSetPaperSize ) ); diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index a08c3543017b..a4c1c25f424d 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -892,7 +892,7 @@ sal_Bool SAL_CALL SfxBaseModel::attachResource( const OUString& if ( ( aArgs.get( "WinExtent" ) >>= aWinExtent )&& ( aWinExtent.getLength() == 4 ) ) { Rectangle aVisArea( aWinExtent[0], aWinExtent[1], aWinExtent[2], aWinExtent[3] ); - aVisArea = OutputDevice::LogicToLogic( aVisArea, MAP_100TH_MM, pObjectShell->GetMapUnit() ); + aVisArea = OutputDevice::LogicToLogic( aVisArea, MapUnit::Map100thMM, pObjectShell->GetMapUnit() ); pObjectShell->SetVisArea( aVisArea ); } @@ -983,7 +983,7 @@ Sequence< beans::PropertyValue > SAL_CALL SfxBaseModel::getArgs() throw(RuntimeE // We can store it now to overwrite an old value // since it is not from ItemSet Rectangle aTmpRect = m_pData->m_pObjectShell->GetVisArea( ASPECT_CONTENT ); - aTmpRect = OutputDevice::LogicToLogic( aTmpRect, m_pData->m_pObjectShell->GetMapUnit(), MAP_100TH_MM ); + aTmpRect = OutputDevice::LogicToLogic( aTmpRect, m_pData->m_pObjectShell->GetMapUnit(), MapUnit::Map100thMM ); Sequence< sal_Int32 > aRectSeq(4); aRectSeq[0] = aTmpRect.Left(); @@ -1950,7 +1950,7 @@ Any SAL_CALL SfxBaseModel::getTransferData( const datatransfer::DataFlavor& aFla Size aSize = m_pData->m_pObjectShell->GetVisArea().GetSize(); MapUnit aMapUnit = m_pData->m_pObjectShell->GetMapUnit(); - aDesc.maSize = OutputDevice::LogicToLogic( aSize, aMapUnit, MAP_100TH_MM ); + aDesc.maSize = OutputDevice::LogicToLogic( aSize, aMapUnit, MapUnit::Map100thMM ); aDesc.maDragStartPos = Point(); aDesc.maDisplayName.clear(); diff --git a/sfx2/source/sidebar/SidebarChildWindow.cxx b/sfx2/source/sidebar/SidebarChildWindow.cxx index 8c3b7387b893..bdc9aa102d92 100644 --- a/sfx2/source/sidebar/SidebarChildWindow.cxx +++ b/sfx2/source/sidebar/SidebarChildWindow.cxx @@ -71,7 +71,7 @@ sal_Int32 SidebarChildWindow::GetDefaultWidth (vcl::Window* pWindow) // Width of the paragraph panel. const static sal_Int32 nMaxPropertyPageWidth (115); - return pWindow->LogicToPixel(Point(nMaxPropertyPageWidth,1), MAP_APPFONT).X() + return pWindow->LogicToPixel(Point(nMaxPropertyPageWidth,1), MapUnit::MapAppFont).X() + TabBar::GetDefaultWidth() * pWindow->GetDPIScaleFactor(); } else diff --git a/sfx2/source/view/classificationcontroller.cxx b/sfx2/source/view/classificationcontroller.cxx index 01ada5970bbb..78b2b0dc2dc0 100644 --- a/sfx2/source/view/classificationcontroller.cxx +++ b/sfx2/source/view/classificationcontroller.cxx @@ -341,7 +341,7 @@ void ClassificationControl::SetOptimalSize() { // Same as SvxColorDockingWindow. const Size aLogicalAttrSize(150 * m_pLabels.size(), 0); - Size aSize(LogicToPixel(aLogicalAttrSize,MAP_APPFONT)); + Size aSize(LogicToPixel(aLogicalAttrSize,MapUnit::MapAppFont)); auto& pLabel = m_pLabels[SfxClassificationPolicyType::IntellectualProperty]; auto& pCategories = m_pCategories[SfxClassificationPolicyType::IntellectualProperty]; |