summaryrefslogtreecommitdiff
path: root/chart2
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 /chart2
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 'chart2')
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx2
-rw-r--r--chart2/source/controller/dialogs/DataBrowser.cxx14
-rw-r--r--chart2/source/controller/dialogs/dlg_CreationWizard.cxx4
-rw-r--r--chart2/source/controller/dialogs/dlg_DataEditor.cxx2
-rw-r--r--chart2/source/controller/dialogs/tp_ChartType.cxx2
-rw-r--r--chart2/source/controller/drawinglayer/ViewElementListProvider.cxx2
-rw-r--r--chart2/source/controller/main/ChartWindow.cxx2
-rw-r--r--chart2/source/controller/main/ElementSelector.cxx2
-rw-r--r--chart2/source/view/main/ChartView.cxx2
9 files changed, 16 insertions, 16 deletions
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
index f5205d1691a6..5aa508d93ed0 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
@@ -388,7 +388,7 @@ void lcl_correctSymbolSizeForBitmaps( chart2::Symbol& rSymbol )
if( xProp->getPropertyValue( "SizePixel" ) >>= aAWTPixelSize )
{
Size aPixelSize(aAWTPixelSize.Width,aAWTPixelSize.Height);
- Size aNewSize = ( OutputDevice::LogicToLogic( aPixelSize, MapUnit::MapPixel, MapUnit::Map100thMM ));
+ Size aNewSize = OutputDevice::LogicToLogic(aPixelSize, MapMode(MapUnit::MapPixel), MapMode(MapUnit::Map100thMM));
aSize = awt::Size( aNewSize.Width(), aNewSize.Height() );
if( aSize.Width == 0 && aSize.Height == 0 )
diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx
index e1978f0e44e3..02b2856d1ae1 100644
--- a/chart2/source/controller/dialogs/DataBrowser.cxx
+++ b/chart2/source/controller/dialogs/DataBrowser.cxx
@@ -244,29 +244,29 @@ void SeriesHeader::SetPos( const Point & rPos )
// chart type symbol
Size aSize( nSymbolHeight, nSymbolHeight );
- aSize = m_pDevice->LogicToPixel( aSize, MapUnit::MapAppFont );
+ aSize = m_pDevice->LogicToPixel(aSize, MapMode(MapUnit::MapAppFont));
m_spSymbol->set_width_request(aSize.Width());
m_spSymbol->set_height_request(aSize.Height());
// series name edit field
aSize.setWidth(nSymbolDistance);
- aSize = m_pDevice->LogicToPixel( aSize, MapUnit::MapAppFont );
+ aSize = m_pDevice->LogicToPixel(aSize, MapMode(MapUnit::MapAppFont));
m_spSeriesName->set_margin_left(aSize.Width() + 2);
aSize.setWidth( m_nWidth - nSymbolHeight - nSymbolDistance );
sal_Int32 nHeight = 12;
aSize.setHeight( nHeight );
- aSize = m_pDevice->LogicToPixel( aSize, MapUnit::MapAppFont );
+ aSize = m_pDevice->LogicToPixel(aSize, MapMode(MapUnit::MapAppFont));
m_spSeriesName->set_width_request(aSize.Width());
m_spSeriesName->set_height_request(aSize.Height());
// color bar
aSize.setWidth(1);
- aSize = m_pDevice->LogicToPixel( aSize, MapUnit::MapAppFont );
+ aSize = m_pDevice->LogicToPixel(aSize, MapMode(MapUnit::MapAppFont));
m_spColorBar->set_margin_left(aSize.Width() + 2);
nHeight = 3;
aSize.setWidth( m_nWidth - 1 );
aSize.setHeight( nHeight );
- aSize = m_pDevice->LogicToPixel( aSize, MapUnit::MapAppFont );
+ aSize = m_pDevice->LogicToPixel(aSize, MapMode(MapUnit::MapAppFont));
m_spColorBar->set_width_request(aSize.Width());
m_spColorBar->set_height_request(aSize.Height());
}
@@ -279,7 +279,7 @@ void SeriesHeader::SetWidth( sal_Int32 nWidth )
void SeriesHeader::SetPixelWidth( sal_Int32 nWidth )
{
- SetWidth( m_pDevice->PixelToLogic( Size( nWidth, 0 ), MapUnit::MapAppFont ).getWidth());
+ SetWidth( m_pDevice->PixelToLogic(Size(nWidth, 0), MapMode(MapUnit::MapAppFont)).getWidth());
}
void SeriesHeader::SetChartType(
@@ -578,7 +578,7 @@ void DataBrowser::RenewTable()
OUString aDefaultSeriesName(SchResId(STR_COLUMN_LABEL));
replaceParamterInString( aDefaultSeriesName, "%COLUMNNUMBER", OUString::number( 24 ) );
sal_Int32 nColumnWidth = GetDataWindow().GetTextWidth( aDefaultSeriesName )
- + GetDataWindow().LogicToPixel( Point( 4 + impl::SeriesHeader::GetRelativeAppFontXPosForNameField(), 0 ), MapUnit::MapAppFont ).X();
+ + GetDataWindow().LogicToPixel(Point(4 + impl::SeriesHeader::GetRelativeAppFontXPosForNameField(), 0), MapMode(MapUnit::MapAppFont)).X();
sal_Int32 nColumnCount = m_apDataBrowserModel->getColumnCount();
// nRowCount is a member of a base class
sal_Int32 nRowCountLocal = m_apDataBrowserModel->getMaxRowCount();
diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
index 4eeeb775da4e..83531433d1f7 100644
--- a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
+++ b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
@@ -72,8 +72,8 @@ CreationWizard::CreationWizard(vcl::Window* pParent, const uno::Reference<frame:
SetRoadmapHelpId(HID_SCH_WIZARD_ROADMAP);
SetRoadmapInteractive(true);
- Size aAdditionalRoadmapSize(LogicToPixel(Size(85, 0), MapUnit::MapAppFont));
- Size aSize(LogicToPixel(Size(CHART_WIZARD_PAGEWIDTH, CHART_WIZARD_PAGEHEIGHT), MapUnit::MapAppFont));
+ Size aAdditionalRoadmapSize(LogicToPixel(Size(85, 0), MapMode(MapUnit::MapAppFont)));
+ Size aSize(LogicToPixel(Size(CHART_WIZARD_PAGEWIDTH, CHART_WIZARD_PAGEHEIGHT), MapMode(MapUnit::MapAppFont)));
aSize.Width() += aAdditionalRoadmapSize.Width();
SetSizePixel(aSize);
diff --git a/chart2/source/controller/dialogs/dlg_DataEditor.cxx b/chart2/source/controller/dialogs/dlg_DataEditor.cxx
index a7ac832c2e4e..9392444e8494 100644
--- a/chart2/source/controller/dialogs/dlg_DataEditor.cxx
+++ b/chart2/source/controller/dialogs/dlg_DataEditor.cxx
@@ -52,7 +52,7 @@ DataEditor::DataEditor(vcl::Window* pParent,
m_xBrwData->set_hexpand(true);
m_xBrwData->set_vexpand(true);
m_xBrwData->set_expand(true);
- Size aSize(m_xBrwData->LogicToPixel(Size(232, 121), MapUnit::MapAppFont));
+ Size aSize(m_xBrwData->LogicToPixel(Size(232, 121), MapMode(MapUnit::MapAppFont)));
m_xBrwData->set_width_request(aSize.Width());
m_xBrwData->set_height_request(aSize.Height());
m_xBrwData->Show();
diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx
index a393aaba1eb9..acaae5c1f7a4 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.cxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.cxx
@@ -679,7 +679,7 @@ ChartTypeTabPage::ChartTypeTabPage(vcl::Window* pParent
get(m_pFT_ChooseType, "FT_CAPTION_FOR_WIZARD");
get(m_pMainTypeList, "charttype");
get(m_pSubTypeList, "subtype");
- Size aSize(m_pSubTypeList->LogicToPixel(Size(150, 50), MapUnit::MapAppFont));
+ Size aSize(m_pSubTypeList->LogicToPixel(Size(150, 50), MapMode(MapUnit::MapAppFont)));
m_pSubTypeList->set_width_request(aSize.Width());
m_pSubTypeList->set_height_request(aSize.Height());
diff --git a/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx b/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
index 6d3f05666fce..f7e28f69a8b6 100644
--- a/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
+++ b/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
@@ -177,7 +177,7 @@ Graphic ViewElementListProvider::GetSymbolGraphic( sal_Int32 nStandardSymbol, co
Graphic aGraph(aMeta);
Size aSize = pObj->GetSnapRect().GetSize();
aGraph.SetPrefSize(aSize);
- aGraph.SetPrefMapMode(MapUnit::Map100thMM);
+ aGraph.SetPrefMapMode(MapMode(MapUnit::Map100thMM));
pView->UnmarkAll();
pObj=pPage->RemoveObject(0);
diff --git a/chart2/source/controller/main/ChartWindow.cxx b/chart2/source/controller/main/ChartWindow.cxx
index 4dccd6ebaf29..8949e8dbc58a 100644
--- a/chart2/source/controller/main/ChartWindow.cxx
+++ b/chart2/source/controller/main/ChartWindow.cxx
@@ -332,7 +332,7 @@ void ChartWindow::LogicInvalidate(const tools::Rectangle* pRectangle)
if (IsMapModeEnabled())
{
if (GetMapMode().GetMapUnit() == MapUnit::Map100thMM)
- aRectangle = OutputDevice::LogicToLogic(aRectangle, MapUnit::Map100thMM, MapUnit::MapTwip);
+ aRectangle = OutputDevice::LogicToLogic(aRectangle, MapMode(MapUnit::Map100thMM), MapMode(MapUnit::MapTwip));
}
else
{
diff --git a/chart2/source/controller/main/ElementSelector.cxx b/chart2/source/controller/main/ElementSelector.cxx
index 4af2f3d54e2e..4f660cf8cb8b 100644
--- a/chart2/source/controller/main/ElementSelector.cxx
+++ b/chart2/source/controller/main/ElementSelector.cxx
@@ -301,7 +301,7 @@ uno::Reference< awt::XWindow > SAL_CALL ElementSelectorToolbarController::create
{
m_apSelectorListBox.reset( VclPtr<SelectorListBox>::Create( pParent, WB_DROPDOWN|WB_AUTOHSCROLL|WB_BORDER ) );
::Size aLogicalSize( 95, 160 );
- ::Size aPixelSize = m_apSelectorListBox->LogicToPixel( aLogicalSize, MapUnit::MapAppFont );
+ ::Size aPixelSize = m_apSelectorListBox->LogicToPixel(aLogicalSize, MapMode(MapUnit::MapAppFont));
m_apSelectorListBox->SetSizePixel( aPixelSize );
m_apSelectorListBox->SetDropDownLineCount( 5 );
}
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index 35f4751f397c..e13d6b9cbc56 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -3388,7 +3388,7 @@ void ChartView::createShapes3D()
if( pWindow->GetSizePixel().Width() == 0 || pWindow->GetSizePixel().Height() == 0 )
{
awt::Size aPageSize = mrChartModel.getVisualAreaSize( embed::Aspects::MSOLE_CONTENT );
- Size aSize = pWindow->LogicToPixel( Size(aPageSize.Width,aPageSize.Height), MapUnit::Map100thMM );
+ Size aSize = pWindow->LogicToPixel(Size(aPageSize.Width, aPageSize.Height), MapMode(MapUnit::Map100thMM));
pWindow->SetSizePixel(aSize);
}
pWindow->Show();