summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/app/appenv.cxx2
-rw-r--r--sw/source/uibase/app/docshini.cxx4
-rw-r--r--sw/source/uibase/dbui/dbtree.cxx2
-rw-r--r--sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx2
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx14
-rw-r--r--sw/source/uibase/docvw/HeaderFooterWin.cxx2
-rw-r--r--sw/source/uibase/docvw/PageBreakWin.cxx2
-rw-r--r--sw/source/uibase/docvw/SidebarScrollBar.cxx2
-rw-r--r--sw/source/uibase/docvw/SidebarWin.cxx2
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx2
-rw-r--r--sw/source/uibase/docvw/srcedtw.cxx2
-rw-r--r--sw/source/uibase/frmdlg/colex.cxx4
-rw-r--r--sw/source/uibase/lingu/sdrhhcwrap.cxx2
-rw-r--r--sw/source/uibase/misc/redlndlg.cxx2
-rw-r--r--sw/source/uibase/shells/grfshex.cxx4
-rw-r--r--sw/source/uibase/shells/textsh.cxx2
-rw-r--r--sw/source/uibase/sidebar/PageFormatPanel.cxx2
-rw-r--r--sw/source/uibase/sidebar/PageMarginControl.cxx4
-rw-r--r--sw/source/uibase/table/chartins.cxx2
-rw-r--r--sw/source/uibase/uiview/pview.cxx2
-rw-r--r--sw/source/uibase/uiview/srcview.cxx4
-rw-r--r--sw/source/uibase/uiview/swcli.cxx2
-rw-r--r--sw/source/uibase/uiview/view2.cxx2
-rw-r--r--sw/source/uibase/uiview/viewdraw.cxx4
-rw-r--r--sw/source/uibase/uiview/viewmdi.cxx2
-rw-r--r--sw/source/uibase/uiview/viewport.cxx2
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx4
-rw-r--r--sw/source/uibase/utlui/attrdesc.cxx2
-rw-r--r--sw/source/uibase/utlui/shdwcrsr.cxx2
-rw-r--r--sw/source/uibase/utlui/unotools.cxx2
-rw-r--r--sw/source/uibase/wrtsh/wrtsh1.cxx8
31 files changed, 47 insertions, 47 deletions
diff --git a/sw/source/uibase/app/appenv.cxx b/sw/source/uibase/app/appenv.cxx
index e26316305c34..eef978327342 100644
--- a/sw/source/uibase/app/appenv.cxx
+++ b/sw/source/uibase/app/appenv.cxx
@@ -345,7 +345,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
// Borders (are put together by Shift-Offset and alignment)
Size aPaperSize = pPrt->PixelToLogic( pPrt->GetPaperSizePixel(),
- MAP_TWIP);
+ MapUnit::MapTwip);
if ( !aPaperSize.Width() && !aPaperSize.Height() )
aPaperSize = SvxPaperInfo::GetPaperSize(PAPER_A4);
if ( aPaperSize.Width() > aPaperSize.Height() )
diff --git a/sw/source/uibase/app/docshini.cxx b/sw/source/uibase/app/docshini.cxx
index 51955a3b4c3a..23361fcff200 100644
--- a/sw/source/uibase/app/docshini.cxx
+++ b/sw/source/uibase/app/docshini.cxx
@@ -105,7 +105,7 @@ using namespace ::com::sun::star;
bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
{
bool bRet = SfxObjectShell::InitNew( xStor );
- OSL_ENSURE( GetMapUnit() == MAP_TWIP, "map unit is not twip!" );
+ OSL_ENSURE( GetMapUnit() == MapUnit::MapTwip, "map unit is not twip!" );
bool bHTMLTemplSet = false;
if( bRet )
{
@@ -413,7 +413,7 @@ void SwDocShell::Init_Impl()
SetAutoStyleFilterIndex(3);
// set map unit to twip
- SetMapUnit( MAP_TWIP );
+ SetMapUnit( MapUnit::MapTwip );
}
void SwDocShell::AddLink()
diff --git a/sw/source/uibase/dbui/dbtree.cxx b/sw/source/uibase/dbui/dbtree.cxx
index 441239e69272..a91511610f1f 100644
--- a/sw/source/uibase/dbui/dbtree.cxx
+++ b/sw/source/uibase/dbui/dbtree.cxx
@@ -164,7 +164,7 @@ VCL_BUILDER_DECL_FACTORY(SwDBTreeList)
Size SwDBTreeList::GetOptimalSize() const
{
- return LogicToPixel(Size(100, 62), MapMode(MAP_APPFONT));
+ return LogicToPixel(Size(100, 62), MapMode(MapUnit::MapAppFont));
}
SwDBTreeList::~SwDBTreeList()
diff --git a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
index 105da59eb028..69d329a686c6 100644
--- a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
+++ b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
@@ -770,7 +770,7 @@ bool SwSpellDialogChildWindow::FindNextDrawTextError_Impl(SwWrtShell& rSh)
GetDrawOutliner().GetEmptyItemSet().GetPool(),
OutlinerMode::TextObject );
aTmpOutliner.SetRefDevice( pDoc->getIDocumentDeviceAccess().getPrinter( false ) );
- MapMode aMapMode (MAP_TWIP);
+ MapMode aMapMode (MapUnit::MapTwip);
aTmpOutliner.SetRefMapMode(aMapMode);
aTmpOutliner.SetPaperSize( pTextObj->GetLogicRect().GetSize() );
aTmpOutliner.SetSpeller( xSpell );
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 3821e8929933..3f7c245404aa 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -835,7 +835,7 @@ int SwTransferable::PrepareForCopy( bool bIsCut )
// --> OD #i98753#
// set size of embedded object at the object description structure
- m_aObjDesc.maSize = OutputDevice::LogicToLogic( m_pWrtShell->GetObjSize(), MAP_TWIP, MAP_100TH_MM );
+ m_aObjDesc.maSize = OutputDevice::LogicToLogic( m_pWrtShell->GetObjSize(), MapUnit::MapTwip, MapUnit::Map100thMM );
// <--
PrepareOLE( m_aObjDesc );
AddFormat( SotClipboardFormatId::OBJECTDESCRIPTOR );
@@ -982,7 +982,7 @@ int SwTransferable::PrepareForCopy( bool bIsCut )
//Now adjust it. Thus in GetData the first query can still
//be answered with delayed rendering.
Size aSz( OLESIZE );
- m_aObjDesc.maSize = OutputDevice::LogicToLogic( aSz, MAP_TWIP, MAP_100TH_MM );
+ m_aObjDesc.maSize = OutputDevice::LogicToLogic( aSz, MapUnit::MapTwip, MapUnit::Map100thMM );
PrepareOLE( m_aObjDesc );
AddFormat( SotClipboardFormatId::OBJECTDESCRIPTOR );
@@ -1075,7 +1075,7 @@ int SwTransferable::CopyGlossary( SwTextBlocks& rGlossary, const OUString& rStr
//Now adjust it. Thus in GetData the first query can still
//be answered with delayed rendering.
Size aSz( OLESIZE );
- m_aObjDesc.maSize = OutputDevice::LogicToLogic( aSz, MAP_TWIP, MAP_100TH_MM );
+ m_aObjDesc.maSize = OutputDevice::LogicToLogic( aSz, MapUnit::MapTwip, MapUnit::Map100thMM );
PrepareOLE( m_aObjDesc );
AddFormat( SotClipboardFormatId::OBJECTDESCRIPTOR );
@@ -1857,7 +1857,7 @@ bool SwTransferable::PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
// if no other graphic is provided
// TODO/LATER: in future a default bitmap could be used
OUString aMimeType;
- MapMode aMapMode( MAP_100TH_MM );
+ MapMode aMapMode( MapUnit::Map100thMM );
aGraphic.SetPrefSize( Size( 2500, 2500 ) );
aGraphic.SetPrefMapMode( aMapMode );
xObjRef.SetGraphic( aGraphic, aMimeType );
@@ -1872,7 +1872,7 @@ bool SwTransferable::PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
aSize = aObjDesc.maSize;
else
{
- MapMode aMapMode( MAP_100TH_MM );
+ MapMode aMapMode( MapUnit::Map100thMM );
aSize = xObjRef.GetSize( &aMapMode );
}
}
@@ -1880,7 +1880,7 @@ bool SwTransferable::PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
{
aSize = Size( aObjDesc.maSize ); //always 100TH_MM
MapUnit aUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( aObjDesc.mnViewAspect ) );
- aSize = OutputDevice::LogicToLogic( aSize, MAP_100TH_MM, aUnit );
+ aSize = OutputDevice::LogicToLogic( aSize, MapUnit::Map100thMM, aUnit );
awt::Size aSz;
try
{
@@ -3095,7 +3095,7 @@ void SwTransferable::SetDataForDragAndDrop( const Point& rSttPos )
//be answered with delayed rendering.
m_aObjDesc.maDragStartPos = rSttPos;
m_aObjDesc.maSize = OutputDevice::LogicToLogic( Size( OLESIZE ),
- MAP_TWIP, MAP_100TH_MM );
+ MapUnit::MapTwip, MapUnit::Map100thMM );
PrepareOLE( m_aObjDesc );
AddFormat( SotClipboardFormatId::OBJECTDESCRIPTOR );
}
diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx b/sw/source/uibase/docvw/HeaderFooterWin.cxx
index c443ccfe5763..dea74020b11f 100644
--- a/sw/source/uibase/docvw/HeaderFooterWin.cxx
+++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx
@@ -257,7 +257,7 @@ bool SwHeaderFooterWin::Contains( const Point &rDocPt ) const
void SwHeaderFooterWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
{
// Use pixels for the rest of the drawing
- SetMapMode(MapMode(MAP_PIXEL));
+ SetMapMode(MapMode(MapUnit::MapPixel));
const Rectangle aRect(Rectangle(Point(0, 0), rRenderContext.PixelToLogic(GetSizePixel())));
drawinglayer::primitive2d::Primitive2DContainer aSeq(3);
diff --git a/sw/source/uibase/docvw/PageBreakWin.cxx b/sw/source/uibase/docvw/PageBreakWin.cxx
index a081b8ed19b5..03fcc6b56535 100644
--- a/sw/source/uibase/docvw/PageBreakWin.cxx
+++ b/sw/source/uibase/docvw/PageBreakWin.cxx
@@ -102,7 +102,7 @@ SwPageBreakWin::SwPageBreakWin( SwEditWin* pEditWin, const SwFrame *pFrame ) :
m_pMousePt( nullptr )
{
// Use pixels for the rest of the drawing
- SetMapMode( MapMode ( MAP_PIXEL ) );
+ SetMapMode( MapMode ( MapUnit::MapPixel ) );
// Create the line control
m_pLine = VclPtr<SwBreakDashedLine>::Create( GetEditWin(), &SwViewOption::GetPageBreakColor, this );
diff --git a/sw/source/uibase/docvw/SidebarScrollBar.cxx b/sw/source/uibase/docvw/SidebarScrollBar.cxx
index 70c589b3dc9e..45e2732b0e62 100644
--- a/sw/source/uibase/docvw/SidebarScrollBar.cxx
+++ b/sw/source/uibase/docvw/SidebarScrollBar.cxx
@@ -39,7 +39,7 @@ void SidebarScrollBar::LogicInvalidate(const Rectangle* pRectangle)
Push(PushFlags::MAPMODE);
EnableMapMode();
MapMode aMapMode = GetMapMode();
- aMapMode.SetMapUnit(MAP_TWIP);
+ aMapMode.SetMapUnit(MapUnit::MapTwip);
SetMapMode(aMapMode);
aRectangle = Rectangle(Point(0, 0), PixelToLogic(GetSizePixel()));
Pop();
diff --git a/sw/source/uibase/docvw/SidebarWin.cxx b/sw/source/uibase/docvw/SidebarWin.cxx
index cbccdcc21a1f..3c839781cb84 100644
--- a/sw/source/uibase/docvw/SidebarWin.cxx
+++ b/sw/source/uibase/docvw/SidebarWin.cxx
@@ -96,7 +96,7 @@ void lcl_translateTwips(vcl::Window& rParent, vcl::Window& rChild, MouseEvent* p
if (!rChild.IsMapModeEnabled())
{
MapMode aMapMode(rChild.GetMapMode());
- aMapMode.SetMapUnit(MAP_TWIP);
+ aMapMode.SetMapUnit(MapUnit::MapTwip);
aMapMode.SetScaleX(rParent.GetMapMode().GetScaleX());
aMapMode.SetScaleY(rParent.GetMapMode().GetScaleY());
rChild.SetMapMode(aMapMode);
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index a32e294d42f4..a79423a7f323 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -5108,7 +5108,7 @@ SwEditWin::SwEditWin(vcl::Window *pParent, SwView &rMyView):
// initially use the input language
m_bUseInputLanguage = true;
- SetMapMode(MapMode(MAP_TWIP));
+ SetMapMode(MapMode(MapUnit::MapTwip));
SetPointer( PointerStyle::Text );
m_aTimer.SetTimeoutHdl(LINK(this, SwEditWin, TimerHandler));
diff --git a/sw/source/uibase/docvw/srcedtw.cxx b/sw/source/uibase/docvw/srcedtw.cxx
index 4998f49882db..95865fe04031 100644
--- a/sw/source/uibase/docvw/srcedtw.cxx
+++ b/sw/source/uibase/docvw/srcedtw.cxx
@@ -994,7 +994,7 @@ void SwSrcEditWindow::SetFont()
//font height is stored in point and set in twip
aSize.Height() =
officecfg::Office::Common::Font::SourceViewFont::FontHeight::get() * 20;
- aFont.SetFontSize(m_pOutWin->LogicToPixel(aSize, MAP_TWIP));
+ aFont.SetFontSize(m_pOutWin->LogicToPixel(aSize, MapUnit::MapTwip));
GetTextEngine()->SetFont( aFont );
m_pOutWin->SetFont(aFont);
}
diff --git a/sw/source/uibase/frmdlg/colex.cxx b/sw/source/uibase/frmdlg/colex.cxx
index 4a42b146c3ad..60eb0c3abcf3 100644
--- a/sw/source/uibase/frmdlg/colex.cxx
+++ b/sw/source/uibase/frmdlg/colex.cxx
@@ -356,7 +356,7 @@ SwColumnOnlyExample::SwColumnOnlyExample(vcl::Window* pParent)
: Window(pParent)
, m_aFrameSize(1,1)
{
- SetMapMode( MapMode( MAP_TWIP ) );
+ SetMapMode( MapMode( MapUnit::MapTwip ) );
m_aWinSize = GetOptimalSize();
m_aWinSize.Height() -= 4;
m_aWinSize.Width() -= 4;
@@ -513,7 +513,7 @@ void SwColumnOnlyExample::SetColumns(const SwFormatCol& rCol)
Size SwColumnOnlyExample::GetOptimalSize() const
{
- return LogicToPixel(Size(75, 46), MapMode(MAP_APPFONT));
+ return LogicToPixel(Size(75, 46), MapMode(MapUnit::MapAppFont));
}
SwPageGridExample::~SwPageGridExample()
diff --git a/sw/source/uibase/lingu/sdrhhcwrap.cxx b/sw/source/uibase/lingu/sdrhhcwrap.cxx
index a5a7494ec37f..6a4fa73a0f48 100644
--- a/sw/source/uibase/lingu/sdrhhcwrap.cxx
+++ b/sw/source/uibase/lingu/sdrhhcwrap.cxx
@@ -67,7 +67,7 @@ SdrHHCWrapper::SdrHHCWrapper( SwView* pVw,
{
SetRefDevice( pView->GetDocShell()->GetDoc()->getIDocumentDeviceAccess().getPrinter( false ) );
- MapMode aMapMode (MAP_TWIP);
+ MapMode aMapMode (MapUnit::MapTwip);
SetRefMapMode(aMapMode);
Size aSize( 1, 1 );
diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx
index 33c4dacc4cd6..0da1e18ea824 100644
--- a/sw/source/uibase/misc/redlndlg.cxx
+++ b/sw/source/uibase/misc/redlndlg.cxx
@@ -1204,7 +1204,7 @@ void SwRedlineAcceptDlg::Initialize(const OUString& rExtraData)
{
sal_Int32 n3 = aStr.indexOf(';');
aStr = aStr.copy(n3 + 1);
- m_pTable->SetTab(i, aStr.toInt32(), MAP_PIXEL);
+ m_pTable->SetTab(i, aStr.toInt32(), MapUnit::MapPixel);
}
}
}
diff --git a/sw/source/uibase/shells/grfshex.cxx b/sw/source/uibase/shells/grfshex.cxx
index 69a18da6a07b..741e3cd54863 100644
--- a/sw/source/uibase/shells/grfshex.cxx
+++ b/sw/source/uibase/shells/grfshex.cxx
@@ -116,9 +116,9 @@ bool SwTextShell::InsertMediaDlg( SfxRequest& rReq )
if( aPrefSize.Width() && aPrefSize.Height() )
{
if( pWindow )
- aSize = pWindow->PixelToLogic( aPrefSize, MAP_TWIP );
+ aSize = pWindow->PixelToLogic( aPrefSize, MapUnit::MapTwip );
else
- aSize = Application::GetDefaultDevice()->PixelToLogic( aPrefSize, MAP_TWIP );
+ aSize = Application::GetDefaultDevice()->PixelToLogic( aPrefSize, MapUnit::MapTwip );
}
else
aSize = Size( 2835, 2835 );
diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx
index 2524dfb38d16..b5663aec62f9 100644
--- a/sw/source/uibase/shells/textsh.cxx
+++ b/sw/source/uibase/shells/textsh.cxx
@@ -355,7 +355,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
{
Size aSize(static_cast<const SvxSizeItem*>(pItem)->GetSize());
aSize = OutputDevice::LogicToLogic
- ( aSize, MapMode( MAP_TWIP ), MapMode( MAP_100TH_MM ) );
+ ( aSize, MapMode( MapUnit::MapTwip ), MapMode( MapUnit::Map100thMM ) );
if(aSize.Width() > MINLAY&& aSize.Height()> MINLAY)
{
diff --git a/sw/source/uibase/sidebar/PageFormatPanel.cxx b/sw/source/uibase/sidebar/PageFormatPanel.cxx
index 8e3b1a343e98..078f5e3f6ad1 100644
--- a/sw/source/uibase/sidebar/PageFormatPanel.cxx
+++ b/sw/source/uibase/sidebar/PageFormatPanel.cxx
@@ -162,7 +162,7 @@ void PageFormatPanel::NotifyItemUpdate(
if(mpPaperOrientation->GetSelectEntryPos() == 1)
Swap(aPaperSize);
- Paper ePaper = SvxPaperInfo::GetSvxPaper(aPaperSize, static_cast<MapUnit>(meUnit),true);
+ Paper ePaper = SvxPaperInfo::GetSvxPaper(aPaperSize, meUnit,true);
mpPaperSizeBox->SetSelection( ePaper );
}
}
diff --git a/sw/source/uibase/sidebar/PageMarginControl.cxx b/sw/source/uibase/sidebar/PageMarginControl.cxx
index 885bb515b26c..85825ce720c5 100644
--- a/sw/source/uibase/sidebar/PageMarginControl.cxx
+++ b/sw/source/uibase/sidebar/PageMarginControl.cxx
@@ -260,8 +260,8 @@ void PageMarginControl::SetMetricFieldMaxValues( const Size& rPageSize )
const long nMT = m_pTopMarginEdit->Denormalize( m_pTopMarginEdit->GetValue( FUNIT_TWIP ) );
const long nMB = m_pBottomMarginEdit->Denormalize( m_pBottomMarginEdit->GetValue( FUNIT_TWIP ) );
- const long nPH = LogicToLogic( rPageSize.Height(), (MapUnit)m_eUnit, MAP_TWIP );
- const long nPW = LogicToLogic( rPageSize.Width(), (MapUnit)m_eUnit, MAP_TWIP );
+ const long nPH = LogicToLogic( rPageSize.Height(), (MapUnit)m_eUnit, MapUnit::MapTwip );
+ const long nPW = LogicToLogic( rPageSize.Width(), (MapUnit)m_eUnit, MapUnit::MapTwip );
// Left
long nMax = nPW - nMR - MINBODY;
diff --git a/sw/source/uibase/table/chartins.cxx b/sw/source/uibase/table/chartins.cxx
index a96c78ea4e69..eec72eb2ecf1 100644
--- a/sw/source/uibase/table/chartins.cxx
+++ b/sw/source/uibase/table/chartins.cxx
@@ -73,7 +73,7 @@ Point SwGetChartDialogPos( const vcl::Window *pParentWin, const Size& rDialogSiz
pParentWin->OutputToAbsoluteScreenPixel( aObjPixel.BottomRight() ) );
Rectangle aDesktop = pParentWin->GetDesktopRectPixel();
- Size aSpace = pParentWin->LogicToPixel( Size( 8, 12 ), MAP_APPFONT );
+ Size aSpace = pParentWin->LogicToPixel( Size( 8, 12 ), MapUnit::MapAppFont );
bool bLayoutRTL = ::GetActiveView()->GetWrtShell().IsTableRightToLeft();
bool bCenterHor = false;
diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx
index 167049dc18d1..903ef5cda361 100644
--- a/sw/source/uibase/uiview/pview.cxx
+++ b/sw/source/uibase/uiview/pview.cxx
@@ -196,7 +196,7 @@ SwPagePreviewWin::SwPagePreviewWin( vcl::Window *pParent, SwPagePreview& rPView
SetHelpId(HID_PAGEPREVIEW);
SetFillColor( GetBackground().GetColor() );
SetLineColor( GetBackground().GetColor());
- SetMapMode( MapMode(MAP_TWIP) );
+ SetMapMode( MapMode(MapUnit::MapTwip) );
const SwMasterUsrPref *pUsrPref = SW_MOD()->GetUsrPref(false);
mnRow = pUsrPref->GetPagePrevRow(); // 1 row
diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx
index b900589433f2..554645dbfb52 100644
--- a/sw/source/uibase/uiview/srcview.cxx
+++ b/sw/source/uibase/uiview/srcview.cxx
@@ -688,10 +688,10 @@ sal_Int32 SwSrcView::PrintSource(
pOutDev->Push();
TextEngine* pTextEngine = aEditWin->GetTextEngine();
- pOutDev->SetMapMode( MAP_100TH_MM );
+ pOutDev->SetMapMode( MapUnit::Map100thMM );
vcl::Font aFont( aEditWin->GetOutWin()->GetFont() );
Size aSize( aFont.GetFontSize() );
- aSize = aEditWin->GetOutWin()->PixelToLogic( aSize, MAP_100TH_MM );
+ aSize = aEditWin->GetOutWin()->PixelToLogic( aSize, MapUnit::Map100thMM );
aFont.SetFontSize( aSize );
aFont.SetColor( COL_BLACK );
pOutDev->SetFont( aFont );
diff --git a/sw/source/uibase/uiview/swcli.cxx b/sw/source/uibase/uiview/swcli.cxx
index 93c6cfeb4394..f5f8f174e544 100644
--- a/sw/source/uibase/uiview/swcli.cxx
+++ b/sw/source/uibase/uiview/swcli.cxx
@@ -138,7 +138,7 @@ void SwOleClient::ViewChanged()
// first convert to TWIPS before scaling, because scaling factors are calculated for
// the TWIPS mapping and so they will produce the best results if applied to TWIPS based
// coordinates
- const MapMode aMyMap ( MAP_TWIP );
+ const MapMode aMyMap ( MapUnit::MapTwip );
const MapMode aObjMap( VCLUnoHelper::UnoEmbed2VCLMapUnit( GetObject()->getMapUnit( GetAspect() ) ) );
aVisSize = OutputDevice::LogicToLogic( aVisSize, aObjMap, aMyMap );
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index 477d52610f2a..bc1a23105f11 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -1441,7 +1441,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
Size aRootSize( aRootRect.SSize() );
- const MapMode aTmpMap( MAP_TWIP );
+ const MapMode aTmpMap( MapUnit::MapTwip );
const Size& rEditSize = GetEditWin().GetOutputSizePixel();
const Size aWindowSize( GetEditWin().PixelToLogic( rEditSize, aTmpMap ) );
diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx
index 07887a7f9b91..5325d2fd15e3 100644
--- a/sw/source/uibase/uiview/viewdraw.cxx
+++ b/sw/source/uibase/uiview/viewdraw.cxx
@@ -176,9 +176,9 @@ void SwView::ExecDraw(SfxRequest& rReq)
if( aPrefSize.Width() && aPrefSize.Height() )
{
if( pWin )
- aSize = pWin->PixelToLogic( aPrefSize, MAP_TWIP );
+ aSize = pWin->PixelToLogic( aPrefSize, MapUnit::MapTwip );
else
- aSize = Application::GetDefaultDevice()->PixelToLogic( aPrefSize, MAP_TWIP );
+ aSize = Application::GetDefaultDevice()->PixelToLogic( aPrefSize, MapUnit::MapTwip );
}
else
aSize = Size( 2835, 2835 );
diff --git a/sw/source/uibase/uiview/viewmdi.cxx b/sw/source/uibase/uiview/viewmdi.cxx
index 8c7ccf7e1693..c416a6631bcb 100644
--- a/sw/source/uibase/uiview/viewmdi.cxx
+++ b/sw/source/uibase/uiview/viewmdi.cxx
@@ -102,7 +102,7 @@ void SwView::SetZoom_( const Size &rEditSize, SvxZoomType eZoomType,
if (pPostItMgr->HasNotes() && pPostItMgr->ShowNotes())
aPageSize.Width() += pPostItMgr->GetSidebarWidth() + pPostItMgr->GetSidebarBorderWidth();
- const MapMode aTmpMap( MAP_TWIP );
+ const MapMode aTmpMap( MapUnit::MapTwip );
const Size aWindowSize( GetEditWin().PixelToLogic( rEditSize, aTmpMap ) );
if( nsUseOnPage::PD_MIRROR == rDesc.GetUseOn() ) // mirrored pages
diff --git a/sw/source/uibase/uiview/viewport.cxx b/sw/source/uibase/uiview/viewport.cxx
index fab131719b7a..0c70ff66c855 100644
--- a/sw/source/uibase/uiview/viewport.cxx
+++ b/sw/source/uibase/uiview/viewport.cxx
@@ -964,7 +964,7 @@ void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize )
Size aSize( rSize );
aSize.Width() -= (aBorder.Left() + aBorder.Right());
aSize.Height() -= (aBorder.Top() + aBorder.Bottom());
- Size aObjSizePixel = GetWindow()->LogicToPixel( aObjSize, MAP_TWIP );
+ Size aObjSizePixel = GetWindow()->LogicToPixel( aObjSize, MapUnit::MapTwip );
SfxViewShell::SetZoomFactor( Fraction( aSize.Width(), aObjSizePixel.Width() ),
Fraction( aSize.Height(), aObjSizePixel.Height() ) );
}
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index 901a3011bdfb..ecc6e4f32d08 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -2762,7 +2762,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer(
// HTML source view and prospect adapt to the printer's paper size
aTmpSize = pPrinter->GetPaperSize();
aTmpSize = OutputDevice::LogicToLogic( aTmpSize,
- pPrinter->GetMapMode(), MapMode( MAP_100TH_MM ));
+ pPrinter->GetMapMode(), MapMode( MapUnit::Map100thMM ));
aPageSize = awt::Size( aTmpSize.Width(), aTmpSize.Height() );
#if 0
// #i115048# it seems users didn't like getting double the formatted page size
@@ -2859,7 +2859,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer(
if ( pPrinter )
{
awt::Size aNewPageSize;
- const Size aPageSize = pPrinter->PixelToLogic( pPrinter->GetPaperSizePixel(), MapMode( MAP_100TH_MM ) );
+ const Size aPageSize = pPrinter->PixelToLogic( pPrinter->GetPaperSizePixel(), MapMode( MapUnit::Map100thMM ) );
aNewPageSize = awt::Size( aPageSize.Width(), aPageSize.Height() );
if ( ( pPagePrintSettings->GetLandscape() &&
aPageSize.Width() < aPageSize.Height() ) ||
diff --git a/sw/source/uibase/utlui/attrdesc.cxx b/sw/source/uibase/utlui/attrdesc.cxx
index 965157df48b4..ad3b9eb92bba 100644
--- a/sw/source/uibase/utlui/attrdesc.cxx
+++ b/sw/source/uibase/utlui/attrdesc.cxx
@@ -496,7 +496,7 @@ bool SwFormatCol::GetPresentation
const long nWdth = static_cast<long>(GetLineWidth());
rText = rText + " " + SW_RESSTR( STR_LINE_WIDTH ) + " " +
::GetMetricText( nWdth, eCoreUnit,
- MAP_POINT, pIntl );
+ MapUnit::MapPoint, pIntl );
}
}
else
diff --git a/sw/source/uibase/utlui/shdwcrsr.cxx b/sw/source/uibase/utlui/shdwcrsr.cxx
index 40543dc88abc..0fcfa7f3543f 100644
--- a/sw/source/uibase/utlui/shdwcrsr.cxx
+++ b/sw/source/uibase/utlui/shdwcrsr.cxx
@@ -73,7 +73,7 @@ void SwShadowCursor::DrawCursor( const Point& rPt, long nHeight, sal_uInt16 nMod
pWin->Push();
- pWin->SetMapMode( MAP_PIXEL );
+ pWin->SetMapMode( MapUnit::MapPixel );
pWin->SetRasterOp( RasterOp::Xor );
pWin->SetLineColor( Color( aCol.GetColor() ^ COL_WHITE ) );
diff --git a/sw/source/uibase/utlui/unotools.cxx b/sw/source/uibase/utlui/unotools.cxx
index 040c44861512..a23774cc862f 100644
--- a/sw/source/uibase/utlui/unotools.cxx
+++ b/sw/source/uibase/utlui/unotools.cxx
@@ -541,7 +541,7 @@ void SwFrameCtrlWindow::Command( const CommandEvent& rCEvt )
Size SwFrameCtrlWindow::GetOptimalSize() const
{
- return LogicToPixel(Size(82, 124), MapMode(MAP_APPFONT));
+ return LogicToPixel(Size(82, 124), MapMode(MapUnit::MapAppFont));
}
void SwFrameCtrlWindow::Resize()
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index dbe9b27335ab..0b9bc15f19e2 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -413,7 +413,7 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName
{
SwRect aArea = GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, nullptr, xObj.GetObject() );
aArea.Pos() += GetAnyCurRect( RECT_FLY_EMBEDDED, nullptr, xObj.GetObject() ).Pos();
- MapMode aMapMode( MAP_TWIP );
+ MapMode aMapMode( MapUnit::MapTwip );
Size aSize = xObj.GetSize( &aMapMode );
aArea.Width( aSize.Width() );
aArea.Height( aSize.Height() );
@@ -504,7 +504,7 @@ bool SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrame
CalcBoundRect( aBound, aFrameMgr.GetAnchor() );
//The Size should be suggested by the OLE server
- MapMode aMapMode( MAP_TWIP );
+ MapMode aMapMode( MapUnit::MapTwip );
Size aSz = xRef.GetSize( &aMapMode );
//Object size can be limited
@@ -650,7 +650,7 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
MapUnit aUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( nAspect ) );
// TODO/LATER: needs complete VisArea?!
- Size aSize( OutputDevice::LogicToLogic( aRect.SVRect(), MAP_TWIP, aUnit ).GetSize() );
+ Size aSize( OutputDevice::LogicToLogic( aRect.SVRect(), MapUnit::MapTwip, aUnit ).GetSize() );
awt::Size aSz;
aSz.Width = aSize.Width();
aSz.Height = aSize.Height();
@@ -755,7 +755,7 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
// nothing can be scaled.
if( _aVisArea.Width() && _aVisArea.Height() )
{
- const MapMode aTmp( MAP_TWIP );
+ const MapMode aTmp( MapUnit::MapTwip );
MapUnit aUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( nAspect ) );
_aVisArea = OutputDevice::LogicToLogic( _aVisArea, aUnit, aTmp);
Size aObjArea;