summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-10-26 23:15:06 +0200
committerMichael Stahl <mstahl@redhat.com>2017-10-26 23:17:45 +0200
commit11d2f3d6e1b6c9baf43d8521293c53525108436d (patch)
treeffe35d5d47713a11c93c3bf11f588eeaf492fc16 /sd
parent213f7c02d4f3ddbe2f52950575e2559c52d98ac2 (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 'sd')
-rw-r--r--sd/source/core/sdpage.cxx2
-rw-r--r--sd/source/filter/eppt/eppt.cxx2
-rw-r--r--sd/source/filter/grf/sdgrffilter.cxx2
-rw-r--r--sd/source/filter/html/pubdlg.cxx2
-rw-r--r--sd/source/ui/animations/CustomAnimationList.cxx4
-rw-r--r--sd/source/ui/animations/SlideTransitionPane.cxx2
-rw-r--r--sd/source/ui/app/sdmod.cxx2
-rw-r--r--sd/source/ui/dlg/PaneDockingWindow.cxx2
-rw-r--r--sd/source/ui/dlg/RemoteDialogClientBox.cxx2
-rw-r--r--sd/source/ui/dlg/animobjs.cxx4
-rw-r--r--sd/source/ui/dlg/docprev.cxx2
-rw-r--r--sd/source/ui/dlg/headerfooterdlg.cxx2
-rw-r--r--sd/source/ui/dlg/navigatr.cxx2
-rw-r--r--sd/source/ui/dlg/sdpreslt.cxx2
-rw-r--r--sd/source/ui/dlg/vectdlg.cxx2
-rw-r--r--sd/source/ui/func/fuinsert.cxx22
-rw-r--r--sd/source/ui/presenter/PresenterHelper.cxx2
-rw-r--r--sd/source/ui/presenter/PresenterTextView.cxx6
-rw-r--r--sd/source/ui/slideshow/showwin.cxx8
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx2
-rw-r--r--sd/source/ui/unoidl/unopage.cxx2
-rw-r--r--sd/source/ui/view/Outliner.cxx2
-rw-r--r--sd/source/ui/view/ViewShellBase.cxx4
-rw-r--r--sd/source/ui/view/sdview.cxx4
-rw-r--r--sd/source/ui/view/sdview3.cxx12
-rw-r--r--sd/source/ui/view/sdview4.cxx6
-rw-r--r--sd/source/ui/view/sdwindow.cxx2
27 files changed, 53 insertions, 53 deletions
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index db9a24edb5b9..6d7358947ca6 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -335,7 +335,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const ::t
aOutDev.SetMapMode( aGraphic.GetPrefMapMode() );
Size aSizePix = aOutDev.LogicToPixel( aGraphic.GetPrefSize() );
- aOutDev.SetMapMode(MapUnit::Map100thMM);
+ aOutDev.SetMapMode(MapMode(MapUnit::Map100thMM));
Size aSize = aOutDev.PixelToLogic(aSizePix);
Point aPnt (0, 0);
diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx
index 21aef0eee81e..cbedbab9a340 100644
--- a/sd/source/filter/eppt/eppt.cxx
+++ b/sd/source/filter/eppt/eppt.cxx
@@ -1078,7 +1078,7 @@ void ImplExportComments( const uno::Reference< drawing::XDrawPage >& xPage, SvMe
geometry::RealPoint2D aRealPoint2D( xAnnotation->getPosition() );
MapMode aMapDest( MapUnit::MapInch, Point(), Fraction( 1, 576 ), Fraction( 1, 576 ) );
Point aPoint( OutputDevice::LogicToLogic( Point( static_cast< sal_Int32 >( aRealPoint2D.X * 100.0 ),
- static_cast< sal_Int32 >( aRealPoint2D.Y * 100.0 ) ), MapUnit::Map100thMM, aMapDest ) );
+ static_cast<sal_Int32>(aRealPoint2D.Y * 100.0)), MapMode(MapUnit::Map100thMM), aMapDest));
OUString sAuthor( xAnnotation->getAuthor() );
uno::Reference< text::XText > xText( xAnnotation->getTextRange() );
diff --git a/sd/source/filter/grf/sdgrffilter.cxx b/sd/source/filter/grf/sdgrffilter.cxx
index 0fb0bea255d7..d34ca8d27471 100644
--- a/sd/source/filter/grf/sdgrffilter.cxx
+++ b/sd/source/filter/grf/sdgrffilter.cxx
@@ -179,7 +179,7 @@ bool SdGRFFilter::Import()
Point aPos;
Size aPagSize( pPage->GetSize() );
Size aGrfSize( OutputDevice::LogicToLogic( aGraphic.GetPrefSize(),
- aGraphic.GetPrefMapMode(), MapUnit::Map100thMM ) );
+ aGraphic.GetPrefMapMode(), MapMode(MapUnit::Map100thMM)));
aPagSize.Width() -= pPage->GetLeftBorder() + pPage->GetRightBorder();
aPagSize.Height() -= pPage->GetUpperBorder() + pPage->GetLowerBorder();
diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx
index 50c56e07855d..84189022e204 100644
--- a/sd/source/filter/html/pubdlg.cxx
+++ b/sd/source/filter/html/pubdlg.cxx
@@ -367,7 +367,7 @@ SdPublishingDlg::SdPublishingDlg(vcl::Window* pWindow, DocumentType eDocType)
m_bImpress = eDocType == DocumentType::Impress;
- Size aSize(LogicToPixel(Size(60, 50), MapUnit::MapAppFont));
+ Size aSize(LogicToPixel(Size(60, 50), MapMode(MapUnit::MapAppFont)));
get(pPage2_Standard_FB, "standardFBImage");
pPage2_Standard_FB->set_width_request(aSize.Width());
pPage2_Standard_FB->set_height_request(aSize.Height());
diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx
index 851cbf7bec11..981b61e36470 100644
--- a/sd/source/ui/animations/CustomAnimationList.cxx
+++ b/sd/source/ui/animations/CustomAnimationList.cxx
@@ -417,7 +417,7 @@ void CustomAnimationTriggerEntryItem::Paint(const Point& rPos, SvTreeListBox& rD
// draw the category title
int nVertBorder = ((aSize.Height() - rDev.GetTextHeight()) >> 1);
- int nHorzBorder = rRenderContext.LogicToPixel(Size(3, 3), MapUnit::MapAppFont).Width();
+ int nHorzBorder = rRenderContext.LogicToPixel(Size(3, 3), MapMode(MapUnit::MapAppFont)).Width();
aOutRect.Left() += nHorzBorder;
aOutRect.Right() -= nHorzBorder;
@@ -948,7 +948,7 @@ void CustomAnimationList::Paint(vcl::RenderContext& rRenderContext, const ::tool
{
Color aOldColor(rRenderContext.GetTextColor());
rRenderContext.SetTextColor(rRenderContext.GetSettings().GetStyleSettings().GetDisableColor());
- ::Point aOffset(rRenderContext.LogicToPixel(Point(6, 6), MapUnit::MapAppFont));
+ ::Point aOffset(rRenderContext.LogicToPixel(Point(6, 6), MapMode(MapUnit::MapAppFont)));
::tools::Rectangle aRect(Point(0,0), GetOutputSizePixel());
diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx
index 900ab2bff71d..fc01f7b7547e 100644
--- a/sd/source/ui/animations/SlideTransitionPane.cxx
+++ b/sd/source/ui/animations/SlideTransitionPane.cxx
@@ -386,7 +386,7 @@ public:
virtual Size GetOptimalSize() const override
{
- return LogicToPixel(Size(70, 88), MapUnit::MapAppFont);
+ return LogicToPixel(Size(70, 88), MapMode(MapUnit::MapAppFont));
}
};
diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx
index 17452c66a10d..61dd5e6b10a4 100644
--- a/sd/source/ui/app/sdmod.cxx
+++ b/sd/source/ui/app/sdmod.cxx
@@ -88,7 +88,7 @@ SdModule::SdModule(SfxObjectFactory* pFact1, SfxObjectFactory* pFact2 )
// set its resolution to 600 DPI. This leads to a visually better
// formatting of text in small sizes (6 point and below.)
mpVirtualRefDevice.reset(VclPtr<VirtualDevice>::Create());
- mpVirtualRefDevice->SetMapMode( MapUnit::Map100thMM );
+ mpVirtualRefDevice->SetMapMode(MapMode(MapUnit::Map100thMM));
mpVirtualRefDevice->SetReferenceDevice ( VirtualDevice::RefDevMode::Dpi600 );
}
diff --git a/sd/source/ui/dlg/PaneDockingWindow.cxx b/sd/source/ui/dlg/PaneDockingWindow.cxx
index b68665a0a24d..95bbb7228f75 100644
--- a/sd/source/ui/dlg/PaneDockingWindow.cxx
+++ b/sd/source/ui/dlg/PaneDockingWindow.cxx
@@ -43,7 +43,7 @@ PaneDockingWindow::PaneDockingWindow(
: TitledDockingWindow(_pBindings, pChildWindow, pParent)
{
SetTitle(rsTitle);
- SetSizePixel(LogicToPixel(Size(80,200), MapUnit::MapAppFont));
+ SetSizePixel(LogicToPixel(Size(80,200), MapMode(MapUnit::MapAppFont)));
}
PaneDockingWindow::~PaneDockingWindow()
diff --git a/sd/source/ui/dlg/RemoteDialogClientBox.cxx b/sd/source/ui/dlg/RemoteDialogClientBox.cxx
index 999d02e36b9c..ca9554ff509b 100644
--- a/sd/source/ui/dlg/RemoteDialogClientBox.cxx
+++ b/sd/source/ui/dlg/RemoteDialogClientBox.cxx
@@ -108,7 +108,7 @@ VCL_BUILDER_FACTORY_CONSTRUCTOR(ClientBox, WB_TABSTOP)
Size ClientBox::GetOptimalSize() const
{
- return LogicToPixel(Size(200, 140), MapUnit::MapAppFont);
+ return LogicToPixel(Size(200, 140), MapMode(MapUnit::MapAppFont));
}
ClientBox::~ClientBox()
diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx
index d413eb95884d..8d1eda9a2e56 100644
--- a/sd/source/ui/dlg/animobjs.cxx
+++ b/sd/source/ui/dlg/animobjs.cxx
@@ -57,7 +57,7 @@ SdDisplay::SdDisplay(vcl::Window* pWin)
: Control(pWin, 0)
, aScale(1, 1)
{
- SetMapMode( MapUnit::MapPixel );
+ SetMapMode(MapMode(MapUnit::MapPixel));
const StyleSettings& rStyles = Application::GetSettings().GetStyleSettings();
SetBackground( Wallpaper( Color( rStyles.GetFieldColor() ) ) );
}
@@ -103,7 +103,7 @@ void SdDisplay::SetScale( const Fraction& rFrac )
Size SdDisplay::GetOptimalSize() const
{
- return LogicToPixel(Size(147, 87), MapUnit::MapAppFont);
+ return LogicToPixel(Size(147, 87), MapMode(MapUnit::MapAppFont));
}
void SdDisplay::DataChanged( const DataChangedEvent& rDCEvt )
diff --git a/sd/source/ui/dlg/docprev.cxx b/sd/source/ui/dlg/docprev.cxx
index 852f8a46f9d5..846b4f46207a 100644
--- a/sd/source/ui/dlg/docprev.cxx
+++ b/sd/source/ui/dlg/docprev.cxx
@@ -77,7 +77,7 @@ void SdDocPreviewWin::dispose()
Size SdDocPreviewWin::GetOptimalSize() const
{
- return LogicToPixel(Size(122, 96), MapUnit::MapAppFont);
+ return LogicToPixel(Size(122, 96), MapMode(MapUnit::MapAppFont));
}
void SdDocPreviewWin::Resize()
diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx
index 04bf5617c443..ced53b446926 100644
--- a/sd/source/ui/dlg/headerfooterdlg.cxx
+++ b/sd/source/ui/dlg/headerfooterdlg.cxx
@@ -703,7 +703,7 @@ VCL_BUILDER_FACTORY(PresLayoutPreview)
Size PresLayoutPreview::GetOptimalSize() const
{
- return LogicToPixel(Size(80, 80), MapUnit::MapAppFont);
+ return LogicToPixel(Size(80, 80), MapMode(MapUnit::MapAppFont));
}
void PresLayoutPreview::init( SdPage *pMaster )
diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index c7c39e89f5fe..4552f262c7a1 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -74,7 +74,7 @@ SdNavigatorWin::SdNavigatorWin(vcl::Window* pParent, SfxBindings* pInBindings)
{
get(maToolbox, "toolbox");
get(maTlbObjects, "tree");
- Size aSize(maTlbObjects->LogicToPixel(Size(97, 67), MapUnit::MapAppFont));
+ Size aSize(maTlbObjects->LogicToPixel(Size(97, 67), MapMode(MapUnit::MapAppFont)));
maTlbObjects->set_height_request(aSize.Width());
maTlbObjects->set_width_request(aSize.Height());
get(maLbDocs, "documents");
diff --git a/sd/source/ui/dlg/sdpreslt.cxx b/sd/source/ui/dlg/sdpreslt.cxx
index d4f7c4b80dff..094a93098931 100644
--- a/sd/source/ui/dlg/sdpreslt.cxx
+++ b/sd/source/ui/dlg/sdpreslt.cxx
@@ -41,7 +41,7 @@ SdPresLayoutDlg::SdPresLayoutDlg(::sd::DrawDocShell* pDocShell,
, maStrNone(SdResId(STR_NULL))
{
get(m_pVS, "select");
- Size aPref(LogicToPixel(Size(144 , 141), MapUnit::MapAppFont));
+ Size aPref(LogicToPixel(Size(144 , 141), MapMode(MapUnit::MapAppFont)));
m_pVS->set_width_request(aPref.Width());
m_pVS->set_height_request(aPref.Height());
get(m_pCbxMasterPage, "masterpage");
diff --git a/sd/source/ui/dlg/vectdlg.cxx b/sd/source/ui/dlg/vectdlg.cxx
index 3b060bce16d6..5099ce6539a7 100644
--- a/sd/source/ui/dlg/vectdlg.cxx
+++ b/sd/source/ui/dlg/vectdlg.cxx
@@ -45,7 +45,7 @@ SdVectorizeDlg::SdVectorizeDlg(vcl::Window* pParent, const Bitmap& rBmp, ::sd::D
get(m_pBmpWin, "source");
get(m_pMtfWin, "vectorized");
- Size aSize(LogicToPixel(Size(92, 100), MapUnit::MapAppFont));
+ Size aSize(LogicToPixel(Size(92, 100), MapMode(MapUnit::MapAppFont)));
m_pBmpWin->set_width_request(aSize.Width());
m_pMtfWin->set_width_request(aSize.Width());
m_pBmpWin->set_height_request(aSize.Height());
diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx
index 5280fb3de736..b5a363b141d9 100644
--- a/sd/source/ui/func/fuinsert.cxx
+++ b/sd/source/ui/func/fuinsert.cxx
@@ -370,14 +370,14 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
// rectangle with balanced edge ratio
aSize.Width() = 14100;
aSize.Height() = 10000;
- Size aTmp = OutputDevice::LogicToLogic( aSize, MapUnit::Map100thMM, aUnit );
+ Size aTmp = OutputDevice::LogicToLogic(aSize, MapMode(MapUnit::Map100thMM), MapMode(aUnit));
aSz.Width = aTmp.Width();
aSz.Height = aTmp.Height();
xObj->setVisualAreaSize( nAspect, aSz );
}
else
{
- aSize = OutputDevice::LogicToLogic(aSize, aUnit, MapUnit::Map100thMM);
+ aSize = OutputDevice::LogicToLogic(aSize, MapMode(aUnit), MapMode(MapUnit::Map100thMM));
}
Point aPos;
@@ -433,7 +433,7 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
}
pOleObj->SetLogicRect(aRect);
- Size aTmp( OutputDevice::LogicToLogic( aRect.GetSize(), MapUnit::Map100thMM, aUnit ) );
+ Size aTmp( OutputDevice::LogicToLogic(aRect.GetSize(), MapMode(MapUnit::Map100thMM), MapMode(aUnit)) );
awt::Size aVisualSize;
aVisualSize.Width = aTmp.Width();
aVisualSize.Height = aTmp.Height();
@@ -546,14 +546,14 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
// rectangle with balanced edge ratio
aSize.Width() = 14100;
aSize.Height() = 10000;
- Size aTmp = OutputDevice::LogicToLogic( aSize, MapUnit::Map100thMM, aMapUnit );
+ Size aTmp = OutputDevice::LogicToLogic(aSize, MapMode(MapUnit::Map100thMM), MapMode(aMapUnit));
aSz.Width = aTmp.Width();
aSz.Height = aTmp.Height();
xObj->setVisualAreaSize( nAspect, aSz );
}
else
{
- aSize = OutputDevice::LogicToLogic(aSize, aMapUnit, MapUnit::Map100thMM);
+ aSize = OutputDevice::LogicToLogic(aSize, MapMode(aMapUnit), MapMode(MapUnit::Map100thMM));
}
}
@@ -589,7 +589,7 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
}
else
{
- Size aTmp = OutputDevice::LogicToLogic( aRect.GetSize(), MapUnit::Map100thMM, aMapUnit );
+ Size aTmp = OutputDevice::LogicToLogic(aRect.GetSize(), MapMode(MapUnit::Map100thMM), MapMode(aMapUnit));
awt::Size aSz( aTmp.Width(), aTmp.Height() );
xObj->setVisualAreaSize( nAspect, aSz );
}
@@ -649,7 +649,7 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
if ( nAspect != embed::Aspects::MSOLE_ICON )
{
- Size aTmp = OutputDevice::LogicToLogic( aRect.GetSize(), MapUnit::Map100thMM, aMapUnit );
+ Size aTmp = OutputDevice::LogicToLogic(aRect.GetSize(), MapMode(MapUnit::Map100thMM), MapMode(aMapUnit));
awt::Size aSz( aTmp.Width(), aTmp.Height() );
xObj->setVisualAreaSize( nAspect, aSz );
}
@@ -737,9 +737,9 @@ void FuInsertAVMedia::DoExecute( SfxRequest& rReq )
if( aPrefSize.Width() && aPrefSize.Height() )
{
if( mpWindow )
- aSize = mpWindow->PixelToLogic( aPrefSize, MapUnit::Map100thMM );
+ aSize = mpWindow->PixelToLogic(aPrefSize, MapMode(MapUnit::Map100thMM));
else
- aSize = Application::GetDefaultDevice()->PixelToLogic( aPrefSize, MapUnit::Map100thMM );
+ aSize = Application::GetDefaultDevice()->PixelToLogic(aPrefSize, MapMode(MapUnit::Map100thMM));
}
else
aSize = Size( 5000, 5000 );
@@ -823,9 +823,9 @@ void FuInsert3DModel::DoExecute( SfxRequest& )
Size aSize(480,360);
if( mpWindow )
- aSize = mpWindow->PixelToLogic( aSize, MapUnit::Map100thMM );
+ aSize = mpWindow->PixelToLogic(aSize, MapMode(MapUnit::Map100thMM));
else
- aSize = Application::GetDefaultDevice()->PixelToLogic( aSize, MapUnit::Map100thMM );
+ aSize = Application::GetDefaultDevice()->PixelToLogic(aSize, MapMode(MapUnit::Map100thMM));
if( mpWindow )
{
diff --git a/sd/source/ui/presenter/PresenterHelper.cxx b/sd/source/ui/presenter/PresenterHelper.cxx
index 87b0928d6796..71f85ad3102b 100644
--- a/sd/source/ui/presenter/PresenterHelper.cxx
+++ b/sd/source/ui/presenter/PresenterHelper.cxx
@@ -93,7 +93,7 @@ Reference<awt::XWindow> SAL_CALL PresenterHelper::createWindow (
pWindow->Show(bInitiallyVisible);
- pWindow->SetMapMode(MapUnit::MapPixel);
+ pWindow->SetMapMode(MapMode(MapUnit::MapPixel));
pWindow->SetBackground();
if ( ! bEnableParentClip)
{
diff --git a/sd/source/ui/presenter/PresenterTextView.cxx b/sd/source/ui/presenter/PresenterTextView.cxx
index 6a001902d173..4b8494078a5a 100644
--- a/sd/source/ui/presenter/PresenterTextView.cxx
+++ b/sd/source/ui/presenter/PresenterTextView.cxx
@@ -240,7 +240,7 @@ PresenterTextView::Implementation::Implementation()
mnTop(0),
mnTotalHeight(-1)
{
- mpOutputDevice->SetMapMode(MapUnit::MapPixel);
+ mpOutputDevice->SetMapMode(MapMode(MapUnit::MapPixel));
mpEditEngine = CreateEditEngine ();
}
@@ -312,7 +312,7 @@ EditEngine* PresenterTextView::Implementation::CreateEditEngine()
EEControlBits(~EEControlBits::PASTESPECIAL) );
pEditEngine->SetWordDelimiters (" .=+-*/(){}[];\"");
- pEditEngine->SetRefMapMode (MapUnit::MapPixel);
+ pEditEngine->SetRefMapMode(MapMode(MapUnit::MapPixel));
pEditEngine->SetPaperSize (Size(800, 0));
pEditEngine->EraseVirtualDevice();
pEditEngine->ClearModifyFlag();
@@ -436,7 +436,7 @@ Reference<rendering::XBitmap> const & PresenterTextView::Implementation::GetBitm
mpOutputDevice.disposeAndClear();
mpOutputDevice = VclPtr<VirtualDevice>::Create(*Application::GetDefaultDevice(),
DeviceFormat::DEFAULT, DeviceFormat::DEFAULT);
- mpOutputDevice->SetMapMode(MapUnit::MapPixel);
+ mpOutputDevice->SetMapMode(MapMode(MapUnit::MapPixel));
mpOutputDevice->SetOutputSizePixel(maSize);
mpOutputDevice->SetLineColor();
mpOutputDevice->SetFillColor();
diff --git a/sd/source/ui/slideshow/showwin.cxx b/sd/source/ui/slideshow/showwin.cxx
index add43b39e195..b70234500935 100644
--- a/sd/source/ui/slideshow/showwin.cxx
+++ b/sd/source/ui/slideshow/showwin.cxx
@@ -451,8 +451,8 @@ void ShowWindow::DrawPauseScene( bool bTimeoutOnly )
const MapMode& rMap = GetMapMode();
const Point aOutOrg( PixelToLogic( Point() ) );
const Size aOutSize( GetOutputSize() );
- const Size aTextSize( LogicToLogic( Size( 0, 14 ), MapUnit::MapPoint, rMap ) );
- const Size aOffset( LogicToLogic( Size( 1000, 1000 ), MapUnit::Map100thMM, rMap ) );
+ const Size aTextSize(LogicToLogic(Size(0, 14), MapMode(MapUnit::MapPoint), rMap));
+ const Size aOffset(LogicToLogic(Size(1000, 1000), MapMode(MapUnit::Map100thMM), rMap));
OUString aText( SdResId( STR_PRES_PAUSE ) );
bool bDrawn = false;
@@ -468,7 +468,7 @@ void ShowWindow::DrawPauseScene( bool bTimeoutOnly )
{
Size aGrfSize;
- if( maLogo.GetPrefMapMode() == MapUnit::MapPixel )
+ if (maLogo.GetPrefMapMode().GetMapUnit() == MapUnit::MapPixel)
aGrfSize = PixelToLogic( maLogo.GetPrefSize() );
else
aGrfSize = LogicToLogic( maLogo.GetPrefSize(), maLogo.GetPrefMapMode(), rMap );
@@ -525,7 +525,7 @@ void ShowWindow::DrawEndScene()
vcl::Font aFont( GetSettings().GetStyleSettings().GetMenuFont() );
const Point aOutOrg( PixelToLogic( Point() ) );
- const Size aTextSize( LogicToLogic( Size( 0, 14 ), MapUnit::MapPoint, GetMapMode() ) );
+ const Size aTextSize(LogicToLogic(Size(0, 14), MapMode(MapUnit::MapPoint), GetMapMode()));
const OUString aText( SdResId( STR_PRES_SOFTEND ) );
aFont.SetFontSize( aTextSize );
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 74c379fed0c3..3bcc1c0f3db9 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -1915,7 +1915,7 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r
pView->SetPageVisible( false );
pView->SetGlueVisible( false );
- pOut->SetMapMode( MapUnit::Map100thMM );
+ pOut->SetMapMode(MapMode(MapUnit::Map100thMM));
pOut->IntersectClipRegion( aVisArea );
uno::Reference< frame::XModel > xModel;
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index 93f76f6cf57f..60a6e7bb07ca 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -1122,7 +1122,7 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName )
Size aSize( GetPage()->GetSize() );
xMetaFile->AddAction( static_cast<MetaAction*>(new MetaFillColorAction( COL_WHITE, true )), 0 );
xMetaFile->AddAction( static_cast<MetaAction*>(new MetaRectAction( ::tools::Rectangle( aPoint, aSize ) )), 1 );
- xMetaFile->SetPrefMapMode( MapUnit::Map100thMM );
+ xMetaFile->SetPrefMapMode(MapMode(MapUnit::Map100thMM));
xMetaFile->SetPrefSize( aSize );
SvMemoryStream aDestStrm( 65535, 65535 );
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index 9d9a2663ee53..22ab4facd0ae 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -804,7 +804,7 @@ bool SdOutliner::SearchAndReplaceOnce(std::vector<sd::SearchSelection>* pSelecti
{
for (tools::Rectangle& rRectangle : aLogicRects)
{
- rRectangle = OutputDevice::LogicToLogic(rRectangle, MapUnit::Map100thMM, MapUnit::MapTwip);
+ rRectangle = OutputDevice::LogicToLogic(rRectangle, MapMode(MapUnit::Map100thMM), MapMode(MapUnit::MapTwip));
}
}
diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx
index 8f72f80b558d..f7d7a02538bf 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -464,7 +464,7 @@ void ViewShellBase::InnerResizePixel (const Point& rOrigin, const Size &rSize, b
Size aSize( rSize );
aSize.Width() -= (aBorder.Left() + aBorder.Right());
aSize.Height() -= (aBorder.Top() + aBorder.Bottom());
- Size aObjSizePixel = mpImpl->mpViewWindow->LogicToPixel( aObjSize, MapUnit::Map100thMM );
+ Size aObjSizePixel = mpImpl->mpViewWindow->LogicToPixel(aObjSize, MapMode(MapUnit::Map100thMM));
SfxViewShell::SetZoomFactor(
Fraction( aSize.Width(), std::max( aObjSizePixel.Width(), (long int)1 ) ),
Fraction( aSize.Height(), std::max( aObjSizePixel.Height(), (long int)1) ) );
@@ -1004,7 +1004,7 @@ void ViewShellBase::NotifyCursor(SfxViewShell* pOtherShell) const
::tools::Rectangle aRectangle = pOutlinerView->GetOutputArea();
vcl::Window* pWin = pThisShell->GetActiveWindow();
if (pWin && pWin->GetMapMode().GetMapUnit() == MapUnit::Map100thMM)
- aRectangle = OutputDevice::LogicToLogic(aRectangle, MapUnit::Map100thMM, MapUnit::MapTwip);
+ aRectangle = OutputDevice::LogicToLogic(aRectangle, MapMode(MapUnit::Map100thMM), MapMode(MapUnit::MapTwip));
OString sRectangle = aRectangle.toString();
SfxLokHelper::notifyOtherView(&pDrawViewShell->GetViewShellBase(), pOtherShell, LOK_CALLBACK_VIEW_LOCK, "rectangle", sRectangle);
}
diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index 62d84df6d8b2..24cde44a6dd8 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -703,7 +703,7 @@ bool View::SdrBeginTextEdit(
{
::tools::Rectangle aRectangle = pView->GetOutputArea();
if (pWin && pWin->GetMapMode().GetMapUnit() == MapUnit::Map100thMM)
- aRectangle = OutputDevice::LogicToLogic(aRectangle, MapUnit::Map100thMM, MapUnit::MapTwip);
+ aRectangle = OutputDevice::LogicToLogic(aRectangle, MapMode(MapUnit::Map100thMM), MapMode(MapUnit::MapTwip));
OString sRectangle = aRectangle.toString();
SfxLokHelper::notifyOtherViews(&mpViewSh->GetViewShellBase(), LOK_CALLBACK_VIEW_LOCK, "rectangle", sRectangle);
}
@@ -879,7 +879,7 @@ void View::SetMarkedOriginalSize()
try
{
awt::Size aSz = xObj->getVisualAreaSize( nAspect );
- aOleSize = OutputDevice::LogicToLogic( Size( aSz.Width, aSz.Height ), aUnit, MapUnit::Map100thMM );
+ aOleSize = OutputDevice::LogicToLogic(Size(aSz.Width, aSz.Height), MapMode(aUnit), MapMode(MapUnit::Map100thMM));
bOK = true;
}
catch( embed::NoVisualAreaSizeException& )
diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx
index ca02e197d0e6..00a6456edc8c 100644
--- a/sd/source/ui/view/sdview3.cxx
+++ b/sd/source/ui/view/sdview3.cxx
@@ -959,7 +959,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, MapUnit::Map100thMM, aMapUnit ) );
+ Size aTmp(OutputDevice::LogicToLogic(aObjDesc.maSize, MapMode(MapUnit::Map100thMM), MapMode(aMapUnit)));
aSz.Width = aTmp.Width();
aSz.Height = aTmp.Height();
xObj->setVisualAreaSize( aObjDesc.mnViewAspect, aSz );
@@ -980,13 +980,13 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
{
aSize.Width() = 14100;
aSize.Height() = 10000;
- aSize = OutputDevice::LogicToLogic( Size(14100, 10000), MapUnit::Map100thMM, aMapUnit );
+ aSize = OutputDevice::LogicToLogic(Size(14100, 10000), MapMode(MapUnit::Map100thMM), MapMode(aMapUnit));
aSz.Width = aSize.Width();
aSz.Height = aSize.Height();
xObj->setVisualAreaSize( aObjDesc.mnViewAspect, aSz );
}
- aSize = OutputDevice::LogicToLogic( aSize, aMapUnit, MapUnit::Map100thMM );
+ aSize = OutputDevice::LogicToLogic(aSize, MapMode(aMapUnit), MapMode(MapUnit::Map100thMM));
}
Size aMaxSize( mrDoc.GetMaxObjSize() );
@@ -1137,7 +1137,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
if( aObjDesc.maSize.Width() && aObjDesc.maSize.Height() )
{
- Size aTmp( OutputDevice::LogicToLogic( aObjDesc.maSize, MapUnit::Map100thMM, aMapUnit ) );
+ Size aTmp(OutputDevice::LogicToLogic(aObjDesc.maSize, MapMode(MapUnit::Map100thMM), MapMode(aMapUnit)));
if ( aSz.Width != aTmp.Width() || aSz.Height != aTmp.Height() )
{
aSz.Width = aTmp.Width();
@@ -1150,13 +1150,13 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
if( !aSize.Width() || !aSize.Height() )
{
- aSize = OutputDevice::LogicToLogic( Size(14100, 10000), MapUnit::Map100thMM, aMapUnit );
+ aSize = OutputDevice::LogicToLogic(Size(14100, 10000), MapMode(MapUnit::Map100thMM), MapMode(aMapUnit));
aSz.Width = aSize.Width();
aSz.Height = aSize.Height();
xObj->setVisualAreaSize( aObjDesc.mnViewAspect, aSz );
}
- aSize = OutputDevice::LogicToLogic( aSize, aMapUnit, MapUnit::Map100thMM );
+ aSize = OutputDevice::LogicToLogic(aSize, MapMode(aMapUnit), MapMode(MapUnit::Map100thMM));
}
Size aMaxSize( mrDoc.GetMaxObjSize() );
diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx
index 1754238355cd..c0968405aa52 100644
--- a/sd/source/ui/view/sdview4.cxx
+++ b/sd/source/ui/view/sdview4.cxx
@@ -182,7 +182,7 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction,
pOutDev = Application::GetDefaultDevice();
if( pOutDev )
- aSize = pOutDev->PixelToLogic( rGraphic.GetPrefSize(), MapUnit::Map100thMM );
+ aSize = pOutDev->PixelToLogic(rGraphic.GetPrefSize(), MapMode(MapUnit::Map100thMM));
}
else
{
@@ -496,9 +496,9 @@ IMPL_LINK_NOARG(View, DropInsertFileHdl, Timer *, void)
::sd::Window* pWin = mpViewSh->GetActiveWindow();
if( pWin )
- aPrefSize = pWin->PixelToLogic( aPrefSize, MapUnit::Map100thMM );
+ aPrefSize = pWin->PixelToLogic(aPrefSize, MapMode(MapUnit::Map100thMM));
else
- aPrefSize = Application::GetDefaultDevice()->PixelToLogic( aPrefSize, MapUnit::Map100thMM );
+ aPrefSize = Application::GetDefaultDevice()->PixelToLogic(aPrefSize, MapMode(MapUnit::Map100thMM));
}
else
aPrefSize = Size( 5000, 5000 );
diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx
index 7ddbcfccd712..c46be7b78302 100644
--- a/sd/source/ui/view/sdwindow.cxx
+++ b/sd/source/ui/view/sdwindow.cxx
@@ -1008,7 +1008,7 @@ void Window::LogicInvalidate(const ::tools::Rectangle* pRectangle)
{
::tools::Rectangle aRectangle(*pRectangle);
if (GetMapMode().GetMapUnit() == MapUnit::Map100thMM)
- aRectangle = OutputDevice::LogicToLogic(aRectangle, MapUnit::Map100thMM, MapUnit::MapTwip);
+ aRectangle = OutputDevice::LogicToLogic(aRectangle, MapMode(MapUnit::Map100thMM), MapMode(MapUnit::MapTwip));
sRectangle = aRectangle.toString();
}
SfxViewShell& rSfxViewShell = mpViewShell->GetViewShellBase();