summaryrefslogtreecommitdiff
path: root/extensions
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 /extensions
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 'extensions')
-rw-r--r--extensions/source/abpilot/abspilot.cxx2
-rw-r--r--extensions/source/dbpilots/controlwizard.cxx2
-rw-r--r--extensions/source/propctrlr/browserline.cxx2
-rw-r--r--extensions/source/propctrlr/browserlistbox.cxx4
-rw-r--r--extensions/source/propctrlr/fontdialog.cxx4
-rw-r--r--extensions/source/propctrlr/inspectorhelpwindow.cxx8
-rw-r--r--extensions/source/propctrlr/listselectiondlg.cxx2
-rw-r--r--extensions/source/scanner/grid.cxx2
-rw-r--r--extensions/source/scanner/sanedlg.cxx12
9 files changed, 19 insertions, 19 deletions
diff --git a/extensions/source/abpilot/abspilot.cxx b/extensions/source/abpilot/abspilot.cxx
index ff41cbd1698a..270025e986c1 100644
--- a/extensions/source/abpilot/abspilot.cxx
+++ b/extensions/source/abpilot/abspilot.cxx
@@ -62,7 +62,7 @@ namespace abp
,m_aNewDataSource(_rxORB)
,m_eNewDataSourceType( AST_INVALID )
{
- SetPageSizePixel(LogicToPixel(Size(WINDOW_SIZE_X, WINDOW_SIZE_Y), MapUnit::MapAppFont));
+ SetPageSizePixel(LogicToPixel(Size(WINDOW_SIZE_X, WINDOW_SIZE_Y), MapMode(MapUnit::MapAppFont)));
declarePath( PATH_COMPLETE,
{STATE_SELECT_ABTYPE,
diff --git a/extensions/source/dbpilots/controlwizard.cxx b/extensions/source/dbpilots/controlwizard.cxx
index af24701eac77..5f14c6760b39 100644
--- a/extensions/source/dbpilots/controlwizard.cxx
+++ b/extensions/source/dbpilots/controlwizard.cxx
@@ -247,7 +247,7 @@ namespace dbp
m_aContext.xObjectModel = _rxObjectModel;
initContext();
- SetPageSizePixel(LogicToPixel(::Size(WINDOW_SIZE_X, WINDOW_SIZE_Y), MapUnit::MapAppFont));
+ SetPageSizePixel(LogicToPixel(::Size(WINDOW_SIZE_X, WINDOW_SIZE_Y), MapMode(MapUnit::MapAppFont)));
defaultButton(WizardButtonFlags::NEXT);
enableButtons(WizardButtonFlags::FINISH, false);
}
diff --git a/extensions/source/propctrlr/browserline.cxx b/extensions/source/propctrlr/browserline.cxx
index e345381733e9..67b9d6801dda 100644
--- a/extensions/source/propctrlr/browserline.cxx
+++ b/extensions/source/propctrlr/browserline.cxx
@@ -209,7 +209,7 @@ namespace pcr
if ( m_bIndentTitle )
{
- Size aIndent( m_pTheParent->LogicToPixel( Size( 8, 0 ), MapUnit::MapAppFont ) );
+ Size aIndent( m_pTheParent->LogicToPixel(Size(8, 0), MapMode(MapUnit::MapAppFont)) );
aTitlePos.X() += aIndent.Width();
aTitleSize.Width() -= aIndent.Width();
}
diff --git a/extensions/source/propctrlr/browserlistbox.cxx b/extensions/source/propctrlr/browserlistbox.cxx
index 2d53642bf580..38f5a92c6be8 100644
--- a/extensions/source/propctrlr/browserlistbox.cxx
+++ b/extensions/source/propctrlr/browserlistbox.cxx
@@ -418,7 +418,7 @@ namespace pcr
void OBrowserListBox::Resize()
{
tools::Rectangle aPlayground( Point( 0, 0 ), GetOutputSizePixel() );
- Size aHelpWindowDistance( LogicToPixel( Size( 0, LAYOUT_HELP_WINDOW_DISTANCE_APPFONT ), MapUnit::MapAppFont ) );
+ Size aHelpWindowDistance( LogicToPixel(Size(0, LAYOUT_HELP_WINDOW_DISTANCE_APPFONT), MapMode(MapUnit::MapAppFont)) );
long nHelpWindowHeight = m_nCurrentPreferredHelpHeight = impl_getPrefererredHelpHeight();
bool bPositionHelpWindow = ( nHelpWindowHeight != 0 );
@@ -746,7 +746,7 @@ namespace pcr
if ( HasHelpSection() )
{
- Size aHelpWindowDistance( LogicToPixel( Size( 0, LAYOUT_HELP_WINDOW_DISTANCE_APPFONT ), MapUnit::MapAppFont ) );
+ Size aHelpWindowDistance( LogicToPixel(Size(0, LAYOUT_HELP_WINDOW_DISTANCE_APPFONT), MapMode(MapUnit::MapAppFont)) );
nMinHeight += aHelpWindowDistance.Height();
nMinHeight += m_pHelpWindow->GetMinimalHeightPixel();
diff --git a/extensions/source/propctrlr/fontdialog.cxx b/extensions/source/propctrlr/fontdialog.cxx
index 447583056343..c9b0f0137cb7 100644
--- a/extensions/source/propctrlr/fontdialog.cxx
+++ b/extensions/source/propctrlr/fontdialog.cxx
@@ -224,7 +224,7 @@ namespace pcr
// build SfxItems with the values
SvxFontItem aFontItem((FontFamily)nFontFamily, aFontName, aFontStyleName, PITCH_DONTKNOW, nFontCharset, CFID_FONT);
- nFontHeight = (float)OutputDevice::LogicToLogic(Size(0, (sal_Int32)nFontHeight), MapUnit::MapPoint, MapUnit::MapTwip).Height();
+ nFontHeight = (float)OutputDevice::LogicToLogic(Size(0, (sal_Int32)nFontHeight), MapMode(MapUnit::MapPoint), MapMode(MapUnit::MapTwip)).Height();
SvxFontHeightItem aSvxFontHeightItem((sal_uInt32)nFontHeight,100,CFID_HEIGHT);
FontWeight eWeight=vcl::unohelper::ConvertFontWeight(nFontWeight);
@@ -328,7 +328,7 @@ namespace pcr
const SvxFontHeightItem& rSvxFontHeightItem =
static_cast<const SvxFontHeightItem&>(_rSet.Get(CFID_HEIGHT));
- float nHeight = (float)OutputDevice::LogicToLogic(Size(0, rSvxFontHeightItem.GetHeight()), MapUnit::MapTwip, MapUnit::MapPoint).Height();
+ float nHeight = (float)OutputDevice::LogicToLogic(Size(0, rSvxFontHeightItem.GetHeight()), MapMode(MapUnit::MapTwip), MapMode(MapUnit::MapPoint)).Height();
lcl_pushBackPropertyValue( _out_properties, PROPERTY_FONT_HEIGHT,makeAny(nHeight));
}
diff --git a/extensions/source/propctrlr/inspectorhelpwindow.cxx b/extensions/source/propctrlr/inspectorhelpwindow.cxx
index 05accc9b1365..91ee10a9d886 100644
--- a/extensions/source/propctrlr/inspectorhelpwindow.cxx
+++ b/extensions/source/propctrlr/inspectorhelpwindow.cxx
@@ -81,8 +81,8 @@ namespace pcr
long InspectorHelpWindow::impl_getSpaceAboveTextWindow()
{
- Size aSeparatorSize( LogicToPixel( Size( 0, 8 ), MapUnit::MapAppFont ) );
- Size a3AppFontSize( LogicToPixel( Size( 3, 3 ), MapUnit::MapAppFont ) );
+ Size aSeparatorSize(LogicToPixel(Size(0, 8), MapMode(MapUnit::MapAppFont)));
+ Size a3AppFontSize(LogicToPixel(Size(3, 3), MapMode(MapUnit::MapAppFont)));
return aSeparatorSize.Height() + a3AppFontSize.Height();
}
@@ -125,12 +125,12 @@ namespace pcr
void InspectorHelpWindow::Resize()
{
- Size a3AppFont( LogicToPixel( Size( 3, 3 ), MapUnit::MapAppFont ) );
+ Size a3AppFont(LogicToPixel(Size(3, 3), MapMode(MapUnit::MapAppFont)));
tools::Rectangle aPlayground( Point( 0, 0 ), GetOutputSizePixel() );
tools::Rectangle aSeparatorArea( aPlayground );
- aSeparatorArea.Bottom() = aSeparatorArea.Top() + LogicToPixel( Size( 0, 8 ), MapUnit::MapAppFont ).Height();
+ aSeparatorArea.Bottom() = aSeparatorArea.Top() + LogicToPixel(Size(0, 8), MapMode(MapUnit::MapAppFont)).Height();
m_aSeparator->SetPosSizePixel( aSeparatorArea.TopLeft(), aSeparatorArea.GetSize() );
tools::Rectangle aTextArea( aPlayground );
diff --git a/extensions/source/propctrlr/listselectiondlg.cxx b/extensions/source/propctrlr/listselectiondlg.cxx
index d1ce396bac15..2bc3d154c9c9 100644
--- a/extensions/source/propctrlr/listselectiondlg.cxx
+++ b/extensions/source/propctrlr/listselectiondlg.cxx
@@ -39,7 +39,7 @@ namespace pcr
OSL_PRECOND( m_xListBox.is(), "ListSelectionDialog::ListSelectionDialog: invalid list box!" );
get(m_pEntries, "treeview");
- Size aSize(LogicToPixel(Size(85, 97), MapUnit::MapAppFont));
+ Size aSize(LogicToPixel(Size(85, 97), MapMode(MapUnit::MapAppFont)));
m_pEntries->set_width_request(aSize.Width());
m_pEntries->set_height_request(aSize.Height());
diff --git a/extensions/source/scanner/grid.cxx b/extensions/source/scanner/grid.cxx
index 47f90a77061e..b0cc583aca43 100644
--- a/extensions/source/scanner/grid.cxx
+++ b/extensions/source/scanner/grid.cxx
@@ -200,7 +200,7 @@ void GridWindow::onResize()
Size GridWindow::GetOptimalSize() const
{
- return LogicToPixel(Size(240, 200), MapUnit::MapAppFont);
+ return LogicToPixel(Size(240, 200), MapMode(MapUnit::MapAppFont));
}
GridDialog::GridDialog(double* pXValues, double* pYValues, int nValues, vcl::Window* pParent )
diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx
index 1d5baeda124f..e515a763af39 100644
--- a/extensions/source/scanner/sanedlg.cxx
+++ b/extensions/source/scanner/sanedlg.cxx
@@ -195,7 +195,7 @@ public:
}
virtual Size GetOptimalSize() const override
{
- Size aSize(LogicToPixel(Size(PREVIEW_WIDTH, PREVIEW_HEIGHT), MapUnit::MapAppFont));
+ Size aSize(LogicToPixel(Size(PREVIEW_WIDTH, PREVIEW_HEIGHT), MapMode(MapUnit::MapAppFont)));
aSize.setWidth(aSize.getWidth()+1);
aSize.setHeight(aSize.getHeight()+1);
return aSize;
@@ -222,7 +222,7 @@ SaneDlg::SaneDlg( vcl::Window* pParent, Sane& rSane, bool bScanEnabled ) :
get(mpScanButton, "scanButton");
get(mpButtonOption, "optionsButton");
get(mpOptionTitle, "optionTitleLabel");
- Size aSize(LogicToPixel(Size(130, 102), MapUnit::MapAppFont));
+ Size aSize(LogicToPixel(Size(130, 102), MapMode(MapUnit::MapAppFont)));
mpOptionTitle->set_width_request(aSize.Width());
mpOptionTitle->set_height_request(aSize.Height() / 2);
get(mpOptionDescTxt, "optionsDescLabel");
@@ -944,7 +944,7 @@ void ScanPreview::UpdatePreviewBounds()
void ScanPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
{
Window::Paint(rRenderContext, rRect);
- rRenderContext.SetMapMode(MapUnit::MapAppFont);
+ rRenderContext.SetMapMode(MapMode(MapUnit::MapAppFont));
rRenderContext.SetFillColor(Color(COL_WHITE));
rRenderContext.SetLineColor(Color(COL_WHITE));
rRenderContext.DrawRect(tools::Rectangle(Point(0, 0),
@@ -1247,7 +1247,7 @@ void ScanPreview::DrawDrag(vcl::RenderContext& rRenderContext)
mbDragDrawn = true;
rRenderContext.SetRasterOp(eROP);
- rRenderContext.SetMapMode(MapUnit::MapAppFont);
+ rRenderContext.SetMapMode(MapMode(MapUnit::MapAppFont));
}
Point ScanPreview::GetPixelPos( const Point& rIn) const
@@ -1260,12 +1260,12 @@ Point ScanPreview::GetPixelPos( const Point& rIn) const
/ ( maMaxBottomRight.Y() - maMinTopLeft.Y() ) )
);
- return LogicToPixel(aConvert, MapUnit::MapAppFont);
+ return LogicToPixel(aConvert, MapMode(MapUnit::MapAppFont));
}
Point ScanPreview::GetLogicPos(const Point& rIn) const
{
- Point aConvert = PixelToLogic(rIn, MapUnit::MapAppFont);
+ Point aConvert = PixelToLogic(rIn, MapMode(MapUnit::MapAppFont));
if( aConvert.X() < 0 )
aConvert.X() = 0;
if( aConvert.X() >= PREVIEW_WIDTH )