summaryrefslogtreecommitdiff
path: root/sw/source/ui
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 /sw/source/ui
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 'sw/source/ui')
-rw-r--r--sw/source/ui/chrdlg/drpcps.cxx2
-rw-r--r--sw/source/ui/config/optload.cxx2
-rw-r--r--sw/source/ui/config/optpage.cxx36
-rw-r--r--sw/source/ui/dbui/addresslistdialog.cxx4
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.cxx16
-rw-r--r--sw/source/ui/dbui/dbtablepreviewdialog.cxx2
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.cxx12
-rw-r--r--sw/source/ui/dbui/mmdocselectpage.cxx2
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.cxx4
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.cxx2
-rw-r--r--sw/source/ui/dbui/mmoutputtypepage.cxx4
-rw-r--r--sw/source/ui/dbui/selectdbtabledialog.cxx4
-rw-r--r--sw/source/ui/envelp/envfmt.cxx4
-rw-r--r--sw/source/ui/envelp/envlop1.cxx4
-rw-r--r--sw/source/ui/envelp/labfmt.cxx4
-rw-r--r--sw/source/ui/fldui/flddb.cxx2
-rw-r--r--sw/source/ui/fldui/flddinf.cxx2
-rw-r--r--sw/source/ui/fldui/flddok.cxx2
-rw-r--r--sw/source/ui/fldui/fldfunc.cxx2
-rw-r--r--sw/source/ui/fldui/fldref.cxx2
-rw-r--r--sw/source/ui/fldui/fldvar.cxx2
-rw-r--r--sw/source/ui/frmdlg/column.cxx4
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx2
-rw-r--r--sw/source/ui/index/cnttab.cxx8
-rw-r--r--sw/source/ui/misc/bookmark.cxx2
-rw-r--r--sw/source/ui/misc/glosbib.cxx2
-rw-r--r--sw/source/ui/misc/glossary.cxx2
-rw-r--r--sw/source/ui/misc/pgfnote.cxx6
28 files changed, 70 insertions, 70 deletions
diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx
index 77ba0cd65bdb..c7a0ac320d5c 100644
--- a/sw/source/ui/chrdlg/drpcps.cxx
+++ b/sw/source/ui/chrdlg/drpcps.cxx
@@ -348,7 +348,7 @@ void SwDropCapsPict::Paint(vcl::RenderContext& rRenderContext, const Rectangle&
if (!IsVisible())
return;
- rRenderContext.SetMapMode(MapMode(MAP_PIXEL));
+ rRenderContext.SetMapMode(MapMode(MapUnit::MapPixel));
rRenderContext.SetLineColor();
rRenderContext.SetFillColor(maBackColor);
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index 57310326943f..4577c53cf567 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -432,7 +432,7 @@ void SwCaptionPreview::SetPreviewText(const OUString& rText)
Size SwCaptionPreview::GetOptimalSize() const
{
- return LogicToPixel(Size(106 , 20), MapMode(MAP_APPFONT));
+ return LogicToPixel(Size(106 , 20), MapMode(MapUnit::MapAppFont));
}
void SwCaptionPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 05335159f7ec..bd0ab49f141e 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -648,7 +648,7 @@ static void lcl_SetColl(SwWrtShell* pWrtShell, sal_uInt16 nType,
sal_Int32 nHeight, sal_uInt16 nFontHeightWhich)
{
float fSize = (float)nHeight / 10;
- nHeight = CalcToUnit( fSize, MAP_TWIP );
+ nHeight = CalcToUnit( fSize, MapUnit::MapTwip );
SwTextFormatColl *pColl = pWrtShell->GetTextCollFromPool(nType);
pColl->SetFormatAttr(SvxFontHeightItem(nHeight, 100, nFontHeightWhich));
}
@@ -677,27 +677,27 @@ bool SwStdFontTabPage::FillItemSet( SfxItemSet* )
if(bStandardHeightChanged)
{
float fSize = (float)m_pStandardHeightLB->GetValue() / 10;
- m_pFontConfig->SetFontHeight( CalcToUnit( fSize, MAP_TWIP ), FONT_STANDARD, m_nFontGroup );
+ m_pFontConfig->SetFontHeight( CalcToUnit( fSize, MapUnit::MapTwip ), FONT_STANDARD, m_nFontGroup );
}
if(bTitleHeightChanged)
{
float fSize = (float)m_pTitleHeightLB->GetValue() / 10;
- m_pFontConfig->SetFontHeight( CalcToUnit( fSize, MAP_TWIP ), FONT_OUTLINE, m_nFontGroup );
+ m_pFontConfig->SetFontHeight( CalcToUnit( fSize, MapUnit::MapTwip ), FONT_OUTLINE, m_nFontGroup );
}
if(bListHeightChanged)
{
float fSize = (float)m_pListHeightLB->GetValue() / 10;
- m_pFontConfig->SetFontHeight( CalcToUnit( fSize, MAP_TWIP ), FONT_LIST, m_nFontGroup );
+ m_pFontConfig->SetFontHeight( CalcToUnit( fSize, MapUnit::MapTwip ), FONT_LIST, m_nFontGroup );
}
if(bLabelHeightChanged)
{
float fSize = (float)m_pLabelHeightLB->GetValue() / 10;
- m_pFontConfig->SetFontHeight( CalcToUnit( fSize, MAP_TWIP ), FONT_CAPTION, m_nFontGroup );
+ m_pFontConfig->SetFontHeight( CalcToUnit( fSize, MapUnit::MapTwip ), FONT_CAPTION, m_nFontGroup );
}
if(bIndexHeightChanged)
{
float fSize = (float)m_pIndexHeightLB->GetValue() / 10;
- m_pFontConfig->SetFontHeight( CalcToUnit( fSize, MAP_TWIP ), FONT_INDEX, m_nFontGroup );
+ m_pFontConfig->SetFontHeight( CalcToUnit( fSize, MapUnit::MapTwip ), FONT_INDEX, m_nFontGroup );
}
if(m_pWrtShell)
@@ -725,7 +725,7 @@ bool SwStdFontTabPage::FillItemSet( SfxItemSet* )
if(bStandardHeightChanged)
{
float fSize = (float)m_pStandardHeightLB->GetValue() / 10;
- m_pWrtShell->SetDefault(SvxFontHeightItem( CalcToUnit( fSize, MAP_TWIP ), 100, nFontHeightWhich ) );
+ m_pWrtShell->SetDefault(SvxFontHeightItem( CalcToUnit( fSize, MapUnit::MapTwip ), 100, nFontHeightWhich ) );
SwTextFormatColl *pColl = m_pWrtShell->GetTextCollFromPool(RES_POOLCOLL_STANDARD);
pColl->ResetFormatAttr(nFontHeightWhich);
bMod = true;
@@ -949,11 +949,11 @@ void SwStdFontTabPage::Reset( const SfxItemSet* rSet)
aFontMetric = m_pFontList->Get(sIdxBackup, sIdxBackup );
m_pIndexHeightLB->Fill( &aFontMetric, m_pFontList );
- m_pStandardHeightLB->SetValue( CalcToPoint( nStandardHeight, MAP_TWIP, 10 ) );
- m_pTitleHeightLB-> SetValue( CalcToPoint( nTitleHeight , MAP_TWIP, 10 ) );
- m_pListHeightLB-> SetValue( CalcToPoint( nListHeight , MAP_TWIP, 10 ) );
- m_pLabelHeightLB-> SetValue( CalcToPoint( nLabelHeight , MAP_TWIP, 10 ));
- m_pIndexHeightLB-> SetValue( CalcToPoint( nIndexHeight , MAP_TWIP, 10 ));
+ m_pStandardHeightLB->SetValue( CalcToPoint( nStandardHeight, MapUnit::MapTwip, 10 ) );
+ m_pTitleHeightLB-> SetValue( CalcToPoint( nTitleHeight , MapUnit::MapTwip, 10 ) );
+ m_pListHeightLB-> SetValue( CalcToPoint( nListHeight , MapUnit::MapTwip, 10 ) );
+ m_pLabelHeightLB-> SetValue( CalcToPoint( nLabelHeight , MapUnit::MapTwip, 10 ));
+ m_pIndexHeightLB-> SetValue( CalcToPoint( nIndexHeight , MapUnit::MapTwip, 10 ));
m_pStandardBox->SaveValue();
m_pTitleBox->SaveValue();
@@ -985,19 +985,19 @@ IMPL_LINK_NOARG(SwStdFontTabPage, StandardHdl, Button*, void)
m_pStandardHeightLB->SetValue( CalcToPoint(
SwStdFontConfig::GetDefaultHeightFor(FONT_STANDARD + nFontOffset, m_eLanguage),
- MAP_TWIP, 10 ) );
+ MapUnit::MapTwip, 10 ) );
m_pTitleHeightLB ->SetValue(CalcToPoint(
SwStdFontConfig::GetDefaultHeightFor(FONT_OUTLINE +
- nFontOffset, m_eLanguage), MAP_TWIP, 10 ));
+ nFontOffset, m_eLanguage), MapUnit::MapTwip, 10 ));
m_pListHeightLB ->SetValue(CalcToPoint(
SwStdFontConfig::GetDefaultHeightFor(FONT_LIST + nFontOffset, m_eLanguage),
- MAP_TWIP, 10 ));
+ MapUnit::MapTwip, 10 ));
m_pLabelHeightLB ->SetValue(CalcToPoint(
SwStdFontConfig::GetDefaultHeightFor(FONT_CAPTION + nFontOffset, m_eLanguage),
- MAP_TWIP, 10 ));
+ MapUnit::MapTwip, 10 ));
m_pIndexHeightLB ->SetValue(CalcToPoint(
SwStdFontConfig::GetDefaultHeightFor(FONT_INDEX + nFontOffset, m_eLanguage),
- MAP_TWIP, 10 ));
+ MapUnit::MapTwip, 10 ));
}
IMPL_LINK( SwStdFontTabPage, ModifyHdl, Edit&, rBox, void )
@@ -1570,7 +1570,7 @@ SwMarkPreview::SwMarkPreview( vcl::Window *pParent, WinBits nWinBits ) :
{
m_aInitialSize = getPreviewOptionsSize(this);
InitColors();
- SetMapMode(MAP_PIXEL);
+ SetMapMode(MapUnit::MapPixel);
}
VCL_BUILDER_FACTORY_ARGS(SwMarkPreview, 0)
diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx
index d001831e308e..682e5b76035a 100644
--- a/sw/source/ui/dbui/addresslistdialog.cxx
+++ b/sw/source/ui/dbui/addresslistdialog.cxx
@@ -159,7 +159,7 @@ void SwAddrSourceLB::setColSizes()
long nTabs[] = { 2, 0, nWidth/2 };
- SvSimpleTable::SetTabs(&nTabs[0], MAP_PIXEL);
+ SvSimpleTable::SetTabs(&nTabs[0], MapUnit::MapPixel);
}
SwAddressListDialog::SwAddressListDialog(SwMailMergeAddressBlockPage* pParent)
@@ -195,7 +195,7 @@ SwAddressListDialog::SwAddressListDialog(SwMailMergeAddressBlockPage* pParent)
m_pTablePB->SetClickHdl(LINK( this, SwAddressListDialog, TableSelectHdl_Impl));
SvSimpleTableContainer *pHeaderTreeContainer = get<SvSimpleTableContainer>("sources");
- Size aSize = pHeaderTreeContainer->LogicToPixel(Size(182 , 102), MAP_APPFONT);
+ Size aSize = pHeaderTreeContainer->LogicToPixel(Size(182 , 102), MapUnit::MapAppFont);
pHeaderTreeContainer->set_width_request(aSize.Width());
pHeaderTreeContainer->set_height_request(aSize.Height());
m_pListLB = VclPtr<SwAddrSourceLB>::Create(*pHeaderTreeContainer);
diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx
index ebb3e0eb1b6a..cf8b9f83e545 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/createaddresslistdialog.cxx
@@ -148,8 +148,8 @@ void SwAddressControl_Impl::SetData(SwCSVData& rDBData)
std::vector< OUString >::iterator aHeaderIter;
- long nFTXPos = m_pWindow->LogicToPixel(Point(RSC_SP_CTRL_X, RSC_SP_CTRL_X), MAP_APPFONT).X();
- long nFTHeight = m_pWindow->LogicToPixel(Size(RSC_BS_CHARHEIGHT, RSC_BS_CHARHEIGHT), MAP_APPFONT).Height();
+ long nFTXPos = m_pWindow->LogicToPixel(Point(RSC_SP_CTRL_X, RSC_SP_CTRL_X), MapUnit::MapAppFont).X();
+ long nFTHeight = m_pWindow->LogicToPixel(Size(RSC_BS_CHARHEIGHT, RSC_BS_CHARHEIGHT), MapUnit::MapAppFont).Height();
long nFTWidth = 0;
//determine the width of the FixedTexts
@@ -164,12 +164,12 @@ void SwAddressControl_Impl::SetData(SwCSVData& rDBData)
//add some pixels
nFTWidth += 2;
long nEDXPos = nFTWidth + nFTXPos +
- m_pWindow->LogicToPixel(Size(RSC_SP_CTRL_DESC_X, RSC_SP_CTRL_DESC_X), MAP_APPFONT).Width();
- long nEDHeight = m_pWindow->LogicToPixel(Size(RSC_CD_TEXTBOX_HEIGHT, RSC_CD_TEXTBOX_HEIGHT), MAP_APPFONT).Height();
+ m_pWindow->LogicToPixel(Size(RSC_SP_CTRL_DESC_X, RSC_SP_CTRL_DESC_X), MapUnit::MapAppFont).Width();
+ long nEDHeight = m_pWindow->LogicToPixel(Size(RSC_CD_TEXTBOX_HEIGHT, RSC_CD_TEXTBOX_HEIGHT), MapUnit::MapAppFont).Height();
long nEDWidth = m_aWinOutputSize.Width() - nEDXPos - nFTXPos;
- m_nLineHeight = nEDHeight + m_pWindow->LogicToPixel(Size(RSC_SP_CTRL_GROUP_Y, RSC_SP_CTRL_GROUP_Y), MAP_APPFONT).Height();
+ m_nLineHeight = nEDHeight + m_pWindow->LogicToPixel(Size(RSC_SP_CTRL_GROUP_Y, RSC_SP_CTRL_GROUP_Y), MapUnit::MapAppFont).Height();
- long nEDYPos = m_pWindow->LogicToPixel(Size(RSC_SP_CTRL_DESC_Y, RSC_SP_CTRL_DESC_Y), MAP_APPFONT).Height();
+ long nEDYPos = m_pWindow->LogicToPixel(Size(RSC_SP_CTRL_DESC_Y, RSC_SP_CTRL_DESC_Y), MapUnit::MapAppFont).Height();
long nFTYPos = nEDYPos + nEDHeight - nFTHeight;
Link<Control&,void> aFocusLink = LINK(this, SwAddressControl_Impl, GotFocusHdl_Impl);
@@ -206,7 +206,7 @@ void SwAddressControl_Impl::SetData(SwCSVData& rDBData)
{
//the m_aWindow has to be at least as high as the ScrollBar and it must include the last Edit
sal_Int32 nContentHeight = pLastEdit->GetPosPixel().Y() + nEDHeight +
- m_pWindow->LogicToPixel(Size(RSC_SP_CTRL_GROUP_Y, RSC_SP_CTRL_GROUP_Y), MAP_APPFONT).Height();
+ m_pWindow->LogicToPixel(Size(RSC_SP_CTRL_GROUP_Y, RSC_SP_CTRL_GROUP_Y), MapUnit::MapAppFont).Height();
if(nContentHeight < m_pScrollBar->GetSizePixel().Height())
{
nContentHeight = m_pScrollBar->GetSizePixel().Height();
@@ -358,7 +358,7 @@ bool SwAddressControl_Impl::PreNotify( NotifyEvent& rNEvt )
Size SwAddressControl_Impl::GetOptimalSize() const
{
- return LogicToPixel(Size(250, 160), MAP_APPFONT);
+ return LogicToPixel(Size(250, 160), MapUnit::MapAppFont);
}
void SwAddressControl_Impl::Resize()
diff --git a/sw/source/ui/dbui/dbtablepreviewdialog.cxx b/sw/source/ui/dbui/dbtablepreviewdialog.cxx
index 6b07ce4b4cfc..e501fe9772a1 100644
--- a/sw/source/ui/dbui/dbtablepreviewdialog.cxx
+++ b/sw/source/ui/dbui/dbtablepreviewdialog.cxx
@@ -37,7 +37,7 @@ SwDBTablePreviewDialog::SwDBTablePreviewDialog(vcl::Window* pParent, uno::Sequen
{
get(m_pDescriptionFI, "description");
get(m_pBeamerWIN, "beamer");
- Size aSize(LogicToPixel(Size(338, 150), MAP_APPFONT));
+ Size aSize(LogicToPixel(Size(338, 150), MapUnit::MapAppFont));
m_pBeamerWIN->set_width_request(aSize.Width());
m_pBeamerWIN->set_height_request(aSize.Height());
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index 5d92cec760b0..cbb93621468c 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -64,14 +64,14 @@ SwMailMergeAddressBlockPage::SwMailMergeAddressBlockPage( SwMailMergeWizard* _pP
get(m_pSettingsFI, "settingsft");
get(m_pAddressCB, "address");
get(m_pSettingsWIN, "settingspreview");
- Size aSize(LogicToPixel(Size(164 , 45), MAP_APPFONT));
+ Size aSize(LogicToPixel(Size(164 , 45), MapUnit::MapAppFont));
m_pSettingsWIN->set_width_request(aSize.Width());
m_pSettingsWIN->set_height_request(aSize.Height());
get(m_pSettingsPB, "settings");
get(m_pHideEmptyParagraphsCB, "hideempty");
get(m_pAssignPB, "assign");
get(m_pPreviewWIN, "addresspreview");
- aSize = LogicToPixel(Size(176, 46), MAP_APPFONT);
+ aSize = LogicToPixel(Size(176, 46), MapUnit::MapAppFont);
m_pPreviewWIN->set_width_request(aSize.Width());
m_pPreviewWIN->set_height_request(aSize.Height());
get(m_pDocumentIndexFI, "documentindex");
@@ -322,7 +322,7 @@ SwSelectAddressBlockDialog::SwSelectAddressBlockDialog(
, m_rConfig(rConfig)
{
get(m_pPreview, "preview");
- Size aSize(m_pPreview->LogicToPixel(Size(192, 100), MAP_APPFONT));
+ Size aSize(m_pPreview->LogicToPixel(Size(192, 100), MapUnit::MapAppFont));
m_pPreview->set_width_request(aSize.Width());
m_pPreview->set_height_request(aSize.Height());
get(m_pNewPB, "new");
@@ -858,7 +858,7 @@ SwAssignFieldsControl::SwAssignFieldsControl(vcl::Window* pParent, WinBits nBits
Size SwAssignFieldsControl::GetOptimalSize() const
{
- return LogicToPixel(Size(248 , 120), MAP_APPFONT);
+ return LogicToPixel(Size(248 , 120), MapUnit::MapAppFont);
}
void SwAssignFieldsControl::Init(SwMailMergeConfigItem& rConfigItem)
@@ -1163,7 +1163,7 @@ SwAssignFieldsDialog::SwAssignFieldsDialog(
get(m_pPreviewFI, "PREVIEW_LABEL");
get(m_pOK, "ok");
get(m_pPreviewWIN, "PREVIEW");
- Size aSize(LogicToPixel(Size(248 , 45), MAP_APPFONT));
+ Size aSize(LogicToPixel(Size(248 , 45), MapUnit::MapAppFont));
m_pPreviewWIN->set_width_request(aSize.Width());
m_pPreviewWIN->set_height_request(aSize.Height());
get(m_pFieldsControl, "FIELDS");
@@ -1327,7 +1327,7 @@ void AddressMultiLineEdit::dispose()
Size AddressMultiLineEdit::GetOptimalSize() const
{
- return LogicToPixel(Size(160, 60), MAP_APPFONT);
+ return LogicToPixel(Size(160, 60), MapUnit::MapAppFont);
}
VCL_BUILDER_DECL_FACTORY(AddressMultiLineEdit)
diff --git a/sw/source/ui/dbui/mmdocselectpage.cxx b/sw/source/ui/dbui/mmdocselectpage.cxx
index c77e2f77ec24..4a6ed92e73b2 100644
--- a/sw/source/ui/dbui/mmdocselectpage.cxx
+++ b/sw/source/ui/dbui/mmdocselectpage.cxx
@@ -86,7 +86,7 @@ SwMailMergeDocSelectPage::SwMailMergeDocSelectPage(SwMailMergeWizard* pParent)
//Temp hack until all pages are converted to .ui and wizard
//base class adapted
- SetSizePixel(LogicToPixel(Size(260 , 250), MapMode(MAP_APPFONT)));
+ SetSizePixel(LogicToPixel(Size(260 , 250), MapMode(MapUnit::MapAppFont)));
}
SwMailMergeDocSelectPage::~SwMailMergeDocSelectPage()
diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx
index c27e9c35bc68..54cddf71f813 100644
--- a/sw/source/ui/dbui/mmgreetingspage.cxx
+++ b/sw/source/ui/dbui/mmgreetingspage.cxx
@@ -250,7 +250,7 @@ SwMailMergeGreetingsPage::SwMailMergeGreetingsPage(SwMailMergeWizard* _pParent)
get(m_pNeutralCB, "general");
get(m_pPreviewFI, "previewft");
get(m_pPreviewWIN, "preview");
- Size aSize(LogicToPixel(Size(186, 21), MapMode(MAP_APPFONT)));
+ Size aSize(LogicToPixel(Size(186, 21), MapMode(MapUnit::MapAppFont)));
m_pPreviewWIN->set_width_request(aSize.Width());
m_pPreviewWIN->set_height_request(aSize.Height());
get(m_pAssignPB, "assign");
@@ -427,7 +427,7 @@ SwMailBodyDialog::SwMailBodyDialog(vcl::Window* pParent) :
get(m_pBodyFT, "bodyft");
get(m_pBodyMLE, "bodymle");
m_pBodyMLE->SetStyle(m_pBodyMLE->GetStyle() | WB_HSCROLL | WB_VSCROLL | WB_IGNORETAB);
- Size aSize(LogicToPixel(Size(180, 50), MAP_APPFONT));
+ Size aSize(LogicToPixel(Size(180, 50), MapUnit::MapAppFont));
m_pBodyMLE->set_width_request(aSize.Width());
m_pBodyMLE->set_height_request(aSize.Height());
get(m_pOK, "ok");
diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx
index 15838bbf25de..f2f9ff4be585 100644
--- a/sw/source/ui/dbui/mmlayoutpage.cxx
+++ b/sw/source/ui/dbui/mmlayoutpage.cxx
@@ -91,7 +91,7 @@ SwMailMergeLayoutPage::SwMailMergeLayoutPage( SwMailMergeWizard* _pParent) :
get(m_pUpPB, "up");
get(m_pDownPB, "down");
get(m_pExampleContainerWIN, "example");
- Size aSize(LogicToPixel(Size(124, 159), MAP_APPFONT));
+ Size aSize(LogicToPixel(Size(124, 159), MapUnit::MapAppFont));
m_pExampleContainerWIN->set_width_request(aSize.Width());
m_pExampleContainerWIN->set_height_request(aSize.Height());
get(m_pZoomLB, "zoom");
diff --git a/sw/source/ui/dbui/mmoutputtypepage.cxx b/sw/source/ui/dbui/mmoutputtypepage.cxx
index 73413e40dc56..5e42b2f8b973 100644
--- a/sw/source/ui/dbui/mmoutputtypepage.cxx
+++ b/sw/source/ui/dbui/mmoutputtypepage.cxx
@@ -271,7 +271,7 @@ SwSendMailDialog::SwSendMailDialog(vcl::Window *pParent, SwMailMergeConfigItem&
m_nSendCount(0),
m_nErrorCount(0)
{
- Size aSize = m_pContainer->LogicToPixel(Size(226, 80), MAP_APPFONT);
+ Size aSize = m_pContainer->LogicToPixel(Size(226, 80), MapUnit::MapAppFont);
m_pContainer->set_width_request(aSize.Width());
m_pContainer->set_height_request(aSize.Height());
m_pStatus = VclPtr<SvSimpleTable>::Create(*m_pContainer);
@@ -296,7 +296,7 @@ SwSendMailDialog::SwSendMailDialog(vcl::Window *pParent, SwMailMergeConfigItem&
static long nTabs[] = {2, 0, nPos1};
m_pStatus->SetStyle( m_pStatus->GetStyle() | WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP );
m_pStatus->SetSelectionMode( SelectionMode::Single );
- m_pStatus->SetTabs(&nTabs[0], MAP_PIXEL);
+ m_pStatus->SetTabs(&nTabs[0], MapUnit::MapPixel);
m_pStatus->SetSpaceBetweenEntries(3);
UpdateTransferStatus();
diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx b/sw/source/ui/dbui/selectdbtabledialog.cxx
index 230e191e724e..66f01dc07bdd 100644
--- a/sw/source/ui/dbui/selectdbtabledialog.cxx
+++ b/sw/source/ui/dbui/selectdbtabledialog.cxx
@@ -86,7 +86,7 @@ void SwAddressTable::setColSizes()
nTabs_Impl[1] = 0;
nTabs_Impl[2] = nWidth;
- SvSimpleTable::SetTabs(&nTabs_Impl[0], MAP_PIXEL);
+ SvSimpleTable::SetTabs(&nTabs_Impl[0], MapUnit::MapPixel);
}
SwSelectDBTableDialog::SwSelectDBTableDialog(vcl::Window* pParent,
@@ -101,7 +101,7 @@ SwSelectDBTableDialog::SwSelectDBTableDialog(vcl::Window* pParent,
get(m_pPreviewPB, "preview");
SvSimpleTableContainer *pHeaderTreeContainer = get<SvSimpleTableContainer>("table");
- Size aSize = pHeaderTreeContainer->LogicToPixel(Size(238 , 50), MAP_APPFONT);
+ Size aSize = pHeaderTreeContainer->LogicToPixel(Size(238 , 50), MapUnit::MapAppFont);
pHeaderTreeContainer->set_width_request(aSize.Width());
pHeaderTreeContainer->set_height_request(aSize.Height());
m_pTable = VclPtr<SwAddressTable>::Create(*pHeaderTreeContainer);
diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx
index a15de6dcc864..733b42cd1718 100644
--- a/sw/source/ui/envelp/envfmt.cxx
+++ b/sw/source/ui/envelp/envfmt.cxx
@@ -235,7 +235,7 @@ IMPL_LINK( SwEnvFormatPage, ModifyHdl, SpinField&, rEdit, void )
long nRotatedWidth = lHeight;
long nRotatedHeight = lWidth;
Paper ePaper = SvxPaperInfo::GetSvxPaper(
- Size(nRotatedWidth, nRotatedHeight), MAP_TWIP, true);
+ Size(nRotatedWidth, nRotatedHeight), MapUnit::MapTwip, true);
for (size_t i = 0; i < aIDs.size(); ++i)
if (aIDs[i] == (sal_uInt16)ePaper)
m_pSizeFormatBox->SelectEntryPos(static_cast<sal_Int32>(i));
@@ -517,7 +517,7 @@ void SwEnvFormatPage::Reset(const SfxItemSet* rSet)
Paper ePaper = SvxPaperInfo::GetSvxPaper(
Size( std::min(rItem.lWidth, rItem.lHeight),
- std::max(rItem.lWidth, rItem.lHeight)), MAP_TWIP, true);
+ std::max(rItem.lWidth, rItem.lHeight)), MapUnit::MapTwip, true);
for (size_t i = 0; i < aIDs.size(); ++i)
if (aIDs[i] == (sal_uInt16)ePaper)
m_pSizeFormatBox->SelectEntryPos(static_cast<sal_Int32>(i));
diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx
index d027f0270f2a..c73699fbde24 100644
--- a/sw/source/ui/envelp/envlop1.cxx
+++ b/sw/source/ui/envelp/envlop1.cxx
@@ -49,12 +49,12 @@ using namespace ::com::sun::star;
SwEnvPreview::SwEnvPreview(vcl::Window* pParent, WinBits nStyle)
: Window(pParent, nStyle)
{
- SetMapMode(MapMode(MAP_PIXEL));
+ SetMapMode(MapMode(MapUnit::MapPixel));
}
Size SwEnvPreview::GetOptimalSize() const
{
- return LogicToPixel(Size(84 , 63), MAP_APPFONT);
+ return LogicToPixel(Size(84 , 63), MapUnit::MapAppFont);
}
VCL_BUILDER_FACTORY_ARGS(SwEnvPreview, 0)
diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx
index cc9b92391201..75ee218a6bc3 100644
--- a/sw/source/ui/envelp/labfmt.cxx
+++ b/sw/source/ui/envelp/labfmt.cxx
@@ -112,7 +112,7 @@ SwLabPreview::SwLabPreview(vcl::Window* pParent)
, m_aPWidthStr(SW_RESSTR(STR_PWIDTH))
, m_aPHeightStr(SW_RESSTR(STR_PHEIGHT))
{
- SetMapMode(MAP_PIXEL);
+ SetMapMode(MapUnit::MapPixel);
// FIXME RenderContext
@@ -139,7 +139,7 @@ SwLabPreview::SwLabPreview(vcl::Window* pParent)
Size SwLabPreview::GetOptimalSize() const
{
- return LogicToPixel(Size(146 , 161), MapMode(MAP_APPFONT));
+ return LogicToPixel(Size(146 , 161), MapMode(MapUnit::MapAppFont));
}
VCL_BUILDER_FACTORY(SwLabPreview)
diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx
index ed26ffbe74fc..fe769115b0a2 100644
--- a/sw/source/ui/fldui/flddb.cxx
+++ b/sw/source/ui/fldui/flddb.cxx
@@ -58,7 +58,7 @@ SwFieldDBPage::SwFieldDBPage(vcl::Window* pParent, const SfxItemSet *const pCore
m_pTypeLB->set_height_request(nHeight);
m_pDatabaseTLB->set_height_request(nHeight);
- long nWidth = m_pTypeLB->LogicToPixel(Size(FIELD_COLUMN_WIDTH, 0), MapMode(MAP_APPFONT)).Width();
+ long nWidth = m_pTypeLB->LogicToPixel(Size(FIELD_COLUMN_WIDTH, 0), MapMode(MapUnit::MapAppFont)).Width();
m_pTypeLB->set_width_request(nWidth);
m_pDatabaseTLB->set_width_request(nWidth*2);
diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx
index 7f92d992b82a..e556eb1f7a44 100644
--- a/sw/source/ui/fldui/flddinf.cxx
+++ b/sw/source/ui/fldui/flddinf.cxx
@@ -66,7 +66,7 @@ SwFieldDokInfPage::SwFieldDokInfPage(vcl::Window* pParent, const SfxItemSet *con
m_pSelectionLB->set_height_request(nHeight);
m_pFormatLB->set_height_request(nHeight);
- long nWidth = m_pTypeTLB->LogicToPixel(Size(FIELD_COLUMN_WIDTH, 0), MapMode(MAP_APPFONT)).Width();
+ long nWidth = m_pTypeTLB->LogicToPixel(Size(FIELD_COLUMN_WIDTH, 0), MapMode(MapUnit::MapAppFont)).Width();
m_pTypeTLB->set_width_request(nWidth);
m_pFormatLB->set_width_request(nWidth);
m_pSelectionLB->set_width_request(nWidth);
diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx
index 1d4dce0d107c..df89661bcc2f 100644
--- a/sw/source/ui/fldui/flddok.cxx
+++ b/sw/source/ui/fldui/flddok.cxx
@@ -62,7 +62,7 @@ SwFieldDokPage::SwFieldDokPage(vcl::Window* pParent, const SfxItemSet *const pCo
m_pSelectionLB->set_height_request(nHeight);
m_pFormatLB->set_height_request(nHeight);
- long nWidth = m_pTypeLB->LogicToPixel(Size(FIELD_COLUMN_WIDTH, 0), MapMode(MAP_APPFONT)).Width();
+ long nWidth = m_pTypeLB->LogicToPixel(Size(FIELD_COLUMN_WIDTH, 0), MapMode(MapUnit::MapAppFont)).Width();
m_pTypeLB->set_width_request(nWidth);
m_pSelectionLB->set_width_request(nWidth);
m_pFormatLB->set_width_request(nWidth);
diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx
index 60a17d53eb4f..edf169f2e5e9 100644
--- a/sw/source/ui/fldui/fldfunc.cxx
+++ b/sw/source/ui/fldui/fldfunc.cxx
@@ -76,7 +76,7 @@ SwFieldFuncPage::SwFieldFuncPage(vcl::Window* pParent, const SfxItemSet *const p
m_pTypeLB->set_height_request(nHeight);
m_pFormatLB->set_height_request(nHeight);
- long nWidth = m_pTypeLB->LogicToPixel(Size(FIELD_COLUMN_WIDTH, 0), MapMode(MAP_APPFONT)).Width();
+ long nWidth = m_pTypeLB->LogicToPixel(Size(FIELD_COLUMN_WIDTH, 0), MapMode(MapUnit::MapAppFont)).Width();
m_pTypeLB->set_width_request(nWidth);
m_pFormatLB->set_width_request(nWidth);
diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx
index ab7ce0e6e2cf..83356a0e9e7a 100644
--- a/sw/source/ui/fldui/fldref.cxx
+++ b/sw/source/ui/fldui/fldref.cxx
@@ -86,7 +86,7 @@ SwFieldRefPage::SwFieldRefPage(vcl::Window* pParent, const SfxItemSet *const pCo
m_pTypeLB->set_height_request(nHeight);
m_pFormatLB->set_height_request(nHeight);
- long nWidth = m_pTypeLB->LogicToPixel(Size(FIELD_COLUMN_WIDTH, 0), MapMode(MAP_APPFONT)).Width();
+ long nWidth = m_pTypeLB->LogicToPixel(Size(FIELD_COLUMN_WIDTH, 0), MapMode(MapUnit::MapAppFont)).Width();
m_pTypeLB->set_width_request(nWidth);
m_pFormatLB->set_width_request(nWidth);
m_pSelection->set_width_request(nWidth*2);
diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx
index 95a367e968ab..3c3cbac9839a 100644
--- a/sw/source/ui/fldui/fldvar.cxx
+++ b/sw/source/ui/fldui/fldvar.cxx
@@ -67,7 +67,7 @@ SwFieldVarPage::SwFieldVarPage(vcl::Window* pParent, const SfxItemSet *const pCo
m_pSelectionLB->set_height_request(nHeight);
m_pFormatLB->set_height_request(nHeight/2);
- long nWidth = m_pTypeLB->LogicToPixel(Size(FIELD_COLUMN_WIDTH, 0), MapMode(MAP_APPFONT)).Width();
+ long nWidth = m_pTypeLB->LogicToPixel(Size(FIELD_COLUMN_WIDTH, 0), MapMode(MapUnit::MapAppFont)).Width();
m_pTypeLB->set_width_request(nWidth);
m_pSelectionLB->set_width_request(nWidth);
m_pFormatLB->set_width_request(nWidth);
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index f56babc26998..f3d5931111e0 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -523,7 +523,7 @@ SwColumnPage::SwColumnPage(vcl::Window *pParent, const SfxItemSet &rSet)
long nLineWidth = static_cast<long>(MetricField::ConvertDoubleValue(
m_pLineWidthEdit->GetValue( ),
m_pLineWidthEdit->GetDecimalDigits( ),
- m_pLineWidthEdit->GetUnit(), MAP_TWIP ));
+ m_pLineWidthEdit->GetUnit(), MapUnit::MapTwip ));
m_pLineTypeDLB->SetWidth( nLineWidth );
// Fill the color listbox
@@ -753,7 +753,7 @@ IMPL_LINK_NOARG( SwColumnPage, UpdateColMgr, Edit&, void )
long nLineWidth = static_cast<long>(MetricField::ConvertDoubleValue(
m_pLineWidthEdit->GetValue( ),
m_pLineWidthEdit->GetDecimalDigits( ),
- m_pLineWidthEdit->GetUnit(), MAP_TWIP ));
+ m_pLineWidthEdit->GetUnit(), MapUnit::MapTwip ));
if( !bEnable )
m_pColMgr->SetNoLine();
else
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index 7b16081b027a..1312236faf24 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -2639,7 +2639,7 @@ BmpWindow::BmpWindow(vcl::Window* pPar, WinBits nStyle)
Size BmpWindow::GetOptimalSize() const
{
- return LogicToPixel(Size(127 , 66), MapMode(MAP_APPFONT));
+ return LogicToPixel(Size(127 , 66), MapMode(MapUnit::MapAppFont));
}
VCL_BUILDER_FACTORY_ARGS(BmpWindow, 0)
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 744d2952119c..52421db6dc87 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -235,7 +235,7 @@ SwMultiTOXTabDialog::SwMultiTOXTabDialog(vcl::Window* pParent, const SfxItemSet&
{
get(m_pShowExampleCB, "showexample");
get(m_pExampleContainerWIN, "example");
- Size aWinSize(LogicToPixel(Size(150, 188), MapMode(MAP_APPFONT)));
+ Size aWinSize(LogicToPixel(Size(150, 188), MapMode(MapUnit::MapAppFont)));
m_pExampleContainerWIN->set_width_request(aWinSize.Width());
m_pExampleContainerWIN->set_height_request(aWinSize.Height());
m_pExampleContainerWIN->SetSizePixel(aWinSize);
@@ -624,7 +624,7 @@ void SwIndexTreeLB::setColSizes()
for(sal_uInt16 i = 1; i <= MAXLEVEL; ++i)
nTabs_Impl[i+1] = nTabs_Impl[i] + nWidth;
- SvSimpleTable::SetTabs(&nTabs_Impl[0], MAP_PIXEL);
+ SvSimpleTable::SetTabs(&nTabs_Impl[0], MapUnit::MapPixel);
}
class SwAddStylesDlg_Impl : public SfxModalDialog
@@ -658,7 +658,7 @@ SwAddStylesDlg_Impl::SwAddStylesDlg_Impl(vcl::Window* pParent,
get(m_pRightPB, "right");
OUString sHBFirst = get<FixedText>("notapplied")->GetText();
SvSimpleTableContainer *pHeaderTreeContainer = get<SvSimpleTableContainer>("styles");
- Size aSize = pHeaderTreeContainer->LogicToPixel(Size(273, 164), MAP_APPFONT);
+ Size aSize = pHeaderTreeContainer->LogicToPixel(Size(273, 164), MapUnit::MapAppFont);
pHeaderTreeContainer->set_width_request(aSize.Width());
pHeaderTreeContainer->set_height_request(aSize.Height());
m_pHeaderTree = VclPtr<SwIndexTreeLB>::Create(*pHeaderTreeContainer);
@@ -3940,7 +3940,7 @@ std::vector<long> SwEntryBrowseBox::GetOptimalColWidths() const
Size SwEntryBrowseBox::GetOptimalSize() const
{
- Size aSize = LogicToPixel(Size(276 , 175), MapMode(MAP_APPFONT));
+ Size aSize = LogicToPixel(Size(276 , 175), MapMode(MapUnit::MapAppFont));
std::vector<long> aWidths = GetOptimalColWidths();
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index 329fef44ad73..591d5d0875fd 100644
--- a/sw/source/ui/misc/bookmark.cxx
+++ b/sw/source/ui/misc/bookmark.cxx
@@ -350,7 +350,7 @@ BookmarkTable::BookmarkTable(SvSimpleTableContainer& rParent) :
{
static long nTabs[] = {3, 0, 40, 150};
- SetTabs(nTabs, MAP_PIXEL);
+ SetTabs(nTabs, MapUnit::MapPixel);
SetSelectionMode(SelectionMode::Multiple);
InsertHeaderEntry(OUString(SW_RES(STR_PAGE)));
InsertHeaderEntry(OUString(SW_RES(STR_BOOKMARK_NAME)));
diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx
index 5a7f52cb3c31..fa2804d0ffbf 100644
--- a/sw/source/ui/misc/glosbib.cxx
+++ b/sw/source/ui/misc/glosbib.cxx
@@ -56,7 +56,7 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(vcl::Window * pParent,
get(m_pGroupTLB, "group");
const int nAppFontUnits = 130;
- long nWidth = LogicToPixel(Size(nAppFontUnits, 0), MAP_APPFONT).Width();
+ long nWidth = LogicToPixel(Size(nAppFontUnits, 0), MapUnit::MapAppFont).Width();
m_pPathLB->set_width_request(nWidth);
//just has to be something small, real size will be available space
m_pGroupTLB->set_width_request(nWidth);
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index c906e674623b..62e7a9125939 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -845,7 +845,7 @@ SwGlTreeListBox::SwGlTreeListBox(vcl::Window* pParent, WinBits nBits)
Size SwGlTreeListBox::GetOptimalSize() const
{
- return LogicToPixel(Size(212, 84), MapMode(MAP_APPFONT));
+ return LogicToPixel(Size(212, 84), MapMode(MapUnit::MapAppFont));
}
VCL_BUILDER_FACTORY_ARGS(SwGlTreeListBox, WB_BORDER | WB_TABSTOP)
diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx
index cc55e81cd023..43a51888edf1 100644
--- a/sw/source/ui/misc/pgfnote.cxx
+++ b/sw/source/ui/misc/pgfnote.cxx
@@ -89,7 +89,7 @@ IMPL_LINK_NOARG(SwFootNotePage, LineWidthChanged_Impl, Edit&, void)
sal_Int64 nVal = static_cast<sal_Int64>(MetricField::ConvertDoubleValue(
m_pLineWidthEdit->GetValue( ),
m_pLineWidthEdit->GetDecimalDigits( ),
- m_pLineWidthEdit->GetUnit(), MAP_TWIP ));
+ m_pLineWidthEdit->GetUnit(), MapUnit::MapTwip ));
m_pLineTypeBox->SetWidth( nVal );
}
@@ -191,7 +191,7 @@ void SwFootNotePage::Reset(const SfxItemSet *rSet)
sal_Int64 nWidthPt = static_cast<sal_Int64>(MetricField::ConvertDoubleValue(
sal_Int64( pFootnoteInfo->GetLineWidth() ), m_pLineWidthEdit->GetDecimalDigits(),
- MAP_TWIP, m_pLineWidthEdit->GetUnit( ) ));
+ MapUnit::MapTwip, m_pLineWidthEdit->GetUnit( ) ));
m_pLineWidthEdit->SetValue( nWidthPt );
// Separator style
@@ -290,7 +290,7 @@ bool SwFootNotePage::FillItemSet(SfxItemSet *rSet)
long nWidth = static_cast<long>(MetricField::ConvertDoubleValue(
m_pLineWidthEdit->GetValue( ),
m_pLineWidthEdit->GetDecimalDigits( ),
- m_pLineWidthEdit->GetUnit(), MAP_TWIP ));
+ m_pLineWidthEdit->GetUnit(), MapUnit::MapTwip ));
rFootnoteInfo.SetLineWidth( nWidth );
// Separator color