summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-09-20 16:41:39 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-10-05 06:51:20 +0000
commit954f752cf10fc6a8777af2a6a93e496688464687 (patch)
tree0fc776cdcb6ad9b1d2b9673ac044bb5b4f496972 /dbaccess
parentc1e18e05a53c1d55afe36a887ca25f74f3f1d32d (diff)
convert MapUnit to scoped enum
I left a prefix on the names "Map" so that I would not have to re-arrange each name too much, since I can't start identifiers with digits like "100thMM" And remove RSC_EXTRAMAPUNIT, which doesn't seem to be doing anything anymore. Change-Id: I5187824aa87e30caf5357b51b5384b5ab919d224 Reviewed-on: https://gerrit.libreoffice.org/29096 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ext/macromigration/macromigrationdialog.cxx2
-rw-r--r--dbaccess/source/ui/app/AppDetailPageHelper.cxx2
-rw-r--r--dbaccess/source/ui/app/AppDetailView.cxx4
-rw-r--r--dbaccess/source/ui/app/AppSwapWindow.cxx2
-rw-r--r--dbaccess/source/ui/app/AppTitleWindow.cxx4
-rw-r--r--dbaccess/source/ui/app/AppView.cxx4
-rw-r--r--dbaccess/source/ui/browser/brwview.cxx2
-rw-r--r--dbaccess/source/ui/browser/unodatbr.cxx4
-rw-r--r--dbaccess/source/ui/control/FieldDescControl.cxx8
-rw-r--r--dbaccess/source/ui/control/RelationControl.cxx2
-rw-r--r--dbaccess/source/ui/control/VertSplitView.cxx2
-rw-r--r--dbaccess/source/ui/dlg/adminpages.cxx2
-rw-r--r--dbaccess/source/ui/dlg/adtabdlg.cxx2
-rw-r--r--dbaccess/source/ui/dlg/dbfindex.cxx2
-rw-r--r--dbaccess/source/ui/dlg/dbwiz.cxx2
-rw-r--r--dbaccess/source/ui/dlg/dbwizsetup.cxx2
-rw-r--r--dbaccess/source/ui/dlg/indexdialog.cxx4
-rw-r--r--dbaccess/source/ui/dlg/sqlmessage.cxx12
-rw-r--r--dbaccess/source/ui/misc/UITools.cxx8
-rw-r--r--dbaccess/source/ui/misc/WCopyTable.cxx10
-rw-r--r--dbaccess/source/ui/querydesign/querycontainerwindow.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/querydlg.cxx2
22 files changed, 42 insertions, 42 deletions
diff --git a/dbaccess/source/ext/macromigration/macromigrationdialog.cxx b/dbaccess/source/ext/macromigration/macromigrationdialog.cxx
index ab736b1ad026..ad6916f1b6af 100644
--- a/dbaccess/source/ext/macromigration/macromigrationdialog.cxx
+++ b/dbaccess/source/ext/macromigration/macromigrationdialog.cxx
@@ -137,7 +137,7 @@ namespace dbmm
declarePath( PATH_DEFAULT, {STATE_CLOSE_SUB_DOCS, STATE_BACKUP_DBDOC, STATE_MIGRATE, STATE_SUMMARY} );
- SetPageSizePixel( LogicToPixel( ::Size( TAB_PAGE_WIDTH, TAB_PAGE_HEIGHT ), MAP_APPFONT ) );
+ SetPageSizePixel( LogicToPixel( ::Size( TAB_PAGE_WIDTH, TAB_PAGE_HEIGHT ), MapUnit::MapAppFont ) );
SetRoadmapInteractive( true );
enableAutomaticNextButtonState();
defaultButton( WizardButtonFlags::NEXT );
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
index 2b2867ec23c6..74706f5a3889 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
@@ -929,7 +929,7 @@ void OAppDetailPageHelper::Resize()
vcl::Window* pWindow = getCurrentView();
if ( pWindow )
{
- Size aFLSize = LogicToPixel( Size( 2, 6 ), MAP_APPFONT );
+ Size aFLSize = LogicToPixel( Size( 2, 6 ), MapUnit::MapAppFont );
sal_Int32 n6PPT = aFLSize.Height();
long nHalfOutputWidth = static_cast<long>(nOutputWidth * 0.5);
diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx
index dfa9c280ea2d..d19fca85ccc7 100644
--- a/dbaccess/source/ui/app/AppDetailView.cxx
+++ b/dbaccess/source/ui/app/AppDetailView.cxx
@@ -444,7 +444,7 @@ void OTasksWindow::Resize()
long nOutputWidth = aOutputSize.Width();
long nOutputHeight = aOutputSize.Height();
- Size aFLSize = LogicToPixel( Size( 2, 6 ), MAP_APPFONT );
+ Size aFLSize = LogicToPixel( Size( 2, 6 ), MapUnit::MapAppFont );
sal_Int32 n6PPT = aFLSize.Height();
long nHalfOutputWidth = static_cast<long>(nOutputWidth * 0.5);
@@ -542,7 +542,7 @@ OApplicationDetailView::OApplicationDetailView(OAppBorderWindow& _rParent,Previe
m_aContainer->Show();
- const long nFrameWidth = LogicToPixel( Size( 3, 0 ), MAP_APPFONT ).Width();
+ const long nFrameWidth = LogicToPixel( Size( 3, 0 ), MapUnit::MapAppFont ).Width();
m_aHorzSplitter->SetPosSizePixel( Point(0,50), Size(0,nFrameWidth) );
// now set the components at the base class
set(m_aContainer.get(),m_aTasks.get());
diff --git a/dbaccess/source/ui/app/AppSwapWindow.cxx b/dbaccess/source/ui/app/AppSwapWindow.cxx
index 644b846b86ae..084d79d56e56 100644
--- a/dbaccess/source/ui/app/AppSwapWindow.cxx
+++ b/dbaccess/source/ui/app/AppSwapWindow.cxx
@@ -63,7 +63,7 @@ void OApplicationSwapWindow::dispose()
void OApplicationSwapWindow::Resize()
{
- Size aFLSize = LogicToPixel( Size( 8, 0 ), MAP_APPFONT );
+ Size aFLSize = LogicToPixel( Size( 8, 0 ), MapUnit::MapAppFont );
long nX = 0;
if ( m_aIconControl->GetEntryCount() != 0 )
nX = m_aIconControl->GetBoundingBox( m_aIconControl->GetEntry(0) ).GetWidth() + aFLSize.Width();
diff --git a/dbaccess/source/ui/app/AppTitleWindow.cxx b/dbaccess/source/ui/app/AppTitleWindow.cxx
index 7c89754c0da0..d11608cfcdd5 100644
--- a/dbaccess/source/ui/app/AppTitleWindow.cxx
+++ b/dbaccess/source/ui/app/AppTitleWindow.cxx
@@ -83,7 +83,7 @@ void OTitleWindow::Resize()
long nOutputWidth = aOutputSize.Width();
long nOutputHeight = aOutputSize.Height();
- Size aTextSize = LogicToPixel( Size( 6, 3 ), MAP_APPFONT );
+ Size aTextSize = LogicToPixel( Size( 6, 3 ), MapUnit::MapAppFont );
sal_Int32 nXOffset = aTextSize.Width();
sal_Int32 nYOffset = aTextSize.Height();
sal_Int32 nHeight = GetTextHeight() + 2*nYOffset;
@@ -118,7 +118,7 @@ void OTitleWindow::GetFocus()
long OTitleWindow::GetWidthPixel() const
{
- Size aTextSize = LogicToPixel( Size( 12, 0 ), MAP_APPFONT );
+ Size aTextSize = LogicToPixel( Size( 12, 0 ), MapUnit::MapAppFont );
sal_Int32 nWidth = GetTextWidth(m_aTitle->GetText()) + 2*aTextSize.Width();
return nWidth;
diff --git a/dbaccess/source/ui/app/AppView.cxx b/dbaccess/source/ui/app/AppView.cxx
index cb07e831cda7..fdb2f078a478 100644
--- a/dbaccess/source/ui/app/AppView.cxx
+++ b/dbaccess/source/ui/app/AppView.cxx
@@ -113,7 +113,7 @@ void OAppBorderWindow::Resize()
long nOutputHeight = aOutputSize.Height();
long nX = 0;
- Size aFLSize = LogicToPixel( Size( 3, 8 ), MAP_APPFONT );
+ Size aFLSize = LogicToPixel( Size( 3, 8 ), MapUnit::MapAppFont );
if ( m_pPanel )
{
OApplicationSwapWindow* pSwap = getPanel();
@@ -244,7 +244,7 @@ void OApplicationView::resizeDocumentView(Rectangle& _rPlayground)
{
if ( m_pWin && !_rPlayground.IsEmpty() )
{
- Size aFLSize = LogicToPixel( Size( 3, 3 ), MAP_APPFONT );
+ Size aFLSize = LogicToPixel( Size( 3, 3 ), MapUnit::MapAppFont );
_rPlayground.Move( aFLSize.A(),aFLSize.B() );
Size aOldSize = _rPlayground.GetSize();
_rPlayground.SetSize( Size(aOldSize.A() - 2*aFLSize.A(), aOldSize.B() - 2*aFLSize.B()) );
diff --git a/dbaccess/source/ui/browser/brwview.cxx b/dbaccess/source/ui/browser/brwview.cxx
index d041f10fcec4..f40bcf13f009 100644
--- a/dbaccess/source/ui/browser/brwview.cxx
+++ b/dbaccess/source/ui/browser/brwview.cxx
@@ -215,7 +215,7 @@ void UnoDataBrowserView::resizeDocumentView(Rectangle& _rPlayground)
if (m_pStatus && m_pStatus->IsVisible())
{
Size aStatusSize(aPlaygroundPos.X(), GetTextHeight() + 2);
- aStatusSize = LogicToPixel(aStatusSize, MAP_APPFONT);
+ aStatusSize = LogicToPixel(aStatusSize, MapUnit::MapAppFont);
aStatusSize.Width() = aTreeViewSize.Width() - 2 - 2;
Point aStatusPos( aPlaygroundPos.X() + 2, aTreeViewPos.Y() + aTreeViewSize.Height() - aStatusSize.Height() );
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index da2d7c9d275c..f42a38633b91 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -348,7 +348,7 @@ bool SbaTableQueryBrowser::Construct(vcl::Window* pParent)
{
// create controls and set sizes
- const long nFrameWidth = getBrowserView()->LogicToPixel( ::Size( 3, 0 ), MAP_APPFONT ).Width();
+ const long nFrameWidth = getBrowserView()->LogicToPixel( ::Size( 3, 0 ), MapUnit::MapAppFont ).Width();
m_pSplitter = VclPtr<Splitter>::Create(getBrowserView(),WB_HSCROLL);
m_pSplitter->SetPosSizePixel( ::Point(0,0), ::Size(nFrameWidth,0) );
@@ -364,7 +364,7 @@ bool SbaTableQueryBrowser::Construct(vcl::Window* pParent)
m_pTreeView->SetHelpId(HID_CTL_TREEVIEW);
// a default pos for the splitter, so that the listbox is about 80 (logical) pixels wide
- m_pSplitter->SetSplitPosPixel( getBrowserView()->LogicToPixel( ::Size( 80, 0 ), MAP_APPFONT ).Width() );
+ m_pSplitter->SetSplitPosPixel( getBrowserView()->LogicToPixel( ::Size( 80, 0 ), MapUnit::MapAppFont ).Width() );
getBrowserView()->setSplitter(m_pSplitter);
getBrowserView()->setTreeView(m_pTreeView);
diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx
index b9735ec0c03b..812c2049a622 100644
--- a/dbaccess/source/ui/control/FieldDescControl.cxx
+++ b/dbaccess/source/ui/control/FieldDescControl.cxx
@@ -290,7 +290,7 @@ void OFieldDescControl::CheckScrollBars()
// Which one is the last one that fits?
sal_uInt16 nLastVisible;
const sal_Int32 nControlHeight = GetMaxControlHeight();
- const sal_Int32 nControl_Spacing_y = LogicToPixel(Size(0, CONTROL_SPACING_Y),MAP_APPFONT).Height();
+ const sal_Int32 nControl_Spacing_y = LogicToPixel(Size(0, CONTROL_SPACING_Y),MapUnit::MapAppFont).Height();
if (bNeedHScrollBar)
nLastVisible = static_cast<sal_uInt16>((szOverallSize.Height() - nControl_Spacing_y - nHScrollHeight) / (nControl_Spacing_y + nControlHeight));
else
@@ -369,7 +369,7 @@ void OFieldDescControl::ScrollAllAggregates()
if (m_nOldVThumb != m_pVertScroll->GetThumbPos())
{
const sal_Int32 nControlHeight = GetMaxControlHeight();
- const sal_Int32 nControl_Spacing_y = LogicToPixel(Size(0, CONTROL_SPACING_Y),MAP_APPFONT).Height();
+ const sal_Int32 nControl_Spacing_y = LogicToPixel(Size(0, CONTROL_SPACING_Y),MapUnit::MapAppFont).Height();
nDeltaY = (m_nOldVThumb - m_pVertScroll->GetThumbPos()) * (nControl_Spacing_y + nControlHeight);
m_nOldVThumb = m_pVertScroll->GetThumbPos();
}
@@ -994,7 +994,7 @@ void OFieldDescControl::SetPosSize( VclPtr<Control>& rControl, long nRow, sal_uI
const sal_Int32 nControlHeight = GetMaxControlHeight();
Size aSize(0,nControlHeight);
if ( isRightAligned() && nCol )
- aSize.Width() = LogicToPixel(Size(m_nWidth, 0),MAP_APPFONT).Width();
+ aSize.Width() = LogicToPixel(Size(m_nWidth, 0),MapUnit::MapAppFont).Width();
else
{
switch( nCol )
@@ -1041,7 +1041,7 @@ void OFieldDescControl::SetPosSize( VclPtr<Control>& rControl, long nRow, sal_uI
rControl->SetSizePixel( aSize );
aSize = rControl->GetSizePixel( );
- const sal_Int32 nControl_Spacing_y = LogicToPixel(Size(0, CONTROL_SPACING_Y),MAP_APPFONT).Height();
+ const sal_Int32 nControl_Spacing_y = LogicToPixel(Size(0, CONTROL_SPACING_Y),MapUnit::MapAppFont).Height();
aPosition.Y() += ((nRow+1)*nControl_Spacing_y) +
(nRow*nControlHeight);
diff --git a/dbaccess/source/ui/control/RelationControl.cxx b/dbaccess/source/ui/control/RelationControl.cxx
index ea6987518c1e..f996db591258 100644
--- a/dbaccess/source/ui/control/RelationControl.cxx
+++ b/dbaccess/source/ui/control/RelationControl.cxx
@@ -435,7 +435,7 @@ namespace dbaui
Size ORelationControl::GetOptimalSize() const
{
- return LogicToPixel(Size(140, 80), MAP_APPFONT);
+ return LogicToPixel(Size(140, 80), MapUnit::MapAppFont);
}
// class OTableListBoxControl
diff --git a/dbaccess/source/ui/control/VertSplitView.cxx b/dbaccess/source/ui/control/VertSplitView.cxx
index 45e11a6c20e1..57a61ecbcb8e 100644
--- a/dbaccess/source/ui/control/VertSplitView.cxx
+++ b/dbaccess/source/ui/control/VertSplitView.cxx
@@ -156,7 +156,7 @@ void OSplitterView::setSplitter(Splitter* _pSplitter)
m_pSplitter = _pSplitter;
if ( m_pSplitter )
{
- m_pSplitter->SetSplitPosPixel( LogicToPixel( Size( SPLITTER_WIDTH, 0 ), MAP_APPFONT ).Width() );
+ m_pSplitter->SetSplitPosPixel( LogicToPixel( Size( SPLITTER_WIDTH, 0 ), MapUnit::MapAppFont ).Width() );
m_pSplitter->SetSplitHdl( LINK(this, OSplitterView, SplitHdl) );
m_pSplitter->Show();
LINK( this, OSplitterView, SplitHdl ).Call(m_pSplitter);
diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx
index 0a5f62e811bb..2b3100c3a460 100644
--- a/dbaccess/source/ui/dlg/adminpages.cxx
+++ b/dbaccess/source/ui/dlg/adminpages.cxx
@@ -278,7 +278,7 @@ namespace dbaui
aReference.Y() += _rReference.GetSizePixel().Height();
const vcl::Window* pConverter = _rControl.GetParent();
- Size aOffset = pConverter->LogicToPixel( Size( _nIndentAppFont, ( _eRelation == RelatedControls ? 3 : 6 ) ), MAP_APPFONT );
+ Size aOffset = pConverter->LogicToPixel( Size( _nIndentAppFont, ( _eRelation == RelatedControls ? 3 : 6 ) ), MapUnit::MapAppFont );
Point aControlPos( aReference.X() + aOffset.Width(), aReference.Y() + aOffset.Height() );
_rControl.SetPosPixel( aControlPos );
diff --git a/dbaccess/source/ui/dlg/adtabdlg.cxx b/dbaccess/source/ui/dlg/adtabdlg.cxx
index 71e5f26e9b18..1aa01c2182c0 100644
--- a/dbaccess/source/ui/dlg/adtabdlg.cxx
+++ b/dbaccess/source/ui/dlg/adtabdlg.cxx
@@ -322,7 +322,7 @@ OAddTableDlg::OAddTableDlg( vcl::Window* pParent, IAddTableDialogContext& _rCont
get(m_pTableList, "tablelist");
get(m_pQueryList, "querylist");
- Size aSize(LogicToPixel(Size(106 , 122), MAP_APPFONT));
+ Size aSize(LogicToPixel(Size(106 , 122), MapUnit::MapAppFont));
m_pTableList->set_height_request(aSize.Height());
m_pTableList->set_width_request(aSize.Width());
get(m_pQueryList, "querylist");
diff --git a/dbaccess/source/ui/dlg/dbfindex.cxx b/dbaccess/source/ui/dlg/dbfindex.cxx
index 3ed234ce954d..2495ff2316df 100644
--- a/dbaccess/source/ui/dlg/dbfindex.cxx
+++ b/dbaccess/source/ui/dlg/dbfindex.cxx
@@ -50,7 +50,7 @@ ODbaseIndexDialog::ODbaseIndexDialog(vcl::Window * pParent, const OUString& aDat
get(m_pIndexes, "frame");
get(m_pLB_TableIndexes, "tableindex");
get(m_pLB_FreeIndexes, "freeindex");
- Size aSize(LogicToPixel(Size(76, 98), MAP_APPFONT));
+ Size aSize(LogicToPixel(Size(76, 98), MapUnit::MapAppFont));
m_pLB_TableIndexes->set_height_request(aSize.Height());
m_pLB_TableIndexes->set_width_request(aSize.Width());
m_pLB_FreeIndexes->set_height_request(aSize.Height());
diff --git a/dbaccess/source/ui/dlg/dbwiz.cxx b/dbaccess/source/ui/dlg/dbwiz.cxx
index 2062b4269d4f..3eb5c8055dfc 100644
--- a/dbaccess/source/ui/dlg/dbwiz.cxx
+++ b/dbaccess/source/ui/dlg/dbwiz.cxx
@@ -78,7 +78,7 @@ ODbTypeWizDialog::ODbTypeWizDialog(vcl::Window* _pParent
m_pImpl->translateProperties(xDatasource, *m_pOutSet);
m_eType = dbaui::ODbDataSourceAdministrationHelper::getDatasourceType(*m_pOutSet);
- SetPageSizePixel(LogicToPixel(::Size(PAGE_X, PAGE_Y), MAP_APPFONT));
+ SetPageSizePixel(LogicToPixel(::Size(PAGE_X, PAGE_Y), MapUnit::MapAppFont));
defaultButton(WizardButtonFlags::NEXT);
enableButtons(WizardButtonFlags::FINISH, false);
enableAutomaticNextButtonState();
diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx
index 3e1c2200216b..523a0a314090 100644
--- a/dbaccess/source/ui/dlg/dbwizsetup.cxx
+++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx
@@ -145,7 +145,7 @@ ODbTypeWizDialogSetup::ODbTypeWizDialogSetup(vcl::Window* _pParent
m_pImpl->translateProperties(xDatasource, *m_pOutSet);
- SetPageSizePixel(LogicToPixel(::Size(WIZARD_PAGE_X, WIZARD_PAGE_Y), MAP_APPFONT));
+ SetPageSizePixel(LogicToPixel(::Size(WIZARD_PAGE_X, WIZARD_PAGE_Y), MapUnit::MapAppFont));
defaultButton(WizardButtonFlags::NEXT);
enableButtons(WizardButtonFlags::FINISH, true);
enableAutomaticNextButtonState();
diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx
index 53ecfa10e867..d2758b0d51ac 100644
--- a/dbaccess/source/ui/dlg/indexdialog.cxx
+++ b/dbaccess/source/ui/dlg/indexdialog.cxx
@@ -193,7 +193,7 @@ namespace dbaui
maLcResetCmdImg = get<FixedImage>("image5")->GetImage();
get(m_pIndexList, "INDEX_LIST");
- Size aSize(LogicToPixel(Size(70, 97), MAP_APPFONT));
+ Size aSize(LogicToPixel(Size(70, 97), MapUnit::MapAppFont));
m_pIndexList->set_width_request(aSize.Width());
m_pIndexList->set_height_request(aSize.Height());
get(m_pIndexDetails, "INDEX_DETAILS");
@@ -202,7 +202,7 @@ namespace dbaui
get(m_pUnique, "UNIQUE");
get(m_pFieldsLabel, "FIELDS_LABEL");
get(m_pFields, "FIELDS");
- aSize = LogicToPixel(Size(128, 61), MAP_APPFONT);
+ aSize = LogicToPixel(Size(128, 61), MapUnit::MapAppFont);
m_pFields->set_width_request(aSize.Width());
m_pFields->set_height_request(aSize.Height());
get(m_pClose, "close");
diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx
index 3a5cd53d4c82..2d4660d03f3e 100644
--- a/dbaccess/source/ui/dlg/sqlmessage.cxx
+++ b/dbaccess/source/ui/dlg/sqlmessage.cxx
@@ -303,11 +303,11 @@ OExceptionChainDialog::OExceptionChainDialog(vcl::Window* pParent, const Excepti
, m_aExceptions(_rExceptions)
{
get(m_pExceptionList, "list");
- Size aListSize(LogicToPixel(Size(85, 93), MAP_APPFONT));
+ Size aListSize(LogicToPixel(Size(85, 93), MapUnit::MapAppFont));
m_pExceptionList->set_width_request(aListSize.Width());
m_pExceptionList->set_height_request(aListSize.Height());
get(m_pExceptionText, "description");
- Size aTextSize(LogicToPixel(Size(125 , 93), MAP_APPFONT));
+ Size aTextSize(LogicToPixel(Size(125 , 93), MapUnit::MapAppFont));
m_pExceptionText->set_width_request(aTextSize.Width());
m_pExceptionText->set_height_request(aTextSize.Height());
@@ -398,8 +398,8 @@ namespace
{
void lcl_positionInAppFont( const vcl::Window& _rParent, vcl::Window& _rChild, long _nX, long _nY, long Width, long Height )
{
- Point aPos = _rParent.LogicToPixel( Point( _nX, _nY ), MAP_APPFONT );
- Size aSize = _rParent.LogicToPixel( Size( Width, Height ), MAP_APPFONT );
+ Point aPos = _rParent.LogicToPixel( Point( _nX, _nY ), MapUnit::MapAppFont );
+ Size aSize = _rParent.LogicToPixel( Size( Width, Height ), MapUnit::MapAppFont );
_rChild.SetPosSizePixel( aPos, aSize );
}
@@ -512,8 +512,8 @@ void OSQLMessageBox::impl_positionControls()
// adjust dialog size accordingly
const Rectangle& rBottomTextRect( bHaveSecondaryText ? aSecondaryRect : aPrimaryRect );
- Size aBorderSize = LogicToPixel( Size( OUTER_MARGIN, OUTER_MARGIN ), MAP_APPFONT );
- Size aDialogSize( LogicToPixel( Size( DIALOG_WIDTH, 30 ), MAP_APPFONT ) );
+ Size aBorderSize = LogicToPixel( Size( OUTER_MARGIN, OUTER_MARGIN ), MapUnit::MapAppFont );
+ Size aDialogSize( LogicToPixel( Size( DIALOG_WIDTH, 30 ), MapUnit::MapAppFont ) );
aDialogSize.Height() = rBottomTextRect.Bottom() + aBorderSize.Height();
aDialogSize.Width() = aPrimaryRect.Right() + aBorderSize.Width();
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index 430e703cc525..35ba9385d185 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -821,7 +821,7 @@ bool callColumnFormatDialog(vcl::Window* _pParent,
};
SfxItemPool* pPool = new SfxItemPool(OUString("GridBrowserProperties"), SBA_DEF_RANGEFORMAT, SBA_ATTR_ALIGN_HOR_JUSTIFY, aItemInfos, pDefaults);
- pPool->SetDefaultMetric( MAP_TWIP ); // ripped, don't understand why
+ pPool->SetDefaultMetric( MapUnit::MapTwip ); // ripped, don't understand why
pPool->FreezeIdRanges(); // the same
std::unique_ptr<SfxItemSet> pFormatDescriptor(new SfxItemSet(*pPool, aAttrMap));
@@ -990,11 +990,11 @@ void adjustBrowseBoxColumnWidth( ::svt::EditBrowseBox* _pBox, sal_uInt16 _nColId
sal_uInt32 nDefaultWidth = _pBox->GetDefaultColumnWidth( _pBox->GetColumnTitle( _nColId ) );
if ( nDefaultWidth != _pBox->GetColumnWidth( _nColId ) )
{
- Size aSizeMM = _pBox->PixelToLogic( Size( _pBox->GetColumnWidth( _nColId ), 0 ), MapMode( MAP_MM ) );
+ Size aSizeMM = _pBox->PixelToLogic( Size( _pBox->GetColumnWidth( _nColId ), 0 ), MapMode( MapUnit::MapMM ) );
nColSize = aSizeMM.Width() * 10;
}
- Size aDefaultMM = _pBox->PixelToLogic( Size( nDefaultWidth, 0 ), MapMode( MAP_MM ) );
+ Size aDefaultMM = _pBox->PixelToLogic( Size( nDefaultWidth, 0 ), MapMode( MapUnit::MapMM ) );
ScopedVclPtrInstance< DlgSize > aColumnSizeDlg( _pBox, nColSize, false, aDefaultMM.Width() * 10 );
if ( aColumnSizeDlg->Execute() )
@@ -1007,7 +1007,7 @@ void adjustBrowseBoxColumnWidth( ::svt::EditBrowseBox* _pBox, sal_uInt16 _nColId
else
{
Size aSizeMM( nValue / 10, 0 );
- nValue = _pBox->LogicToPixel( aSizeMM, MapMode( MAP_MM ) ).Width();
+ nValue = _pBox->LogicToPixel( aSizeMM, MapMode( MapUnit::MapMM ) ).Width();
}
_pBox->SetColumnWidth( _nColId, nValue );
}
diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx
index cd473baa5a50..c7127dce6898 100644
--- a/dbaccess/source/ui/misc/WCopyTable.cxx
+++ b/dbaccess/source/ui/misc/WCopyTable.cxx
@@ -645,11 +645,11 @@ void OCopyTableWizard::construct()
AddButton( m_pbNext = VclPtr<PushButton>::Create(this, WB_TABSTOP));
AddButton( m_pbFinish = VclPtr<PushButton>::Create(this, WB_TABSTOP));
- m_pbHelp->SetSizePixel( LogicToPixel( Size( 50, 14 ), MAP_APPFONT ) );
- m_pbCancel->SetSizePixel( LogicToPixel( Size( 50, 14 ), MAP_APPFONT ) );
- m_pbPrev->SetSizePixel( LogicToPixel( Size( 50, 14 ), MAP_APPFONT ) );
- m_pbNext->SetSizePixel( LogicToPixel( Size( 50, 14 ), MAP_APPFONT ) );
- m_pbFinish->SetSizePixel( LogicToPixel( Size( 50, 14 ), MAP_APPFONT ) );
+ m_pbHelp->SetSizePixel( LogicToPixel( Size( 50, 14 ), MapUnit::MapAppFont ) );
+ m_pbCancel->SetSizePixel( LogicToPixel( Size( 50, 14 ), MapUnit::MapAppFont ) );
+ m_pbPrev->SetSizePixel( LogicToPixel( Size( 50, 14 ), MapUnit::MapAppFont ) );
+ m_pbNext->SetSizePixel( LogicToPixel( Size( 50, 14 ), MapUnit::MapAppFont ) );
+ m_pbFinish->SetSizePixel( LogicToPixel( Size( 50, 14 ), MapUnit::MapAppFont ) );
m_pbPrev->SetText(ModuleRes(STR_WIZ_PB_PREV));
m_pbNext->SetText(ModuleRes(STR_WIZ_PB_NEXT));
diff --git a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
index f78cd420e7ba..2118643b32e5 100644
--- a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
+++ b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
@@ -203,7 +203,7 @@ namespace dbaui
Size aSize = GetOutputSizePixel();
Size aBeamer(aSize.Width(),sal_Int32(aSize.Height()*0.33));
- const long nFrameHeight = LogicToPixel( Size( 0, 3 ), MAP_APPFONT ).Height();
+ const long nFrameHeight = LogicToPixel( Size( 0, 3 ), MapUnit::MapAppFont ).Height();
Point aPos(0,aBeamer.Height()+nFrameHeight);
m_pBeamer->SetPosSizePixel(Point(0,0),aBeamer);
diff --git a/dbaccess/source/ui/querydesign/querydlg.cxx b/dbaccess/source/ui/querydesign/querydlg.cxx
index 7710a97be15b..97268bab13b9 100644
--- a/dbaccess/source/ui/querydesign/querydlg.cxx
+++ b/dbaccess/source/ui/querydesign/querydlg.cxx
@@ -55,7 +55,7 @@ DlgQryJoin::DlgQryJoin( OQueryTableView * pParent,
, m_xConnection(_xConnection)
{
get(m_pML_HelpText, "helptext");
- Size aSize(LogicToPixel(Size(179, 49), MAP_APPFONT));
+ Size aSize(LogicToPixel(Size(179, 49), MapUnit::MapAppFont));
//alternatively loop through the STR_QUERY_* strings with their STR_JOIN_TYPE_HINT
//suffix to find the longest entry at runtime
m_pML_HelpText->set_height_request(aSize.Height());