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 /basctl | |
parent | vcl: print MapMode (diff) | |
download | core-11d2f3d6e1b6c9baf43d8521293c53525108436d.tar.gz core-11d2f3d6e1b6c9baf43d8521293c53525108436d.zip |
vcl: make MapMode constructor explicit
Insert constructor everywhere, except a couple places that apparently
want to compare GetMapUnit().
Change-Id: I1910deb60562e5e949203435e827057f70a3f988
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/basicide/baside2.cxx | 2 | ||||
-rw-r--r-- | basctl/source/basicide/baside2b.cxx | 2 | ||||
-rw-r--r-- | basctl/source/basicide/moduldl2.cxx | 2 | ||||
-rw-r--r-- | basctl/source/basicide/moduldlg.cxx | 2 | ||||
-rw-r--r-- | basctl/source/basicide/objdlg.cxx | 6 | ||||
-rw-r--r-- | basctl/source/dlged/dlgedobj.cxx | 18 |
6 files changed, 16 insertions, 16 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index c8846b413615..e77e86dd1759 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -799,7 +799,7 @@ sal_Int32 ModulWindow::FormatAndPrint( Printer* pPrinter, sal_Int32 nPrintPage ) aFont.SetTransparent( true ); aFont.SetFontSize( Size( 0, 360 ) ); pPrinter->SetFont( aFont ); - pPrinter->SetMapMode( MapUnit::Map100thMM ); + pPrinter->SetMapMode(MapMode(MapUnit::Map100thMM)); OUString aTitle( CreateQualifiedName() ); diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index 877b8a9e26ef..34b3c62126af 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -1554,7 +1554,7 @@ WatchWindow::WatchWindow (Layout* pParent) { aXEdit->SetAccessibleName(IDEResId(RID_STR_WATCHNAME)); aXEdit->SetHelpId(HID_BASICIDE_WATCHWINDOW_EDIT); - aXEdit->SetSizePixel(aXEdit->LogicToPixel(Size(80, 12), MapUnit::MapAppFont)); + aXEdit->SetSizePixel(aXEdit->LogicToPixel(Size(80, 12), MapMode(MapUnit::MapAppFont))); aTreeListBox->SetAccessibleName(IDEResId(RID_STR_WATCHNAME)); long nTextLen = GetTextWidth( aWatchStr ) + DWBORDER + 3; diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index f2a7aa054833..827474abfbce 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -474,7 +474,7 @@ LibPage::LibPage(vcl::Window * pParent) { get(m_pBasicsBox, "location"); get(m_pLibBox, "library"); - Size aSize(m_pLibBox->LogicToPixel(Size(130, 87), MapUnit::MapAppFont)); + Size aSize(m_pLibBox->LogicToPixel(Size(130, 87), MapMode(MapUnit::MapAppFont))); m_pLibBox->set_height_request(aSize.Height()); m_pLibBox->set_width_request(aSize.Width()); get(m_pEditButton, "edit"); diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx index dd5b4697f135..91a90c608d5f 100644 --- a/basctl/source/basicide/moduldlg.cxx +++ b/basctl/source/basicide/moduldlg.cxx @@ -550,7 +550,7 @@ ObjectPage::ObjectPage(vcl::Window *pParent, const OString &rName, BrowseMode nM ".ui") { get(m_pBasicBox, "library"); - Size aSize(m_pBasicBox->LogicToPixel(Size(130, 117), MapUnit::MapAppFont)); + Size aSize(m_pBasicBox->LogicToPixel(Size(130, 117), MapMode(MapUnit::MapAppFont))); m_pBasicBox->set_height_request(aSize.Height()); m_pBasicBox->set_width_request(aSize.Width()); get(m_pEditButton, "edit"); diff --git a/basctl/source/basicide/objdlg.cxx b/basctl/source/basicide/objdlg.cxx index a20f8e3a0a45..16389cadc51f 100644 --- a/basctl/source/basicide/objdlg.cxx +++ b/basctl/source/basicide/objdlg.cxx @@ -112,15 +112,15 @@ void ObjectCatalog::ArrangeWindows() aTitle->Hide(); else { - Size aTitleSize = LogicToPixel(Size(3, 10), MapUnit::MapAppFont); + Size aTitleSize = LogicToPixel(Size(3, 10), MapMode(MapUnit::MapAppFont)); aTitleSize.Width() = aSize.Width() - 2*aTitleSize.Width(); - aTitle->SetPosPixel(LogicToPixel(Point(3, 3), MapUnit::MapAppFont)); + aTitle->SetPosPixel(LogicToPixel(Point(3, 3), MapMode(MapUnit::MapAppFont))); aTitle->SetSizePixel(aTitleSize); aTitle->Show(); } // tree - Point const aTreePos = LogicToPixel(Point(3, bFloating ? 3 : 16), MapUnit::MapAppFont); + Point const aTreePos = LogicToPixel(Point(3, bFloating ? 3 : 16), MapMode(MapUnit::MapAppFont)); long const nMargin = aTreePos.X(); Size const aTreeSize( aSize.Width() - 2*nMargin, diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx index 2590dc74362f..f61986d62592 100644 --- a/basctl/source/dlged/dlgedobj.cxx +++ b/basctl/source/dlged/dlgedobj.cxx @@ -158,8 +158,8 @@ bool DlgEdObj::TransformSdrToControlCoordinates( } // convert pixel to logic units - aPos = pDevice->PixelToLogic( aPos, MapUnit::MapAppFont ); - aSize = pDevice->PixelToLogic( aSize, MapUnit::MapAppFont ); + aPos = pDevice->PixelToLogic(aPos, MapMode(MapUnit::MapAppFont)); + aSize = pDevice->PixelToLogic(aSize, MapMode(MapUnit::MapAppFont)); // set out parameters nXOut = aPos.Width(); @@ -205,8 +205,8 @@ bool DlgEdObj::TransformSdrToFormCoordinates( aSize.Height() -= aDeviceInfo.TopInset + aDeviceInfo.BottomInset; } // convert pixel to logic units - aPos = pDevice->PixelToLogic( aPos, MapUnit::MapAppFont ); - aSize = pDevice->PixelToLogic( aSize, MapUnit::MapAppFont ); + aPos = pDevice->PixelToLogic(aPos, MapMode(MapUnit::MapAppFont)); + aSize = pDevice->PixelToLogic(aSize, MapMode(MapUnit::MapAppFont)); // set out parameters nXOut = aPos.Width(); @@ -246,9 +246,9 @@ bool DlgEdObj::TransformControlToSdrCoordinates( DBG_ASSERT( pDevice, "DlgEdObj::TransformControlToSdrCoordinates: missing default device!" ); if ( !pDevice ) return false; - aPos = pDevice->LogicToPixel( aPos, MapUnit::MapAppFont ); - aSize = pDevice->LogicToPixel( aSize, MapUnit::MapAppFont ); - aFormPos = pDevice->LogicToPixel( aFormPos, MapUnit::MapAppFont ); + aPos = pDevice->LogicToPixel(aPos, MapMode(MapUnit::MapAppFont)); + aSize = pDevice->LogicToPixel(aSize, MapMode(MapUnit::MapAppFont)); + aFormPos = pDevice->LogicToPixel(aFormPos, MapMode(MapUnit::MapAppFont)); // add form position aPos.Width() += aFormPos.Width(); @@ -296,8 +296,8 @@ bool DlgEdObj::TransformFormToSdrCoordinates( if ( !lcl_getDlgEdForm( this, pForm ) ) return false; - aPos = pDevice->LogicToPixel( aPos, MapUnit::MapAppFont ); - aSize = pDevice->LogicToPixel( aSize, MapUnit::MapAppFont ); + aPos = pDevice->LogicToPixel(aPos, MapMode(MapUnit::MapAppFont)); + aSize = pDevice->LogicToPixel(aSize, MapMode(MapUnit::MapAppFont)); // take window borders into account Reference< beans::XPropertySet > xPSetForm( pForm->GetUnoControlModel(), UNO_QUERY ); |