diff options
Diffstat (limited to 'sd/source/ui/view')
-rw-r--r-- | sd/source/ui/view/DocumentRenderer.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/view/ViewShellBase.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/view/drviews8.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/view/drviews9.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/sdview.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/view/sdview3.cxx | 20 | ||||
-rw-r--r-- | sd/source/ui/view/sdview4.cxx | 10 | ||||
-rw-r--r-- | sd/source/ui/view/sdwindow.cxx | 6 |
8 files changed, 31 insertions, 31 deletions
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx index 5361f5abc725..359906e911f3 100644 --- a/sd/source/ui/view/DocumentRenderer.cxx +++ b/sd/source/ui/view/DocumentRenderer.cxx @@ -1432,7 +1432,7 @@ private: { MapMode aMap (aInfo.mpPrinter->GetMapMode()); - aMap.SetMapUnit(MAP_100TH_MM); + aMap.SetMapUnit(MapUnit::Map100thMM); aInfo.maMap = aMap; mpPrinter->SetMapMode(aMap); @@ -1623,7 +1623,7 @@ private: Rectangle aOutRect(aPageOfs, rInfo.mpPrinter->GetOutputSize()); if( aOutRect.GetWidth() > aOutRect.GetHeight() ) { - Size aPaperSize( rInfo.mpPrinter->PixelToLogic( rInfo.mpPrinter->GetPaperSizePixel(), MapMode( MAP_100TH_MM ) ) ); + Size aPaperSize( rInfo.mpPrinter->PixelToLogic( rInfo.mpPrinter->GetPaperSizePixel(), MapMode( MapUnit::Map100thMM ) ) ); maPrintSize.Width = aPaperSize.Height(); maPrintSize.Height = aPaperSize.Width(); const long nRotatedWidth = aOutRect.GetHeight(); diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx index 97c6b502b949..8aee92b7e04d 100644 --- a/sd/source/ui/view/ViewShellBase.cxx +++ b/sd/source/ui/view/ViewShellBase.cxx @@ -478,7 +478,7 @@ void ViewShellBase::InnerResizePixel (const Point& rOrigin, const Size &rSize) Size aSize( rSize ); aSize.Width() -= (aBorder.Left() + aBorder.Right()); aSize.Height() -= (aBorder.Top() + aBorder.Bottom()); - Size aObjSizePixel = mpImpl->mpViewWindow->LogicToPixel( aObjSize, MAP_100TH_MM ); + Size aObjSizePixel = mpImpl->mpViewWindow->LogicToPixel( aObjSize, MapUnit::Map100thMM ); SfxViewShell::SetZoomFactor( Fraction( aSize.Width(), std::max( aObjSizePixel.Width(), (long int)1 ) ), Fraction( aSize.Height(), std::max( aObjSizePixel.Height(), (long int)1) ) ); @@ -550,7 +550,7 @@ sal_uInt16 ViewShellBase::SetPrinter ( nDiffFlags & SfxPrinterChangeFlags::CHG_SIZE) && pNewPrinter ) { MapMode aMap = pNewPrinter->GetMapMode(); - aMap.SetMapUnit(MAP_100TH_MM); + aMap.SetMapUnit(MapUnit::Map100thMM); MapMode aOldMap = pNewPrinter->GetMapMode(); pNewPrinter->SetMapMode(aMap); Size aNewSize = pNewPrinter->GetOutputSize(); @@ -1064,8 +1064,8 @@ void ViewShellBase::NotifyCursor(SfxViewShell* pOtherShell) const { Rectangle aRectangle = pOutlinerView->GetOutputArea(); vcl::Window* pWin = pThisShell->GetActiveWindow(); - if (pWin && pWin->GetMapMode().GetMapUnit() == MAP_100TH_MM) - aRectangle = OutputDevice::LogicToLogic(aRectangle, MAP_100TH_MM, MAP_TWIP); + if (pWin && pWin->GetMapMode().GetMapUnit() == MapUnit::Map100thMM) + aRectangle = OutputDevice::LogicToLogic(aRectangle, MapUnit::Map100thMM, MapUnit::MapTwip); OString sRectangle = aRectangle.toString(); SfxLokHelper::notifyOtherView(&pDrawViewShell->GetViewShellBase(), pOtherShell, LOK_CALLBACK_VIEW_LOCK, "rectangle", sRectangle); } diff --git a/sd/source/ui/view/drviews8.cxx b/sd/source/ui/view/drviews8.cxx index 4ef3dce4e7f1..f1c07f6102ed 100644 --- a/sd/source/ui/view/drviews8.cxx +++ b/sd/source/ui/view/drviews8.cxx @@ -65,12 +65,12 @@ void DrawViewShell::ScannerEvent( const css::lang::EventObject& ) const SolarMutexGuard aGuard; SdrPage* pPage = mpDrawView->GetSdrPageView()->GetPage(); Size aBmpSize( aScanBmp.GetPrefSize() ), aPageSize( pPage->GetSize() ); - const MapMode aMap100( MAP_100TH_MM ); + const MapMode aMap100( MapUnit::Map100thMM ); if( !aBmpSize.Width() || !aBmpSize.Height() ) aBmpSize = aScanBmp.GetSizePixel(); - if( aScanBmp.GetPrefMapMode().GetMapUnit() == MAP_PIXEL ) + if( aScanBmp.GetPrefMapMode().GetMapUnit() == MapUnit::MapPixel ) aBmpSize = GetActiveWindow()->PixelToLogic( aBmpSize, aMap100 ); else aBmpSize = OutputDevice::LogicToLogic( aBmpSize, aScanBmp.GetPrefMapMode(), aMap100 ); diff --git a/sd/source/ui/view/drviews9.cxx b/sd/source/ui/view/drviews9.cxx index 6b3b0606b5ca..25899a943c03 100644 --- a/sd/source/ui/view/drviews9.cxx +++ b/sd/source/ui/view/drviews9.cxx @@ -91,7 +91,7 @@ void DrawViewShell::ExecGallery(SfxRequest& rReq) ScopedVclPtrInstance< Window > aWindow(GetActiveWindow()); aWindow->SetMapMode(aGraphic.GetPrefMapMode()); Size aSizePix = aWindow->LogicToPixel(aGraphic.GetPrefSize()); - aWindow->SetMapMode( MapMode(MAP_100TH_MM) ); + aWindow->SetMapMode( MapMode(MapUnit::Map100thMM) ); Size aSize = aWindow->PixelToLogic(aSizePix); // constrain size to page size if necessary diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx index 061b28aecb2e..b98f8009db0d 100644 --- a/sd/source/ui/view/sdview.cxx +++ b/sd/source/ui/view/sdview.cxx @@ -719,8 +719,8 @@ bool View::SdrBeginTextEdit( if (OutlinerView* pView = GetTextEditOutlinerView()) { Rectangle aRectangle = pView->GetOutputArea(); - if (pWin && pWin->GetMapMode().GetMapUnit() == MAP_100TH_MM) - aRectangle = OutputDevice::LogicToLogic(aRectangle, MAP_100TH_MM, MAP_TWIP); + if (pWin && pWin->GetMapMode().GetMapUnit() == MapUnit::Map100thMM) + aRectangle = OutputDevice::LogicToLogic(aRectangle, MapUnit::Map100thMM, MapUnit::MapTwip); OString sRectangle = aRectangle.toString(); SfxLokHelper::notifyOtherViews(&mpViewSh->GetViewShellBase(), LOK_CALLBACK_VIEW_LOCK, "rectangle", sRectangle); } @@ -886,7 +886,7 @@ void View::SetMarkedOriginalSize() if ( nAspect == embed::Aspects::MSOLE_ICON ) { - MapMode aMap100( MAP_100TH_MM ); + MapMode aMap100( MapUnit::Map100thMM ); aOleSize = static_cast<SdrOle2Obj*>(pObj)->GetOrigObjSize( &aMap100 ); bOK = true; } @@ -896,7 +896,7 @@ void View::SetMarkedOriginalSize() try { awt::Size aSz = xObj->getVisualAreaSize( nAspect ); - aOleSize = OutputDevice::LogicToLogic( Size( aSz.Width, aSz.Height ), aUnit, MAP_100TH_MM ); + aOleSize = OutputDevice::LogicToLogic( Size( aSz.Width, aSz.Height ), aUnit, MapUnit::Map100thMM ); bOK = true; } catch( embed::NoVisualAreaSizeException& ) diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx index ec2764825c76..452a7e4bc5da 100644 --- a/sd/source/ui/view/sdview3.cxx +++ b/sd/source/ui/view/sdview3.cxx @@ -948,7 +948,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, aSize = aObjDesc.maSize; else { - MapMode aMapMode( MAP_100TH_MM ); + MapMode aMapMode( MapUnit::Map100thMM ); aSize = aObjRef.GetSize( &aMapMode ); } } @@ -958,7 +958,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, MapUnit aMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( aObjDesc.mnViewAspect ) ); if( aObjDesc.maSize.Width() && aObjDesc.maSize.Height() ) { - Size aTmp( OutputDevice::LogicToLogic( aObjDesc.maSize, MAP_100TH_MM, aMapUnit ) ); + Size aTmp( OutputDevice::LogicToLogic( aObjDesc.maSize, MapUnit::Map100thMM, aMapUnit ) ); aSz.Width = aTmp.Width(); aSz.Height = aTmp.Height(); xObj->setVisualAreaSize( aObjDesc.mnViewAspect, aSz ); @@ -979,13 +979,13 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, { aSize.Width() = 14100; aSize.Height() = 10000; - aSize = OutputDevice::LogicToLogic( Size(14100, 10000), MAP_100TH_MM, aMapUnit ); + aSize = OutputDevice::LogicToLogic( Size(14100, 10000), MapUnit::Map100thMM, aMapUnit ); aSz.Width = aSize.Width(); aSz.Height = aSize.Height(); xObj->setVisualAreaSize( aObjDesc.mnViewAspect, aSz ); } - aSize = OutputDevice::LogicToLogic( aSize, aMapUnit, MAP_100TH_MM ); + aSize = OutputDevice::LogicToLogic( aSize, aMapUnit, MapUnit::Map100thMM ); } Size aMaxSize( mrDoc.GetMaxObjSize() ); @@ -1117,7 +1117,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, aSize = aObjDesc.maSize; else { - MapMode aMapMode( MAP_100TH_MM ); + MapMode aMapMode( MapUnit::Map100thMM ); aSize = aObjRef.GetSize( &aMapMode ); } } @@ -1136,7 +1136,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, if( aObjDesc.maSize.Width() && aObjDesc.maSize.Height() ) { - Size aTmp( OutputDevice::LogicToLogic( aObjDesc.maSize, MAP_100TH_MM, aMapUnit ) ); + Size aTmp( OutputDevice::LogicToLogic( aObjDesc.maSize, MapUnit::Map100thMM, aMapUnit ) ); if ( aSz.Width != aTmp.Width() || aSz.Height != aTmp.Height() ) { aSz.Width = aTmp.Width(); @@ -1149,13 +1149,13 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, if( !aSize.Width() || !aSize.Height() ) { - aSize = OutputDevice::LogicToLogic( Size(14100, 10000), MAP_100TH_MM, aMapUnit ); + aSize = OutputDevice::LogicToLogic( Size(14100, 10000), MapUnit::Map100thMM, aMapUnit ); aSz.Width = aSize.Width(); aSz.Height = aSize.Height(); xObj->setVisualAreaSize( aObjDesc.mnViewAspect, aSz ); } - aSize = OutputDevice::LogicToLogic( aSize, aMapUnit, MAP_100TH_MM ); + aSize = OutputDevice::LogicToLogic( aSize, aMapUnit, MapUnit::Map100thMM ); } Size aMaxSize( mrDoc.GetMaxObjSize() ); @@ -1226,7 +1226,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, // restrict movement to WorkArea Size aImageMapSize = OutputDevice::LogicToLogic(aGraphic.GetPrefSize(), - aGraphic.GetPrefMapMode(), MapMode(MAP_100TH_MM)); + aGraphic.GetPrefMapMode(), MapMode(MapUnit::Map100thMM)); ImpCheckInsertPos(aInsertPos, aImageMapSize, GetWorkArea()); @@ -1523,7 +1523,7 @@ bool View::PasteRTFTable( const ::tools::SvRef<SotStorageStream>& xStm, SdrPage* { std::unique_ptr<SdDrawDocument> pModel(new SdDrawDocument( DOCUMENT_TYPE_IMPRESS, mpDocSh )); pModel->NewOrLoadCompleted(NEW_DOC); - pModel->GetItemPool().SetDefaultMetric(MAP_100TH_MM); + pModel->GetItemPool().SetDefaultMetric(MapUnit::Map100thMM); pModel->InsertPage(pModel->AllocPage(false)); Reference< XComponent > xComponent( new SdXImpressDocument( pModel.get(), true ) ); diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx index 6ad4b1d7901c..756f2fff2963 100644 --- a/sd/source/ui/view/sdview4.cxx +++ b/sd/source/ui/view/sdview4.cxx @@ -173,7 +173,7 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction, // create new object Size aSize; - if ( rGraphic.GetPrefMapMode().GetMapUnit() == MAP_PIXEL ) + if ( rGraphic.GetPrefMapMode().GetMapUnit() == MapUnit::MapPixel ) { ::OutputDevice* pOutDev = nullptr; if( mpViewSh ) @@ -183,13 +183,13 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction, pOutDev = Application::GetDefaultDevice(); if( pOutDev ) - aSize = pOutDev->PixelToLogic( rGraphic.GetPrefSize(), MAP_100TH_MM ); + aSize = pOutDev->PixelToLogic( rGraphic.GetPrefSize(), MapUnit::Map100thMM ); } else { aSize = OutputDevice::LogicToLogic( rGraphic.GetPrefSize(), rGraphic.GetPrefMapMode(), - MapMode( MAP_100TH_MM ) ); + MapMode( MapUnit::Map100thMM ) ); } pNewGrafObj = new SdrGrafObj( rGraphic, Rectangle( rPos, aSize ) ); @@ -489,9 +489,9 @@ IMPL_LINK_NOARG(View, DropInsertFileHdl, Idle *, void) ::sd::Window* pWin = mpViewSh->GetActiveWindow(); if( pWin ) - aPrefSize = pWin->PixelToLogic( aPrefSize, MAP_100TH_MM ); + aPrefSize = pWin->PixelToLogic( aPrefSize, MapUnit::Map100thMM ); else - aPrefSize = Application::GetDefaultDevice()->PixelToLogic( aPrefSize, MAP_100TH_MM ); + aPrefSize = Application::GetDefaultDevice()->PixelToLogic( aPrefSize, MapUnit::Map100thMM ); } else aPrefSize = Size( 5000, 5000 ); diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx index 728d40a89a55..abcaaeecea6c 100644 --- a/sd/source/ui/view/sdwindow.cxx +++ b/sd/source/ui/view/sdwindow.cxx @@ -74,7 +74,7 @@ Window::Window(vcl::Window* pParent) SetDialogControlFlags( DialogControlFlags::Return | DialogControlFlags::WantFocus ); MapMode aMap(GetMapMode()); - aMap.SetMapUnit(MAP_100TH_MM); + aMap.SetMapUnit(MapUnit::Map100thMM); SetMapMode(aMap); // whit it, the vcl::WindowColor is used in the slide mode @@ -1004,8 +1004,8 @@ void Window::LogicInvalidate(const Rectangle* pRectangle) else { Rectangle aRectangle(*pRectangle); - if (GetMapMode().GetMapUnit() == MAP_100TH_MM) - aRectangle = OutputDevice::LogicToLogic(aRectangle, MAP_100TH_MM, MAP_TWIP); + if (GetMapMode().GetMapUnit() == MapUnit::Map100thMM) + aRectangle = OutputDevice::LogicToLogic(aRectangle, MapUnit::Map100thMM, MapUnit::MapTwip); sRectangle = aRectangle.toString(); } SfxViewShell& rSfxViewShell = mpViewShell->GetViewShellBase(); |